Skip to content

Commit

Permalink
Add e2e tests (#2655)
Browse files Browse the repository at this point in the history
* Add e2e tests

* fix

* fix

* update tests

* update tests

* fix tests

* Apply suggestions

* update dependencies

* fix tests
  • Loading branch information
zjb0807 authored Dec 11, 2023
1 parent 1fd9251 commit 49ae33f
Show file tree
Hide file tree
Showing 29 changed files with 8,456 additions and 7,685 deletions.
494 changes: 247 additions & 247 deletions ts-tests/build/Block.json

Large diffs are not rendered by default.

80 changes: 40 additions & 40 deletions ts-tests/build/ChildContract.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,48 +32,48 @@
{
"ast": {
"nodeType": "YulBlock",
"src": "0:439:16",
"src": "0:439:17",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "72:53:16",
"src": "72:53:17",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "89:3:16"
"src": "89:3:17"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "112:5:16"
"src": "112:5:17"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "94:17:16"
"src": "94:17:17"
},
"nodeType": "YulFunctionCall",
"src": "94:24:16"
"src": "94:24:17"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "82:6:16"
"src": "82:6:17"
},
"nodeType": "YulFunctionCall",
"src": "82:37:16"
"src": "82:37:17"
},
"nodeType": "YulExpressionStatement",
"src": "82:37:16"
"src": "82:37:17"
}
]
},
Expand All @@ -83,54 +83,54 @@
{
"name": "value",
"nodeType": "YulTypedName",
"src": "60:5:16",
"src": "60:5:17",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "67:3:16",
"src": "67:3:17",
"type": ""
}
],
"src": "7:118:16"
"src": "7:118:17"
},
{
"body": {
"nodeType": "YulBlock",
"src": "229:124:16",
"src": "229:124:17",
"statements": [
{
"nodeType": "YulAssignment",
"src": "239:26:16",
"src": "239:26:17",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "251:9:16"
"src": "251:9:17"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "262:2:16",
"src": "262:2:17",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "247:3:16"
"src": "247:3:17"
},
"nodeType": "YulFunctionCall",
"src": "247:18:16"
"src": "247:18:17"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "239:4:16"
"src": "239:4:17"
}
]
},
Expand All @@ -140,42 +140,42 @@
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "319:6:16"
"src": "319:6:17"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "332:9:16"
"src": "332:9:17"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "343:1:16",
"src": "343:1:17",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "328:3:16"
"src": "328:3:17"
},
"nodeType": "YulFunctionCall",
"src": "328:17:16"
"src": "328:17:17"
}
],
"functionName": {
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nodeType": "YulIdentifier",
"src": "275:43:16"
"src": "275:43:17"
},
"nodeType": "YulFunctionCall",
"src": "275:71:16"
"src": "275:71:17"
},
"nodeType": "YulExpressionStatement",
"src": "275:71:16"
"src": "275:71:17"
}
]
},
Expand All @@ -185,44 +185,44 @@
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "201:9:16",
"src": "201:9:17",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "213:6:16",
"src": "213:6:17",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "224:4:16",
"src": "224:4:17",
"type": ""
}
],
"src": "131:222:16"
"src": "131:222:17"
},
{
"body": {
"nodeType": "YulBlock",
"src": "404:32:16",
"src": "404:32:17",
"statements": [
{
"nodeType": "YulAssignment",
"src": "414:16:16",
"src": "414:16:17",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "425:5:16"
"src": "425:5:17"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "414:7:16"
"src": "414:7:17"
}
]
}
Expand All @@ -234,24 +234,24 @@
{
"name": "value",
"nodeType": "YulTypedName",
"src": "386:5:16",
"src": "386:5:17",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "396:7:16",
"src": "396:7:17",
"type": ""
}
],
"src": "359:77:16"
"src": "359:77:17"
}
]
},
"contents": "{\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n}\n",
"id": 16,
"id": 17,
"language": "Yul",
"name": "#utility.yul"
}
Expand All @@ -260,7 +260,7 @@
"linkReferences": {},
"object": "6080604052348015600f57600080fd5b506004361060285760003560e01c806316ada54714602d575b600080fd5b60336047565b604051603e9190605a565b60405180910390f35b60005481565b6054816073565b82525050565b6000602082019050606d6000830184604d565b92915050565b600081905091905056fea26469706673582212200ccb0c54f406c5f94ca07bbe9c717145da8fe82b37b3ee37a813e73d8be65c0564736f6c63430008020033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x28 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x16ADA547 EQ PUSH1 0x2D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x33 PUSH1 0x47 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x3E SWAP2 SWAP1 PUSH1 0x5A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x54 DUP2 PUSH1 0x73 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH1 0x6D PUSH1 0x0 DUP4 ADD DUP5 PUSH1 0x4D JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xC 0xCB 0xC SLOAD DELEGATECALL MOD 0xC5 0xF9 0x4C LOG0 PUSH28 0xBE9C717145DA8FE82B37B3EE37A813E73D8BE65C0564736F6C634300 ADDMOD MUL STOP CALLER ",
"sourceMap": "1069:106:5:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1098:16;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;:::o;7:118:16:-;94:24;112:5;94:24;:::i;:::-;89:3;82:37;72:53;;:::o;131:222::-;;262:2;251:9;247:18;239:26;;275:71;343:1;332:9;328:17;319:6;275:71;:::i;:::-;229:124;;;;:::o;359:77::-;;425:5;414:16;;404:32;;;:::o"
"sourceMap": "1069:106:5:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1098:16;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;:::o;7:118:17:-;94:24;112:5;94:24;:::i;:::-;89:3;82:37;72:53;;:::o;131:222::-;;262:2;251:9;247:18;239:26;;275:71;343:1;332:9;328:17;319:6;275:71;:::i;:::-;229:124;;;;:::o;359:77::-;;425:5;414:16;;404:32;;;:::o"
}
},
"bytecode": "608060405234801561001057600080fd5b504260008190555060b3806100266000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806316ada54714602d575b600080fd5b60336047565b604051603e9190605a565b60405180910390f35b60005481565b6054816073565b82525050565b6000602082019050606d6000830184604d565b92915050565b600081905091905056fea26469706673582212200ccb0c54f406c5f94ca07bbe9c717145da8fe82b37b3ee37a813e73d8be65c0564736f6c63430008020033"
Expand Down
4 changes: 2 additions & 2 deletions ts-tests/build/Contract.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
"linkReferences": {},
"object": "6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea264697066735822122006977fabfa6fad9f18e547cefafa048f5053e1fe13432a1739a038e99b0e5bfa64736f6c63430008020033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x3F DUP1 PUSH1 0x1D PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 MOD SWAP8 PUSH32 0xABFA6FAD9F18E547CEFAFA048F5053E1FE13432A1739A038E99B0E5BFA64736F PUSH13 0x63430008020033000000000000 ",
"sourceMap": "478:20:10:-:0;;;;;;;;;;;;;;;;;;;"
"sourceMap": "478:20:11:-:0;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "6080604052600080fdfea264697066735822122006977fabfa6fad9f18e547cefafa048f5053e1fe13432a1739a038e99b0e5bfa64736f6c63430008020033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 MOD SWAP8 PUSH32 0xABFA6FAD9F18E547CEFAFA048F5053E1FE13432A1739A038E99B0E5BFA64736F PUSH13 0x63430008020033000000000000 ",
"sourceMap": "478:20:10:-:0;;;;;"
"sourceMap": "478:20:11:-:0;;;;;"
}
},
"bytecode": "6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea264697066735822122006977fabfa6fad9f18e547cefafa048f5053e1fe13432a1739a038e99b0e5bfa64736f6c63430008020033"
Expand Down
Loading

0 comments on commit 49ae33f

Please sign in to comment.