forked from circlefin/stablecoin-evm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[STABLE-5628] Modify FiatTokenCeloV2_2 to support custom fee caller (c…
…irclefin#192) ## Summary This pull request modifies `FiatTokenCeloV2_2` to allow greater flexibility in who the fee caller for `debitGasFees` and `creditGasFees` can be. Circle has decided to pursue an approach (pending Security, Rui Maximo) in which yet another contract in the call stack calls `debitGasFees` and `creditGasFees`. To that end, we cannot rely on our assumption of 0x0 being the fee caller anymore. ## Detail - Modified FTCV2.2 to account for a dynamic fee caller. This is stored in a Keccak256 storage slot to prevent modification to the USDC storage layout. - Ensured that only the token owner can call `updateFeeCaller`, similar to existing procedures for the blacklister, pauser, etc. - Modified contracts where appropriate and added tests. ## Testing See the tests. ## Documentation - [`FiatTokenFeeAdapter` rollout plan/timeline](https://docs.google.com/document/d/19qISUWAft_yCzg5lPrf41f2m3Bxgi7RQTIqeLZ6_Ghw/edit) - [Product document](https://docs.google.com/document/d/1YKVpFo9aPuBREX7eXcXinFLpskF5q9nUxvbBd0ifYl8) ## Sanitization - [x] Will this commit be publicized? Depending on whether we squash during open-sourcing, it may or may not be. @zhenghui-w is handling the open-sourcing effort. For PR author, have you: - [x] Checked that PR title does not contain internal references? (eg. internal code names, employee names) - [x] Checked that commit messages do not contain internal references? (eg. internal code names, employee names) - [x] Checked that all new code contain the Apache 2.0 copyright license header - [x] Checked that all new third party dependencies use permissive licenses For reviewers, ensure that: - The PR is squash merged - JIRA story IDs are removed from the squash merge commit title Refer to the [Open Source Standard](https://drive.google.com/file/d/1OV5E9ZOBmyZeN877vPP02C92Mjm-qt4Z/view) for more information about sanitization. ## Story STABLE-5628
- Loading branch information
Showing
8 changed files
with
177 additions
and
112 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.