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
{{ message }}
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
When assets are registered or unregistered, some chains need to do additional updates on their storage. Having injectable callback functions by using traits in pallet-assets increases its extensibility.
For example, all EVM chains need to add RevertCode to pallet_evm::AccountCodes when new assets added to pallet-assets (when deregistering, RevertCode removal needed).
let address = Runtime::asset_id_to_address(asset_id);
pallet_evm::AccountCodes::<Runtime>::insert(address, vec![0x60, 0x00, 0x60, 0x00, 0xfd]);
Otherwise, smart contracts cannot access to assets in pallet-assets via precompiles.
Other usecases for having additional logic when assets are registered/deregistered can be considered.
Allowing this is possible by having a trait in pallet's Config.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When assets are registered or unregistered, some chains need to do additional updates on their storage. Having injectable callback functions by using traits in pallet-assets increases its extensibility.
For example, all EVM chains need to add
RevertCode
topallet_evm::AccountCodes
when new assets added to pallet-assets (when deregistering, RevertCode removal needed).Otherwise, smart contracts cannot access to assets in pallet-assets via precompiles.
Other usecases for having additional logic when assets are registered/deregistered can be considered.
Allowing this is possible by having a trait in pallet's Config.
Beta Was this translation helpful? Give feedback.
All reactions