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

tests(erc20): Add ERC20 integration test setup #2080

Merged
merged 10 commits into from Nov 27, 2023

Conversation

MalteHerrmann
Copy link
Contributor

Description

Supersedes #2044.

This PR adds the basic setup for adding the ERC20 EVM extension integration tests.
Specifically, it does the following:

  • Add basic Ginkgo grid for adding integration tests
  • Utilities to the integration network:
    • gov methods to submit a proposal and query params
    • erc20 utils to register a token pair using the full governance flow in the integration setup
    • some queries
    • a util to fund an account with tokens of a specific denomination (this might be refactored after conv. with @facs95)
  • Add necessary contracts for testing different cases:
    • a contract to call the EVM extension
    • an OpenZeppelin v5 ERC20 contract
    • a contract to call ERC20 contracts without the extra allowance and metadata methods
  • also it splits the integration test setup from the Unit testing suite for clear separation of concerns

@MalteHerrmann MalteHerrmann requested a review from a team as a code owner November 27, 2023 13:33
@MalteHerrmann MalteHerrmann requested review from Vvaradinov and facs95 and removed request for a team November 27, 2023 13:33
precompiles/erc20/utils_test.go Show resolved Hide resolved
precompiles/erc20/utils_test.go Outdated Show resolved Hide resolved
testutil/integration/evmos/utils/erc20.go Show resolved Hide resolved
testutil/integration/evmos/utils/gov.go Outdated Show resolved Hide resolved
testutil/integration/evmos/utils/gov.go Outdated Show resolved Hide resolved
precompiles/erc20/utils_test.go Outdated Show resolved Hide resolved
precompiles/erc20/utils_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

LGTM pending constant for the expected event

@MalteHerrmann
Copy link
Contributor Author

done! The linter is only complaining about some functions that will be used in tests, so that failing is as expected.

@fedekunze fedekunze merged commit 9cfbf0b into main Nov 27, 2023
34 of 37 checks passed
@fedekunze fedekunze deleted the malte/add-erc20-integration-setup branch November 27, 2023 15:53
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.

None yet

3 participants