You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the signAndSend function takes an optional assetId. We've been trying to use this for statemine/statemint to pay tx fees using USDT. In our test scripts, we've got it working, but when we deploy our code it doesn't. When inspecting the constructed extrinsics, it seems that there is some inconsistency in endianness used for the serialization. When using signAndSend(address, { assetId: 1984 }) in our scripts, we see in the polkadotjs explorer that the assetId is 01 c0070000, which corresponds to Some(1984) using little endian encoding. However, when we deploy our code, we see that instead it has 01 000007c0. If we use { assetId: 3221684224 }, which is 0xc0070000, it works in the deployed code.
The type of the assetId is type AnyNumber = BN | bigint | Uint8Array | number | string;. We tried passing an explicit Uint8Array or string but that didn't work.
So it seems like somehow there is something wrong with the encoding of this assetId. Any help would be much appreciated
The text was updated successfully, but these errors were encountered:
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.
the
signAndSend
function takes an optional assetId. We've been trying to use this for statemine/statemint to pay tx fees using USDT. In our test scripts, we've got it working, but when we deploy our code it doesn't. When inspecting the constructed extrinsics, it seems that there is some inconsistency in endianness used for the serialization. When usingsignAndSend(address, { assetId: 1984 })
in our scripts, we see in the polkadotjs explorer that the assetId is01 c0070000
, which corresponds toSome(1984)
using little endian encoding. However, when we deploy our code, we see that instead it has01 000007c0
. If we use{ assetId: 3221684224 }
, which is0xc0070000
, it works in the deployed code.The type of the assetId is
type AnyNumber = BN | bigint | Uint8Array | number | string;
. We tried passing an explicitUint8Array
orstring
but that didn't work.So it seems like somehow there is something wrong with the encoding of this assetId. Any help would be much appreciated
The text was updated successfully, but these errors were encountered: