Acala icon indicating copy to clipboard operation
Acala copied to clipboard

Evm reserve storage support using Erc20 token

Open zqhxuyuan opened this issue 3 years ago • 1 comments

This https://github.com/AcalaNetwork/Acala/pull/2237 introduce Erc20 as fee token, but can't used in Evm reserve/unreserve storage: https://github.com/AcalaNetwork/Acala/blob/92b83a8a5e80bf06231a54e3f4acd3c126fa2f5b/modules/evm/src/lib.rs#L1609-L1625

We need a way to manual specify erc20 contract address be using as reserve fee token.

  • add a dispatch call: set_contract_as_erc20 to indicate contract is erc20 contract. or maybe other way as long as we can identify erc20 contract.
  • passing parameter to reserve_storage, so that we can identify which contract are using
  • ChargeTransactionPayment trait introduce manual specify token as fee token

zqhxuyuan avatar Jul 27 '22 07:07 zqhxuyuan

I think we could update with_fee_* methods to write the fee paying mechanism into storage so that reserve_fee can use it

xlc avatar Jul 27 '22 22:07 xlc