-
Notifications
You must be signed in to change notification settings - Fork 834
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 integration tests for the ERC20 extension #2044
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the classic ERC20 methods as of yet, will add the metadata and increase/decrease allowance ones later today.
I've left some remarks though, find them below 👇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @MalteHerrmann, we need to test that the contract and direct calls match the behaviour with the normal ERC-20 contracts that we have now deployed on Evmos for the registered coins. I suggest adding it to the DescribeTable
s and comparing the call to the ERC-20 vs EVM Extension
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2044 +/- ##
==========================================
+ Coverage 70.17% 70.34% +0.16%
==========================================
Files 353 353
Lines 25948 25948
==========================================
+ Hits 18210 18253 +43
+ Misses 6792 6748 -44
- Partials 946 947 +1 |
// FIXME: The gas used on the precompile is much higher than on the EVM | ||
Entry(" - direct call", directCall, int64(3_021_572)), | ||
Entry(" - through erc20 contract", erc20Call, int64(54_381)), | ||
Entry(" - through erc20 v5 contract", erc20V5Call, int64(52_122)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll have to address the gas usage still, as it is right now, the call the to EVM extension is using way more gas than the call to the Solidity contract.
As per discussion with @0xstepit this PR will be split into smaller PRs ⛏️ |
Description
This PR adds integration tests to the ERC20 EVM extension.
Closes ENG-2319