@keep-network/tbtc-v2 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/contracts/GovernanceUtils.sol/GovernanceUtils.dbg.json +1 -1
- package/build/contracts/bank/Bank.sol/Bank.dbg.json +1 -1
- package/build/contracts/bank/IReceiveBalanceApproval.sol/IReceiveBalanceApproval.dbg.json +1 -1
- package/build/contracts/bridge/BitcoinTx.sol/BitcoinTx.dbg.json +1 -1
- package/build/contracts/bridge/Bridge.sol/Bridge.dbg.json +1 -1
- package/build/contracts/bridge/BridgeGovernanceParameters.sol/BridgeGovernanceParameters.dbg.json +1 -1
- package/build/contracts/bridge/BridgeState.sol/BridgeState.dbg.json +1 -1
- package/build/contracts/bridge/Deposit.sol/Deposit.dbg.json +1 -1
- package/build/contracts/bridge/DepositSweep.sol/DepositSweep.dbg.json +1 -1
- package/build/contracts/bridge/EcdsaLib.sol/EcdsaLib.dbg.json +1 -1
- package/build/contracts/bridge/Fraud.sol/Fraud.dbg.json +1 -1
- package/build/contracts/bridge/Heartbeat.sol/Heartbeat.dbg.json +1 -1
- package/build/contracts/bridge/IRelay.sol/IRelay.dbg.json +1 -1
- package/build/contracts/bridge/MovingFunds.sol/MovingFunds.dbg.json +1 -1
- package/build/contracts/bridge/Redemption.sol/OutboundTx.dbg.json +1 -1
- package/build/contracts/bridge/Redemption.sol/Redemption.dbg.json +1 -1
- package/build/contracts/bridge/VendingMachine.sol/VendingMachine.dbg.json +1 -1
- package/build/contracts/bridge/VendingMachineV2.sol/VendingMachineV2.dbg.json +1 -1
- package/build/contracts/bridge/VendingMachineV3.sol/VendingMachineV3.dbg.json +1 -1
- package/build/contracts/bridge/WalletCoordinator.sol/WalletCoordinator.dbg.json +1 -1
- package/build/contracts/bridge/Wallets.sol/Wallets.dbg.json +1 -1
- package/build/contracts/l2/L2TBTC.sol/L2TBTC.dbg.json +1 -1
- package/build/contracts/l2/L2WormholeGateway.sol/IWormholeTokenBridge.dbg.json +1 -1
- package/build/contracts/l2/L2WormholeGateway.sol/L2WormholeGateway.dbg.json +1 -1
- package/build/contracts/l2/L2WormholeGateway.sol/L2WormholeGateway.json +2 -15
- package/build/contracts/maintainer/MaintainerProxy.sol/MaintainerProxy.dbg.json +1 -1
- package/build/contracts/relay/LightRelay.sol/ILightRelay.dbg.json +1 -1
- package/build/contracts/relay/LightRelay.sol/LightRelay.dbg.json +1 -1
- package/build/contracts/relay/LightRelay.sol/RelayUtils.dbg.json +1 -1
- package/build/contracts/relay/LightRelayMaintainerProxy.sol/LightRelayMaintainerProxy.dbg.json +1 -1
- package/build/contracts/token/TBTC.sol/TBTC.dbg.json +1 -1
- package/build/contracts/vault/DonationVault.sol/DonationVault.dbg.json +1 -1
- package/build/contracts/vault/IVault.sol/IVault.dbg.json +1 -1
- package/build/contracts/vault/TBTCOptimisticMinting.sol/TBTCOptimisticMinting.dbg.json +1 -1
- package/build/contracts/vault/TBTCVault.sol/TBTCVault.dbg.json +1 -1
- package/contracts/l2/L2WormholeGateway.sol +7 -27
- package/export/artifacts/contracts/bridge/VendingMachine.sol/VendingMachine.json +6 -6
- package/export/artifacts/contracts/bridge/VendingMachineV2.sol/VendingMachineV2.json +6 -6
- package/export/artifacts/contracts/bridge/VendingMachineV3.sol/VendingMachineV3.json +6 -6
- package/export/artifacts/contracts/l2/L2WormholeGateway.sol/L2WormholeGateway.json +3030 -3498
- package/export/artifacts/contracts/maintainer/MaintainerProxy.sol/MaintainerProxy.json +88 -88
- package/export/artifacts/contracts/relay/LightRelay.sol/LightRelay.json +57 -57
- package/export/artifacts/contracts/relay/LightRelayMaintainerProxy.sol/LightRelayMaintainerProxy.json +31 -31
- package/export/artifacts/contracts/test/BankStub.sol/BankStub.json +11975 -0
- package/export/artifacts/contracts/test/BridgeStub.sol/BridgeStub.json +51806 -0
- package/export/artifacts/contracts/test/GoerliLightRelay.sol/GoerliLightRelay.json +12024 -0
- package/export/artifacts/contracts/test/HeartbeatStub.sol/HeartbeatStub.json +822 -0
- package/export/artifacts/contracts/test/LightRelayStub.sol/LightRelayStub.json +12729 -0
- package/export/artifacts/contracts/test/ReceiveApprovalStub.sol/ReceiveApprovalStub.json +2160 -0
- package/export/artifacts/contracts/test/SystemTestRelay.sol/SystemTestRelay.json +3407 -0
- package/export/artifacts/contracts/test/TestERC20.sol/TestERC20.json +14263 -0
- package/export/artifacts/contracts/test/TestERC721.sol/TestERC721.json +10644 -0
- package/export/artifacts/contracts/test/TestEcdsaLib.sol/TestEcdsaLib.json +1160 -0
- package/export/artifacts/contracts/test/WormholeBridgeStub.sol/WormholeBridgeStub.json +8665 -0
- package/export/artifacts/contracts/token/TBTC.sol/TBTC.json +2 -2
- package/export/artifacts/contracts/vault/DonationVault.sol/DonationVault.json +11 -11
- package/export/artifacts/contracts/vault/TBTCVault.sol/TBTCVault.json +135 -135
- package/export/test/integration/data/bls.js +12 -0
- package/export/test/integration/data/integration.js +133 -0
- package/export/test/integration/utils/ecdsa-wallet-registry.js +370 -0
- package/export/test/integration/utils/random-beacon.js +193 -0
- package/export/{deploy/08_deploy_maintainer_proxy.js → test/integration/utils/staking.js} +35 -32
- package/export/typechain/factories/L2WormholeGateway__factory.js +1 -14
- package/export/typechain/factories/WormholeBridgeStub__factory.js +1 -1
- package/package.json +1 -1
- package/export/deploy/00_resolve_relay.js +0 -83
- package/export/deploy/01_deploy_tbtc_v2_token.js +0 -70
- package/export/deploy/02_deploy_vending_machine.js +0 -84
- package/export/deploy/03_transfer_vending_machine_roles.js +0 -69
- package/export/deploy/04_deploy_bank.js +0 -73
- package/export/deploy/05_deploy_bridge.js +0 -178
- package/export/deploy/06_deploy_tbtc_vault.js +0 -80
- package/export/deploy/07_deploy_bridge_governance.js +0 -87
- package/export/deploy/09_bank_update_bridge.js +0 -63
- package/export/deploy/10_authorize_spv_maintainer_in_bridge.js +0 -61
- package/export/deploy/11_transfer_bank_ownership.js +0 -60
- package/export/deploy/12_transfer_bridge_governance.js +0 -63
- package/export/deploy/13_transfer_bridge_governance_ownership.js +0 -60
- package/export/deploy/14_transfer_tbtc_vault_ownership.js +0 -60
- package/export/deploy/15_transfer_maintainer_proxy_ownership.js +0 -60
- package/export/deploy/16_initialize_wallet_owner.js +0 -63
- package/export/deploy/16_transfer_proxy_admin_ownership.js +0 -73
- package/export/deploy/17_authorize_maintainer_proxy_in_bridge.js +0 -63
- package/export/deploy/17_transfer_proxy_admin_ownership.js +0 -73
- package/export/deploy/18_authorize_maintainer_proxy_in_bridge.js +0 -63
- package/export/deploy/18_authorize_maintainer_proxy_in_reimbursement_pool.js +0 -63
- package/export/deploy/19_authorize_bridge_in_reimbursement_pool.js +0 -63
- package/export/deploy/19_authorize_maintainer_proxy_in_reimbursement_pool.js +0 -63
- package/export/deploy/20_authorize_bridge_in_reimbursement_pool.js +0 -63
- package/export/deploy/20_deploy_proxy_admin_with_deputy.js +0 -80
- package/export/deploy/21_transfer_reimbursement_pool_ownership.js +0 -60
- package/export/deploy/22_deploy_proxy_admin_with_deputy.js +0 -80
- package/export/deploy/24_transfer_maintainer_proxy_ownership.js +0 -60
- package/export/deploy/25_transfer_proxy_admin_ownership.js +0 -73
- package/export/deploy/26_authorize_maintainer_proxy_in_reimbursement_pool.js +0 -70
- package/export/deploy/27_authorize_bridge_in_reimbursement_pool.js +0 -70
- package/export/deploy/28_deploy_proxy_admin_with_deputy.js +0 -80
- package/export/deploy/35_transfer_wallet_coordinator_ownership.js +0 -60
- package/export/deploy/36_deploy_light_relay_maintainer_proxy.js +0 -86
- package/export/deploy/37_authorize_maintainer_in_light_relay_maintainer_proxy.js +0 -65
- package/export/deploy/38_transfer_light_relay_maintainer_proxy_ownership.js +0 -60
- package/export/deploy/39_authorize_light_relay_maintainer_proxy_in_reimbursement_pool.js +0 -70
- package/export/deploy/40_authorize_light_relay_maintainer_proxy_in_light_relay.js +0 -66
- package/export/typechain/RelayStub.js +0 -2
- package/export/typechain/TestRelay.js +0 -2
- package/export/typechain/factories/RelayStub__factory.js +0 -546
- package/export/typechain/factories/TestRelay__factory.js +0 -168
|
@@ -0,0 +1,1160 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractName": "TestEcdsaLib",
|
|
3
|
+
"sourceName": "contracts/test/TestEcdsaLib.sol",
|
|
4
|
+
"abi": [
|
|
5
|
+
{
|
|
6
|
+
"inputs": [
|
|
7
|
+
{
|
|
8
|
+
"internalType": "bytes32",
|
|
9
|
+
"name": "x",
|
|
10
|
+
"type": "bytes32"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"internalType": "bytes32",
|
|
14
|
+
"name": "y",
|
|
15
|
+
"type": "bytes32"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"name": "compressPublicKey",
|
|
19
|
+
"outputs": [
|
|
20
|
+
{
|
|
21
|
+
"internalType": "bytes",
|
|
22
|
+
"name": "",
|
|
23
|
+
"type": "bytes"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"stateMutability": "pure",
|
|
27
|
+
"type": "function"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"bytecode": "0x608060405234801561001057600080fd5b506101fa806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c806366ee38f114610030575b600080fd5b61004361003e366004610119565b610059565b604051610050919061013b565b60405180910390f35b6060610065838361006c565b9392505050565b6060600061007b600284610189565b6000036100a957507f02000000000000000000000000000000000000000000000000000000000000006100cc565b507f03000000000000000000000000000000000000000000000000000000000000005b6040517fff00000000000000000000000000000000000000000000000000000000000000821660208201526021810185905260410160405160208183030381529060405291505092915050565b6000806040838503121561012c57600080fd5b50508035926020909101359150565b600060208083528351808285015260005b818110156101685785810183015185820160400152820161014c565b506000604082860101526040601f19601f8301168501019250505092915050565b6000826101bf577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b50069056fea264697066735822122038adba65c4db3d7afb309cf8416fe8e87c7741a406200885710c68f941b584f064736f6c63430008110033",
|
|
31
|
+
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c806366ee38f114610030575b600080fd5b61004361003e366004610119565b610059565b604051610050919061013b565b60405180910390f35b6060610065838361006c565b9392505050565b6060600061007b600284610189565b6000036100a957507f02000000000000000000000000000000000000000000000000000000000000006100cc565b507f03000000000000000000000000000000000000000000000000000000000000005b6040517fff00000000000000000000000000000000000000000000000000000000000000821660208201526021810185905260410160405160208183030381529060405291505092915050565b6000806040838503121561012c57600080fd5b50508035926020909101359150565b600060208083528351808285015260005b818110156101685785810183015185820160400152820161014c565b506000604082860101526040601f19601f8301168501019250505092915050565b6000826101bf577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b50069056fea264697066735822122038adba65c4db3d7afb309cf8416fe8e87c7741a406200885710c68f941b584f064736f6c63430008110033",
|
|
32
|
+
"linkReferences": {},
|
|
33
|
+
"deployedLinkReferences": {},
|
|
34
|
+
"devdoc": {
|
|
35
|
+
"details": "This is a contract implemented to test EcdsaLib library directly.",
|
|
36
|
+
"kind": "dev",
|
|
37
|
+
"methods": {},
|
|
38
|
+
"version": 1
|
|
39
|
+
},
|
|
40
|
+
"evm": {
|
|
41
|
+
"bytecode": {
|
|
42
|
+
"functionDebugData": {},
|
|
43
|
+
"generatedSources": [],
|
|
44
|
+
"linkReferences": {},
|
|
45
|
+
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1FA DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x66EE38F1 EQ PUSH2 0x30 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x43 PUSH2 0x3E CALLDATASIZE PUSH1 0x4 PUSH2 0x119 JUMP JUMPDEST PUSH2 0x59 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x50 SWAP2 SWAP1 PUSH2 0x13B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x60 PUSH2 0x65 DUP4 DUP4 PUSH2 0x6C JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x7B PUSH1 0x2 DUP5 PUSH2 0x189 JUMP JUMPDEST PUSH1 0x0 SUB PUSH2 0xA9 JUMPI POP PUSH32 0x200000000000000000000000000000000000000000000000000000000000000 PUSH2 0xCC JUMP JUMPDEST POP PUSH32 0x300000000000000000000000000000000000000000000000000000000000000 JUMPDEST PUSH1 0x40 MLOAD PUSH32 0xFF00000000000000000000000000000000000000000000000000000000000000 DUP3 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x21 DUP2 ADD DUP6 SWAP1 MSTORE PUSH1 0x41 ADD PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x12C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP POP DUP1 CALLDATALOAD SWAP3 PUSH1 0x20 SWAP1 SWAP2 ADD CALLDATALOAD SWAP2 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 MSTORE DUP4 MLOAD DUP1 DUP3 DUP6 ADD MSTORE PUSH1 0x0 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x168 JUMPI DUP6 DUP2 ADD DUP4 ADD MLOAD DUP6 DUP3 ADD PUSH1 0x40 ADD MSTORE DUP3 ADD PUSH2 0x14C JUMP JUMPDEST POP PUSH1 0x0 PUSH1 0x40 DUP3 DUP7 ADD ADD MSTORE PUSH1 0x40 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND DUP6 ADD ADD SWAP3 POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH2 0x1BF JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x12 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST POP MOD SWAP1 JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 CODESIZE 0xAD 0xBA PUSH6 0xC4DB3D7AFB30 SWAP13 0xF8 COINBASE PUSH16 0xE8E87C7741A406200885710C68F941B5 DUP5 CREATE PUSH5 0x736F6C6343 STOP ADDMOD GT STOP CALLER ",
|
|
46
|
+
"sourceMap": "207:198:118:-:0;;;;;;;;;;;;;;;;;;;"
|
|
47
|
+
},
|
|
48
|
+
"deployedBytecode": {
|
|
49
|
+
"functionDebugData": {
|
|
50
|
+
"@compressPublicKey_30305": {
|
|
51
|
+
"entryPoint": 108,
|
|
52
|
+
"id": 30305,
|
|
53
|
+
"parameterSlots": 2,
|
|
54
|
+
"returnSlots": 1
|
|
55
|
+
},
|
|
56
|
+
"@compressPublicKey_41075": {
|
|
57
|
+
"entryPoint": 89,
|
|
58
|
+
"id": 41075,
|
|
59
|
+
"parameterSlots": 2,
|
|
60
|
+
"returnSlots": 1
|
|
61
|
+
},
|
|
62
|
+
"abi_decode_tuple_t_bytes32t_bytes32": {
|
|
63
|
+
"entryPoint": 281,
|
|
64
|
+
"id": null,
|
|
65
|
+
"parameterSlots": 2,
|
|
66
|
+
"returnSlots": 2
|
|
67
|
+
},
|
|
68
|
+
"abi_encode_tuple_packed_t_bytes1_t_bytes32__to_t_bytes1_t_bytes32__nonPadded_inplace_fromStack_reversed": {
|
|
69
|
+
"entryPoint": null,
|
|
70
|
+
"id": null,
|
|
71
|
+
"parameterSlots": 3,
|
|
72
|
+
"returnSlots": 1
|
|
73
|
+
},
|
|
74
|
+
"abi_encode_tuple_t_bytes_memory_ptr__to_t_bytes_memory_ptr__fromStack_reversed": {
|
|
75
|
+
"entryPoint": 315,
|
|
76
|
+
"id": null,
|
|
77
|
+
"parameterSlots": 2,
|
|
78
|
+
"returnSlots": 1
|
|
79
|
+
},
|
|
80
|
+
"mod_t_uint256": {
|
|
81
|
+
"entryPoint": 393,
|
|
82
|
+
"id": null,
|
|
83
|
+
"parameterSlots": 2,
|
|
84
|
+
"returnSlots": 1
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"generatedSources": [
|
|
88
|
+
{
|
|
89
|
+
"ast": {
|
|
90
|
+
"nodeType": "YulBlock",
|
|
91
|
+
"src": "0:1408:125",
|
|
92
|
+
"statements": [
|
|
93
|
+
{
|
|
94
|
+
"nodeType": "YulBlock",
|
|
95
|
+
"src": "6:3:125",
|
|
96
|
+
"statements": []
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"body": {
|
|
100
|
+
"nodeType": "YulBlock",
|
|
101
|
+
"src": "101:161:125",
|
|
102
|
+
"statements": [
|
|
103
|
+
{
|
|
104
|
+
"body": {
|
|
105
|
+
"nodeType": "YulBlock",
|
|
106
|
+
"src": "147:16:125",
|
|
107
|
+
"statements": [
|
|
108
|
+
{
|
|
109
|
+
"expression": {
|
|
110
|
+
"arguments": [
|
|
111
|
+
{
|
|
112
|
+
"kind": "number",
|
|
113
|
+
"nodeType": "YulLiteral",
|
|
114
|
+
"src": "156:1:125",
|
|
115
|
+
"type": "",
|
|
116
|
+
"value": "0"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"kind": "number",
|
|
120
|
+
"nodeType": "YulLiteral",
|
|
121
|
+
"src": "159:1:125",
|
|
122
|
+
"type": "",
|
|
123
|
+
"value": "0"
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
"functionName": {
|
|
127
|
+
"name": "revert",
|
|
128
|
+
"nodeType": "YulIdentifier",
|
|
129
|
+
"src": "149:6:125"
|
|
130
|
+
},
|
|
131
|
+
"nodeType": "YulFunctionCall",
|
|
132
|
+
"src": "149:12:125"
|
|
133
|
+
},
|
|
134
|
+
"nodeType": "YulExpressionStatement",
|
|
135
|
+
"src": "149:12:125"
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
"condition": {
|
|
140
|
+
"arguments": [
|
|
141
|
+
{
|
|
142
|
+
"arguments": [
|
|
143
|
+
{
|
|
144
|
+
"name": "dataEnd",
|
|
145
|
+
"nodeType": "YulIdentifier",
|
|
146
|
+
"src": "122:7:125"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "headStart",
|
|
150
|
+
"nodeType": "YulIdentifier",
|
|
151
|
+
"src": "131:9:125"
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"functionName": {
|
|
155
|
+
"name": "sub",
|
|
156
|
+
"nodeType": "YulIdentifier",
|
|
157
|
+
"src": "118:3:125"
|
|
158
|
+
},
|
|
159
|
+
"nodeType": "YulFunctionCall",
|
|
160
|
+
"src": "118:23:125"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"kind": "number",
|
|
164
|
+
"nodeType": "YulLiteral",
|
|
165
|
+
"src": "143:2:125",
|
|
166
|
+
"type": "",
|
|
167
|
+
"value": "64"
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
"functionName": {
|
|
171
|
+
"name": "slt",
|
|
172
|
+
"nodeType": "YulIdentifier",
|
|
173
|
+
"src": "114:3:125"
|
|
174
|
+
},
|
|
175
|
+
"nodeType": "YulFunctionCall",
|
|
176
|
+
"src": "114:32:125"
|
|
177
|
+
},
|
|
178
|
+
"nodeType": "YulIf",
|
|
179
|
+
"src": "111:52:125"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"nodeType": "YulAssignment",
|
|
183
|
+
"src": "172:33:125",
|
|
184
|
+
"value": {
|
|
185
|
+
"arguments": [
|
|
186
|
+
{
|
|
187
|
+
"name": "headStart",
|
|
188
|
+
"nodeType": "YulIdentifier",
|
|
189
|
+
"src": "195:9:125"
|
|
190
|
+
}
|
|
191
|
+
],
|
|
192
|
+
"functionName": {
|
|
193
|
+
"name": "calldataload",
|
|
194
|
+
"nodeType": "YulIdentifier",
|
|
195
|
+
"src": "182:12:125"
|
|
196
|
+
},
|
|
197
|
+
"nodeType": "YulFunctionCall",
|
|
198
|
+
"src": "182:23:125"
|
|
199
|
+
},
|
|
200
|
+
"variableNames": [
|
|
201
|
+
{
|
|
202
|
+
"name": "value0",
|
|
203
|
+
"nodeType": "YulIdentifier",
|
|
204
|
+
"src": "172:6:125"
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"nodeType": "YulAssignment",
|
|
210
|
+
"src": "214:42:125",
|
|
211
|
+
"value": {
|
|
212
|
+
"arguments": [
|
|
213
|
+
{
|
|
214
|
+
"arguments": [
|
|
215
|
+
{
|
|
216
|
+
"name": "headStart",
|
|
217
|
+
"nodeType": "YulIdentifier",
|
|
218
|
+
"src": "241:9:125"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"kind": "number",
|
|
222
|
+
"nodeType": "YulLiteral",
|
|
223
|
+
"src": "252:2:125",
|
|
224
|
+
"type": "",
|
|
225
|
+
"value": "32"
|
|
226
|
+
}
|
|
227
|
+
],
|
|
228
|
+
"functionName": {
|
|
229
|
+
"name": "add",
|
|
230
|
+
"nodeType": "YulIdentifier",
|
|
231
|
+
"src": "237:3:125"
|
|
232
|
+
},
|
|
233
|
+
"nodeType": "YulFunctionCall",
|
|
234
|
+
"src": "237:18:125"
|
|
235
|
+
}
|
|
236
|
+
],
|
|
237
|
+
"functionName": {
|
|
238
|
+
"name": "calldataload",
|
|
239
|
+
"nodeType": "YulIdentifier",
|
|
240
|
+
"src": "224:12:125"
|
|
241
|
+
},
|
|
242
|
+
"nodeType": "YulFunctionCall",
|
|
243
|
+
"src": "224:32:125"
|
|
244
|
+
},
|
|
245
|
+
"variableNames": [
|
|
246
|
+
{
|
|
247
|
+
"name": "value1",
|
|
248
|
+
"nodeType": "YulIdentifier",
|
|
249
|
+
"src": "214:6:125"
|
|
250
|
+
}
|
|
251
|
+
]
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
},
|
|
255
|
+
"name": "abi_decode_tuple_t_bytes32t_bytes32",
|
|
256
|
+
"nodeType": "YulFunctionDefinition",
|
|
257
|
+
"parameters": [
|
|
258
|
+
{
|
|
259
|
+
"name": "headStart",
|
|
260
|
+
"nodeType": "YulTypedName",
|
|
261
|
+
"src": "59:9:125",
|
|
262
|
+
"type": ""
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"name": "dataEnd",
|
|
266
|
+
"nodeType": "YulTypedName",
|
|
267
|
+
"src": "70:7:125",
|
|
268
|
+
"type": ""
|
|
269
|
+
}
|
|
270
|
+
],
|
|
271
|
+
"returnVariables": [
|
|
272
|
+
{
|
|
273
|
+
"name": "value0",
|
|
274
|
+
"nodeType": "YulTypedName",
|
|
275
|
+
"src": "82:6:125",
|
|
276
|
+
"type": ""
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"name": "value1",
|
|
280
|
+
"nodeType": "YulTypedName",
|
|
281
|
+
"src": "90:6:125",
|
|
282
|
+
"type": ""
|
|
283
|
+
}
|
|
284
|
+
],
|
|
285
|
+
"src": "14:248:125"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"body": {
|
|
289
|
+
"nodeType": "YulBlock",
|
|
290
|
+
"src": "386:427:125",
|
|
291
|
+
"statements": [
|
|
292
|
+
{
|
|
293
|
+
"nodeType": "YulVariableDeclaration",
|
|
294
|
+
"src": "396:12:125",
|
|
295
|
+
"value": {
|
|
296
|
+
"kind": "number",
|
|
297
|
+
"nodeType": "YulLiteral",
|
|
298
|
+
"src": "406:2:125",
|
|
299
|
+
"type": "",
|
|
300
|
+
"value": "32"
|
|
301
|
+
},
|
|
302
|
+
"variables": [
|
|
303
|
+
{
|
|
304
|
+
"name": "_1",
|
|
305
|
+
"nodeType": "YulTypedName",
|
|
306
|
+
"src": "400:2:125",
|
|
307
|
+
"type": ""
|
|
308
|
+
}
|
|
309
|
+
]
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"expression": {
|
|
313
|
+
"arguments": [
|
|
314
|
+
{
|
|
315
|
+
"name": "headStart",
|
|
316
|
+
"nodeType": "YulIdentifier",
|
|
317
|
+
"src": "424:9:125"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"name": "_1",
|
|
321
|
+
"nodeType": "YulIdentifier",
|
|
322
|
+
"src": "435:2:125"
|
|
323
|
+
}
|
|
324
|
+
],
|
|
325
|
+
"functionName": {
|
|
326
|
+
"name": "mstore",
|
|
327
|
+
"nodeType": "YulIdentifier",
|
|
328
|
+
"src": "417:6:125"
|
|
329
|
+
},
|
|
330
|
+
"nodeType": "YulFunctionCall",
|
|
331
|
+
"src": "417:21:125"
|
|
332
|
+
},
|
|
333
|
+
"nodeType": "YulExpressionStatement",
|
|
334
|
+
"src": "417:21:125"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"nodeType": "YulVariableDeclaration",
|
|
338
|
+
"src": "447:27:125",
|
|
339
|
+
"value": {
|
|
340
|
+
"arguments": [
|
|
341
|
+
{
|
|
342
|
+
"name": "value0",
|
|
343
|
+
"nodeType": "YulIdentifier",
|
|
344
|
+
"src": "467:6:125"
|
|
345
|
+
}
|
|
346
|
+
],
|
|
347
|
+
"functionName": {
|
|
348
|
+
"name": "mload",
|
|
349
|
+
"nodeType": "YulIdentifier",
|
|
350
|
+
"src": "461:5:125"
|
|
351
|
+
},
|
|
352
|
+
"nodeType": "YulFunctionCall",
|
|
353
|
+
"src": "461:13:125"
|
|
354
|
+
},
|
|
355
|
+
"variables": [
|
|
356
|
+
{
|
|
357
|
+
"name": "length",
|
|
358
|
+
"nodeType": "YulTypedName",
|
|
359
|
+
"src": "451:6:125",
|
|
360
|
+
"type": ""
|
|
361
|
+
}
|
|
362
|
+
]
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"expression": {
|
|
366
|
+
"arguments": [
|
|
367
|
+
{
|
|
368
|
+
"arguments": [
|
|
369
|
+
{
|
|
370
|
+
"name": "headStart",
|
|
371
|
+
"nodeType": "YulIdentifier",
|
|
372
|
+
"src": "494:9:125"
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"name": "_1",
|
|
376
|
+
"nodeType": "YulIdentifier",
|
|
377
|
+
"src": "505:2:125"
|
|
378
|
+
}
|
|
379
|
+
],
|
|
380
|
+
"functionName": {
|
|
381
|
+
"name": "add",
|
|
382
|
+
"nodeType": "YulIdentifier",
|
|
383
|
+
"src": "490:3:125"
|
|
384
|
+
},
|
|
385
|
+
"nodeType": "YulFunctionCall",
|
|
386
|
+
"src": "490:18:125"
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"name": "length",
|
|
390
|
+
"nodeType": "YulIdentifier",
|
|
391
|
+
"src": "510:6:125"
|
|
392
|
+
}
|
|
393
|
+
],
|
|
394
|
+
"functionName": {
|
|
395
|
+
"name": "mstore",
|
|
396
|
+
"nodeType": "YulIdentifier",
|
|
397
|
+
"src": "483:6:125"
|
|
398
|
+
},
|
|
399
|
+
"nodeType": "YulFunctionCall",
|
|
400
|
+
"src": "483:34:125"
|
|
401
|
+
},
|
|
402
|
+
"nodeType": "YulExpressionStatement",
|
|
403
|
+
"src": "483:34:125"
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
"nodeType": "YulVariableDeclaration",
|
|
407
|
+
"src": "526:10:125",
|
|
408
|
+
"value": {
|
|
409
|
+
"kind": "number",
|
|
410
|
+
"nodeType": "YulLiteral",
|
|
411
|
+
"src": "535:1:125",
|
|
412
|
+
"type": "",
|
|
413
|
+
"value": "0"
|
|
414
|
+
},
|
|
415
|
+
"variables": [
|
|
416
|
+
{
|
|
417
|
+
"name": "i",
|
|
418
|
+
"nodeType": "YulTypedName",
|
|
419
|
+
"src": "530:1:125",
|
|
420
|
+
"type": ""
|
|
421
|
+
}
|
|
422
|
+
]
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
"body": {
|
|
426
|
+
"nodeType": "YulBlock",
|
|
427
|
+
"src": "595:90:125",
|
|
428
|
+
"statements": [
|
|
429
|
+
{
|
|
430
|
+
"expression": {
|
|
431
|
+
"arguments": [
|
|
432
|
+
{
|
|
433
|
+
"arguments": [
|
|
434
|
+
{
|
|
435
|
+
"arguments": [
|
|
436
|
+
{
|
|
437
|
+
"name": "headStart",
|
|
438
|
+
"nodeType": "YulIdentifier",
|
|
439
|
+
"src": "624:9:125"
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
"name": "i",
|
|
443
|
+
"nodeType": "YulIdentifier",
|
|
444
|
+
"src": "635:1:125"
|
|
445
|
+
}
|
|
446
|
+
],
|
|
447
|
+
"functionName": {
|
|
448
|
+
"name": "add",
|
|
449
|
+
"nodeType": "YulIdentifier",
|
|
450
|
+
"src": "620:3:125"
|
|
451
|
+
},
|
|
452
|
+
"nodeType": "YulFunctionCall",
|
|
453
|
+
"src": "620:17:125"
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"kind": "number",
|
|
457
|
+
"nodeType": "YulLiteral",
|
|
458
|
+
"src": "639:2:125",
|
|
459
|
+
"type": "",
|
|
460
|
+
"value": "64"
|
|
461
|
+
}
|
|
462
|
+
],
|
|
463
|
+
"functionName": {
|
|
464
|
+
"name": "add",
|
|
465
|
+
"nodeType": "YulIdentifier",
|
|
466
|
+
"src": "616:3:125"
|
|
467
|
+
},
|
|
468
|
+
"nodeType": "YulFunctionCall",
|
|
469
|
+
"src": "616:26:125"
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"arguments": [
|
|
473
|
+
{
|
|
474
|
+
"arguments": [
|
|
475
|
+
{
|
|
476
|
+
"arguments": [
|
|
477
|
+
{
|
|
478
|
+
"name": "value0",
|
|
479
|
+
"nodeType": "YulIdentifier",
|
|
480
|
+
"src": "658:6:125"
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"name": "i",
|
|
484
|
+
"nodeType": "YulIdentifier",
|
|
485
|
+
"src": "666:1:125"
|
|
486
|
+
}
|
|
487
|
+
],
|
|
488
|
+
"functionName": {
|
|
489
|
+
"name": "add",
|
|
490
|
+
"nodeType": "YulIdentifier",
|
|
491
|
+
"src": "654:3:125"
|
|
492
|
+
},
|
|
493
|
+
"nodeType": "YulFunctionCall",
|
|
494
|
+
"src": "654:14:125"
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"name": "_1",
|
|
498
|
+
"nodeType": "YulIdentifier",
|
|
499
|
+
"src": "670:2:125"
|
|
500
|
+
}
|
|
501
|
+
],
|
|
502
|
+
"functionName": {
|
|
503
|
+
"name": "add",
|
|
504
|
+
"nodeType": "YulIdentifier",
|
|
505
|
+
"src": "650:3:125"
|
|
506
|
+
},
|
|
507
|
+
"nodeType": "YulFunctionCall",
|
|
508
|
+
"src": "650:23:125"
|
|
509
|
+
}
|
|
510
|
+
],
|
|
511
|
+
"functionName": {
|
|
512
|
+
"name": "mload",
|
|
513
|
+
"nodeType": "YulIdentifier",
|
|
514
|
+
"src": "644:5:125"
|
|
515
|
+
},
|
|
516
|
+
"nodeType": "YulFunctionCall",
|
|
517
|
+
"src": "644:30:125"
|
|
518
|
+
}
|
|
519
|
+
],
|
|
520
|
+
"functionName": {
|
|
521
|
+
"name": "mstore",
|
|
522
|
+
"nodeType": "YulIdentifier",
|
|
523
|
+
"src": "609:6:125"
|
|
524
|
+
},
|
|
525
|
+
"nodeType": "YulFunctionCall",
|
|
526
|
+
"src": "609:66:125"
|
|
527
|
+
},
|
|
528
|
+
"nodeType": "YulExpressionStatement",
|
|
529
|
+
"src": "609:66:125"
|
|
530
|
+
}
|
|
531
|
+
]
|
|
532
|
+
},
|
|
533
|
+
"condition": {
|
|
534
|
+
"arguments": [
|
|
535
|
+
{
|
|
536
|
+
"name": "i",
|
|
537
|
+
"nodeType": "YulIdentifier",
|
|
538
|
+
"src": "556:1:125"
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"name": "length",
|
|
542
|
+
"nodeType": "YulIdentifier",
|
|
543
|
+
"src": "559:6:125"
|
|
544
|
+
}
|
|
545
|
+
],
|
|
546
|
+
"functionName": {
|
|
547
|
+
"name": "lt",
|
|
548
|
+
"nodeType": "YulIdentifier",
|
|
549
|
+
"src": "553:2:125"
|
|
550
|
+
},
|
|
551
|
+
"nodeType": "YulFunctionCall",
|
|
552
|
+
"src": "553:13:125"
|
|
553
|
+
},
|
|
554
|
+
"nodeType": "YulForLoop",
|
|
555
|
+
"post": {
|
|
556
|
+
"nodeType": "YulBlock",
|
|
557
|
+
"src": "567:19:125",
|
|
558
|
+
"statements": [
|
|
559
|
+
{
|
|
560
|
+
"nodeType": "YulAssignment",
|
|
561
|
+
"src": "569:15:125",
|
|
562
|
+
"value": {
|
|
563
|
+
"arguments": [
|
|
564
|
+
{
|
|
565
|
+
"name": "i",
|
|
566
|
+
"nodeType": "YulIdentifier",
|
|
567
|
+
"src": "578:1:125"
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
"name": "_1",
|
|
571
|
+
"nodeType": "YulIdentifier",
|
|
572
|
+
"src": "581:2:125"
|
|
573
|
+
}
|
|
574
|
+
],
|
|
575
|
+
"functionName": {
|
|
576
|
+
"name": "add",
|
|
577
|
+
"nodeType": "YulIdentifier",
|
|
578
|
+
"src": "574:3:125"
|
|
579
|
+
},
|
|
580
|
+
"nodeType": "YulFunctionCall",
|
|
581
|
+
"src": "574:10:125"
|
|
582
|
+
},
|
|
583
|
+
"variableNames": [
|
|
584
|
+
{
|
|
585
|
+
"name": "i",
|
|
586
|
+
"nodeType": "YulIdentifier",
|
|
587
|
+
"src": "569:1:125"
|
|
588
|
+
}
|
|
589
|
+
]
|
|
590
|
+
}
|
|
591
|
+
]
|
|
592
|
+
},
|
|
593
|
+
"pre": {
|
|
594
|
+
"nodeType": "YulBlock",
|
|
595
|
+
"src": "549:3:125",
|
|
596
|
+
"statements": []
|
|
597
|
+
},
|
|
598
|
+
"src": "545:140:125"
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
"expression": {
|
|
602
|
+
"arguments": [
|
|
603
|
+
{
|
|
604
|
+
"arguments": [
|
|
605
|
+
{
|
|
606
|
+
"arguments": [
|
|
607
|
+
{
|
|
608
|
+
"name": "headStart",
|
|
609
|
+
"nodeType": "YulIdentifier",
|
|
610
|
+
"src": "709:9:125"
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
"name": "length",
|
|
614
|
+
"nodeType": "YulIdentifier",
|
|
615
|
+
"src": "720:6:125"
|
|
616
|
+
}
|
|
617
|
+
],
|
|
618
|
+
"functionName": {
|
|
619
|
+
"name": "add",
|
|
620
|
+
"nodeType": "YulIdentifier",
|
|
621
|
+
"src": "705:3:125"
|
|
622
|
+
},
|
|
623
|
+
"nodeType": "YulFunctionCall",
|
|
624
|
+
"src": "705:22:125"
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
"kind": "number",
|
|
628
|
+
"nodeType": "YulLiteral",
|
|
629
|
+
"src": "729:2:125",
|
|
630
|
+
"type": "",
|
|
631
|
+
"value": "64"
|
|
632
|
+
}
|
|
633
|
+
],
|
|
634
|
+
"functionName": {
|
|
635
|
+
"name": "add",
|
|
636
|
+
"nodeType": "YulIdentifier",
|
|
637
|
+
"src": "701:3:125"
|
|
638
|
+
},
|
|
639
|
+
"nodeType": "YulFunctionCall",
|
|
640
|
+
"src": "701:31:125"
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
"kind": "number",
|
|
644
|
+
"nodeType": "YulLiteral",
|
|
645
|
+
"src": "734:1:125",
|
|
646
|
+
"type": "",
|
|
647
|
+
"value": "0"
|
|
648
|
+
}
|
|
649
|
+
],
|
|
650
|
+
"functionName": {
|
|
651
|
+
"name": "mstore",
|
|
652
|
+
"nodeType": "YulIdentifier",
|
|
653
|
+
"src": "694:6:125"
|
|
654
|
+
},
|
|
655
|
+
"nodeType": "YulFunctionCall",
|
|
656
|
+
"src": "694:42:125"
|
|
657
|
+
},
|
|
658
|
+
"nodeType": "YulExpressionStatement",
|
|
659
|
+
"src": "694:42:125"
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
"nodeType": "YulAssignment",
|
|
663
|
+
"src": "745:62:125",
|
|
664
|
+
"value": {
|
|
665
|
+
"arguments": [
|
|
666
|
+
{
|
|
667
|
+
"arguments": [
|
|
668
|
+
{
|
|
669
|
+
"name": "headStart",
|
|
670
|
+
"nodeType": "YulIdentifier",
|
|
671
|
+
"src": "761:9:125"
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
"arguments": [
|
|
675
|
+
{
|
|
676
|
+
"arguments": [
|
|
677
|
+
{
|
|
678
|
+
"name": "length",
|
|
679
|
+
"nodeType": "YulIdentifier",
|
|
680
|
+
"src": "780:6:125"
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
"kind": "number",
|
|
684
|
+
"nodeType": "YulLiteral",
|
|
685
|
+
"src": "788:2:125",
|
|
686
|
+
"type": "",
|
|
687
|
+
"value": "31"
|
|
688
|
+
}
|
|
689
|
+
],
|
|
690
|
+
"functionName": {
|
|
691
|
+
"name": "add",
|
|
692
|
+
"nodeType": "YulIdentifier",
|
|
693
|
+
"src": "776:3:125"
|
|
694
|
+
},
|
|
695
|
+
"nodeType": "YulFunctionCall",
|
|
696
|
+
"src": "776:15:125"
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
"arguments": [
|
|
700
|
+
{
|
|
701
|
+
"kind": "number",
|
|
702
|
+
"nodeType": "YulLiteral",
|
|
703
|
+
"src": "797:2:125",
|
|
704
|
+
"type": "",
|
|
705
|
+
"value": "31"
|
|
706
|
+
}
|
|
707
|
+
],
|
|
708
|
+
"functionName": {
|
|
709
|
+
"name": "not",
|
|
710
|
+
"nodeType": "YulIdentifier",
|
|
711
|
+
"src": "793:3:125"
|
|
712
|
+
},
|
|
713
|
+
"nodeType": "YulFunctionCall",
|
|
714
|
+
"src": "793:7:125"
|
|
715
|
+
}
|
|
716
|
+
],
|
|
717
|
+
"functionName": {
|
|
718
|
+
"name": "and",
|
|
719
|
+
"nodeType": "YulIdentifier",
|
|
720
|
+
"src": "772:3:125"
|
|
721
|
+
},
|
|
722
|
+
"nodeType": "YulFunctionCall",
|
|
723
|
+
"src": "772:29:125"
|
|
724
|
+
}
|
|
725
|
+
],
|
|
726
|
+
"functionName": {
|
|
727
|
+
"name": "add",
|
|
728
|
+
"nodeType": "YulIdentifier",
|
|
729
|
+
"src": "757:3:125"
|
|
730
|
+
},
|
|
731
|
+
"nodeType": "YulFunctionCall",
|
|
732
|
+
"src": "757:45:125"
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
"kind": "number",
|
|
736
|
+
"nodeType": "YulLiteral",
|
|
737
|
+
"src": "804:2:125",
|
|
738
|
+
"type": "",
|
|
739
|
+
"value": "64"
|
|
740
|
+
}
|
|
741
|
+
],
|
|
742
|
+
"functionName": {
|
|
743
|
+
"name": "add",
|
|
744
|
+
"nodeType": "YulIdentifier",
|
|
745
|
+
"src": "753:3:125"
|
|
746
|
+
},
|
|
747
|
+
"nodeType": "YulFunctionCall",
|
|
748
|
+
"src": "753:54:125"
|
|
749
|
+
},
|
|
750
|
+
"variableNames": [
|
|
751
|
+
{
|
|
752
|
+
"name": "tail",
|
|
753
|
+
"nodeType": "YulIdentifier",
|
|
754
|
+
"src": "745:4:125"
|
|
755
|
+
}
|
|
756
|
+
]
|
|
757
|
+
}
|
|
758
|
+
]
|
|
759
|
+
},
|
|
760
|
+
"name": "abi_encode_tuple_t_bytes_memory_ptr__to_t_bytes_memory_ptr__fromStack_reversed",
|
|
761
|
+
"nodeType": "YulFunctionDefinition",
|
|
762
|
+
"parameters": [
|
|
763
|
+
{
|
|
764
|
+
"name": "headStart",
|
|
765
|
+
"nodeType": "YulTypedName",
|
|
766
|
+
"src": "355:9:125",
|
|
767
|
+
"type": ""
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
"name": "value0",
|
|
771
|
+
"nodeType": "YulTypedName",
|
|
772
|
+
"src": "366:6:125",
|
|
773
|
+
"type": ""
|
|
774
|
+
}
|
|
775
|
+
],
|
|
776
|
+
"returnVariables": [
|
|
777
|
+
{
|
|
778
|
+
"name": "tail",
|
|
779
|
+
"nodeType": "YulTypedName",
|
|
780
|
+
"src": "377:4:125",
|
|
781
|
+
"type": ""
|
|
782
|
+
}
|
|
783
|
+
],
|
|
784
|
+
"src": "267:546:125"
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
"body": {
|
|
788
|
+
"nodeType": "YulBlock",
|
|
789
|
+
"src": "856:228:125",
|
|
790
|
+
"statements": [
|
|
791
|
+
{
|
|
792
|
+
"body": {
|
|
793
|
+
"nodeType": "YulBlock",
|
|
794
|
+
"src": "887:168:125",
|
|
795
|
+
"statements": [
|
|
796
|
+
{
|
|
797
|
+
"expression": {
|
|
798
|
+
"arguments": [
|
|
799
|
+
{
|
|
800
|
+
"kind": "number",
|
|
801
|
+
"nodeType": "YulLiteral",
|
|
802
|
+
"src": "908:1:125",
|
|
803
|
+
"type": "",
|
|
804
|
+
"value": "0"
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
"kind": "number",
|
|
808
|
+
"nodeType": "YulLiteral",
|
|
809
|
+
"src": "911:77:125",
|
|
810
|
+
"type": "",
|
|
811
|
+
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856"
|
|
812
|
+
}
|
|
813
|
+
],
|
|
814
|
+
"functionName": {
|
|
815
|
+
"name": "mstore",
|
|
816
|
+
"nodeType": "YulIdentifier",
|
|
817
|
+
"src": "901:6:125"
|
|
818
|
+
},
|
|
819
|
+
"nodeType": "YulFunctionCall",
|
|
820
|
+
"src": "901:88:125"
|
|
821
|
+
},
|
|
822
|
+
"nodeType": "YulExpressionStatement",
|
|
823
|
+
"src": "901:88:125"
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
"expression": {
|
|
827
|
+
"arguments": [
|
|
828
|
+
{
|
|
829
|
+
"kind": "number",
|
|
830
|
+
"nodeType": "YulLiteral",
|
|
831
|
+
"src": "1009:1:125",
|
|
832
|
+
"type": "",
|
|
833
|
+
"value": "4"
|
|
834
|
+
},
|
|
835
|
+
{
|
|
836
|
+
"kind": "number",
|
|
837
|
+
"nodeType": "YulLiteral",
|
|
838
|
+
"src": "1012:4:125",
|
|
839
|
+
"type": "",
|
|
840
|
+
"value": "0x12"
|
|
841
|
+
}
|
|
842
|
+
],
|
|
843
|
+
"functionName": {
|
|
844
|
+
"name": "mstore",
|
|
845
|
+
"nodeType": "YulIdentifier",
|
|
846
|
+
"src": "1002:6:125"
|
|
847
|
+
},
|
|
848
|
+
"nodeType": "YulFunctionCall",
|
|
849
|
+
"src": "1002:15:125"
|
|
850
|
+
},
|
|
851
|
+
"nodeType": "YulExpressionStatement",
|
|
852
|
+
"src": "1002:15:125"
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
"expression": {
|
|
856
|
+
"arguments": [
|
|
857
|
+
{
|
|
858
|
+
"kind": "number",
|
|
859
|
+
"nodeType": "YulLiteral",
|
|
860
|
+
"src": "1037:1:125",
|
|
861
|
+
"type": "",
|
|
862
|
+
"value": "0"
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
"kind": "number",
|
|
866
|
+
"nodeType": "YulLiteral",
|
|
867
|
+
"src": "1040:4:125",
|
|
868
|
+
"type": "",
|
|
869
|
+
"value": "0x24"
|
|
870
|
+
}
|
|
871
|
+
],
|
|
872
|
+
"functionName": {
|
|
873
|
+
"name": "revert",
|
|
874
|
+
"nodeType": "YulIdentifier",
|
|
875
|
+
"src": "1030:6:125"
|
|
876
|
+
},
|
|
877
|
+
"nodeType": "YulFunctionCall",
|
|
878
|
+
"src": "1030:15:125"
|
|
879
|
+
},
|
|
880
|
+
"nodeType": "YulExpressionStatement",
|
|
881
|
+
"src": "1030:15:125"
|
|
882
|
+
}
|
|
883
|
+
]
|
|
884
|
+
},
|
|
885
|
+
"condition": {
|
|
886
|
+
"arguments": [
|
|
887
|
+
{
|
|
888
|
+
"name": "y",
|
|
889
|
+
"nodeType": "YulIdentifier",
|
|
890
|
+
"src": "876:1:125"
|
|
891
|
+
}
|
|
892
|
+
],
|
|
893
|
+
"functionName": {
|
|
894
|
+
"name": "iszero",
|
|
895
|
+
"nodeType": "YulIdentifier",
|
|
896
|
+
"src": "869:6:125"
|
|
897
|
+
},
|
|
898
|
+
"nodeType": "YulFunctionCall",
|
|
899
|
+
"src": "869:9:125"
|
|
900
|
+
},
|
|
901
|
+
"nodeType": "YulIf",
|
|
902
|
+
"src": "866:189:125"
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
"nodeType": "YulAssignment",
|
|
906
|
+
"src": "1064:14:125",
|
|
907
|
+
"value": {
|
|
908
|
+
"arguments": [
|
|
909
|
+
{
|
|
910
|
+
"name": "x",
|
|
911
|
+
"nodeType": "YulIdentifier",
|
|
912
|
+
"src": "1073:1:125"
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
"name": "y",
|
|
916
|
+
"nodeType": "YulIdentifier",
|
|
917
|
+
"src": "1076:1:125"
|
|
918
|
+
}
|
|
919
|
+
],
|
|
920
|
+
"functionName": {
|
|
921
|
+
"name": "mod",
|
|
922
|
+
"nodeType": "YulIdentifier",
|
|
923
|
+
"src": "1069:3:125"
|
|
924
|
+
},
|
|
925
|
+
"nodeType": "YulFunctionCall",
|
|
926
|
+
"src": "1069:9:125"
|
|
927
|
+
},
|
|
928
|
+
"variableNames": [
|
|
929
|
+
{
|
|
930
|
+
"name": "r",
|
|
931
|
+
"nodeType": "YulIdentifier",
|
|
932
|
+
"src": "1064:1:125"
|
|
933
|
+
}
|
|
934
|
+
]
|
|
935
|
+
}
|
|
936
|
+
]
|
|
937
|
+
},
|
|
938
|
+
"name": "mod_t_uint256",
|
|
939
|
+
"nodeType": "YulFunctionDefinition",
|
|
940
|
+
"parameters": [
|
|
941
|
+
{
|
|
942
|
+
"name": "x",
|
|
943
|
+
"nodeType": "YulTypedName",
|
|
944
|
+
"src": "841:1:125",
|
|
945
|
+
"type": ""
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
"name": "y",
|
|
949
|
+
"nodeType": "YulTypedName",
|
|
950
|
+
"src": "844:1:125",
|
|
951
|
+
"type": ""
|
|
952
|
+
}
|
|
953
|
+
],
|
|
954
|
+
"returnVariables": [
|
|
955
|
+
{
|
|
956
|
+
"name": "r",
|
|
957
|
+
"nodeType": "YulTypedName",
|
|
958
|
+
"src": "850:1:125",
|
|
959
|
+
"type": ""
|
|
960
|
+
}
|
|
961
|
+
],
|
|
962
|
+
"src": "818:266:125"
|
|
963
|
+
},
|
|
964
|
+
{
|
|
965
|
+
"body": {
|
|
966
|
+
"nodeType": "YulBlock",
|
|
967
|
+
"src": "1234:172:125",
|
|
968
|
+
"statements": [
|
|
969
|
+
{
|
|
970
|
+
"expression": {
|
|
971
|
+
"arguments": [
|
|
972
|
+
{
|
|
973
|
+
"name": "pos",
|
|
974
|
+
"nodeType": "YulIdentifier",
|
|
975
|
+
"src": "1251:3:125"
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
"arguments": [
|
|
979
|
+
{
|
|
980
|
+
"name": "value0",
|
|
981
|
+
"nodeType": "YulIdentifier",
|
|
982
|
+
"src": "1260:6:125"
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
"kind": "number",
|
|
986
|
+
"nodeType": "YulLiteral",
|
|
987
|
+
"src": "1268:66:125",
|
|
988
|
+
"type": "",
|
|
989
|
+
"value": "0xff00000000000000000000000000000000000000000000000000000000000000"
|
|
990
|
+
}
|
|
991
|
+
],
|
|
992
|
+
"functionName": {
|
|
993
|
+
"name": "and",
|
|
994
|
+
"nodeType": "YulIdentifier",
|
|
995
|
+
"src": "1256:3:125"
|
|
996
|
+
},
|
|
997
|
+
"nodeType": "YulFunctionCall",
|
|
998
|
+
"src": "1256:79:125"
|
|
999
|
+
}
|
|
1000
|
+
],
|
|
1001
|
+
"functionName": {
|
|
1002
|
+
"name": "mstore",
|
|
1003
|
+
"nodeType": "YulIdentifier",
|
|
1004
|
+
"src": "1244:6:125"
|
|
1005
|
+
},
|
|
1006
|
+
"nodeType": "YulFunctionCall",
|
|
1007
|
+
"src": "1244:92:125"
|
|
1008
|
+
},
|
|
1009
|
+
"nodeType": "YulExpressionStatement",
|
|
1010
|
+
"src": "1244:92:125"
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
"expression": {
|
|
1014
|
+
"arguments": [
|
|
1015
|
+
{
|
|
1016
|
+
"arguments": [
|
|
1017
|
+
{
|
|
1018
|
+
"name": "pos",
|
|
1019
|
+
"nodeType": "YulIdentifier",
|
|
1020
|
+
"src": "1356:3:125"
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
"kind": "number",
|
|
1024
|
+
"nodeType": "YulLiteral",
|
|
1025
|
+
"src": "1361:1:125",
|
|
1026
|
+
"type": "",
|
|
1027
|
+
"value": "1"
|
|
1028
|
+
}
|
|
1029
|
+
],
|
|
1030
|
+
"functionName": {
|
|
1031
|
+
"name": "add",
|
|
1032
|
+
"nodeType": "YulIdentifier",
|
|
1033
|
+
"src": "1352:3:125"
|
|
1034
|
+
},
|
|
1035
|
+
"nodeType": "YulFunctionCall",
|
|
1036
|
+
"src": "1352:11:125"
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
"name": "value1",
|
|
1040
|
+
"nodeType": "YulIdentifier",
|
|
1041
|
+
"src": "1365:6:125"
|
|
1042
|
+
}
|
|
1043
|
+
],
|
|
1044
|
+
"functionName": {
|
|
1045
|
+
"name": "mstore",
|
|
1046
|
+
"nodeType": "YulIdentifier",
|
|
1047
|
+
"src": "1345:6:125"
|
|
1048
|
+
},
|
|
1049
|
+
"nodeType": "YulFunctionCall",
|
|
1050
|
+
"src": "1345:27:125"
|
|
1051
|
+
},
|
|
1052
|
+
"nodeType": "YulExpressionStatement",
|
|
1053
|
+
"src": "1345:27:125"
|
|
1054
|
+
},
|
|
1055
|
+
{
|
|
1056
|
+
"nodeType": "YulAssignment",
|
|
1057
|
+
"src": "1381:19:125",
|
|
1058
|
+
"value": {
|
|
1059
|
+
"arguments": [
|
|
1060
|
+
{
|
|
1061
|
+
"name": "pos",
|
|
1062
|
+
"nodeType": "YulIdentifier",
|
|
1063
|
+
"src": "1392:3:125"
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
"kind": "number",
|
|
1067
|
+
"nodeType": "YulLiteral",
|
|
1068
|
+
"src": "1397:2:125",
|
|
1069
|
+
"type": "",
|
|
1070
|
+
"value": "33"
|
|
1071
|
+
}
|
|
1072
|
+
],
|
|
1073
|
+
"functionName": {
|
|
1074
|
+
"name": "add",
|
|
1075
|
+
"nodeType": "YulIdentifier",
|
|
1076
|
+
"src": "1388:3:125"
|
|
1077
|
+
},
|
|
1078
|
+
"nodeType": "YulFunctionCall",
|
|
1079
|
+
"src": "1388:12:125"
|
|
1080
|
+
},
|
|
1081
|
+
"variableNames": [
|
|
1082
|
+
{
|
|
1083
|
+
"name": "end",
|
|
1084
|
+
"nodeType": "YulIdentifier",
|
|
1085
|
+
"src": "1381:3:125"
|
|
1086
|
+
}
|
|
1087
|
+
]
|
|
1088
|
+
}
|
|
1089
|
+
]
|
|
1090
|
+
},
|
|
1091
|
+
"name": "abi_encode_tuple_packed_t_bytes1_t_bytes32__to_t_bytes1_t_bytes32__nonPadded_inplace_fromStack_reversed",
|
|
1092
|
+
"nodeType": "YulFunctionDefinition",
|
|
1093
|
+
"parameters": [
|
|
1094
|
+
{
|
|
1095
|
+
"name": "pos",
|
|
1096
|
+
"nodeType": "YulTypedName",
|
|
1097
|
+
"src": "1202:3:125",
|
|
1098
|
+
"type": ""
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1101
|
+
"name": "value1",
|
|
1102
|
+
"nodeType": "YulTypedName",
|
|
1103
|
+
"src": "1207:6:125",
|
|
1104
|
+
"type": ""
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
"name": "value0",
|
|
1108
|
+
"nodeType": "YulTypedName",
|
|
1109
|
+
"src": "1215:6:125",
|
|
1110
|
+
"type": ""
|
|
1111
|
+
}
|
|
1112
|
+
],
|
|
1113
|
+
"returnVariables": [
|
|
1114
|
+
{
|
|
1115
|
+
"name": "end",
|
|
1116
|
+
"nodeType": "YulTypedName",
|
|
1117
|
+
"src": "1226:3:125",
|
|
1118
|
+
"type": ""
|
|
1119
|
+
}
|
|
1120
|
+
],
|
|
1121
|
+
"src": "1089:317:125"
|
|
1122
|
+
}
|
|
1123
|
+
]
|
|
1124
|
+
},
|
|
1125
|
+
"contents": "{\n { }\n function abi_decode_tuple_t_bytes32t_bytes32(headStart, dataEnd) -> value0, value1\n {\n if slt(sub(dataEnd, headStart), 64) { revert(0, 0) }\n value0 := calldataload(headStart)\n value1 := calldataload(add(headStart, 32))\n }\n function abi_encode_tuple_t_bytes_memory_ptr__to_t_bytes_memory_ptr__fromStack_reversed(headStart, value0) -> tail\n {\n let _1 := 32\n mstore(headStart, _1)\n let length := mload(value0)\n mstore(add(headStart, _1), length)\n let i := 0\n for { } lt(i, length) { i := add(i, _1) }\n {\n mstore(add(add(headStart, i), 64), mload(add(add(value0, i), _1)))\n }\n mstore(add(add(headStart, length), 64), 0)\n tail := add(add(headStart, and(add(length, 31), not(31))), 64)\n }\n function mod_t_uint256(x, y) -> r\n {\n if iszero(y)\n {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x12)\n revert(0, 0x24)\n }\n r := mod(x, y)\n }\n function abi_encode_tuple_packed_t_bytes1_t_bytes32__to_t_bytes1_t_bytes32__nonPadded_inplace_fromStack_reversed(pos, value1, value0) -> end\n {\n mstore(pos, and(value0, 0xff00000000000000000000000000000000000000000000000000000000000000))\n mstore(add(pos, 1), value1)\n end := add(pos, 33)\n }\n}",
|
|
1126
|
+
"id": 125,
|
|
1127
|
+
"language": "Yul",
|
|
1128
|
+
"name": "#utility.yul"
|
|
1129
|
+
}
|
|
1130
|
+
],
|
|
1131
|
+
"immutableReferences": {},
|
|
1132
|
+
"linkReferences": {},
|
|
1133
|
+
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x66EE38F1 EQ PUSH2 0x30 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x43 PUSH2 0x3E CALLDATASIZE PUSH1 0x4 PUSH2 0x119 JUMP JUMPDEST PUSH2 0x59 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x50 SWAP2 SWAP1 PUSH2 0x13B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x60 PUSH2 0x65 DUP4 DUP4 PUSH2 0x6C JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x7B PUSH1 0x2 DUP5 PUSH2 0x189 JUMP JUMPDEST PUSH1 0x0 SUB PUSH2 0xA9 JUMPI POP PUSH32 0x200000000000000000000000000000000000000000000000000000000000000 PUSH2 0xCC JUMP JUMPDEST POP PUSH32 0x300000000000000000000000000000000000000000000000000000000000000 JUMPDEST PUSH1 0x40 MLOAD PUSH32 0xFF00000000000000000000000000000000000000000000000000000000000000 DUP3 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x21 DUP2 ADD DUP6 SWAP1 MSTORE PUSH1 0x41 ADD PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x12C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP POP DUP1 CALLDATALOAD SWAP3 PUSH1 0x20 SWAP1 SWAP2 ADD CALLDATALOAD SWAP2 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 MSTORE DUP4 MLOAD DUP1 DUP3 DUP6 ADD MSTORE PUSH1 0x0 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x168 JUMPI DUP6 DUP2 ADD DUP4 ADD MLOAD DUP6 DUP3 ADD PUSH1 0x40 ADD MSTORE DUP3 ADD PUSH2 0x14C JUMP JUMPDEST POP PUSH1 0x0 PUSH1 0x40 DUP3 DUP7 ADD ADD MSTORE PUSH1 0x40 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND DUP6 ADD ADD SWAP3 POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH2 0x1BF JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x12 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST POP MOD SWAP1 JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 CODESIZE 0xAD 0xBA PUSH6 0xC4DB3D7AFB30 SWAP13 0xF8 COINBASE PUSH16 0xE8E87C7741A406200885710C68F941B5 DUP5 CREATE PUSH5 0x736F6C6343 STOP ADDMOD GT STOP CALLER ",
|
|
1134
|
+
"sourceMap": "207:198:118:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;235:168;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;329:12;364:32;391:1;394;364:26;:32::i;:::-;357:39;235:168;-1:-1:-1;;;235:168:118:o;1666:307:90:-;1762:12;1790:13;1817:14;1830:1;1825;1817:14;:::i;:::-;1835:1;1817:19;1813:113;;-1:-1:-1;1852:16:90;1813:113;;;-1:-1:-1;1899:16:90;1813:113;1943:23;;1268:66:125;1256:79;;1943:23:90;;;1244:92:125;1352:11;;;1345:27;;;1388:12;;1943:23:90;;;;;;;;;;;;1936:30;;;1666:307;;;;:::o;14:248:125:-;82:6;90;143:2;131:9;122:7;118:23;114:32;111:52;;;159:1;156;149:12;111:52;-1:-1:-1;;182:23:125;;;252:2;237:18;;;224:32;;-1:-1:-1;14:248:125:o;267:546::-;377:4;406:2;435;424:9;417:21;467:6;461:13;510:6;505:2;494:9;490:18;483:34;535:1;545:140;559:6;556:1;553:13;545:140;;;654:14;;;650:23;;644:30;620:17;;;639:2;616:26;609:66;574:10;;545:140;;;549:3;734:1;729:2;720:6;709:9;705:22;701:31;694:42;804:2;797;793:7;788:2;780:6;776:15;772:29;761:9;757:45;753:54;745:62;;;;267:546;;;;:::o;818:266::-;850:1;876;866:189;;911:77;908:1;901:88;1012:4;1009:1;1002:15;1040:4;1037:1;1030:15;866:189;-1:-1:-1;1069:9:125;;818:266::o"
|
|
1135
|
+
},
|
|
1136
|
+
"gasEstimates": {
|
|
1137
|
+
"creation": {
|
|
1138
|
+
"codeDepositCost": "101200",
|
|
1139
|
+
"executionCost": "147",
|
|
1140
|
+
"totalCost": "101347"
|
|
1141
|
+
},
|
|
1142
|
+
"external": {
|
|
1143
|
+
"compressPublicKey(bytes32,bytes32)": "infinite"
|
|
1144
|
+
}
|
|
1145
|
+
},
|
|
1146
|
+
"methodIdentifiers": {
|
|
1147
|
+
"compressPublicKey(bytes32,bytes32)": "66ee38f1"
|
|
1148
|
+
}
|
|
1149
|
+
},
|
|
1150
|
+
"metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"x\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"y\",\"type\":\"bytes32\"}],\"name\":\"compressPublicKey\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"This is a contract implemented to test EcdsaLib library directly.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/test/TestEcdsaLib.sol\":\"TestEcdsaLib\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[]},\"sources\":{\"@keep-network/bitcoin-spv-sol/contracts/BytesLib.sol\":{\"content\":\"pragma solidity ^0.8.4;\\n\\n/*\\n\\nhttps://github.com/GNSPS/solidity-bytes-utils/\\n\\nThis is free and unencumbered software released into the public domain.\\n\\nAnyone is free to copy, modify, publish, use, compile, sell, or\\ndistribute this software, either in source code form or as a compiled\\nbinary, for any purpose, commercial or non-commercial, and by any\\nmeans.\\n\\nIn jurisdictions that recognize copyright laws, the author or authors\\nof this software dedicate any and all copyright interest in the\\nsoftware to the public domain. We make this dedication for the benefit\\nof the public at large and to the detriment of our heirs and\\nsuccessors. We intend this dedication to be an overt act of\\nrelinquishment in perpetuity of all present and future rights to this\\nsoftware under copyright law.\\n\\nTHE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND,\\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\\nOTHER DEALINGS IN THE SOFTWARE.\\n\\nFor more information, please refer to <https://unlicense.org>\\n*/\\n\\n\\n/** @title BytesLib **/\\n/** @author https://github.com/GNSPS **/\\n\\nlibrary BytesLib {\\n function concat(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bytes memory) {\\n bytes memory tempBytes;\\n\\n assembly {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // Store the length of the first bytes array at the beginning of\\n // the memory for tempBytes.\\n let length := mload(_preBytes)\\n mstore(tempBytes, length)\\n\\n // Maintain a memory counter for the current write location in the\\n // temp bytes array by adding the 32 bytes for the array length to\\n // the starting location.\\n let mc := add(tempBytes, 0x20)\\n // Stop copying when the memory counter reaches the length of the\\n // first bytes array.\\n let end := add(mc, length)\\n\\n for {\\n // Initialize a copy counter to the start of the _preBytes data,\\n // 32 bytes into its memory.\\n let cc := add(_preBytes, 0x20)\\n } lt(mc, end) {\\n // Increase both counters by 32 bytes each iteration.\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // Write the _preBytes data into the tempBytes memory 32 bytes\\n // at a time.\\n mstore(mc, mload(cc))\\n }\\n\\n // Add the length of _postBytes to the current length of tempBytes\\n // and store it as the new length in the first 32 bytes of the\\n // tempBytes memory.\\n length := mload(_postBytes)\\n mstore(tempBytes, add(length, mload(tempBytes)))\\n\\n // Move the memory counter back from a multiple of 0x20 to the\\n // actual end of the _preBytes data.\\n mc := end\\n // Stop copying when the memory counter reaches the new combined\\n // length of the arrays.\\n end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n // Update the free-memory pointer by padding our last write location\\n // to 32 bytes: add 31 bytes to the end of tempBytes to move to the\\n // next 32 byte block, then round down to the nearest multiple of\\n // 32. If the sum of the length of the two arrays is zero then add\\n // one before rounding down to leave a blank 32 bytes (the length block with 0).\\n mstore(0x40, and(\\n add(add(end, iszero(add(length, mload(_preBytes)))), 31),\\n not(31) // Round down to the nearest 32 bytes.\\n ))\\n }\\n\\n return tempBytes;\\n }\\n\\n function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {\\n assembly {\\n // Read the first 32 bytes of _preBytes storage, which is the length\\n // of the array. (We don't need to use the offset into the slot\\n // because arrays use the entire slot.)\\n let fslot := sload(_preBytes.slot)\\n // Arrays of 31 bytes or less have an even value in their slot,\\n // while longer arrays have an odd value. The actual length is\\n // the slot divided by two for odd values, and the lowest order\\n // byte divided by two for even values.\\n // If the slot is even, bitwise and the slot with 255 and divide by\\n // two to get the length. If the slot is odd, bitwise and the slot\\n // with -1 and divide by two.\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n let newlength := add(slength, mlength)\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n switch add(lt(slength, 32), lt(newlength, 32))\\n case 2 {\\n // Since the new array still fits in the slot, we just need to\\n // update the contents of the slot.\\n // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length\\n sstore(\\n _preBytes.slot,\\n // all the modifications to the slot are inside this\\n // next block\\n add(\\n // we can just add to the slot contents because the\\n // bytes we want to change are the LSBs\\n fslot,\\n add(\\n mul(\\n div(\\n // load the bytes from memory\\n mload(add(_postBytes, 0x20)),\\n // zero all bytes to the right\\n exp(0x100, sub(32, mlength))\\n ),\\n // and now shift left the number of bytes to\\n // leave space for the length in the slot\\n exp(0x100, sub(32, newlength))\\n ),\\n // increase length by the double of the memory\\n // bytes length\\n mul(mlength, 2)\\n )\\n )\\n )\\n }\\n case 1 {\\n // The stored value fits in the slot, but the combined value\\n // will exceed it.\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // The contents of the _postBytes array start 32 bytes into\\n // the structure. Our first read should obtain the `submod`\\n // bytes that can fit into the unused space in the last word\\n // of the stored array. To get this, we read 32 bytes starting\\n // from `submod`, so the data we read overlaps with the array\\n // contents by `submod` bytes. Masking the lowest-order\\n // `submod` bytes allows us to add that value directly to the\\n // stored value.\\n\\n let submod := sub(32, slength)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(\\n sc,\\n add(\\n and(\\n fslot,\\n 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00\\n ),\\n and(mload(mc), mask)\\n )\\n )\\n\\n for {\\n mc := add(mc, 0x20)\\n sc := add(sc, 1)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n default {\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n // Start copying to the last used word of the stored array.\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // Copy over the first `submod` bytes of the new data as in\\n // case 1 above.\\n let slengthmod := mod(slength, 32)\\n let mlengthmod := mod(mlength, 32)\\n let submod := sub(32, slengthmod)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(sc, add(sload(sc), and(mload(mc), mask)))\\n\\n for {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n }\\n }\\n\\n function slice(bytes memory _bytes, uint _start, uint _length) internal pure returns (bytes memory res) {\\n if (_length == 0) {\\n return hex\\\"\\\";\\n }\\n uint _end = _start + _length;\\n require(_end > _start && _bytes.length >= _end, \\\"Slice out of bounds\\\");\\n\\n assembly {\\n // Alloc bytes array with additional 32 bytes afterspace and assign it's size\\n res := mload(0x40)\\n mstore(0x40, add(add(res, 64), _length))\\n mstore(res, _length)\\n\\n // Compute distance between source and destination pointers\\n let diff := sub(res, add(_bytes, _start))\\n\\n for {\\n let src := add(add(_bytes, 32), _start)\\n let end := add(src, _length)\\n } lt(src, end) {\\n src := add(src, 32)\\n } {\\n mstore(add(src, diff), mload(src))\\n }\\n }\\n }\\n\\n /// @notice Take a slice of the byte array, overwriting the destination.\\n /// The length of the slice will equal the length of the destination array.\\n /// @dev Make sure the destination array has afterspace if required.\\n /// @param _bytes The source array\\n /// @param _dest The destination array.\\n /// @param _start The location to start in the source array.\\n function sliceInPlace(\\n bytes memory _bytes,\\n bytes memory _dest,\\n uint _start\\n ) internal pure {\\n uint _length = _dest.length;\\n uint _end = _start + _length;\\n require(_end > _start && _bytes.length >= _end, \\\"Slice out of bounds\\\");\\n\\n assembly {\\n for {\\n let src := add(add(_bytes, 32), _start)\\n let res := add(_dest, 32)\\n let end := add(src, _length)\\n } lt(src, end) {\\n src := add(src, 32)\\n res := add(res, 32)\\n } {\\n mstore(res, mload(src))\\n }\\n }\\n }\\n\\n // Static slice functions, no bounds checking\\n /// @notice take a 32-byte slice from the specified position\\n function slice32(bytes memory _bytes, uint _start) internal pure returns (bytes32 res) {\\n assembly {\\n res := mload(add(add(_bytes, 32), _start))\\n }\\n }\\n\\n /// @notice take a 20-byte slice from the specified position\\n function slice20(bytes memory _bytes, uint _start) internal pure returns (bytes20) {\\n return bytes20(slice32(_bytes, _start));\\n }\\n\\n /// @notice take a 8-byte slice from the specified position\\n function slice8(bytes memory _bytes, uint _start) internal pure returns (bytes8) {\\n return bytes8(slice32(_bytes, _start));\\n }\\n\\n /// @notice take a 4-byte slice from the specified position\\n function slice4(bytes memory _bytes, uint _start) internal pure returns (bytes4) {\\n return bytes4(slice32(_bytes, _start));\\n }\\n\\n /// @notice take a 3-byte slice from the specified position\\n function slice3(bytes memory _bytes, uint _start) internal pure returns (bytes3) {\\n return bytes3(slice32(_bytes, _start));\\n }\\n\\n /// @notice take a 2-byte slice from the specified position\\n function slice2(bytes memory _bytes, uint _start) internal pure returns (bytes2) {\\n return bytes2(slice32(_bytes, _start));\\n }\\n\\n function toAddress(bytes memory _bytes, uint _start) internal pure returns (address) {\\n uint _totalLen = _start + 20;\\n require(_totalLen > _start && _bytes.length >= _totalLen, \\\"Address conversion out of bounds.\\\");\\n address tempAddress;\\n\\n assembly {\\n tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\\n }\\n\\n return tempAddress;\\n }\\n\\n function toUint(bytes memory _bytes, uint _start) internal pure returns (uint256) {\\n uint _totalLen = _start + 32;\\n require(_totalLen > _start && _bytes.length >= _totalLen, \\\"Uint conversion out of bounds.\\\");\\n uint256 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {\\n bool success = true;\\n\\n assembly {\\n let length := mload(_preBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(length, mload(_postBytes))\\n case 1 {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n let mc := add(_preBytes, 0x20)\\n let end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n // the next line is the loop condition:\\n // while(uint(mc < end) + cb == 2)\\n } eq(add(lt(mc, end), cb), 2) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // if any of these checks fails then arrays are not equal\\n if iszero(eq(mload(mc), mload(cc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n\\n function equalStorage(bytes storage _preBytes, bytes memory _postBytes) internal view returns (bool) {\\n bool success = true;\\n\\n assembly {\\n // we know _preBytes_offset is 0\\n let fslot := sload(_preBytes.slot)\\n // Decode the length of the stored array like in concatStorage().\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(slength, mlength)\\n case 1 {\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n if iszero(iszero(slength)) {\\n switch lt(slength, 32)\\n case 1 {\\n // blank the last byte which is the length\\n fslot := mul(div(fslot, 0x100), 0x100)\\n\\n if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {\\n // unsuccess:\\n success := 0\\n }\\n }\\n default {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := keccak256(0x0, 0x20)\\n\\n let mc := add(_postBytes, 0x20)\\n let end := add(mc, mlength)\\n\\n // the next line is the loop condition:\\n // while(uint(mc < end) + cb == 2)\\n for {} eq(add(lt(mc, end), cb), 2) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n if iszero(eq(sload(sc), mload(mc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n\\n function toBytes32(bytes memory _source) pure internal returns (bytes32 result) {\\n if (_source.length == 0) {\\n return 0x0;\\n }\\n\\n assembly {\\n result := mload(add(_source, 32))\\n }\\n }\\n\\n function keccak256Slice(bytes memory _bytes, uint _start, uint _length) pure internal returns (bytes32 result) {\\n uint _end = _start + _length;\\n require(_end > _start && _bytes.length >= _end, \\\"Slice out of bounds\\\");\\n\\n assembly {\\n result := keccak256(add(add(_bytes, 32), _start), _length)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x43e0f3b3b23c861bd031588bf410dfdd02e2af17941a89aa38d70e534e0380d1\"},\"contracts/bridge/EcdsaLib.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n\\npragma solidity 0.8.17;\\n\\nimport \\\"@keep-network/bitcoin-spv-sol/contracts/BytesLib.sol\\\";\\n\\nlibrary EcdsaLib {\\n using BytesLib for bytes;\\n\\n /// @notice Converts public key X and Y coordinates (32-byte each) to a\\n /// compressed public key (33-byte). Compressed public key is X\\n /// coordinate prefixed with `02` or `03` based on the Y coordinate parity.\\n /// It is expected that the uncompressed public key is stripped\\n /// (i.e. it is not prefixed with `04`).\\n /// @param x Wallet's public key's X coordinate.\\n /// @param y Wallet's public key's Y coordinate.\\n /// @return Compressed public key (33-byte), prefixed with `02` or `03`.\\n function compressPublicKey(bytes32 x, bytes32 y)\\n internal\\n pure\\n returns (bytes memory)\\n {\\n bytes1 prefix;\\n if (uint256(y) % 2 == 0) {\\n prefix = hex\\\"02\\\";\\n } else {\\n prefix = hex\\\"03\\\";\\n }\\n\\n return bytes.concat(prefix, x);\\n }\\n}\\n\",\"keccak256\":\"0x670d0fbeb088f78abfe7ae7f844784d774ca515480383378a602af707cace7ff\",\"license\":\"GPL-3.0-only\"},\"contracts/test/TestEcdsaLib.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\npragma solidity 0.8.17;\\n\\nimport \\\"../bridge/EcdsaLib.sol\\\";\\n\\n// TODO: Rename to EcdsLibStub\\n/// @dev This is a contract implemented to test EcdsaLib library directly.\\ncontract TestEcdsaLib {\\n function compressPublicKey(bytes32 x, bytes32 y)\\n public\\n pure\\n returns (bytes memory)\\n {\\n return EcdsaLib.compressPublicKey(x, y);\\n }\\n}\\n\",\"keccak256\":\"0xbdd871c8e47ec9e26071205303cac2400219eed1b57b988f26c96e5dbf6c3707\",\"license\":\"GPL-3.0-only\"}},\"version\":1}",
|
|
1151
|
+
"storageLayout": {
|
|
1152
|
+
"storage": [],
|
|
1153
|
+
"types": null
|
|
1154
|
+
},
|
|
1155
|
+
"userdoc": {
|
|
1156
|
+
"kind": "user",
|
|
1157
|
+
"methods": {},
|
|
1158
|
+
"version": 1
|
|
1159
|
+
}
|
|
1160
|
+
}
|