Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Add auto-generating basic abi tests for solidity interfaces (#2018
) * chore: Prefer equal to eq matcher The equal matcher is a bit clearer and more consistent. * chore: Rename viem extension and add deploy This moves the viem extension to a more clear place and adds viem support for deploy contract on kvtool. * chore: Fix the viem extensions path This was changed in a previous commit, but forgot to add to the hardhat config. * chore: Add abitype explicit dependency This is used by viem and required by the added test helpers as well as typing for using ABI artifacts. * test: Document EOA account call behavior These tests assert and document the behavior of empty and eoa accounts with value when called by external transactions with or without data. In addition, they assert the gas usage is as expected and only depedent on the base transaction cost plus calldata cost since no code is executed. * test: Add abi basic tests based on sol interfaces These tests are added to exercise solidity function ABI's for function and special function calling. This is in preperation for expanding these tests to work against stateful precompiles, ensuring that precompile contracts respect ABI function and special function calling conventions. These tests also serve to increase the test coverage of the Kava EVM and document behavior for future code readers. * chore: Remove unused imports These were copied from the empty account tests but usage was removed. * chore: Add solhint to CI and fix CI lint Solhint previously failed due to no contracts, so this adds solhint to CI now that contracts exist. In addition, now that tyepscript uses abitypes from compiled contracts, hardhat compile needs to be run before typescript lint. * chore: format fixes for function parethesis A common typo on my part that prettier keeps catching. * chore: Explain throwOnTransactionFailures setting This adds a comment to explain that this setting is required for hardhat-viem to not throw an error when sending transactions that will revert to match kava chain behavior. * chore: Remove outdated comment This removes a comment reference to the tseslint recommended config that is not needed as we are staying with stricter settings. * lint: Add eqeqeq smart validation and fix == This adds a linter for smart validation of === vs ==. The linter was verified to fail the comparison in this commit and then verified it passes after the change from == to ===. * chore: Add stricter settings for tsconfig This adds noFallthroughCasesInSwitch for switch statements and turns on isolatedModules. * ci: Target the local build image for e2e-evm This sets the KAVA_TAG to correctly target the image built locally in CI when running e2e-evm tests for kvtool testnet up and down. * doc: Add act cmds for running e2e-evm CI jobs This documents the commands for using act to run the github CI jobs related to e2e-evm locally for lint and e2e tests. * lint: Fix readme prettier formatting I guess double spaces between sentances are not liked by prettier. * ci: Add explicit compile step to fix race cond There is a race condition between the typechecking and compiler so we add an explicit compile step here to ensure the race is not hit. * test: Add empty account creation transaction This adds a test that creates an account via a transaction with non-zero value. We test that the account has a balance (is created) and that the gas charged is the 21000 instrinsic.
- Loading branch information