-
Notifications
You must be signed in to change notification settings - Fork 9
revert #829 #830
Comments
That PR fixes the estimation being too high, which isn't the problem here. The issue is that |
thats probably correct. how did you figure this out? |
Looking through |
Can't seem to get this to work. Always gives wasm error feeEstimate() {
const queryInfoCallArgs = $.tuple($.uint8Array, $.u32)
const encoded = this.encoded()
const args = Rune.constant(queryInfoCallArgs)
.into(CodecRune)
.encoded(Rune.tuple([encoded, encoded.access("length")]))
return this.chain.connection.call(
"state_call",
"TransactionPaymentApi_query_info",
args.map(hex.encodePrefixed),
)
.dbg("TransactionPaymentApi_query_info")
... I looked at these two. https://polkadot.js.org/docs/substrate/runtime/#queryinfouxt-extrinsic-len-u32-runtimedispatchinfo
|
This won't work like |
nice i got it working encoded() {
return Rune.fn($extrinsic)
.call(this.chain.into(ValueRune).access("metadata"))
.into(CodecRune)
.encoded(Rune.rec({
protocolVersion: 4,
call: this,
}))
}
feeEstimate() {
const queryInfoCallArgs = Rune.fn($extrinsic)
.call(this.chain.into(ValueRune).access("metadata"))
.map((ext) => $.tuple(ext, $.u32))
const args = queryInfoCallArgs
.into(CodecRune)
.encoded(Rune.tuple([
Rune.rec({
protocolVersion: 4,
call: this,
}),
this.encoded().access("length"),
]))
return this.chain.connection.call(
"state_call",
"TransactionPaymentApi_query_info",
args.map(hex.encodePrefixed),
)
.dbg("TransactionPaymentApi_query_info") |
It's working but the api call stills gives
|
Placeholder to revert #829 when this PR Is merged and released paritytech/substrate#13766
The text was updated successfully, but these errors were encountered: