Update Info about Easy Fee Tokens / Fee Currencies for L2
For Cel2 some updates are needed to docs when talking about easy fee feature.
In general FeeCurrencyWhiteList => FeeCurrencyDirectory
- https://docs.celo.org/protocol/transaction/transaction-types should be updated like https://github.com/celo-org/txtypes/pull/12/files
- https://docs.celo.org/protocol/transaction/erc20-transaction-fees write a section about differences between cip66 and previous standards.
Please add this to paying for gas in tokens page
Understanding CIP66 vs previous fee currency transaction types
While Celo has had support for paying for gas with specific fee tokens since day 1. the implementation of this feature has gone thru a few iterations of transaction types. CIP 66 aka type 122 has some significant changes to be aware of as a developer.
- In contracts to all other types where the price of gas was denominated in the token paying for it, cip 66 is denominated in CELO. This means the
maxFeePerGasandmaxPriorityFeePerGasfields are used and can be built exactly like a EIP 1559 transactions.
::info:: when providing feeCurrency its safer to either provide all the three maxFeePerGas, maxPriorityFeePerGas and maxFeeInFeeCurrency fields yourself or none and let the library calculate them for you. as there could be ambiguity on whether the maxFeePerGas you give the library was calculated in the fee token or in CELO ::info::
- maxFeeInFeeCurrency field. This is unique to CIP 66. While most libraries that support cip 66 (viem, contractkit, celo-ethers-wrapper) will calculate this for you, by calculating it yourself you have more control and guarantee the transaction will be type 122.
@aaronmgdr Should we update the docs today? or a few days before Cel2 is available to use?
These changes id wait until the testnet is ready.
Now that the testnet is ready, what is the state of this issue?
Waiting for CIP 66 to be implemented on Dango.
Ok, then I'll move this to a different epic, since that is not included in the current testnet.
Please do the changes that don't depend on CIP-66 (FeeCurrencyWhiteList => FeeCurrencyDirectory) now without waiting for CIP-66, since that will still take a while. If that is a signifiant amount of work, consider splitting the issue into two.
CIP-66 won't be in during the alfajores migration and is also not at the top of the priority list after that. Please don't wait for CIP-66 to update the docs!
we can close this as cip66 is not real