Open arthurgousset opened 2 months ago
Currently there are 3 tokens deployed in foundry migrations (none of them being adapted):
Celo Brazilian Real
with symbol Celo Brazilian Real
Celo Euro
with symbol Celo Euro
Celo Dollar
with symbol Celo Dollar
Would be cool if we could customise the symbols as well apart from adding an adapted token to the list, so we could have more meaningful tests.
@shazarre and I spoke today. Quick TLDR for future reference:
FeeCurrencyDirectory
. It will be an instance of StableToken.sol
with 6 digits. FeeCurrencyDirectory
settings by impersonating the Governance
contract (or whichever address is the owner of the contract). For example, using anvil_impersonateAccount
to "Send transactions impersonating an externally owned account or contract."@martinvol and I spoke today.
We decided not to use an instance of StableToken.sol
, because it's an old version of the contract (the new versions live in the mento repository mento-protocol/mento-core > contracts/StableToken.sol
).
That means I'll:
ExampleFeeCurrency.sol
) with debitGasFees
, creditGasFees
, and decimals
functions (taking inspiration from FeeCurrencyAdapter.t.sol
). It'll live in packages/protocol/contracts-0.8/stability/
.FeeCurrencyAdapter.t.sol
to use ExampleFeeCurrency.sol
ExampleFeeCurrency.sol
with an adapter (FeeCurrencyAdapter.sol
), and register it in the FeeCurrencyDirectory
in the Anvil migrations (Migration.s.sol
).I'm working on this here:
This is more challenging than I expected. I think this might take me another 2-3 dev days to implement and test, before I can put this up for review.
Pausing work on this issue to prioritise this:
Currently, the Anvil devchain only has cUSD as fee currency. Add an adapted token as fee currency (e.g. USDC) so the devchain can be used to test 6 decimal (adapted) fee currencies, and 18 decimal ("normal") fee currencies. This is a request that will help the DevTooling team use the devchain on CI to test SDKs and CLI.
For example, DevTooling could use it here:
Source: FeeCurrencyWhitelistWrapper.test.ts