diff --git a/artifacts/contracts/solidity/oz/ERC-2771/ERC2771Context.sol/ERC2771ContextTest.dbg.json b/artifacts/contracts/solidity/oz/ERC-2771/ERC2771Context.sol/ERC2771ContextTest.dbg.json index e27ccab6c..6857855ce 100644 --- a/artifacts/contracts/solidity/oz/ERC-2771/ERC2771Context.sol/ERC2771ContextTest.dbg.json +++ b/artifacts/contracts/solidity/oz/ERC-2771/ERC2771Context.sol/ERC2771ContextTest.dbg.json @@ -1,4 +1,4 @@ { "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../../build-info/dec15a2c1d17d204bdfcc03ceac1e4ca.json" + "buildInfo": "../../../../../build-info/3f95829b0790d58068477b0d5ee56231.json" } diff --git a/artifacts/contracts/solidity/oz/ReentrancyGuard/ReentrancyGuardTestReceiver.sol/ReentrancyGuardTestReceiver.dbg.json b/artifacts/contracts/solidity/oz/ReentrancyGuard/ReentrancyGuardTestReceiver.sol/ReentrancyGuardTestReceiver.dbg.json new file mode 100644 index 000000000..6857855ce --- /dev/null +++ b/artifacts/contracts/solidity/oz/ReentrancyGuard/ReentrancyGuardTestReceiver.sol/ReentrancyGuardTestReceiver.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../../../../../build-info/3f95829b0790d58068477b0d5ee56231.json" +} diff --git a/artifacts/contracts/solidity/oz/ReentrancyGuard/ReentrancyGuardTestReceiver.sol/ReentrancyGuardTestReceiver.json b/artifacts/contracts/solidity/oz/ReentrancyGuard/ReentrancyGuardTestReceiver.sol/ReentrancyGuardTestReceiver.json new file mode 100644 index 000000000..2dd623b16 --- /dev/null +++ b/artifacts/contracts/solidity/oz/ReentrancyGuard/ReentrancyGuardTestReceiver.sol/ReentrancyGuardTestReceiver.json @@ -0,0 +1,66 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ReentrancyGuardTestReceiver", + "sourceName": "contracts/solidity/oz/ReentrancyGuard/ReentrancyGuardTestReceiver.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address payable", + "name": "_reentrancyGuardTestSender", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "attack", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "attackNonReentrant", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "reentrancyGuardTestSender", + "outputs": [ + { + "internalType": "contract ReentrancyGuardTestSender", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_nonReentrant", + "type": "bool" + } + ], + "name": "setNonReentrant", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x60806040526000805460ff60a01b1916905534801561001d57600080fd5b5060405161033b38038061033b83398101604081905261003c91610061565b600080546001600160a01b0319166001600160a01b0392909216919091179055610091565b60006020828403121561007357600080fd5b81516001600160a01b038116811461008a57600080fd5b9392505050565b61029b806100a06000396000f3fe6080604052600436106100435760003560e01c80635705d8e61461011b57806393abfaf1146101575780639e5faafc14610190578063f68d7e581461019857600080fd5b36610116576305f5e1003331108015906100675750600054600160a01b900460ff16155b156100c357600080546040805163dd09946160e01b815290516001600160a01b039092169263dd0994619260048084019382900301818387803b1580156100ad57600080fd5b505af11580156100c1573d6000803e3d6000fd5b005b600054600160a01b900460ff16156100c157600080546040805163c9b0b3b360e01b815290516001600160a01b039092169263c9b0b3b39260048084019382900301818387803b1580156100ad57600080fd5b600080fd5b34801561012757600080fd5b5060005461013b906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b34801561016357600080fd5b506100c161017236600461023c565b60008054911515600160a01b0260ff60a01b19909216919091179055565b6100c16101a0565b6100c16101fb565b600080546040805163dd09946160e01b815290516001600160a01b039092169263dd0994619260048084019382900301818387803b1580156101e157600080fd5b505af11580156101f5573d6000803e3d6000fd5b50505050565b600080546040805163c9b0b3b360e01b815290516001600160a01b039092169263c9b0b3b39260048084019382900301818387803b1580156101e157600080fd5b60006020828403121561024e57600080fd5b8135801515811461025e57600080fd5b939250505056fea2646970667358221220faf10d863d0f527ff108056170529a193de36942820d44659df97130c7ecfb5a64736f6c63430008140033", + "deployedBytecode": "0x6080604052600436106100435760003560e01c80635705d8e61461011b57806393abfaf1146101575780639e5faafc14610190578063f68d7e581461019857600080fd5b36610116576305f5e1003331108015906100675750600054600160a01b900460ff16155b156100c357600080546040805163dd09946160e01b815290516001600160a01b039092169263dd0994619260048084019382900301818387803b1580156100ad57600080fd5b505af11580156100c1573d6000803e3d6000fd5b005b600054600160a01b900460ff16156100c157600080546040805163c9b0b3b360e01b815290516001600160a01b039092169263c9b0b3b39260048084019382900301818387803b1580156100ad57600080fd5b600080fd5b34801561012757600080fd5b5060005461013b906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b34801561016357600080fd5b506100c161017236600461023c565b60008054911515600160a01b0260ff60a01b19909216919091179055565b6100c16101a0565b6100c16101fb565b600080546040805163dd09946160e01b815290516001600160a01b039092169263dd0994619260048084019382900301818387803b1580156101e157600080fd5b505af11580156101f5573d6000803e3d6000fd5b50505050565b600080546040805163c9b0b3b360e01b815290516001600160a01b039092169263c9b0b3b39260048084019382900301818387803b1580156101e157600080fd5b60006020828403121561024e57600080fd5b8135801515811461025e57600080fd5b939250505056fea2646970667358221220faf10d863d0f527ff108056170529a193de36942820d44659df97130c7ecfb5a64736f6c63430008140033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/artifacts/contracts/solidity/oz/ReentrancyGuard/ReentrancyGuardTestSender.sol/ReentrancyGuardTestSender.dbg.json b/artifacts/contracts/solidity/oz/ReentrancyGuard/ReentrancyGuardTestSender.sol/ReentrancyGuardTestSender.dbg.json new file mode 100644 index 000000000..6857855ce --- /dev/null +++ b/artifacts/contracts/solidity/oz/ReentrancyGuard/ReentrancyGuardTestSender.sol/ReentrancyGuardTestSender.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../../../../../build-info/3f95829b0790d58068477b0d5ee56231.json" +} diff --git a/artifacts/contracts/solidity/oz/ReentrancyGuard/ReentrancyGuardTestSender.sol/ReentrancyGuardTestSender.json b/artifacts/contracts/solidity/oz/ReentrancyGuard/ReentrancyGuardTestSender.sol/ReentrancyGuardTestSender.json new file mode 100644 index 000000000..bdec21a46 --- /dev/null +++ b/artifacts/contracts/solidity/oz/ReentrancyGuard/ReentrancyGuardTestSender.sol/ReentrancyGuardTestSender.json @@ -0,0 +1,52 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ReentrancyGuardTestSender", + "sourceName": "contracts/solidity/oz/ReentrancyGuard/ReentrancyGuardTestSender.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "payable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + }, + { + "inputs": [], + "name": "counter", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reentrancyTest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "reentrancyTestNonReentrant", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x60806040526000600181815590556101f48061001c6000396000f3fe6080604052600436106100385760003560e01c806361bc221a14610044578063c9b0b3b31461006c578063dd0994611461008357600080fd5b3661003f57005b600080fd5b34801561005057600080fd5b5061005a60015481565b60405190815260200160405180910390f35b34801561007857600080fd5b50610081610098565b005b34801561008f57600080fd5b5061008161010c565b6100a061016d565b600180546100ad91610197565b60015560405160009033906305f5e100908381818185875af1925050503d80600081146100f6576040519150601f19603f3d011682016040523d82523d6000602084013e6100fb565b606091505b505090505061010a6001600055565b565b6001805461011991610197565b60015560405160009033906305f5e100908381818185875af1925050503d8060008114610162576040519150601f19603f3d011682016040523d82523d6000602084013e610167565b606091505b50505050565b60026000540361019057604051633ee5aeb560e01b815260040160405180910390fd5b6002600055565b808201808211156101b857634e487b7160e01b600052601160045260246000fd5b9291505056fea2646970667358221220b40a31d03c7261a01b90674539db8114c28eed7f51d2f6b559e2d37e861fc3ac64736f6c63430008140033", + "deployedBytecode": "0x6080604052600436106100385760003560e01c806361bc221a14610044578063c9b0b3b31461006c578063dd0994611461008357600080fd5b3661003f57005b600080fd5b34801561005057600080fd5b5061005a60015481565b60405190815260200160405180910390f35b34801561007857600080fd5b50610081610098565b005b34801561008f57600080fd5b5061008161010c565b6100a061016d565b600180546100ad91610197565b60015560405160009033906305f5e100908381818185875af1925050503d80600081146100f6576040519150601f19603f3d011682016040523d82523d6000602084013e6100fb565b606091505b505090505061010a6001600055565b565b6001805461011991610197565b60015560405160009033906305f5e100908381818185875af1925050503d8060008114610162576040519150601f19603f3d011682016040523d82523d6000602084013e610167565b606091505b50505050565b60026000540361019057604051633ee5aeb560e01b815260040160405180910390fd5b6002600055565b808201808211156101b857634e487b7160e01b600052601160045260246000fd5b9291505056fea2646970667358221220b40a31d03c7261a01b90674539db8114c28eed7f51d2f6b559e2d37e861fc3ac64736f6c63430008140033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/artifacts/contracts/solidity/oz/create2/ContractCreatorOZCreate2.sol/ContractCreatorOZCreate2.dbg.json b/artifacts/contracts/solidity/oz/create2/ContractCreatorOZCreate2.sol/ContractCreatorOZCreate2.dbg.json new file mode 100644 index 000000000..6857855ce --- /dev/null +++ b/artifacts/contracts/solidity/oz/create2/ContractCreatorOZCreate2.sol/ContractCreatorOZCreate2.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../../../../../build-info/3f95829b0790d58068477b0d5ee56231.json" +} diff --git a/artifacts/contracts/solidity/oz/create2/ContractCreatorOZCreate2.sol/ContractCreatorOZCreate2.json b/artifacts/contracts/solidity/oz/create2/ContractCreatorOZCreate2.sol/ContractCreatorOZCreate2.json new file mode 100644 index 000000000..b5fac715b --- /dev/null +++ b/artifacts/contracts/solidity/oz/create2/ContractCreatorOZCreate2.sol/ContractCreatorOZCreate2.json @@ -0,0 +1,102 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ContractCreatorOZCreate2", + "sourceName": "contracts/solidity/oz/create2/ContractCreatorOZCreate2.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "payable", + "type": "constructor" + }, + { + "inputs": [], + "name": "Create2EmptyBytecode", + "type": "error" + }, + { + "inputs": [], + "name": "Create2FailedDeployment", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "Create2InsufficientBalance", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "NewContractDeployedAt", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "bytecodeHash", + "type": "bytes32" + } + ], + "name": "computeAddress", + "outputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "bytecode", + "type": "bytes" + } + ], + "name": "deploy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040526102d1806100136000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806366b24bdf1461003b578063b2255ea21461006a575b600080fd5b61004e61004936600461019f565b61007f565b6040516001600160a01b03909116815260200160405180910390f35b61007d6100783660046101d7565b610092565b005b600061008b83836100e4565b9392505050565b600061009f8484846100f1565b6040516001600160a01b03821681529091507f4622a5a13cef67b7d240d8e6e0599fc0b5ef7893aa06e147dc08a9da69946b769060200160405180910390a150505050565b600061008b838330610175565b6000834710156101215760405163392efb2b60e21b81524760048201526024810185905260440160405180910390fd5b815160000361014357604051631328927760e21b815260040160405180910390fd5b8282516020840186f590506001600160a01b03811661008b57604051633a0ba96160e11b815260040160405180910390fd5b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b600080604083850312156101b257600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b6000806000606084860312156101ec57600080fd5b8335925060208401359150604084013567ffffffffffffffff8082111561021257600080fd5b818601915086601f83011261022657600080fd5b813581811115610238576102386101c1565b604051601f8201601f19908116603f01168101908382118183101715610260576102606101c1565b8160405282815289602084870101111561027957600080fd5b826020860160208301376000602084830101528095505050505050925092509256fea2646970667358221220f6b7ae42442fdeeb4ff679f5b709717ccbbca103570ccf604ec3457723216b5964736f6c63430008140033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c806366b24bdf1461003b578063b2255ea21461006a575b600080fd5b61004e61004936600461019f565b61007f565b6040516001600160a01b03909116815260200160405180910390f35b61007d6100783660046101d7565b610092565b005b600061008b83836100e4565b9392505050565b600061009f8484846100f1565b6040516001600160a01b03821681529091507f4622a5a13cef67b7d240d8e6e0599fc0b5ef7893aa06e147dc08a9da69946b769060200160405180910390a150505050565b600061008b838330610175565b6000834710156101215760405163392efb2b60e21b81524760048201526024810185905260440160405180910390fd5b815160000361014357604051631328927760e21b815260040160405180910390fd5b8282516020840186f590506001600160a01b03811661008b57604051633a0ba96160e11b815260040160405180910390fd5b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b600080604083850312156101b257600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b6000806000606084860312156101ec57600080fd5b8335925060208401359150604084013567ffffffffffffffff8082111561021257600080fd5b818601915086601f83011261022657600080fd5b813581811115610238576102386101c1565b604051601f8201601f19908116603f01168101908382118183101715610260576102606101c1565b8160405282815289602084870101111561027957600080fd5b826020860160208301376000602084830101528095505050505050925092509256fea2646970667358221220f6b7ae42442fdeeb4ff679f5b709717ccbbca103570ccf604ec3457723216b5964736f6c63430008140033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/artifacts/contracts/solidity/oz/ownable/CrowdFund.sol/CrowdFund.dbg.json b/artifacts/contracts/solidity/oz/ownable/CrowdFund.sol/CrowdFund.dbg.json new file mode 100644 index 000000000..6857855ce --- /dev/null +++ b/artifacts/contracts/solidity/oz/ownable/CrowdFund.sol/CrowdFund.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../../../../../build-info/3f95829b0790d58068477b0d5ee56231.json" +} diff --git a/artifacts/contracts/solidity/oz/ownable/CrowdFund.sol/CrowdFund.json b/artifacts/contracts/solidity/oz/ownable/CrowdFund.sol/CrowdFund.json new file mode 100644 index 000000000..5039afa3e --- /dev/null +++ b/artifacts/contracts/solidity/oz/ownable/CrowdFund.sol/CrowdFund.json @@ -0,0 +1,189 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CrowdFund", + "sourceName": "contracts/solidity/oz/ownable/CrowdFund.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "WithdrawlError", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "depositer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "withdrawer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b5060405161050538038061050583398101604081905261002f916100be565b806001600160a01b03811661005e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100678161006e565b50506100ee565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100d057600080fd5b81516001600160a01b03811681146100e757600080fd5b9392505050565b610408806100fd6000396000f3fe6080604052600436106100655760003560e01c8063b69ef8a811610043578063b69ef8a8146100ce578063d0e30db0146100ec578063f2fde38b146100f457600080fd5b80632e1a7d4d1461006a578063715018a61461008c5780638da5cb5b146100a1575b600080fd5b34801561007657600080fd5b5061008a610085366004610347565b610114565b005b34801561009857600080fd5b5061008a610218565b3480156100ad57600080fd5b506000546040516001600160a01b0390911681526020015b60405180910390f35b3480156100da57600080fd5b506001546040519081526020016100c5565b61008a61022c565b34801561010057600080fd5b5061008a61010f366004610360565b61027f565b61011c6102bd565b60015481111561014e57600154604051639266535160e01b815260040161014591815260200190565b60405180910390fd5b806001600082825461016091906103a6565b9091555050604051600090339083908381818185875af1925050503d80600081146101a7576040519150601f19603f3d011682016040523d82523d6000602084013e6101ac565b606091505b50509050806101d157604051634471b01960e11b815260048101839052602401610145565b7f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436433604080516001600160a01b039092168252602082018590520160405180910390a15050565b6102206102bd565b61022a60006102ea565b565b346001600082825461023e91906103bf565b90915550506040805133815234602082015281517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c929181900390910190a1565b6102876102bd565b6001600160a01b0381166102b157604051631e4fbdf760e01b815260006004820152602401610145565b6102ba816102ea565b50565b6000546001600160a01b0316331461022a5760405163118cdaa760e01b8152336004820152602401610145565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561035957600080fd5b5035919050565b60006020828403121561037257600080fd5b81356001600160a01b038116811461038957600080fd5b9392505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156103b9576103b9610390565b92915050565b808201808211156103b9576103b961039056fea26469706673582212206301bbd83332154ab5a961ca02728261df55c3c844d5c7e62392e7b5c3578b7964736f6c63430008140033", + "deployedBytecode": "0x6080604052600436106100655760003560e01c8063b69ef8a811610043578063b69ef8a8146100ce578063d0e30db0146100ec578063f2fde38b146100f457600080fd5b80632e1a7d4d1461006a578063715018a61461008c5780638da5cb5b146100a1575b600080fd5b34801561007657600080fd5b5061008a610085366004610347565b610114565b005b34801561009857600080fd5b5061008a610218565b3480156100ad57600080fd5b506000546040516001600160a01b0390911681526020015b60405180910390f35b3480156100da57600080fd5b506001546040519081526020016100c5565b61008a61022c565b34801561010057600080fd5b5061008a61010f366004610360565b61027f565b61011c6102bd565b60015481111561014e57600154604051639266535160e01b815260040161014591815260200190565b60405180910390fd5b806001600082825461016091906103a6565b9091555050604051600090339083908381818185875af1925050503d80600081146101a7576040519150601f19603f3d011682016040523d82523d6000602084013e6101ac565b606091505b50509050806101d157604051634471b01960e11b815260048101839052602401610145565b7f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436433604080516001600160a01b039092168252602082018590520160405180910390a15050565b6102206102bd565b61022a60006102ea565b565b346001600082825461023e91906103bf565b90915550506040805133815234602082015281517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c929181900390910190a1565b6102876102bd565b6001600160a01b0381166102b157604051631e4fbdf760e01b815260006004820152602401610145565b6102ba816102ea565b50565b6000546001600160a01b0316331461022a5760405163118cdaa760e01b8152336004820152602401610145565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561035957600080fd5b5035919050565b60006020828403121561037257600080fd5b81356001600160a01b038116811461038957600080fd5b9392505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156103b9576103b9610390565b92915050565b808201808211156103b9576103b961039056fea26469706673582212206301bbd83332154ab5a961ca02728261df55c3c844d5c7e62392e7b5c3578b7964736f6c63430008140033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/artifacts/contracts/solidity/oz/safeCast/SafeCast.sol/SafeCastTest.dbg.json b/artifacts/contracts/solidity/oz/safeCast/SafeCast.sol/SafeCastTest.dbg.json new file mode 100644 index 000000000..bb634fd9f --- /dev/null +++ b/artifacts/contracts/solidity/oz/safeCast/SafeCast.sol/SafeCastTest.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../../../../../build-info/a916cad494e300c96289be78d9e4f9e0.json" +} diff --git a/artifacts/contracts/solidity/oz/safeCast/SafeCast.sol/SafeCastTest.json b/artifacts/contracts/solidity/oz/safeCast/SafeCast.sol/SafeCastTest.json new file mode 100644 index 000000000..92a27d466 --- /dev/null +++ b/artifacts/contracts/solidity/oz/safeCast/SafeCast.sol/SafeCastTest.json @@ -0,0 +1,1281 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SafeCastTest", + "sourceName": "contracts/solidity/oz/safeCast/SafeCast.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "int256", + "name": "value", + "type": "int256" + } + ], + "name": "SafeCastOverflowedIntDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "value", + "type": "int256" + } + ], + "name": "SafeCastOverflowedIntToUint", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintToInt", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt104", + "outputs": [ + { + "internalType": "int104", + "name": "", + "type": "int104" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt112", + "outputs": [ + { + "internalType": "int112", + "name": "", + "type": "int112" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt120", + "outputs": [ + { + "internalType": "int120", + "name": "", + "type": "int120" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt128", + "outputs": [ + { + "internalType": "int128", + "name": "", + "type": "int128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt136", + "outputs": [ + { + "internalType": "int136", + "name": "", + "type": "int136" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt144", + "outputs": [ + { + "internalType": "int144", + "name": "", + "type": "int144" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt152", + "outputs": [ + { + "internalType": "int152", + "name": "", + "type": "int152" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt16", + "outputs": [ + { + "internalType": "int16", + "name": "", + "type": "int16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt160", + "outputs": [ + { + "internalType": "int160", + "name": "", + "type": "int160" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt168", + "outputs": [ + { + "internalType": "int168", + "name": "", + "type": "int168" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt176", + "outputs": [ + { + "internalType": "int176", + "name": "", + "type": "int176" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt184", + "outputs": [ + { + "internalType": "int184", + "name": "", + "type": "int184" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt192", + "outputs": [ + { + "internalType": "int192", + "name": "", + "type": "int192" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt200", + "outputs": [ + { + "internalType": "int200", + "name": "", + "type": "int200" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt208", + "outputs": [ + { + "internalType": "int208", + "name": "", + "type": "int208" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt216", + "outputs": [ + { + "internalType": "int216", + "name": "", + "type": "int216" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt224", + "outputs": [ + { + "internalType": "int224", + "name": "", + "type": "int224" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt232", + "outputs": [ + { + "internalType": "int232", + "name": "", + "type": "int232" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt24", + "outputs": [ + { + "internalType": "int24", + "name": "", + "type": "int24" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt240", + "outputs": [ + { + "internalType": "int240", + "name": "", + "type": "int240" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt248", + "outputs": [ + { + "internalType": "int248", + "name": "", + "type": "int248" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toInt256", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt32", + "outputs": [ + { + "internalType": "int32", + "name": "", + "type": "int32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt40", + "outputs": [ + { + "internalType": "int40", + "name": "", + "type": "int40" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt48", + "outputs": [ + { + "internalType": "int48", + "name": "", + "type": "int48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt56", + "outputs": [ + { + "internalType": "int56", + "name": "", + "type": "int56" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt64", + "outputs": [ + { + "internalType": "int64", + "name": "", + "type": "int64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt72", + "outputs": [ + { + "internalType": "int72", + "name": "", + "type": "int72" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt8", + "outputs": [ + { + "internalType": "int8", + "name": "", + "type": "int8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt80", + "outputs": [ + { + "internalType": "int80", + "name": "", + "type": "int80" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt88", + "outputs": [ + { + "internalType": "int88", + "name": "", + "type": "int88" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toInt96", + "outputs": [ + { + "internalType": "int96", + "name": "", + "type": "int96" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint104", + "outputs": [ + { + "internalType": "uint104", + "name": "", + "type": "uint104" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint112", + "outputs": [ + { + "internalType": "uint112", + "name": "", + "type": "uint112" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint120", + "outputs": [ + { + "internalType": "uint120", + "name": "", + "type": "uint120" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint128", + "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint136", + "outputs": [ + { + "internalType": "uint136", + "name": "", + "type": "uint136" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint144", + "outputs": [ + { + "internalType": "uint144", + "name": "", + "type": "uint144" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint152", + "outputs": [ + { + "internalType": "uint152", + "name": "", + "type": "uint152" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint16", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint160", + "outputs": [ + { + "internalType": "uint160", + "name": "", + "type": "uint160" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint168", + "outputs": [ + { + "internalType": "uint168", + "name": "", + "type": "uint168" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint176", + "outputs": [ + { + "internalType": "uint176", + "name": "", + "type": "uint176" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint184", + "outputs": [ + { + "internalType": "uint184", + "name": "", + "type": "uint184" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint192", + "outputs": [ + { + "internalType": "uint192", + "name": "", + "type": "uint192" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint200", + "outputs": [ + { + "internalType": "uint200", + "name": "", + "type": "uint200" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint208", + "outputs": [ + { + "internalType": "uint208", + "name": "", + "type": "uint208" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint216", + "outputs": [ + { + "internalType": "uint216", + "name": "", + "type": "uint216" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint224", + "outputs": [ + { + "internalType": "uint224", + "name": "", + "type": "uint224" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint232", + "outputs": [ + { + "internalType": "uint232", + "name": "", + "type": "uint232" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint24", + "outputs": [ + { + "internalType": "uint24", + "name": "", + "type": "uint24" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint240", + "outputs": [ + { + "internalType": "uint240", + "name": "", + "type": "uint240" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint248", + "outputs": [ + { + "internalType": "uint248", + "name": "", + "type": "uint248" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "number", + "type": "int256" + } + ], + "name": "toUint256", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint32", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint40", + "outputs": [ + { + "internalType": "uint40", + "name": "", + "type": "uint40" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint48", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint56", + "outputs": [ + { + "internalType": "uint56", + "name": "", + "type": "uint56" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint64", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint72", + "outputs": [ + { + "internalType": "uint72", + "name": "", + "type": "uint72" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint8", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint80", + "outputs": [ + { + "internalType": "uint80", + "name": "", + "type": "uint80" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint88", + "outputs": [ + { + "internalType": "uint88", + "name": "", + "type": "uint88" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "toUint96", + "outputs": [ + { + "internalType": "uint96", + "name": "", + "type": "uint96" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x60806040526000196000556001600160f81b03600160006101000a8154816001600160f81b0302191690836001600160f81b031602179055506001600160f01b03600260006101000a8154816001600160f01b0302191690836001600160f01b031602179055506001600160e81b03600360006101000a8154816001600160e81b0302191690836001600160e81b031602179055506001600160e01b03600460006101000a8154816001600160e01b0302191690836001600160e01b031602179055506001600160d81b03600560006101000a8154816001600160d81b0302191690836001600160d81b031602179055506001600160d01b03600660006101000a8154816001600160d01b0302191690836001600160d01b031602179055506001600160c81b03600760006101000a8154816001600160c81b0302191690836001600160c81b031602179055506001600160c01b03600860006101000a8154816001600160c01b0302191690836001600160c01b031602179055506001600160b81b03600960006101000a8154816001600160b81b0302191690836001600160b81b031602179055506001600160b01b03600a60006101000a8154816001600160b01b0302191690836001600160b01b031602179055506001600160a81b03600b60006101000a8154816001600160a81b0302191690836001600160a81b031602179055506001600160a01b03600c60006101000a8154816001600160a01b0302191690836001600160a01b031602179055506001600160981b03600d60006101000a8154816001600160981b0302191690836001600160981b031602179055506001600160901b03600e60006101000a8154816001600160901b0302191690836001600160901b031602179055506001600160881b03600f60006101000a8154816001600160881b0302191690836001600160881b031602179055506001600160801b03601060006101000a8154816001600160801b0302191690836001600160801b031602179055506001600160781b036010806101000a8154816001600160781b0302191690836001600160781b031602179055506001600160701b03601160006101000a8154816001600160701b0302191690836001600160701b031602179055506001600160681b036011600e6101000a8154816001600160681b0302191690836001600160681b031602179055506001600160601b03601260006101000a8154816001600160601b0302191690836001600160601b031602179055506001600160581b036012600c6101000a8154816001600160581b0302191690836001600160581b031602179055506001600160501b03601360006101000a8154816001600160501b0302191690836001600160501b031602179055506001600160481b036013600a6101000a8154816001600160481b0302191690836001600160481b031602179055506001600160401b036013806101000a8154816001600160401b0302191690836001600160401b0316021790555066ffffffffffffff601460006101000a81548166ffffffffffffff021916908366ffffffffffffff16021790555065ffffffffffff601460076101000a81548165ffffffffffff021916908365ffffffffffff16021790555064ffffffffff6014600d6101000a81548164ffffffffff021916908364ffffffffff16021790555063ffffffff601460126101000a81548163ffffffff021916908363ffffffff16021790555062ffffff601460166101000a81548162ffffff021916908362ffffff16021790555061ffff601460196101000a81548161ffff021916908361ffff16021790555060ff6014601b6101000a81548160ff021916908360ff1602179055506001600160ff1b036015556001600160f71b03601660006101000a8154816001600160f81b030219169083601e0b6001600160f81b031602179055506001600160ef1b03601760006101000a8154816001600160f01b030219169083601d0b6001600160f01b031602179055506001600160e71b03601860006101000a8154816001600160e81b030219169083601c0b6001600160e81b031602179055506001600160df1b03601960006101000a8154816001600160e01b030219169083601b0b6001600160e01b031602179055506001600160d71b03601a60006101000a8154816001600160d81b030219169083601a0b6001600160d81b031602179055506001600160cf1b03601b60006101000a8154816001600160d01b03021916908360190b6001600160d01b031602179055506001600160c71b03601c60006101000a8154816001600160c81b03021916908360180b6001600160c81b031602179055506001600160bf1b03601d60006101000a8154816001600160c01b03021916908360170b6001600160c01b031602179055506001600160b71b03601e60006101000a8154816001600160b81b03021916908360160b6001600160b81b031602179055506001600160af1b03601f60006101000a8154816001600160b01b03021916908360150b6001600160b01b031602179055506001600160a71b03602060006101000a8154816001600160a81b03021916908360140b6001600160a81b0316021790555060016001609f1b03602160006101000a8154816001600160a01b03021916908360130b6001600160a01b031602179055506001600160971b03602260006101000a8154816001600160981b03021916908360120b6001600160981b0316021790555060016001608f1b03602360006101000a8154816001600160901b03021916908360110b6001600160901b031602179055506001600160871b03602460006101000a8154816001600160881b03021916908360100b6001600160881b0316021790555060016001607f1b03602560006101000a8154816001600160801b030219169083600f0b6001600160801b031602179055506001600160771b03602560106101000a8154816001600160781b030219169083600e0b6001600160781b0316021790555060016001606f1b03602660006101000a8154816001600160701b030219169083600d0b6001600160701b031602179055506001600160671b036026600e6101000a8154816001600160681b030219169083600c0b6001600160681b0316021790555060016001605f1b03602760006101000a8154816001600160601b030219169083600b0b6001600160601b031602179055506001600160571b036027600c6101000a8154816001600160581b030219169083600a0b6001600160581b0316021790555060016001604f1b03602860006101000a8154816001600160501b03021916908360090b6001600160501b031602179055506001600160471b036028600a6101000a8154816001600160481b03021916908360080b6001600160481b0316021790555060016001603f1b03602860136101000a8154816001600160401b03021916908360070b6001600160401b03160217905550667fffffffffffff602960006101000a81548166ffffffffffffff021916908360060b66ffffffffffffff160217905550657fffffffffff602960076101000a81548165ffffffffffff021916908360050b65ffffffffffff160217905550647fffffffff6029600d6101000a81548164ffffffffff021916908360040b64ffffffffff160217905550637fffffff602960126101000a81548163ffffffff021916908360030b63ffffffff160217905550627fffff602960166101000a81548162ffffff021916908360020b62ffffff160217905550617fff602960196101000a81548161ffff021916908360010b61ffff160217905550607f6029601b6101000a81548160ff021916908360000b60ff160217905550348015610b2257600080fd5b506123f680610b326000396000f3fe608060405234801561001057600080fd5b50600436106103d05760003560e01c8063809fdd33116101ff578063c81932551161011a578063e5feca77116100ad578063eaeff4e51161007c578063eaeff4e514610d77578063f136dc0214610d9d578063fb7f3c7914610dc3578063fdcf791b14610dec57600080fd5b8063e5feca7714610cdf578063e6a6f6f814610d05578063e87167c314610d2b578063ea4b667414610d5157600080fd5b8063dd2a0316116100e9578063dd2a031614610c47578063dfbe873b14610c6d578063dfef6beb14610c8e578063e46ea12014610cb957600080fd5b8063c819325514610ba5578063cbff595f14610bcd578063cf65b4d314610bfb578063d6bd32aa14610c2157600080fd5b80639c6f59be11610192578063b936bfb311610161578063b936bfb314610afe578063bb33fe0814610b29578063c3cd16b514610b54578063c4b4298c14610b7a57600080fd5b80639c6f59be14610a53578063ad4b458a14610a79578063b012db6f14610aae578063b0a9408714610ad857600080fd5b80638c48fc22116101ce5780638c48fc22146109b55780639374068f146109e057806395cb3ec614610a06578063971bcc2214610a2d57600080fd5b8063809fdd33146108ff578063821bedfa14610933578063839838381461095957806385bb6ae11461098a57600080fd5b80633b703090116102ef5780635badd405116102825780636d6d9e4b116102515780636d6d9e4b14610854578063720ad6741461087a578063785de9bf146108a55780637ef90ce0146108d057600080fd5b80635badd405146107b75780635bb79860146107dd57806368048346146108085780636c5048531461082e57600080fd5b806353b916f1116102be57806353b916f11461071557806354c23feb1461073b578063564121c71461076657806358d421eb1461079157600080fd5b80633b703090146106675780633fd726721461069257806341d2aa64146106bd57806343710f46146106ef57600080fd5b80631cf887fc116103675780632665fad0116103365780632665fad0146105c25780632c81868d146105ee578063316fcbbd1461061457806338d8e45a1461064157600080fd5b80631cf887fc146105135780631d1131e2146105435780631e07d036146105695780631e4e4bad1461058f57600080fd5b80630cc4681e116103a35780630cc4681e146104775780630d4a7bdb1461049c57806311e867ff146104c757806318a359ec146104ed57600080fd5b806301b49217146103d557806305752e511461040057806305b131011461042657806307f841be14610451575b600080fd5b6103e86103e3366004612356565b610dff565b604051601e9190910b81526020015b60405180910390f35b61041361040e366004612356565b610e22565b604051601c9190910b81526020016103f7565b610439610434366004612356565b610e3f565b6040516001600160b01b0390911681526020016103f7565b61046461045f366004612356565b610e62565b60405160179190910b81526020016103f7565b61048a610485366004612356565b610e7f565b60405160ff90911681526020016103f7565b6104af6104aa366004612356565b610ea3565b6040516001600160e81b0390911681526020016103f7565b6104da6104d5366004612356565b610ec6565b60405160189190910b81526020016103f7565b6105006104fb366004612356565b610ee3565b60405160059190910b81526020016103f7565b610526610521366004612356565b610f0b565b6040516bffffffffffffffffffffffff90911681526020016103f7565b610556610551366004612356565b610f33565b604051600b9190910b81526020016103f7565b61057c610577366004612356565b610f50565b604051600c9190910b81526020016103f7565b6105a261059d366004612356565b610f74565b6040516effffffffffffffffffffffffffffff90911681526020016103f7565b6105d56105d0366004612356565b610fa6565b60405167ffffffffffffffff90911681526020016103f7565b6106016105fc366004612356565b610fd1565b60405160099190910b81526020016103f7565b610627610622366004612356565b610fee565b60405168ffffffffffffffffff90911681526020016103f7565b61065461064f366004612356565b611021565b604051601b9190910b81526020016103f7565b61067a610675366004612356565b61103e565b6040516001600160f01b0390911681526020016103f7565b6106a56106a0366004612356565b611061565b6040516001600160f81b0390911681526020016103f7565b6106d06106cb366004612356565b611084565b6040516dffffffffffffffffffffffffffff90911681526020016103f7565b6107026106fd366004612356565b6110ae565b60405160069190910b81526020016103f7565b610728610723366004612356565b6110cb565b604051601d9190910b81526020016103f7565b61074e610749366004612356565b6110e8565b6040516001600160a81b0390911681526020016103f7565b610779610774366004612356565b61110b565b6040516001600160b81b0390911681526020016103f7565b6107a461079f366004612356565b61112e565b604051600d9190910b81526020016103f7565b6107ca6107c5366004612356565b61114b565b60405160129190910b81526020016103f7565b6107f06107eb366004612356565b611168565b6040516001600160e01b0390911681526020016103f7565b61081b610816366004612356565b61118b565b60405160139190910b81526020016103f7565b61084161083c366004612356565b6111a8565b60405160169190910b81526020016103f7565b610867610862366004612356565b6111c5565b60405160119190910b81526020016103f7565b61088d610888366004612356565b6111e2565b6040516001600160c81b0390911681526020016103f7565b6108b86108b3366004612356565b611205565b6040516001600160c01b0390911681526020016103f7565b6108e36108de366004612356565b611228565b6040516affffffffffffffffffffff90911681526020016103f7565b61091261090d366004612356565b611256565b6040516fffffffffffffffffffffffffffffffff90911681526020016103f7565b610946610941366004612356565b611282565b60405160159190910b81526020016103f7565b61096c610967366004612356565b61129f565b6040516cffffffffffffffffffffffffff90911681526020016103f7565b61099d610998366004612356565b6112cf565b6040516001600160d81b0390911681526020016103f7565b6109c86109c3366004612356565b6112f2565b6040516001600160981b0390911681526020016103f7565b6109f36109ee366004612356565b611315565b60405161ffff90911681526020016103f7565b610a19610a14366004612356565b61133a565b60405162ffffff90911681526020016103f7565b610a40610a3b366004612356565b611360565b604051600a9190910b81526020016103f7565b610a66610a61366004612356565b611384565b60405160039190910b81526020016103f7565b610a8c610a87366004612356565b6113a8565b60405170ffffffffffffffffffffffffffffffffff90911681526020016103f7565b610ac1610abc366004612356565b6113d5565b60405165ffffffffffff90911681526020016103f7565b610aeb610ae6366004612356565b611402565b60405160109190910b81526020016103f7565b610b11610b0c366004612356565b61141f565b6040516001600160901b0390911681526020016103f7565b610b3c610b37366004612356565b611442565b6040516001600160d01b0390911681526020016103f7565b610b67610b62366004612356565b611465565b60405160049190910b81526020016103f7565b610b8d610b88366004612356565b611489565b60405166ffffffffffffff90911681526020016103f7565b610bb8610bb3366004612356565b6114ac565b60405163ffffffff90911681526020016103f7565b610be0610bdb366004612356565b6114d3565b60405169ffffffffffffffffffff90911681526020016103f7565b610c0e610c09366004612356565b6114f9565b60405160019190910b81526020016103f7565b610c34610c2f366004612356565b61151d565b60405160079190910b81526020016103f7565b610c5a610c55366004612356565b611541565b604051600f9190910b81526020016103f7565b610c80610c7b366004612356565b61155e565b6040519081526020016103f7565b610ca1610c9c366004612356565b611576565b6040516001600160a01b0390911681526020016103f7565b610ccc610cc7366004612356565b611599565b60405160089190910b81526020016103f7565b610cf2610ced366004612356565b6115c4565b60405160029190910b81526020016103f7565b610d18610d13366004612356565b6115e8565b60405160149190910b81526020016103f7565b610d3e610d39366004612356565b611605565b604051601a9190910b81526020016103f7565b610d64610d5f366004612356565b611622565b604051600e9190910b81526020016103f7565b610d8a610d85366004612356565b611646565b60405160199190910b81526020016103f7565b610db0610dab366004612356565b611663565b60405160009190910b81526020016103f7565b610dd6610dd1366004612356565b611686565b60405164ffffffffff90911681526020016103f7565b610c80610dfa366004612356565b6116ae565b601654600090610e1c90610e17908490601e0b612385565b6116b9565b92915050565b601854600090610e1c90610e3a908490601c0b612385565b6116f2565b600a54600090610e1c90610e5d9084906001600160b01b03166123ad565b611721565b601d54600090610e1c90610e7a90849060170b612385565b611759565b601454600090610e1c90610e9e908490600160d81b900460ff166123ad565b611788565b600354600090610e1c90610ec19084906001600160e81b03166123ad565b6117b6565b601c54600090610e1c90610ede90849060180b612385565b6117ea565b602954600090610e1c90610f06908490670100000000000000900460050b612385565b611819565b601254600090610e1c90610f2e9084906bffffffffffffffffffffffff166123ad565b611848565b602754600090610e1c90610f4b908490600b0b612385565b611881565b602654600090610e1c90610f6f908490600160701b9004600c0b612385565b6118b0565b601054600090610e1c90610fa1908490600160801b90046effffffffffffffffffffffffffffff166123ad565b6118df565b601354600090610e1c90610fcc908490600160981b900467ffffffffffffffff166123ad565b61191b565b602854600090610e1c90610fe990849060090b612385565b611952565b601354600090610e1c9061101c9084906a0100000000000000000000900468ffffffffffffffffff166123ad565b611981565b601954600090610e1c90611039908490601b0b612385565b6119b7565b600254600090610e1c9061105c9084906001600160f01b03166123ad565b6119e6565b600154600090610e1c9061107f9084906001600160f81b03166123ad565b611a1a565b601154600090610e1c906110a99084906dffffffffffffffffffffffffffff166123ad565b611a4e565b602954600090610e1c906110c690849060060b612385565b611a89565b601754600090610e1c906110e3908490601d0b612385565b611ab8565b600b54600090610e1c906111069084906001600160a81b03166123ad565b611ae7565b600954600090610e1c906111299084906001600160b81b03166123ad565b611b1b565b602654600090610e1c90611146908490600d0b612385565b611b4f565b602254600090610e1c9061116390849060120b612385565b611b7e565b600454600090610e1c906111869084906001600160e01b03166123ad565b611bad565b602154600090610e1c906111a390849060130b612385565b611be1565b601e54600090610e1c906111c090849060160b612385565b611c10565b602354600090610e1c906111dd90849060110b612385565b611c3f565b600754600090610e1c906112009084906001600160c81b03166123ad565b611c6e565b600854600090610e1c906112239084906001600160c01b03166123ad565b611ca2565b601254600090610e1c90611251908490600160601b90046affffffffffffffffffffff166123ad565b611cd6565b601054600090610e1c9061127d9084906fffffffffffffffffffffffffffffffff166123ad565b611d0e565b601f54600090610e1c9061129a90849060150b612385565b611d4b565b601154600090610e1c906112ca908490600160701b90046cffffffffffffffffffffffffff166123ad565b611d7a565b600554600090610e1c906112ed9084906001600160d81b03166123ad565b611db4565b600d54600090610e1c906113109084906001600160981b03166123ad565b611de8565b601454600090610e1c90611335908490600160c81b900461ffff166123ad565b611e1c565b601454600090610e1c9061135b908490600160b01b900462ffffff166123ad565b611e4b565b602754600090610e1c9061137f908490600160601b9004600a0b612385565b611e7b565b602954600090610e1c906113a3908490600160901b900460030b612385565b611eaa565b600f54600090610e1c906113d090849070ffffffffffffffffffffffffffffffffff166123ad565b611ed9565b601454600090610e1c906113fd908490670100000000000000900465ffffffffffff166123ad565b611f17565b602454600090610e1c9061141a90849060100b612385565b611f4a565b600e54600090610e1c9061143d9084906001600160901b03166123ad565b611f79565b600654600090610e1c906114609084906001600160d01b03166123ad565b611fad565b602954600090610e1c90611484908490600160681b900460040b612385565b611fe1565b601454600090610e1c906114a790849066ffffffffffffff166123ad565b612010565b601454600090610e1c906114ce908490600160901b900463ffffffff166123ad565b612044565b601354600090610e1c906114f490849069ffffffffffffffffffff166123ad565b612075565b602954600090610e1c90611518908490600160c81b900460010b612385565b6120ac565b602854600090610e1c9061153c908490600160981b900460070b612385565b6120db565b602554600090610e1c90611559908490600f0b612385565b61210c565b6000610e1c8260155461157191906123ad565b61213b565b600c54600090610e1c906115949084906001600160a01b03166123ad565b612181565b602854600090610e1c906115bf9084906a0100000000000000000000900460080b612385565b6121b5565b602954600090610e1c906115e3908490600160b01b900460020b612385565b6121e4565b602054600090610e1c9061160090849060140b612385565b612213565b601a8054600091610e1c9161161d918591900b612385565b612242565b602554600090610e1c90611641908490600160801b9004600e0b612385565b612271565b601b54600090610e1c9061165e90849060190b612385565b6122a0565b602954600090610e1c90611681908490600160d81b9004840b612385565b6122cf565b601454600090610e1c906116a9908490600160681b900464ffffffffff166123ad565b6122fe565b6000610e1c82612330565b80601e81900b81146116ed5760405163327269a760e01b815260f86004820152602481018390526044015b60405180910390fd5b919050565b80601c81900b81146116ed5760405163327269a760e01b815260e86004820152602481018390526044016116e4565b60006001600160b01b03821115611755576040516306dfcc6560e41b815260b06004820152602481018390526044016116e4565b5090565b80601781900b81146116ed5760405163327269a760e01b815260c06004820152602481018390526044016116e4565b600060ff821115611755576040516306dfcc6560e41b815260086004820152602481018390526044016116e4565b60006001600160e81b03821115611755576040516306dfcc6560e41b815260e86004820152602481018390526044016116e4565b80601881900b81146116ed5760405163327269a760e01b815260c86004820152602481018390526044016116e4565b80600581900b81146116ed5760405163327269a760e01b815260306004820152602481018390526044016116e4565b60006bffffffffffffffffffffffff821115611755576040516306dfcc6560e41b815260606004820152602481018390526044016116e4565b80600b81900b81146116ed5760405163327269a760e01b815260606004820152602481018390526044016116e4565b80600c81900b81146116ed5760405163327269a760e01b815260686004820152602481018390526044016116e4565b60006effffffffffffffffffffffffffffff821115611755576040516306dfcc6560e41b815260786004820152602481018390526044016116e4565b600067ffffffffffffffff82111561175557604080516306dfcc6560e41b81526004810191909152602481018390526044016116e4565b80600981900b81146116ed5760405163327269a760e01b815260506004820152602481018390526044016116e4565b600068ffffffffffffffffff821115611755576040516306dfcc6560e41b815260486004820152602481018390526044016116e4565b80601b81900b81146116ed5760405163327269a760e01b815260e06004820152602481018390526044016116e4565b60006001600160f01b03821115611755576040516306dfcc6560e41b815260f06004820152602481018390526044016116e4565b60006001600160f81b03821115611755576040516306dfcc6560e41b815260f86004820152602481018390526044016116e4565b60006dffffffffffffffffffffffffffff821115611755576040516306dfcc6560e41b815260706004820152602481018390526044016116e4565b80600681900b81146116ed5760405163327269a760e01b815260386004820152602481018390526044016116e4565b80601d81900b81146116ed5760405163327269a760e01b815260f06004820152602481018390526044016116e4565b60006001600160a81b03821115611755576040516306dfcc6560e41b815260a86004820152602481018390526044016116e4565b60006001600160b81b03821115611755576040516306dfcc6560e41b815260b86004820152602481018390526044016116e4565b80600d81900b81146116ed5760405163327269a760e01b815260706004820152602481018390526044016116e4565b80601281900b81146116ed5760405163327269a760e01b815260986004820152602481018390526044016116e4565b60006001600160e01b03821115611755576040516306dfcc6560e41b815260e06004820152602481018390526044016116e4565b80601381900b81146116ed5760405163327269a760e01b815260a06004820152602481018390526044016116e4565b80601681900b81146116ed5760405163327269a760e01b815260b86004820152602481018390526044016116e4565b80601181900b81146116ed5760405163327269a760e01b815260906004820152602481018390526044016116e4565b60006001600160c81b03821115611755576040516306dfcc6560e41b815260c86004820152602481018390526044016116e4565b60006001600160c01b03821115611755576040516306dfcc6560e41b815260c06004820152602481018390526044016116e4565b60006affffffffffffffffffffff821115611755576040516306dfcc6560e41b815260586004820152602481018390526044016116e4565b60006fffffffffffffffffffffffffffffffff821115611755576040516306dfcc6560e41b815260806004820152602481018390526044016116e4565b80601581900b81146116ed5760405163327269a760e01b815260b06004820152602481018390526044016116e4565b60006cffffffffffffffffffffffffff821115611755576040516306dfcc6560e41b815260686004820152602481018390526044016116e4565b60006001600160d81b03821115611755576040516306dfcc6560e41b815260d86004820152602481018390526044016116e4565b60006001600160981b03821115611755576040516306dfcc6560e41b815260986004820152602481018390526044016116e4565b600061ffff821115611755576040516306dfcc6560e41b815260106004820152602481018390526044016116e4565b600062ffffff821115611755576040516306dfcc6560e41b815260186004820152602481018390526044016116e4565b80600a81900b81146116ed5760405163327269a760e01b815260586004820152602481018390526044016116e4565b80600381900b81146116ed5760405163327269a760e01b815260206004820152602481018390526044016116e4565b600070ffffffffffffffffffffffffffffffffff821115611755576040516306dfcc6560e41b815260886004820152602481018390526044016116e4565b600065ffffffffffff821115611755576040516306dfcc6560e41b815260306004820152602481018390526044016116e4565b80601081900b81146116ed5760405163327269a760e01b815260886004820152602481018390526044016116e4565b60006001600160901b03821115611755576040516306dfcc6560e41b815260906004820152602481018390526044016116e4565b60006001600160d01b03821115611755576040516306dfcc6560e41b815260d06004820152602481018390526044016116e4565b80600481900b81146116ed5760405163327269a760e01b815260286004820152602481018390526044016116e4565b600066ffffffffffffff821115611755576040516306dfcc6560e41b815260386004820152602481018390526044016116e4565b600063ffffffff821115611755576040516306dfcc6560e41b815260206004820152602481018390526044016116e4565b600069ffffffffffffffffffff821115611755576040516306dfcc6560e41b815260506004820152602481018390526044016116e4565b80600181900b81146116ed5760405163327269a760e01b815260106004820152602481018390526044016116e4565b80600781900b81146116ed576040805163327269a760e01b81526004810191909152602481018390526044016116e4565b80600f81900b81146116ed5760405163327269a760e01b815260806004820152602481018390526044016116e4565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8211156117555760405163123baf0360e11b8152600481018390526024016116e4565b60006001600160a01b03821115611755576040516306dfcc6560e41b815260a06004820152602481018390526044016116e4565b80600881900b81146116ed5760405163327269a760e01b815260486004820152602481018390526044016116e4565b80600281900b81146116ed5760405163327269a760e01b815260186004820152602481018390526044016116e4565b80601481900b81146116ed5760405163327269a760e01b815260a86004820152602481018390526044016116e4565b80601a81900b81146116ed5760405163327269a760e01b815260d86004820152602481018390526044016116e4565b80600e81900b81146116ed5760405163327269a760e01b815260786004820152602481018390526044016116e4565b80601981900b81146116ed5760405163327269a760e01b815260d06004820152602481018390526044016116e4565b80600081900b81146116ed5760405163327269a760e01b815260086004820152602481018390526044016116e4565b600064ffffffffff821115611755576040516306dfcc6560e41b815260286004820152602481018390526044016116e4565b60008082121561175557604051635467221960e11b8152600481018390526024016116e4565b60006020828403121561236857600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b80820182811260008312801582168215821617156123a5576123a561236f565b505092915050565b80820180821115610e1c57610e1c61236f56fea2646970667358221220e55335ef3b650dfc79a32929305cb6ce0723d9e4877832fc1c1f431c4c9a7fab64736f6c63430008140033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106103d05760003560e01c8063809fdd33116101ff578063c81932551161011a578063e5feca77116100ad578063eaeff4e51161007c578063eaeff4e514610d77578063f136dc0214610d9d578063fb7f3c7914610dc3578063fdcf791b14610dec57600080fd5b8063e5feca7714610cdf578063e6a6f6f814610d05578063e87167c314610d2b578063ea4b667414610d5157600080fd5b8063dd2a0316116100e9578063dd2a031614610c47578063dfbe873b14610c6d578063dfef6beb14610c8e578063e46ea12014610cb957600080fd5b8063c819325514610ba5578063cbff595f14610bcd578063cf65b4d314610bfb578063d6bd32aa14610c2157600080fd5b80639c6f59be11610192578063b936bfb311610161578063b936bfb314610afe578063bb33fe0814610b29578063c3cd16b514610b54578063c4b4298c14610b7a57600080fd5b80639c6f59be14610a53578063ad4b458a14610a79578063b012db6f14610aae578063b0a9408714610ad857600080fd5b80638c48fc22116101ce5780638c48fc22146109b55780639374068f146109e057806395cb3ec614610a06578063971bcc2214610a2d57600080fd5b8063809fdd33146108ff578063821bedfa14610933578063839838381461095957806385bb6ae11461098a57600080fd5b80633b703090116102ef5780635badd405116102825780636d6d9e4b116102515780636d6d9e4b14610854578063720ad6741461087a578063785de9bf146108a55780637ef90ce0146108d057600080fd5b80635badd405146107b75780635bb79860146107dd57806368048346146108085780636c5048531461082e57600080fd5b806353b916f1116102be57806353b916f11461071557806354c23feb1461073b578063564121c71461076657806358d421eb1461079157600080fd5b80633b703090146106675780633fd726721461069257806341d2aa64146106bd57806343710f46146106ef57600080fd5b80631cf887fc116103675780632665fad0116103365780632665fad0146105c25780632c81868d146105ee578063316fcbbd1461061457806338d8e45a1461064157600080fd5b80631cf887fc146105135780631d1131e2146105435780631e07d036146105695780631e4e4bad1461058f57600080fd5b80630cc4681e116103a35780630cc4681e146104775780630d4a7bdb1461049c57806311e867ff146104c757806318a359ec146104ed57600080fd5b806301b49217146103d557806305752e511461040057806305b131011461042657806307f841be14610451575b600080fd5b6103e86103e3366004612356565b610dff565b604051601e9190910b81526020015b60405180910390f35b61041361040e366004612356565b610e22565b604051601c9190910b81526020016103f7565b610439610434366004612356565b610e3f565b6040516001600160b01b0390911681526020016103f7565b61046461045f366004612356565b610e62565b60405160179190910b81526020016103f7565b61048a610485366004612356565b610e7f565b60405160ff90911681526020016103f7565b6104af6104aa366004612356565b610ea3565b6040516001600160e81b0390911681526020016103f7565b6104da6104d5366004612356565b610ec6565b60405160189190910b81526020016103f7565b6105006104fb366004612356565b610ee3565b60405160059190910b81526020016103f7565b610526610521366004612356565b610f0b565b6040516bffffffffffffffffffffffff90911681526020016103f7565b610556610551366004612356565b610f33565b604051600b9190910b81526020016103f7565b61057c610577366004612356565b610f50565b604051600c9190910b81526020016103f7565b6105a261059d366004612356565b610f74565b6040516effffffffffffffffffffffffffffff90911681526020016103f7565b6105d56105d0366004612356565b610fa6565b60405167ffffffffffffffff90911681526020016103f7565b6106016105fc366004612356565b610fd1565b60405160099190910b81526020016103f7565b610627610622366004612356565b610fee565b60405168ffffffffffffffffff90911681526020016103f7565b61065461064f366004612356565b611021565b604051601b9190910b81526020016103f7565b61067a610675366004612356565b61103e565b6040516001600160f01b0390911681526020016103f7565b6106a56106a0366004612356565b611061565b6040516001600160f81b0390911681526020016103f7565b6106d06106cb366004612356565b611084565b6040516dffffffffffffffffffffffffffff90911681526020016103f7565b6107026106fd366004612356565b6110ae565b60405160069190910b81526020016103f7565b610728610723366004612356565b6110cb565b604051601d9190910b81526020016103f7565b61074e610749366004612356565b6110e8565b6040516001600160a81b0390911681526020016103f7565b610779610774366004612356565b61110b565b6040516001600160b81b0390911681526020016103f7565b6107a461079f366004612356565b61112e565b604051600d9190910b81526020016103f7565b6107ca6107c5366004612356565b61114b565b60405160129190910b81526020016103f7565b6107f06107eb366004612356565b611168565b6040516001600160e01b0390911681526020016103f7565b61081b610816366004612356565b61118b565b60405160139190910b81526020016103f7565b61084161083c366004612356565b6111a8565b60405160169190910b81526020016103f7565b610867610862366004612356565b6111c5565b60405160119190910b81526020016103f7565b61088d610888366004612356565b6111e2565b6040516001600160c81b0390911681526020016103f7565b6108b86108b3366004612356565b611205565b6040516001600160c01b0390911681526020016103f7565b6108e36108de366004612356565b611228565b6040516affffffffffffffffffffff90911681526020016103f7565b61091261090d366004612356565b611256565b6040516fffffffffffffffffffffffffffffffff90911681526020016103f7565b610946610941366004612356565b611282565b60405160159190910b81526020016103f7565b61096c610967366004612356565b61129f565b6040516cffffffffffffffffffffffffff90911681526020016103f7565b61099d610998366004612356565b6112cf565b6040516001600160d81b0390911681526020016103f7565b6109c86109c3366004612356565b6112f2565b6040516001600160981b0390911681526020016103f7565b6109f36109ee366004612356565b611315565b60405161ffff90911681526020016103f7565b610a19610a14366004612356565b61133a565b60405162ffffff90911681526020016103f7565b610a40610a3b366004612356565b611360565b604051600a9190910b81526020016103f7565b610a66610a61366004612356565b611384565b60405160039190910b81526020016103f7565b610a8c610a87366004612356565b6113a8565b60405170ffffffffffffffffffffffffffffffffff90911681526020016103f7565b610ac1610abc366004612356565b6113d5565b60405165ffffffffffff90911681526020016103f7565b610aeb610ae6366004612356565b611402565b60405160109190910b81526020016103f7565b610b11610b0c366004612356565b61141f565b6040516001600160901b0390911681526020016103f7565b610b3c610b37366004612356565b611442565b6040516001600160d01b0390911681526020016103f7565b610b67610b62366004612356565b611465565b60405160049190910b81526020016103f7565b610b8d610b88366004612356565b611489565b60405166ffffffffffffff90911681526020016103f7565b610bb8610bb3366004612356565b6114ac565b60405163ffffffff90911681526020016103f7565b610be0610bdb366004612356565b6114d3565b60405169ffffffffffffffffffff90911681526020016103f7565b610c0e610c09366004612356565b6114f9565b60405160019190910b81526020016103f7565b610c34610c2f366004612356565b61151d565b60405160079190910b81526020016103f7565b610c5a610c55366004612356565b611541565b604051600f9190910b81526020016103f7565b610c80610c7b366004612356565b61155e565b6040519081526020016103f7565b610ca1610c9c366004612356565b611576565b6040516001600160a01b0390911681526020016103f7565b610ccc610cc7366004612356565b611599565b60405160089190910b81526020016103f7565b610cf2610ced366004612356565b6115c4565b60405160029190910b81526020016103f7565b610d18610d13366004612356565b6115e8565b60405160149190910b81526020016103f7565b610d3e610d39366004612356565b611605565b604051601a9190910b81526020016103f7565b610d64610d5f366004612356565b611622565b604051600e9190910b81526020016103f7565b610d8a610d85366004612356565b611646565b60405160199190910b81526020016103f7565b610db0610dab366004612356565b611663565b60405160009190910b81526020016103f7565b610dd6610dd1366004612356565b611686565b60405164ffffffffff90911681526020016103f7565b610c80610dfa366004612356565b6116ae565b601654600090610e1c90610e17908490601e0b612385565b6116b9565b92915050565b601854600090610e1c90610e3a908490601c0b612385565b6116f2565b600a54600090610e1c90610e5d9084906001600160b01b03166123ad565b611721565b601d54600090610e1c90610e7a90849060170b612385565b611759565b601454600090610e1c90610e9e908490600160d81b900460ff166123ad565b611788565b600354600090610e1c90610ec19084906001600160e81b03166123ad565b6117b6565b601c54600090610e1c90610ede90849060180b612385565b6117ea565b602954600090610e1c90610f06908490670100000000000000900460050b612385565b611819565b601254600090610e1c90610f2e9084906bffffffffffffffffffffffff166123ad565b611848565b602754600090610e1c90610f4b908490600b0b612385565b611881565b602654600090610e1c90610f6f908490600160701b9004600c0b612385565b6118b0565b601054600090610e1c90610fa1908490600160801b90046effffffffffffffffffffffffffffff166123ad565b6118df565b601354600090610e1c90610fcc908490600160981b900467ffffffffffffffff166123ad565b61191b565b602854600090610e1c90610fe990849060090b612385565b611952565b601354600090610e1c9061101c9084906a0100000000000000000000900468ffffffffffffffffff166123ad565b611981565b601954600090610e1c90611039908490601b0b612385565b6119b7565b600254600090610e1c9061105c9084906001600160f01b03166123ad565b6119e6565b600154600090610e1c9061107f9084906001600160f81b03166123ad565b611a1a565b601154600090610e1c906110a99084906dffffffffffffffffffffffffffff166123ad565b611a4e565b602954600090610e1c906110c690849060060b612385565b611a89565b601754600090610e1c906110e3908490601d0b612385565b611ab8565b600b54600090610e1c906111069084906001600160a81b03166123ad565b611ae7565b600954600090610e1c906111299084906001600160b81b03166123ad565b611b1b565b602654600090610e1c90611146908490600d0b612385565b611b4f565b602254600090610e1c9061116390849060120b612385565b611b7e565b600454600090610e1c906111869084906001600160e01b03166123ad565b611bad565b602154600090610e1c906111a390849060130b612385565b611be1565b601e54600090610e1c906111c090849060160b612385565b611c10565b602354600090610e1c906111dd90849060110b612385565b611c3f565b600754600090610e1c906112009084906001600160c81b03166123ad565b611c6e565b600854600090610e1c906112239084906001600160c01b03166123ad565b611ca2565b601254600090610e1c90611251908490600160601b90046affffffffffffffffffffff166123ad565b611cd6565b601054600090610e1c9061127d9084906fffffffffffffffffffffffffffffffff166123ad565b611d0e565b601f54600090610e1c9061129a90849060150b612385565b611d4b565b601154600090610e1c906112ca908490600160701b90046cffffffffffffffffffffffffff166123ad565b611d7a565b600554600090610e1c906112ed9084906001600160d81b03166123ad565b611db4565b600d54600090610e1c906113109084906001600160981b03166123ad565b611de8565b601454600090610e1c90611335908490600160c81b900461ffff166123ad565b611e1c565b601454600090610e1c9061135b908490600160b01b900462ffffff166123ad565b611e4b565b602754600090610e1c9061137f908490600160601b9004600a0b612385565b611e7b565b602954600090610e1c906113a3908490600160901b900460030b612385565b611eaa565b600f54600090610e1c906113d090849070ffffffffffffffffffffffffffffffffff166123ad565b611ed9565b601454600090610e1c906113fd908490670100000000000000900465ffffffffffff166123ad565b611f17565b602454600090610e1c9061141a90849060100b612385565b611f4a565b600e54600090610e1c9061143d9084906001600160901b03166123ad565b611f79565b600654600090610e1c906114609084906001600160d01b03166123ad565b611fad565b602954600090610e1c90611484908490600160681b900460040b612385565b611fe1565b601454600090610e1c906114a790849066ffffffffffffff166123ad565b612010565b601454600090610e1c906114ce908490600160901b900463ffffffff166123ad565b612044565b601354600090610e1c906114f490849069ffffffffffffffffffff166123ad565b612075565b602954600090610e1c90611518908490600160c81b900460010b612385565b6120ac565b602854600090610e1c9061153c908490600160981b900460070b612385565b6120db565b602554600090610e1c90611559908490600f0b612385565b61210c565b6000610e1c8260155461157191906123ad565b61213b565b600c54600090610e1c906115949084906001600160a01b03166123ad565b612181565b602854600090610e1c906115bf9084906a0100000000000000000000900460080b612385565b6121b5565b602954600090610e1c906115e3908490600160b01b900460020b612385565b6121e4565b602054600090610e1c9061160090849060140b612385565b612213565b601a8054600091610e1c9161161d918591900b612385565b612242565b602554600090610e1c90611641908490600160801b9004600e0b612385565b612271565b601b54600090610e1c9061165e90849060190b612385565b6122a0565b602954600090610e1c90611681908490600160d81b9004840b612385565b6122cf565b601454600090610e1c906116a9908490600160681b900464ffffffffff166123ad565b6122fe565b6000610e1c82612330565b80601e81900b81146116ed5760405163327269a760e01b815260f86004820152602481018390526044015b60405180910390fd5b919050565b80601c81900b81146116ed5760405163327269a760e01b815260e86004820152602481018390526044016116e4565b60006001600160b01b03821115611755576040516306dfcc6560e41b815260b06004820152602481018390526044016116e4565b5090565b80601781900b81146116ed5760405163327269a760e01b815260c06004820152602481018390526044016116e4565b600060ff821115611755576040516306dfcc6560e41b815260086004820152602481018390526044016116e4565b60006001600160e81b03821115611755576040516306dfcc6560e41b815260e86004820152602481018390526044016116e4565b80601881900b81146116ed5760405163327269a760e01b815260c86004820152602481018390526044016116e4565b80600581900b81146116ed5760405163327269a760e01b815260306004820152602481018390526044016116e4565b60006bffffffffffffffffffffffff821115611755576040516306dfcc6560e41b815260606004820152602481018390526044016116e4565b80600b81900b81146116ed5760405163327269a760e01b815260606004820152602481018390526044016116e4565b80600c81900b81146116ed5760405163327269a760e01b815260686004820152602481018390526044016116e4565b60006effffffffffffffffffffffffffffff821115611755576040516306dfcc6560e41b815260786004820152602481018390526044016116e4565b600067ffffffffffffffff82111561175557604080516306dfcc6560e41b81526004810191909152602481018390526044016116e4565b80600981900b81146116ed5760405163327269a760e01b815260506004820152602481018390526044016116e4565b600068ffffffffffffffffff821115611755576040516306dfcc6560e41b815260486004820152602481018390526044016116e4565b80601b81900b81146116ed5760405163327269a760e01b815260e06004820152602481018390526044016116e4565b60006001600160f01b03821115611755576040516306dfcc6560e41b815260f06004820152602481018390526044016116e4565b60006001600160f81b03821115611755576040516306dfcc6560e41b815260f86004820152602481018390526044016116e4565b60006dffffffffffffffffffffffffffff821115611755576040516306dfcc6560e41b815260706004820152602481018390526044016116e4565b80600681900b81146116ed5760405163327269a760e01b815260386004820152602481018390526044016116e4565b80601d81900b81146116ed5760405163327269a760e01b815260f06004820152602481018390526044016116e4565b60006001600160a81b03821115611755576040516306dfcc6560e41b815260a86004820152602481018390526044016116e4565b60006001600160b81b03821115611755576040516306dfcc6560e41b815260b86004820152602481018390526044016116e4565b80600d81900b81146116ed5760405163327269a760e01b815260706004820152602481018390526044016116e4565b80601281900b81146116ed5760405163327269a760e01b815260986004820152602481018390526044016116e4565b60006001600160e01b03821115611755576040516306dfcc6560e41b815260e06004820152602481018390526044016116e4565b80601381900b81146116ed5760405163327269a760e01b815260a06004820152602481018390526044016116e4565b80601681900b81146116ed5760405163327269a760e01b815260b86004820152602481018390526044016116e4565b80601181900b81146116ed5760405163327269a760e01b815260906004820152602481018390526044016116e4565b60006001600160c81b03821115611755576040516306dfcc6560e41b815260c86004820152602481018390526044016116e4565b60006001600160c01b03821115611755576040516306dfcc6560e41b815260c06004820152602481018390526044016116e4565b60006affffffffffffffffffffff821115611755576040516306dfcc6560e41b815260586004820152602481018390526044016116e4565b60006fffffffffffffffffffffffffffffffff821115611755576040516306dfcc6560e41b815260806004820152602481018390526044016116e4565b80601581900b81146116ed5760405163327269a760e01b815260b06004820152602481018390526044016116e4565b60006cffffffffffffffffffffffffff821115611755576040516306dfcc6560e41b815260686004820152602481018390526044016116e4565b60006001600160d81b03821115611755576040516306dfcc6560e41b815260d86004820152602481018390526044016116e4565b60006001600160981b03821115611755576040516306dfcc6560e41b815260986004820152602481018390526044016116e4565b600061ffff821115611755576040516306dfcc6560e41b815260106004820152602481018390526044016116e4565b600062ffffff821115611755576040516306dfcc6560e41b815260186004820152602481018390526044016116e4565b80600a81900b81146116ed5760405163327269a760e01b815260586004820152602481018390526044016116e4565b80600381900b81146116ed5760405163327269a760e01b815260206004820152602481018390526044016116e4565b600070ffffffffffffffffffffffffffffffffff821115611755576040516306dfcc6560e41b815260886004820152602481018390526044016116e4565b600065ffffffffffff821115611755576040516306dfcc6560e41b815260306004820152602481018390526044016116e4565b80601081900b81146116ed5760405163327269a760e01b815260886004820152602481018390526044016116e4565b60006001600160901b03821115611755576040516306dfcc6560e41b815260906004820152602481018390526044016116e4565b60006001600160d01b03821115611755576040516306dfcc6560e41b815260d06004820152602481018390526044016116e4565b80600481900b81146116ed5760405163327269a760e01b815260286004820152602481018390526044016116e4565b600066ffffffffffffff821115611755576040516306dfcc6560e41b815260386004820152602481018390526044016116e4565b600063ffffffff821115611755576040516306dfcc6560e41b815260206004820152602481018390526044016116e4565b600069ffffffffffffffffffff821115611755576040516306dfcc6560e41b815260506004820152602481018390526044016116e4565b80600181900b81146116ed5760405163327269a760e01b815260106004820152602481018390526044016116e4565b80600781900b81146116ed576040805163327269a760e01b81526004810191909152602481018390526044016116e4565b80600f81900b81146116ed5760405163327269a760e01b815260806004820152602481018390526044016116e4565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8211156117555760405163123baf0360e11b8152600481018390526024016116e4565b60006001600160a01b03821115611755576040516306dfcc6560e41b815260a06004820152602481018390526044016116e4565b80600881900b81146116ed5760405163327269a760e01b815260486004820152602481018390526044016116e4565b80600281900b81146116ed5760405163327269a760e01b815260186004820152602481018390526044016116e4565b80601481900b81146116ed5760405163327269a760e01b815260a86004820152602481018390526044016116e4565b80601a81900b81146116ed5760405163327269a760e01b815260d86004820152602481018390526044016116e4565b80600e81900b81146116ed5760405163327269a760e01b815260786004820152602481018390526044016116e4565b80601981900b81146116ed5760405163327269a760e01b815260d06004820152602481018390526044016116e4565b80600081900b81146116ed5760405163327269a760e01b815260086004820152602481018390526044016116e4565b600064ffffffffff821115611755576040516306dfcc6560e41b815260286004820152602481018390526044016116e4565b60008082121561175557604051635467221960e11b8152600481018390526024016116e4565b60006020828403121561236857600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b80820182811260008312801582168215821617156123a5576123a561236f565b505092915050565b80820180821115610e1c57610e1c61236f56fea2646970667358221220e55335ef3b650dfc79a32929305cb6ce0723d9e4877832fc1c1f431c4c9a7fab64736f6c63430008140033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/artifacts/contracts/solidity/signature-example/ReceiverPays.sol/ReceiverPays.dbg.json b/artifacts/contracts/solidity/signature-example/ReceiverPays.sol/ReceiverPays.dbg.json new file mode 100644 index 000000000..93fb55481 --- /dev/null +++ b/artifacts/contracts/solidity/signature-example/ReceiverPays.sol/ReceiverPays.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../../../../build-info/3f95829b0790d58068477b0d5ee56231.json" +} diff --git a/artifacts/contracts/solidity/signature-example/ReceiverPays.sol/ReceiverPays.json b/artifacts/contracts/solidity/signature-example/ReceiverPays.sol/ReceiverPays.json new file mode 100644 index 000000000..d79509e88 --- /dev/null +++ b/artifacts/contracts/solidity/signature-example/ReceiverPays.sol/ReceiverPays.json @@ -0,0 +1,46 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ReceiverPays", + "sourceName": "contracts/solidity/signature-example/ReceiverPays.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "payable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "claimPayment", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "shutdown", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x6080604052600080546001600160a01b03191633179055610412806100256000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063a90ae8871461003b578063fc0e74d114610050575b600080fd5b61004e610049366004610318565b610058565b005b61004e6101f7565b60008281526001602052604090205460ff16156100ac5760405162461bcd60e51b815260206004820152600d60248201526c696e76616c6964206e6f6e636560981b60448201526064015b60405180910390fd5b6000828152600160208181526040808420805460ff191690931790925581516bffffffffffffffffffffffff1933606090811b821683850152603483018990526054830188905230901b166074820152825180820360680181526088820184528051908301207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060a883015260c4808301919091528351808303909101815260e4909101909252815191012090546001600160a01b031661016d8284610254565b6001600160a01b0316146101c35760405162461bcd60e51b815260206004820152601160248201527f696e76616c6964207369676e617475726500000000000000000000000000000060448201526064016100a3565b604051339085156108fc029086906000818181858888f193505050501580156101f0573d6000803e3d6000fd5b5050505050565b6000546001600160a01b031633146102515760405162461bcd60e51b815260206004820152601760248201527f6f6e6c79206f776e65722063616e2073687574646f776e00000000000000000060448201526064016100a3565b33ff5b600080600080610263856102d3565b6040805160008152602081018083528b905260ff8516918101919091526060810183905260808101829052929550909350915060019060a0016020604051602081039080840390855afa1580156102be573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b600080600083516041146102e657600080fd5b5050506020810151604082015160609092015160001a92909190565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561032d57600080fd5b8335925060208401359150604084013567ffffffffffffffff8082111561035357600080fd5b818601915086601f83011261036757600080fd5b81358181111561037957610379610302565b604051601f8201601f19908116603f011681019083821181831017156103a1576103a1610302565b816040528281528960208487010111156103ba57600080fd5b826020860160208301376000602084830101528095505050505050925092509256fea2646970667358221220c95490f25189c3998919849cd1b7a5d38aa37639a95a679606e44bfd684c25c064736f6c63430008140033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063a90ae8871461003b578063fc0e74d114610050575b600080fd5b61004e610049366004610318565b610058565b005b61004e6101f7565b60008281526001602052604090205460ff16156100ac5760405162461bcd60e51b815260206004820152600d60248201526c696e76616c6964206e6f6e636560981b60448201526064015b60405180910390fd5b6000828152600160208181526040808420805460ff191690931790925581516bffffffffffffffffffffffff1933606090811b821683850152603483018990526054830188905230901b166074820152825180820360680181526088820184528051908301207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060a883015260c4808301919091528351808303909101815260e4909101909252815191012090546001600160a01b031661016d8284610254565b6001600160a01b0316146101c35760405162461bcd60e51b815260206004820152601160248201527f696e76616c6964207369676e617475726500000000000000000000000000000060448201526064016100a3565b604051339085156108fc029086906000818181858888f193505050501580156101f0573d6000803e3d6000fd5b5050505050565b6000546001600160a01b031633146102515760405162461bcd60e51b815260206004820152601760248201527f6f6e6c79206f776e65722063616e2073687574646f776e00000000000000000060448201526064016100a3565b33ff5b600080600080610263856102d3565b6040805160008152602081018083528b905260ff8516918101919091526060810183905260808101829052929550909350915060019060a0016020604051602081039080840390855afa1580156102be573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b600080600083516041146102e657600080fd5b5050506020810151604082015160609092015160001a92909190565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561032d57600080fd5b8335925060208401359150604084013567ffffffffffffffff8082111561035357600080fd5b818601915086601f83011261036757600080fd5b81358181111561037957610379610302565b604051601f8201601f19908116603f011681019083821181831017156103a1576103a1610302565b816040528281528960208487010111156103ba57600080fd5b826020860160208301376000602084830101528095505050505050925092509256fea2646970667358221220c95490f25189c3998919849cd1b7a5d38aa37639a95a679606e44bfd684c25c064736f6c63430008140033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/contracts/solidity/oz/safeCast/SafeCast.sol b/contracts/solidity/oz/safeCast/SafeCast.sol new file mode 100644 index 000000000..67cf4f7bb --- /dev/null +++ b/contracts/solidity/oz/safeCast/SafeCast.sol @@ -0,0 +1,328 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.20; + +import "@openzeppelin/contracts/utils/math/SafeCast.sol"; + +contract SafeCastTest { + uint256 maxUint256 = type(uint256).max; + uint248 maxUint248 = type(uint248).max; + uint240 maxUint240 = type(uint240).max; + uint232 maxUint232 = type(uint232).max; + uint224 maxUint224 = type(uint224).max; + uint216 maxUint216 = type(uint216).max; + uint208 maxUint208 = type(uint208).max; + uint200 maxUint200 = type(uint200).max; + uint192 maxUint192 = type(uint192).max; + uint184 maxUint184 = type(uint184).max; + uint176 maxUint176 = type(uint176).max; + uint168 maxUint168 = type(uint168).max; + uint160 maxUint160 = type(uint160).max; + uint152 maxUint152 = type(uint152).max; + uint144 maxUint144 = type(uint144).max; + uint136 maxUint136 = type(uint136).max; + uint128 maxUint128 = type(uint128).max; + uint120 maxUint120 = type(uint120).max; + uint112 maxUint112 = type(uint112).max; + uint104 maxUint104 = type(uint104).max; + uint96 maxUint96 = type(uint96).max; + uint88 maxUint88 = type(uint88).max; + uint80 maxUint80 = type(uint80).max; + uint72 maxUint72 = type(uint72).max; + uint64 maxUint64 = type(uint64).max; + uint56 maxUint56 = type(uint56).max; + uint48 maxUint48 = type(uint48).max; + uint40 maxUint40 = type(uint40).max; + uint32 maxUint32 = type(uint32).max; + uint24 maxUint24 = type(uint24).max; + uint16 maxUint16 = type(uint16).max; + uint8 maxUint8 = type(uint8).max; + + int256 maxInt256 = type(int256).max; + int248 maxInt248 = type(int248).max; + int240 maxInt240 = type(int240).max; + int232 maxInt232 = type(int232).max; + int224 maxInt224 = type(int224).max; + int216 maxInt216 = type(int216).max; + int208 maxInt208 = type(int208).max; + int200 maxInt200 = type(int200).max; + int192 maxInt192 = type(int192).max; + int184 maxInt184 = type(int184).max; + int176 maxInt176 = type(int176).max; + int168 maxInt168 = type(int168).max; + int160 maxInt160 = type(int160).max; + int152 maxInt152 = type(int152).max; + int144 maxInt144 = type(int144).max; + int136 maxInt136 = type(int136).max; + int128 maxInt128 = type(int128).max; + int120 maxInt120 = type(int120).max; + int112 maxInt112 = type(int112).max; + int104 maxInt104 = type(int104).max; + int96 maxInt96 = type(int96).max; + int88 maxInt88 = type(int88).max; + int80 maxInt80 = type(int80).max; + int72 maxInt72 = type(int72).max; + int64 maxInt64 = type(int64).max; + int56 maxInt56 = type(int56).max; + int48 maxInt48 = type(int48).max; + int40 maxInt40 = type(int40).max; + int32 maxInt32 = type(int32).max; + int24 maxInt24 = type(int24).max; + int16 maxInt16 = type(int16).max; + int8 maxInt8 = type(int8).max; + + function toUint256(int256 number) public pure returns (uint256) { + return SafeCast.toUint256(number); + } + + function toUint248(uint256 number) public view returns (uint248) { + return SafeCast.toUint248(maxUint248 + number); + } + + function toUint240(uint256 number) public view returns (uint240) { + return SafeCast.toUint240(maxUint240 + number); + } + + function toUint232(uint256 number) public view returns (uint232) { + return SafeCast.toUint232(maxUint232 + number); + } + + function toUint224(uint256 number) public view returns (uint224) { + return SafeCast.toUint224(maxUint224 + number); + } + + function toUint216(uint256 number) public view returns (uint216) { + return SafeCast.toUint216(maxUint216 + number); + } + + function toUint208(uint256 number) public view returns (uint208) { + return SafeCast.toUint208(maxUint208 + number); + } + + function toUint200(uint256 number) public view returns (uint200) { + return SafeCast.toUint200(maxUint200 + number); + } + + function toUint192(uint256 number) public view returns (uint192) { + return SafeCast.toUint192(maxUint192 + number); + } + + function toUint184(uint256 number) public view returns (uint184) { + return SafeCast.toUint184(maxUint184 + number); + } + + function toUint176(uint256 number) public view returns (uint176) { + return SafeCast.toUint176(maxUint176 + number); + } + + function toUint168(uint256 number) public view returns (uint168) { + return SafeCast.toUint168(maxUint168 + number); + } + + function toUint160(uint256 number) public view returns (uint160) { + return SafeCast.toUint160(maxUint160 + number); + } + + function toUint152(uint256 number) public view returns (uint152) { + return SafeCast.toUint152(maxUint152 + number); + } + + function toUint144(uint256 number) public view returns (uint144) { + return SafeCast.toUint144(maxUint144 + number); + } + + function toUint136(uint256 number) public view returns (uint136) { + return SafeCast.toUint136(maxUint136 + number); + } + + function toUint128(uint256 number) public view returns (uint128) { + return SafeCast.toUint128(maxUint128 + number); + } + + function toUint120(uint256 number) public view returns (uint120) { + return SafeCast.toUint120(maxUint120 + number); + } + + function toUint112(uint256 number) public view returns (uint112) { + return SafeCast.toUint112(maxUint112 + number); + } + + function toUint104(uint256 number) public view returns (uint104) { + return SafeCast.toUint104(maxUint104 + number); + } + + function toUint96(uint256 number) public view returns (uint96) { + return SafeCast.toUint96(maxUint96 + number); + } + + function toUint88(uint256 number) public view returns (uint88) { + return SafeCast.toUint88(maxUint88 + number); + } + + function toUint80(uint256 number) public view returns (uint80) { + return SafeCast.toUint80(maxUint80 + number); + } + + function toUint72(uint256 number) public view returns (uint72) { + return SafeCast.toUint72(maxUint72 + number); + } + + function toUint64(uint256 number) public view returns (uint64) { + return SafeCast.toUint64(maxUint64 + number); + } + + function toUint56(uint256 number) public view returns (uint56) { + return SafeCast.toUint56(maxUint56 + number); + } + + function toUint48(uint256 number) public view returns (uint48) { + return SafeCast.toUint48(maxUint48 + number); + } + + function toUint40(uint256 number) public view returns (uint40) { + return SafeCast.toUint40(maxUint40 + number); + } + + function toUint32(uint256 number) public view returns (uint32) { + return SafeCast.toUint32(maxUint32 + number); + } + + function toUint24(uint256 number) public view returns (uint24) { + return SafeCast.toUint24(maxUint24 + number); + } + + function toUint16(uint256 number) public view returns (uint16) { + return SafeCast.toUint16(maxUint16 + number); + } + + function toUint8(uint256 number) public view returns (uint8) { + return SafeCast.toUint8(maxUint8 + number); + } + + function toInt248(int256 number) public view returns (int248) { + return SafeCast.toInt248(maxInt248 + number); + } + + function toInt240(int256 number) public view returns (int240) { + return SafeCast.toInt240(maxInt240 + number); + } + + function toInt232(int256 number) public view returns (int232) { + return SafeCast.toInt232(maxInt232 + number); + } + + function toInt224(int256 number) public view returns (int224) { + return SafeCast.toInt224(maxInt224 + number); + } + + function toInt216(int256 number) public view returns (int216) { + return SafeCast.toInt216(maxInt216 + number); + } + + function toInt208(int256 number) public view returns (int208) { + return SafeCast.toInt208(maxInt208 + number); + } + + function toInt200(int256 number) public view returns (int200) { + return SafeCast.toInt200(maxInt200 + number); + } + + function toInt192(int256 number) public view returns (int192) { + return SafeCast.toInt192(maxInt192 + number); + } + + function toInt184(int256 number) public view returns (int184) { + return SafeCast.toInt184(maxInt184 + number); + } + + function toInt176(int256 number) public view returns (int176) { + return SafeCast.toInt176(maxInt176 + number); + } + + function toInt168(int256 number) public view returns (int168) { + return SafeCast.toInt168(maxInt168 + number); + } + + function toInt160(int256 number) public view returns (int160) { + return SafeCast.toInt160(maxInt160 + number); + } + + function toInt152(int256 number) public view returns (int152) { + return SafeCast.toInt152(maxInt152 + number); + } + + function toInt144(int256 number) public view returns (int144) { + return SafeCast.toInt144(maxInt144 + number); + } + + function toInt136(int256 number) public view returns (int136) { + return SafeCast.toInt136(maxInt136 + number); + } + + function toInt128(int256 number) public view returns (int128) { + return SafeCast.toInt128(maxInt128 + number); + } + + function toInt120(int256 number) public view returns (int120) { + return SafeCast.toInt120(maxInt120 + number); + } + + function toInt112(int256 number) public view returns (int112) { + return SafeCast.toInt112(maxInt112 + number); + } + + function toInt104(int256 number) public view returns (int104) { + return SafeCast.toInt104(maxInt104 + number); + } + + function toInt96(int256 number) public view returns (int96) { + return SafeCast.toInt96(maxInt96 + number); + } + + function toInt88(int256 number) public view returns (int88) { + return SafeCast.toInt88(maxInt88 + number); + } + + function toInt80(int256 number) public view returns (int80) { + return SafeCast.toInt80(maxInt80 + number); + } + + function toInt72(int256 number) public view returns (int72) { + return SafeCast.toInt72(maxInt72 + number); + } + + function toInt64(int256 number) public view returns (int64) { + return SafeCast.toInt64(maxInt64 + number); + } + + function toInt56(int256 number) public view returns (int56) { + return SafeCast.toInt56(maxInt56 + number); + } + + function toInt48(int256 number) public view returns (int48) { + return SafeCast.toInt48(maxInt48 + number); + } + + function toInt40(int256 number) public view returns (int40) { + return SafeCast.toInt40(maxInt40 + number); + } + + function toInt32(int256 number) public view returns (int32) { + return SafeCast.toInt32(maxInt32 + number); + } + + function toInt24(int256 number) public view returns (int24) { + return SafeCast.toInt24(maxInt24 + number); + } + + function toInt16(int256 number) public view returns (int16) { + return SafeCast.toInt16(maxInt16 + number); + } + + function toInt8(int256 number) public view returns (int8) { + return SafeCast.toInt8(maxInt8 + number); + } + + function toInt256(uint256 number) public view returns (int256) { + return SafeCast.toInt256(uint256(maxInt256) + number); + } +} diff --git a/test/solidity/oz/safeCast/safeCast.js b/test/solidity/oz/safeCast/safeCast.js new file mode 100644 index 000000000..26399da84 --- /dev/null +++ b/test/solidity/oz/safeCast/safeCast.js @@ -0,0 +1,125 @@ +/*- + * + * Hedera Smart Contracts + * + * Copyright (C) 2023 Hedera Hashgraph, LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +const { expect } = require('chai') +const { ethers } = require('hardhat') + +describe('@OZSafeCast Tests', function () { + let contract + + const SAFE_CAST_OVERLOW_UINT = 'SafeCastOverflowedUintDowncast' + const SAFE_CAST_OVERLOW_INT = 'SafeCastOverflowedIntDowncast' + const SAFE_CATS_OVERLOW_UINT_TO_INT = 'SafeCastOverflowedUintToInt' + const SAFE_CATS_OVERLOW_INT_TO_UINT = 'SafeCastOverflowedIntToUint' + + const conversions = [ + { func: 'toUint256', error: SAFE_CATS_OVERLOW_INT_TO_UINT }, + { func: 'toUint248', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint240', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint232', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint224', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint216', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint208', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint200', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint192', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint184', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint176', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint168', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint160', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint152', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint144', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint136', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint128', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint120', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint112', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint104', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint96', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint88', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint80', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint72', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint64', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint56', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint48', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint40', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint32', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint24', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint16', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toUint8', error: SAFE_CAST_OVERLOW_UINT }, + { func: 'toInt256', error: SAFE_CATS_OVERLOW_UINT_TO_INT }, + { func: 'toInt248', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt240', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt232', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt224', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt216', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt208', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt200', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt192', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt184', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt176', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt168', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt160', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt152', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt144', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt136', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt128', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt120', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt112', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt104', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt96', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt88', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt80', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt72', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt64', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt56', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt48', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt40', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt32', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt24', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt16', error: SAFE_CAST_OVERLOW_INT }, + { func: 'toInt8', error: SAFE_CAST_OVERLOW_INT }, + ]; + + before(async function () { + const factory = await ethers.getContractFactory('SafeCastTest') + contract = await factory.deploy({ + gasLimit: 10000000 + }) + await contract.deployed() + }) + + it('should deploy contract', async function () { + const deployed = await contract.deployed() + + expect(deployed).to.exist + }) + + for (const { func, error } of conversions) { + it(`should return correct value and revert for: "${func}"`, async function () { + const res = await contract[func](0) + expect(res).to.exist + const revertVal = func === 'toUint256' ? -1 : 1 + + await expect(contract[func](revertVal)).to.eventually.be.rejected.and.have.property( + 'errorName', + error + ) + }); + } +})