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

test(ante): Add test to cover various EIP712Domain fields #2021

Closed
wants to merge 8 commits into from

Conversation

drklee3
Copy link
Member

@drklee3 drklee3 commented Sep 12, 2024

Description

  • Explicitly tests EIP712Domain values for both expected and unexpected
    • Ensure expected domain exclude verifyingContract and salt fields

Depends on Ethermint PR: Kava-Labs/ethermint#75

Also manually tested EIP712 transaction with the expected EIP712Domain fields with MetaMask.

Checklist

  • Changelog has been updated as necessary.

},
},
{
name: "passes when domain matches expected fields",
Copy link
Member Author

Choose a reason for hiding this comment

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

The added test cases here, the other changes are mostly just to resolve lint errors

Copy link
Member

@pirtleshell pirtleshell left a comment

Choose a reason for hiding this comment

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

nice! appreciate the wrapper that still provides the flexibility to set values if you want to

@@ -240,7 +240,7 @@ replace (
// Use ethermint fork that respects min-gas-price with NoBaseFee true and london enabled, and includes eip712 support
// Tracking kava-labs/etheremint master branch
// TODO: Tag before release
github.com/evmos/ethermint => github.com/kava-labs/ethermint v0.21.1-0.20240802224012-586960857184
github.com/evmos/ethermint => github.com/kava-labs/ethermint v0.21.1-0.20240919184235-65384e03c3e7
Copy link
Member

Choose a reason for hiding this comment

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

does this have some precompile things that v0.21.0-kava-v27.0 does not?

Copy link
Member Author

Choose a reason for hiding this comment

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

hmm yes this commit hash version is from master that includes some precompile work -- Will close this PR for #2044 since that one also includes these same ante tests and additional e2e changes, then backport onto master with this ethermint version

customDomainTypes,
)

// Sign sighHash
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// Sign sighHash
// Sign sigHash

},
},
{
name: "fails when domain.verifyingContract is non-empty string type",
Copy link
Member

Choose a reason for hiding this comment

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

🎉

@drklee3
Copy link
Member Author

drklee3 commented Nov 1, 2024

Superseded by #2045

@drklee3 drklee3 closed this Nov 1, 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

Successfully merging this pull request may close these issues.

2 participants