Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Info about Easy Fee Tokens / Fee Currencies for L2 #1325

Closed
Tracked by #130
aaronmgdr opened this issue May 29, 2024 · 8 comments
Closed
Tracked by #130

Update Info about Easy Fee Tokens / Fee Currencies for L2 #1325

aaronmgdr opened this issue May 29, 2024 · 8 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@aaronmgdr
Copy link
Member

For Cel2 some updates are needed to docs when talking about easy fee feature.

In general FeeCurrencyWhiteList => FeeCurrencyDirectory

  1. https://docs.celo.org/protocol/transaction/transaction-types should be updated like https://github.com/celo-org/txtypes/pull/12/files
  2. 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.

  1. 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 maxFeePerGas and maxPriorityFeePerGas fields 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::

  1. 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.
@therealharpaljadeja
Copy link
Contributor

@aaronmgdr Should we update the docs today? or a few days before Cel2 is available to use?

@aaronmgdr
Copy link
Member Author

These changes id wait until the testnet is ready.

@karlb
Copy link
Contributor

karlb commented Jul 9, 2024

Now that the testnet is ready, what is the state of this issue?

@therealharpaljadeja
Copy link
Contributor

Waiting for CIP 66 to be implemented on Dango.

@karlb
Copy link
Contributor

karlb commented Jul 9, 2024

Ok, then I'll move this to a different epic, since that is not included in the current testnet.

@lvpeschke lvpeschke added the documentation Improvements or additions to documentation label Jul 23, 2024
@karlb
Copy link
Contributor

karlb commented Jul 26, 2024

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.

@karlb
Copy link
Contributor

karlb commented Sep 23, 2024

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!

@aaronmgdr
Copy link
Member Author

we can close this as cip66 is not real

@aaronmgdr aaronmgdr closed this as not planned Won't fix, can't repro, duplicate, stale Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants