EsdtTokenPayment legacy decode
Currently, EsdtTokenPayment contains 3 fields:
- token identifier
- token nonce
- balance
Historically, it used to contain 4 fields: a redundant token type + the ones reminded above.
There are still some old contracts that produce the old encoding among the DEX contracts. We wrote a deserialization method that also accepts the old encoding. For safety, it is not enabled by default, instead a feature flag needs to be added in the contract’s Cargo.toml
file:
Developers who do not encounter this decoding issue directly, should ignore this feature.
FungibleTokenMapper
caches the token identifier
This is a minor optimization of the storage mapper.
Feel free to send us feedback or open a topic in our Github Discussions tab and share your thoughts so that the entire MultiversX community can hear you. If you have a great idea, share it with us and let’s make it happen by implementing and integrating it in our ecosystem.
Stay Hungry! Stay Foolish!