Closed onikonychev closed 1 month ago
The recent updates enhance the EVM testing suite by adding new end-to-end test contracts and cases, particularly focusing on edge scenarios and smart contract interactions involving ERC-20 tokens. Key changes include the introduction of new Solidity contracts for handling infinite loops and token transfers, updates to configuration files for better test management, and the inclusion of comprehensive test cases to validate these functionalities.
File(s) | Change Summary |
---|---|
CHANGELOG.md |
Added a summary of new end-to-end test contracts for edge cases in the EVM testing suite. |
e2e/evm/README.md |
Updated to include new test cases for smart contracts and ERC-20 contracts with results showing 6 tests passing. |
e2e/evm/contracts/InfiniteLoopGas.sol |
Introduced a Solidity contract demonstrating infinite loop gas consumption. |
e2e/evm/contracts/SendReceiveNibi.sol |
Added two Solidity contracts (ReceiveNibi and SendNibi ) for handling Nibi token transfers. |
e2e/evm/jest.config.js |
Updated testMatch configuration and added maxWorkers setting. |
e2e/evm/test/basic_queries.test.js |
Introduced a test suite for basic EVM queries, including transfers, balance checks, and transaction validations. |
e2e/evm/test/contract_infinite_loop_gas.test.js |
Added tests for handling infinite loop gas exhaustion in EVM contracts. |
e2e/evm/test/contract_send_nibi.test.js |
Introduced tests for sending Nibi tokens using various methods in smart contracts. |
sequenceDiagram
participant User
participant EVM
participant Contract as Smart Contract
User->>Contract: Call sendViaTransfer()
Contract->>EVM: Transfer Nibi
EVM-->>Contract: Confirm transfer
Contract-->>User: Transfer successful
User->>Contract: Call forever()
Contract->>EVM: Execute infinite loop
EVM-->>Contract: Gas exhaustion, revert transaction
Contract-->>User: Transaction failed
In the realm of code so wise,
New tests for EVM arise,
Infinite loops and tokens sent,
Through smart contracts, gas is spent.
With tests that pass and bugs that flee,
Our code runs smooth, as it should be.
🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Introduces 2 more test types: