Funding
Encode
Name | Rule |
---|---|
type | 1 byte, |
accountId | 4 bytes |
subAccountId | 1 byte |
accountIdNonce | 4 bytes |
fundingAccountIds | 4 bytes(when length is 1) or 31 bytes(when length > 1) |
fee | |
feeToken | 2 bytes |
The encoding process of fundingAccountIds
is as blew:
If the length is 1, encode the item directly in big endian;
If the length > 1, encode the item in big endian into a bytes list in order;
Pass the bytes list to the
rescue_hash
function in Rust SDK, and get the 31 bytes result.
Example
For the fundingAccountIds
length is 1:
the encode result is:
For the fundingAccountIds
length is larger than 1:
Last updated