Skip to content

Conversation

@palango
Copy link

@palango palango commented Nov 10, 2023

Adds a simple fee currency transfer test.

The genesis initialisation of the SortedOracles contract is complicated, so instead I created a simple MockSortedOracle contract and use that instead. This is added to the optimism repo in celo-org/optimism#90.

Resolves celo-org/optimism#86

@palango palango force-pushed the palango/fee-currency-state-transition branch 4 times, most recently from 5c2c64a to 9469fa9 Compare November 21, 2023 12:56
@palango palango force-pushed the palango/fee-currency-state-transition-test branch from d31cd0f to 16fe6b3 Compare November 27, 2023 11:24
@palango palango changed the base branch from palango/fee-currency-state-transition to celo3 November 27, 2023 11:24

// Add state from celoGenesisAccounts
for addr, data := range celoGenesisAccounts() {
for addr, data := range celoGenesisAccounts(common.HexToAddress("0x2")) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could make this nicer with variadic args, but it felt like over-optimisation. Let me know if you disagree.

@palango palango marked this pull request as ready for review November 27, 2023 16:47
@palango palango requested a review from gastonponti November 27, 2023 17:00
@palango palango force-pushed the palango/fee-currency-state-transition-test branch from 05653ac to 2066e27 Compare December 1, 2023 13:33
@palango palango force-pushed the palango/fee-currency-state-transition-test branch from 2066e27 to 38782aa Compare December 1, 2023 13:37
@palango
Copy link
Author

palango commented Dec 1, 2023

So the test actually found a bug: The basefee wasn't correctly converted into the fee currency for celo transactions. This addition makes the changes a bit more widespread, but I don't see a more concise way.

Copy link

@carterqw2 carterqw2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@palango palango merged commit ec62655 into celo3 Dec 6, 2023
@palango palango deleted the palango/fee-currency-state-transition-test branch December 6, 2023 12:33
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

Successfully merging this pull request may close these issues.

Add test of state transition with fee currency support

3 participants