-
Notifications
You must be signed in to change notification settings - Fork 19
[evm-tracing] Add more e2e tests #1622
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
Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
034ce5d
Add test to check filtering per toAddress
dmitrylavrenov 886da34
Add test to check tracing range of blocks
dmitrylavrenov 5e7b764
Add heavy abi contract
dmitrylavrenov 686ddde
Add looper abi contract
dmitrylavrenov 1138f59
Add tests for trace_filter to check gas used in loops
dmitrylavrenov abed854
Rename traceFilter tests to traceFilterGeneral
dmitrylavrenov 3bb5c86
Add tests that check max count numbder at trace_filter
dmitrylavrenov a8896b5
Rename directory containing abis for evm tracing tests
dmitrylavrenov 30f75be
Add tests for trace_filter to check heavy contracts logic
dmitrylavrenov 6126724
Separate debugTrace related tests to separate files
dmitrylavrenov 021dfcd
Extend debugTraceTransaction tests with the one that test big responses
dmitrylavrenov 7369149
Extend debugTraceTransaction tests with the one that prevents wasm me…
dmitrylavrenov 4d1be3a
Extend debugTraceTransaction tests with the one that checks using opt…
dmitrylavrenov d135f09
Extend debugTraceTransaction tests with the one that checks Blockscou…
dmitrylavrenov 9cefe9f
Extend Blockscout format test with V2 format check
dmitrylavrenov 4088718
Extend debugTraceTransaction tests with the one that checks intermedi…
dmitrylavrenov 7636fbc
Extend debugTraceTransaction tests with the one that checks out of ga…
dmitrylavrenov 7de1ccf
Extend debugTraceTransaction tests with the one that checks precompil…
dmitrylavrenov 7607951
Add checking Blockscout format for out of gas and precompiles
dmitrylavrenov 28c00f5
Extend debugTraceTransaction tests with the one that checks transfer …
dmitrylavrenov 6632988
Add debugTraceTransactionCallTracer tests
dmitrylavrenov e388b6c
Add debugTraceTransactionCallList tests
dmitrylavrenov 5e59819
Improve namings and descritpion at trace_filter related tests
dmitrylavrenov 55ee0d4
Improve namings and descriptions at debug_traceCall test
dmitrylavrenov 427b821
Improve namings and descriptions at debug_traceTransaction related tests
dmitrylavrenov a798ac5
Fix blockNumber usage in checks
dmitrylavrenov fd2f047
Fix call naming at callee contract
dmitrylavrenov d6e8159
Improve checks related with RETURN opcode
dmitrylavrenov d496342
Move blockscout fixtures to separate dir and add README
dmitrylavrenov b751319
Fix blocks number calculation at traceFilterGeneral
dmitrylavrenov 5332944
Use single transaction to check tracing block by number and hash at d…
dmitrylavrenov 9c9d1d5
Check transaction position if it's a part of a corresponding block at…
dmitrylavrenov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
108 changes: 108 additions & 0 deletions
108
utils/e2e-tests/ts/lib/abis/evmTracing/callForwarder.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| // pragma solidity >=0.8.3; | ||
| // | ||
| // contract CallForwarder { | ||
| // function call( | ||
| // address target, | ||
| // bytes memory data | ||
| // ) public returns (bool, bytes memory) { | ||
| // return target.call(data); | ||
| // } | ||
| // | ||
| // function callRange(address first, address last) public { | ||
| // require(first < last, "invalid range"); | ||
| // while (first < last) { | ||
| // first.call(""); | ||
| // first = address(uint160(first) + 1); | ||
| // } | ||
| // } | ||
| // | ||
| // function delegateCall( | ||
| // address target, | ||
| // bytes memory data | ||
| // ) public returns (bool, bytes memory) { | ||
| // return target.delegatecall(data); | ||
| // } | ||
| // } | ||
|
|
||
| export default { | ||
| abi: [ | ||
| { | ||
| inputs: [ | ||
| { | ||
| internalType: "address", | ||
| name: "target", | ||
| type: "address", | ||
| }, | ||
| { | ||
| internalType: "bytes", | ||
| name: "data", | ||
| type: "bytes", | ||
| }, | ||
| ], | ||
| name: "call", | ||
| outputs: [ | ||
| { | ||
| internalType: "bool", | ||
| name: "", | ||
| type: "bool", | ||
| }, | ||
| { | ||
| internalType: "bytes", | ||
| name: "", | ||
| type: "bytes", | ||
| }, | ||
| ], | ||
| stateMutability: "nonpayable", | ||
| type: "function", | ||
| }, | ||
| { | ||
| inputs: [ | ||
| { | ||
| internalType: "address", | ||
| name: "first", | ||
| type: "address", | ||
| }, | ||
| { | ||
| internalType: "address", | ||
| name: "last", | ||
| type: "address", | ||
| }, | ||
| ], | ||
| name: "callRange", | ||
| outputs: [], | ||
| stateMutability: "nonpayable", | ||
| type: "function", | ||
| }, | ||
| { | ||
| inputs: [ | ||
| { | ||
| internalType: "address", | ||
| name: "target", | ||
| type: "address", | ||
| }, | ||
| { | ||
| internalType: "bytes", | ||
| name: "data", | ||
| type: "bytes", | ||
| }, | ||
| ], | ||
| name: "delegateCall", | ||
| outputs: [ | ||
| { | ||
| internalType: "bool", | ||
| name: "", | ||
| type: "bool", | ||
| }, | ||
| { | ||
| internalType: "bytes", | ||
| name: "", | ||
| type: "bytes", | ||
| }, | ||
| ], | ||
| stateMutability: "nonpayable", | ||
| type: "function", | ||
| }, | ||
| ], | ||
| bytecode: | ||
| "0x6080604052348015600e575f5ffd5b5061076d8061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80630382943f146100435780631b8b921d1461005f57806356e7b7aa14610090575b5f5ffd5b61005d6004803603810190610058919061032e565b6100c1565b005b610079600480360381019061007491906104a8565b6101e0565b604051610087929190610596565b60405180910390f35b6100aa60048036038101906100a591906104a8565b610252565b6040516100b8929190610596565b60405180910390f35b8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161061012f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101269061061e565b60405180910390fd5b5b8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1610156101dc578173ffffffffffffffffffffffffffffffffffffffff1660405161018790610669565b5f604051808303815f865af19150503d805f81146101c0576040519150601f19603f3d011682016040523d82523d5f602084013e6101c5565b606091505b5050506001826101d591906106aa565b9150610130565b5050565b5f60608373ffffffffffffffffffffffffffffffffffffffff16836040516102089190610721565b5f604051808303815f865af19150503d805f8114610241576040519150601f19603f3d011682016040523d82523d5f602084013e610246565b606091505b50915091509250929050565b5f60608373ffffffffffffffffffffffffffffffffffffffff168360405161027a9190610721565b5f60405180830381855af49150503d805f81146102b2576040519150601f19603f3d011682016040523d82523d5f602084013e6102b7565b606091505b50915091509250929050565b5f604051905090565b5f5ffd5b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102fd826102d4565b9050919050565b61030d816102f3565b8114610317575f5ffd5b50565b5f8135905061032881610304565b92915050565b5f5f60408385031215610344576103436102cc565b5b5f6103518582860161031a565b92505060206103628582860161031a565b9150509250929050565b5f5ffd5b5f5ffd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6103ba82610374565b810181811067ffffffffffffffff821117156103d9576103d8610384565b5b80604052505050565b5f6103eb6102c3565b90506103f782826103b1565b919050565b5f67ffffffffffffffff82111561041657610415610384565b5b61041f82610374565b9050602081019050919050565b828183375f83830152505050565b5f61044c610447846103fc565b6103e2565b90508281526020810184848401111561046857610467610370565b5b61047384828561042c565b509392505050565b5f82601f83011261048f5761048e61036c565b5b813561049f84826020860161043a565b91505092915050565b5f5f604083850312156104be576104bd6102cc565b5b5f6104cb8582860161031a565b925050602083013567ffffffffffffffff8111156104ec576104eb6102d0565b5b6104f88582860161047b565b9150509250929050565b5f8115159050919050565b61051681610502565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610553578082015181840152602081019050610538565b5f8484015250505050565b5f6105688261051c565b6105728185610526565b9350610582818560208601610536565b61058b81610374565b840191505092915050565b5f6040820190506105a95f83018561050d565b81810360208301526105bb818461055e565b90509392505050565b5f82825260208201905092915050565b7f696e76616c69642072616e6765000000000000000000000000000000000000005f82015250565b5f610608600d836105c4565b9150610613826105d4565b602082019050919050565b5f6020820190508181035f830152610635816105fc565b9050919050565b5f81905092915050565b50565b5f6106545f8361063c565b915061065f82610646565b5f82019050919050565b5f61067382610649565b9150819050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6106b4826102d4565b91506106bf836102d4565b9250828201905073ffffffffffffffffffffffffffffffffffffffff8111156106eb576106ea61067d565b5b92915050565b5f6106fb8261051c565b610705818561063c565b9350610715818560208601610536565b80840191505092915050565b5f61072c82846106f1565b91508190509291505056fea264697066735822122061744ef3cd320f8504db2e240b6131dd71c7811dbb3c105ee2c3014e04b1635864736f6c634300081e0033", | ||
| } as const; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.