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

Add an adapted token to FeeCurrencyDirectory (e.g. USDC) #10994

Open
Tracked by #10990
arthurgousset opened this issue May 14, 2024 · 2 comments
Open
Tracked by #10990

Add an adapted token to FeeCurrencyDirectory (e.g. USDC) #10994

arthurgousset opened this issue May 14, 2024 · 2 comments
Assignees

Comments

@arthurgousset
Copy link
Member

arthurgousset commented May 14, 2024

Currently, the Anvil devchain only has cUSD as fee currency. Add an adapted token as fee currency (e.g. USDC) so the DevTooling team can use that for testing purposes.

For example, DevTooling could use it here:

it('fetches fee currency information', async () => {
    const wrapper = await kit.contracts.getFeeCurrencyWhitelist()

    expect(await wrapper.getFeeCurrencyInformation()).toMatchInlineSnapshot(`
      [
        {
          "adaptedToken": undefined,
          "address": "0x5315e44798395d4a952530d131249fE00f554565",
          "name": "Celo Dollar",
          "symbol": "cUSD",
        },
        {
          "adaptedToken": undefined,
          "address": "0x965D352283a3C8A016b9BBbC9bf6306665d495E7",
          "name": "Celo Brazilian Real",
          "symbol": "cREAL",
        },
        {
          "adaptedToken": undefined,
          "address": "0xdD66C23e07b4D6925b6089b5Fe6fc9E62941aFE8",
          "name": "Celo Euro",
          "symbol": "cEUR",
        },
      ]
    `)
  })

Source: FeeCurrencyWhitelistWrapper.test.ts

@shazarre
Copy link
Contributor

shazarre commented Jun 10, 2024

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.

@arthurgousset
Copy link
Member Author

@shazarre and I spoke today. Quick TLDR for future reference:

  1. we will add an adapted token to the FeeCurrencyDirectory. It will be an instance of StableToken.sol with 6 digits.
  2. sepately, consumers of the devchain (e.g. the CLI and SDK test suites) can freely modify symbols and 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."

@arthurgousset arthurgousset self-assigned this Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants