diff --git a/deployments/arbitrum/Multicall.json b/deployments/arbitrum/Multicall.json new file mode 100644 index 0000000..746ae70 --- /dev/null +++ b/deployments/arbitrum/Multicall.json @@ -0,0 +1,182 @@ +{ + "address": "0xC2E9dDC765303D86B0D349bB5FE44D76d41cA74A", + "abi": [ + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + } + ], + "internalType": "struct Multicall.Call[]", + "name": "calls", + "type": "tuple[]" + } + ], + "name": "aggregate", + "outputs": [ + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "returnData", + "type": "bytes[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getBlockHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "blockHash", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentBlockCoinbase", + "outputs": [ + { + "internalType": "address", + "name": "coinbase", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentBlockDifficulty", + "outputs": [ + { + "internalType": "uint256", + "name": "difficulty", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentBlockGasLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "gaslimit", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentBlockTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "getEthBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getLastBlockHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "blockHash", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xa178d1d9ee7a9e4095635de41969f298555747ca91a2018de72e707604b0910b", + "receipt": { + "to": null, + "from": "0xc039897eE5A0d14A3d1F212922FaF7e159Ab619F", + "contractAddress": "0xC2E9dDC765303D86B0D349bB5FE44D76d41cA74A", + "transactionIndex": 0, + "gasUsed": "5573149", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x6d9cdf6314b69f65474bbff7ba3e457ea65a40a88de800be32ef1101f3ab1ac7", + "transactionHash": "0xa178d1d9ee7a9e4095635de41969f298555747ca91a2018de72e707604b0910b", + "logs": [], + "blockNumber": 5130828, + "cumulativeGasUsed": "2448829", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "7ba80e38a7a9333b4f0d739d9e66e3bb", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"}],\"internalType\":\"struct Multicall.Call[]\",\"name\":\"calls\",\"type\":\"tuple[]\"}],\"name\":\"aggregate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"returnData\",\"type\":\"bytes[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentBlockCoinbase\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"coinbase\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentBlockDifficulty\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"difficulty\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentBlockGasLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"gaslimit\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentBlockTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getEthBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Michael Elliot Joshua Levine Nick Johnson \",\"kind\":\"dev\",\"methods\":{},\"title\":\"Multicall - Aggregate results from multiple read-only function calls\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Taken from - https://github.com/makerdao/multicall/src/Multicall.sol\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/utils/Multicall.sol\":\"Multicall\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/utils/Multicall.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\npragma experimental ABIEncoderV2;\\n\\n/// Taken from - https://github.com/makerdao/multicall/src/Multicall.sol\\n/// @title Multicall - Aggregate results from multiple read-only function calls\\n/// @author Michael Elliot \\n/// @author Joshua Levine \\n/// @author Nick Johnson \\n\\ncontract Multicall {\\n struct Call {\\n address target;\\n bytes callData;\\n }\\n\\n function aggregate(Call[] memory calls)\\n public\\n returns (uint256 blockNumber, bytes[] memory returnData)\\n {\\n blockNumber = block.number;\\n returnData = new bytes[](calls.length);\\n for (uint256 i = 0; i < calls.length; i++) {\\n (bool success, bytes memory ret) = calls[i].target.call(\\n calls[i].callData\\n );\\n require(success);\\n returnData[i] = ret;\\n }\\n }\\n\\n // Helper functions\\n function getEthBalance(address addr) public view returns (uint256 balance) {\\n balance = addr.balance;\\n }\\n\\n function getBlockHash(uint256 blockNumber)\\n public\\n view\\n returns (bytes32 blockHash)\\n {\\n blockHash = blockhash(blockNumber);\\n }\\n\\n function getLastBlockHash() public view returns (bytes32 blockHash) {\\n blockHash = blockhash(block.number - 1);\\n }\\n\\n function getCurrentBlockTimestamp()\\n public\\n view\\n returns (uint256 timestamp)\\n {\\n timestamp = block.timestamp;\\n }\\n\\n function getCurrentBlockDifficulty()\\n public\\n view\\n returns (uint256 difficulty)\\n {\\n difficulty = block.difficulty;\\n }\\n\\n function getCurrentBlockGasLimit() public view returns (uint256 gaslimit) {\\n gaslimit = block.gaslimit;\\n }\\n\\n function getCurrentBlockCoinbase() public view returns (address coinbase) {\\n coinbase = block.coinbase;\\n }\\n}\\n\",\"keccak256\":\"0x9bb51fbda366153ac37e79039b8c83a7c6d287f2c6d6fae2f51274ad3b8d7431\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506105ec806100206000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806372425d9d1161005b57806372425d9d146100e657806386d516e8146100ec578063a8b0574e146100f2578063ee82ac5e1461010057600080fd5b80630f28c97d1461008d578063252dba42146100a257806327e86d6e146100c35780634d2301cc146100cb575b600080fd5b425b6040519081526020015b60405180910390f35b6100b56100b03660046102f1565b610112565b60405161009992919061047f565b61008f610252565b61008f6100d9366004610501565b6001600160a01b03163190565b4461008f565b4561008f565b604051418152602001610099565b61008f61010e366004610523565b4090565b8051439060609067ffffffffffffffff81111561013157610131610265565b60405190808252806020026020018201604052801561016457816020015b606081526020019060019003908161014f5790505b50905060005b835181101561024c576000808583815181106101885761018861053c565b6020026020010151600001516001600160a01b03168684815181106101af576101af61053c565b6020026020010151602001516040516101c89190610552565b6000604051808303816000865af19150503d8060008114610205576040519150601f19603f3d011682016040523d82523d6000602084013e61020a565b606091505b50915091508161021957600080fd5b8084848151811061022c5761022c61053c565b60200260200101819052505050808061024490610584565b91505061016a565b50915091565b600061025f60014361059f565b40905090565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561029e5761029e610265565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156102cd576102cd610265565b604052919050565b80356001600160a01b03811681146102ec57600080fd5b919050565b6000602080838503121561030457600080fd5b823567ffffffffffffffff8082111561031c57600080fd5b818501915085601f83011261033057600080fd5b81358181111561034257610342610265565b8060051b6103518582016102a4565b918252838101850191858101908984111561036b57600080fd5b86860192505b83831015610442578235858111156103895760008081fd5b86016040601f19828d0381018213156103a25760008081fd5b6103aa61027b565b6103b58b85016102d5565b815282840135898111156103c95760008081fd5b8085019450508d603f8501126103df5760008081fd5b8a840135898111156103f3576103f3610265565b6104038c84601f840116016102a4565b92508083528e8482870101111561041a5760008081fd5b808486018d85013760009083018c0152808b0191909152845250509186019190860190610371565b9998505050505050505050565b60005b8381101561046a578181015183820152602001610452565b83811115610479576000848401525b50505050565b600060408201848352602060408185015281855180845260608601915060608160051b870101935082870160005b828110156104f357878603605f19018452815180518088526104d481888a0189850161044f565b601f01601f1916969096018501955092840192908401906001016104ad565b509398975050505050505050565b60006020828403121561051357600080fd5b61051c826102d5565b9392505050565b60006020828403121561053557600080fd5b5035919050565b634e487b7160e01b600052603260045260246000fd5b6000825161056481846020870161044f565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b60006000198214156105985761059861056e565b5060010190565b6000828210156105b1576105b161056e565b50039056fea2646970667358221220bc7a248c2d7e1e7b8e1554c72f73ef15a4ce22d57149bc0320353ad0e09f10b964736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c806372425d9d1161005b57806372425d9d146100e657806386d516e8146100ec578063a8b0574e146100f2578063ee82ac5e1461010057600080fd5b80630f28c97d1461008d578063252dba42146100a257806327e86d6e146100c35780634d2301cc146100cb575b600080fd5b425b6040519081526020015b60405180910390f35b6100b56100b03660046102f1565b610112565b60405161009992919061047f565b61008f610252565b61008f6100d9366004610501565b6001600160a01b03163190565b4461008f565b4561008f565b604051418152602001610099565b61008f61010e366004610523565b4090565b8051439060609067ffffffffffffffff81111561013157610131610265565b60405190808252806020026020018201604052801561016457816020015b606081526020019060019003908161014f5790505b50905060005b835181101561024c576000808583815181106101885761018861053c565b6020026020010151600001516001600160a01b03168684815181106101af576101af61053c565b6020026020010151602001516040516101c89190610552565b6000604051808303816000865af19150503d8060008114610205576040519150601f19603f3d011682016040523d82523d6000602084013e61020a565b606091505b50915091508161021957600080fd5b8084848151811061022c5761022c61053c565b60200260200101819052505050808061024490610584565b91505061016a565b50915091565b600061025f60014361059f565b40905090565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561029e5761029e610265565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156102cd576102cd610265565b604052919050565b80356001600160a01b03811681146102ec57600080fd5b919050565b6000602080838503121561030457600080fd5b823567ffffffffffffffff8082111561031c57600080fd5b818501915085601f83011261033057600080fd5b81358181111561034257610342610265565b8060051b6103518582016102a4565b918252838101850191858101908984111561036b57600080fd5b86860192505b83831015610442578235858111156103895760008081fd5b86016040601f19828d0381018213156103a25760008081fd5b6103aa61027b565b6103b58b85016102d5565b815282840135898111156103c95760008081fd5b8085019450508d603f8501126103df5760008081fd5b8a840135898111156103f3576103f3610265565b6104038c84601f840116016102a4565b92508083528e8482870101111561041a5760008081fd5b808486018d85013760009083018c0152808b0191909152845250509186019190860190610371565b9998505050505050505050565b60005b8381101561046a578181015183820152602001610452565b83811115610479576000848401525b50505050565b600060408201848352602060408185015281855180845260608601915060608160051b870101935082870160005b828110156104f357878603605f19018452815180518088526104d481888a0189850161044f565b601f01601f1916969096018501955092840192908401906001016104ad565b509398975050505050505050565b60006020828403121561051357600080fd5b61051c826102d5565b9392505050565b60006020828403121561053557600080fd5b5035919050565b634e487b7160e01b600052603260045260246000fd5b6000825161056481846020870161044f565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b60006000198214156105985761059861056e565b5060010190565b6000828210156105b1576105b161056e565b50039056fea2646970667358221220bc7a248c2d7e1e7b8e1554c72f73ef15a4ce22d57149bc0320353ad0e09f10b964736f6c634300080a0033", + "devdoc": { + "author": "Michael Elliot Joshua Levine Nick Johnson ", + "kind": "dev", + "methods": {}, + "title": "Multicall - Aggregate results from multiple read-only function calls", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Taken from - https://github.com/makerdao/multicall/src/Multicall.sol", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/arbitrum/solcInputs/7ba80e38a7a9333b4f0d739d9e66e3bb.json b/deployments/arbitrum/solcInputs/7ba80e38a7a9333b4f0d739d9e66e3bb.json new file mode 100644 index 0000000..4cfa009 --- /dev/null +++ b/deployments/arbitrum/solcInputs/7ba80e38a7a9333b4f0d739d9e66e3bb.json @@ -0,0 +1,35 @@ +{ + "language": "Solidity", + "sources": { + "contracts/utils/Multicall.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.5.0;\npragma experimental ABIEncoderV2;\n\n/// Taken from - https://github.com/makerdao/multicall/src/Multicall.sol\n/// @title Multicall - Aggregate results from multiple read-only function calls\n/// @author Michael Elliot \n/// @author Joshua Levine \n/// @author Nick Johnson \n\ncontract Multicall {\n struct Call {\n address target;\n bytes callData;\n }\n\n function aggregate(Call[] memory calls)\n public\n returns (uint256 blockNumber, bytes[] memory returnData)\n {\n blockNumber = block.number;\n returnData = new bytes[](calls.length);\n for (uint256 i = 0; i < calls.length; i++) {\n (bool success, bytes memory ret) = calls[i].target.call(\n calls[i].callData\n );\n require(success);\n returnData[i] = ret;\n }\n }\n\n // Helper functions\n function getEthBalance(address addr) public view returns (uint256 balance) {\n balance = addr.balance;\n }\n\n function getBlockHash(uint256 blockNumber)\n public\n view\n returns (bytes32 blockHash)\n {\n blockHash = blockhash(blockNumber);\n }\n\n function getLastBlockHash() public view returns (bytes32 blockHash) {\n blockHash = blockhash(block.number - 1);\n }\n\n function getCurrentBlockTimestamp()\n public\n view\n returns (uint256 timestamp)\n {\n timestamp = block.timestamp;\n }\n\n function getCurrentBlockDifficulty()\n public\n view\n returns (uint256 difficulty)\n {\n difficulty = block.difficulty;\n }\n\n function getCurrentBlockGasLimit() public view returns (uint256 gaslimit) {\n gaslimit = block.gaslimit;\n }\n\n function getCurrentBlockCoinbase() public view returns (address coinbase) {\n coinbase = block.coinbase;\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/exports/arbitrum.json b/exports/arbitrum.json index ce2a588..aec311c 100644 --- a/exports/arbitrum.json +++ b/exports/arbitrum.json @@ -3022,6 +3022,150 @@ "type": "function" } ] + }, + "Multicall": { + "address": "0xC2E9dDC765303D86B0D349bB5FE44D76d41cA74A", + "abi": [ + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + } + ], + "internalType": "struct Multicall.Call[]", + "name": "calls", + "type": "tuple[]" + } + ], + "name": "aggregate", + "outputs": [ + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "returnData", + "type": "bytes[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getBlockHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "blockHash", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentBlockCoinbase", + "outputs": [ + { + "internalType": "address", + "name": "coinbase", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentBlockDifficulty", + "outputs": [ + { + "internalType": "uint256", + "name": "difficulty", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentBlockGasLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "gaslimit", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentBlockTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "getEthBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getLastBlockHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "blockHash", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } + ] } } } \ No newline at end of file