888 lines
544 KiB
JSON
888 lines
544 KiB
JSON
{
|
|
"schemaVersion": "2.0.0",
|
|
"contractName": "MetaTransactionsFeature",
|
|
"compilerOutput": {
|
|
"abi": [
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "zeroExAddress",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "greedyTokensBloomFilter",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "constructor"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "bytes32",
|
|
"name": "hash",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "bytes4",
|
|
"name": "selector",
|
|
"type": "bytes4"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "address",
|
|
"name": "signer",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "address",
|
|
"name": "sender",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "MetaTransactionExecuted",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "EIP712_DOMAIN_SEPARATOR",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "FEATURE_NAME",
|
|
"outputs": [
|
|
{
|
|
"internalType": "string",
|
|
"name": "",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "FEATURE_VERSION",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "GREEDY_TOKENS_BLOOM_FILTER",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "MTX_EIP712_TYPEHASH",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "address payable",
|
|
"name": "signer",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "sender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "minGasPrice",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "maxGasPrice",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "expirationTimeSeconds",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "salt",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "bytes",
|
|
"name": "callData",
|
|
"type": "bytes"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "value",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "contract IERC20TokenV06",
|
|
"name": "feeToken",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "feeAmount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"internalType": "struct IMetaTransactionsFeature.MetaTransactionData[]",
|
|
"name": "mtxs",
|
|
"type": "tuple[]"
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "enum LibSignature.SignatureType",
|
|
"name": "signatureType",
|
|
"type": "uint8"
|
|
},
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "v",
|
|
"type": "uint8"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "r",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "s",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"internalType": "struct LibSignature.Signature[]",
|
|
"name": "signatures",
|
|
"type": "tuple[]"
|
|
}
|
|
],
|
|
"name": "batchExecuteMetaTransactions",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes[]",
|
|
"name": "returnResults",
|
|
"type": "bytes[]"
|
|
}
|
|
],
|
|
"stateMutability": "payable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "address payable",
|
|
"name": "signer",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "sender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "minGasPrice",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "maxGasPrice",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "expirationTimeSeconds",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "salt",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "bytes",
|
|
"name": "callData",
|
|
"type": "bytes"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "value",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "contract IERC20TokenV06",
|
|
"name": "feeToken",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "feeAmount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"internalType": "struct IMetaTransactionsFeature.MetaTransactionData",
|
|
"name": "mtx",
|
|
"type": "tuple"
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "enum LibSignature.SignatureType",
|
|
"name": "signatureType",
|
|
"type": "uint8"
|
|
},
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "v",
|
|
"type": "uint8"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "r",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "s",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"internalType": "struct LibSignature.Signature",
|
|
"name": "signature",
|
|
"type": "tuple"
|
|
}
|
|
],
|
|
"name": "executeMetaTransaction",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes",
|
|
"name": "returnResult",
|
|
"type": "bytes"
|
|
}
|
|
],
|
|
"stateMutability": "payable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "address payable",
|
|
"name": "signer",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "sender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "minGasPrice",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "maxGasPrice",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "expirationTimeSeconds",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "salt",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "bytes",
|
|
"name": "callData",
|
|
"type": "bytes"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "value",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "contract IERC20TokenV06",
|
|
"name": "feeToken",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "feeAmount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"internalType": "struct IMetaTransactionsFeature.MetaTransactionData",
|
|
"name": "mtx",
|
|
"type": "tuple"
|
|
}
|
|
],
|
|
"name": "getMetaTransactionExecutedBlock",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "blockNumber",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "address payable",
|
|
"name": "signer",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "sender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "minGasPrice",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "maxGasPrice",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "expirationTimeSeconds",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "salt",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "bytes",
|
|
"name": "callData",
|
|
"type": "bytes"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "value",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "contract IERC20TokenV06",
|
|
"name": "feeToken",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "feeAmount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"internalType": "struct IMetaTransactionsFeature.MetaTransactionData",
|
|
"name": "mtx",
|
|
"type": "tuple"
|
|
}
|
|
],
|
|
"name": "getMetaTransactionHash",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "mtxHash",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "mtxHash",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "getMetaTransactionHashExecutedBlock",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "blockNumber",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "migrate",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes4",
|
|
"name": "success",
|
|
"type": "bytes4"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"devdoc": {
|
|
"details": "MetaTransactions feature.",
|
|
"kind": "dev",
|
|
"methods": {
|
|
"batchExecuteMetaTransactions((address,address,uint256,uint256,uint256,uint256,bytes,uint256,address,uint256)[],(uint8,uint8,bytes32,bytes32)[])": {
|
|
"details": "Execute multiple meta-transactions.",
|
|
"params": {
|
|
"mtxs": "The meta-transactions.",
|
|
"signatures": "The signature by each respective `mtx.signer`."
|
|
},
|
|
"returns": {
|
|
"returnResults": "The ABI-encoded results of the underlying calls."
|
|
}
|
|
},
|
|
"executeMetaTransaction((address,address,uint256,uint256,uint256,uint256,bytes,uint256,address,uint256),(uint8,uint8,bytes32,bytes32))": {
|
|
"details": "Execute a single meta-transaction.",
|
|
"params": {
|
|
"mtx": "The meta-transaction.",
|
|
"signature": "The signature by `mtx.signer`."
|
|
},
|
|
"returns": {
|
|
"returnResult": "The ABI-encoded result of the underlying call."
|
|
}
|
|
},
|
|
"getMetaTransactionExecutedBlock((address,address,uint256,uint256,uint256,uint256,bytes,uint256,address,uint256))": {
|
|
"details": "Get the block at which a meta-transaction has been executed.",
|
|
"params": {
|
|
"mtx": "The meta-transaction."
|
|
},
|
|
"returns": {
|
|
"blockNumber": "The block height when the meta-transactioin was executed."
|
|
}
|
|
},
|
|
"getMetaTransactionHash((address,address,uint256,uint256,uint256,uint256,bytes,uint256,address,uint256))": {
|
|
"details": "Get the EIP712 hash of a meta-transaction.",
|
|
"params": {
|
|
"mtx": "The meta-transaction."
|
|
},
|
|
"returns": {
|
|
"mtxHash": "The EIP712 hash of `mtx`."
|
|
}
|
|
},
|
|
"getMetaTransactionHashExecutedBlock(bytes32)": {
|
|
"details": "Get the block at which a meta-transaction hash has been executed.",
|
|
"params": {
|
|
"mtxHash": "The meta-transaction hash."
|
|
},
|
|
"returns": {
|
|
"blockNumber": "The block height when the meta-transactioin was executed."
|
|
}
|
|
},
|
|
"migrate()": {
|
|
"details": "Initialize and register this feature. Should be delegatecalled by `Migrate.migrate()`.",
|
|
"returns": {
|
|
"success": "`LibMigrate.SUCCESS` on success."
|
|
}
|
|
}
|
|
},
|
|
"stateVariables": {
|
|
"FEATURE_NAME": {
|
|
"details": "Name of this feature."
|
|
},
|
|
"FEATURE_VERSION": {
|
|
"details": "Version of this feature."
|
|
},
|
|
"MTX_EIP712_TYPEHASH": {
|
|
"details": "EIP712 typehash of the `MetaTransactionData` struct."
|
|
}
|
|
},
|
|
"version": 1
|
|
},
|
|
"evm": {
|
|
"bytecode": {
|
|
"linkReferences": {},
|
|
"object": "0x6101206040526200001460018060006200011d565b60e0527fe866282978e74dc892efa3621df30a058ca4d374a338824c0b89f1dfdcb0ea04610100523480156200004957600080fd5b50604051620030fe380380620030fe8339810160408190526200006c916200014f565b3060601b608052604051819083904690620000f4907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f907f9e5dae0addaf20578aeb5d70341d092b53b4e14480ac5726438fd436df7ba427907f06c015bd22b4c69690933c1058878ebdfef31f9aaae40bbe86d8a09fe1b2972c908590879060200162000189565b60408051601f19818403018152919052805160209091012060a052505060c05250620001b59050565b6bffffffff0000000000000000604084901b1667ffffffff00000000602084901b161763ffffffff8216179392505050565b6000806040838503121562000162578182fd5b82516001600160a01b038116811462000179578283fd5b6020939093015192949293505050565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b60805160601c60a05160c05160e05161010051612ef76200020760003980610483528061068e5250806102045250806106b252806117425250806106d65280610ad8525080610a775250612ef76000f3fe6080604052600436106100bc5760003560e01c80638fd3ab8011610074578063d036092d1161004e578063d036092d146101c3578063d925a56d146101d8578063dab400f3146101ed576100bc565b80638fd3ab8014610161578063ae55049714610183578063c5579ec8146101a3576100bc565b80633fb2da38116100a55780633fb2da381461010c5780636ae4b4f71461012c57806372d17d0314610141576100bc565b8063031b905c146100c15780633d61ed3e146100ec575b600080fd5b3480156100cd57600080fd5b506100d6610202565b6040516100e39190612808565b60405180910390f35b6100ff6100fa36600461248a565b610226565b6040516100e39190612a02565b34801561011857600080fd5b506100d661012736600461244f565b610320565b34801561013857600080fd5b506100ff610334565b34801561014d57600080fd5b506100d661015c366004612272565b61036d565b34801561016d57600080fd5b50610176610388565b6040516100e3919061295b565b34801561018f57600080fd5b506100d661019e36600461244f565b61047c565b6101b66101b13660046121c1565b610512565b6040516100e3919061278a565b3480156101cf57600080fd5b506100d661068c565b3480156101e457600080fd5b506100d66106b0565b3480156101f957600080fd5b506100d66106d4565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060600160006102346106f8565b8054909150828116156102965761029661029161028b600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092939250506107059050565b85610751565b61080c565b821781556102a2611bf0565b338152604081018690526102b58661047c565b6020820152606081018590526102ca81610814565b93505060006102d93447610a1c565b9050801561031057604051339082156108fc029083906000818181858888f1935050505015801561030e573d6000803e3d6000fd5b505b5080549119909116905592915050565b600061032e61015c8361047c565b92915050565b6040518060400160405280601081526020017f4d6574615472616e73616374696f6e730000000000000000000000000000000081525081565b6000610377610a34565b600092835260205250604090205490565b60006103b37f3d61ed3e00000000000000000000000000000000000000000000000000000000610a41565b6103dc7fc5579ec800000000000000000000000000000000000000000000000000000000610a41565b6104057f3fb2da3800000000000000000000000000000000000000000000000000000000610a41565b61042e7f72d17d0300000000000000000000000000000000000000000000000000000000610a41565b6104577fae55049700000000000000000000000000000000000000000000000000000000610a41565b507f2c64c5ef0000000000000000000000000000000000000000000000000000000090565b600061032e7f0000000000000000000000000000000000000000000000000000000000000000836000015184602001518560400151866060015187608001518860a001518960c00151805190602001208a60e001518b61010001518c61012001516040516020016104f79b9a9998979695949392919061283d565b60405160208183030381529060405280519060200120610ad4565b6060600160006105206106f8565b8054909150828116156105775761057761029161028b600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092939250506107059050565b8217815583518551146105935761059361029186518651610b26565b845167ffffffffffffffff811180156105ab57600080fd5b506040519080825280602002602001820160405280156105df57816020015b60608152602001906001900390816105ca5790505b50925060005b855181101561067f576105f6611bf0565b338152865187908390811061060757fe5b6020026020010151816040018190525061063387838151811061062657fe5b602002602001015161047c565b6020820152855186908390811061064657fe5b6020026020010151816060018190525061065f81610814565b85838151811061066b57fe5b6020908102919091010152506001016105e5565b5060006102d93447610a1c565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008061032e6006610b5c565b60008160040183511015610726576107266102916003855185600401610b77565b5001602001517fffffffff000000000000000000000000000000000000000000000000000000001690565b60607fc7a7103e21e41a5c3158b3028d34cb9bb9593b10b1892f49d7187efa71219d4e83836040516024016107879291906129d0565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905092915050565b805160208201fd5b606061081f82610c1c565b43610828610a34565b60208085015160009081529190526040908190209190915582015161012001511561086d576040820151610100810151815184516101209093015161086d9390610dfd565b604082015160c00151610881906000610705565b7fffffffff0000000000000000000000000000000000000000000000000000000016608083018190527f415565b00000000000000000000000000000000000000000000000000000000014156108e1576108da8261100e565b90506109a4565b60808201517fffffffff00000000000000000000000000000000000000000000000000000000167ff6274f66000000000000000000000000000000000000000000000000000000001415610938576108da82611215565b60808201517fffffffff00000000000000000000000000000000000000000000000000000000167faa77476c00000000000000000000000000000000000000000000000000000000141561098f576108da82611339565b6109a4610291836020015184608001516113c7565b81608001517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f7f4fe3ff8ae440e1570c558da08440b26f89fb1c1f2910cd91ca6452955f121a8360200151846040015160000151856040015160200151604051610a0f93929190612811565b60405180910390a2919050565b6000818310610a2b5781610a2d565b825b9392505050565b60008061032e6005610b5c565b6040517f6eb224cb0000000000000000000000000000000000000000000000000000000081523090636eb224cb90610a9f9084907f000000000000000000000000000000000000000000000000000000000000000090600401612988565b600060405180830381600087803b158015610ab957600080fd5b505af1158015610acd573d6000803e3d6000fd5b5050505050565b60007f000000000000000000000000000000000000000000000000000000000000000082604051602001610b099291906126db565b604051602081830303815290604052805190602001209050919050565b60607f52974c3a86e985173f72e2fb84ba2bfca8fb3b7c5031eb8077ebd59458abf2a483836040516024016107879291906128fe565b60006080826007811115610b6c57fe5b600101901b92915050565b6060632800659560e01b848484604051602401610b9693929190612a4c565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290509392505050565b60408101516020015173ffffffffffffffffffffffffffffffffffffffff1615801590610c815750806000015173ffffffffffffffffffffffffffffffffffffffff1681604001516020015173ffffffffffffffffffffffffffffffffffffffff1614155b15610ca457610ca4610291826020015183600001518460400151602001516113fd565b4281604001516080015111610ccd57610ccd610291826020015142846040015160800151611435565b3a8160400151604001511180610cea57503a816040015160600151105b15610d1257610d1261029182602001513a84604001516040015185604001516060015161146d565b4760a08201819052604082015160e001511115610d4757610d4761029182602001518360a00151846040015160e0015161152e565b80604001516000015173ffffffffffffffffffffffffffffffffffffffff16610d7882602001518360600151611566565b73ffffffffffffffffffffffffffffffffffffffff1614610dbe57610dbe61029160048360200151846040015160000151604051806020016040528060008152506116b7565b610dc6610a34565b6020808301516000908152919052604090205460c0820181905215610dfa57610dfa61029182602001518360c001516116f1565b50565b6000606073ffffffffffffffffffffffffffffffffffffffff8616301415610e5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5190612ac9565b60405180910390fd5b610e6386611727565b15610f37576040517fdd62ed3e000000000000000000000000000000000000000000000000000000008152839073ffffffffffffffffffffffffffffffffffffffff88169063dd62ed3e90610ebe9089903090600401612711565b60206040518083038186803b158015610ed657600080fd5b505afa158015610eea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0e91906125ca565b1015610f3757610f308686868660405180602001604052806000815250611767565b5050611008565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8616600482015273ffffffffffffffffffffffffffffffffffffffff85166024820152836044820152600080606483600073ffffffffffffffffffffffffffffffffffffffff8c165af192503d806000602084013e60016020830151146020821015168115178416935083610ff1578082528192508060208301016040525b505081611005576110058686868685611767565b50505b50505050565b6060611018611c37565b604083015160c0015151606090601c0167ffffffffffffffff8111801561103e57600080fd5b506040519080825280601f01601f191660200182016040528015611069576020820181803683370190505b5090506060846040015160c00151905060a08151101561108557fe5b6020828101528051602482019060408401906110c690829084907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0161182f565b838060200190518101906110da919061228a565b945050505050610a2d8360200151636259719260e01b6040518060c0016040528087604001516000015173ffffffffffffffffffffffffffffffffffffffff168152602001856000015173ffffffffffffffffffffffffffffffffffffffff168152602001856020015173ffffffffffffffffffffffffffffffffffffffff1681526020018560400151815260200185606001518152602001856080015181525060405160240161118b9190612d11565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093179092529086015160e00151611910565b606061121f611c92565b611227611cf6565b6000606061123c866040015160c0015161199c565b905080806020019051810190611252919061232d565b60208901516040808b015151905194985092965090945061132f9290917f414e4ccf00000000000000000000000000000000000000000000000000000000916112a5918991899189913390602401612b26565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093179092529089015160e00151611910565b9695505050505050565b6060611343611d1f565b61134b611cf6565b60006060611360866040015160c0015161199c565b90508080602001905181019061137691906124d7565b60208901516040808b015151905194985092965090945061132f9290917fa656186b00000000000000000000000000000000000000000000000000000000916112a591899189918991602401612c37565b60607f547a32a328d8a78dbe9bf090fa60ba3d4d1c6833a592a2c942666ce3249c121083836040516024016107879291906128a3565b60607fa78002a166fcae5236d89e3ff35c53dadb775f7818de4a020714cba4bf360822848484604051602401610b9693929190612811565b60607fbea726efdf9868bbc5755dce9f13d585b3cf731177be75300d15bb8f5e286158848484604051602401610b969392919061290c565b60607f6fec11a99ebb0ff14b6648f609f57864dadeba8b29869c4df2b3b76894147849858585856040516024016114a79493929190612922565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529050949350505050565b60607f0a5ade45208123132815e1591a1c7e64045fd006152f5e85d100aee42ba02c75848484604051602401610b969392919061290c565b60006115728383611a09565b60028251600381111561158157fe5b14156115e957600183836020015184604001518560600151604051600081526020016040526040516115b6949392919061293d565b6020604051602081039080840390855afa1580156115d8573d6000803e3d6000fd5b50505060206040510351905061168e565b6003825160038111156115f857fe5b141561168e5760007f19457468657265756d205369676e6564204d6573736167653a0a33320000000060005283601c52603c60002090506001818460200151856040015186606001516040516000815260200160405260405161165e949392919061293d565b6020604051602081039080840390855afa158015611680573d6000803e3d6000fd5b505050602060405103519150505b73ffffffffffffffffffffffffffffffffffffffff811661032e5761032e610291600585611abd565b60607f4c7607a3ebba99c9acde0e2a04d88829f7001b63f028b796dda6ff02406ddad5858585856040516024016114a79493929190612a85565b60607ffe251a07f3cbffd23c1c1db9ec776d259099c832333d99ef48cacfa93a4d7b3283836040516024016107879291906128fe565b600081815260209020600160ff92831681901b929091161b177f000000000000000000000000000000000000000000000000000000000000000081161490565b6040517f89dd02e700000000000000000000000000000000000000000000000000000000815230906389dd02e7906117a9908890889088908890600401612a15565b600060405180830381600087803b1580156117c357600080fd5b505af19250505080156117d4575060015b610acd573d808015611802576040519150601f19603f3d011682016040523d82523d6000602084013e611807565b606091505b50611829610291878787878751600014156118225786611824565b875b611af3565b50610acd565b6020811015611876578151835160208390036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018019909216911617835261190b565b828214156118835761190b565b828211156118bd5760208103905080820181840181515b828510156118b557845186526020958601959094019361189a565b90525061190b565b60208103905080820181840183515b8186121561190657825182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe092830192909101906118cc565b855250505b505050565b606060003073ffffffffffffffffffffffffffffffffffffffff16838560405161193a91906126bf565b60006040518083038185875af1925050503d8060008114611977576040519150601f19603f3d011682016040523d82523d6000602084013e61197c565b606091505b50925090508061199457611994610291868685611bb8565b509392505050565b6060600482510367ffffffffffffffff811180156119b957600080fd5b506040519080825280601f01601f1916602001820160405280156119e4576020820181803683370190505b509050600080602484019150602083019050611a028183855161182f565b5050919050565b60408101517ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141111580611a60575060608101517f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a111155b15611a7357611a73610291600584611abd565b600081516003811115611a8257fe5b1415611a9657611a96610291600384611abd565b600181516003811115611aa557fe5b1415611ab957611ab9610291600084611abd565b5050565b60607ff18f11f3027e735c758137924b262d4d3aff0037dcd785aca3c699fa05d960bd8383604051602401610787929190612a6e565b60607fdfdc6f57cf82bede92bcfdd44fedb82b2d5cecabf56ec21964db6ee2c3e82cf48686868686604051602401611b2f959493929190612738565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290505b95945050505050565b60607fa9f0c547643c02afed4cf2699e794bc383effca840eed62fddb64a15a4e55bc4848484604051602401610b96939291906128d3565b6040805160e08101825260008082526020820152908101611c0f611d73565b8152602001611c1c611cf6565b81526000602082018190526040820181905260609091015290565b6040518060a00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001606081525090565b6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081018290526101208101829052610140810182905261016081019190915290565b604080516080810190915280600081526000602082018190526040820181905260609091015290565b6040805161014081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081019190915290565b604051806101400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152602001600081526020016060815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081525090565b803561032e81612e83565b805161032e81612e83565b600082601f830112611e2e578081fd5b8135611e41611e3c82612deb565b612dc4565b8181529150602080830190848101608080850287018301881015611e6457600080fd5b60005b85811015611e8b57611e7989846120c3565b85529383019391810191600101611e67565b50505050505092915050565b600082601f830112611ea7578081fd5b8151611eb5611e3c82612deb565b818152915060208083019084810160005b84811015611f5c57815187016040807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838c03011215611f0557600080fd5b611f0e81612dc4565b611f1a8b878501612195565b8152908201519067ffffffffffffffff821115611f3657600080fd5b611f448b8784860101611fb5565b81870152865250509282019290820190600101611ec6565b505050505092915050565b600082601f830112611f77578081fd5b8135611f85611e3c82612e0b565b9150808252836020828501011115611f9c57600080fd5b8060208401602084013760009082016020015292915050565b600082601f830112611fc5578081fd5b8151611fd3611e3c82612e0b565b9150808252836020828501011115611fea57600080fd5b611ffb816020840160208601612e4d565b5092915050565b6000610140808385031215612015578182fd5b61201e81612dc4565b91505061202b8383611e08565b815261203a8360208401611e08565b602082015260408201356040820152606082013560608201526080820135608082015260a082013560a082015260c082013567ffffffffffffffff81111561208157600080fd5b61208d84828501611f67565b60c08301525060e082013560e08201526101006120ac84828501611e08565b818301525061012080830135818301525092915050565b6000608082840312156120d4578081fd5b6120de6080612dc4565b905081356120eb81612ea5565b815260208201356120fb81612eb2565b80602083015250604082013560408201526060820135606082015292915050565b60006080828403121561212d578081fd5b6121376080612dc4565b9050815161214481612ea5565b8152602082015161215481612eb2565b80602083015250604082015160408201526060820151606082015292915050565b80516fffffffffffffffffffffffffffffffff8116811461032e57600080fd5b805163ffffffff8116811461032e57600080fd5b805167ffffffffffffffff8116811461032e57600080fd5b600080604083850312156121d3578182fd5b823567ffffffffffffffff808211156121ea578384fd5b818501915085601f8301126121fd578384fd5b813561220b611e3c82612deb565b81815260208082019190858101885b85811015612243576122318c8484358b0101612002565b8552938201939082019060010161221a565b5091975088013594505050508082111561225b578283fd5b5061226885828601611e1e565b9150509250929050565b600060208284031215612283578081fd5b5035919050565b60006020828403121561229b578081fd5b815167ffffffffffffffff808211156122b2578283fd5b9083019060a082860312156122c5578283fd5b6122cf60a0612dc4565b6122d98684611e13565b81526122e88660208501611e13565b60208201526040830151604082015260608301516060820152608083015182811115612312578485fd5b61231e87828601611e97565b60808301525095945050505050565b6000806000838503610220811215612343578182fd5b61018080821215612352578283fd5b61235b81612dc4565b91506123678787611e13565b82526123768760208801611e13565b60208301526123888760408801612175565b604083015261239a8760608801612175565b60608301526123ac8760808801612175565b60808301526123be8760a08801611e13565b60a08301526123d08760c08801611e13565b60c08301526123e28760e08801611e13565b60e08301526101006123f688828901611e13565b908301526101208681015190830152610140612414888289016121a9565b81840152506101608087015181840152508194506124348782880161211c565b93505050612446856102008601612175565b90509250925092565b600060208284031215612460578081fd5b813567ffffffffffffffff811115612476578182fd5b61248284828501612002565b949350505050565b60008060a0838503121561249c578182fd5b823567ffffffffffffffff8111156124b2578283fd5b6124be85828601612002565b9250506124ce84602085016120c3565b90509250929050565b60008060008385036101e08112156124ed578182fd5b610140808212156124fc578283fd5b61250581612dc4565b91506125118787611e13565b82526125208760208801611e13565b60208301526125328760408801612175565b60408301526125448760608801612175565b60608301526125568760808801611e13565b60808301526125688760a08801611e13565b60a083015261257a8760c08801611e13565b60c083015260e086015160e0830152610100612598888289016121a9565b81840152506101208087015181840152508194506125b88782880161211c565b93505050612446856101c08601612175565b6000602082840312156125db578081fd5b5051919050565b600063ffffffff82511683526020820151604060208501526124826040850182612621565b73ffffffffffffffffffffffffffffffffffffffff169052565b60008151808452612639816020860160208601612e4d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b80516004811061267757fe5b825260208181015160ff169083015260408082015190830152606090810151910152565b6fffffffffffffffffffffffffffffffff169052565b67ffffffffffffffff169052565b600082516126d1818460208701612e4d565b9190910192915050565b7f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b600073ffffffffffffffffffffffffffffffffffffffff8088168352808716602084015280861660408401525083606083015260a0608083015261277f60a0830184612621565b979650505050505050565b6000602080830181845280855180835260408601915060408482028701019250838701855b828110156127fb577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526127e9858351612621565b945092850192908501906001016127af565b5092979650505050505050565b90815260200190565b92835273ffffffffffffffffffffffffffffffffffffffff918216602084015216604082015260600190565b9a8b5273ffffffffffffffffffffffffffffffffffffffff998a1660208c015297891660408b015260608a0196909652608089019490945260a088019290925260c087015260e08601526101008501529091166101208301526101408201526101600190565b9182527fffffffff0000000000000000000000000000000000000000000000000000000016602082015260400190565b6000848252606060208301526128ec6060830185612621565b828103604084015261132f8185612621565b918252602082015260400190565b9283526020830191909152604082015260600190565b93845260208401929092526040830152606082015260800190565b93845260ff9290921660208401526040830152606082015260800190565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b7fffffffff0000000000000000000000000000000000000000000000000000000092909216825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b7fffffffff00000000000000000000000000000000000000000000000000000000929092168252602082015260400190565b600060208252610a2d6020830184612621565b73ffffffffffffffffffffffffffffffffffffffff9485168152928416602084015292166040820152606081019190915260800190565b6060810160088510612a5a57fe5b938152602081019290925260409091015290565b60408101612a7b84612e79565b9281526020015290565b6000612a9086612e79565b85825284602083015273ffffffffffffffffffffffffffffffffffffffff841660408301526080606083015261132f6080830184612621565b60208082526024908201527f466978696e546f6b656e5370656e6465722f43414e4e4f545f494e564f4b455f60408201527f53454c4600000000000000000000000000000000000000000000000000000000606082015260800190565b600061026082019050612b3a828851612607565b6020870151612b4c6020840182612607565b506040870151612b5f604084018261269b565b506060870151612b72606084018261269b565b506080870151612b85608084018261269b565b5060a0870151612b9860a0840182612607565b5060c0870151612bab60c0840182612607565b5060e0870151612bbe60e0840182612607565b5061010080880151612bd282850182612607565b5050610120878101519083015261014080880151612bf2828501826126b1565b50506101608781015190830152612c0d61018083018761266b565b612c1b61020083018661269b565b612c29610220830185612607565b61132f610240830184612607565b600061020082019050612c4b828751612607565b6020860151612c5d6020840182612607565b506040860151612c70604084018261269b565b506060860151612c83606084018261269b565b506080860151612c966080840182612607565b5060a0860151612ca960a0840182612607565b5060c0860151612cbc60c0840182612607565b5060e086015160e083015261010080870151612cda828501826126b1565b50506101208681015190830152612cf561014083018661266b565b612d036101c083018561269b565b611baf6101e0830184612607565b6000602080835260e0830173ffffffffffffffffffffffffffffffffffffffff808651168386015280838701511660408601528060408701511660608601525060608501516080850152608085015160a085015260a085015160c080860152818151612d7d8185612808565b9350918401918391508085028201865b82811015612db7578582038452612da58286516125e2565b94870194938701939150600101612d8d565b5098975050505050505050565b60405181810167ffffffffffffffff81118282101715612de357600080fd5b604052919050565b600067ffffffffffffffff821115612e01578081fd5b5060209081020190565b600067ffffffffffffffff821115612e21578081fd5b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60005b83811015612e68578181015183820152602001612e50565b838111156110085750506000910152565b60068110610dfa57fe5b73ffffffffffffffffffffffffffffffffffffffff81168114610dfa57600080fd5b60048110610dfa57600080fd5b60ff81168114610dfa57600080fdfea26469706673582212207674255d0bc140b6a4d94a61f4b412482233613d8ec887eb2d42f510b030597f64736f6c634300060c0033",
|
|
"opcodes": "PUSH2 0x120 PUSH1 0x40 MSTORE PUSH3 0x14 PUSH1 0x1 DUP1 PUSH1 0x0 PUSH3 0x11D JUMP JUMPDEST PUSH1 0xE0 MSTORE PUSH32 0xE866282978E74DC892EFA3621DF30A058CA4D374A338824C0B89F1DFDCB0EA04 PUSH2 0x100 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x49 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH3 0x30FE CODESIZE SUB DUP1 PUSH3 0x30FE DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH3 0x6C SWAP2 PUSH3 0x14F JUMP JUMPDEST ADDRESS PUSH1 0x60 SHL PUSH1 0x80 MSTORE PUSH1 0x40 MLOAD DUP2 SWAP1 DUP4 SWAP1 CHAINID SWAP1 PUSH3 0xF4 SWAP1 PUSH32 0x8B73C3C69BB8FE3D512ECC4CF759CC79239F7B179B0FFACAA9A75D522B39400F SWAP1 PUSH32 0x9E5DAE0ADDAF20578AEB5D70341D092B53B4E14480AC5726438FD436DF7BA427 SWAP1 PUSH32 0x6C015BD22B4C69690933C1058878EBDFEF31F9AAAE40BBE86D8A09FE1B2972C SWAP1 DUP6 SWAP1 DUP8 SWAP1 PUSH1 0x20 ADD PUSH3 0x189 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F NOT DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE DUP1 MLOAD PUSH1 0x20 SWAP1 SWAP2 ADD KECCAK256 PUSH1 0xA0 MSTORE POP POP PUSH1 0xC0 MSTORE POP PUSH3 0x1B5 SWAP1 POP JUMP JUMPDEST PUSH12 0xFFFFFFFF0000000000000000 PUSH1 0x40 DUP5 SWAP1 SHL AND PUSH8 0xFFFFFFFF00000000 PUSH1 0x20 DUP5 SWAP1 SHL AND OR PUSH4 0xFFFFFFFF DUP3 AND OR SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH3 0x162 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH3 0x179 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD MLOAD SWAP3 SWAP5 SWAP3 SWAP4 POP POP POP JUMP JUMPDEST SWAP5 DUP6 MSTORE PUSH1 0x20 DUP6 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x40 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 DUP4 ADD MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x80 MLOAD PUSH1 0x60 SHR PUSH1 0xA0 MLOAD PUSH1 0xC0 MLOAD PUSH1 0xE0 MLOAD PUSH2 0x100 MLOAD PUSH2 0x2EF7 PUSH3 0x207 PUSH1 0x0 CODECOPY DUP1 PUSH2 0x483 MSTORE DUP1 PUSH2 0x68E MSTORE POP DUP1 PUSH2 0x204 MSTORE POP DUP1 PUSH2 0x6B2 MSTORE DUP1 PUSH2 0x1742 MSTORE POP DUP1 PUSH2 0x6D6 MSTORE DUP1 PUSH2 0xAD8 MSTORE POP DUP1 PUSH2 0xA77 MSTORE POP PUSH2 0x2EF7 PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0xBC JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x8FD3AB80 GT PUSH2 0x74 JUMPI DUP1 PUSH4 0xD036092D GT PUSH2 0x4E JUMPI DUP1 PUSH4 0xD036092D EQ PUSH2 0x1C3 JUMPI DUP1 PUSH4 0xD925A56D EQ PUSH2 0x1D8 JUMPI DUP1 PUSH4 0xDAB400F3 EQ PUSH2 0x1ED JUMPI PUSH2 0xBC JUMP JUMPDEST DUP1 PUSH4 0x8FD3AB80 EQ PUSH2 0x161 JUMPI DUP1 PUSH4 0xAE550497 EQ PUSH2 0x183 JUMPI DUP1 PUSH4 0xC5579EC8 EQ PUSH2 0x1A3 JUMPI PUSH2 0xBC JUMP JUMPDEST DUP1 PUSH4 0x3FB2DA38 GT PUSH2 0xA5 JUMPI DUP1 PUSH4 0x3FB2DA38 EQ PUSH2 0x10C JUMPI DUP1 PUSH4 0x6AE4B4F7 EQ PUSH2 0x12C JUMPI DUP1 PUSH4 0x72D17D03 EQ PUSH2 0x141 JUMPI PUSH2 0xBC JUMP JUMPDEST DUP1 PUSH4 0x31B905C EQ PUSH2 0xC1 JUMPI DUP1 PUSH4 0x3D61ED3E EQ PUSH2 0xEC JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xCD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD6 PUSH2 0x202 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xE3 SWAP2 SWAP1 PUSH2 0x2808 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xFF PUSH2 0xFA CALLDATASIZE PUSH1 0x4 PUSH2 0x248A JUMP JUMPDEST PUSH2 0x226 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xE3 SWAP2 SWAP1 PUSH2 0x2A02 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x118 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD6 PUSH2 0x127 CALLDATASIZE PUSH1 0x4 PUSH2 0x244F JUMP JUMPDEST PUSH2 0x320 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x138 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xFF PUSH2 0x334 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x14D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD6 PUSH2 0x15C CALLDATASIZE PUSH1 0x4 PUSH2 0x2272 JUMP JUMPDEST PUSH2 0x36D JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x16D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x176 PUSH2 0x388 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xE3 SWAP2 SWAP1 PUSH2 0x295B JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x18F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD6 PUSH2 0x19E CALLDATASIZE PUSH1 0x4 PUSH2 0x244F JUMP JUMPDEST PUSH2 0x47C JUMP JUMPDEST PUSH2 0x1B6 PUSH2 0x1B1 CALLDATASIZE PUSH1 0x4 PUSH2 0x21C1 JUMP JUMPDEST PUSH2 0x512 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xE3 SWAP2 SWAP1 PUSH2 0x278A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1CF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD6 PUSH2 0x68C JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1E4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD6 PUSH2 0x6B0 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1F9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD6 PUSH2 0x6D4 JUMP JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x1 PUSH1 0x0 PUSH2 0x234 PUSH2 0x6F8 JUMP JUMPDEST DUP1 SLOAD SWAP1 SWAP2 POP DUP3 DUP2 AND ISZERO PUSH2 0x296 JUMPI PUSH2 0x296 PUSH2 0x291 PUSH2 0x28B PUSH1 0x0 DUP1 CALLDATASIZE DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP4 SWAP3 POP POP PUSH2 0x705 SWAP1 POP JUMP JUMPDEST DUP6 PUSH2 0x751 JUMP JUMPDEST PUSH2 0x80C JUMP JUMPDEST DUP3 OR DUP2 SSTORE PUSH2 0x2A2 PUSH2 0x1BF0 JUMP JUMPDEST CALLER DUP2 MSTORE PUSH1 0x40 DUP2 ADD DUP7 SWAP1 MSTORE PUSH2 0x2B5 DUP7 PUSH2 0x47C JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x60 DUP2 ADD DUP6 SWAP1 MSTORE PUSH2 0x2CA DUP2 PUSH2 0x814 JUMP JUMPDEST SWAP4 POP POP PUSH1 0x0 PUSH2 0x2D9 CALLVALUE SELFBALANCE PUSH2 0xA1C JUMP JUMPDEST SWAP1 POP DUP1 ISZERO PUSH2 0x310 JUMPI PUSH1 0x40 MLOAD CALLER SWAP1 DUP3 ISZERO PUSH2 0x8FC MUL SWAP1 DUP4 SWAP1 PUSH1 0x0 DUP2 DUP2 DUP2 DUP6 DUP9 DUP9 CALL SWAP4 POP POP POP POP ISZERO DUP1 ISZERO PUSH2 0x30E JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP JUMPDEST POP DUP1 SLOAD SWAP2 NOT SWAP1 SWAP2 AND SWAP1 SSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x32E PUSH2 0x15C DUP4 PUSH2 0x47C JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x10 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4D6574615472616E73616374696F6E7300000000000000000000000000000000 DUP2 MSTORE POP DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x377 PUSH2 0xA34 JUMP JUMPDEST PUSH1 0x0 SWAP3 DUP4 MSTORE PUSH1 0x20 MSTORE POP PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3B3 PUSH32 0x3D61ED3E00000000000000000000000000000000000000000000000000000000 PUSH2 0xA41 JUMP JUMPDEST PUSH2 0x3DC PUSH32 0xC5579EC800000000000000000000000000000000000000000000000000000000 PUSH2 0xA41 JUMP JUMPDEST PUSH2 0x405 PUSH32 0x3FB2DA3800000000000000000000000000000000000000000000000000000000 PUSH2 0xA41 JUMP JUMPDEST PUSH2 0x42E PUSH32 0x72D17D0300000000000000000000000000000000000000000000000000000000 PUSH2 0xA41 JUMP JUMPDEST PUSH2 0x457 PUSH32 0xAE55049700000000000000000000000000000000000000000000000000000000 PUSH2 0xA41 JUMP JUMPDEST POP PUSH32 0x2C64C5EF00000000000000000000000000000000000000000000000000000000 SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x32E PUSH32 0x0 DUP4 PUSH1 0x0 ADD MLOAD DUP5 PUSH1 0x20 ADD MLOAD DUP6 PUSH1 0x40 ADD MLOAD DUP7 PUSH1 0x60 ADD MLOAD DUP8 PUSH1 0x80 ADD MLOAD DUP9 PUSH1 0xA0 ADD MLOAD DUP10 PUSH1 0xC0 ADD MLOAD DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 DUP11 PUSH1 0xE0 ADD MLOAD DUP12 PUSH2 0x100 ADD MLOAD DUP13 PUSH2 0x120 ADD MLOAD PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x4F7 SWAP12 SWAP11 SWAP10 SWAP9 SWAP8 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x283D JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 PUSH2 0xAD4 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x1 PUSH1 0x0 PUSH2 0x520 PUSH2 0x6F8 JUMP JUMPDEST DUP1 SLOAD SWAP1 SWAP2 POP DUP3 DUP2 AND ISZERO PUSH2 0x577 JUMPI PUSH2 0x577 PUSH2 0x291 PUSH2 0x28B PUSH1 0x0 DUP1 CALLDATASIZE DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP4 SWAP3 POP POP PUSH2 0x705 SWAP1 POP JUMP JUMPDEST DUP3 OR DUP2 SSTORE DUP4 MLOAD DUP6 MLOAD EQ PUSH2 0x593 JUMPI PUSH2 0x593 PUSH2 0x291 DUP7 MLOAD DUP7 MLOAD PUSH2 0xB26 JUMP JUMPDEST DUP5 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0x5AB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x5DF JUMPI DUP2 PUSH1 0x20 ADD JUMPDEST PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 SWAP1 SUB SWAP1 DUP2 PUSH2 0x5CA JUMPI SWAP1 POP JUMPDEST POP SWAP3 POP PUSH1 0x0 JUMPDEST DUP6 MLOAD DUP2 LT ISZERO PUSH2 0x67F JUMPI PUSH2 0x5F6 PUSH2 0x1BF0 JUMP JUMPDEST CALLER DUP2 MSTORE DUP7 MLOAD DUP8 SWAP1 DUP4 SWAP1 DUP2 LT PUSH2 0x607 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP2 PUSH1 0x40 ADD DUP2 SWAP1 MSTORE POP PUSH2 0x633 DUP8 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x626 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x47C JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE DUP6 MLOAD DUP7 SWAP1 DUP4 SWAP1 DUP2 LT PUSH2 0x646 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP2 PUSH1 0x60 ADD DUP2 SWAP1 MSTORE POP PUSH2 0x65F DUP2 PUSH2 0x814 JUMP JUMPDEST DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x66B JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE POP PUSH1 0x1 ADD PUSH2 0x5E5 JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x2D9 CALLVALUE SELFBALANCE PUSH2 0xA1C JUMP JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x32E PUSH1 0x6 PUSH2 0xB5C JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x4 ADD DUP4 MLOAD LT ISZERO PUSH2 0x726 JUMPI PUSH2 0x726 PUSH2 0x291 PUSH1 0x3 DUP6 MLOAD DUP6 PUSH1 0x4 ADD PUSH2 0xB77 JUMP JUMPDEST POP ADD PUSH1 0x20 ADD MLOAD PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 AND SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH32 0xC7A7103E21E41A5C3158B3028D34CB9BB9593B10B1892F49D7187EFA71219D4E DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x787 SWAP3 SWAP2 SWAP1 PUSH2 0x29D0 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 MSTORE SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 MLOAD PUSH1 0x20 DUP3 ADD REVERT JUMPDEST PUSH1 0x60 PUSH2 0x81F DUP3 PUSH2 0xC1C JUMP JUMPDEST NUMBER PUSH2 0x828 PUSH2 0xA34 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP6 ADD MLOAD PUSH1 0x0 SWAP1 DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 DUP2 SWAP1 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE DUP3 ADD MLOAD PUSH2 0x120 ADD MLOAD ISZERO PUSH2 0x86D JUMPI PUSH1 0x40 DUP3 ADD MLOAD PUSH2 0x100 DUP2 ADD MLOAD DUP2 MLOAD DUP5 MLOAD PUSH2 0x120 SWAP1 SWAP4 ADD MLOAD PUSH2 0x86D SWAP4 SWAP1 PUSH2 0xDFD JUMP JUMPDEST PUSH1 0x40 DUP3 ADD MLOAD PUSH1 0xC0 ADD MLOAD PUSH2 0x881 SWAP1 PUSH1 0x0 PUSH2 0x705 JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 AND PUSH1 0x80 DUP4 ADD DUP2 SWAP1 MSTORE PUSH32 0x415565B000000000000000000000000000000000000000000000000000000000 EQ ISZERO PUSH2 0x8E1 JUMPI PUSH2 0x8DA DUP3 PUSH2 0x100E JUMP JUMPDEST SWAP1 POP PUSH2 0x9A4 JUMP JUMPDEST PUSH1 0x80 DUP3 ADD MLOAD PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 AND PUSH32 0xF6274F6600000000000000000000000000000000000000000000000000000000 EQ ISZERO PUSH2 0x938 JUMPI PUSH2 0x8DA DUP3 PUSH2 0x1215 JUMP JUMPDEST PUSH1 0x80 DUP3 ADD MLOAD PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 AND PUSH32 0xAA77476C00000000000000000000000000000000000000000000000000000000 EQ ISZERO PUSH2 0x98F JUMPI PUSH2 0x8DA DUP3 PUSH2 0x1339 JUMP JUMPDEST PUSH2 0x9A4 PUSH2 0x291 DUP4 PUSH1 0x20 ADD MLOAD DUP5 PUSH1 0x80 ADD MLOAD PUSH2 0x13C7 JUMP JUMPDEST DUP2 PUSH1 0x80 ADD MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND PUSH32 0x7F4FE3FF8AE440E1570C558DA08440B26F89FB1C1F2910CD91CA6452955F121A DUP4 PUSH1 0x20 ADD MLOAD DUP5 PUSH1 0x40 ADD MLOAD PUSH1 0x0 ADD MLOAD DUP6 PUSH1 0x40 ADD MLOAD PUSH1 0x20 ADD MLOAD PUSH1 0x40 MLOAD PUSH2 0xA0F SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2811 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP4 LT PUSH2 0xA2B JUMPI DUP2 PUSH2 0xA2D JUMP JUMPDEST DUP3 JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x32E PUSH1 0x5 PUSH2 0xB5C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x6EB224CB00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS SWAP1 PUSH4 0x6EB224CB SWAP1 PUSH2 0xA9F SWAP1 DUP5 SWAP1 PUSH32 0x0 SWAP1 PUSH1 0x4 ADD PUSH2 0x2988 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xAB9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0xACD JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0xB09 SWAP3 SWAP2 SWAP1 PUSH2 0x26DB JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x60 PUSH32 0x52974C3A86E985173F72E2FB84BA2BFCA8FB3B7C5031EB8077EBD59458ABF2A4 DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x787 SWAP3 SWAP2 SWAP1 PUSH2 0x28FE JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 PUSH1 0x7 DUP2 GT ISZERO PUSH2 0xB6C JUMPI INVALID JUMPDEST PUSH1 0x1 ADD SWAP1 SHL SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x60 PUSH4 0x28006595 PUSH1 0xE0 SHL DUP5 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0xB96 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2A4C JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 MSTORE SWAP1 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP2 ADD MLOAD PUSH1 0x20 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND ISZERO DUP1 ISZERO SWAP1 PUSH2 0xC81 JUMPI POP DUP1 PUSH1 0x0 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 PUSH1 0x40 ADD MLOAD PUSH1 0x20 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO JUMPDEST ISZERO PUSH2 0xCA4 JUMPI PUSH2 0xCA4 PUSH2 0x291 DUP3 PUSH1 0x20 ADD MLOAD DUP4 PUSH1 0x0 ADD MLOAD DUP5 PUSH1 0x40 ADD MLOAD PUSH1 0x20 ADD MLOAD PUSH2 0x13FD JUMP JUMPDEST TIMESTAMP DUP2 PUSH1 0x40 ADD MLOAD PUSH1 0x80 ADD MLOAD GT PUSH2 0xCCD JUMPI PUSH2 0xCCD PUSH2 0x291 DUP3 PUSH1 0x20 ADD MLOAD TIMESTAMP DUP5 PUSH1 0x40 ADD MLOAD PUSH1 0x80 ADD MLOAD PUSH2 0x1435 JUMP JUMPDEST GASPRICE DUP2 PUSH1 0x40 ADD MLOAD PUSH1 0x40 ADD MLOAD GT DUP1 PUSH2 0xCEA JUMPI POP GASPRICE DUP2 PUSH1 0x40 ADD MLOAD PUSH1 0x60 ADD MLOAD LT JUMPDEST ISZERO PUSH2 0xD12 JUMPI PUSH2 0xD12 PUSH2 0x291 DUP3 PUSH1 0x20 ADD MLOAD GASPRICE DUP5 PUSH1 0x40 ADD MLOAD PUSH1 0x40 ADD MLOAD DUP6 PUSH1 0x40 ADD MLOAD PUSH1 0x60 ADD MLOAD PUSH2 0x146D JUMP JUMPDEST SELFBALANCE PUSH1 0xA0 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x40 DUP3 ADD MLOAD PUSH1 0xE0 ADD MLOAD GT ISZERO PUSH2 0xD47 JUMPI PUSH2 0xD47 PUSH2 0x291 DUP3 PUSH1 0x20 ADD MLOAD DUP4 PUSH1 0xA0 ADD MLOAD DUP5 PUSH1 0x40 ADD MLOAD PUSH1 0xE0 ADD MLOAD PUSH2 0x152E JUMP JUMPDEST DUP1 PUSH1 0x40 ADD MLOAD PUSH1 0x0 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0xD78 DUP3 PUSH1 0x20 ADD MLOAD DUP4 PUSH1 0x60 ADD MLOAD PUSH2 0x1566 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0xDBE JUMPI PUSH2 0xDBE PUSH2 0x291 PUSH1 0x4 DUP4 PUSH1 0x20 ADD MLOAD DUP5 PUSH1 0x40 ADD MLOAD PUSH1 0x0 ADD MLOAD PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x16B7 JUMP JUMPDEST PUSH2 0xDC6 PUSH2 0xA34 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP4 ADD MLOAD PUSH1 0x0 SWAP1 DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xC0 DUP3 ADD DUP2 SWAP1 MSTORE ISZERO PUSH2 0xDFA JUMPI PUSH2 0xDFA PUSH2 0x291 DUP3 PUSH1 0x20 ADD MLOAD DUP4 PUSH1 0xC0 ADD MLOAD PUSH2 0x16F1 JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP7 AND ADDRESS EQ ISZERO PUSH2 0xE5A JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xE51 SWAP1 PUSH2 0x2AC9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0xE63 DUP7 PUSH2 0x1727 JUMP JUMPDEST ISZERO PUSH2 0xF37 JUMPI PUSH1 0x40 MLOAD PUSH32 0xDD62ED3E00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE DUP4 SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP9 AND SWAP1 PUSH4 0xDD62ED3E SWAP1 PUSH2 0xEBE SWAP1 DUP10 SWAP1 ADDRESS SWAP1 PUSH1 0x4 ADD PUSH2 0x2711 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xED6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xEEA JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0xF0E SWAP2 SWAP1 PUSH2 0x25CA JUMP JUMPDEST LT ISZERO PUSH2 0xF37 JUMPI PUSH2 0xF30 DUP7 DUP7 DUP7 DUP7 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x1767 JUMP JUMPDEST POP POP PUSH2 0x1008 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x23B872DD00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP7 AND PUSH1 0x4 DUP3 ADD MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP6 AND PUSH1 0x24 DUP3 ADD MSTORE DUP4 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x0 DUP1 PUSH1 0x64 DUP4 PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP13 AND GAS CALL SWAP3 POP RETURNDATASIZE DUP1 PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH1 0x1 PUSH1 0x20 DUP4 ADD MLOAD EQ PUSH1 0x20 DUP3 LT ISZERO AND DUP2 ISZERO OR DUP5 AND SWAP4 POP DUP4 PUSH2 0xFF1 JUMPI DUP1 DUP3 MSTORE DUP2 SWAP3 POP DUP1 PUSH1 0x20 DUP4 ADD ADD PUSH1 0x40 MSTORE JUMPDEST POP POP DUP2 PUSH2 0x1005 JUMPI PUSH2 0x1005 DUP7 DUP7 DUP7 DUP7 DUP6 PUSH2 0x1767 JUMP JUMPDEST POP POP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1018 PUSH2 0x1C37 JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MLOAD PUSH1 0xC0 ADD MLOAD MLOAD PUSH1 0x60 SWAP1 PUSH1 0x1C ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0x103E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x1F ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x1069 JUMPI PUSH1 0x20 DUP3 ADD DUP2 DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x60 DUP5 PUSH1 0x40 ADD MLOAD PUSH1 0xC0 ADD MLOAD SWAP1 POP PUSH1 0xA0 DUP2 MLOAD LT ISZERO PUSH2 0x1085 JUMPI INVALID JUMPDEST PUSH1 0x20 DUP3 DUP2 ADD MSTORE DUP1 MLOAD PUSH1 0x24 DUP3 ADD SWAP1 PUSH1 0x40 DUP5 ADD SWAP1 PUSH2 0x10C6 SWAP1 DUP3 SWAP1 DUP5 SWAP1 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC ADD PUSH2 0x182F JUMP JUMPDEST DUP4 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x10DA SWAP2 SWAP1 PUSH2 0x228A JUMP JUMPDEST SWAP5 POP POP POP POP POP PUSH2 0xA2D DUP4 PUSH1 0x20 ADD MLOAD PUSH4 0x62597192 PUSH1 0xE0 SHL PUSH1 0x40 MLOAD DUP1 PUSH1 0xC0 ADD PUSH1 0x40 MSTORE DUP1 DUP8 PUSH1 0x40 ADD MLOAD PUSH1 0x0 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP6 PUSH1 0x0 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP6 PUSH1 0x20 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP6 PUSH1 0x40 ADD MLOAD DUP2 MSTORE PUSH1 0x20 ADD DUP6 PUSH1 0x60 ADD MLOAD DUP2 MSTORE PUSH1 0x20 ADD DUP6 PUSH1 0x80 ADD MLOAD DUP2 MSTORE POP PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x118B SWAP2 SWAP1 PUSH2 0x2D11 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 DUP2 MSTORE PUSH1 0x20 DUP3 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP1 SWAP5 AND SWAP4 SWAP1 SWAP4 OR SWAP1 SWAP3 MSTORE SWAP1 DUP7 ADD MLOAD PUSH1 0xE0 ADD MLOAD PUSH2 0x1910 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x121F PUSH2 0x1C92 JUMP JUMPDEST PUSH2 0x1227 PUSH2 0x1CF6 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x123C DUP7 PUSH1 0x40 ADD MLOAD PUSH1 0xC0 ADD MLOAD PUSH2 0x199C JUMP JUMPDEST SWAP1 POP DUP1 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x1252 SWAP2 SWAP1 PUSH2 0x232D JUMP JUMPDEST PUSH1 0x20 DUP10 ADD MLOAD PUSH1 0x40 DUP1 DUP12 ADD MLOAD MLOAD SWAP1 MLOAD SWAP5 SWAP9 POP SWAP3 SWAP7 POP SWAP1 SWAP5 POP PUSH2 0x132F SWAP3 SWAP1 SWAP2 PUSH32 0x414E4CCF00000000000000000000000000000000000000000000000000000000 SWAP2 PUSH2 0x12A5 SWAP2 DUP10 SWAP2 DUP10 SWAP2 DUP10 SWAP2 CALLER SWAP1 PUSH1 0x24 ADD PUSH2 0x2B26 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 DUP2 MSTORE PUSH1 0x20 DUP3 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP1 SWAP5 AND SWAP4 SWAP1 SWAP4 OR SWAP1 SWAP3 MSTORE SWAP1 DUP10 ADD MLOAD PUSH1 0xE0 ADD MLOAD PUSH2 0x1910 JUMP JUMPDEST SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1343 PUSH2 0x1D1F JUMP JUMPDEST PUSH2 0x134B PUSH2 0x1CF6 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x1360 DUP7 PUSH1 0x40 ADD MLOAD PUSH1 0xC0 ADD MLOAD PUSH2 0x199C JUMP JUMPDEST SWAP1 POP DUP1 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x1376 SWAP2 SWAP1 PUSH2 0x24D7 JUMP JUMPDEST PUSH1 0x20 DUP10 ADD MLOAD PUSH1 0x40 DUP1 DUP12 ADD MLOAD MLOAD SWAP1 MLOAD SWAP5 SWAP9 POP SWAP3 SWAP7 POP SWAP1 SWAP5 POP PUSH2 0x132F SWAP3 SWAP1 SWAP2 PUSH32 0xA656186B00000000000000000000000000000000000000000000000000000000 SWAP2 PUSH2 0x12A5 SWAP2 DUP10 SWAP2 DUP10 SWAP2 DUP10 SWAP2 PUSH1 0x24 ADD PUSH2 0x2C37 JUMP JUMPDEST PUSH1 0x60 PUSH32 0x547A32A328D8A78DBE9BF090FA60BA3D4D1C6833A592A2C942666CE3249C1210 DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x787 SWAP3 SWAP2 SWAP1 PUSH2 0x28A3 JUMP JUMPDEST PUSH1 0x60 PUSH32 0xA78002A166FCAE5236D89E3FF35C53DADB775F7818DE4A020714CBA4BF360822 DUP5 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0xB96 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2811 JUMP JUMPDEST PUSH1 0x60 PUSH32 0xBEA726EFDF9868BBC5755DCE9F13D585B3CF731177BE75300D15BB8F5E286158 DUP5 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0xB96 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x290C JUMP JUMPDEST PUSH1 0x60 PUSH32 0x6FEC11A99EBB0FF14B6648F609F57864DADEBA8B29869C4DF2B3B76894147849 DUP6 DUP6 DUP6 DUP6 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x14A7 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2922 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 MSTORE SWAP1 POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH32 0xA5ADE45208123132815E1591A1C7E64045FD006152F5E85D100AEE42BA02C75 DUP5 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0xB96 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x290C JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1572 DUP4 DUP4 PUSH2 0x1A09 JUMP JUMPDEST PUSH1 0x2 DUP3 MLOAD PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x1581 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x15E9 JUMPI PUSH1 0x1 DUP4 DUP4 PUSH1 0x20 ADD MLOAD DUP5 PUSH1 0x40 ADD MLOAD DUP6 PUSH1 0x60 ADD MLOAD PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0x15B6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x293D JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x15D8 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD SUB MLOAD SWAP1 POP PUSH2 0x168E JUMP JUMPDEST PUSH1 0x3 DUP3 MLOAD PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x15F8 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x168E JUMPI PUSH1 0x0 PUSH32 0x19457468657265756D205369676E6564204D6573736167653A0A333200000000 PUSH1 0x0 MSTORE DUP4 PUSH1 0x1C MSTORE PUSH1 0x3C PUSH1 0x0 KECCAK256 SWAP1 POP PUSH1 0x1 DUP2 DUP5 PUSH1 0x20 ADD MLOAD DUP6 PUSH1 0x40 ADD MLOAD DUP7 PUSH1 0x60 ADD MLOAD PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0x165E SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x293D JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1680 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD SUB MLOAD SWAP2 POP POP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH2 0x32E JUMPI PUSH2 0x32E PUSH2 0x291 PUSH1 0x5 DUP6 PUSH2 0x1ABD JUMP JUMPDEST PUSH1 0x60 PUSH32 0x4C7607A3EBBA99C9ACDE0E2A04D88829F7001B63F028B796DDA6FF02406DDAD5 DUP6 DUP6 DUP6 DUP6 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x14A7 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2A85 JUMP JUMPDEST PUSH1 0x60 PUSH32 0xFE251A07F3CBFFD23C1C1DB9EC776D259099C832333D99EF48CACFA93A4D7B32 DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x787 SWAP3 SWAP2 SWAP1 PUSH2 0x28FE JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 SWAP1 KECCAK256 PUSH1 0x1 PUSH1 0xFF SWAP3 DUP4 AND DUP2 SWAP1 SHL SWAP3 SWAP1 SWAP2 AND SHL OR PUSH32 0x0 DUP2 AND EQ SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x89DD02E700000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS SWAP1 PUSH4 0x89DD02E7 SWAP1 PUSH2 0x17A9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 PUSH1 0x4 ADD PUSH2 0x2A15 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x17C3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0x17D4 JUMPI POP PUSH1 0x1 JUMPDEST PUSH2 0xACD JUMPI RETURNDATASIZE DUP1 DUP1 ISZERO PUSH2 0x1802 JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x1807 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP PUSH2 0x1829 PUSH2 0x291 DUP8 DUP8 DUP8 DUP8 DUP8 MLOAD PUSH1 0x0 EQ ISZERO PUSH2 0x1822 JUMPI DUP7 PUSH2 0x1824 JUMP JUMPDEST DUP8 JUMPDEST PUSH2 0x1AF3 JUMP JUMPDEST POP PUSH2 0xACD JUMP JUMPDEST PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x1876 JUMPI DUP2 MLOAD DUP4 MLOAD PUSH1 0x20 DUP4 SWAP1 SUB PUSH2 0x100 EXP PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ADD DUP1 NOT SWAP1 SWAP3 AND SWAP2 AND OR DUP4 MSTORE PUSH2 0x190B JUMP JUMPDEST DUP3 DUP3 EQ ISZERO PUSH2 0x1883 JUMPI PUSH2 0x190B JUMP JUMPDEST DUP3 DUP3 GT ISZERO PUSH2 0x18BD JUMPI PUSH1 0x20 DUP2 SUB SWAP1 POP DUP1 DUP3 ADD DUP2 DUP5 ADD DUP2 MLOAD JUMPDEST DUP3 DUP6 LT ISZERO PUSH2 0x18B5 JUMPI DUP5 MLOAD DUP7 MSTORE PUSH1 0x20 SWAP6 DUP7 ADD SWAP6 SWAP1 SWAP5 ADD SWAP4 PUSH2 0x189A JUMP JUMPDEST SWAP1 MSTORE POP PUSH2 0x190B JUMP JUMPDEST PUSH1 0x20 DUP2 SUB SWAP1 POP DUP1 DUP3 ADD DUP2 DUP5 ADD DUP4 MLOAD JUMPDEST DUP2 DUP7 SLT ISZERO PUSH2 0x1906 JUMPI DUP3 MLOAD DUP3 MSTORE PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 SWAP3 DUP4 ADD SWAP3 SWAP1 SWAP2 ADD SWAP1 PUSH2 0x18CC JUMP JUMPDEST DUP6 MSTORE POP POP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 ADDRESS PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 DUP6 PUSH1 0x40 MLOAD PUSH2 0x193A SWAP2 SWAP1 PUSH2 0x26BF JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP8 GAS CALL SWAP3 POP POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x1977 JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x197C JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP3 POP SWAP1 POP DUP1 PUSH2 0x1994 JUMPI PUSH2 0x1994 PUSH2 0x291 DUP7 DUP7 DUP6 PUSH2 0x1BB8 JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x4 DUP3 MLOAD SUB PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0x19B9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x1F ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x19E4 JUMPI PUSH1 0x20 DUP3 ADD DUP2 DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP1 PUSH1 0x24 DUP5 ADD SWAP2 POP PUSH1 0x20 DUP4 ADD SWAP1 POP PUSH2 0x1A02 DUP2 DUP4 DUP6 MLOAD PUSH2 0x182F JUMP JUMPDEST POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x40 DUP2 ADD MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 GT ISZERO DUP1 PUSH2 0x1A60 JUMPI POP PUSH1 0x60 DUP2 ADD MLOAD PUSH32 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A1 GT ISZERO JUMPDEST ISZERO PUSH2 0x1A73 JUMPI PUSH2 0x1A73 PUSH2 0x291 PUSH1 0x5 DUP5 PUSH2 0x1ABD JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x1A82 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x1A96 JUMPI PUSH2 0x1A96 PUSH2 0x291 PUSH1 0x3 DUP5 PUSH2 0x1ABD JUMP JUMPDEST PUSH1 0x1 DUP2 MLOAD PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x1AA5 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x1AB9 JUMPI PUSH2 0x1AB9 PUSH2 0x291 PUSH1 0x0 DUP5 PUSH2 0x1ABD JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x60 PUSH32 0xF18F11F3027E735C758137924B262D4D3AFF0037DCD785ACA3C699FA05D960BD DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x787 SWAP3 SWAP2 SWAP1 PUSH2 0x2A6E JUMP JUMPDEST PUSH1 0x60 PUSH32 0xDFDC6F57CF82BEDE92BCFDD44FEDB82B2D5CECABF56EC21964DB6EE2C3E82CF4 DUP7 DUP7 DUP7 DUP7 DUP7 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x1B2F SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2738 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 MSTORE SWAP1 POP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH32 0xA9F0C547643C02AFED4CF2699E794BC383EFFCA840EED62FDDB64A15A4E55BC4 DUP5 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0xB96 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x28D3 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0xE0 DUP2 ADD DUP3 MSTORE PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE SWAP1 DUP2 ADD PUSH2 0x1C0F PUSH2 0x1D73 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1C1C PUSH2 0x1CF6 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x0 PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x40 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x60 SWAP1 SWAP2 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0xA0 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH2 0x180 DUP2 ADD DUP3 MSTORE PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE SWAP2 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x60 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x80 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0xA0 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0xC0 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0xE0 DUP2 ADD DUP3 SWAP1 MSTORE PUSH2 0x100 DUP2 ADD DUP3 SWAP1 MSTORE PUSH2 0x120 DUP2 ADD DUP3 SWAP1 MSTORE PUSH2 0x140 DUP2 ADD DUP3 SWAP1 MSTORE PUSH2 0x160 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x80 DUP2 ADD SWAP1 SWAP2 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE PUSH1 0x0 PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x40 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x60 SWAP1 SWAP2 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH2 0x140 DUP2 ADD DUP3 MSTORE PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE SWAP2 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x60 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x80 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0xA0 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0xC0 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0xE0 DUP2 ADD DUP3 SWAP1 MSTORE PUSH2 0x100 DUP2 ADD DUP3 SWAP1 MSTORE PUSH2 0x120 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH2 0x140 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH2 0x32E DUP2 PUSH2 0x2E83 JUMP JUMPDEST DUP1 MLOAD PUSH2 0x32E DUP2 PUSH2 0x2E83 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x1E2E JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x1E41 PUSH2 0x1E3C DUP3 PUSH2 0x2DEB JUMP JUMPDEST PUSH2 0x2DC4 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD PUSH1 0x80 DUP1 DUP6 MUL DUP8 ADD DUP4 ADD DUP9 LT ISZERO PUSH2 0x1E64 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP6 DUP2 LT ISZERO PUSH2 0x1E8B JUMPI PUSH2 0x1E79 DUP10 DUP5 PUSH2 0x20C3 JUMP JUMPDEST DUP6 MSTORE SWAP4 DUP4 ADD SWAP4 SWAP2 DUP2 ADD SWAP2 PUSH1 0x1 ADD PUSH2 0x1E67 JUMP JUMPDEST POP POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x1EA7 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x1EB5 PUSH2 0x1E3C DUP3 PUSH2 0x2DEB JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x1F5C JUMPI DUP2 MLOAD DUP8 ADD PUSH1 0x40 DUP1 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP4 DUP13 SUB ADD SLT ISZERO PUSH2 0x1F05 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1F0E DUP2 PUSH2 0x2DC4 JUMP JUMPDEST PUSH2 0x1F1A DUP12 DUP8 DUP6 ADD PUSH2 0x2195 JUMP JUMPDEST DUP2 MSTORE SWAP1 DUP3 ADD MLOAD SWAP1 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x1F36 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1F44 DUP12 DUP8 DUP5 DUP7 ADD ADD PUSH2 0x1FB5 JUMP JUMPDEST DUP2 DUP8 ADD MSTORE DUP7 MSTORE POP POP SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x1EC6 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x1F77 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x1F85 PUSH2 0x1E3C DUP3 PUSH2 0x2E0B JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x1F9C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x1FC5 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x1FD3 PUSH2 0x1E3C DUP3 PUSH2 0x2E0B JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x1FEA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1FFB DUP2 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x2E4D JUMP JUMPDEST POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x140 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x2015 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x201E DUP2 PUSH2 0x2DC4 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x202B DUP4 DUP4 PUSH2 0x1E08 JUMP JUMPDEST DUP2 MSTORE PUSH2 0x203A DUP4 PUSH1 0x20 DUP5 ADD PUSH2 0x1E08 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 DUP3 ADD CALLDATALOAD PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 DUP3 ADD CALLDATALOAD PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 DUP3 ADD CALLDATALOAD PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 DUP3 ADD CALLDATALOAD PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xC0 DUP3 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x2081 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x208D DUP5 DUP3 DUP6 ADD PUSH2 0x1F67 JUMP JUMPDEST PUSH1 0xC0 DUP4 ADD MSTORE POP PUSH1 0xE0 DUP3 ADD CALLDATALOAD PUSH1 0xE0 DUP3 ADD MSTORE PUSH2 0x100 PUSH2 0x20AC DUP5 DUP3 DUP6 ADD PUSH2 0x1E08 JUMP JUMPDEST DUP2 DUP4 ADD MSTORE POP PUSH2 0x120 DUP1 DUP4 ADD CALLDATALOAD DUP2 DUP4 ADD MSTORE POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x20D4 JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x20DE PUSH1 0x80 PUSH2 0x2DC4 JUMP JUMPDEST SWAP1 POP DUP2 CALLDATALOAD PUSH2 0x20EB DUP2 PUSH2 0x2EA5 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 DUP3 ADD CALLDATALOAD PUSH2 0x20FB DUP2 PUSH2 0x2EB2 JUMP JUMPDEST DUP1 PUSH1 0x20 DUP4 ADD MSTORE POP PUSH1 0x40 DUP3 ADD CALLDATALOAD PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 DUP3 ADD CALLDATALOAD PUSH1 0x60 DUP3 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x212D JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x2137 PUSH1 0x80 PUSH2 0x2DC4 JUMP JUMPDEST SWAP1 POP DUP2 MLOAD PUSH2 0x2144 DUP2 PUSH2 0x2EA5 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 DUP3 ADD MLOAD PUSH2 0x2154 DUP2 PUSH2 0x2EB2 JUMP JUMPDEST DUP1 PUSH1 0x20 DUP4 ADD MSTORE POP PUSH1 0x40 DUP3 ADD MLOAD PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 DUP3 ADD MLOAD PUSH1 0x60 DUP3 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 MLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x32E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 MLOAD PUSH4 0xFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x32E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x32E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x21D3 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x21EA JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP6 ADD SWAP2 POP DUP6 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x21FD JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x220B PUSH2 0x1E3C DUP3 PUSH2 0x2DEB JUMP JUMPDEST DUP2 DUP2 MSTORE PUSH1 0x20 DUP1 DUP3 ADD SWAP2 SWAP1 DUP6 DUP2 ADD DUP9 JUMPDEST DUP6 DUP2 LT ISZERO PUSH2 0x2243 JUMPI PUSH2 0x2231 DUP13 DUP5 DUP5 CALLDATALOAD DUP12 ADD ADD PUSH2 0x2002 JUMP JUMPDEST DUP6 MSTORE SWAP4 DUP3 ADD SWAP4 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x221A JUMP JUMPDEST POP SWAP2 SWAP8 POP DUP9 ADD CALLDATALOAD SWAP5 POP POP POP POP DUP1 DUP3 GT ISZERO PUSH2 0x225B JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x2268 DUP6 DUP3 DUP7 ADD PUSH2 0x1E1E JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x2283 JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x229B JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x22B2 JUMPI DUP3 DUP4 REVERT JUMPDEST SWAP1 DUP4 ADD SWAP1 PUSH1 0xA0 DUP3 DUP7 SUB SLT ISZERO PUSH2 0x22C5 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x22CF PUSH1 0xA0 PUSH2 0x2DC4 JUMP JUMPDEST PUSH2 0x22D9 DUP7 DUP5 PUSH2 0x1E13 JUMP JUMPDEST DUP2 MSTORE PUSH2 0x22E8 DUP7 PUSH1 0x20 DUP6 ADD PUSH2 0x1E13 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 DUP4 ADD MLOAD PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 DUP4 ADD MLOAD PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 DUP4 ADD MLOAD DUP3 DUP2 GT ISZERO PUSH2 0x2312 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0x231E DUP8 DUP3 DUP7 ADD PUSH2 0x1E97 JUMP JUMPDEST PUSH1 0x80 DUP4 ADD MSTORE POP SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP4 DUP6 SUB PUSH2 0x220 DUP2 SLT ISZERO PUSH2 0x2343 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x180 DUP1 DUP3 SLT ISZERO PUSH2 0x2352 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x235B DUP2 PUSH2 0x2DC4 JUMP JUMPDEST SWAP2 POP PUSH2 0x2367 DUP8 DUP8 PUSH2 0x1E13 JUMP JUMPDEST DUP3 MSTORE PUSH2 0x2376 DUP8 PUSH1 0x20 DUP9 ADD PUSH2 0x1E13 JUMP JUMPDEST PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0x2388 DUP8 PUSH1 0x40 DUP9 ADD PUSH2 0x2175 JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MSTORE PUSH2 0x239A DUP8 PUSH1 0x60 DUP9 ADD PUSH2 0x2175 JUMP JUMPDEST PUSH1 0x60 DUP4 ADD MSTORE PUSH2 0x23AC DUP8 PUSH1 0x80 DUP9 ADD PUSH2 0x2175 JUMP JUMPDEST PUSH1 0x80 DUP4 ADD MSTORE PUSH2 0x23BE DUP8 PUSH1 0xA0 DUP9 ADD PUSH2 0x1E13 JUMP JUMPDEST PUSH1 0xA0 DUP4 ADD MSTORE PUSH2 0x23D0 DUP8 PUSH1 0xC0 DUP9 ADD PUSH2 0x1E13 JUMP JUMPDEST PUSH1 0xC0 DUP4 ADD MSTORE PUSH2 0x23E2 DUP8 PUSH1 0xE0 DUP9 ADD PUSH2 0x1E13 JUMP JUMPDEST PUSH1 0xE0 DUP4 ADD MSTORE PUSH2 0x100 PUSH2 0x23F6 DUP9 DUP3 DUP10 ADD PUSH2 0x1E13 JUMP JUMPDEST SWAP1 DUP4 ADD MSTORE PUSH2 0x120 DUP7 DUP2 ADD MLOAD SWAP1 DUP4 ADD MSTORE PUSH2 0x140 PUSH2 0x2414 DUP9 DUP3 DUP10 ADD PUSH2 0x21A9 JUMP JUMPDEST DUP2 DUP5 ADD MSTORE POP PUSH2 0x160 DUP1 DUP8 ADD MLOAD DUP2 DUP5 ADD MSTORE POP DUP2 SWAP5 POP PUSH2 0x2434 DUP8 DUP3 DUP9 ADD PUSH2 0x211C JUMP JUMPDEST SWAP4 POP POP POP PUSH2 0x2446 DUP6 PUSH2 0x200 DUP7 ADD PUSH2 0x2175 JUMP JUMPDEST SWAP1 POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x2460 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x2476 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x2482 DUP5 DUP3 DUP6 ADD PUSH2 0x2002 JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0xA0 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x249C JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x24B2 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x24BE DUP6 DUP3 DUP7 ADD PUSH2 0x2002 JUMP JUMPDEST SWAP3 POP POP PUSH2 0x24CE DUP5 PUSH1 0x20 DUP6 ADD PUSH2 0x20C3 JUMP JUMPDEST SWAP1 POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP4 DUP6 SUB PUSH2 0x1E0 DUP2 SLT ISZERO PUSH2 0x24ED JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x140 DUP1 DUP3 SLT ISZERO PUSH2 0x24FC JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x2505 DUP2 PUSH2 0x2DC4 JUMP JUMPDEST SWAP2 POP PUSH2 0x2511 DUP8 DUP8 PUSH2 0x1E13 JUMP JUMPDEST DUP3 MSTORE PUSH2 0x2520 DUP8 PUSH1 0x20 DUP9 ADD PUSH2 0x1E13 JUMP JUMPDEST PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0x2532 DUP8 PUSH1 0x40 DUP9 ADD PUSH2 0x2175 JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MSTORE PUSH2 0x2544 DUP8 PUSH1 0x60 DUP9 ADD PUSH2 0x2175 JUMP JUMPDEST PUSH1 0x60 DUP4 ADD MSTORE PUSH2 0x2556 DUP8 PUSH1 0x80 DUP9 ADD PUSH2 0x1E13 JUMP JUMPDEST PUSH1 0x80 DUP4 ADD MSTORE PUSH2 0x2568 DUP8 PUSH1 0xA0 DUP9 ADD PUSH2 0x1E13 JUMP JUMPDEST PUSH1 0xA0 DUP4 ADD MSTORE PUSH2 0x257A DUP8 PUSH1 0xC0 DUP9 ADD PUSH2 0x1E13 JUMP JUMPDEST PUSH1 0xC0 DUP4 ADD MSTORE PUSH1 0xE0 DUP7 ADD MLOAD PUSH1 0xE0 DUP4 ADD MSTORE PUSH2 0x100 PUSH2 0x2598 DUP9 DUP3 DUP10 ADD PUSH2 0x21A9 JUMP JUMPDEST DUP2 DUP5 ADD MSTORE POP PUSH2 0x120 DUP1 DUP8 ADD MLOAD DUP2 DUP5 ADD MSTORE POP DUP2 SWAP5 POP PUSH2 0x25B8 DUP8 DUP3 DUP9 ADD PUSH2 0x211C JUMP JUMPDEST SWAP4 POP POP POP PUSH2 0x2446 DUP6 PUSH2 0x1C0 DUP7 ADD PUSH2 0x2175 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x25DB JUMPI DUP1 DUP2 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH4 0xFFFFFFFF DUP3 MLOAD AND DUP4 MSTORE PUSH1 0x20 DUP3 ADD MLOAD PUSH1 0x40 PUSH1 0x20 DUP6 ADD MSTORE PUSH2 0x2482 PUSH1 0x40 DUP6 ADD DUP3 PUSH2 0x2621 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 MSTORE JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH2 0x2639 DUP2 PUSH1 0x20 DUP7 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x2E4D JUMP JUMPDEST PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 MLOAD PUSH1 0x4 DUP2 LT PUSH2 0x2677 JUMPI INVALID JUMPDEST DUP3 MSTORE PUSH1 0x20 DUP2 DUP2 ADD MLOAD PUSH1 0xFF AND SWAP1 DUP4 ADD MSTORE PUSH1 0x40 DUP1 DUP3 ADD MLOAD SWAP1 DUP4 ADD MSTORE PUSH1 0x60 SWAP1 DUP2 ADD MLOAD SWAP2 ADD MSTORE JUMP JUMPDEST PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 MSTORE JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF AND SWAP1 MSTORE JUMP JUMPDEST PUSH1 0x0 DUP3 MLOAD PUSH2 0x26D1 DUP2 DUP5 PUSH1 0x20 DUP8 ADD PUSH2 0x2E4D JUMP JUMPDEST SWAP2 SWAP1 SWAP2 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x1901000000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x2 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x22 DUP3 ADD MSTORE PUSH1 0x42 ADD SWAP1 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP3 DUP4 AND DUP2 MSTORE SWAP2 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP9 AND DUP4 MSTORE DUP1 DUP8 AND PUSH1 0x20 DUP5 ADD MSTORE DUP1 DUP7 AND PUSH1 0x40 DUP5 ADD MSTORE POP DUP4 PUSH1 0x60 DUP4 ADD MSTORE PUSH1 0xA0 PUSH1 0x80 DUP4 ADD MSTORE PUSH2 0x277F PUSH1 0xA0 DUP4 ADD DUP5 PUSH2 0x2621 JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 ADD DUP2 DUP5 MSTORE DUP1 DUP6 MLOAD DUP1 DUP4 MSTORE PUSH1 0x40 DUP7 ADD SWAP2 POP PUSH1 0x40 DUP5 DUP3 MUL DUP8 ADD ADD SWAP3 POP DUP4 DUP8 ADD DUP6 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x27FB JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0 DUP9 DUP7 SUB ADD DUP5 MSTORE PUSH2 0x27E9 DUP6 DUP4 MLOAD PUSH2 0x2621 JUMP JUMPDEST SWAP5 POP SWAP3 DUP6 ADD SWAP3 SWAP1 DUP6 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x27AF JUMP JUMPDEST POP SWAP3 SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 DUP4 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 DUP3 AND PUSH1 0x20 DUP5 ADD MSTORE AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP11 DUP12 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP10 DUP11 AND PUSH1 0x20 DUP13 ADD MSTORE SWAP8 DUP10 AND PUSH1 0x40 DUP12 ADD MSTORE PUSH1 0x60 DUP11 ADD SWAP7 SWAP1 SWAP7 MSTORE PUSH1 0x80 DUP10 ADD SWAP5 SWAP1 SWAP5 MSTORE PUSH1 0xA0 DUP9 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0xC0 DUP8 ADD MSTORE PUSH1 0xE0 DUP7 ADD MSTORE PUSH2 0x100 DUP6 ADD MSTORE SWAP1 SWAP2 AND PUSH2 0x120 DUP4 ADD MSTORE PUSH2 0x140 DUP3 ADD MSTORE PUSH2 0x160 ADD SWAP1 JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP5 DUP3 MSTORE PUSH1 0x60 PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0x28EC PUSH1 0x60 DUP4 ADD DUP6 PUSH2 0x2621 JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x40 DUP5 ADD MSTORE PUSH2 0x132F DUP2 DUP6 PUSH2 0x2621 JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST SWAP3 DUP4 MSTORE PUSH1 0x20 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0x20 DUP5 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP3 SWAP1 SWAP3 AND DUP3 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP3 SWAP1 SWAP3 AND DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0xA2D PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x2621 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP5 DUP6 AND DUP2 MSTORE SWAP3 DUP5 AND PUSH1 0x20 DUP5 ADD MSTORE SWAP3 AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP2 ADD PUSH1 0x8 DUP6 LT PUSH2 0x2A5A JUMPI INVALID JUMPDEST SWAP4 DUP2 MSTORE PUSH1 0x20 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 SWAP1 SWAP2 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP2 ADD PUSH2 0x2A7B DUP5 PUSH2 0x2E79 JUMP JUMPDEST SWAP3 DUP2 MSTORE PUSH1 0x20 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2A90 DUP7 PUSH2 0x2E79 JUMP JUMPDEST DUP6 DUP3 MSTORE DUP5 PUSH1 0x20 DUP4 ADD MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP5 AND PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x80 PUSH1 0x60 DUP4 ADD MSTORE PUSH2 0x132F PUSH1 0x80 DUP4 ADD DUP5 PUSH2 0x2621 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x24 SWAP1 DUP3 ADD MSTORE PUSH32 0x466978696E546F6B656E5370656E6465722F43414E4E4F545F494E564F4B455F PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x53454C4600000000000000000000000000000000000000000000000000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x260 DUP3 ADD SWAP1 POP PUSH2 0x2B3A DUP3 DUP9 MLOAD PUSH2 0x2607 JUMP JUMPDEST PUSH1 0x20 DUP8 ADD MLOAD PUSH2 0x2B4C PUSH1 0x20 DUP5 ADD DUP3 PUSH2 0x2607 JUMP JUMPDEST POP PUSH1 0x40 DUP8 ADD MLOAD PUSH2 0x2B5F PUSH1 0x40 DUP5 ADD DUP3 PUSH2 0x269B JUMP JUMPDEST POP PUSH1 0x60 DUP8 ADD MLOAD PUSH2 0x2B72 PUSH1 0x60 DUP5 ADD DUP3 PUSH2 0x269B JUMP JUMPDEST POP PUSH1 0x80 DUP8 ADD MLOAD PUSH2 0x2B85 PUSH1 0x80 DUP5 ADD DUP3 PUSH2 0x269B JUMP JUMPDEST POP PUSH1 0xA0 DUP8 ADD MLOAD PUSH2 0x2B98 PUSH1 0xA0 DUP5 ADD DUP3 PUSH2 0x2607 JUMP JUMPDEST POP PUSH1 0xC0 DUP8 ADD MLOAD PUSH2 0x2BAB PUSH1 0xC0 DUP5 ADD DUP3 PUSH2 0x2607 JUMP JUMPDEST POP PUSH1 0xE0 DUP8 ADD MLOAD PUSH2 0x2BBE PUSH1 0xE0 DUP5 ADD DUP3 PUSH2 0x2607 JUMP JUMPDEST POP PUSH2 0x100 DUP1 DUP9 ADD MLOAD PUSH2 0x2BD2 DUP3 DUP6 ADD DUP3 PUSH2 0x2607 JUMP JUMPDEST POP POP PUSH2 0x120 DUP8 DUP2 ADD MLOAD SWAP1 DUP4 ADD MSTORE PUSH2 0x140 DUP1 DUP9 ADD MLOAD PUSH2 0x2BF2 DUP3 DUP6 ADD DUP3 PUSH2 0x26B1 JUMP JUMPDEST POP POP PUSH2 0x160 DUP8 DUP2 ADD MLOAD SWAP1 DUP4 ADD MSTORE PUSH2 0x2C0D PUSH2 0x180 DUP4 ADD DUP8 PUSH2 0x266B JUMP JUMPDEST PUSH2 0x2C1B PUSH2 0x200 DUP4 ADD DUP7 PUSH2 0x269B JUMP JUMPDEST PUSH2 0x2C29 PUSH2 0x220 DUP4 ADD DUP6 PUSH2 0x2607 JUMP JUMPDEST PUSH2 0x132F PUSH2 0x240 DUP4 ADD DUP5 PUSH2 0x2607 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x200 DUP3 ADD SWAP1 POP PUSH2 0x2C4B DUP3 DUP8 MLOAD PUSH2 0x2607 JUMP JUMPDEST PUSH1 0x20 DUP7 ADD MLOAD PUSH2 0x2C5D PUSH1 0x20 DUP5 ADD DUP3 PUSH2 0x2607 JUMP JUMPDEST POP PUSH1 0x40 DUP7 ADD MLOAD PUSH2 0x2C70 PUSH1 0x40 DUP5 ADD DUP3 PUSH2 0x269B JUMP JUMPDEST POP PUSH1 0x60 DUP7 ADD MLOAD PUSH2 0x2C83 PUSH1 0x60 DUP5 ADD DUP3 PUSH2 0x269B JUMP JUMPDEST POP PUSH1 0x80 DUP7 ADD MLOAD PUSH2 0x2C96 PUSH1 0x80 DUP5 ADD DUP3 PUSH2 0x2607 JUMP JUMPDEST POP PUSH1 0xA0 DUP7 ADD MLOAD PUSH2 0x2CA9 PUSH1 0xA0 DUP5 ADD DUP3 PUSH2 0x2607 JUMP JUMPDEST POP PUSH1 0xC0 DUP7 ADD MLOAD PUSH2 0x2CBC PUSH1 0xC0 DUP5 ADD DUP3 PUSH2 0x2607 JUMP JUMPDEST POP PUSH1 0xE0 DUP7 ADD MLOAD PUSH1 0xE0 DUP4 ADD MSTORE PUSH2 0x100 DUP1 DUP8 ADD MLOAD PUSH2 0x2CDA DUP3 DUP6 ADD DUP3 PUSH2 0x26B1 JUMP JUMPDEST POP POP PUSH2 0x120 DUP7 DUP2 ADD MLOAD SWAP1 DUP4 ADD MSTORE PUSH2 0x2CF5 PUSH2 0x140 DUP4 ADD DUP7 PUSH2 0x266B JUMP JUMPDEST PUSH2 0x2D03 PUSH2 0x1C0 DUP4 ADD DUP6 PUSH2 0x269B JUMP JUMPDEST PUSH2 0x1BAF PUSH2 0x1E0 DUP4 ADD DUP5 PUSH2 0x2607 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 MSTORE PUSH1 0xE0 DUP4 ADD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP7 MLOAD AND DUP4 DUP7 ADD MSTORE DUP1 DUP4 DUP8 ADD MLOAD AND PUSH1 0x40 DUP7 ADD MSTORE DUP1 PUSH1 0x40 DUP8 ADD MLOAD AND PUSH1 0x60 DUP7 ADD MSTORE POP PUSH1 0x60 DUP6 ADD MLOAD PUSH1 0x80 DUP6 ADD MSTORE PUSH1 0x80 DUP6 ADD MLOAD PUSH1 0xA0 DUP6 ADD MSTORE PUSH1 0xA0 DUP6 ADD MLOAD PUSH1 0xC0 DUP1 DUP7 ADD MSTORE DUP2 DUP2 MLOAD PUSH2 0x2D7D DUP2 DUP6 PUSH2 0x2808 JUMP JUMPDEST SWAP4 POP SWAP2 DUP5 ADD SWAP2 DUP4 SWAP2 POP DUP1 DUP6 MUL DUP3 ADD DUP7 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x2DB7 JUMPI DUP6 DUP3 SUB DUP5 MSTORE PUSH2 0x2DA5 DUP3 DUP7 MLOAD PUSH2 0x25E2 JUMP JUMPDEST SWAP5 DUP8 ADD SWAP5 SWAP4 DUP8 ADD SWAP4 SWAP2 POP PUSH1 0x1 ADD PUSH2 0x2D8D JUMP JUMPDEST POP SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x2DE3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x2E01 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x2E21 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x2E68 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x2E50 JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x1008 JUMPI POP POP PUSH1 0x0 SWAP2 ADD MSTORE JUMP JUMPDEST PUSH1 0x6 DUP2 LT PUSH2 0xDFA JUMPI INVALID JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0xDFA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 DUP2 LT PUSH2 0xDFA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0xDFA JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH23 0x74255D0BC140B6A4D94A61F4B412482233613D8EC887EB 0x2D TIMESTAMP CREATE2 LT 0xB0 ADDRESS MSIZE PUSH32 0x64736F6C634300060C0033000000000000000000000000000000000000000000 ",
|
|
"sourceMap": "1445:18737:8:-:0;;;2892:23;2907:1;;2913;2892:14;:23::i;:::-;2840:75;;3034:385;2987:432;;3757:255;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1920:4:19;1894:31;;;;1286:487:20;;3923:23:8;;3882:13;;1209:9:20;;1286:487;;1318:292;;1632:19;;1673:18;;1209:9;;3882:13:8;;1286:487:20;;;:::i;:::-;;;;-1:-1:-1;;1286:487:20;;;;;;;;;1259:528;;1286:487;1259:528;;;;1233:554;;-1:-1:-1;;1614:52:22;;-1:-1:-1;1445:18737:8;;-1:-1:-1;1445:18737:8;2672:235:19;2834:20;2852:2;2834:20;;;;2859;2877:2;2859:20;;;;2833:47;2883:17;;;2833:67;2672:235;;;;;:::o;287:399:-1:-;;;419:2;407:9;398:7;394:23;390:32;387:2;;;-1:-1;;425:12;387:2;83:13;;-1:-1;;;;;1967:54;;2171:35;;2161:2;;-1:-1;;2210:12;2161:2;588;638:22;;;;224:13;477:74;;224:13;;-1:-1;;;381:305::o;1053:668::-;884:37;;;1457:2;1442:18;;884:37;;;;1540:2;1525:18;;884:37;;;;1623:2;1608:18;;884:37;-1:-1;;;;;1967:54;1706:3;1691:19;;764:37;1292:3;1277:19;;1263:458::o;:::-;1445:18737:8;;;;;;;;;;;;;;;;;;;;;;;"
|
|
},
|
|
"deployedBytecode": {
|
|
"immutableReferences": {
|
|
"868": [
|
|
{
|
|
"length": 32,
|
|
"start": 516
|
|
}
|
|
],
|
|
"874": [
|
|
{
|
|
"length": 32,
|
|
"start": 1155
|
|
},
|
|
{
|
|
"length": 32,
|
|
"start": 1678
|
|
}
|
|
],
|
|
"2900": [
|
|
{
|
|
"length": 32,
|
|
"start": 2679
|
|
}
|
|
],
|
|
"3030": [
|
|
{
|
|
"length": 32,
|
|
"start": 1750
|
|
},
|
|
{
|
|
"length": 32,
|
|
"start": 2776
|
|
}
|
|
],
|
|
"3178": [
|
|
{
|
|
"length": 32,
|
|
"start": 1714
|
|
},
|
|
{
|
|
"length": 32,
|
|
"start": 5954
|
|
}
|
|
]
|
|
},
|
|
"linkReferences": {},
|
|
"object": "0x6080604052600436106100bc5760003560e01c80638fd3ab8011610074578063d036092d1161004e578063d036092d146101c3578063d925a56d146101d8578063dab400f3146101ed576100bc565b80638fd3ab8014610161578063ae55049714610183578063c5579ec8146101a3576100bc565b80633fb2da38116100a55780633fb2da381461010c5780636ae4b4f71461012c57806372d17d0314610141576100bc565b8063031b905c146100c15780633d61ed3e146100ec575b600080fd5b3480156100cd57600080fd5b506100d6610202565b6040516100e39190612808565b60405180910390f35b6100ff6100fa36600461248a565b610226565b6040516100e39190612a02565b34801561011857600080fd5b506100d661012736600461244f565b610320565b34801561013857600080fd5b506100ff610334565b34801561014d57600080fd5b506100d661015c366004612272565b61036d565b34801561016d57600080fd5b50610176610388565b6040516100e3919061295b565b34801561018f57600080fd5b506100d661019e36600461244f565b61047c565b6101b66101b13660046121c1565b610512565b6040516100e3919061278a565b3480156101cf57600080fd5b506100d661068c565b3480156101e457600080fd5b506100d66106b0565b3480156101f957600080fd5b506100d66106d4565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060600160006102346106f8565b8054909150828116156102965761029661029161028b600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092939250506107059050565b85610751565b61080c565b821781556102a2611bf0565b338152604081018690526102b58661047c565b6020820152606081018590526102ca81610814565b93505060006102d93447610a1c565b9050801561031057604051339082156108fc029083906000818181858888f1935050505015801561030e573d6000803e3d6000fd5b505b5080549119909116905592915050565b600061032e61015c8361047c565b92915050565b6040518060400160405280601081526020017f4d6574615472616e73616374696f6e730000000000000000000000000000000081525081565b6000610377610a34565b600092835260205250604090205490565b60006103b37f3d61ed3e00000000000000000000000000000000000000000000000000000000610a41565b6103dc7fc5579ec800000000000000000000000000000000000000000000000000000000610a41565b6104057f3fb2da3800000000000000000000000000000000000000000000000000000000610a41565b61042e7f72d17d0300000000000000000000000000000000000000000000000000000000610a41565b6104577fae55049700000000000000000000000000000000000000000000000000000000610a41565b507f2c64c5ef0000000000000000000000000000000000000000000000000000000090565b600061032e7f0000000000000000000000000000000000000000000000000000000000000000836000015184602001518560400151866060015187608001518860a001518960c00151805190602001208a60e001518b61010001518c61012001516040516020016104f79b9a9998979695949392919061283d565b60405160208183030381529060405280519060200120610ad4565b6060600160006105206106f8565b8054909150828116156105775761057761029161028b600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092939250506107059050565b8217815583518551146105935761059361029186518651610b26565b845167ffffffffffffffff811180156105ab57600080fd5b506040519080825280602002602001820160405280156105df57816020015b60608152602001906001900390816105ca5790505b50925060005b855181101561067f576105f6611bf0565b338152865187908390811061060757fe5b6020026020010151816040018190525061063387838151811061062657fe5b602002602001015161047c565b6020820152855186908390811061064657fe5b6020026020010151816060018190525061065f81610814565b85838151811061066b57fe5b6020908102919091010152506001016105e5565b5060006102d93447610a1c565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008061032e6006610b5c565b60008160040183511015610726576107266102916003855185600401610b77565b5001602001517fffffffff000000000000000000000000000000000000000000000000000000001690565b60607fc7a7103e21e41a5c3158b3028d34cb9bb9593b10b1892f49d7187efa71219d4e83836040516024016107879291906129d0565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905092915050565b805160208201fd5b606061081f82610c1c565b43610828610a34565b60208085015160009081529190526040908190209190915582015161012001511561086d576040820151610100810151815184516101209093015161086d9390610dfd565b604082015160c00151610881906000610705565b7fffffffff0000000000000000000000000000000000000000000000000000000016608083018190527f415565b00000000000000000000000000000000000000000000000000000000014156108e1576108da8261100e565b90506109a4565b60808201517fffffffff00000000000000000000000000000000000000000000000000000000167ff6274f66000000000000000000000000000000000000000000000000000000001415610938576108da82611215565b60808201517fffffffff00000000000000000000000000000000000000000000000000000000167faa77476c00000000000000000000000000000000000000000000000000000000141561098f576108da82611339565b6109a4610291836020015184608001516113c7565b81608001517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f7f4fe3ff8ae440e1570c558da08440b26f89fb1c1f2910cd91ca6452955f121a8360200151846040015160000151856040015160200151604051610a0f93929190612811565b60405180910390a2919050565b6000818310610a2b5781610a2d565b825b9392505050565b60008061032e6005610b5c565b6040517f6eb224cb0000000000000000000000000000000000000000000000000000000081523090636eb224cb90610a9f9084907f000000000000000000000000000000000000000000000000000000000000000090600401612988565b600060405180830381600087803b158015610ab957600080fd5b505af1158015610acd573d6000803e3d6000fd5b5050505050565b60007f000000000000000000000000000000000000000000000000000000000000000082604051602001610b099291906126db565b604051602081830303815290604052805190602001209050919050565b60607f52974c3a86e985173f72e2fb84ba2bfca8fb3b7c5031eb8077ebd59458abf2a483836040516024016107879291906128fe565b60006080826007811115610b6c57fe5b600101901b92915050565b6060632800659560e01b848484604051602401610b9693929190612a4c565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290509392505050565b60408101516020015173ffffffffffffffffffffffffffffffffffffffff1615801590610c815750806000015173ffffffffffffffffffffffffffffffffffffffff1681604001516020015173ffffffffffffffffffffffffffffffffffffffff1614155b15610ca457610ca4610291826020015183600001518460400151602001516113fd565b4281604001516080015111610ccd57610ccd610291826020015142846040015160800151611435565b3a8160400151604001511180610cea57503a816040015160600151105b15610d1257610d1261029182602001513a84604001516040015185604001516060015161146d565b4760a08201819052604082015160e001511115610d4757610d4761029182602001518360a00151846040015160e0015161152e565b80604001516000015173ffffffffffffffffffffffffffffffffffffffff16610d7882602001518360600151611566565b73ffffffffffffffffffffffffffffffffffffffff1614610dbe57610dbe61029160048360200151846040015160000151604051806020016040528060008152506116b7565b610dc6610a34565b6020808301516000908152919052604090205460c0820181905215610dfa57610dfa61029182602001518360c001516116f1565b50565b6000606073ffffffffffffffffffffffffffffffffffffffff8616301415610e5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5190612ac9565b60405180910390fd5b610e6386611727565b15610f37576040517fdd62ed3e000000000000000000000000000000000000000000000000000000008152839073ffffffffffffffffffffffffffffffffffffffff88169063dd62ed3e90610ebe9089903090600401612711565b60206040518083038186803b158015610ed657600080fd5b505afa158015610eea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0e91906125ca565b1015610f3757610f308686868660405180602001604052806000815250611767565b5050611008565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8616600482015273ffffffffffffffffffffffffffffffffffffffff85166024820152836044820152600080606483600073ffffffffffffffffffffffffffffffffffffffff8c165af192503d806000602084013e60016020830151146020821015168115178416935083610ff1578082528192508060208301016040525b505081611005576110058686868685611767565b50505b50505050565b6060611018611c37565b604083015160c0015151606090601c0167ffffffffffffffff8111801561103e57600080fd5b506040519080825280601f01601f191660200182016040528015611069576020820181803683370190505b5090506060846040015160c00151905060a08151101561108557fe5b6020828101528051602482019060408401906110c690829084907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0161182f565b838060200190518101906110da919061228a565b945050505050610a2d8360200151636259719260e01b6040518060c0016040528087604001516000015173ffffffffffffffffffffffffffffffffffffffff168152602001856000015173ffffffffffffffffffffffffffffffffffffffff168152602001856020015173ffffffffffffffffffffffffffffffffffffffff1681526020018560400151815260200185606001518152602001856080015181525060405160240161118b9190612d11565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093179092529086015160e00151611910565b606061121f611c92565b611227611cf6565b6000606061123c866040015160c0015161199c565b905080806020019051810190611252919061232d565b60208901516040808b015151905194985092965090945061132f9290917f414e4ccf00000000000000000000000000000000000000000000000000000000916112a5918991899189913390602401612b26565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093179092529089015160e00151611910565b9695505050505050565b6060611343611d1f565b61134b611cf6565b60006060611360866040015160c0015161199c565b90508080602001905181019061137691906124d7565b60208901516040808b015151905194985092965090945061132f9290917fa656186b00000000000000000000000000000000000000000000000000000000916112a591899189918991602401612c37565b60607f547a32a328d8a78dbe9bf090fa60ba3d4d1c6833a592a2c942666ce3249c121083836040516024016107879291906128a3565b60607fa78002a166fcae5236d89e3ff35c53dadb775f7818de4a020714cba4bf360822848484604051602401610b9693929190612811565b60607fbea726efdf9868bbc5755dce9f13d585b3cf731177be75300d15bb8f5e286158848484604051602401610b969392919061290c565b60607f6fec11a99ebb0ff14b6648f609f57864dadeba8b29869c4df2b3b76894147849858585856040516024016114a79493929190612922565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529050949350505050565b60607f0a5ade45208123132815e1591a1c7e64045fd006152f5e85d100aee42ba02c75848484604051602401610b969392919061290c565b60006115728383611a09565b60028251600381111561158157fe5b14156115e957600183836020015184604001518560600151604051600081526020016040526040516115b6949392919061293d565b6020604051602081039080840390855afa1580156115d8573d6000803e3d6000fd5b50505060206040510351905061168e565b6003825160038111156115f857fe5b141561168e5760007f19457468657265756d205369676e6564204d6573736167653a0a33320000000060005283601c52603c60002090506001818460200151856040015186606001516040516000815260200160405260405161165e949392919061293d565b6020604051602081039080840390855afa158015611680573d6000803e3d6000fd5b505050602060405103519150505b73ffffffffffffffffffffffffffffffffffffffff811661032e5761032e610291600585611abd565b60607f4c7607a3ebba99c9acde0e2a04d88829f7001b63f028b796dda6ff02406ddad5858585856040516024016114a79493929190612a85565b60607ffe251a07f3cbffd23c1c1db9ec776d259099c832333d99ef48cacfa93a4d7b3283836040516024016107879291906128fe565b600081815260209020600160ff92831681901b929091161b177f000000000000000000000000000000000000000000000000000000000000000081161490565b6040517f89dd02e700000000000000000000000000000000000000000000000000000000815230906389dd02e7906117a9908890889088908890600401612a15565b600060405180830381600087803b1580156117c357600080fd5b505af19250505080156117d4575060015b610acd573d808015611802576040519150601f19603f3d011682016040523d82523d6000602084013e611807565b606091505b50611829610291878787878751600014156118225786611824565b875b611af3565b50610acd565b6020811015611876578151835160208390036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018019909216911617835261190b565b828214156118835761190b565b828211156118bd5760208103905080820181840181515b828510156118b557845186526020958601959094019361189a565b90525061190b565b60208103905080820181840183515b8186121561190657825182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe092830192909101906118cc565b855250505b505050565b606060003073ffffffffffffffffffffffffffffffffffffffff16838560405161193a91906126bf565b60006040518083038185875af1925050503d8060008114611977576040519150601f19603f3d011682016040523d82523d6000602084013e61197c565b606091505b50925090508061199457611994610291868685611bb8565b509392505050565b6060600482510367ffffffffffffffff811180156119b957600080fd5b506040519080825280601f01601f1916602001820160405280156119e4576020820181803683370190505b509050600080602484019150602083019050611a028183855161182f565b5050919050565b60408101517ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141111580611a60575060608101517f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a111155b15611a7357611a73610291600584611abd565b600081516003811115611a8257fe5b1415611a9657611a96610291600384611abd565b600181516003811115611aa557fe5b1415611ab957611ab9610291600084611abd565b5050565b60607ff18f11f3027e735c758137924b262d4d3aff0037dcd785aca3c699fa05d960bd8383604051602401610787929190612a6e565b60607fdfdc6f57cf82bede92bcfdd44fedb82b2d5cecabf56ec21964db6ee2c3e82cf48686868686604051602401611b2f959493929190612738565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290505b95945050505050565b60607fa9f0c547643c02afed4cf2699e794bc383effca840eed62fddb64a15a4e55bc4848484604051602401610b96939291906128d3565b6040805160e08101825260008082526020820152908101611c0f611d73565b8152602001611c1c611cf6565b81526000602082018190526040820181905260609091015290565b6040518060a00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001606081525090565b6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081018290526101208101829052610140810182905261016081019190915290565b604080516080810190915280600081526000602082018190526040820181905260609091015290565b6040805161014081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081019190915290565b604051806101400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152602001600081526020016060815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081525090565b803561032e81612e83565b805161032e81612e83565b600082601f830112611e2e578081fd5b8135611e41611e3c82612deb565b612dc4565b8181529150602080830190848101608080850287018301881015611e6457600080fd5b60005b85811015611e8b57611e7989846120c3565b85529383019391810191600101611e67565b50505050505092915050565b600082601f830112611ea7578081fd5b8151611eb5611e3c82612deb565b818152915060208083019084810160005b84811015611f5c57815187016040807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838c03011215611f0557600080fd5b611f0e81612dc4565b611f1a8b878501612195565b8152908201519067ffffffffffffffff821115611f3657600080fd5b611f448b8784860101611fb5565b81870152865250509282019290820190600101611ec6565b505050505092915050565b600082601f830112611f77578081fd5b8135611f85611e3c82612e0b565b9150808252836020828501011115611f9c57600080fd5b8060208401602084013760009082016020015292915050565b600082601f830112611fc5578081fd5b8151611fd3611e3c82612e0b565b9150808252836020828501011115611fea57600080fd5b611ffb816020840160208601612e4d565b5092915050565b6000610140808385031215612015578182fd5b61201e81612dc4565b91505061202b8383611e08565b815261203a8360208401611e08565b602082015260408201356040820152606082013560608201526080820135608082015260a082013560a082015260c082013567ffffffffffffffff81111561208157600080fd5b61208d84828501611f67565b60c08301525060e082013560e08201526101006120ac84828501611e08565b818301525061012080830135818301525092915050565b6000608082840312156120d4578081fd5b6120de6080612dc4565b905081356120eb81612ea5565b815260208201356120fb81612eb2565b80602083015250604082013560408201526060820135606082015292915050565b60006080828403121561212d578081fd5b6121376080612dc4565b9050815161214481612ea5565b8152602082015161215481612eb2565b80602083015250604082015160408201526060820151606082015292915050565b80516fffffffffffffffffffffffffffffffff8116811461032e57600080fd5b805163ffffffff8116811461032e57600080fd5b805167ffffffffffffffff8116811461032e57600080fd5b600080604083850312156121d3578182fd5b823567ffffffffffffffff808211156121ea578384fd5b818501915085601f8301126121fd578384fd5b813561220b611e3c82612deb565b81815260208082019190858101885b85811015612243576122318c8484358b0101612002565b8552938201939082019060010161221a565b5091975088013594505050508082111561225b578283fd5b5061226885828601611e1e565b9150509250929050565b600060208284031215612283578081fd5b5035919050565b60006020828403121561229b578081fd5b815167ffffffffffffffff808211156122b2578283fd5b9083019060a082860312156122c5578283fd5b6122cf60a0612dc4565b6122d98684611e13565b81526122e88660208501611e13565b60208201526040830151604082015260608301516060820152608083015182811115612312578485fd5b61231e87828601611e97565b60808301525095945050505050565b6000806000838503610220811215612343578182fd5b61018080821215612352578283fd5b61235b81612dc4565b91506123678787611e13565b82526123768760208801611e13565b60208301526123888760408801612175565b604083015261239a8760608801612175565b60608301526123ac8760808801612175565b60808301526123be8760a08801611e13565b60a08301526123d08760c08801611e13565b60c08301526123e28760e08801611e13565b60e08301526101006123f688828901611e13565b908301526101208681015190830152610140612414888289016121a9565b81840152506101608087015181840152508194506124348782880161211c565b93505050612446856102008601612175565b90509250925092565b600060208284031215612460578081fd5b813567ffffffffffffffff811115612476578182fd5b61248284828501612002565b949350505050565b60008060a0838503121561249c578182fd5b823567ffffffffffffffff8111156124b2578283fd5b6124be85828601612002565b9250506124ce84602085016120c3565b90509250929050565b60008060008385036101e08112156124ed578182fd5b610140808212156124fc578283fd5b61250581612dc4565b91506125118787611e13565b82526125208760208801611e13565b60208301526125328760408801612175565b60408301526125448760608801612175565b60608301526125568760808801611e13565b60808301526125688760a08801611e13565b60a083015261257a8760c08801611e13565b60c083015260e086015160e0830152610100612598888289016121a9565b81840152506101208087015181840152508194506125b88782880161211c565b93505050612446856101c08601612175565b6000602082840312156125db578081fd5b5051919050565b600063ffffffff82511683526020820151604060208501526124826040850182612621565b73ffffffffffffffffffffffffffffffffffffffff169052565b60008151808452612639816020860160208601612e4d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b80516004811061267757fe5b825260208181015160ff169083015260408082015190830152606090810151910152565b6fffffffffffffffffffffffffffffffff169052565b67ffffffffffffffff169052565b600082516126d1818460208701612e4d565b9190910192915050565b7f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b600073ffffffffffffffffffffffffffffffffffffffff8088168352808716602084015280861660408401525083606083015260a0608083015261277f60a0830184612621565b979650505050505050565b6000602080830181845280855180835260408601915060408482028701019250838701855b828110156127fb577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526127e9858351612621565b945092850192908501906001016127af565b5092979650505050505050565b90815260200190565b92835273ffffffffffffffffffffffffffffffffffffffff918216602084015216604082015260600190565b9a8b5273ffffffffffffffffffffffffffffffffffffffff998a1660208c015297891660408b015260608a0196909652608089019490945260a088019290925260c087015260e08601526101008501529091166101208301526101408201526101600190565b9182527fffffffff0000000000000000000000000000000000000000000000000000000016602082015260400190565b6000848252606060208301526128ec6060830185612621565b828103604084015261132f8185612621565b918252602082015260400190565b9283526020830191909152604082015260600190565b93845260208401929092526040830152606082015260800190565b93845260ff9290921660208401526040830152606082015260800190565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b7fffffffff0000000000000000000000000000000000000000000000000000000092909216825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b7fffffffff00000000000000000000000000000000000000000000000000000000929092168252602082015260400190565b600060208252610a2d6020830184612621565b73ffffffffffffffffffffffffffffffffffffffff9485168152928416602084015292166040820152606081019190915260800190565b6060810160088510612a5a57fe5b938152602081019290925260409091015290565b60408101612a7b84612e79565b9281526020015290565b6000612a9086612e79565b85825284602083015273ffffffffffffffffffffffffffffffffffffffff841660408301526080606083015261132f6080830184612621565b60208082526024908201527f466978696e546f6b656e5370656e6465722f43414e4e4f545f494e564f4b455f60408201527f53454c4600000000000000000000000000000000000000000000000000000000606082015260800190565b600061026082019050612b3a828851612607565b6020870151612b4c6020840182612607565b506040870151612b5f604084018261269b565b506060870151612b72606084018261269b565b506080870151612b85608084018261269b565b5060a0870151612b9860a0840182612607565b5060c0870151612bab60c0840182612607565b5060e0870151612bbe60e0840182612607565b5061010080880151612bd282850182612607565b5050610120878101519083015261014080880151612bf2828501826126b1565b50506101608781015190830152612c0d61018083018761266b565b612c1b61020083018661269b565b612c29610220830185612607565b61132f610240830184612607565b600061020082019050612c4b828751612607565b6020860151612c5d6020840182612607565b506040860151612c70604084018261269b565b506060860151612c83606084018261269b565b506080860151612c966080840182612607565b5060a0860151612ca960a0840182612607565b5060c0860151612cbc60c0840182612607565b5060e086015160e083015261010080870151612cda828501826126b1565b50506101208681015190830152612cf561014083018661266b565b612d036101c083018561269b565b611baf6101e0830184612607565b6000602080835260e0830173ffffffffffffffffffffffffffffffffffffffff808651168386015280838701511660408601528060408701511660608601525060608501516080850152608085015160a085015260a085015160c080860152818151612d7d8185612808565b9350918401918391508085028201865b82811015612db7578582038452612da58286516125e2565b94870194938701939150600101612d8d565b5098975050505050505050565b60405181810167ffffffffffffffff81118282101715612de357600080fd5b604052919050565b600067ffffffffffffffff821115612e01578081fd5b5060209081020190565b600067ffffffffffffffff821115612e21578081fd5b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60005b83811015612e68578181015183820152602001612e50565b838111156110085750506000910152565b60068110610dfa57fe5b73ffffffffffffffffffffffffffffffffffffffff81168114610dfa57600080fd5b60048110610dfa57600080fd5b60ff81168114610dfa57600080fdfea26469706673582212207674255d0bc140b6a4d94a61f4b412482233613d8ec887eb2d42f510b030597f64736f6c634300060c0033",
|
|
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0xBC JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x8FD3AB80 GT PUSH2 0x74 JUMPI DUP1 PUSH4 0xD036092D GT PUSH2 0x4E JUMPI DUP1 PUSH4 0xD036092D EQ PUSH2 0x1C3 JUMPI DUP1 PUSH4 0xD925A56D EQ PUSH2 0x1D8 JUMPI DUP1 PUSH4 0xDAB400F3 EQ PUSH2 0x1ED JUMPI PUSH2 0xBC JUMP JUMPDEST DUP1 PUSH4 0x8FD3AB80 EQ PUSH2 0x161 JUMPI DUP1 PUSH4 0xAE550497 EQ PUSH2 0x183 JUMPI DUP1 PUSH4 0xC5579EC8 EQ PUSH2 0x1A3 JUMPI PUSH2 0xBC JUMP JUMPDEST DUP1 PUSH4 0x3FB2DA38 GT PUSH2 0xA5 JUMPI DUP1 PUSH4 0x3FB2DA38 EQ PUSH2 0x10C JUMPI DUP1 PUSH4 0x6AE4B4F7 EQ PUSH2 0x12C JUMPI DUP1 PUSH4 0x72D17D03 EQ PUSH2 0x141 JUMPI PUSH2 0xBC JUMP JUMPDEST DUP1 PUSH4 0x31B905C EQ PUSH2 0xC1 JUMPI DUP1 PUSH4 0x3D61ED3E EQ PUSH2 0xEC JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xCD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD6 PUSH2 0x202 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xE3 SWAP2 SWAP1 PUSH2 0x2808 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xFF PUSH2 0xFA CALLDATASIZE PUSH1 0x4 PUSH2 0x248A JUMP JUMPDEST PUSH2 0x226 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xE3 SWAP2 SWAP1 PUSH2 0x2A02 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x118 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD6 PUSH2 0x127 CALLDATASIZE PUSH1 0x4 PUSH2 0x244F JUMP JUMPDEST PUSH2 0x320 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x138 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xFF PUSH2 0x334 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x14D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD6 PUSH2 0x15C CALLDATASIZE PUSH1 0x4 PUSH2 0x2272 JUMP JUMPDEST PUSH2 0x36D JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x16D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x176 PUSH2 0x388 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xE3 SWAP2 SWAP1 PUSH2 0x295B JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x18F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD6 PUSH2 0x19E CALLDATASIZE PUSH1 0x4 PUSH2 0x244F JUMP JUMPDEST PUSH2 0x47C JUMP JUMPDEST PUSH2 0x1B6 PUSH2 0x1B1 CALLDATASIZE PUSH1 0x4 PUSH2 0x21C1 JUMP JUMPDEST PUSH2 0x512 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xE3 SWAP2 SWAP1 PUSH2 0x278A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1CF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD6 PUSH2 0x68C JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1E4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD6 PUSH2 0x6B0 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1F9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD6 PUSH2 0x6D4 JUMP JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x1 PUSH1 0x0 PUSH2 0x234 PUSH2 0x6F8 JUMP JUMPDEST DUP1 SLOAD SWAP1 SWAP2 POP DUP3 DUP2 AND ISZERO PUSH2 0x296 JUMPI PUSH2 0x296 PUSH2 0x291 PUSH2 0x28B PUSH1 0x0 DUP1 CALLDATASIZE DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP4 SWAP3 POP POP PUSH2 0x705 SWAP1 POP JUMP JUMPDEST DUP6 PUSH2 0x751 JUMP JUMPDEST PUSH2 0x80C JUMP JUMPDEST DUP3 OR DUP2 SSTORE PUSH2 0x2A2 PUSH2 0x1BF0 JUMP JUMPDEST CALLER DUP2 MSTORE PUSH1 0x40 DUP2 ADD DUP7 SWAP1 MSTORE PUSH2 0x2B5 DUP7 PUSH2 0x47C JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x60 DUP2 ADD DUP6 SWAP1 MSTORE PUSH2 0x2CA DUP2 PUSH2 0x814 JUMP JUMPDEST SWAP4 POP POP PUSH1 0x0 PUSH2 0x2D9 CALLVALUE SELFBALANCE PUSH2 0xA1C JUMP JUMPDEST SWAP1 POP DUP1 ISZERO PUSH2 0x310 JUMPI PUSH1 0x40 MLOAD CALLER SWAP1 DUP3 ISZERO PUSH2 0x8FC MUL SWAP1 DUP4 SWAP1 PUSH1 0x0 DUP2 DUP2 DUP2 DUP6 DUP9 DUP9 CALL SWAP4 POP POP POP POP ISZERO DUP1 ISZERO PUSH2 0x30E JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP JUMPDEST POP DUP1 SLOAD SWAP2 NOT SWAP1 SWAP2 AND SWAP1 SSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x32E PUSH2 0x15C DUP4 PUSH2 0x47C JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x10 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4D6574615472616E73616374696F6E7300000000000000000000000000000000 DUP2 MSTORE POP DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x377 PUSH2 0xA34 JUMP JUMPDEST PUSH1 0x0 SWAP3 DUP4 MSTORE PUSH1 0x20 MSTORE POP PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3B3 PUSH32 0x3D61ED3E00000000000000000000000000000000000000000000000000000000 PUSH2 0xA41 JUMP JUMPDEST PUSH2 0x3DC PUSH32 0xC5579EC800000000000000000000000000000000000000000000000000000000 PUSH2 0xA41 JUMP JUMPDEST PUSH2 0x405 PUSH32 0x3FB2DA3800000000000000000000000000000000000000000000000000000000 PUSH2 0xA41 JUMP JUMPDEST PUSH2 0x42E PUSH32 0x72D17D0300000000000000000000000000000000000000000000000000000000 PUSH2 0xA41 JUMP JUMPDEST PUSH2 0x457 PUSH32 0xAE55049700000000000000000000000000000000000000000000000000000000 PUSH2 0xA41 JUMP JUMPDEST POP PUSH32 0x2C64C5EF00000000000000000000000000000000000000000000000000000000 SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x32E PUSH32 0x0 DUP4 PUSH1 0x0 ADD MLOAD DUP5 PUSH1 0x20 ADD MLOAD DUP6 PUSH1 0x40 ADD MLOAD DUP7 PUSH1 0x60 ADD MLOAD DUP8 PUSH1 0x80 ADD MLOAD DUP9 PUSH1 0xA0 ADD MLOAD DUP10 PUSH1 0xC0 ADD MLOAD DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 DUP11 PUSH1 0xE0 ADD MLOAD DUP12 PUSH2 0x100 ADD MLOAD DUP13 PUSH2 0x120 ADD MLOAD PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x4F7 SWAP12 SWAP11 SWAP10 SWAP9 SWAP8 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x283D JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 PUSH2 0xAD4 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x1 PUSH1 0x0 PUSH2 0x520 PUSH2 0x6F8 JUMP JUMPDEST DUP1 SLOAD SWAP1 SWAP2 POP DUP3 DUP2 AND ISZERO PUSH2 0x577 JUMPI PUSH2 0x577 PUSH2 0x291 PUSH2 0x28B PUSH1 0x0 DUP1 CALLDATASIZE DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP4 SWAP3 POP POP PUSH2 0x705 SWAP1 POP JUMP JUMPDEST DUP3 OR DUP2 SSTORE DUP4 MLOAD DUP6 MLOAD EQ PUSH2 0x593 JUMPI PUSH2 0x593 PUSH2 0x291 DUP7 MLOAD DUP7 MLOAD PUSH2 0xB26 JUMP JUMPDEST DUP5 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0x5AB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x5DF JUMPI DUP2 PUSH1 0x20 ADD JUMPDEST PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 SWAP1 SUB SWAP1 DUP2 PUSH2 0x5CA JUMPI SWAP1 POP JUMPDEST POP SWAP3 POP PUSH1 0x0 JUMPDEST DUP6 MLOAD DUP2 LT ISZERO PUSH2 0x67F JUMPI PUSH2 0x5F6 PUSH2 0x1BF0 JUMP JUMPDEST CALLER DUP2 MSTORE DUP7 MLOAD DUP8 SWAP1 DUP4 SWAP1 DUP2 LT PUSH2 0x607 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP2 PUSH1 0x40 ADD DUP2 SWAP1 MSTORE POP PUSH2 0x633 DUP8 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x626 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x47C JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE DUP6 MLOAD DUP7 SWAP1 DUP4 SWAP1 DUP2 LT PUSH2 0x646 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP2 PUSH1 0x60 ADD DUP2 SWAP1 MSTORE POP PUSH2 0x65F DUP2 PUSH2 0x814 JUMP JUMPDEST DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x66B JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE POP PUSH1 0x1 ADD PUSH2 0x5E5 JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x2D9 CALLVALUE SELFBALANCE PUSH2 0xA1C JUMP JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x32E PUSH1 0x6 PUSH2 0xB5C JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x4 ADD DUP4 MLOAD LT ISZERO PUSH2 0x726 JUMPI PUSH2 0x726 PUSH2 0x291 PUSH1 0x3 DUP6 MLOAD DUP6 PUSH1 0x4 ADD PUSH2 0xB77 JUMP JUMPDEST POP ADD PUSH1 0x20 ADD MLOAD PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 AND SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH32 0xC7A7103E21E41A5C3158B3028D34CB9BB9593B10B1892F49D7187EFA71219D4E DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x787 SWAP3 SWAP2 SWAP1 PUSH2 0x29D0 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 MSTORE SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 MLOAD PUSH1 0x20 DUP3 ADD REVERT JUMPDEST PUSH1 0x60 PUSH2 0x81F DUP3 PUSH2 0xC1C JUMP JUMPDEST NUMBER PUSH2 0x828 PUSH2 0xA34 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP6 ADD MLOAD PUSH1 0x0 SWAP1 DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 DUP2 SWAP1 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE DUP3 ADD MLOAD PUSH2 0x120 ADD MLOAD ISZERO PUSH2 0x86D JUMPI PUSH1 0x40 DUP3 ADD MLOAD PUSH2 0x100 DUP2 ADD MLOAD DUP2 MLOAD DUP5 MLOAD PUSH2 0x120 SWAP1 SWAP4 ADD MLOAD PUSH2 0x86D SWAP4 SWAP1 PUSH2 0xDFD JUMP JUMPDEST PUSH1 0x40 DUP3 ADD MLOAD PUSH1 0xC0 ADD MLOAD PUSH2 0x881 SWAP1 PUSH1 0x0 PUSH2 0x705 JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 AND PUSH1 0x80 DUP4 ADD DUP2 SWAP1 MSTORE PUSH32 0x415565B000000000000000000000000000000000000000000000000000000000 EQ ISZERO PUSH2 0x8E1 JUMPI PUSH2 0x8DA DUP3 PUSH2 0x100E JUMP JUMPDEST SWAP1 POP PUSH2 0x9A4 JUMP JUMPDEST PUSH1 0x80 DUP3 ADD MLOAD PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 AND PUSH32 0xF6274F6600000000000000000000000000000000000000000000000000000000 EQ ISZERO PUSH2 0x938 JUMPI PUSH2 0x8DA DUP3 PUSH2 0x1215 JUMP JUMPDEST PUSH1 0x80 DUP3 ADD MLOAD PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 AND PUSH32 0xAA77476C00000000000000000000000000000000000000000000000000000000 EQ ISZERO PUSH2 0x98F JUMPI PUSH2 0x8DA DUP3 PUSH2 0x1339 JUMP JUMPDEST PUSH2 0x9A4 PUSH2 0x291 DUP4 PUSH1 0x20 ADD MLOAD DUP5 PUSH1 0x80 ADD MLOAD PUSH2 0x13C7 JUMP JUMPDEST DUP2 PUSH1 0x80 ADD MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND PUSH32 0x7F4FE3FF8AE440E1570C558DA08440B26F89FB1C1F2910CD91CA6452955F121A DUP4 PUSH1 0x20 ADD MLOAD DUP5 PUSH1 0x40 ADD MLOAD PUSH1 0x0 ADD MLOAD DUP6 PUSH1 0x40 ADD MLOAD PUSH1 0x20 ADD MLOAD PUSH1 0x40 MLOAD PUSH2 0xA0F SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2811 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP4 LT PUSH2 0xA2B JUMPI DUP2 PUSH2 0xA2D JUMP JUMPDEST DUP3 JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x32E PUSH1 0x5 PUSH2 0xB5C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x6EB224CB00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS SWAP1 PUSH4 0x6EB224CB SWAP1 PUSH2 0xA9F SWAP1 DUP5 SWAP1 PUSH32 0x0 SWAP1 PUSH1 0x4 ADD PUSH2 0x2988 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xAB9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0xACD JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0xB09 SWAP3 SWAP2 SWAP1 PUSH2 0x26DB JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x60 PUSH32 0x52974C3A86E985173F72E2FB84BA2BFCA8FB3B7C5031EB8077EBD59458ABF2A4 DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x787 SWAP3 SWAP2 SWAP1 PUSH2 0x28FE JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 PUSH1 0x7 DUP2 GT ISZERO PUSH2 0xB6C JUMPI INVALID JUMPDEST PUSH1 0x1 ADD SWAP1 SHL SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x60 PUSH4 0x28006595 PUSH1 0xE0 SHL DUP5 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0xB96 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2A4C JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 MSTORE SWAP1 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP2 ADD MLOAD PUSH1 0x20 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND ISZERO DUP1 ISZERO SWAP1 PUSH2 0xC81 JUMPI POP DUP1 PUSH1 0x0 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 PUSH1 0x40 ADD MLOAD PUSH1 0x20 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO JUMPDEST ISZERO PUSH2 0xCA4 JUMPI PUSH2 0xCA4 PUSH2 0x291 DUP3 PUSH1 0x20 ADD MLOAD DUP4 PUSH1 0x0 ADD MLOAD DUP5 PUSH1 0x40 ADD MLOAD PUSH1 0x20 ADD MLOAD PUSH2 0x13FD JUMP JUMPDEST TIMESTAMP DUP2 PUSH1 0x40 ADD MLOAD PUSH1 0x80 ADD MLOAD GT PUSH2 0xCCD JUMPI PUSH2 0xCCD PUSH2 0x291 DUP3 PUSH1 0x20 ADD MLOAD TIMESTAMP DUP5 PUSH1 0x40 ADD MLOAD PUSH1 0x80 ADD MLOAD PUSH2 0x1435 JUMP JUMPDEST GASPRICE DUP2 PUSH1 0x40 ADD MLOAD PUSH1 0x40 ADD MLOAD GT DUP1 PUSH2 0xCEA JUMPI POP GASPRICE DUP2 PUSH1 0x40 ADD MLOAD PUSH1 0x60 ADD MLOAD LT JUMPDEST ISZERO PUSH2 0xD12 JUMPI PUSH2 0xD12 PUSH2 0x291 DUP3 PUSH1 0x20 ADD MLOAD GASPRICE DUP5 PUSH1 0x40 ADD MLOAD PUSH1 0x40 ADD MLOAD DUP6 PUSH1 0x40 ADD MLOAD PUSH1 0x60 ADD MLOAD PUSH2 0x146D JUMP JUMPDEST SELFBALANCE PUSH1 0xA0 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x40 DUP3 ADD MLOAD PUSH1 0xE0 ADD MLOAD GT ISZERO PUSH2 0xD47 JUMPI PUSH2 0xD47 PUSH2 0x291 DUP3 PUSH1 0x20 ADD MLOAD DUP4 PUSH1 0xA0 ADD MLOAD DUP5 PUSH1 0x40 ADD MLOAD PUSH1 0xE0 ADD MLOAD PUSH2 0x152E JUMP JUMPDEST DUP1 PUSH1 0x40 ADD MLOAD PUSH1 0x0 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0xD78 DUP3 PUSH1 0x20 ADD MLOAD DUP4 PUSH1 0x60 ADD MLOAD PUSH2 0x1566 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0xDBE JUMPI PUSH2 0xDBE PUSH2 0x291 PUSH1 0x4 DUP4 PUSH1 0x20 ADD MLOAD DUP5 PUSH1 0x40 ADD MLOAD PUSH1 0x0 ADD MLOAD PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x16B7 JUMP JUMPDEST PUSH2 0xDC6 PUSH2 0xA34 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP4 ADD MLOAD PUSH1 0x0 SWAP1 DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xC0 DUP3 ADD DUP2 SWAP1 MSTORE ISZERO PUSH2 0xDFA JUMPI PUSH2 0xDFA PUSH2 0x291 DUP3 PUSH1 0x20 ADD MLOAD DUP4 PUSH1 0xC0 ADD MLOAD PUSH2 0x16F1 JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP7 AND ADDRESS EQ ISZERO PUSH2 0xE5A JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xE51 SWAP1 PUSH2 0x2AC9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0xE63 DUP7 PUSH2 0x1727 JUMP JUMPDEST ISZERO PUSH2 0xF37 JUMPI PUSH1 0x40 MLOAD PUSH32 0xDD62ED3E00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE DUP4 SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP9 AND SWAP1 PUSH4 0xDD62ED3E SWAP1 PUSH2 0xEBE SWAP1 DUP10 SWAP1 ADDRESS SWAP1 PUSH1 0x4 ADD PUSH2 0x2711 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xED6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xEEA JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0xF0E SWAP2 SWAP1 PUSH2 0x25CA JUMP JUMPDEST LT ISZERO PUSH2 0xF37 JUMPI PUSH2 0xF30 DUP7 DUP7 DUP7 DUP7 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x1767 JUMP JUMPDEST POP POP PUSH2 0x1008 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x23B872DD00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP7 AND PUSH1 0x4 DUP3 ADD MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP6 AND PUSH1 0x24 DUP3 ADD MSTORE DUP4 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x0 DUP1 PUSH1 0x64 DUP4 PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP13 AND GAS CALL SWAP3 POP RETURNDATASIZE DUP1 PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH1 0x1 PUSH1 0x20 DUP4 ADD MLOAD EQ PUSH1 0x20 DUP3 LT ISZERO AND DUP2 ISZERO OR DUP5 AND SWAP4 POP DUP4 PUSH2 0xFF1 JUMPI DUP1 DUP3 MSTORE DUP2 SWAP3 POP DUP1 PUSH1 0x20 DUP4 ADD ADD PUSH1 0x40 MSTORE JUMPDEST POP POP DUP2 PUSH2 0x1005 JUMPI PUSH2 0x1005 DUP7 DUP7 DUP7 DUP7 DUP6 PUSH2 0x1767 JUMP JUMPDEST POP POP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1018 PUSH2 0x1C37 JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MLOAD PUSH1 0xC0 ADD MLOAD MLOAD PUSH1 0x60 SWAP1 PUSH1 0x1C ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0x103E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x1F ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x1069 JUMPI PUSH1 0x20 DUP3 ADD DUP2 DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x60 DUP5 PUSH1 0x40 ADD MLOAD PUSH1 0xC0 ADD MLOAD SWAP1 POP PUSH1 0xA0 DUP2 MLOAD LT ISZERO PUSH2 0x1085 JUMPI INVALID JUMPDEST PUSH1 0x20 DUP3 DUP2 ADD MSTORE DUP1 MLOAD PUSH1 0x24 DUP3 ADD SWAP1 PUSH1 0x40 DUP5 ADD SWAP1 PUSH2 0x10C6 SWAP1 DUP3 SWAP1 DUP5 SWAP1 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC ADD PUSH2 0x182F JUMP JUMPDEST DUP4 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x10DA SWAP2 SWAP1 PUSH2 0x228A JUMP JUMPDEST SWAP5 POP POP POP POP POP PUSH2 0xA2D DUP4 PUSH1 0x20 ADD MLOAD PUSH4 0x62597192 PUSH1 0xE0 SHL PUSH1 0x40 MLOAD DUP1 PUSH1 0xC0 ADD PUSH1 0x40 MSTORE DUP1 DUP8 PUSH1 0x40 ADD MLOAD PUSH1 0x0 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP6 PUSH1 0x0 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP6 PUSH1 0x20 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP6 PUSH1 0x40 ADD MLOAD DUP2 MSTORE PUSH1 0x20 ADD DUP6 PUSH1 0x60 ADD MLOAD DUP2 MSTORE PUSH1 0x20 ADD DUP6 PUSH1 0x80 ADD MLOAD DUP2 MSTORE POP PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x118B SWAP2 SWAP1 PUSH2 0x2D11 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 DUP2 MSTORE PUSH1 0x20 DUP3 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP1 SWAP5 AND SWAP4 SWAP1 SWAP4 OR SWAP1 SWAP3 MSTORE SWAP1 DUP7 ADD MLOAD PUSH1 0xE0 ADD MLOAD PUSH2 0x1910 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x121F PUSH2 0x1C92 JUMP JUMPDEST PUSH2 0x1227 PUSH2 0x1CF6 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x123C DUP7 PUSH1 0x40 ADD MLOAD PUSH1 0xC0 ADD MLOAD PUSH2 0x199C JUMP JUMPDEST SWAP1 POP DUP1 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x1252 SWAP2 SWAP1 PUSH2 0x232D JUMP JUMPDEST PUSH1 0x20 DUP10 ADD MLOAD PUSH1 0x40 DUP1 DUP12 ADD MLOAD MLOAD SWAP1 MLOAD SWAP5 SWAP9 POP SWAP3 SWAP7 POP SWAP1 SWAP5 POP PUSH2 0x132F SWAP3 SWAP1 SWAP2 PUSH32 0x414E4CCF00000000000000000000000000000000000000000000000000000000 SWAP2 PUSH2 0x12A5 SWAP2 DUP10 SWAP2 DUP10 SWAP2 DUP10 SWAP2 CALLER SWAP1 PUSH1 0x24 ADD PUSH2 0x2B26 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 DUP2 MSTORE PUSH1 0x20 DUP3 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP1 SWAP5 AND SWAP4 SWAP1 SWAP4 OR SWAP1 SWAP3 MSTORE SWAP1 DUP10 ADD MLOAD PUSH1 0xE0 ADD MLOAD PUSH2 0x1910 JUMP JUMPDEST SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1343 PUSH2 0x1D1F JUMP JUMPDEST PUSH2 0x134B PUSH2 0x1CF6 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x1360 DUP7 PUSH1 0x40 ADD MLOAD PUSH1 0xC0 ADD MLOAD PUSH2 0x199C JUMP JUMPDEST SWAP1 POP DUP1 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x1376 SWAP2 SWAP1 PUSH2 0x24D7 JUMP JUMPDEST PUSH1 0x20 DUP10 ADD MLOAD PUSH1 0x40 DUP1 DUP12 ADD MLOAD MLOAD SWAP1 MLOAD SWAP5 SWAP9 POP SWAP3 SWAP7 POP SWAP1 SWAP5 POP PUSH2 0x132F SWAP3 SWAP1 SWAP2 PUSH32 0xA656186B00000000000000000000000000000000000000000000000000000000 SWAP2 PUSH2 0x12A5 SWAP2 DUP10 SWAP2 DUP10 SWAP2 DUP10 SWAP2 PUSH1 0x24 ADD PUSH2 0x2C37 JUMP JUMPDEST PUSH1 0x60 PUSH32 0x547A32A328D8A78DBE9BF090FA60BA3D4D1C6833A592A2C942666CE3249C1210 DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x787 SWAP3 SWAP2 SWAP1 PUSH2 0x28A3 JUMP JUMPDEST PUSH1 0x60 PUSH32 0xA78002A166FCAE5236D89E3FF35C53DADB775F7818DE4A020714CBA4BF360822 DUP5 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0xB96 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2811 JUMP JUMPDEST PUSH1 0x60 PUSH32 0xBEA726EFDF9868BBC5755DCE9F13D585B3CF731177BE75300D15BB8F5E286158 DUP5 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0xB96 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x290C JUMP JUMPDEST PUSH1 0x60 PUSH32 0x6FEC11A99EBB0FF14B6648F609F57864DADEBA8B29869C4DF2B3B76894147849 DUP6 DUP6 DUP6 DUP6 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x14A7 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2922 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 MSTORE SWAP1 POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH32 0xA5ADE45208123132815E1591A1C7E64045FD006152F5E85D100AEE42BA02C75 DUP5 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0xB96 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x290C JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1572 DUP4 DUP4 PUSH2 0x1A09 JUMP JUMPDEST PUSH1 0x2 DUP3 MLOAD PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x1581 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x15E9 JUMPI PUSH1 0x1 DUP4 DUP4 PUSH1 0x20 ADD MLOAD DUP5 PUSH1 0x40 ADD MLOAD DUP6 PUSH1 0x60 ADD MLOAD PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0x15B6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x293D JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x15D8 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD SUB MLOAD SWAP1 POP PUSH2 0x168E JUMP JUMPDEST PUSH1 0x3 DUP3 MLOAD PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x15F8 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x168E JUMPI PUSH1 0x0 PUSH32 0x19457468657265756D205369676E6564204D6573736167653A0A333200000000 PUSH1 0x0 MSTORE DUP4 PUSH1 0x1C MSTORE PUSH1 0x3C PUSH1 0x0 KECCAK256 SWAP1 POP PUSH1 0x1 DUP2 DUP5 PUSH1 0x20 ADD MLOAD DUP6 PUSH1 0x40 ADD MLOAD DUP7 PUSH1 0x60 ADD MLOAD PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0x165E SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x293D JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1680 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD SUB MLOAD SWAP2 POP POP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH2 0x32E JUMPI PUSH2 0x32E PUSH2 0x291 PUSH1 0x5 DUP6 PUSH2 0x1ABD JUMP JUMPDEST PUSH1 0x60 PUSH32 0x4C7607A3EBBA99C9ACDE0E2A04D88829F7001B63F028B796DDA6FF02406DDAD5 DUP6 DUP6 DUP6 DUP6 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x14A7 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2A85 JUMP JUMPDEST PUSH1 0x60 PUSH32 0xFE251A07F3CBFFD23C1C1DB9EC776D259099C832333D99EF48CACFA93A4D7B32 DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x787 SWAP3 SWAP2 SWAP1 PUSH2 0x28FE JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 SWAP1 KECCAK256 PUSH1 0x1 PUSH1 0xFF SWAP3 DUP4 AND DUP2 SWAP1 SHL SWAP3 SWAP1 SWAP2 AND SHL OR PUSH32 0x0 DUP2 AND EQ SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x89DD02E700000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS SWAP1 PUSH4 0x89DD02E7 SWAP1 PUSH2 0x17A9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 PUSH1 0x4 ADD PUSH2 0x2A15 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x17C3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0x17D4 JUMPI POP PUSH1 0x1 JUMPDEST PUSH2 0xACD JUMPI RETURNDATASIZE DUP1 DUP1 ISZERO PUSH2 0x1802 JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x1807 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP PUSH2 0x1829 PUSH2 0x291 DUP8 DUP8 DUP8 DUP8 DUP8 MLOAD PUSH1 0x0 EQ ISZERO PUSH2 0x1822 JUMPI DUP7 PUSH2 0x1824 JUMP JUMPDEST DUP8 JUMPDEST PUSH2 0x1AF3 JUMP JUMPDEST POP PUSH2 0xACD JUMP JUMPDEST PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x1876 JUMPI DUP2 MLOAD DUP4 MLOAD PUSH1 0x20 DUP4 SWAP1 SUB PUSH2 0x100 EXP PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ADD DUP1 NOT SWAP1 SWAP3 AND SWAP2 AND OR DUP4 MSTORE PUSH2 0x190B JUMP JUMPDEST DUP3 DUP3 EQ ISZERO PUSH2 0x1883 JUMPI PUSH2 0x190B JUMP JUMPDEST DUP3 DUP3 GT ISZERO PUSH2 0x18BD JUMPI PUSH1 0x20 DUP2 SUB SWAP1 POP DUP1 DUP3 ADD DUP2 DUP5 ADD DUP2 MLOAD JUMPDEST DUP3 DUP6 LT ISZERO PUSH2 0x18B5 JUMPI DUP5 MLOAD DUP7 MSTORE PUSH1 0x20 SWAP6 DUP7 ADD SWAP6 SWAP1 SWAP5 ADD SWAP4 PUSH2 0x189A JUMP JUMPDEST SWAP1 MSTORE POP PUSH2 0x190B JUMP JUMPDEST PUSH1 0x20 DUP2 SUB SWAP1 POP DUP1 DUP3 ADD DUP2 DUP5 ADD DUP4 MLOAD JUMPDEST DUP2 DUP7 SLT ISZERO PUSH2 0x1906 JUMPI DUP3 MLOAD DUP3 MSTORE PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 SWAP3 DUP4 ADD SWAP3 SWAP1 SWAP2 ADD SWAP1 PUSH2 0x18CC JUMP JUMPDEST DUP6 MSTORE POP POP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 ADDRESS PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 DUP6 PUSH1 0x40 MLOAD PUSH2 0x193A SWAP2 SWAP1 PUSH2 0x26BF JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP8 GAS CALL SWAP3 POP POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x1977 JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x197C JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP3 POP SWAP1 POP DUP1 PUSH2 0x1994 JUMPI PUSH2 0x1994 PUSH2 0x291 DUP7 DUP7 DUP6 PUSH2 0x1BB8 JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x4 DUP3 MLOAD SUB PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0x19B9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x1F ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x19E4 JUMPI PUSH1 0x20 DUP3 ADD DUP2 DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP1 PUSH1 0x24 DUP5 ADD SWAP2 POP PUSH1 0x20 DUP4 ADD SWAP1 POP PUSH2 0x1A02 DUP2 DUP4 DUP6 MLOAD PUSH2 0x182F JUMP JUMPDEST POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x40 DUP2 ADD MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 GT ISZERO DUP1 PUSH2 0x1A60 JUMPI POP PUSH1 0x60 DUP2 ADD MLOAD PUSH32 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A1 GT ISZERO JUMPDEST ISZERO PUSH2 0x1A73 JUMPI PUSH2 0x1A73 PUSH2 0x291 PUSH1 0x5 DUP5 PUSH2 0x1ABD JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x1A82 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x1A96 JUMPI PUSH2 0x1A96 PUSH2 0x291 PUSH1 0x3 DUP5 PUSH2 0x1ABD JUMP JUMPDEST PUSH1 0x1 DUP2 MLOAD PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x1AA5 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x1AB9 JUMPI PUSH2 0x1AB9 PUSH2 0x291 PUSH1 0x0 DUP5 PUSH2 0x1ABD JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x60 PUSH32 0xF18F11F3027E735C758137924B262D4D3AFF0037DCD785ACA3C699FA05D960BD DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x787 SWAP3 SWAP2 SWAP1 PUSH2 0x2A6E JUMP JUMPDEST PUSH1 0x60 PUSH32 0xDFDC6F57CF82BEDE92BCFDD44FEDB82B2D5CECABF56EC21964DB6EE2C3E82CF4 DUP7 DUP7 DUP7 DUP7 DUP7 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x1B2F SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2738 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 MSTORE SWAP1 POP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH32 0xA9F0C547643C02AFED4CF2699E794BC383EFFCA840EED62FDDB64A15A4E55BC4 DUP5 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0xB96 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x28D3 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0xE0 DUP2 ADD DUP3 MSTORE PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE SWAP1 DUP2 ADD PUSH2 0x1C0F PUSH2 0x1D73 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1C1C PUSH2 0x1CF6 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x0 PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x40 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x60 SWAP1 SWAP2 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0xA0 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH2 0x180 DUP2 ADD DUP3 MSTORE PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE SWAP2 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x60 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x80 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0xA0 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0xC0 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0xE0 DUP2 ADD DUP3 SWAP1 MSTORE PUSH2 0x100 DUP2 ADD DUP3 SWAP1 MSTORE PUSH2 0x120 DUP2 ADD DUP3 SWAP1 MSTORE PUSH2 0x140 DUP2 ADD DUP3 SWAP1 MSTORE PUSH2 0x160 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x80 DUP2 ADD SWAP1 SWAP2 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE PUSH1 0x0 PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x40 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x60 SWAP1 SWAP2 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH2 0x140 DUP2 ADD DUP3 MSTORE PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE SWAP2 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x60 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x80 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0xA0 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0xC0 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0xE0 DUP2 ADD DUP3 SWAP1 MSTORE PUSH2 0x100 DUP2 ADD DUP3 SWAP1 MSTORE PUSH2 0x120 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH2 0x140 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH2 0x32E DUP2 PUSH2 0x2E83 JUMP JUMPDEST DUP1 MLOAD PUSH2 0x32E DUP2 PUSH2 0x2E83 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x1E2E JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x1E41 PUSH2 0x1E3C DUP3 PUSH2 0x2DEB JUMP JUMPDEST PUSH2 0x2DC4 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD PUSH1 0x80 DUP1 DUP6 MUL DUP8 ADD DUP4 ADD DUP9 LT ISZERO PUSH2 0x1E64 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP6 DUP2 LT ISZERO PUSH2 0x1E8B JUMPI PUSH2 0x1E79 DUP10 DUP5 PUSH2 0x20C3 JUMP JUMPDEST DUP6 MSTORE SWAP4 DUP4 ADD SWAP4 SWAP2 DUP2 ADD SWAP2 PUSH1 0x1 ADD PUSH2 0x1E67 JUMP JUMPDEST POP POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x1EA7 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x1EB5 PUSH2 0x1E3C DUP3 PUSH2 0x2DEB JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x1F5C JUMPI DUP2 MLOAD DUP8 ADD PUSH1 0x40 DUP1 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP4 DUP13 SUB ADD SLT ISZERO PUSH2 0x1F05 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1F0E DUP2 PUSH2 0x2DC4 JUMP JUMPDEST PUSH2 0x1F1A DUP12 DUP8 DUP6 ADD PUSH2 0x2195 JUMP JUMPDEST DUP2 MSTORE SWAP1 DUP3 ADD MLOAD SWAP1 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x1F36 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1F44 DUP12 DUP8 DUP5 DUP7 ADD ADD PUSH2 0x1FB5 JUMP JUMPDEST DUP2 DUP8 ADD MSTORE DUP7 MSTORE POP POP SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x1EC6 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x1F77 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x1F85 PUSH2 0x1E3C DUP3 PUSH2 0x2E0B JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x1F9C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x1FC5 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x1FD3 PUSH2 0x1E3C DUP3 PUSH2 0x2E0B JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x1FEA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1FFB DUP2 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x2E4D JUMP JUMPDEST POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x140 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x2015 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x201E DUP2 PUSH2 0x2DC4 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x202B DUP4 DUP4 PUSH2 0x1E08 JUMP JUMPDEST DUP2 MSTORE PUSH2 0x203A DUP4 PUSH1 0x20 DUP5 ADD PUSH2 0x1E08 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 DUP3 ADD CALLDATALOAD PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 DUP3 ADD CALLDATALOAD PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 DUP3 ADD CALLDATALOAD PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 DUP3 ADD CALLDATALOAD PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xC0 DUP3 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x2081 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x208D DUP5 DUP3 DUP6 ADD PUSH2 0x1F67 JUMP JUMPDEST PUSH1 0xC0 DUP4 ADD MSTORE POP PUSH1 0xE0 DUP3 ADD CALLDATALOAD PUSH1 0xE0 DUP3 ADD MSTORE PUSH2 0x100 PUSH2 0x20AC DUP5 DUP3 DUP6 ADD PUSH2 0x1E08 JUMP JUMPDEST DUP2 DUP4 ADD MSTORE POP PUSH2 0x120 DUP1 DUP4 ADD CALLDATALOAD DUP2 DUP4 ADD MSTORE POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x20D4 JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x20DE PUSH1 0x80 PUSH2 0x2DC4 JUMP JUMPDEST SWAP1 POP DUP2 CALLDATALOAD PUSH2 0x20EB DUP2 PUSH2 0x2EA5 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 DUP3 ADD CALLDATALOAD PUSH2 0x20FB DUP2 PUSH2 0x2EB2 JUMP JUMPDEST DUP1 PUSH1 0x20 DUP4 ADD MSTORE POP PUSH1 0x40 DUP3 ADD CALLDATALOAD PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 DUP3 ADD CALLDATALOAD PUSH1 0x60 DUP3 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x212D JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x2137 PUSH1 0x80 PUSH2 0x2DC4 JUMP JUMPDEST SWAP1 POP DUP2 MLOAD PUSH2 0x2144 DUP2 PUSH2 0x2EA5 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 DUP3 ADD MLOAD PUSH2 0x2154 DUP2 PUSH2 0x2EB2 JUMP JUMPDEST DUP1 PUSH1 0x20 DUP4 ADD MSTORE POP PUSH1 0x40 DUP3 ADD MLOAD PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 DUP3 ADD MLOAD PUSH1 0x60 DUP3 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 MLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x32E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 MLOAD PUSH4 0xFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x32E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x32E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x21D3 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x21EA JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP6 ADD SWAP2 POP DUP6 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x21FD JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x220B PUSH2 0x1E3C DUP3 PUSH2 0x2DEB JUMP JUMPDEST DUP2 DUP2 MSTORE PUSH1 0x20 DUP1 DUP3 ADD SWAP2 SWAP1 DUP6 DUP2 ADD DUP9 JUMPDEST DUP6 DUP2 LT ISZERO PUSH2 0x2243 JUMPI PUSH2 0x2231 DUP13 DUP5 DUP5 CALLDATALOAD DUP12 ADD ADD PUSH2 0x2002 JUMP JUMPDEST DUP6 MSTORE SWAP4 DUP3 ADD SWAP4 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x221A JUMP JUMPDEST POP SWAP2 SWAP8 POP DUP9 ADD CALLDATALOAD SWAP5 POP POP POP POP DUP1 DUP3 GT ISZERO PUSH2 0x225B JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x2268 DUP6 DUP3 DUP7 ADD PUSH2 0x1E1E JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x2283 JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x229B JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x22B2 JUMPI DUP3 DUP4 REVERT JUMPDEST SWAP1 DUP4 ADD SWAP1 PUSH1 0xA0 DUP3 DUP7 SUB SLT ISZERO PUSH2 0x22C5 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x22CF PUSH1 0xA0 PUSH2 0x2DC4 JUMP JUMPDEST PUSH2 0x22D9 DUP7 DUP5 PUSH2 0x1E13 JUMP JUMPDEST DUP2 MSTORE PUSH2 0x22E8 DUP7 PUSH1 0x20 DUP6 ADD PUSH2 0x1E13 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 DUP4 ADD MLOAD PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 DUP4 ADD MLOAD PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 DUP4 ADD MLOAD DUP3 DUP2 GT ISZERO PUSH2 0x2312 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0x231E DUP8 DUP3 DUP7 ADD PUSH2 0x1E97 JUMP JUMPDEST PUSH1 0x80 DUP4 ADD MSTORE POP SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP4 DUP6 SUB PUSH2 0x220 DUP2 SLT ISZERO PUSH2 0x2343 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x180 DUP1 DUP3 SLT ISZERO PUSH2 0x2352 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x235B DUP2 PUSH2 0x2DC4 JUMP JUMPDEST SWAP2 POP PUSH2 0x2367 DUP8 DUP8 PUSH2 0x1E13 JUMP JUMPDEST DUP3 MSTORE PUSH2 0x2376 DUP8 PUSH1 0x20 DUP9 ADD PUSH2 0x1E13 JUMP JUMPDEST PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0x2388 DUP8 PUSH1 0x40 DUP9 ADD PUSH2 0x2175 JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MSTORE PUSH2 0x239A DUP8 PUSH1 0x60 DUP9 ADD PUSH2 0x2175 JUMP JUMPDEST PUSH1 0x60 DUP4 ADD MSTORE PUSH2 0x23AC DUP8 PUSH1 0x80 DUP9 ADD PUSH2 0x2175 JUMP JUMPDEST PUSH1 0x80 DUP4 ADD MSTORE PUSH2 0x23BE DUP8 PUSH1 0xA0 DUP9 ADD PUSH2 0x1E13 JUMP JUMPDEST PUSH1 0xA0 DUP4 ADD MSTORE PUSH2 0x23D0 DUP8 PUSH1 0xC0 DUP9 ADD PUSH2 0x1E13 JUMP JUMPDEST PUSH1 0xC0 DUP4 ADD MSTORE PUSH2 0x23E2 DUP8 PUSH1 0xE0 DUP9 ADD PUSH2 0x1E13 JUMP JUMPDEST PUSH1 0xE0 DUP4 ADD MSTORE PUSH2 0x100 PUSH2 0x23F6 DUP9 DUP3 DUP10 ADD PUSH2 0x1E13 JUMP JUMPDEST SWAP1 DUP4 ADD MSTORE PUSH2 0x120 DUP7 DUP2 ADD MLOAD SWAP1 DUP4 ADD MSTORE PUSH2 0x140 PUSH2 0x2414 DUP9 DUP3 DUP10 ADD PUSH2 0x21A9 JUMP JUMPDEST DUP2 DUP5 ADD MSTORE POP PUSH2 0x160 DUP1 DUP8 ADD MLOAD DUP2 DUP5 ADD MSTORE POP DUP2 SWAP5 POP PUSH2 0x2434 DUP8 DUP3 DUP9 ADD PUSH2 0x211C JUMP JUMPDEST SWAP4 POP POP POP PUSH2 0x2446 DUP6 PUSH2 0x200 DUP7 ADD PUSH2 0x2175 JUMP JUMPDEST SWAP1 POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x2460 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x2476 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x2482 DUP5 DUP3 DUP6 ADD PUSH2 0x2002 JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0xA0 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x249C JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x24B2 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x24BE DUP6 DUP3 DUP7 ADD PUSH2 0x2002 JUMP JUMPDEST SWAP3 POP POP PUSH2 0x24CE DUP5 PUSH1 0x20 DUP6 ADD PUSH2 0x20C3 JUMP JUMPDEST SWAP1 POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP4 DUP6 SUB PUSH2 0x1E0 DUP2 SLT ISZERO PUSH2 0x24ED JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x140 DUP1 DUP3 SLT ISZERO PUSH2 0x24FC JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x2505 DUP2 PUSH2 0x2DC4 JUMP JUMPDEST SWAP2 POP PUSH2 0x2511 DUP8 DUP8 PUSH2 0x1E13 JUMP JUMPDEST DUP3 MSTORE PUSH2 0x2520 DUP8 PUSH1 0x20 DUP9 ADD PUSH2 0x1E13 JUMP JUMPDEST PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0x2532 DUP8 PUSH1 0x40 DUP9 ADD PUSH2 0x2175 JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MSTORE PUSH2 0x2544 DUP8 PUSH1 0x60 DUP9 ADD PUSH2 0x2175 JUMP JUMPDEST PUSH1 0x60 DUP4 ADD MSTORE PUSH2 0x2556 DUP8 PUSH1 0x80 DUP9 ADD PUSH2 0x1E13 JUMP JUMPDEST PUSH1 0x80 DUP4 ADD MSTORE PUSH2 0x2568 DUP8 PUSH1 0xA0 DUP9 ADD PUSH2 0x1E13 JUMP JUMPDEST PUSH1 0xA0 DUP4 ADD MSTORE PUSH2 0x257A DUP8 PUSH1 0xC0 DUP9 ADD PUSH2 0x1E13 JUMP JUMPDEST PUSH1 0xC0 DUP4 ADD MSTORE PUSH1 0xE0 DUP7 ADD MLOAD PUSH1 0xE0 DUP4 ADD MSTORE PUSH2 0x100 PUSH2 0x2598 DUP9 DUP3 DUP10 ADD PUSH2 0x21A9 JUMP JUMPDEST DUP2 DUP5 ADD MSTORE POP PUSH2 0x120 DUP1 DUP8 ADD MLOAD DUP2 DUP5 ADD MSTORE POP DUP2 SWAP5 POP PUSH2 0x25B8 DUP8 DUP3 DUP9 ADD PUSH2 0x211C JUMP JUMPDEST SWAP4 POP POP POP PUSH2 0x2446 DUP6 PUSH2 0x1C0 DUP7 ADD PUSH2 0x2175 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x25DB JUMPI DUP1 DUP2 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH4 0xFFFFFFFF DUP3 MLOAD AND DUP4 MSTORE PUSH1 0x20 DUP3 ADD MLOAD PUSH1 0x40 PUSH1 0x20 DUP6 ADD MSTORE PUSH2 0x2482 PUSH1 0x40 DUP6 ADD DUP3 PUSH2 0x2621 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 MSTORE JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH2 0x2639 DUP2 PUSH1 0x20 DUP7 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x2E4D JUMP JUMPDEST PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 MLOAD PUSH1 0x4 DUP2 LT PUSH2 0x2677 JUMPI INVALID JUMPDEST DUP3 MSTORE PUSH1 0x20 DUP2 DUP2 ADD MLOAD PUSH1 0xFF AND SWAP1 DUP4 ADD MSTORE PUSH1 0x40 DUP1 DUP3 ADD MLOAD SWAP1 DUP4 ADD MSTORE PUSH1 0x60 SWAP1 DUP2 ADD MLOAD SWAP2 ADD MSTORE JUMP JUMPDEST PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 MSTORE JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF AND SWAP1 MSTORE JUMP JUMPDEST PUSH1 0x0 DUP3 MLOAD PUSH2 0x26D1 DUP2 DUP5 PUSH1 0x20 DUP8 ADD PUSH2 0x2E4D JUMP JUMPDEST SWAP2 SWAP1 SWAP2 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x1901000000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x2 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x22 DUP3 ADD MSTORE PUSH1 0x42 ADD SWAP1 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP3 DUP4 AND DUP2 MSTORE SWAP2 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP9 AND DUP4 MSTORE DUP1 DUP8 AND PUSH1 0x20 DUP5 ADD MSTORE DUP1 DUP7 AND PUSH1 0x40 DUP5 ADD MSTORE POP DUP4 PUSH1 0x60 DUP4 ADD MSTORE PUSH1 0xA0 PUSH1 0x80 DUP4 ADD MSTORE PUSH2 0x277F PUSH1 0xA0 DUP4 ADD DUP5 PUSH2 0x2621 JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 ADD DUP2 DUP5 MSTORE DUP1 DUP6 MLOAD DUP1 DUP4 MSTORE PUSH1 0x40 DUP7 ADD SWAP2 POP PUSH1 0x40 DUP5 DUP3 MUL DUP8 ADD ADD SWAP3 POP DUP4 DUP8 ADD DUP6 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x27FB JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0 DUP9 DUP7 SUB ADD DUP5 MSTORE PUSH2 0x27E9 DUP6 DUP4 MLOAD PUSH2 0x2621 JUMP JUMPDEST SWAP5 POP SWAP3 DUP6 ADD SWAP3 SWAP1 DUP6 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x27AF JUMP JUMPDEST POP SWAP3 SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 DUP4 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 DUP3 AND PUSH1 0x20 DUP5 ADD MSTORE AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP11 DUP12 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP10 DUP11 AND PUSH1 0x20 DUP13 ADD MSTORE SWAP8 DUP10 AND PUSH1 0x40 DUP12 ADD MSTORE PUSH1 0x60 DUP11 ADD SWAP7 SWAP1 SWAP7 MSTORE PUSH1 0x80 DUP10 ADD SWAP5 SWAP1 SWAP5 MSTORE PUSH1 0xA0 DUP9 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0xC0 DUP8 ADD MSTORE PUSH1 0xE0 DUP7 ADD MSTORE PUSH2 0x100 DUP6 ADD MSTORE SWAP1 SWAP2 AND PUSH2 0x120 DUP4 ADD MSTORE PUSH2 0x140 DUP3 ADD MSTORE PUSH2 0x160 ADD SWAP1 JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP5 DUP3 MSTORE PUSH1 0x60 PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0x28EC PUSH1 0x60 DUP4 ADD DUP6 PUSH2 0x2621 JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x40 DUP5 ADD MSTORE PUSH2 0x132F DUP2 DUP6 PUSH2 0x2621 JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST SWAP3 DUP4 MSTORE PUSH1 0x20 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0x20 DUP5 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP3 SWAP1 SWAP3 AND DUP3 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP3 SWAP1 SWAP3 AND DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0xA2D PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x2621 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP5 DUP6 AND DUP2 MSTORE SWAP3 DUP5 AND PUSH1 0x20 DUP5 ADD MSTORE SWAP3 AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP2 ADD PUSH1 0x8 DUP6 LT PUSH2 0x2A5A JUMPI INVALID JUMPDEST SWAP4 DUP2 MSTORE PUSH1 0x20 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 SWAP1 SWAP2 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP2 ADD PUSH2 0x2A7B DUP5 PUSH2 0x2E79 JUMP JUMPDEST SWAP3 DUP2 MSTORE PUSH1 0x20 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2A90 DUP7 PUSH2 0x2E79 JUMP JUMPDEST DUP6 DUP3 MSTORE DUP5 PUSH1 0x20 DUP4 ADD MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP5 AND PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x80 PUSH1 0x60 DUP4 ADD MSTORE PUSH2 0x132F PUSH1 0x80 DUP4 ADD DUP5 PUSH2 0x2621 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x24 SWAP1 DUP3 ADD MSTORE PUSH32 0x466978696E546F6B656E5370656E6465722F43414E4E4F545F494E564F4B455F PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x53454C4600000000000000000000000000000000000000000000000000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x260 DUP3 ADD SWAP1 POP PUSH2 0x2B3A DUP3 DUP9 MLOAD PUSH2 0x2607 JUMP JUMPDEST PUSH1 0x20 DUP8 ADD MLOAD PUSH2 0x2B4C PUSH1 0x20 DUP5 ADD DUP3 PUSH2 0x2607 JUMP JUMPDEST POP PUSH1 0x40 DUP8 ADD MLOAD PUSH2 0x2B5F PUSH1 0x40 DUP5 ADD DUP3 PUSH2 0x269B JUMP JUMPDEST POP PUSH1 0x60 DUP8 ADD MLOAD PUSH2 0x2B72 PUSH1 0x60 DUP5 ADD DUP3 PUSH2 0x269B JUMP JUMPDEST POP PUSH1 0x80 DUP8 ADD MLOAD PUSH2 0x2B85 PUSH1 0x80 DUP5 ADD DUP3 PUSH2 0x269B JUMP JUMPDEST POP PUSH1 0xA0 DUP8 ADD MLOAD PUSH2 0x2B98 PUSH1 0xA0 DUP5 ADD DUP3 PUSH2 0x2607 JUMP JUMPDEST POP PUSH1 0xC0 DUP8 ADD MLOAD PUSH2 0x2BAB PUSH1 0xC0 DUP5 ADD DUP3 PUSH2 0x2607 JUMP JUMPDEST POP PUSH1 0xE0 DUP8 ADD MLOAD PUSH2 0x2BBE PUSH1 0xE0 DUP5 ADD DUP3 PUSH2 0x2607 JUMP JUMPDEST POP PUSH2 0x100 DUP1 DUP9 ADD MLOAD PUSH2 0x2BD2 DUP3 DUP6 ADD DUP3 PUSH2 0x2607 JUMP JUMPDEST POP POP PUSH2 0x120 DUP8 DUP2 ADD MLOAD SWAP1 DUP4 ADD MSTORE PUSH2 0x140 DUP1 DUP9 ADD MLOAD PUSH2 0x2BF2 DUP3 DUP6 ADD DUP3 PUSH2 0x26B1 JUMP JUMPDEST POP POP PUSH2 0x160 DUP8 DUP2 ADD MLOAD SWAP1 DUP4 ADD MSTORE PUSH2 0x2C0D PUSH2 0x180 DUP4 ADD DUP8 PUSH2 0x266B JUMP JUMPDEST PUSH2 0x2C1B PUSH2 0x200 DUP4 ADD DUP7 PUSH2 0x269B JUMP JUMPDEST PUSH2 0x2C29 PUSH2 0x220 DUP4 ADD DUP6 PUSH2 0x2607 JUMP JUMPDEST PUSH2 0x132F PUSH2 0x240 DUP4 ADD DUP5 PUSH2 0x2607 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x200 DUP3 ADD SWAP1 POP PUSH2 0x2C4B DUP3 DUP8 MLOAD PUSH2 0x2607 JUMP JUMPDEST PUSH1 0x20 DUP7 ADD MLOAD PUSH2 0x2C5D PUSH1 0x20 DUP5 ADD DUP3 PUSH2 0x2607 JUMP JUMPDEST POP PUSH1 0x40 DUP7 ADD MLOAD PUSH2 0x2C70 PUSH1 0x40 DUP5 ADD DUP3 PUSH2 0x269B JUMP JUMPDEST POP PUSH1 0x60 DUP7 ADD MLOAD PUSH2 0x2C83 PUSH1 0x60 DUP5 ADD DUP3 PUSH2 0x269B JUMP JUMPDEST POP PUSH1 0x80 DUP7 ADD MLOAD PUSH2 0x2C96 PUSH1 0x80 DUP5 ADD DUP3 PUSH2 0x2607 JUMP JUMPDEST POP PUSH1 0xA0 DUP7 ADD MLOAD PUSH2 0x2CA9 PUSH1 0xA0 DUP5 ADD DUP3 PUSH2 0x2607 JUMP JUMPDEST POP PUSH1 0xC0 DUP7 ADD MLOAD PUSH2 0x2CBC PUSH1 0xC0 DUP5 ADD DUP3 PUSH2 0x2607 JUMP JUMPDEST POP PUSH1 0xE0 DUP7 ADD MLOAD PUSH1 0xE0 DUP4 ADD MSTORE PUSH2 0x100 DUP1 DUP8 ADD MLOAD PUSH2 0x2CDA DUP3 DUP6 ADD DUP3 PUSH2 0x26B1 JUMP JUMPDEST POP POP PUSH2 0x120 DUP7 DUP2 ADD MLOAD SWAP1 DUP4 ADD MSTORE PUSH2 0x2CF5 PUSH2 0x140 DUP4 ADD DUP7 PUSH2 0x266B JUMP JUMPDEST PUSH2 0x2D03 PUSH2 0x1C0 DUP4 ADD DUP6 PUSH2 0x269B JUMP JUMPDEST PUSH2 0x1BAF PUSH2 0x1E0 DUP4 ADD DUP5 PUSH2 0x2607 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 MSTORE PUSH1 0xE0 DUP4 ADD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP7 MLOAD AND DUP4 DUP7 ADD MSTORE DUP1 DUP4 DUP8 ADD MLOAD AND PUSH1 0x40 DUP7 ADD MSTORE DUP1 PUSH1 0x40 DUP8 ADD MLOAD AND PUSH1 0x60 DUP7 ADD MSTORE POP PUSH1 0x60 DUP6 ADD MLOAD PUSH1 0x80 DUP6 ADD MSTORE PUSH1 0x80 DUP6 ADD MLOAD PUSH1 0xA0 DUP6 ADD MSTORE PUSH1 0xA0 DUP6 ADD MLOAD PUSH1 0xC0 DUP1 DUP7 ADD MSTORE DUP2 DUP2 MLOAD PUSH2 0x2D7D DUP2 DUP6 PUSH2 0x2808 JUMP JUMPDEST SWAP4 POP SWAP2 DUP5 ADD SWAP2 DUP4 SWAP2 POP DUP1 DUP6 MUL DUP3 ADD DUP7 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x2DB7 JUMPI DUP6 DUP3 SUB DUP5 MSTORE PUSH2 0x2DA5 DUP3 DUP7 MLOAD PUSH2 0x25E2 JUMP JUMPDEST SWAP5 DUP8 ADD SWAP5 SWAP4 DUP8 ADD SWAP4 SWAP2 POP PUSH1 0x1 ADD PUSH2 0x2D8D JUMP JUMPDEST POP SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x2DE3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x2E01 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x2E21 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x2E68 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x2E50 JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x1008 JUMPI POP POP PUSH1 0x0 SWAP2 ADD MSTORE JUMP JUMPDEST PUSH1 0x6 DUP2 LT PUSH2 0xDFA JUMPI INVALID JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0xDFA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 DUP2 LT PUSH2 0xDFA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0xDFA JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH23 0x74255D0BC140B6A4D94A61F4B412482233613D8EC887EB 0x2D TIMESTAMP CREATE2 LT 0xB0 ADDRESS MSIZE PUSH32 0x64736F6C634300060C0033000000000000000000000000000000000000000000 ",
|
|
"sourceMap": "1445:18737:8:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2840:75;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4926:539;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;6858:248::-;;;;;;;;;;-1:-1:-1;6858:248:8;;;;;:::i;:::-;;:::i;2731:65::-;;;;;;;;;;;;;:::i;7327:250::-;;;;;;;;;;-1:-1:-1;7327:250:8;;;;;:::i;:::-;;:::i;4188:511::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;7730:531::-;;;;;;;;;;-1:-1:-1;7730:531:8;;;;;:::i;:::-;;:::i;5715:936::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;2987:432::-;;;;;;;;;;;;;:::i;1401:51:22:-;;;;;;;;;;;;;:::i;990:48:20:-;;;;;;;;;;;;;:::i;2840:75:8:-;;;:::o;4926:539::-;5182:25;1214:3:21;1366:46;1427:38;:36;:38::i;:::-;1512:20;;1366:99;;-1:-1:-1;1628:30:21;;;1627:37;1623:227;;1684:151;:141;1748:22;1768:1;1748:8;;:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1748:19:21;;:22;-1:-1:-1;;1748:19:21;:22;-1:-1:-1;1748:22:21:i;:::-;1792:15;1684:42;:141::i;:::-;:149;:151::i;:::-;1926:30;;1903:53;;5223:25:8::2;;:::i;:::-;5273:10;5258:25:::0;;5293:9:::2;::::0;::::2;:15:::0;;;5331:27:::2;5305:3:::0;5331:22:::2;:27::i;:::-;5318:10;::::0;::::2;:40:::0;5368:15:::2;::::0;::::2;:27:::0;;;5421:37:::2;5318:5:::0;5421:30:::2;:37::i;:::-;5406:52;;3542:1;3553:24:::1;3592:55;3614:9;3625:21;3592;:55::i;:::-;3553:94:::0;-1:-1:-1;3661:20:8;;3657:88:::1;;3697:37;::::0;:10:::1;::::0;:37;::::1;;;::::0;3717:16;;3697:37:::1;::::0;;;3717:16;3697:10;:37;::::1;;;;;;;;;;;;;::::0;::::1;;;;;;3657:88;-1:-1:-1::0;2047:20:21;;2071:16;;2047:41;;;2024:64;;4926:539:8;;-1:-1:-1;;4926:539:8:o;6858:248::-;6993:19;7035:64;7071:27;7094:3;7071:22;:27::i;7035:64::-;7028:71;6858:248;-1:-1:-1;;6858:248:8:o;2731:65::-;;;;;;;;;;;;;;;;;;;:::o;7327:250::-;7451:19;7493:39;:37;:39::i;:::-;:68;:77;;;;;-1:-1:-1;7493:77:8;;;;;7327:250::o;4188:511::-;4241:14;4271:62;4296:36;4271:24;:62::i;:::-;4343:68;4368:42;4343:24;:68::i;:::-;4421:71;4446:45;4421:24;:71::i;:::-;4502:75;4527:49;4502:24;:75::i;:::-;4587:62;4612:36;4587:24;:62::i;:::-;-1:-1:-1;4666:26:8;4188:511;:::o;7730:531::-;7856:15;7894:360;7943:19;7976:3;:10;;;8000:3;:10;;;8024:3;:15;;;8053:3;:15;;;8082:3;:25;;;8121:3;:8;;;8153:3;:12;;;8143:23;;;;;;8180:3;:9;;;8203:3;:12;;;8229:3;:13;;;7919:333;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;7909:344;;;;;;7894:14;:360::i;5715:936::-;5983:28;1214:3:21;1366:46;1427:38;:36;:38::i;:::-;1512:20;;1366:99;;-1:-1:-1;1628:30:21;;;1627:37;1623:227;;1684:151;:141;1748:22;1768:1;1748:8;;:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1748:19:21;;:22;-1:-1:-1;;1748:19:21;:22;-1:-1:-1;1748:22:21:i;1684:151::-;1926:30;;1903:53;;6046:17:8;;6031:11;;:32:::2;6027:221;;6079:158;:148;6167:4;:11;6196:10;:17;6079:70;:148::i;:158::-;6285:4;:11;6273:24;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6257:40;;6312:9;6307:338;6331:4;:11;6327:1;:15;6307:338;;;6363:25;;:::i;:::-;6417:10;6402:25:::0;;6453:7;;:4;;6458:1;;6453:7;::::2;;;;;;;;;;;6441:5;:9;;:19;;;;6487:31;6510:4;6515:1;6510:7;;;;;;;;;;;;;;6487:22;:31::i;:::-;6474:10;::::0;::::2;:44:::0;6550:13;;:10;;6561:1;;6550:13;::::2;;;;;;;;;;;6532:5;:15;;:31;;;;6597:37;6628:5;6597:30;:37::i;:::-;6578:13;6592:1;6578:16;;;;;;;;;::::0;;::::2;::::0;;;;;:56;-1:-1:-1;6344:3:8::2;;6307:338;;;;3553:24:::1;3592:55;3614:9;3625:21;3592;:55::i;2987:432::-:0;;;:::o;1401:51:22:-;;;:::o;990:48:20:-;;;:::o;1131:476:25:-;1176:20;1208:19;1230:85;1269:36;1230:25;:85::i;17014:880:32:-;17134:13;17178:5;17186:1;17178:9;17167:1;:8;:20;17163:299;;;17203:248;17228:222;17293:90;17401:1;:8;17427:5;17435:1;17427:9;17228:47;:222::i;17203:248::-;-1:-1:-1;17635:13:32;17538:2;17635:13;17629:20;17788:66;17776:79;;17014:880::o;987:319:0:-;1108:12;1186:51;1252:8;1274:15;1143:156;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;987:319:0;;;;:::o;1531:170:38:-;1674:9;1668:16;1661:4;1650:9;1646:20;1639:46;8571:1689:8;8671:25;8712:31;8737:5;8712:24;:31::i;:::-;9083:12;8987:39;:37;:39::i;:::-;9069:10;;;;;8987:81;:93;;;;;;;;;;;:108;;;;9148:9;;;:19;;;:23;9144:225;;9225:9;;;;:18;;;;9261:16;;9295:12;;9325:19;;;;;9187:171;;9295:12;9187:20;:171::i;:::-;9447:9;;;;:18;;;:32;;9477:1;9447:29;:32::i;:::-;9430:49;;:14;;;:49;;;9511:46;9493:64;9489:605;;;9588:33;9615:5;9588:26;:33::i;:::-;9573:48;;9489:605;;;9642:14;;;;:62;;9660:44;9642:62;9638:456;;;9735:33;9762:5;9735:26;:33::i;9638:456::-;9789:14;;;;:60;;9807:42;9789:60;9785:309;;;9880:31;9905:5;9880:24;:31::i;9785:309::-;9942:141;:114;10029:5;:10;;;10041:5;:14;;;9942:86;:114::i;:141::-;10169:5;:14;;;10108:145;;;;10145:5;:10;;;10197:5;:9;;;:16;;;10227:5;:9;;;:16;;;10108:145;;;;;;;;:::i;:::-;;;;;;;;8571:1689;;;:::o;2544:135:33:-;2629:7;2663:1;2659;:5;:13;;2671:1;2659:13;;;2667:1;2659:13;2652:20;2544:135;-1:-1:-1;;;2544:135:33:o;1060:477:24:-;1105:20;1137:19;1159:86;1198:37;1159:25;:86::i;2201:168:19:-;2283:79;;;;;2322:4;;2283:52;;:79;;2336:8;;2346:15;;2283:79;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2201:168;:::o;1810:260:20:-;1901:18;2005:23;2042:10;1952:110;;;;;;;;;:::i;:::-;;;;;;;;;;;;;1942:121;;;;;;1935:128;;1810:260;;;:::o;734:377:1:-;895:12;973:70;1058:8;1080:14;930:174;;;;;;;;;:::i;1606:335:26:-;1698:12;922:3;1899:9;1891:18;;;;;;;;1912:1;1891:22;1890:44;;;1606:335;-1:-1:-1;;1606:335:26:o;1334:378:36:-;1522:12;1274:10;1593:37;;1644:9;1667:6;1687:8;1557:148;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1334:378:36;;;;;:::o;10327:2569:8:-;10488:9;;;;:16;;;:30;;;;;;:66;;;10542:5;:12;;;10522:32;;:5;:9;;;:16;;;:32;;;;10488:66;10484:307;;;10570:210;:200;10670:5;:10;;;10702:5;:12;;;10736:5;:9;;;:16;;;10570:78;:200::i;:210::-;10871:15;10836:5;:9;;;:31;;;:50;10832:305;;10902:224;:214;10998:5;:10;;;11030:15;11067:5;:9;;;:31;;;10902:74;:214::i;:224::-;11214:11;11190:5;:9;;;:21;;;:35;:74;;;;11253:11;11229:5;:9;;;:21;;;:35;11190:74;11186:359;;;11280:254;:244;11377:5;:10;;;11409:11;11442:5;:9;;;:21;;;11485:5;:9;;;:21;;;11280:75;:244::i;:254::-;11608:21;11587:17;;;:42;;;11643:9;;;;:15;;;:35;11639:284;;;11694:218;:208;11798:5;:10;;;11830:5;:17;;;11869:5;:9;;;:15;;;11694:82;:208::i;:218::-;12014:5;:9;;;:16;;;11937:93;;:57;11966:5;:10;;;11978:5;:15;;;11937:28;:57::i;:::-;:93;;;11933:507;;12046:383;:373;12111:65;12194:5;:10;;;12222:5;:9;;;:16;;;12046:373;;;;;;;;;;;;:47;:373::i;:383::-;12537:52;:50;:52::i;:::-;12619:10;;;;;12537:81;:93;;;;;;;;;;12509:25;;;:121;;;12644:30;12640:250;;12690:189;:179;12794:5;:10;;;12826:5;:25;;;12690:82;:179::i;:189::-;10327:2569;:::o;1928:2914:22:-;2092:12;2114:23;2156:31;;;2182:4;2156:31;;2148:80;;;;;;;;;;;;:::i;:::-;;;;;;;;;2438:29;2461:5;2438:22;:29::i;:::-;2434:466;;;2603:37;;;;;2643:6;;2603:15;;;;;;:37;;2619:5;;2634:4;;2603:37;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:46;2599:291;;;2669:182;2725:5;2752;2779:2;2803:6;2669:182;;;;;;;;;;;;:34;:182::i;:::-;2869:7;;;;2599:291;2950:4;2944:11;3070:66;3065:3;3058:79;3184:12;3177:5;3173:24;3166:4;3161:3;3157:14;3150:48;3242:12;3238:2;3234:21;3227:4;3222:3;3218:14;3211:45;3292:6;3285:4;3280:3;3276:14;3269:30;3492:1;3473;3451:4;3430:3;3411:1;3380:12;3373:5;3369:24;3346:5;3324:183;3313:194;;3535:16;3599:6;3596:1;3589:4;3584:3;3580:14;3565:41;4203:1;4195:4;4190:3;4186:14;4180:21;4177:28;4121:2;4113:6;4110:14;4103:22;4074:179;4006:6;3999:14;3975:296;3897:7;3876:409;3865:420;;4309:7;4299:2;;4414:6;4409:3;4402:19;4452:3;4438:17;;4589:6;4582:4;4577:3;4573:14;4569:27;4563:4;4556:41;4299:2;;;4636:7;4631:205;;4659:166;4711:5;4734;4757:2;4777:6;4801:10;4659:34;:166::i;:::-;1928:2914;;;;;;;:::o;13188:3353:8:-;13284:25;14747:38;;:::i;:::-;14852:9;;;;:18;;;:25;14809:30;;14852:34;;14842:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;14842:45:8;;14809:78;;14990:25;15018:5;:9;;;:18;;;14990:46;;15080:3;15057:12;:19;:26;;15050:34;;;;15332:2;15304:26;;;15297:38;15612:19;;15436:2;15418:21;;;15546:2;15523:26;;;15576:60;;15523:26;;15418:21;;15612:23;;15576:19;:60::i;:::-;15759:17;15748:59;;;;;;;;;;;;:::i;:::-;15741:66;;13188:3353;;;;15913:621;15936:5;:10;;;16000:47;;;16065:416;;;;;;;;16136:5;:9;;;:16;;;16065:416;;;;;;16209:4;:15;;;16065:416;;;;;;16259:4;:16;;;16065:416;;;;;;16315:4;:21;;;16065:416;;;;16380:4;:25;;;16065:416;;;;16444:4;:20;;;16065:416;;;15960:535;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16509:9;;;;:15;;;15913:9;:621::i;17611:856::-;17707:25;17748:38;;:::i;:::-;17796:39;;:::i;:::-;17845:28;17884:17;17904:49;17934:5;:9;;;:18;;;17904:29;:49::i;:::-;17884:69;;18017:4;18006:78;;;;;;;;;;;;:::i;:::-;18125:10;;;;18340:9;;;;;:16;18149:272;;17963:121;;-1:-1:-1;17963:121:8;;-1:-1:-1;17963:121:8;;-1:-1:-1;18102:358:8;;18125:10;;18189:45;;18149:272;;17963:121;;;;;;18397:10;;18149:272;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18435:9;;;;:15;;;18102:9;:358::i;:::-;18095:365;17611:856;-1:-1:-1;;;;;;17611:856:8:o;18760:820::-;18854:25;18895:36;;:::i;:::-;18941:39;;:::i;:::-;18990:28;19029:17;19049:49;19079:5;:9;;;:18;;;19049:29;:49::i;:::-;19029:69;;19162:4;19151:76;;;;;;;;;;;;:::i;:::-;19268:10;;;;19481:9;;;;;:16;19292:242;;19108:119;;-1:-1:-1;19108:119:8;;-1:-1:-1;19108:119:8;;-1:-1:-1;19245:328:8;;19268:10;;19332:43;;19292:242;;19108:119;;;;;;19292:242;;;:::i;1117:359:1:-;1269:12;1347:68;1430:7;1451:8;1304:165;;;;;;;;;:::i;1482:409::-;1657:12;1735:69;1819:7;1840:6;1860:14;1692:192;;;;;;;;;;:::i;1897:397::-;2066:12;2144:65;2224:7;2245:4;2263:14;2101:186;;;;;;;;;;:::i;2300:463::-;2500:12;2578:74;2667:7;2688:8;2710:11;2735;2535:221;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2300:463:1;;;;;;:::o;2769:419::-;2949:12;3027:73;3115:7;3136:10;3160:11;2984:197;;;;;;;;;;:::i;2295:1567:18:-;2431:17;2545:49;2578:4;2584:9;2545:32;:49::i;:::-;2636:20;2609:23;;:47;;;;;;;;;2605:929;;;2719:132;2746:4;2768:9;:11;;;2797:9;:11;;;2826:9;:11;;;2719:132;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2707:144;;2605:929;;;2899:21;2872:23;;:48;;;;;;;;;2868:666;;;3092:19;3199:20;3196:1;3189:31;3270:4;3266:2;3259:16;3342:2;3339:1;3329:16;3314:31;;3384:139;3411:11;3440:9;:11;;;3469:9;:11;;;3498:9;:11;;;3384:139;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3372:151;;2868:666;;3624:23;;;3620:236;;3663:182;:172;3728:71;3817:4;3663:47;:172::i;910:464:4:-;1126:12;1204:66;1285:4;1303;1321:13;1348:9;1161:206;;;;;;;;;;;:::i;3617:375:1:-;3777:12;3855:65;3935:7;3956:19;3812:173;;;;;;;;;:::i;5538:446:22:-;5639:21;5817:16;;;5875:2;5862:16;;5911:1;5894:15;;;;5890:23;;;5858:26;;;;5854:34;5851:63;5945:26;5941:30;;5940:37;;5538:446::o;6124:952::-;6385:157;;;;;6414:4;;6385:53;;:157;;6456:5;;6479;;6502:2;;6522:6;;6385:157;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6381:689;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6800:259;:249;6882:5;6906;6929:2;6949:6;6973:17;:24;7001:1;6973:29;;:62;;7025:10;6973:62;;;7005:17;6973:62;6800:56;:249::i;:259::-;6555:515;6381:689;;1935:4297:32;2085:2;2076:6;:11;2072:4154;;;2406:13;;2461:11;;2360:2;2356:15;;;2351:3;2347:25;2343:33;;2421:9;;2402:29;;;2457:22;;2509:8;2496:22;;2313:219;;;2636:4;2626:6;:14;2622:59;;;2660:7;;2622:59;3370:4;3361:6;:13;3357:2859;;;3696:2;3688:6;3684:15;3674:25;;3744:6;3736;3732:19;3794:6;3788:4;3784:17;4101:4;4095:11;4369:198;4387:4;4379:6;4376:16;4369:198;;;4435:13;;4422:27;;4496:2;4532:13;;;;4484:15;;;;4369:198;;;4636:18;;-1:-1:-1;3403:1269:32;;;4917:2;4909:6;4905:15;4895:25;;4965:6;4957;4953:19;5015:6;5009:4;5005:17;5325:6;5319:13;5904:191;5921:4;5915;5911:15;5904:191;;;5969:11;;5956:25;;6014:13;;;;;6060;;;;5904:191;;;6165:19;;-1:-1:-1;;4719:1483:32;1935:4297;;;:::o;19728:452:8:-;19832:25;19873:12;19929:4;19921:18;;19947:5;19954:8;19921:42;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19895:68:8;-1:-1:-1;19895:68:8;-1:-1:-1;19895:68:8;19973:201;;20001:162;:152;20079:4;20101:8;20127:12;20001:60;:152::i;:162::-;19728:452;;;;;;:::o;16819:504::-;16941:17;17009:1;16991:8;:15;:19;16981:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16981:30:8;;16974:37;;17021:15;17046:13;17118:2;17108:8;17104:17;17093:28;;17188:2;17182:4;17178:13;17169:22;;17246:48;17266:5;17273:7;17282:4;:11;17246:19;:48::i;:::-;17305:11;;16819:504;;;:::o;4028:1255:18:-;4251:11;;;;1321:66;-1:-1:-1;4243:47:18;;:110;;-1:-1:-1;4314:11:18;;;;1584:31;-1:-1:-1;4306:47:18;4243:110;4239:331;;;4377:182;:172;4442:71;4531:4;4377:47;:172::i;:182::-;4648:21;4621:23;;:48;;;;;;;;;4617:250;;;4685:171;:161;4750:60;4828:4;4685:47;:161::i;:171::-;4935:21;4908:23;;:48;;;;;;;;;4904:257;;;4972:178;:168;5037:67;5122:4;4972:47;:168::i;:178::-;4028:1255;;:::o;1380:337:4:-;1533:12;1611:52;1678:4;1696;1568:142;;;;;;;;;:::i;725:500:5:-;945:12;1023:87;1125:5;1144;1163:2;1179:6;1199:9;980:238;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;725:500:5;;;;;;;;:::o;3998:409:1:-;4180:12;4258:64;4337:7;4358:8;4380:10;4215:185;;;;;;;;;;:::i;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;5:130::-;72:20;;97:33;72:20;97:33;:::i;142:134::-;220:13;;238:33;220:13;238:33;:::i;1335:788::-;;1479:3;1472:4;1464:6;1460:17;1456:27;1446:2;;-1:-1;;1487:12;1446:2;1534:6;1521:20;1556:107;1571:91;1655:6;1571:91;:::i;:::-;1556:107;:::i;:::-;1691:21;;;1547:116;-1:-1;1735:4;1748:14;;;;1723:17;;;1849:4;1837:17;;;1828:27;;;;1825:36;-1:-1;1822:2;;;1874:1;;1864:12;1822:2;1899:1;1884:233;1909:6;1906:1;1903:13;1884:233;;;1989:64;2049:3;2037:10;1989:64;:::i;:::-;1977:77;;2068:14;;;;2096;;;;1931:1;1924:9;1884:233;;;1888:14;;;;;;1439:684;;;;:::o;2186:782::-;;2346:3;2339:4;2331:6;2327:17;2323:27;2313:2;;-1:-1;;2354:12;2313:2;2394:6;2388:13;2416:112;2431:96;2520:6;2431:96;:::i;2416:112::-;2556:21;;;2407:121;-1:-1;2600:4;2613:14;;;;2588:17;;;2708:1;2693:269;2718:6;2715:1;2712:13;2693:269;;;2794:3;2788:10;2592:6;2776:23;14015:4;;13994:19;2776:23;13998:3;13994:19;;13990:30;13987:2;;;2708:1;;14023:12;13987:2;14051:20;14015:4;14051:20;:::i;:::-;14164:59;14219:3;2600:4;2776:23;;14164:59;:::i;:::-;14139:85;;14291:18;;;14285:25;;14330:18;14319:30;;14316:2;;;2708:1;;14352:12;14316:2;14397:69;14462:3;2600:4;14453:6;2776:23;14438:22;;14397:69;:::i;:::-;14379:16;;;14372:95;2806:93;;-1:-1;;2913:14;;;;2941;;;;2740:1;2733:9;2693:269;;;2697:14;;;;;2306:662;;;;:::o;3255:440::-;;3356:3;3349:4;3341:6;3337:17;3333:27;3323:2;;-1:-1;;3364:12;3323:2;3411:6;3398:20;3433:64;3448:48;3489:6;3448:48;:::i;3433:64::-;3424:73;;3517:6;3510:5;3503:21;3621:3;3553:4;3612:6;3545;3603:16;;3600:25;3597:2;;;3638:1;;3628:12;3597:2;56317:6;3553:4;3545:6;3541:17;3553:4;3579:5;3575:16;56294:30;56373:1;56355:16;;;3553:4;56355:16;56348:27;3579:5;3316:379;-1:-1;;3316:379::o;3704:442::-;;3816:3;3809:4;3801:6;3797:17;3793:27;3783:2;;-1:-1;;3824:12;3783:2;3864:6;3858:13;3886:64;3901:48;3942:6;3901:48;:::i;3886:64::-;3877:73;;3970:6;3963:5;3956:21;4074:3;4006:4;4065:6;3998;4056:16;;4053:25;4050:2;;;4091:1;;4081:12;4050:2;4101:39;4133:6;4006:4;4032:5;4028:16;4006:4;3998:6;3994:17;4101:39;:::i;:::-;;3776:370;;;;:::o;8440:1820::-;;8566:6;;8554:9;8549:3;8545:19;8541:32;8538:2;;;-1:-1;;8576:12;8538:2;8604:22;8566:6;8604:22;:::i;:::-;8595:31;;;8710:57;8763:3;8739:22;8710:57;:::i;:::-;8692:16;8685:83;8864:49;8909:3;8831:2;8889:9;8885:22;8864:49;:::i;:::-;8831:2;8850:5;8846:16;8839:75;8982:2;9040:9;9036:22;14703:20;8982:2;9001:5;8997:16;8990:75;9133:2;9191:9;9187:22;14703:20;9133:2;9152:5;9148:16;9141:75;9294:3;9353:9;9349:22;14703:20;9294:3;9314:5;9310:16;9303:75;9439:3;9498:9;9494:22;14703:20;9439:3;9459:5;9455:16;9448:75;9616:3;9605:9;9601:19;9588:33;9641:18;9633:6;9630:30;9627:2;;;8678:1;;9663:12;9627:2;9708:58;9762:3;9753:6;9742:9;9738:22;9708:58;:::i;:::-;9616:3;9694:5;9690:16;9683:84;;9829:3;9888:9;9884:22;14703:20;9829:3;9849:5;9845:16;9838:75;9978:3;10014:72;10082:3;9978;10062:9;10058:22;10014:72;:::i;:::-;9978:3;9998:5;9994:18;9987:100;;10153:3;;10214:9;10210:22;14703:20;10153:3;10173:5;10169:18;10162:77;;8532:1728;;;;:::o;12181:773::-;;12297:4;12285:9;12280:3;12276:19;12272:30;12269:2;;;-1:-1;;12305:12;12269:2;12333:20;12297:4;12333:20;:::i;:::-;12324:29;;4622:6;4609:20;4634:51;4679:5;4634:51;:::i;:::-;12419:93;;12570:2;12622:22;;15257:20;15282:31;15257:20;15282:31;:::i;:::-;12603:47;12570:2;12589:5;12585:16;12578:73;;12709:2;12767:9;12763:22;3043:20;12709:2;12728:5;12724:16;12717:75;12850:2;12908:9;12904:22;3043:20;12850:2;12869:5;12865:16;12858:75;12263:691;;;;:::o;12997:828::-;;13124:4;13112:9;13107:3;13103:19;13099:30;13096:2;;;-1:-1;;13132:12;13096:2;13160:20;13124:4;13160:20;:::i;:::-;13151:29;;4799:6;4793:13;4811:51;4856:5;4811:51;:::i;:::-;13246:104;;13408:2;13471:22;;15401:13;15419:31;15401:13;15419:31;:::i;:::-;13441:58;13408:2;13427:5;13423:16;13416:84;;13558:2;13627:9;13623:22;3191:13;13558:2;13577:5;13573:16;13566:86;13710:2;13779:9;13775:22;3191:13;13710:2;13729:5;13725:16;13718:86;13090:735;;;;:::o;14495:134::-;14573:13;;54493:34;54482:46;;57968:35;;57958:2;;58017:1;;58007:12;14914:132;14991:13;;54819:10;54808:22;;58215:34;;58205:2;;58263:1;;58253:12;15053:132;15130:13;;54914:18;54903:30;;58337:34;;58327:2;;58385:1;;58375:12;15462:766;;;15697:2;15685:9;15676:7;15672:23;15668:32;15665:2;;;-1:-1;;15703:12;15665:2;15761:17;15748:31;15799:18;;15791:6;15788:30;15785:2;;;-1:-1;;15821:12;15785:2;15949:6;15938:9;15934:22;;;652:3;645:4;637:6;633:17;629:27;619:2;;-1:-1;;660:12;619:2;707:6;694:20;729:117;744:101;838:6;744:101;:::i;729:117::-;874:21;;;918:4;931:14;;;;852:16;906:17;;;-1:-1;1011:270;1036:6;1033:1;1030:13;1011:270;;;1143:74;1213:3;918:4;1119:3;1106:17;910:6;1094:30;;1143:74;:::i;:::-;1131:87;;1232:14;;;;1260;;;;1058:1;1051:9;1011:270;;;-1:-1;15841:125;;-1:-1;16016:18;;16003:32;;-1:-1;;;;16044:30;;;16041:2;;;-1:-1;;16077:12;16041:2;;16107:105;16204:7;16195:6;16184:9;16180:22;16107:105;:::i;:::-;16097:115;;;15659:569;;;;;:::o;16235:241::-;;16339:2;16327:9;16318:7;16314:23;16310:32;16307:2;;;-1:-1;;16345:12;16307:2;-1:-1;3043:20;;16301:175;-1:-1;16301:175::o;16483:428::-;;16641:2;16629:9;16620:7;16616:23;16612:32;16609:2;;;-1:-1;;16647:12;16609:2;16698:17;16692:24;16736:18;;16728:6;16725:30;16722:2;;;-1:-1;;16758:12;16722:2;16863:22;;;;5081:4;5060:19;;;5056:30;5053:2;;;-1:-1;;5089:12;5053:2;5117:20;5081:4;5117:20;:::i;:::-;5225:83;5304:3;5280:22;5225:83;:::i;:::-;5207:16;5200:109;5410:83;5489:3;16641:2;5469:9;5465:22;5410:83;:::i;:::-;16641:2;5396:5;5392:16;5385:109;5567:2;5636:9;5632:22;14851:13;5567:2;5586:5;5582:16;5575:86;5738:2;5807:9;5803:22;14851:13;5738:2;5757:5;5753:16;5746:86;5925:3;5914:9;5910:19;5904:26;16736:18;5942:6;5939:30;5936:2;;;-1:-1;;5972:12;5936:2;6017:117;6130:3;6121:6;6110:9;6106:22;6017:117;:::i;:::-;5925:3;5999:16;;5992:143;-1:-1;6003:5;16603:308;-1:-1;;;;;16603:308::o;16918:648::-;;;;17110:9;17101:7;17097:23;17122:3;17097:23;17093:33;17090:2;;;-1:-1;;17129:12;17090:2;6330:6;;6309:19;6305:32;6302:2;;;-1:-1;;6340:12;6302:2;6368:22;6330:6;6368:22;:::i;:::-;6359:31;;6478:83;6557:3;6533:22;6478:83;:::i;:::-;6460:16;6453:109;6662:83;6741:3;6629:2;6721:9;6717:22;6662:83;:::i;:::-;6629:2;6648:5;6644:16;6637:109;6847:60;6903:3;6814:2;6883:9;6879:22;6847:60;:::i;:::-;6814:2;6833:5;6829:16;6822:86;7009:60;7065:3;6976:2;7045:9;7041:22;7009:60;:::i;:::-;6976:2;6995:5;6991:16;6984:86;7180:60;7236:3;7146;7216:9;7212:22;7180:60;:::i;:::-;7146:3;7166:5;7162:16;7155:86;7337:60;7393:3;7303;7373:9;7369:22;7337:60;:::i;:::-;7303:3;7323:5;7319:16;7312:86;7494:60;7550:3;7460;7530:9;7526:22;7494:60;:::i;:::-;7460:3;7480:5;7476:16;7469:86;7652:60;7708:3;7618;7688:9;7684:22;7652:60;:::i;:::-;7618:3;7638:5;7634:16;7627:86;7782:3;7818:60;7874:3;7782;7854:9;7850:22;7818:60;:::i;:::-;7798:18;;;7791:88;7940:3;8008:22;;;3191:13;7956:18;;;7949:88;8100:3;8136:59;8191:3;8167:22;;;8136:59;:::i;:::-;8100:3;8120:5;8116:18;8109:87;;8257:3;;8329:9;8325:22;14851:13;8257:3;8277:5;8273:18;8266:88;;17181:102;;;17339:91;17422:7;6330:6;17402:9;17398:22;17339:91;:::i;:::-;17329:101;;;;17486:64;17542:7;17467:3;17522:9;17518:22;17486:64;:::i;:::-;17476:74;;17084:482;;;;;:::o;17573:401::-;;17714:2;17702:9;17693:7;17689:23;17685:32;17682:2;;;-1:-1;;17720:12;17682:2;17778:17;17765:31;17816:18;17808:6;17805:30;17802:2;;;-1:-1;;17838:12;17802:2;17868:90;17950:7;17941:6;17930:9;17926:22;17868:90;:::i;:::-;17858:100;17676:298;-1:-1;;;;17676:298::o;17981:581::-;;;18166:3;18154:9;18145:7;18141:23;18137:33;18134:2;;;-1:-1;;18173:12;18134:2;18231:17;18218:31;18269:18;18261:6;18258:30;18255:2;;;-1:-1;;18291:12;18255:2;18321:90;18403:7;18394:6;18383:9;18379:22;18321:90;:::i;:::-;18311:100;;;18466:80;18538:7;18448:2;18518:9;18514:22;18466:80;:::i;:::-;18456:90;;18128:434;;;;;:::o;18569:644::-;;;;18759:9;18750:7;18746:23;18771:3;18746:23;18742:33;18739:2;;;-1:-1;;18778:12;18739:2;10430:6;;10409:19;10405:32;10402:2;;;-1:-1;;10440:12;10402:2;10468:22;10430:6;10468:22;:::i;:::-;10459:31;;10578:83;10657:3;10633:22;10578:83;:::i;:::-;10560:16;10553:109;10762:83;10841:3;10729:2;10821:9;10817:22;10762:83;:::i;:::-;10729:2;10748:5;10744:16;10737:109;10947:60;11003:3;10914:2;10983:9;10979:22;10947:60;:::i;:::-;10914:2;10933:5;10929:16;10922:86;11109:60;11165:3;11076:2;11145:9;11141:22;11109:60;:::i;:::-;11076:2;11095:5;11091:16;11084:86;11266:60;11322:3;11232;11302:9;11298:22;11266:60;:::i;:::-;11232:3;11252:5;11248:16;11241:86;11423:60;11479:3;11389;11459:9;11455:22;11423:60;:::i;:::-;11389:3;11409:5;11405:16;11398:86;11583:60;11639:3;11549;11619:9;11615:22;11583:60;:::i;:::-;11549:3;11569:5;11565:16;11558:86;11705:3;11775:9;11771:22;3191:13;11705:3;11725:5;11721:16;11714:86;11863:3;11899:59;11954:3;11863;11934:9;11930:22;11899:59;:::i;:::-;11863:3;11883:5;11879:18;11872:87;;12020:3;;12092:9;12088:22;14851:13;12020:3;12040:5;12036:18;12029:88;;18830:100;;;18986:91;19069:7;10430:6;19049:9;19045:22;18986:91;:::i;:::-;18976:101;;;;19133:64;19189:7;19114:3;19169:9;19165:22;19133:64;:::i;19220:263::-;;19335:2;19323:9;19314:7;19310:23;19306:32;19303:2;;;-1:-1;;19341:12;19303:2;-1:-1;14851:13;;19297:186;-1:-1;19297:186::o;19689:281::-;;54819:10;33218:16;33212:23;54808:22;34095:3;34088:36;33381:4;33374:5;33370:16;33364:23;33135:4;33381;33411:3;33407:14;33400:38;33453:71;33135:4;33130:3;33126:14;33505:12;33453:71;:::i;20127:127::-;54613:42;54602:54;20204:45;;20198:56::o;23293:323::-;;23425:5;51393:12;52278:6;52273:3;52266:19;23508:52;23553:6;52315:4;52310:3;52306:14;52315:4;23534:5;23530:16;23508:52;:::i;:::-;56835:2;56815:14;56831:7;56811:28;23572:39;;;;52315:4;23572:39;;23373:243;-1:-1;;23373:243::o;30542:800::-;30770:16;30764:23;57072:1;57065:5;57062:12;57052:2;;57078:9;57052:2;24960:66;;30948:4;30937:16;;;30931:23;55016:4;55005:16;31004:14;;;34300:35;31095:4;31084:16;;;31078:23;31155:14;;;22848:37;31246:4;31235:16;;;31229:23;31306:14;;22848:37;30662:680::o;33569:103::-;54493:34;54482:46;33630:37;;33624:48::o;34136:100::-;54914:18;54903:30;34195:36;;34189:47::o;34461:271::-;;24133:5;51393:12;24244:52;24289:6;24284:3;24277:4;24270:5;24266:16;24244:52;:::i;:::-;24308:16;;;;;34595:137;-1:-1;;34595:137::o;34739:659::-;25883:66;25863:87;;25848:1;25969:11;;22848:37;;;;35250:12;;;22848:37;35361:12;;;34984:414::o;35405:333::-;54613:42;54602:54;;;20204:45;;54602:54;;35724:2;35709:18;;20204:45;35560:2;35545:18;;35531:207::o;35745:752::-;;54613:42;;53434:5;54602:54;20211:3;20204:45;54613:42;53434:5;54602:54;36167:2;36156:9;36152:18;20204:45;54613:42;53434:5;54602:54;36250:2;36239:9;36235:18;20204:45;;22878:5;36333:2;36322:9;36318:18;22848:37;36002:3;36370;36359:9;36355:19;36348:49;36411:76;36002:3;35991:9;35987:19;36473:6;36411:76;:::i;:::-;36403:84;35973:524;-1:-1;;;;;;;35973:524::o;36504:406::-;;36699:2;;36688:9;36684:18;36699:2;36720:17;36713:47;36774:126;20882:5;51393:12;52278:6;52273:3;52266:19;52306:14;36688:9;52306:14;20894:102;;52306:14;36699:2;21053:6;21049:17;36688:9;21040:27;;21028:39;;36699:2;21147:5;51048:14;-1:-1;21186:357;21211:6;21208:1;21205:13;21186:357;;;21263:20;36688:9;21267:4;21263:20;;21258:3;21251:33;19610:64;19670:3;21318:6;21312:13;19610:64;:::i;:::-;21332:90;-1:-1;21522:14;;;;51965;;;;21233:1;21226:9;21186:357;;;-1:-1;36766:134;;36670:240;-1:-1;;;;;;;36670:240::o;36917:222::-;22848:37;;;37044:2;37029:18;;37015:124::o;37146:460::-;22848:37;;;54613:42;54602:54;;;37509:2;37494:18;;20057:58;54602:54;37592:2;37577:18;;20204:45;37337:2;37322:18;;37308:298::o;37613:1420::-;22848:37;;;54613:42;54602:54;;;38241:2;38226:18;;20204:45;54602:54;;;38324:2;38309:18;;20204:45;38407:2;38392:18;;22848:37;;;;38490:3;38475:19;;22848:37;;;;38574:3;38559:19;;22848:37;;;;38658:3;38643:19;;22848:37;38742:3;38727:19;;22848:37;38826:3;38811:19;;22848:37;54602:54;;;38933:3;38918:19;;20204:45;39018:3;39003:19;;22848:37;38060:3;38045:19;;38031:1002::o;39491:329::-;22848:37;;;53709:66;53698:78;39806:2;39791:18;;23245:36;39644:2;39629:18;;39615:205::o;39827:612::-;;22878:5;22855:3;22848:37;40046:2;40164;40153:9;40149:18;40142:48;40204:76;40046:2;40035:9;40031:18;40266:6;40204:76;:::i;:::-;40328:9;40322:4;40318:20;40313:2;40302:9;40298:18;40291:48;40353:76;40424:4;40415:6;40353:76;:::i;40446:333::-;22848:37;;;40765:2;40750:18;;22848:37;40601:2;40586:18;;40572:207::o;40786:444::-;22848:37;;;41133:2;41118:18;;22848:37;;;;41216:2;41201:18;;22848:37;40969:2;40954:18;;40940:290::o;41237:556::-;22848:37;;;41613:2;41598:18;;22848:37;;;;41696:2;41681:18;;22848:37;41779:2;41764:18;;22848:37;41448:3;41433:19;;41419:374::o;41800:548::-;22848:37;;;55016:4;55005:16;;;;42168:2;42153:18;;34300:35;42251:2;42236:18;;22848:37;42334:2;42319:18;;22848:37;42007:3;41992:19;;41978:370::o;42355:218::-;53709:66;53698:78;;;;23245:36;;42480:2;42465:18;;42451:122::o;42580:329::-;53709:66;53698:78;;;;23245:36;;54613:42;54602:54;42895:2;42880:18;;20204:45;42733:2;42718:18;;42704:205::o;42916:329::-;53709:66;53698:78;;;;23245:36;;43231:2;43216:18;;22848:37;43069:2;43054:18;;43040:205::o;43252:306::-;;43397:2;43418:17;43411:47;43472:76;43397:2;43386:9;43382:18;43534:6;43472:76;:::i;43565:602::-;54613:42;54602:54;;;24420:73;;54602:54;;;43987:2;43972:18;;20204:45;54602:54;;44070:2;44055:18;;20204:45;44153:2;44138:18;;22848:37;;;;43799:3;43784:19;;43770:397::o;44174:510::-;44390:2;44375:18;;56956:1;56946:12;;56936:2;;56962:9;56936:2;24788:83;;;44587:2;44572:18;;22848:37;;;;44670:2;44655:18;;;22848:37;44361:323;:::o;44691:395::-;44877:2;44862:18;;54342:66;54402:5;54342:66;:::i;:::-;25140:81;;;45072:2;45057:18;22848:37;44848:238;:::o;45093:702::-;;54342:66;54402:5;54342:66;:::i;:::-;55923:57;25147:3;25140:81;22878:5;45549:2;45538:9;45534:18;22848:37;54613:42;53434:5;54602:54;45632:2;45621:9;45617:18;20204:45;45353:3;45669:2;45658:9;45654:18;45647:48;45709:76;45353:3;45342:9;45338:19;45771:6;45709:76;:::i;46119:416::-;46319:2;46333:47;;;26219:2;46304:18;;;52266:19;26255:34;52306:14;;;26235:55;26324:6;26310:12;;;26303:28;26350:12;;;46290:245::o;46542:955::-;;46923:3;46912:9;46908:19;46900:27;;26703:86;26774:14;26680:16;26674:23;26703:86;:::i;:::-;26874:4;26867:5;26863:16;26857:23;26886:86;26874:4;26961:3;26957:14;26943:12;26886:86;:::i;:::-;;27058:4;27051:5;27047:16;27041:23;27070:63;27058:4;27122:3;27118:14;27104:12;27070:63;:::i;:::-;;27219:4;27212:5;27208:16;27202:23;27231:63;27219:4;27283:3;27279:14;27265:12;27231:63;:::i;:::-;;27388:4;27381:5;27377:16;27371:23;27400:63;27388:4;27452:3;27448:14;27434:12;27400:63;:::i;:::-;;27543:4;27536:5;27532:16;27526:23;27555:63;27543:4;27607:3;27603:14;27589:12;27555:63;:::i;:::-;;27698:4;27691:5;27687:16;27681:23;27710:63;27698:4;27762:3;27758:14;27744:12;27710:63;:::i;:::-;;27854:4;27847:5;27843:16;27837:23;27866:63;27854:4;27918:3;27914:14;27900:12;27866:63;:::i;:::-;;28016:6;;28009:5;28005:18;27999:25;28030:65;28016:6;28082:3;28078:16;28064:12;28030:65;:::i;:::-;-1:-1;;28174:6;28163:18;;;28157:25;28236:16;;;22848:37;28334:6;28323:18;;;28317:25;28348:63;28394:16;;;28317:25;28348:63;:::i;:::-;-1:-1;;28490:6;28479:18;;;28473:25;28552:16;;;22848:37;47076:127;47198:3;47183:19;;47174:6;47076:127;:::i;:::-;47214:73;47282:3;47271:9;47267:19;47258:6;47214:73;:::i;:::-;47298:89;47382:3;47371:9;47367:19;47358:6;47298:89;:::i;:::-;47398;47482:3;47471:9;47467:19;47458:6;47398:89;:::i;47504:803::-;;47837:3;47826:9;47822:19;47814:27;;28916:86;28987:14;28893:16;28887:23;28916:86;:::i;:::-;29087:4;29080:5;29076:16;29070:23;29099:86;29087:4;29174:3;29170:14;29156:12;29099:86;:::i;:::-;;29271:4;29264:5;29260:16;29254:23;29283:63;29271:4;29335:3;29331:14;29317:12;29283:63;:::i;:::-;;29432:4;29425:5;29421:16;29415:23;29444:63;29432:4;29496:3;29492:14;29478:12;29444:63;:::i;:::-;;29587:4;29580:5;29576:16;29570:23;29599:63;29587:4;29651:3;29647:14;29633:12;29599:63;:::i;:::-;;29742:4;29735:5;29731:16;29725:23;29754:63;29742:4;29806:3;29802:14;29788:12;29754:63;:::i;:::-;;29900:4;29893:5;29889:16;29883:23;29912:63;29900:4;29964:3;29960:14;29946:12;29912:63;:::i;:::-;;30054:4;30047:5;30043:16;30037:23;30054:4;30118:3;30114:14;22848:37;30210:6;;30203:5;30199:18;30193:25;30224:63;30210:6;30274:3;30270:16;30256:12;30224:63;:::i;:::-;-1:-1;;30366:6;30355:18;;;30349:25;30428:16;;;22848:37;47986:127;48108:3;48093:19;;48084:6;47986:127;:::i;:::-;48124:73;48192:3;48181:9;48177:19;48168:6;48124:73;:::i;:::-;48208:89;48292:3;48281:9;48277:19;48268:6;48208:89;:::i;48314:414::-;;48513:2;;48534:17;48527:47;31620:14;48502:9;31620:14;54613:42;;31702:16;31696:23;54602:54;48513:2;48502:9;48498:18;20204:45;54613:42;48513:2;31882:5;31878:16;31872:23;54602:54;31972:14;48502:9;31972:14;24420:73;54613:42;31972:14;32066:5;32062:16;32056:23;54602:54;32156:14;48502:9;32156:14;24420:73;;32156:14;32255:5;32251:16;32245:23;32322:14;48502:9;32322:14;22848:37;32322:14;32425:5;32421:16;32415:23;32492:14;48502:9;32492:14;22848:37;32492:14;32590:5;32586:16;32580:23;31629:4;;48502:9;32623:14;32616:38;32669:167;21974:5;51393:12;21993:108;22094:6;22089:3;21993:108;:::i;:::-;21986:115;-1:-1;51048:14;;;;21986:115;;-1:-1;22154:17;;;22145:27;;-1:-1;22314:426;22339:6;22336:1;22333:13;22314:426;;;22401:9;22395:4;22391:20;22386:3;22379:33;22468:128;22591:4;22446:6;22440:13;22468:128;:::i;:::-;51965:14;;;;22719;;;;22460:136;-1:-1;22361:1;22354:9;22314:426;;;-1:-1;48580:138;48484:244;-1:-1;;;;;;;;48484:244::o;49304:256::-;49366:2;49360:9;49392:17;;;49467:18;49452:34;;49488:22;;;49449:62;49446:2;;;49524:1;;49514:12;49446:2;49366;49533:22;49344:216;;-1:-1;49344:216::o;49567:341::-;;49763:18;49755:6;49752:30;49749:2;;;-1:-1;;49785:12;49749:2;-1:-1;49830:4;49818:17;;;49883:15;;49686:222::o;50596:321::-;;50739:18;50731:6;50728:30;50725:2;;;-1:-1;;50761:12;50725:2;-1:-1;50838:4;50815:17;50834:9;50811:33;50902:4;50892:15;;50662:255::o;56390:268::-;56455:1;56462:101;56476:6;56473:1;56470:13;56462:101;;;56543:11;;;56537:18;56524:11;;;56517:39;56498:2;56491:10;56462:101;;;56578:6;56575:1;56572:13;56569:2;;;-1:-1;;56455:1;56625:16;;56618:27;56439:219::o;57101:124::-;57203:1;57196:5;57193:12;57183:2;;57209:9;57232:117;54613:42;57319:5;54602:54;57294:5;57291:35;57281:2;;57340:1;;57330:12;57790:112;57877:1;57870:5;57867:12;57857:2;;57893:1;;57883:12;58401:113;55016:4;58484:5;55005:16;58461:5;58458:33;58448:2;;58505:1;;58495:12"
|
|
},
|
|
"methodIdentifiers": {
|
|
"EIP712_DOMAIN_SEPARATOR()": "dab400f3",
|
|
"FEATURE_NAME()": "6ae4b4f7",
|
|
"FEATURE_VERSION()": "031b905c",
|
|
"GREEDY_TOKENS_BLOOM_FILTER()": "d925a56d",
|
|
"MTX_EIP712_TYPEHASH()": "d036092d",
|
|
"batchExecuteMetaTransactions((address,address,uint256,uint256,uint256,uint256,bytes,uint256,address,uint256)[],(uint8,uint8,bytes32,bytes32)[])": "c5579ec8",
|
|
"executeMetaTransaction((address,address,uint256,uint256,uint256,uint256,bytes,uint256,address,uint256),(uint8,uint8,bytes32,bytes32))": "3d61ed3e",
|
|
"getMetaTransactionExecutedBlock((address,address,uint256,uint256,uint256,uint256,bytes,uint256,address,uint256))": "3fb2da38",
|
|
"getMetaTransactionHash((address,address,uint256,uint256,uint256,uint256,bytes,uint256,address,uint256))": "ae550497",
|
|
"getMetaTransactionHashExecutedBlock(bytes32)": "72d17d03",
|
|
"migrate()": "8fd3ab80"
|
|
}
|
|
}
|
|
},
|
|
"sourceTreeHashHex": "0x3e068e6e9945e4fd01e8296ceeb1877006d64f7b595b7da44bd8067067278a4e",
|
|
"sources": {
|
|
"./MetaTransactionsFeature.sol": {
|
|
"id": 8,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"@0x/contracts-utils/contracts/src/v06/LibBytesV06.sol\";\nimport \"@0x/contracts-utils/contracts/src/v06/LibSafeMathV06.sol\";\nimport \"../errors/LibMetaTransactionsRichErrors.sol\";\nimport \"../fixins/FixinCommon.sol\";\nimport \"../fixins/FixinReentrancyGuard.sol\";\nimport \"../fixins/FixinTokenSpender.sol\";\nimport \"../fixins/FixinEIP712.sol\";\nimport \"../migrations/LibMigrate.sol\";\nimport \"../storage/LibMetaTransactionsStorage.sol\";\nimport \"./interfaces/IFeature.sol\";\nimport \"./interfaces/IMetaTransactionsFeature.sol\";\nimport \"./interfaces/INativeOrdersFeature.sol\";\nimport \"./interfaces/ITransformERC20Feature.sol\";\nimport \"./libs/LibSignature.sol\";\n\n/// @dev MetaTransactions feature.\ncontract MetaTransactionsFeature is\n IFeature,\n IMetaTransactionsFeature,\n FixinCommon,\n FixinReentrancyGuard,\n FixinEIP712,\n FixinTokenSpender\n{\n using LibBytesV06 for bytes;\n using LibRichErrorsV06 for bytes;\n\n /// @dev Describes the state of a meta transaction.\n struct ExecuteState {\n // Sender of the meta-transaction.\n address sender;\n // Hash of the meta-transaction data.\n bytes32 hash;\n // The meta-transaction data.\n MetaTransactionData mtx;\n // The meta-transaction signature (by `mtx.signer`).\n LibSignature.Signature signature;\n // The selector of the function being called.\n bytes4 selector;\n // The ETH balance of this contract before performing the call.\n uint256 selfBalance;\n // The block number at which the meta-transaction was executed.\n uint256 executedBlockNumber;\n }\n\n /// @dev Arguments for a `TransformERC20.transformERC20()` call.\n struct ExternalTransformERC20Args {\n IERC20TokenV06 inputToken;\n IERC20TokenV06 outputToken;\n uint256 inputTokenAmount;\n uint256 minOutputTokenAmount;\n ITransformERC20Feature.Transformation[] transformations;\n }\n\n /// @dev Name of this feature.\n string public constant override FEATURE_NAME = \"MetaTransactions\";\n /// @dev Version of this feature.\n uint256 public immutable override FEATURE_VERSION = _encodeVersion(1, 1, 0);\n /// @dev EIP712 typehash of the `MetaTransactionData` struct.\n bytes32 public immutable MTX_EIP712_TYPEHASH = keccak256(\n \"MetaTransactionData(\"\n \"address signer,\"\n \"address sender,\"\n \"uint256 minGasPrice,\"\n \"uint256 maxGasPrice,\"\n \"uint256 expirationTimeSeconds,\"\n \"uint256 salt,\"\n \"bytes callData,\"\n \"uint256 value,\"\n \"address feeToken,\"\n \"uint256 feeAmount\"\n \")\"\n );\n\n /// @dev Refunds up to `msg.value` leftover ETH at the end of the call.\n modifier refundsAttachedEth() {\n _;\n uint256 remainingBalance =\n LibSafeMathV06.min256(msg.value, address(this).balance);\n if (remainingBalance > 0) {\n msg.sender.transfer(remainingBalance);\n }\n }\n\n constructor(address zeroExAddress, bytes32 greedyTokensBloomFilter)\n public\n FixinCommon()\n FixinEIP712(zeroExAddress)\n FixinTokenSpender(greedyTokensBloomFilter)\n {\n // solhint-disable-next-line no-empty-blocks\n }\n\n /// @dev Initialize and register this feature.\n /// Should be delegatecalled by `Migrate.migrate()`.\n /// @return success `LibMigrate.SUCCESS` on success.\n function migrate()\n external\n returns (bytes4 success)\n {\n _registerFeatureFunction(this.executeMetaTransaction.selector);\n _registerFeatureFunction(this.batchExecuteMetaTransactions.selector);\n _registerFeatureFunction(this.getMetaTransactionExecutedBlock.selector);\n _registerFeatureFunction(this.getMetaTransactionHashExecutedBlock.selector);\n _registerFeatureFunction(this.getMetaTransactionHash.selector);\n return LibMigrate.MIGRATE_SUCCESS;\n }\n\n /// @dev Execute a single meta-transaction.\n /// @param mtx The meta-transaction.\n /// @param signature The signature by `mtx.signer`.\n /// @return returnResult The ABI-encoded result of the underlying call.\n function executeMetaTransaction(\n MetaTransactionData memory mtx,\n LibSignature.Signature memory signature\n )\n public\n payable\n override\n nonReentrant(REENTRANCY_MTX)\n refundsAttachedEth\n returns (bytes memory returnResult)\n {\n ExecuteState memory state;\n state.sender = msg.sender;\n state.mtx = mtx;\n state.hash = getMetaTransactionHash(mtx);\n state.signature = signature;\n\n returnResult = _executeMetaTransactionPrivate(state);\n }\n\n /// @dev Execute multiple meta-transactions.\n /// @param mtxs The meta-transactions.\n /// @param signatures The signature by each respective `mtx.signer`.\n /// @return returnResults The ABI-encoded results of the underlying calls.\n function batchExecuteMetaTransactions(\n MetaTransactionData[] memory mtxs,\n LibSignature.Signature[] memory signatures\n )\n public\n payable\n override\n nonReentrant(REENTRANCY_MTX)\n refundsAttachedEth\n returns (bytes[] memory returnResults)\n {\n if (mtxs.length != signatures.length) {\n LibMetaTransactionsRichErrors.InvalidMetaTransactionsArrayLengthsError(\n mtxs.length,\n signatures.length\n ).rrevert();\n }\n returnResults = new bytes[](mtxs.length);\n for (uint256 i = 0; i < mtxs.length; ++i) {\n ExecuteState memory state;\n state.sender = msg.sender;\n state.mtx = mtxs[i];\n state.hash = getMetaTransactionHash(mtxs[i]);\n state.signature = signatures[i];\n\n returnResults[i] = _executeMetaTransactionPrivate(state);\n }\n }\n\n /// @dev Get the block at which a meta-transaction has been executed.\n /// @param mtx The meta-transaction.\n /// @return blockNumber The block height when the meta-transactioin was executed.\n function getMetaTransactionExecutedBlock(MetaTransactionData memory mtx)\n public\n override\n view\n returns (uint256 blockNumber)\n {\n return getMetaTransactionHashExecutedBlock(getMetaTransactionHash(mtx));\n }\n\n /// @dev Get the block at which a meta-transaction hash has been executed.\n /// @param mtxHash The meta-transaction hash.\n /// @return blockNumber The block height when the meta-transactioin was executed.\n function getMetaTransactionHashExecutedBlock(bytes32 mtxHash)\n public\n override\n view\n returns (uint256 blockNumber)\n {\n return LibMetaTransactionsStorage.getStorage().mtxHashToExecutedBlockNumber[mtxHash];\n }\n\n /// @dev Get the EIP712 hash of a meta-transaction.\n /// @param mtx The meta-transaction.\n /// @return mtxHash The EIP712 hash of `mtx`.\n function getMetaTransactionHash(MetaTransactionData memory mtx)\n public\n override\n view\n returns (bytes32 mtxHash)\n {\n return _getEIP712Hash(keccak256(abi.encode(\n MTX_EIP712_TYPEHASH,\n mtx.signer,\n mtx.sender,\n mtx.minGasPrice,\n mtx.maxGasPrice,\n mtx.expirationTimeSeconds,\n mtx.salt,\n keccak256(mtx.callData),\n mtx.value,\n mtx.feeToken,\n mtx.feeAmount\n )));\n }\n\n /// @dev Execute a meta-transaction by `sender`. Low-level, hidden variant.\n /// @param state The `ExecuteState` for this metatransaction, with `sender`,\n /// `hash`, `mtx`, and `signature` fields filled.\n /// @return returnResult The ABI-encoded result of the underlying call.\n function _executeMetaTransactionPrivate(ExecuteState memory state)\n private\n returns (bytes memory returnResult)\n {\n _validateMetaTransaction(state);\n\n // Mark the transaction executed by storing the block at which it was executed.\n // Currently the block number just indicates that the mtx was executed and\n // serves no other purpose from within this contract.\n LibMetaTransactionsStorage.getStorage()\n .mtxHashToExecutedBlockNumber[state.hash] = block.number;\n\n // Pay the fee to the sender.\n if (state.mtx.feeAmount > 0) {\n _transferERC20Tokens(\n state.mtx.feeToken,\n state.mtx.signer,\n state.sender,\n state.mtx.feeAmount\n );\n }\n\n // Execute the call based on the selector.\n state.selector = state.mtx.callData.readBytes4(0);\n if (state.selector == ITransformERC20Feature.transformERC20.selector) {\n returnResult = _executeTransformERC20Call(state);\n } else if (state.selector == INativeOrdersFeature.fillLimitOrder.selector) {\n returnResult = _executeFillLimitOrderCall(state);\n } else if (state.selector == INativeOrdersFeature.fillRfqOrder.selector) {\n returnResult = _executeFillRfqOrderCall(state);\n } else {\n LibMetaTransactionsRichErrors\n .MetaTransactionUnsupportedFunctionError(state.hash, state.selector)\n .rrevert();\n }\n emit MetaTransactionExecuted(\n state.hash,\n state.selector,\n state.mtx.signer,\n state.mtx.sender\n );\n }\n\n /// @dev Validate that a meta-transaction is executable.\n function _validateMetaTransaction(ExecuteState memory state)\n private\n view\n {\n // Must be from the required sender, if set.\n if (state.mtx.sender != address(0) && state.mtx.sender != state.sender) {\n LibMetaTransactionsRichErrors\n .MetaTransactionWrongSenderError(\n state.hash,\n state.sender,\n state.mtx.sender\n ).rrevert();\n }\n // Must not be expired.\n if (state.mtx.expirationTimeSeconds <= block.timestamp) {\n LibMetaTransactionsRichErrors\n .MetaTransactionExpiredError(\n state.hash,\n block.timestamp,\n state.mtx.expirationTimeSeconds\n ).rrevert();\n }\n // Must have a valid gas price.\n if (state.mtx.minGasPrice > tx.gasprice || state.mtx.maxGasPrice < tx.gasprice) {\n LibMetaTransactionsRichErrors\n .MetaTransactionGasPriceError(\n state.hash,\n tx.gasprice,\n state.mtx.minGasPrice,\n state.mtx.maxGasPrice\n ).rrevert();\n }\n // Must have enough ETH.\n state.selfBalance = address(this).balance;\n if (state.mtx.value > state.selfBalance) {\n LibMetaTransactionsRichErrors\n .MetaTransactionInsufficientEthError(\n state.hash,\n state.selfBalance,\n state.mtx.value\n ).rrevert();\n }\n\n if (LibSignature.getSignerOfHash(state.hash, state.signature) !=\n state.mtx.signer) {\n LibSignatureRichErrors.SignatureValidationError(\n LibSignatureRichErrors.SignatureValidationErrorCodes.WRONG_SIGNER,\n state.hash,\n state.mtx.signer,\n // TODO: Remove this field from SignatureValidationError\n // when rich reverts are part of the protocol repo.\n \"\"\n ).rrevert();\n }\n // Transaction must not have been already executed.\n state.executedBlockNumber = LibMetaTransactionsStorage\n .getStorage().mtxHashToExecutedBlockNumber[state.hash];\n if (state.executedBlockNumber != 0) {\n LibMetaTransactionsRichErrors\n .MetaTransactionAlreadyExecutedError(\n state.hash,\n state.executedBlockNumber\n ).rrevert();\n }\n }\n\n /// @dev Execute a `ITransformERC20Feature.transformERC20()` meta-transaction call\n /// by decoding the call args and translating the call to the internal\n /// `ITransformERC20Feature._transformERC20()` variant, where we can override\n /// the taker address.\n function _executeTransformERC20Call(ExecuteState memory state)\n private\n returns (bytes memory returnResult)\n {\n // HACK(dorothy-zbornak): `abi.decode()` with the individual args\n // will cause a stack overflow. But we can prefix the call data with an\n // offset to transform it into the encoding for the equivalent single struct arg,\n // since decoding a single struct arg consumes far less stack space than\n // decoding multiple struct args.\n\n // Where the encoding for multiple args (with the selector ommitted)\n // would typically look like:\n // | argument | offset |\n // |--------------------------|---------|\n // | inputToken | 0 |\n // | outputToken | 32 |\n // | inputTokenAmount | 64 |\n // | minOutputTokenAmount | 96 |\n // | transformations (offset) | 128 | = 32\n // | transformations (data) | 160 |\n\n // We will ABI-decode a single struct arg copy with the layout:\n // | argument | offset |\n // |--------------------------|---------|\n // | (arg 1 offset) | 0 | = 32\n // | inputToken | 32 |\n // | outputToken | 64 |\n // | inputTokenAmount | 96 |\n // | minOutputTokenAmount | 128 |\n // | transformations (offset) | 160 | = 32\n // | transformations (data) | 192 |\n\n ExternalTransformERC20Args memory args;\n {\n bytes memory encodedStructArgs = new bytes(state.mtx.callData.length - 4 + 32);\n // Copy the args data from the original, after the new struct offset prefix.\n bytes memory fromCallData = state.mtx.callData;\n assert(fromCallData.length >= 160);\n uint256 fromMem;\n uint256 toMem;\n assembly {\n // Prefix the calldata with a struct offset,\n // which points to just one word over.\n mstore(add(encodedStructArgs, 32), 32)\n // Copy everything after the selector.\n fromMem := add(fromCallData, 36)\n // Start copying after the struct offset.\n toMem := add(encodedStructArgs, 64)\n }\n LibBytesV06.memCopy(toMem, fromMem, fromCallData.length - 4);\n // Decode call args for `ITransformERC20Feature.transformERC20()` as a struct.\n args = abi.decode(encodedStructArgs, (ExternalTransformERC20Args));\n }\n // Call `ITransformERC20Feature._transformERC20()` (internal variant).\n return _callSelf(\n state.hash,\n abi.encodeWithSelector(\n ITransformERC20Feature._transformERC20.selector,\n ITransformERC20Feature.TransformERC20Args({\n taker: state.mtx.signer, // taker is mtx signer\n inputToken: args.inputToken,\n outputToken: args.outputToken,\n inputTokenAmount: args.inputTokenAmount,\n minOutputTokenAmount: args.minOutputTokenAmount,\n transformations: args.transformations\n })\n ),\n state.mtx.value\n );\n }\n\n /// @dev Extract arguments from call data by copying everything after the\n /// 4-byte selector into a new byte array.\n /// @param callData The call data from which arguments are to be extracted.\n /// @return args The extracted arguments as a byte array.\n function _extractArgumentsFromCallData(\n bytes memory callData\n )\n private\n pure\n returns (bytes memory args)\n {\n args = new bytes(callData.length - 4);\n uint256 fromMem;\n uint256 toMem;\n\n assembly {\n fromMem := add(callData, 36) // skip length and 4-byte selector\n toMem := add(args, 32) // write after length prefix\n }\n\n LibBytesV06.memCopy(toMem, fromMem, args.length);\n\n return args;\n }\n\n /// @dev Execute a `INativeOrdersFeature.fillLimitOrder()` meta-transaction call\n /// by decoding the call args and translating the call to the internal\n /// `INativeOrdersFeature._fillLimitOrder()` variant, where we can override\n /// the taker address.\n function _executeFillLimitOrderCall(ExecuteState memory state)\n private\n returns (bytes memory returnResult)\n {\n LibNativeOrder.LimitOrder memory order;\n LibSignature.Signature memory signature;\n uint128 takerTokenFillAmount;\n\n bytes memory args = _extractArgumentsFromCallData(state.mtx.callData);\n (order, signature, takerTokenFillAmount) = abi.decode(args, (LibNativeOrder.LimitOrder, LibSignature.Signature, uint128));\n\n return _callSelf(\n state.hash,\n abi.encodeWithSelector(\n INativeOrdersFeature._fillLimitOrder.selector,\n order,\n signature,\n takerTokenFillAmount,\n state.mtx.signer, // taker is mtx signer\n msg.sender\n ),\n state.mtx.value\n );\n }\n\n /// @dev Execute a `INativeOrdersFeature.fillRfqOrder()` meta-transaction call\n /// by decoding the call args and translating the call to the internal\n /// `INativeOrdersFeature._fillRfqOrder()` variant, where we can overrideunimpleme\n /// the taker address.\n function _executeFillRfqOrderCall(ExecuteState memory state)\n private\n returns (bytes memory returnResult)\n {\n LibNativeOrder.RfqOrder memory order;\n LibSignature.Signature memory signature;\n uint128 takerTokenFillAmount;\n\n bytes memory args = _extractArgumentsFromCallData(state.mtx.callData);\n (order, signature, takerTokenFillAmount) = abi.decode(args, (LibNativeOrder.RfqOrder, LibSignature.Signature, uint128));\n\n return _callSelf(\n state.hash,\n abi.encodeWithSelector(\n INativeOrdersFeature._fillRfqOrder.selector,\n order,\n signature,\n takerTokenFillAmount,\n state.mtx.signer // taker is mtx signer\n ),\n state.mtx.value\n );\n }\n\n /// @dev Make an arbitrary internal, meta-transaction call.\n /// Warning: Do not let unadulterated `callData` into this function.\n function _callSelf(bytes32 hash, bytes memory callData, uint256 value)\n private\n returns (bytes memory returnResult)\n {\n bool success;\n (success, returnResult) = address(this).call{value: value}(callData);\n if (!success) {\n LibMetaTransactionsRichErrors.MetaTransactionCallFailedError(\n hash,\n callData,\n returnResult\n ).rrevert();\n }\n }\n}\n"
|
|
},
|
|
"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol": {
|
|
"id": 38,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibRichErrorsV06 {\n\n // bytes4(keccak256(\"Error(string)\"))\n bytes4 internal constant STANDARD_ERROR_SELECTOR = 0x08c379a0;\n\n // solhint-disable func-name-mixedcase\n /// @dev ABI encode a standard, string revert error payload.\n /// This is the same payload that would be included by a `revert(string)`\n /// solidity statement. It has the function signature `Error(string)`.\n /// @param message The error string.\n /// @return The ABI encoded error.\n function StandardError(string memory message)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n STANDARD_ERROR_SELECTOR,\n bytes(message)\n );\n }\n // solhint-enable func-name-mixedcase\n\n /// @dev Reverts an encoded rich revert reason `errorData`.\n /// @param errorData ABI encoded error data.\n function rrevert(bytes memory errorData)\n internal\n pure\n {\n assembly {\n revert(add(errorData, 0x20), mload(errorData))\n }\n }\n}\n"
|
|
},
|
|
"@0x/contracts-utils/contracts/src/v06/LibBytesV06.sol": {
|
|
"id": 32,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\nimport \"./errors/LibBytesRichErrorsV06.sol\";\nimport \"./errors/LibRichErrorsV06.sol\";\n\n\nlibrary LibBytesV06 {\n\n using LibBytesV06 for bytes;\n\n /// @dev Gets the memory address for a byte array.\n /// @param input Byte array to lookup.\n /// @return memoryAddress Memory address of byte array. This\n /// points to the header of the byte array which contains\n /// the length.\n function rawAddress(bytes memory input)\n internal\n pure\n returns (uint256 memoryAddress)\n {\n assembly {\n memoryAddress := input\n }\n return memoryAddress;\n }\n\n /// @dev Gets the memory address for the contents of a byte array.\n /// @param input Byte array to lookup.\n /// @return memoryAddress Memory address of the contents of the byte array.\n function contentAddress(bytes memory input)\n internal\n pure\n returns (uint256 memoryAddress)\n {\n assembly {\n memoryAddress := add(input, 32)\n }\n return memoryAddress;\n }\n\n /// @dev Copies `length` bytes from memory location `source` to `dest`.\n /// @param dest memory address to copy bytes to.\n /// @param source memory address to copy bytes from.\n /// @param length number of bytes to copy.\n function memCopy(\n uint256 dest,\n uint256 source,\n uint256 length\n )\n internal\n pure\n {\n if (length < 32) {\n // Handle a partial word by reading destination and masking\n // off the bits we are interested in.\n // This correctly handles overlap, zero lengths and source == dest\n assembly {\n let mask := sub(exp(256, sub(32, length)), 1)\n let s := and(mload(source), not(mask))\n let d := and(mload(dest), mask)\n mstore(dest, or(s, d))\n }\n } else {\n // Skip the O(length) loop when source == dest.\n if (source == dest) {\n return;\n }\n\n // For large copies we copy whole words at a time. The final\n // word is aligned to the end of the range (instead of after the\n // previous) to handle partial words. So a copy will look like this:\n //\n // ####\n // ####\n // ####\n // ####\n //\n // We handle overlap in the source and destination range by\n // changing the copying direction. This prevents us from\n // overwriting parts of source that we still need to copy.\n //\n // This correctly handles source == dest\n //\n if (source > dest) {\n assembly {\n // We subtract 32 from `sEnd` and `dEnd` because it\n // is easier to compare with in the loop, and these\n // are also the addresses we need for copying the\n // last bytes.\n length := sub(length, 32)\n let sEnd := add(source, length)\n let dEnd := add(dest, length)\n\n // Remember the last 32 bytes of source\n // This needs to be done here and not after the loop\n // because we may have overwritten the last bytes in\n // source already due to overlap.\n let last := mload(sEnd)\n\n // Copy whole words front to back\n // Note: the first check is always true,\n // this could have been a do-while loop.\n // solhint-disable-next-line no-empty-blocks\n for {} lt(source, sEnd) {} {\n mstore(dest, mload(source))\n source := add(source, 32)\n dest := add(dest, 32)\n }\n\n // Write the last 32 bytes\n mstore(dEnd, last)\n }\n } else {\n assembly {\n // We subtract 32 from `sEnd` and `dEnd` because those\n // are the starting points when copying a word at the end.\n length := sub(length, 32)\n let sEnd := add(source, length)\n let dEnd := add(dest, length)\n\n // Remember the first 32 bytes of source\n // This needs to be done here and not after the loop\n // because we may have overwritten the first bytes in\n // source already due to overlap.\n let first := mload(source)\n\n // Copy whole words back to front\n // We use a signed comparisson here to allow dEnd to become\n // negative (happens when source and dest < 32). Valid\n // addresses in local memory will never be larger than\n // 2**255, so they can be safely re-interpreted as signed.\n // Note: the first check is always true,\n // this could have been a do-while loop.\n // solhint-disable-next-line no-empty-blocks\n for {} slt(dest, dEnd) {} {\n mstore(dEnd, mload(sEnd))\n sEnd := sub(sEnd, 32)\n dEnd := sub(dEnd, 32)\n }\n\n // Write the first 32 bytes\n mstore(dest, first)\n }\n }\n }\n }\n\n /// @dev Returns a slices from a byte array.\n /// @param b The byte array to take a slice from.\n /// @param from The starting index for the slice (inclusive).\n /// @param to The final index for the slice (exclusive).\n /// @return result The slice containing bytes at indices [from, to)\n function slice(\n bytes memory b,\n uint256 from,\n uint256 to\n )\n internal\n pure\n returns (bytes memory result)\n {\n // Ensure that the from and to positions are valid positions for a slice within\n // the byte array that is being used.\n if (from > to) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.FromLessThanOrEqualsToRequired,\n from,\n to\n ));\n }\n if (to > b.length) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.ToLessThanOrEqualsLengthRequired,\n to,\n b.length\n ));\n }\n\n // Create a new bytes structure and copy contents\n result = new bytes(to - from);\n memCopy(\n result.contentAddress(),\n b.contentAddress() + from,\n result.length\n );\n return result;\n }\n\n /// @dev Returns a slice from a byte array without preserving the input.\n /// When `from == 0`, the original array will match the slice.\n /// In other cases its state will be corrupted.\n /// @param b The byte array to take a slice from. Will be destroyed in the process.\n /// @param from The starting index for the slice (inclusive).\n /// @param to The final index for the slice (exclusive).\n /// @return result The slice containing bytes at indices [from, to)\n function sliceDestructive(\n bytes memory b,\n uint256 from,\n uint256 to\n )\n internal\n pure\n returns (bytes memory result)\n {\n // Ensure that the from and to positions are valid positions for a slice within\n // the byte array that is being used.\n if (from > to) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.FromLessThanOrEqualsToRequired,\n from,\n to\n ));\n }\n if (to > b.length) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.ToLessThanOrEqualsLengthRequired,\n to,\n b.length\n ));\n }\n\n // Create a new bytes structure around [from, to) in-place.\n assembly {\n result := add(b, from)\n mstore(result, sub(to, from))\n }\n return result;\n }\n\n /// @dev Pops the last byte off of a byte array by modifying its length.\n /// @param b Byte array that will be modified.\n /// @return result The byte that was popped off.\n function popLastByte(bytes memory b)\n internal\n pure\n returns (bytes1 result)\n {\n if (b.length == 0) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanZeroRequired,\n b.length,\n 0\n ));\n }\n\n // Store last byte.\n result = b[b.length - 1];\n\n assembly {\n // Decrement length of byte array.\n let newLen := sub(mload(b), 1)\n mstore(b, newLen)\n }\n return result;\n }\n\n /// @dev Tests equality of two byte arrays.\n /// @param lhs First byte array to compare.\n /// @param rhs Second byte array to compare.\n /// @return equal True if arrays are the same. False otherwise.\n function equals(\n bytes memory lhs,\n bytes memory rhs\n )\n internal\n pure\n returns (bool equal)\n {\n // Keccak gas cost is 30 + numWords * 6. This is a cheap way to compare.\n // We early exit on unequal lengths, but keccak would also correctly\n // handle this.\n return lhs.length == rhs.length && keccak256(lhs) == keccak256(rhs);\n }\n\n /// @dev Reads an address from a position in a byte array.\n /// @param b Byte array containing an address.\n /// @param index Index in byte array of address.\n /// @return result address from byte array.\n function readAddress(\n bytes memory b,\n uint256 index\n )\n internal\n pure\n returns (address result)\n {\n if (b.length < index + 20) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsTwentyRequired,\n b.length,\n index + 20 // 20 is length of address\n ));\n }\n\n // Add offset to index:\n // 1. Arrays are prefixed by 32-byte length parameter (add 32 to index)\n // 2. Account for size difference between address length and 32-byte storage word (subtract 12 from index)\n index += 20;\n\n // Read address from array memory\n assembly {\n // 1. Add index to address of bytes array\n // 2. Load 32-byte word from memory\n // 3. Apply 20-byte mask to obtain address\n result := and(mload(add(b, index)), 0xffffffffffffffffffffffffffffffffffffffff)\n }\n return result;\n }\n\n /// @dev Writes an address into a specific position in a byte array.\n /// @param b Byte array to insert address into.\n /// @param index Index in byte array of address.\n /// @param input Address to put into byte array.\n function writeAddress(\n bytes memory b,\n uint256 index,\n address input\n )\n internal\n pure\n {\n if (b.length < index + 20) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsTwentyRequired,\n b.length,\n index + 20 // 20 is length of address\n ));\n }\n\n // Add offset to index:\n // 1. Arrays are prefixed by 32-byte length parameter (add 32 to index)\n // 2. Account for size difference between address length and 32-byte storage word (subtract 12 from index)\n index += 20;\n\n // Store address into array memory\n assembly {\n // The address occupies 20 bytes and mstore stores 32 bytes.\n // First fetch the 32-byte word where we'll be storing the address, then\n // apply a mask so we have only the bytes in the word that the address will not occupy.\n // Then combine these bytes with the address and store the 32 bytes back to memory with mstore.\n\n // 1. Add index to address of bytes array\n // 2. Load 32-byte word from memory\n // 3. Apply 12-byte mask to obtain extra bytes occupying word of memory where we'll store the address\n let neighbors := and(\n mload(add(b, index)),\n 0xffffffffffffffffffffffff0000000000000000000000000000000000000000\n )\n\n // Make sure input address is clean.\n // (Solidity does not guarantee this)\n input := and(input, 0xffffffffffffffffffffffffffffffffffffffff)\n\n // Store the neighbors and address into memory\n mstore(add(b, index), xor(input, neighbors))\n }\n }\n\n /// @dev Reads a bytes32 value from a position in a byte array.\n /// @param b Byte array containing a bytes32 value.\n /// @param index Index in byte array of bytes32 value.\n /// @return result bytes32 value from byte array.\n function readBytes32(\n bytes memory b,\n uint256 index\n )\n internal\n pure\n returns (bytes32 result)\n {\n if (b.length < index + 32) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsThirtyTwoRequired,\n b.length,\n index + 32\n ));\n }\n\n // Arrays are prefixed by a 256 bit length parameter\n index += 32;\n\n // Read the bytes32 from array memory\n assembly {\n result := mload(add(b, index))\n }\n return result;\n }\n\n /// @dev Writes a bytes32 into a specific position in a byte array.\n /// @param b Byte array to insert <input> into.\n /// @param index Index in byte array of <input>.\n /// @param input bytes32 to put into byte array.\n function writeBytes32(\n bytes memory b,\n uint256 index,\n bytes32 input\n )\n internal\n pure\n {\n if (b.length < index + 32) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsThirtyTwoRequired,\n b.length,\n index + 32\n ));\n }\n\n // Arrays are prefixed by a 256 bit length parameter\n index += 32;\n\n // Read the bytes32 from array memory\n assembly {\n mstore(add(b, index), input)\n }\n }\n\n /// @dev Reads a uint256 value from a position in a byte array.\n /// @param b Byte array containing a uint256 value.\n /// @param index Index in byte array of uint256 value.\n /// @return result uint256 value from byte array.\n function readUint256(\n bytes memory b,\n uint256 index\n )\n internal\n pure\n returns (uint256 result)\n {\n result = uint256(readBytes32(b, index));\n return result;\n }\n\n /// @dev Writes a uint256 into a specific position in a byte array.\n /// @param b Byte array to insert <input> into.\n /// @param index Index in byte array of <input>.\n /// @param input uint256 to put into byte array.\n function writeUint256(\n bytes memory b,\n uint256 index,\n uint256 input\n )\n internal\n pure\n {\n writeBytes32(b, index, bytes32(input));\n }\n\n /// @dev Reads an unpadded bytes4 value from a position in a byte array.\n /// @param b Byte array containing a bytes4 value.\n /// @param index Index in byte array of bytes4 value.\n /// @return result bytes4 value from byte array.\n function readBytes4(\n bytes memory b,\n uint256 index\n )\n internal\n pure\n returns (bytes4 result)\n {\n if (b.length < index + 4) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsFourRequired,\n b.length,\n index + 4\n ));\n }\n\n // Arrays are prefixed by a 32 byte length field\n index += 32;\n\n // Read the bytes4 from array memory\n assembly {\n result := mload(add(b, index))\n // Solidity does not require us to clean the trailing bytes.\n // We do it anyway\n result := and(result, 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000)\n }\n return result;\n }\n\n /// @dev Writes a new length to a byte array.\n /// Decreasing length will lead to removing the corresponding lower order bytes from the byte array.\n /// Increasing length may lead to appending adjacent in-memory bytes to the end of the byte array.\n /// @param b Bytes array to write new length to.\n /// @param length New length of byte array.\n function writeLength(bytes memory b, uint256 length)\n internal\n pure\n {\n assembly {\n mstore(b, length)\n }\n }\n}\n"
|
|
},
|
|
"@0x/contracts-utils/contracts/src/v06/errors/LibBytesRichErrorsV06.sol": {
|
|
"id": 36,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibBytesRichErrorsV06 {\n\n enum InvalidByteOperationErrorCodes {\n FromLessThanOrEqualsToRequired,\n ToLessThanOrEqualsLengthRequired,\n LengthGreaterThanZeroRequired,\n LengthGreaterThanOrEqualsFourRequired,\n LengthGreaterThanOrEqualsTwentyRequired,\n LengthGreaterThanOrEqualsThirtyTwoRequired,\n LengthGreaterThanOrEqualsNestedBytesLengthRequired,\n DestinationLengthGreaterThanOrEqualSourceLengthRequired\n }\n\n // bytes4(keccak256(\"InvalidByteOperationError(uint8,uint256,uint256)\"))\n bytes4 internal constant INVALID_BYTE_OPERATION_ERROR_SELECTOR =\n 0x28006595;\n\n // solhint-disable func-name-mixedcase\n function InvalidByteOperationError(\n InvalidByteOperationErrorCodes errorCode,\n uint256 offset,\n uint256 required\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n INVALID_BYTE_OPERATION_ERROR_SELECTOR,\n errorCode,\n offset,\n required\n );\n }\n}\n"
|
|
},
|
|
"@0x/contracts-utils/contracts/src/v06/LibSafeMathV06.sol": {
|
|
"id": 33,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\nimport \"./errors/LibRichErrorsV06.sol\";\nimport \"./errors/LibSafeMathRichErrorsV06.sol\";\n\n\nlibrary LibSafeMathV06 {\n\n function safeMul(uint256 a, uint256 b)\n internal\n pure\n returns (uint256)\n {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n if (c / a != b) {\n LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(\n LibSafeMathRichErrorsV06.BinOpErrorCodes.MULTIPLICATION_OVERFLOW,\n a,\n b\n ));\n }\n return c;\n }\n\n function safeDiv(uint256 a, uint256 b)\n internal\n pure\n returns (uint256)\n {\n if (b == 0) {\n LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(\n LibSafeMathRichErrorsV06.BinOpErrorCodes.DIVISION_BY_ZERO,\n a,\n b\n ));\n }\n uint256 c = a / b;\n return c;\n }\n\n function safeSub(uint256 a, uint256 b)\n internal\n pure\n returns (uint256)\n {\n if (b > a) {\n LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(\n LibSafeMathRichErrorsV06.BinOpErrorCodes.SUBTRACTION_UNDERFLOW,\n a,\n b\n ));\n }\n return a - b;\n }\n\n function safeAdd(uint256 a, uint256 b)\n internal\n pure\n returns (uint256)\n {\n uint256 c = a + b;\n if (c < a) {\n LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(\n LibSafeMathRichErrorsV06.BinOpErrorCodes.ADDITION_OVERFLOW,\n a,\n b\n ));\n }\n return c;\n }\n\n function max256(uint256 a, uint256 b)\n internal\n pure\n returns (uint256)\n {\n return a >= b ? a : b;\n }\n\n function min256(uint256 a, uint256 b)\n internal\n pure\n returns (uint256)\n {\n return a < b ? a : b;\n }\n\n function safeMul128(uint128 a, uint128 b)\n internal\n pure\n returns (uint128)\n {\n if (a == 0) {\n return 0;\n }\n uint128 c = a * b;\n if (c / a != b) {\n LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(\n LibSafeMathRichErrorsV06.BinOpErrorCodes.MULTIPLICATION_OVERFLOW,\n a,\n b\n ));\n }\n return c;\n }\n\n function safeDiv128(uint128 a, uint128 b)\n internal\n pure\n returns (uint128)\n {\n if (b == 0) {\n LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(\n LibSafeMathRichErrorsV06.BinOpErrorCodes.DIVISION_BY_ZERO,\n a,\n b\n ));\n }\n uint128 c = a / b;\n return c;\n }\n\n function safeSub128(uint128 a, uint128 b)\n internal\n pure\n returns (uint128)\n {\n if (b > a) {\n LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(\n LibSafeMathRichErrorsV06.BinOpErrorCodes.SUBTRACTION_UNDERFLOW,\n a,\n b\n ));\n }\n return a - b;\n }\n\n function safeAdd128(uint128 a, uint128 b)\n internal\n pure\n returns (uint128)\n {\n uint128 c = a + b;\n if (c < a) {\n LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(\n LibSafeMathRichErrorsV06.BinOpErrorCodes.ADDITION_OVERFLOW,\n a,\n b\n ));\n }\n return c;\n }\n\n function max128(uint128 a, uint128 b)\n internal\n pure\n returns (uint128)\n {\n return a >= b ? a : b;\n }\n\n function min128(uint128 a, uint128 b)\n internal\n pure\n returns (uint128)\n {\n return a < b ? a : b;\n }\n\n function safeDowncastToUint128(uint256 a)\n internal\n pure\n returns (uint128)\n {\n if (a > type(uint128).max) {\n LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256DowncastError(\n LibSafeMathRichErrorsV06.DowncastErrorCodes.VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT128,\n a\n ));\n }\n return uint128(a);\n }\n}\n"
|
|
},
|
|
"@0x/contracts-utils/contracts/src/v06/errors/LibSafeMathRichErrorsV06.sol": {
|
|
"id": 39,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibSafeMathRichErrorsV06 {\n\n // bytes4(keccak256(\"Uint256BinOpError(uint8,uint256,uint256)\"))\n bytes4 internal constant UINT256_BINOP_ERROR_SELECTOR =\n 0xe946c1bb;\n\n // bytes4(keccak256(\"Uint256DowncastError(uint8,uint256)\"))\n bytes4 internal constant UINT256_DOWNCAST_ERROR_SELECTOR =\n 0xc996af7b;\n\n enum BinOpErrorCodes {\n ADDITION_OVERFLOW,\n MULTIPLICATION_OVERFLOW,\n SUBTRACTION_UNDERFLOW,\n DIVISION_BY_ZERO\n }\n\n enum DowncastErrorCodes {\n VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT32,\n VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT64,\n VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT96,\n VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT128\n }\n\n // solhint-disable func-name-mixedcase\n function Uint256BinOpError(\n BinOpErrorCodes errorCode,\n uint256 a,\n uint256 b\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n UINT256_BINOP_ERROR_SELECTOR,\n errorCode,\n a,\n b\n );\n }\n\n function Uint256DowncastError(\n DowncastErrorCodes errorCode,\n uint256 a\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n UINT256_DOWNCAST_ERROR_SELECTOR,\n errorCode,\n a\n );\n }\n}\n"
|
|
},
|
|
"../errors/LibMetaTransactionsRichErrors.sol": {
|
|
"id": 1,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibMetaTransactionsRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function InvalidMetaTransactionsArrayLengthsError(\n uint256 mtxCount,\n uint256 signatureCount\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"InvalidMetaTransactionsArrayLengthsError(uint256,uint256)\")),\n mtxCount,\n signatureCount\n );\n }\n\n function MetaTransactionUnsupportedFunctionError(\n bytes32 mtxHash,\n bytes4 selector\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"MetaTransactionUnsupportedFunctionError(bytes32,bytes4)\")),\n mtxHash,\n selector\n );\n }\n\n function MetaTransactionWrongSenderError(\n bytes32 mtxHash,\n address sender,\n address expectedSender\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"MetaTransactionWrongSenderError(bytes32,address,address)\")),\n mtxHash,\n sender,\n expectedSender\n );\n }\n\n function MetaTransactionExpiredError(\n bytes32 mtxHash,\n uint256 time,\n uint256 expirationTime\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"MetaTransactionExpiredError(bytes32,uint256,uint256)\")),\n mtxHash,\n time,\n expirationTime\n );\n }\n\n function MetaTransactionGasPriceError(\n bytes32 mtxHash,\n uint256 gasPrice,\n uint256 minGasPrice,\n uint256 maxGasPrice\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"MetaTransactionGasPriceError(bytes32,uint256,uint256,uint256)\")),\n mtxHash,\n gasPrice,\n minGasPrice,\n maxGasPrice\n );\n }\n\n function MetaTransactionInsufficientEthError(\n bytes32 mtxHash,\n uint256 ethBalance,\n uint256 ethRequired\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"MetaTransactionInsufficientEthError(bytes32,uint256,uint256)\")),\n mtxHash,\n ethBalance,\n ethRequired\n );\n }\n\n function MetaTransactionInvalidSignatureError(\n bytes32 mtxHash,\n bytes memory signature,\n bytes memory errData\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"MetaTransactionInvalidSignatureError(bytes32,bytes,bytes)\")),\n mtxHash,\n signature,\n errData\n );\n }\n\n function MetaTransactionAlreadyExecutedError(\n bytes32 mtxHash,\n uint256 executedBlockNumber\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"MetaTransactionAlreadyExecutedError(bytes32,uint256)\")),\n mtxHash,\n executedBlockNumber\n );\n }\n\n function MetaTransactionCallFailedError(\n bytes32 mtxHash,\n bytes memory callData,\n bytes memory returnData\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"MetaTransactionCallFailedError(bytes32,bytes,bytes)\")),\n mtxHash,\n callData,\n returnData\n );\n }\n}\n"
|
|
},
|
|
"../fixins/FixinCommon.sol": {
|
|
"id": 19,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"../errors/LibCommonRichErrors.sol\";\nimport \"../errors/LibOwnableRichErrors.sol\";\nimport \"../features/interfaces/IOwnableFeature.sol\";\nimport \"../features/interfaces/ISimpleFunctionRegistryFeature.sol\";\n\n\n/// @dev Common feature utilities.\nabstract contract FixinCommon {\n\n using LibRichErrorsV06 for bytes;\n\n /// @dev The implementation address of this feature.\n address internal immutable _implementation;\n\n /// @dev The caller must be this contract.\n modifier onlySelf() virtual {\n if (msg.sender != address(this)) {\n LibCommonRichErrors.OnlyCallableBySelfError(msg.sender).rrevert();\n }\n _;\n }\n\n /// @dev The caller of this function must be the owner.\n modifier onlyOwner() virtual {\n {\n address owner = IOwnableFeature(address(this)).owner();\n if (msg.sender != owner) {\n LibOwnableRichErrors.OnlyOwnerError(\n msg.sender,\n owner\n ).rrevert();\n }\n }\n _;\n }\n\n constructor() internal {\n // Remember this feature's original address.\n _implementation = address(this);\n }\n\n /// @dev Registers a function implemented by this feature at `_implementation`.\n /// Can and should only be called within a `migrate()`.\n /// @param selector The selector of the function whose implementation\n /// is at `_implementation`.\n function _registerFeatureFunction(bytes4 selector)\n internal\n {\n ISimpleFunctionRegistryFeature(address(this)).extend(selector, _implementation);\n }\n\n /// @dev Encode a feature version as a `uint256`.\n /// @param major The major version number of the feature.\n /// @param minor The minor version number of the feature.\n /// @param revision The revision number of the feature.\n /// @return encodedVersion The encoded version number.\n function _encodeVersion(uint32 major, uint32 minor, uint32 revision)\n internal\n pure\n returns (uint256 encodedVersion)\n {\n return (uint256(major) << 64) | (uint256(minor) << 32) | uint256(revision);\n }\n}\n"
|
|
},
|
|
"../errors/LibCommonRichErrors.sol": {
|
|
"id": 0,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibCommonRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function OnlyCallableBySelfError(address sender)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"OnlyCallableBySelfError(address)\")),\n sender\n );\n }\n\n function IllegalReentrancyError(bytes4 selector, uint256 reentrancyFlags)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"IllegalReentrancyError(bytes4,uint256)\")),\n selector,\n reentrancyFlags\n );\n }\n}\n"
|
|
},
|
|
"../errors/LibOwnableRichErrors.sol": {
|
|
"id": 3,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibOwnableRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function OnlyOwnerError(\n address sender,\n address owner\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"OnlyOwnerError(address,address)\")),\n sender,\n owner\n );\n }\n\n function TransferOwnerToZeroError()\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"TransferOwnerToZeroError()\"))\n );\n }\n\n function MigrateCallFailedError(address target, bytes memory resultData)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"MigrateCallFailedError(address,bytes)\")),\n target,\n resultData\n );\n }\n}\n"
|
|
},
|
|
"./interfaces/IOwnableFeature.sol": {
|
|
"id": 13,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/interfaces/IOwnableV06.sol\";\n\n\n// solhint-disable no-empty-blocks\n/// @dev Owner management and migration features.\ninterface IOwnableFeature is\n IOwnableV06\n{\n /// @dev Emitted when `migrate()` is called.\n /// @param caller The caller of `migrate()`.\n /// @param migrator The migration contract.\n /// @param newOwner The address of the new owner.\n event Migrated(address caller, address migrator, address newOwner);\n\n /// @dev Execute a migration function in the context of the ZeroEx contract.\n /// The result of the function being called should be the magic bytes\n /// 0x2c64c5ef (`keccack('MIGRATE_SUCCESS')`). Only callable by the owner.\n /// The owner will be temporarily set to `address(this)` inside the call.\n /// Before returning, the owner will be set to `newOwner`.\n /// @param target The migrator contract address.\n /// @param newOwner The address of the new owner.\n /// @param data The call data.\n function migrate(address target, bytes calldata data, address newOwner) external;\n}\n"
|
|
},
|
|
"@0x/contracts-utils/contracts/src/v06/interfaces/IOwnableV06.sol": {
|
|
"id": 41,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\ninterface IOwnableV06 {\n\n /// @dev Emitted by Ownable when ownership is transferred.\n /// @param previousOwner The previous owner of the contract.\n /// @param newOwner The new owner of the contract.\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /// @dev Transfers ownership of the contract to a new address.\n /// @param newOwner The address that will become the owner.\n function transferOwnership(address newOwner) external;\n\n /// @dev The owner of this contract.\n /// @return ownerAddress The owner address.\n function owner() external view returns (address ownerAddress);\n}\n"
|
|
},
|
|
"./interfaces/ISimpleFunctionRegistryFeature.sol": {
|
|
"id": 14,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\n\n/// @dev Basic registry management features.\ninterface ISimpleFunctionRegistryFeature {\n\n /// @dev A function implementation was updated via `extend()` or `rollback()`.\n /// @param selector The function selector.\n /// @param oldImpl The implementation contract address being replaced.\n /// @param newImpl The replacement implementation contract address.\n event ProxyFunctionUpdated(bytes4 indexed selector, address oldImpl, address newImpl);\n\n /// @dev Roll back to a prior implementation of a function.\n /// @param selector The function selector.\n /// @param targetImpl The address of an older implementation of the function.\n function rollback(bytes4 selector, address targetImpl) external;\n\n /// @dev Register or replace a function.\n /// @param selector The function selector.\n /// @param impl The implementation contract for the function.\n function extend(bytes4 selector, address impl) external;\n\n /// @dev Retrieve the length of the rollback history for a function.\n /// @param selector The function selector.\n /// @return rollbackLength The number of items in the rollback history for\n /// the function.\n function getRollbackLength(bytes4 selector)\n external\n view\n returns (uint256 rollbackLength);\n\n /// @dev Retrieve an entry in the rollback history for a function.\n /// @param selector The function selector.\n /// @param idx The index in the rollback history.\n /// @return impl An implementation address for the function at\n /// index `idx`.\n function getRollbackEntryAtIndex(bytes4 selector, uint256 idx)\n external\n view\n returns (address impl);\n}\n"
|
|
},
|
|
"../fixins/FixinReentrancyGuard.sol": {
|
|
"id": 21,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/LibBytesV06.sol\";\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"../errors/LibCommonRichErrors.sol\";\nimport \"../storage/LibReentrancyGuardStorage.sol\";\n\n\n/// @dev Common feature utilities.\nabstract contract FixinReentrancyGuard {\n\n using LibRichErrorsV06 for bytes;\n using LibBytesV06 for bytes;\n\n // Combinable reentrancy flags.\n /// @dev Reentrancy guard flag for meta-transaction functions.\n uint256 constant internal REENTRANCY_MTX = 0x1;\n\n /// @dev Cannot reenter a function with the same reentrancy guard flags.\n modifier nonReentrant(uint256 reentrancyFlags) virtual {\n LibReentrancyGuardStorage.Storage storage stor =\n LibReentrancyGuardStorage.getStorage();\n {\n uint256 currentFlags = stor.reentrancyFlags;\n // Revert if any bits in `reentrancyFlags` has already been set.\n if ((currentFlags & reentrancyFlags) != 0) {\n LibCommonRichErrors.IllegalReentrancyError(\n msg.data.readBytes4(0),\n reentrancyFlags\n ).rrevert();\n }\n // Update reentrancy flags.\n stor.reentrancyFlags = currentFlags | reentrancyFlags;\n }\n\n _;\n\n // Clear reentrancy flags.\n stor.reentrancyFlags = stor.reentrancyFlags & (~reentrancyFlags);\n }\n}\n"
|
|
},
|
|
"../storage/LibReentrancyGuardStorage.sol": {
|
|
"id": 25,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"./LibStorage.sol\";\nimport \"../external/IFlashWallet.sol\";\n\n\n/// @dev Storage helpers for the `FixinReentrancyGuard` mixin.\nlibrary LibReentrancyGuardStorage {\n\n /// @dev Storage bucket for this feature.\n struct Storage {\n // Reentrancy flags set whenever a non-reentrant function is entered\n // and cleared when it is exited.\n uint256 reentrancyFlags;\n }\n\n /// @dev Get the storage bucket for this contract.\n function getStorage() internal pure returns (Storage storage stor) {\n uint256 storageSlot = LibStorage.getStorageSlot(\n LibStorage.StorageId.ReentrancyGuard\n );\n // Dip into assembly to change the slot pointed to by the local\n // variable `stor`.\n // See https://solidity.readthedocs.io/en/v0.6.8/assembly.html?highlight=slot#access-to-external-variables-functions-and-libraries\n assembly { stor_slot := storageSlot }\n }\n}\n"
|
|
},
|
|
"../storage/LibStorage.sol": {
|
|
"id": 26,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\n\n/// @dev Common storage helpers\nlibrary LibStorage {\n\n /// @dev What to bit-shift a storage ID by to get its slot.\n /// This gives us a maximum of 2**128 inline fields in each bucket.\n uint256 private constant STORAGE_SLOT_EXP = 128;\n\n /// @dev Storage IDs for feature storage buckets.\n /// WARNING: APPEND-ONLY.\n enum StorageId {\n Proxy,\n SimpleFunctionRegistry,\n Ownable,\n TokenSpender,\n TransformERC20,\n MetaTransactions,\n ReentrancyGuard,\n NativeOrders\n }\n\n /// @dev Get the storage slot given a storage ID. We assign unique, well-spaced\n /// slots to storage bucket variables to ensure they do not overlap.\n /// See: https://solidity.readthedocs.io/en/v0.6.6/assembly.html#access-to-external-variables-functions-and-libraries\n /// @param storageId An entry in `StorageId`\n /// @return slot The storage slot.\n function getStorageSlot(StorageId storageId)\n internal\n pure\n returns (uint256 slot)\n {\n // This should never overflow with a reasonable `STORAGE_SLOT_EXP`\n // because Solidity will do a range check on `storageId` during the cast.\n return (uint256(storageId) + 1) << STORAGE_SLOT_EXP;\n }\n}\n"
|
|
},
|
|
"../external/IFlashWallet.sol": {
|
|
"id": 7,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/interfaces/IOwnableV06.sol\";\n\n\n/// @dev A contract that can execute arbitrary calls from its owner.\ninterface IFlashWallet {\n\n /// @dev Execute an arbitrary call. Only an authority can call this.\n /// @param target The call target.\n /// @param callData The call data.\n /// @param value Ether to attach to the call.\n /// @return resultData The data returned by the call.\n function executeCall(\n address payable target,\n bytes calldata callData,\n uint256 value\n )\n external\n payable\n returns (bytes memory resultData);\n\n /// @dev Execute an arbitrary delegatecall, in the context of this puppet.\n /// Only an authority can call this.\n /// @param target The call target.\n /// @param callData The call data.\n /// @return resultData The data returned by the call.\n function executeDelegateCall(\n address payable target,\n bytes calldata callData\n )\n external\n payable\n returns (bytes memory resultData);\n\n /// @dev Allows the puppet to receive ETH.\n receive() external payable;\n\n /// @dev Fetch the immutable owner/deployer of this contract.\n /// @return owner_ The immutable owner/deployer/\n function owner() external view returns (address owner_);\n}\n"
|
|
},
|
|
"../fixins/FixinTokenSpender.sol": {
|
|
"id": 22,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-erc20/contracts/src/v06/IEtherTokenV06.sol\";\nimport \"@0x/contracts-utils/contracts/src/v06/LibSafeMathV06.sol\";\nimport \"../features/interfaces/ITokenSpenderFeature.sol\";\nimport \"../errors/LibSpenderRichErrors.sol\";\nimport \"../external/FeeCollector.sol\";\nimport \"../vendor/v3/IStaking.sol\";\nimport \"../vendor/v3/IStaking.sol\";\n\n\n/// @dev Helpers for moving tokens around.\nabstract contract FixinTokenSpender {\n using LibRichErrorsV06 for bytes;\n\n // Mask of the lower 20 bytes of a bytes32.\n uint256 constant private ADDRESS_MASK = 0x000000000000000000000000ffffffffffffffffffffffffffffffffffffffff;\n /// @dev A bloom filter for tokens that consume all gas when `transferFrom()` fails.\n bytes32 public immutable GREEDY_TOKENS_BLOOM_FILTER;\n\n /// @param greedyTokensBloomFilter The bloom filter for all greedy tokens.\n constructor(bytes32 greedyTokensBloomFilter)\n internal\n {\n GREEDY_TOKENS_BLOOM_FILTER = greedyTokensBloomFilter;\n }\n\n /// @dev Transfers ERC20 tokens from `owner` to `to`.\n /// @param token The token to spend.\n /// @param owner The owner of the tokens.\n /// @param to The recipient of the tokens.\n /// @param amount The amount of `token` to transfer.\n function _transferERC20Tokens(\n IERC20TokenV06 token,\n address owner,\n address to,\n uint256 amount\n )\n internal\n {\n bool success;\n bytes memory revertData;\n\n require(address(token) != address(this), \"FixinTokenSpender/CANNOT_INVOKE_SELF\");\n\n // If the token eats all gas when failing, we do not want to perform\n // optimistic fall through to the old AllowanceTarget contract if the\n // direct transferFrom() fails.\n if (_isTokenPossiblyGreedy(token)) {\n // If the token does not have a direct allowance on us then we use\n // the allowance target.\n if (token.allowance(owner, address(this)) < amount) {\n _transferFromLegacyAllowanceTarget(\n token,\n owner,\n to,\n amount,\n \"\"\n );\n return;\n }\n }\n\n assembly {\n let ptr := mload(0x40) // free memory pointer\n\n // selector for transferFrom(address,address,uint256)\n mstore(ptr, 0x23b872dd00000000000000000000000000000000000000000000000000000000)\n mstore(add(ptr, 0x04), and(owner, ADDRESS_MASK))\n mstore(add(ptr, 0x24), and(to, ADDRESS_MASK))\n mstore(add(ptr, 0x44), amount)\n\n success := call(\n gas(),\n and(token, ADDRESS_MASK),\n 0,\n ptr,\n 0x64,\n 0,\n 0\n )\n\n let rdsize := returndatasize()\n\n returndatacopy(add(ptr, 0x20), 0, rdsize) // reuse memory\n\n // Check for ERC20 success. ERC20 tokens should return a boolean,\n // but some don't. We accept 0-length return data as success, or at\n // least 32 bytes that starts with a 32-byte boolean true.\n success := and(\n success, // call itself succeeded\n or(\n iszero(rdsize), // no return data, or\n and(\n iszero(lt(rdsize, 32)), // at least 32 bytes\n eq(mload(add(ptr, 0x20)), 1) // starts with uint256(1)\n )\n )\n )\n\n if iszero(success) {\n // revertData is a bytes, so length-prefixed data\n mstore(ptr, rdsize)\n revertData := ptr\n\n // update free memory pointer (ptr + 32-byte length + return data)\n mstore(0x40, add(add(ptr, 0x20), rdsize))\n }\n }\n\n if (!success) {\n _transferFromLegacyAllowanceTarget(\n token,\n owner,\n to,\n amount,\n revertData\n );\n }\n }\n\n /// @dev Gets the maximum amount of an ERC20 token `token` that can be\n /// pulled from `owner` by this address.\n /// @param token The token to spend.\n /// @param owner The owner of the tokens.\n /// @return amount The amount of tokens that can be pulled.\n function _getSpendableERC20BalanceOf(\n IERC20TokenV06 token,\n address owner\n )\n internal\n view\n returns (uint256)\n {\n return LibSafeMathV06.min256(\n token.allowance(owner, address(this)),\n token.balanceOf(owner)\n );\n }\n\n /// @dev Check if a token possibly belongs to the `GREEDY_TOKENS_BLOOM_FILTER`\n /// bloom filter.\n function _isTokenPossiblyGreedy(IERC20TokenV06 token)\n internal\n view\n returns (bool isPossiblyGreedy)\n {\n // The hash is given by:\n // (1 << (keccak256(token) % 256)) | (1 << (token % 256))\n bytes32 h;\n assembly {\n mstore(0, token)\n h := or(shl(mod(keccak256(0, 32), 256), 1), shl(mod(token, 256), 1))\n }\n return (h & GREEDY_TOKENS_BLOOM_FILTER) == h;\n }\n\n /// @dev Transfer tokens using the legacy allowance target instead of\n /// allowances directly set on the exchange proxy.\n function _transferFromLegacyAllowanceTarget(\n IERC20TokenV06 token,\n address owner,\n address to,\n uint256 amount,\n bytes memory initialRevertData\n )\n private\n {\n // Try the old AllowanceTarget.\n try ITokenSpenderFeature(address(this))._spendERC20Tokens(\n token,\n owner,\n to,\n amount\n ) {\n } catch (bytes memory revertData) {\n // Bubble up the first error message. (In general, the fallback to the\n // allowance target is opportunistic. We ignore the specific error\n // message if it fails.)\n LibSpenderRichErrors.SpenderERC20TransferFromFailedError(\n address(token),\n owner,\n to,\n amount,\n initialRevertData.length != 0 ? initialRevertData : revertData\n ).rrevert();\n }\n }\n}\n"
|
|
},
|
|
"@0x/contracts-erc20/contracts/src/v06/IEtherTokenV06.sol": {
|
|
"id": 30,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\nimport \"./IERC20TokenV06.sol\";\n\n\ninterface IEtherTokenV06 is\n IERC20TokenV06\n{\n /// @dev Wrap ether.\n function deposit() external payable;\n\n /// @dev Unwrap ether.\n function withdraw(uint256 amount) external;\n}\n"
|
|
},
|
|
"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol": {
|
|
"id": 29,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\ninterface IERC20TokenV06 {\n\n // solhint-disable no-simple-event-func-name\n event Transfer(\n address indexed from,\n address indexed to,\n uint256 value\n );\n\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n\n /// @dev send `value` token to `to` from `msg.sender`\n /// @param to The address of the recipient\n /// @param value The amount of token to be transferred\n /// @return True if transfer was successful\n function transfer(address to, uint256 value)\n external\n returns (bool);\n\n /// @dev send `value` token to `to` from `from` on the condition it is approved by `from`\n /// @param from The address of the sender\n /// @param to The address of the recipient\n /// @param value The amount of token to be transferred\n /// @return True if transfer was successful\n function transferFrom(\n address from,\n address to,\n uint256 value\n )\n external\n returns (bool);\n\n /// @dev `msg.sender` approves `spender` to spend `value` tokens\n /// @param spender The address of the account able to transfer the tokens\n /// @param value The amount of wei to be approved for transfer\n /// @return Always true if the call has enough gas to complete execution\n function approve(address spender, uint256 value)\n external\n returns (bool);\n\n /// @dev Query total supply of token\n /// @return Total supply of token\n function totalSupply()\n external\n view\n returns (uint256);\n\n /// @dev Get the balance of `owner`.\n /// @param owner The address from which the balance will be retrieved\n /// @return Balance of owner\n function balanceOf(address owner)\n external\n view\n returns (uint256);\n\n /// @dev Get the allowance for `spender` to spend from `owner`.\n /// @param owner The address of the account owning tokens\n /// @param spender The address of the account able to transfer the tokens\n /// @return Amount of remaining tokens allowed to spent\n function allowance(address owner, address spender)\n external\n view\n returns (uint256);\n\n /// @dev Get the number of decimals this token has.\n function decimals()\n external\n view\n returns (uint8);\n}\n"
|
|
},
|
|
"./interfaces/ITokenSpenderFeature.sol": {
|
|
"id": 15,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol\";\n\n\n/// @dev Feature that allows spending token allowances.\ninterface ITokenSpenderFeature {\n\n /// @dev Transfers ERC20 tokens from `owner` to `to`.\n /// Only callable from within.\n /// @param token The token to spend.\n /// @param owner The owner of the tokens.\n /// @param to The recipient of the tokens.\n /// @param amount The amount of `token` to transfer.\n function _spendERC20Tokens(\n IERC20TokenV06 token,\n address owner,\n address to,\n uint256 amount\n )\n external;\n\n /// @dev Gets the maximum amount of an ERC20 token `token` that can be\n /// pulled from `owner`.\n /// @param token The token to spend.\n /// @param owner The owner of the tokens.\n /// @return amount The amount of tokens that can be pulled.\n function getSpendableERC20BalanceOf(IERC20TokenV06 token, address owner)\n external\n view\n returns (uint256 amount);\n\n /// @dev Get the address of the allowance target.\n /// @return target The target of token allowances.\n function getAllowanceTarget() external view returns (address target);\n}\n"
|
|
},
|
|
"../errors/LibSpenderRichErrors.sol": {
|
|
"id": 5,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibSpenderRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function SpenderERC20TransferFromFailedError(\n address token,\n address owner,\n address to,\n uint256 amount,\n bytes memory errorData\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"SpenderERC20TransferFromFailedError(address,address,address,uint256,bytes)\")),\n token,\n owner,\n to,\n amount,\n errorData\n );\n }\n}\n"
|
|
},
|
|
"../external/FeeCollector.sol": {
|
|
"id": 6,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-erc20/contracts/src/v06/IEtherTokenV06.sol\";\nimport \"@0x/contracts-utils/contracts/src/v06/AuthorizableV06.sol\";\nimport \"../vendor/v3/IStaking.sol\";\n\n/// @dev The collector contract for protocol fees\ncontract FeeCollector is AuthorizableV06 {\n /// @dev Allow ether transfers to the collector.\n receive() external payable { }\n\n constructor() public {\n _addAuthorizedAddress(msg.sender);\n }\n\n /// @dev Approve the staking contract and join a pool. Only an authority\n /// can call this.\n /// @param weth The WETH contract.\n /// @param staking The staking contract.\n /// @param poolId The pool ID this contract is collecting fees for.\n function initialize(\n IEtherTokenV06 weth,\n IStaking staking,\n bytes32 poolId\n )\n external\n onlyAuthorized\n {\n weth.approve(address(staking), type(uint256).max);\n staking.joinStakingPoolAsMaker(poolId);\n }\n\n /// @dev Convert all held ether to WETH. Only an authority can call this.\n /// @param weth The WETH contract.\n function convertToWeth(\n IEtherTokenV06 weth\n )\n external\n onlyAuthorized\n {\n if (address(this).balance > 0) {\n weth.deposit{value: address(this).balance}();\n }\n }\n}\n"
|
|
},
|
|
"@0x/contracts-utils/contracts/src/v06/AuthorizableV06.sol": {
|
|
"id": 31,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\nimport \"./interfaces/IAuthorizableV06.sol\";\nimport \"./errors/LibRichErrorsV06.sol\";\nimport \"./errors/LibAuthorizableRichErrorsV06.sol\";\nimport \"./OwnableV06.sol\";\n\n\n// solhint-disable no-empty-blocks\ncontract AuthorizableV06 is\n OwnableV06,\n IAuthorizableV06\n{\n /// @dev Only authorized addresses can invoke functions with this modifier.\n modifier onlyAuthorized {\n _assertSenderIsAuthorized();\n _;\n }\n\n // @dev Whether an address is authorized to call privileged functions.\n // @param 0 Address to query.\n // @return 0 Whether the address is authorized.\n mapping (address => bool) public override authorized;\n // @dev Whether an address is authorized to call privileged functions.\n // @param 0 Index of authorized address.\n // @return 0 Authorized address.\n address[] public override authorities;\n\n /// @dev Initializes the `owner` address.\n constructor()\n public\n OwnableV06()\n {}\n\n /// @dev Authorizes an address.\n /// @param target Address to authorize.\n function addAuthorizedAddress(address target)\n external\n override\n onlyOwner\n {\n _addAuthorizedAddress(target);\n }\n\n /// @dev Removes authorizion of an address.\n /// @param target Address to remove authorization from.\n function removeAuthorizedAddress(address target)\n external\n override\n onlyOwner\n {\n if (!authorized[target]) {\n LibRichErrorsV06.rrevert(LibAuthorizableRichErrorsV06.TargetNotAuthorizedError(target));\n }\n for (uint256 i = 0; i < authorities.length; i++) {\n if (authorities[i] == target) {\n _removeAuthorizedAddressAtIndex(target, i);\n break;\n }\n }\n }\n\n /// @dev Removes authorizion of an address.\n /// @param target Address to remove authorization from.\n /// @param index Index of target in authorities array.\n function removeAuthorizedAddressAtIndex(\n address target,\n uint256 index\n )\n external\n override\n onlyOwner\n {\n _removeAuthorizedAddressAtIndex(target, index);\n }\n\n /// @dev Gets all authorized addresses.\n /// @return Array of authorized addresses.\n function getAuthorizedAddresses()\n external\n override\n view\n returns (address[] memory)\n {\n return authorities;\n }\n\n /// @dev Reverts if msg.sender is not authorized.\n function _assertSenderIsAuthorized()\n internal\n view\n {\n if (!authorized[msg.sender]) {\n LibRichErrorsV06.rrevert(LibAuthorizableRichErrorsV06.SenderNotAuthorizedError(msg.sender));\n }\n }\n\n /// @dev Authorizes an address.\n /// @param target Address to authorize.\n function _addAuthorizedAddress(address target)\n internal\n {\n // Ensure that the target is not the zero address.\n if (target == address(0)) {\n LibRichErrorsV06.rrevert(LibAuthorizableRichErrorsV06.ZeroCantBeAuthorizedError());\n }\n\n // Ensure that the target is not already authorized.\n if (authorized[target]) {\n LibRichErrorsV06.rrevert(LibAuthorizableRichErrorsV06.TargetAlreadyAuthorizedError(target));\n }\n\n authorized[target] = true;\n authorities.push(target);\n emit AuthorizedAddressAdded(target, msg.sender);\n }\n\n /// @dev Removes authorizion of an address.\n /// @param target Address to remove authorization from.\n /// @param index Index of target in authorities array.\n function _removeAuthorizedAddressAtIndex(\n address target,\n uint256 index\n )\n internal\n {\n if (!authorized[target]) {\n LibRichErrorsV06.rrevert(LibAuthorizableRichErrorsV06.TargetNotAuthorizedError(target));\n }\n if (index >= authorities.length) {\n LibRichErrorsV06.rrevert(LibAuthorizableRichErrorsV06.IndexOutOfBoundsError(\n index,\n authorities.length\n ));\n }\n if (authorities[index] != target) {\n LibRichErrorsV06.rrevert(LibAuthorizableRichErrorsV06.AuthorizedAddressMismatchError(\n authorities[index],\n target\n ));\n }\n\n delete authorized[target];\n authorities[index] = authorities[authorities.length - 1];\n authorities.pop();\n emit AuthorizedAddressRemoved(target, msg.sender);\n }\n}\n"
|
|
},
|
|
"@0x/contracts-utils/contracts/src/v06/interfaces/IAuthorizableV06.sol": {
|
|
"id": 40,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\nimport \"./IOwnableV06.sol\";\n\n\ninterface IAuthorizableV06 is\n IOwnableV06\n{\n // Event logged when a new address is authorized.\n event AuthorizedAddressAdded(\n address indexed target,\n address indexed caller\n );\n\n // Event logged when a currently authorized address is unauthorized.\n event AuthorizedAddressRemoved(\n address indexed target,\n address indexed caller\n );\n\n /// @dev Authorizes an address.\n /// @param target Address to authorize.\n function addAuthorizedAddress(address target)\n external;\n\n /// @dev Removes authorizion of an address.\n /// @param target Address to remove authorization from.\n function removeAuthorizedAddress(address target)\n external;\n\n /// @dev Removes authorizion of an address.\n /// @param target Address to remove authorization from.\n /// @param index Index of target in authorities array.\n function removeAuthorizedAddressAtIndex(\n address target,\n uint256 index\n )\n external;\n\n /// @dev Gets all authorized addresses.\n /// @return authorizedAddresses Array of authorized addresses.\n function getAuthorizedAddresses()\n external\n view\n returns (address[] memory authorizedAddresses);\n\n /// @dev Whether an adderss is authorized to call privileged functions.\n /// @param addr Address to query.\n /// @return isAuthorized Whether the address is authorized.\n function authorized(address addr) external view returns (bool isAuthorized);\n\n /// @dev All addresseses authorized to call privileged functions.\n /// @param idx Index of authorized address.\n /// @return addr Authorized address.\n function authorities(uint256 idx) external view returns (address addr);\n\n}\n"
|
|
},
|
|
"@0x/contracts-utils/contracts/src/v06/IOwnableV06.sol": {
|
|
"id": 41,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\ninterface IOwnableV06 {\n\n /// @dev Emitted by Ownable when ownership is transferred.\n /// @param previousOwner The previous owner of the contract.\n /// @param newOwner The new owner of the contract.\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /// @dev Transfers ownership of the contract to a new address.\n /// @param newOwner The address that will become the owner.\n function transferOwnership(address newOwner) external;\n\n /// @dev The owner of this contract.\n /// @return ownerAddress The owner address.\n function owner() external view returns (address ownerAddress);\n}\n"
|
|
},
|
|
"@0x/contracts-utils/contracts/src/v06/errors/LibAuthorizableRichErrorsV06.sol": {
|
|
"id": 35,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibAuthorizableRichErrorsV06 {\n\n // bytes4(keccak256(\"AuthorizedAddressMismatchError(address,address)\"))\n bytes4 internal constant AUTHORIZED_ADDRESS_MISMATCH_ERROR_SELECTOR =\n 0x140a84db;\n\n // bytes4(keccak256(\"IndexOutOfBoundsError(uint256,uint256)\"))\n bytes4 internal constant INDEX_OUT_OF_BOUNDS_ERROR_SELECTOR =\n 0xe9f83771;\n\n // bytes4(keccak256(\"SenderNotAuthorizedError(address)\"))\n bytes4 internal constant SENDER_NOT_AUTHORIZED_ERROR_SELECTOR =\n 0xb65a25b9;\n\n // bytes4(keccak256(\"TargetAlreadyAuthorizedError(address)\"))\n bytes4 internal constant TARGET_ALREADY_AUTHORIZED_ERROR_SELECTOR =\n 0xde16f1a0;\n\n // bytes4(keccak256(\"TargetNotAuthorizedError(address)\"))\n bytes4 internal constant TARGET_NOT_AUTHORIZED_ERROR_SELECTOR =\n 0xeb5108a2;\n\n // bytes4(keccak256(\"ZeroCantBeAuthorizedError()\"))\n bytes internal constant ZERO_CANT_BE_AUTHORIZED_ERROR_BYTES =\n hex\"57654fe4\";\n\n // solhint-disable func-name-mixedcase\n function AuthorizedAddressMismatchError(\n address authorized,\n address target\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n AUTHORIZED_ADDRESS_MISMATCH_ERROR_SELECTOR,\n authorized,\n target\n );\n }\n\n function IndexOutOfBoundsError(\n uint256 index,\n uint256 length\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n INDEX_OUT_OF_BOUNDS_ERROR_SELECTOR,\n index,\n length\n );\n }\n\n function SenderNotAuthorizedError(address sender)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n SENDER_NOT_AUTHORIZED_ERROR_SELECTOR,\n sender\n );\n }\n\n function TargetAlreadyAuthorizedError(address target)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n TARGET_ALREADY_AUTHORIZED_ERROR_SELECTOR,\n target\n );\n }\n\n function TargetNotAuthorizedError(address target)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n TARGET_NOT_AUTHORIZED_ERROR_SELECTOR,\n target\n );\n }\n\n function ZeroCantBeAuthorizedError()\n internal\n pure\n returns (bytes memory)\n {\n return ZERO_CANT_BE_AUTHORIZED_ERROR_BYTES;\n }\n}\n"
|
|
},
|
|
"@0x/contracts-utils/contracts/src/v06/OwnableV06.sol": {
|
|
"id": 34,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2019 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\nimport \"./interfaces/IOwnableV06.sol\";\nimport \"./errors/LibRichErrorsV06.sol\";\nimport \"./errors/LibOwnableRichErrorsV06.sol\";\n\n\ncontract OwnableV06 is\n IOwnableV06\n{\n /// @dev The owner of this contract.\n /// @return 0 The owner address.\n address public override owner;\n\n constructor() public {\n owner = msg.sender;\n }\n\n modifier onlyOwner() {\n _assertSenderIsOwner();\n _;\n }\n\n /// @dev Change the owner of this contract.\n /// @param newOwner New owner address.\n function transferOwnership(address newOwner)\n public\n override\n onlyOwner\n {\n if (newOwner == address(0)) {\n LibRichErrorsV06.rrevert(LibOwnableRichErrorsV06.TransferOwnerToZeroError());\n } else {\n owner = newOwner;\n emit OwnershipTransferred(msg.sender, newOwner);\n }\n }\n\n function _assertSenderIsOwner()\n internal\n view\n {\n if (msg.sender != owner) {\n LibRichErrorsV06.rrevert(LibOwnableRichErrorsV06.OnlyOwnerError(\n msg.sender,\n owner\n ));\n }\n }\n}\n"
|
|
},
|
|
"@0x/contracts-utils/contracts/src/v06/errors/LibOwnableRichErrorsV06.sol": {
|
|
"id": 37,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\npragma solidity ^0.6.5;\n\n\nlibrary LibOwnableRichErrorsV06 {\n\n // bytes4(keccak256(\"OnlyOwnerError(address,address)\"))\n bytes4 internal constant ONLY_OWNER_ERROR_SELECTOR =\n 0x1de45ad1;\n\n // bytes4(keccak256(\"TransferOwnerToZeroError()\"))\n bytes internal constant TRANSFER_OWNER_TO_ZERO_ERROR_BYTES =\n hex\"e69edc3e\";\n\n // solhint-disable func-name-mixedcase\n function OnlyOwnerError(\n address sender,\n address owner\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n ONLY_OWNER_ERROR_SELECTOR,\n sender,\n owner\n );\n }\n\n function TransferOwnerToZeroError()\n internal\n pure\n returns (bytes memory)\n {\n return TRANSFER_OWNER_TO_ZERO_ERROR_BYTES;\n }\n}\n"
|
|
},
|
|
"../vendor/v3/IStaking.sol": {
|
|
"id": 28,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\ninterface IStaking {\n function joinStakingPoolAsMaker(bytes32) external;\n function payProtocolFee(address, address, uint256) external payable;\n}\n"
|
|
},
|
|
"../fixins/FixinEIP712.sol": {
|
|
"id": 20,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"../errors/LibCommonRichErrors.sol\";\nimport \"../errors/LibOwnableRichErrors.sol\";\n\n\n/// @dev EIP712 helpers for features.\nabstract contract FixinEIP712 {\n\n /// @dev The domain hash separator for the entire exchange proxy.\n bytes32 public immutable EIP712_DOMAIN_SEPARATOR;\n\n constructor(address zeroExAddress) internal {\n // Compute `EIP712_DOMAIN_SEPARATOR`\n {\n uint256 chainId;\n assembly { chainId := chainid() }\n EIP712_DOMAIN_SEPARATOR = keccak256(\n abi.encode(\n keccak256(\n \"EIP712Domain(\"\n \"string name,\"\n \"string version,\"\n \"uint256 chainId,\"\n \"address verifyingContract\"\n \")\"\n ),\n keccak256(\"ZeroEx\"),\n keccak256(\"1.0.0\"),\n chainId,\n zeroExAddress\n )\n );\n }\n }\n\n function _getEIP712Hash(bytes32 structHash)\n internal\n view\n returns (bytes32 eip712Hash)\n {\n return keccak256(abi.encodePacked(\n hex\"1901\",\n EIP712_DOMAIN_SEPARATOR,\n structHash\n ));\n }\n}\n"
|
|
},
|
|
"../migrations/LibMigrate.sol": {
|
|
"id": 23,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"../errors/LibOwnableRichErrors.sol\";\n\n\nlibrary LibMigrate {\n\n /// @dev Magic bytes returned by a migrator to indicate success.\n /// This is `keccack('MIGRATE_SUCCESS')`.\n bytes4 internal constant MIGRATE_SUCCESS = 0x2c64c5ef;\n\n using LibRichErrorsV06 for bytes;\n\n /// @dev Perform a delegatecall and ensure it returns the magic bytes.\n /// @param target The call target.\n /// @param data The call data.\n function delegatecallMigrateFunction(\n address target,\n bytes memory data\n )\n internal\n {\n (bool success, bytes memory resultData) = target.delegatecall(data);\n if (!success ||\n resultData.length != 32 ||\n abi.decode(resultData, (bytes4)) != MIGRATE_SUCCESS)\n {\n LibOwnableRichErrors.MigrateCallFailedError(target, resultData).rrevert();\n }\n }\n}\n"
|
|
},
|
|
"../storage/LibMetaTransactionsStorage.sol": {
|
|
"id": 24,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"./LibStorage.sol\";\n\n\n/// @dev Storage helpers for the `MetaTransactions` feature.\nlibrary LibMetaTransactionsStorage {\n\n /// @dev Storage bucket for this feature.\n struct Storage {\n // The block number when a hash was executed.\n mapping (bytes32 => uint256) mtxHashToExecutedBlockNumber;\n }\n\n /// @dev Get the storage bucket for this contract.\n function getStorage() internal pure returns (Storage storage stor) {\n uint256 storageSlot = LibStorage.getStorageSlot(\n LibStorage.StorageId.MetaTransactions\n );\n // Dip into assembly to change the slot pointed to by the local\n // variable `stor`.\n // See https://solidity.readthedocs.io/en/v0.6.8/assembly.html?highlight=slot#access-to-external-variables-functions-and-libraries\n assembly { stor_slot := storageSlot }\n }\n}\n"
|
|
},
|
|
"./interfaces/IFeature.sol": {
|
|
"id": 9,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\n\n/// @dev Basic interface for a feature contract.\ninterface IFeature {\n\n // solhint-disable func-name-mixedcase\n\n /// @dev The name of this feature set.\n function FEATURE_NAME() external view returns (string memory name);\n\n /// @dev The version of this feature set.\n function FEATURE_VERSION() external view returns (uint256 version);\n}\n"
|
|
},
|
|
"./interfaces/IMetaTransactionsFeature.sol": {
|
|
"id": 10,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol\";\nimport \"../libs/LibSignature.sol\";\n\n/// @dev Meta-transactions feature.\ninterface IMetaTransactionsFeature {\n /// @dev Describes an exchange proxy meta transaction.\n struct MetaTransactionData {\n // Signer of meta-transaction. On whose behalf to execute the MTX.\n address payable signer;\n // Required sender, or NULL for anyone.\n address sender;\n // Minimum gas price.\n uint256 minGasPrice;\n // Maximum gas price.\n uint256 maxGasPrice;\n // MTX is invalid after this time.\n uint256 expirationTimeSeconds;\n // Nonce to make this MTX unique.\n uint256 salt;\n // Encoded call data to a function on the exchange proxy.\n bytes callData;\n // Amount of ETH to attach to the call.\n uint256 value;\n // ERC20 fee `signer` pays `sender`.\n IERC20TokenV06 feeToken;\n // ERC20 fee amount.\n uint256 feeAmount;\n }\n\n /// @dev Emitted whenever a meta-transaction is executed via\n /// `executeMetaTransaction()` or `executeMetaTransactions()`.\n /// @param hash The meta-transaction hash.\n /// @param selector The selector of the function being executed.\n /// @param signer Who to execute the meta-transaction on behalf of.\n /// @param sender Who executed the meta-transaction.\n event MetaTransactionExecuted(\n bytes32 hash,\n bytes4 indexed selector,\n address signer,\n address sender\n );\n\n /// @dev Execute a single meta-transaction.\n /// @param mtx The meta-transaction.\n /// @param signature The signature by `mtx.signer`.\n /// @return returnResult The ABI-encoded result of the underlying call.\n function executeMetaTransaction(\n MetaTransactionData calldata mtx,\n LibSignature.Signature calldata signature\n )\n external\n payable\n returns (bytes memory returnResult);\n\n /// @dev Execute multiple meta-transactions.\n /// @param mtxs The meta-transactions.\n /// @param signatures The signature by each respective `mtx.signer`.\n /// @return returnResults The ABI-encoded results of the underlying calls.\n function batchExecuteMetaTransactions(\n MetaTransactionData[] calldata mtxs,\n LibSignature.Signature[] calldata signatures\n )\n external\n payable\n returns (bytes[] memory returnResults);\n\n /// @dev Get the block at which a meta-transaction has been executed.\n /// @param mtx The meta-transaction.\n /// @return blockNumber The block height when the meta-transactioin was executed.\n function getMetaTransactionExecutedBlock(MetaTransactionData calldata mtx)\n external\n view\n returns (uint256 blockNumber);\n\n /// @dev Get the block at which a meta-transaction hash has been executed.\n /// @param mtxHash The meta-transaction hash.\n /// @return blockNumber The block height when the meta-transactioin was executed.\n function getMetaTransactionHashExecutedBlock(bytes32 mtxHash)\n external\n view\n returns (uint256 blockNumber);\n\n /// @dev Get the EIP712 hash of a meta-transaction.\n /// @param mtx The meta-transaction.\n /// @return mtxHash The EIP712 hash of `mtx`.\n function getMetaTransactionHash(MetaTransactionData calldata mtx)\n external\n view\n returns (bytes32 mtxHash);\n}\n"
|
|
},
|
|
"./libs/LibSignature.sol": {
|
|
"id": 18,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"../../errors/LibSignatureRichErrors.sol\";\n\n\n/// @dev A library for validating signatures.\nlibrary LibSignature {\n using LibRichErrorsV06 for bytes;\n\n // '\\x19Ethereum Signed Message:\\n32\\x00\\x00\\x00\\x00' in a word.\n uint256 private constant ETH_SIGN_HASH_PREFIX =\n 0x19457468657265756d205369676e6564204d6573736167653a0a333200000000;\n /// @dev Exclusive upper limit on ECDSA signatures 'R' values.\n /// The valid range is given by fig (282) of the yellow paper.\n uint256 private constant ECDSA_SIGNATURE_R_LIMIT =\n uint256(0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141);\n /// @dev Exclusive upper limit on ECDSA signatures 'S' values.\n /// The valid range is given by fig (283) of the yellow paper.\n uint256 private constant ECDSA_SIGNATURE_S_LIMIT = ECDSA_SIGNATURE_R_LIMIT / 2 + 1;\n\n /// @dev Allowed signature types.\n enum SignatureType {\n ILLEGAL,\n INVALID,\n EIP712,\n ETHSIGN\n }\n\n /// @dev Encoded EC signature.\n struct Signature {\n // How to validate the signature.\n SignatureType signatureType;\n // EC Signature data.\n uint8 v;\n // EC Signature data.\n bytes32 r;\n // EC Signature data.\n bytes32 s;\n }\n\n /// @dev Retrieve the signer of a signature.\n /// Throws if the signature can't be validated.\n /// @param hash The hash that was signed.\n /// @param signature The signature.\n /// @return recovered The recovered signer address.\n function getSignerOfHash(\n bytes32 hash,\n Signature memory signature\n )\n internal\n pure\n returns (address recovered)\n {\n // Ensure this is a signature type that can be validated against a hash.\n _validateHashCompatibleSignature(hash, signature);\n\n if (signature.signatureType == SignatureType.EIP712) {\n // Signed using EIP712\n recovered = ecrecover(\n hash,\n signature.v,\n signature.r,\n signature.s\n );\n } else if (signature.signatureType == SignatureType.ETHSIGN) {\n // Signed using `eth_sign`\n // Need to hash `hash` with \"\\x19Ethereum Signed Message:\\n32\" prefix\n // in packed encoding.\n bytes32 ethSignHash;\n assembly {\n // Use scratch space\n mstore(0, ETH_SIGN_HASH_PREFIX) // length of 28 bytes\n mstore(28, hash) // length of 32 bytes\n ethSignHash := keccak256(0, 60)\n }\n recovered = ecrecover(\n ethSignHash,\n signature.v,\n signature.r,\n signature.s\n );\n }\n // `recovered` can be null if the signature values are out of range.\n if (recovered == address(0)) {\n LibSignatureRichErrors.SignatureValidationError(\n LibSignatureRichErrors.SignatureValidationErrorCodes.BAD_SIGNATURE_DATA,\n hash\n ).rrevert();\n }\n }\n\n /// @dev Validates that a signature is compatible with a hash signee.\n /// @param hash The hash that was signed.\n /// @param signature The signature.\n function _validateHashCompatibleSignature(\n bytes32 hash,\n Signature memory signature\n )\n private\n pure\n {\n // Ensure the r and s are within malleability limits.\n if (uint256(signature.r) >= ECDSA_SIGNATURE_R_LIMIT ||\n uint256(signature.s) >= ECDSA_SIGNATURE_S_LIMIT)\n {\n LibSignatureRichErrors.SignatureValidationError(\n LibSignatureRichErrors.SignatureValidationErrorCodes.BAD_SIGNATURE_DATA,\n hash\n ).rrevert();\n }\n\n // Always illegal signature.\n if (signature.signatureType == SignatureType.ILLEGAL) {\n LibSignatureRichErrors.SignatureValidationError(\n LibSignatureRichErrors.SignatureValidationErrorCodes.ILLEGAL,\n hash\n ).rrevert();\n }\n\n // Always invalid.\n if (signature.signatureType == SignatureType.INVALID) {\n LibSignatureRichErrors.SignatureValidationError(\n LibSignatureRichErrors.SignatureValidationErrorCodes.ALWAYS_INVALID,\n hash\n ).rrevert();\n }\n\n // Solidity should check that the signature type is within enum range for us\n // when abi-decoding.\n }\n}\n"
|
|
},
|
|
"../errors/LibSignatureRichErrors.sol": {
|
|
"id": 4,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibSignatureRichErrors {\n\n enum SignatureValidationErrorCodes {\n ALWAYS_INVALID,\n INVALID_LENGTH,\n UNSUPPORTED,\n ILLEGAL,\n WRONG_SIGNER,\n BAD_SIGNATURE_DATA\n }\n\n // solhint-disable func-name-mixedcase\n\n function SignatureValidationError(\n SignatureValidationErrorCodes code,\n bytes32 hash,\n address signerAddress,\n bytes memory signature\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"SignatureValidationError(uint8,bytes32,address,bytes)\")),\n code,\n hash,\n signerAddress,\n signature\n );\n }\n\n function SignatureValidationError(\n SignatureValidationErrorCodes code,\n bytes32 hash\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"SignatureValidationError(uint8,bytes32)\")),\n code,\n hash\n );\n }\n}\n"
|
|
},
|
|
"./interfaces/INativeOrdersFeature.sol": {
|
|
"id": 12,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol\";\nimport \"../libs/LibSignature.sol\";\nimport \"../libs/LibNativeOrder.sol\";\nimport \"./INativeOrdersEvents.sol\";\n\n\n/// @dev Feature for interacting with limit orders.\ninterface INativeOrdersFeature is\n INativeOrdersEvents\n{\n\n /// @dev Transfers protocol fees from the `FeeCollector` pools into\n /// the staking contract.\n /// @param poolIds Staking pool IDs\n function transferProtocolFeesForPools(bytes32[] calldata poolIds)\n external;\n\n /// @dev Fill a limit order. The taker and sender will be the caller.\n /// @param order The limit order. ETH protocol fees can be\n /// attached to this call. Any unspent ETH will be refunded to\n /// the caller.\n /// @param signature The order signature.\n /// @param takerTokenFillAmount Maximum taker token amount to fill this order with.\n /// @return takerTokenFilledAmount How much maker token was filled.\n /// @return makerTokenFilledAmount How much maker token was filled.\n function fillLimitOrder(\n LibNativeOrder.LimitOrder calldata order,\n LibSignature.Signature calldata signature,\n uint128 takerTokenFillAmount\n )\n external\n payable\n returns (uint128 takerTokenFilledAmount, uint128 makerTokenFilledAmount);\n\n /// @dev Fill an RFQ order for up to `takerTokenFillAmount` taker tokens.\n /// The taker will be the caller.\n /// @param order The RFQ order.\n /// @param signature The order signature.\n /// @param takerTokenFillAmount Maximum taker token amount to fill this order with.\n /// @return takerTokenFilledAmount How much maker token was filled.\n /// @return makerTokenFilledAmount How much maker token was filled.\n function fillRfqOrder(\n LibNativeOrder.RfqOrder calldata order,\n LibSignature.Signature calldata signature,\n uint128 takerTokenFillAmount\n )\n external\n returns (uint128 takerTokenFilledAmount, uint128 makerTokenFilledAmount);\n\n /// @dev Fill an RFQ order for exactly `takerTokenFillAmount` taker tokens.\n /// The taker will be the caller. ETH protocol fees can be\n /// attached to this call. Any unspent ETH will be refunded to\n /// the caller.\n /// @param order The limit order.\n /// @param signature The order signature.\n /// @param takerTokenFillAmount How much taker token to fill this order with.\n /// @return makerTokenFilledAmount How much maker token was filled.\n function fillOrKillLimitOrder(\n LibNativeOrder.LimitOrder calldata order,\n LibSignature.Signature calldata signature,\n uint128 takerTokenFillAmount\n )\n external\n payable\n returns (uint128 makerTokenFilledAmount);\n\n /// @dev Fill an RFQ order for exactly `takerTokenFillAmount` taker tokens.\n /// The taker will be the caller.\n /// @param order The RFQ order.\n /// @param signature The order signature.\n /// @param takerTokenFillAmount How much taker token to fill this order with.\n /// @return makerTokenFilledAmount How much maker token was filled.\n function fillOrKillRfqOrder(\n LibNativeOrder.RfqOrder calldata order,\n LibSignature.Signature calldata signature,\n uint128 takerTokenFillAmount\n )\n external\n returns (uint128 makerTokenFilledAmount);\n\n /// @dev Fill a limit order. Internal variant. ETH protocol fees can be\n /// attached to this call. Any unspent ETH will be refunded to\n /// `msg.sender` (not `sender`).\n /// @param order The limit order.\n /// @param signature The order signature.\n /// @param takerTokenFillAmount Maximum taker token to fill this order with.\n /// @param taker The order taker.\n /// @param sender The order sender.\n /// @return takerTokenFilledAmount How much maker token was filled.\n /// @return makerTokenFilledAmount How much maker token was filled.\n function _fillLimitOrder(\n LibNativeOrder.LimitOrder calldata order,\n LibSignature.Signature calldata signature,\n uint128 takerTokenFillAmount,\n address taker,\n address sender\n )\n external\n payable\n returns (uint128 takerTokenFilledAmount, uint128 makerTokenFilledAmount);\n\n /// @dev Fill an RFQ order. Internal variant.\n /// @param order The RFQ order.\n /// @param signature The order signature.\n /// @param takerTokenFillAmount Maximum taker token to fill this order with.\n /// @param taker The order taker.\n /// @return takerTokenFilledAmount How much maker token was filled.\n /// @return makerTokenFilledAmount How much maker token was filled.\n function _fillRfqOrder(\n LibNativeOrder.RfqOrder calldata order,\n LibSignature.Signature calldata signature,\n uint128 takerTokenFillAmount,\n address taker\n )\n external\n returns (uint128 takerTokenFilledAmount, uint128 makerTokenFilledAmount);\n\n /// @dev Cancel a single limit order. The caller must be the maker.\n /// Silently succeeds if the order has already been cancelled.\n /// @param order The limit order.\n function cancelLimitOrder(LibNativeOrder.LimitOrder calldata order)\n external;\n\n /// @dev Cancel a single RFQ order. The caller must be the maker.\n /// Silently succeeds if the order has already been cancelled.\n /// @param order The RFQ order.\n function cancelRfqOrder(LibNativeOrder.RfqOrder calldata order)\n external;\n\n /// @dev Mark what tx.origin addresses are allowed to fill an order that\n /// specifies the message sender as its txOrigin.\n /// @param origins An array of origin addresses to update.\n /// @param allowed True to register, false to unregister.\n function registerAllowedRfqOrigins(address[] memory origins, bool allowed)\n external;\n\n /// @dev Cancel multiple limit orders. The caller must be the maker.\n /// Silently succeeds if the order has already been cancelled.\n /// @param orders The limit orders.\n function batchCancelLimitOrders(LibNativeOrder.LimitOrder[] calldata orders)\n external;\n\n /// @dev Cancel multiple RFQ orders. The caller must be the maker.\n /// Silently succeeds if the order has already been cancelled.\n /// @param orders The RFQ orders.\n function batchCancelRfqOrders(LibNativeOrder.RfqOrder[] calldata orders)\n external;\n\n /// @dev Cancel all limit orders for a given maker and pair with a salt less\n /// than the value provided. The caller must be the maker. Subsequent\n /// calls to this function with the same caller and pair require the\n /// new salt to be >= the old salt.\n /// @param makerToken The maker token.\n /// @param takerToken The taker token.\n /// @param minValidSalt The new minimum valid salt.\n function cancelPairLimitOrders(\n IERC20TokenV06 makerToken,\n IERC20TokenV06 takerToken,\n uint256 minValidSalt\n )\n external;\n\n /// @dev Cancel all limit orders for a given maker and pair with a salt less\n /// than the value provided. The caller must be the maker. Subsequent\n /// calls to this function with the same caller and pair require the\n /// new salt to be >= the old salt.\n /// @param makerTokens The maker tokens.\n /// @param takerTokens The taker tokens.\n /// @param minValidSalts The new minimum valid salts.\n function batchCancelPairLimitOrders(\n IERC20TokenV06[] calldata makerTokens,\n IERC20TokenV06[] calldata takerTokens,\n uint256[] calldata minValidSalts\n )\n external;\n\n /// @dev Cancel all RFQ orders for a given maker and pair with a salt less\n /// than the value provided. The caller must be the maker. Subsequent\n /// calls to this function with the same caller and pair require the\n /// new salt to be >= the old salt.\n /// @param makerToken The maker token.\n /// @param takerToken The taker token.\n /// @param minValidSalt The new minimum valid salt.\n function cancelPairRfqOrders(\n IERC20TokenV06 makerToken,\n IERC20TokenV06 takerToken,\n uint256 minValidSalt\n )\n external;\n\n /// @dev Cancel all RFQ orders for a given maker and pair with a salt less\n /// than the value provided. The caller must be the maker. Subsequent\n /// calls to this function with the same caller and pair require the\n /// new salt to be >= the old salt.\n /// @param makerTokens The maker tokens.\n /// @param takerTokens The taker tokens.\n /// @param minValidSalts The new minimum valid salts.\n function batchCancelPairRfqOrders(\n IERC20TokenV06[] calldata makerTokens,\n IERC20TokenV06[] calldata takerTokens,\n uint256[] calldata minValidSalts\n )\n external;\n\n /// @dev Get the order info for a limit order.\n /// @param order The limit order.\n /// @return orderInfo Info about the order.\n function getLimitOrderInfo(LibNativeOrder.LimitOrder calldata order)\n external\n view\n returns (LibNativeOrder.OrderInfo memory orderInfo);\n\n /// @dev Get the order info for an RFQ order.\n /// @param order The RFQ order.\n /// @return orderInfo Info about the order.\n function getRfqOrderInfo(LibNativeOrder.RfqOrder calldata order)\n external\n view\n returns (LibNativeOrder.OrderInfo memory orderInfo);\n\n /// @dev Get the canonical hash of a limit order.\n /// @param order The limit order.\n /// @return orderHash The order hash.\n function getLimitOrderHash(LibNativeOrder.LimitOrder calldata order)\n external\n view\n returns (bytes32 orderHash);\n\n /// @dev Get the canonical hash of an RFQ order.\n /// @param order The RFQ order.\n /// @return orderHash The order hash.\n function getRfqOrderHash(LibNativeOrder.RfqOrder calldata order)\n external\n view\n returns (bytes32 orderHash);\n\n /// @dev Get the protocol fee multiplier. This should be multiplied by the\n /// gas price to arrive at the required protocol fee to fill a native order.\n /// @return multiplier The protocol fee multiplier.\n function getProtocolFeeMultiplier()\n external\n view\n returns (uint32 multiplier);\n\n /// @dev Get order info, fillable amount, and signature validity for a limit order.\n /// Fillable amount is determined using balances and allowances of the maker.\n /// @param order The limit order.\n /// @param signature The order signature.\n /// @return orderInfo Info about the order.\n /// @return actualFillableTakerTokenAmount How much of the order is fillable\n /// based on maker funds, in taker tokens.\n /// @return isSignatureValid Whether the signature is valid.\n function getLimitOrderRelevantState(\n LibNativeOrder.LimitOrder calldata order,\n LibSignature.Signature calldata signature\n )\n external\n view\n returns (\n LibNativeOrder.OrderInfo memory orderInfo,\n uint128 actualFillableTakerTokenAmount,\n bool isSignatureValid\n );\n\n /// @dev Get order info, fillable amount, and signature validity for an RFQ order.\n /// Fillable amount is determined using balances and allowances of the maker.\n /// @param order The RFQ order.\n /// @param signature The order signature.\n /// @return orderInfo Info about the order.\n /// @return actualFillableTakerTokenAmount How much of the order is fillable\n /// based on maker funds, in taker tokens.\n /// @return isSignatureValid Whether the signature is valid.\n function getRfqOrderRelevantState(\n LibNativeOrder.RfqOrder calldata order,\n LibSignature.Signature calldata signature\n )\n external\n view\n returns (\n LibNativeOrder.OrderInfo memory orderInfo,\n uint128 actualFillableTakerTokenAmount,\n bool isSignatureValid\n );\n\n /// @dev Batch version of `getLimitOrderRelevantState()`, without reverting.\n /// Orders that would normally cause `getLimitOrderRelevantState()`\n /// to revert will have empty results.\n /// @param orders The limit orders.\n /// @param signatures The order signatures.\n /// @return orderInfos Info about the orders.\n /// @return actualFillableTakerTokenAmounts How much of each order is fillable\n /// based on maker funds, in taker tokens.\n /// @return isSignatureValids Whether each signature is valid for the order.\n function batchGetLimitOrderRelevantStates(\n LibNativeOrder.LimitOrder[] calldata orders,\n LibSignature.Signature[] calldata signatures\n )\n external\n view\n returns (\n LibNativeOrder.OrderInfo[] memory orderInfos,\n uint128[] memory actualFillableTakerTokenAmounts,\n bool[] memory isSignatureValids\n );\n\n /// @dev Batch version of `getRfqOrderRelevantState()`, without reverting.\n /// Orders that would normally cause `getRfqOrderRelevantState()`\n /// to revert will have empty results.\n /// @param orders The RFQ orders.\n /// @param signatures The order signatures.\n /// @return orderInfos Info about the orders.\n /// @return actualFillableTakerTokenAmounts How much of each order is fillable\n /// based on maker funds, in taker tokens.\n /// @return isSignatureValids Whether each signature is valid for the order.\n function batchGetRfqOrderRelevantStates(\n LibNativeOrder.RfqOrder[] calldata orders,\n LibSignature.Signature[] calldata signatures\n )\n external\n view\n returns (\n LibNativeOrder.OrderInfo[] memory orderInfos,\n uint128[] memory actualFillableTakerTokenAmounts,\n bool[] memory isSignatureValids\n );\n}\n"
|
|
},
|
|
"./libs/LibNativeOrder.sol": {
|
|
"id": 17,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol\";\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"@0x/contracts-utils/contracts/src/v06/LibSafeMathV06.sol\";\nimport \"../../errors/LibNativeOrdersRichErrors.sol\";\n\n\n/// @dev A library for common native order operations.\nlibrary LibNativeOrder {\n using LibSafeMathV06 for uint256;\n using LibRichErrorsV06 for bytes;\n\n enum OrderStatus {\n INVALID,\n FILLABLE,\n FILLED,\n CANCELLED,\n EXPIRED\n }\n\n /// @dev A standard OTC or OO limit order.\n struct LimitOrder {\n IERC20TokenV06 makerToken;\n IERC20TokenV06 takerToken;\n uint128 makerAmount;\n uint128 takerAmount;\n uint128 takerTokenFeeAmount;\n address maker;\n address taker;\n address sender;\n address feeRecipient;\n bytes32 pool;\n uint64 expiry;\n uint256 salt;\n }\n\n /// @dev An RFQ limit order.\n struct RfqOrder {\n IERC20TokenV06 makerToken;\n IERC20TokenV06 takerToken;\n uint128 makerAmount;\n uint128 takerAmount;\n address maker;\n address taker;\n address txOrigin;\n bytes32 pool;\n uint64 expiry;\n uint256 salt;\n }\n\n /// @dev Info on a limit or RFQ order.\n struct OrderInfo {\n bytes32 orderHash;\n OrderStatus status;\n uint128 takerTokenFilledAmount;\n }\n\n uint256 private constant UINT_128_MASK = (1 << 128) - 1;\n uint256 private constant UINT_64_MASK = (1 << 64) - 1;\n uint256 private constant ADDRESS_MASK = (1 << 160) - 1;\n\n // The type hash for limit orders, which is:\n // keccak256(abi.encodePacked(\n // \"LimitOrder(\",\n // \"address makerToken,\",\n // \"address takerToken,\",\n // \"uint128 makerAmount,\",\n // \"uint128 takerAmount,\",\n // \"uint128 takerTokenFeeAmount,\",\n // \"address maker,\",\n // \"address taker,\",\n // \"address sender,\",\n // \"address feeRecipient,\",\n // \"bytes32 pool,\",\n // \"uint64 expiry,\",\n // \"uint256 salt\"\n // \")\"\n // ))\n uint256 private constant _LIMIT_ORDER_TYPEHASH =\n 0xce918627cb55462ddbb85e73de69a8b322f2bc88f4507c52fcad6d4c33c29d49;\n\n // The type hash for RFQ orders, which is:\n // keccak256(abi.encodePacked(\n // \"RfqOrder(\",\n // \"address makerToken,\",\n // \"address takerToken,\",\n // \"uint128 makerAmount,\",\n // \"uint128 takerAmount,\",\n // \"address maker,\",\n // \"address taker,\",\n // \"address txOrigin,\",\n // \"bytes32 pool,\",\n // \"uint64 expiry,\",\n // \"uint256 salt\"\n // \")\"\n // ))\n uint256 private constant _RFQ_ORDER_TYPEHASH =\n 0xe593d3fdfa8b60e5e17a1b2204662ecbe15c23f2084b9ad5bae40359540a7da9;\n\n /// @dev Get the struct hash of a limit order.\n /// @param order The limit order.\n /// @return structHash The struct hash of the order.\n function getLimitOrderStructHash(LimitOrder memory order)\n internal\n pure\n returns (bytes32 structHash)\n {\n // The struct hash is:\n // keccak256(abi.encode(\n // TYPE_HASH,\n // order.makerToken,\n // order.takerToken,\n // order.makerAmount,\n // order.takerAmount,\n // order.takerTokenFeeAmount,\n // order.maker,\n // order.taker,\n // order.sender,\n // order.feeRecipient,\n // order.pool,\n // order.expiry,\n // order.salt,\n // ))\n assembly {\n let mem := mload(0x40)\n mstore(mem, _LIMIT_ORDER_TYPEHASH)\n // order.makerToken;\n mstore(add(mem, 0x20), and(ADDRESS_MASK, mload(order)))\n // order.takerToken;\n mstore(add(mem, 0x40), and(ADDRESS_MASK, mload(add(order, 0x20))))\n // order.makerAmount;\n mstore(add(mem, 0x60), and(UINT_128_MASK, mload(add(order, 0x40))))\n // order.takerAmount;\n mstore(add(mem, 0x80), and(UINT_128_MASK, mload(add(order, 0x60))))\n // order.takerTokenFeeAmount;\n mstore(add(mem, 0xA0), and(UINT_128_MASK, mload(add(order, 0x80))))\n // order.maker;\n mstore(add(mem, 0xC0), and(ADDRESS_MASK, mload(add(order, 0xA0))))\n // order.taker;\n mstore(add(mem, 0xE0), and(ADDRESS_MASK, mload(add(order, 0xC0))))\n // order.sender;\n mstore(add(mem, 0x100), and(ADDRESS_MASK, mload(add(order, 0xE0))))\n // order.feeRecipient;\n mstore(add(mem, 0x120), and(ADDRESS_MASK, mload(add(order, 0x100))))\n // order.pool;\n mstore(add(mem, 0x140), mload(add(order, 0x120)))\n // order.expiry;\n mstore(add(mem, 0x160), and(UINT_64_MASK, mload(add(order, 0x140))))\n // order.salt;\n mstore(add(mem, 0x180), mload(add(order, 0x160)))\n structHash := keccak256(mem, 0x1A0)\n }\n }\n\n /// @dev Get the struct hash of a RFQ order.\n /// @param order The RFQ order.\n /// @return structHash The struct hash of the order.\n function getRfqOrderStructHash(RfqOrder memory order)\n internal\n pure\n returns (bytes32 structHash)\n {\n // The struct hash is:\n // keccak256(abi.encode(\n // TYPE_HASH,\n // order.makerToken,\n // order.takerToken,\n // order.makerAmount,\n // order.takerAmount,\n // order.maker,\n // order.taker,\n // order.txOrigin,\n // order.pool,\n // order.expiry,\n // order.salt,\n // ))\n assembly {\n let mem := mload(0x40)\n mstore(mem, _RFQ_ORDER_TYPEHASH)\n // order.makerToken;\n mstore(add(mem, 0x20), and(ADDRESS_MASK, mload(order)))\n // order.takerToken;\n mstore(add(mem, 0x40), and(ADDRESS_MASK, mload(add(order, 0x20))))\n // order.makerAmount;\n mstore(add(mem, 0x60), and(UINT_128_MASK, mload(add(order, 0x40))))\n // order.takerAmount;\n mstore(add(mem, 0x80), and(UINT_128_MASK, mload(add(order, 0x60))))\n // order.maker;\n mstore(add(mem, 0xA0), and(ADDRESS_MASK, mload(add(order, 0x80))))\n // order.taker;\n mstore(add(mem, 0xC0), and(ADDRESS_MASK, mload(add(order, 0xA0))))\n // order.txOrigin;\n mstore(add(mem, 0xE0), and(ADDRESS_MASK, mload(add(order, 0xC0))))\n // order.pool;\n mstore(add(mem, 0x100), mload(add(order, 0xE0)))\n // order.expiry;\n mstore(add(mem, 0x120), and(UINT_64_MASK, mload(add(order, 0x100))))\n // order.salt;\n mstore(add(mem, 0x140), mload(add(order, 0x120)))\n structHash := keccak256(mem, 0x160)\n }\n }\n\n /// @dev Refund any leftover protocol fees in `msg.value` to `msg.sender`.\n /// @param ethProtocolFeePaid How much ETH was paid in protocol fees.\n function refundExcessProtocolFeeToSender(uint256 ethProtocolFeePaid)\n internal\n {\n if (msg.value > ethProtocolFeePaid && msg.sender != address(this)) {\n uint256 refundAmount = msg.value.safeSub(ethProtocolFeePaid);\n (bool success,) = msg\n .sender\n .call{value: refundAmount}(\"\");\n if (!success) {\n LibNativeOrdersRichErrors.ProtocolFeeRefundFailed(\n msg.sender,\n refundAmount\n ).rrevert();\n }\n }\n }\n}\n"
|
|
},
|
|
"../errors/LibNativeOrdersRichErrors.sol": {
|
|
"id": 2,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibNativeOrdersRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function ProtocolFeeRefundFailed(\n address receiver,\n uint256 refundAmount\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"ProtocolFeeRefundFailed(address,uint256)\")),\n receiver,\n refundAmount\n );\n }\n\n function OrderNotFillableByOriginError(\n bytes32 orderHash,\n address txOrigin,\n address orderTxOrigin\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"OrderNotFillableByOriginError(bytes32,address,address)\")),\n orderHash,\n txOrigin,\n orderTxOrigin\n );\n }\n\n function OrderNotFillableError(\n bytes32 orderHash,\n uint8 orderStatus\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"OrderNotFillableError(bytes32,uint8)\")),\n orderHash,\n orderStatus\n );\n }\n\n function OrderNotSignedByMakerError(\n bytes32 orderHash,\n address signer,\n address maker\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"OrderNotSignedByMakerError(bytes32,address,address)\")),\n orderHash,\n signer,\n maker\n );\n }\n\n function OrderNotFillableBySenderError(\n bytes32 orderHash,\n address sender,\n address orderSender\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"OrderNotFillableBySenderError(bytes32,address,address)\")),\n orderHash,\n sender,\n orderSender\n );\n }\n\n function OrderNotFillableByTakerError(\n bytes32 orderHash,\n address taker,\n address orderTaker\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"OrderNotFillableByTakerError(bytes32,address,address)\")),\n orderHash,\n taker,\n orderTaker\n );\n }\n\n function CancelSaltTooLowError(\n uint256 minValidSalt,\n uint256 oldMinValidSalt\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"CancelSaltTooLowError(uint256,uint256)\")),\n minValidSalt,\n oldMinValidSalt\n );\n }\n\n function FillOrKillFailedError(\n bytes32 orderHash,\n uint256 takerTokenFilledAmount,\n uint256 takerTokenFillAmount\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"FillOrKillFailedError(bytes32,uint256,uint256)\")),\n orderHash,\n takerTokenFilledAmount,\n takerTokenFillAmount\n );\n }\n\n function OnlyOrderMakerAllowed(\n bytes32 orderHash,\n address sender,\n address maker\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"OnlyOrderMakerAllowed(bytes32,address,address)\")),\n orderHash,\n sender,\n maker\n );\n }\n\n function BatchFillIncompleteError(\n bytes32 orderHash,\n uint256 takerTokenFilledAmount,\n uint256 takerTokenFillAmount\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"BatchFillIncompleteError(bytes32,uint256,uint256)\")),\n orderHash,\n takerTokenFilledAmount,\n takerTokenFillAmount\n );\n }\n}\n"
|
|
},
|
|
"./interfaces/INativeOrdersEvents.sol": {
|
|
"id": 11,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2021 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol\";\nimport \"../libs/LibSignature.sol\";\nimport \"../libs/LibNativeOrder.sol\";\n\n\n/// @dev Events emitted by NativeOrdersFeature.\ninterface INativeOrdersEvents {\n\n /// @dev Emitted whenever a `LimitOrder` is filled.\n /// @param orderHash The canonical hash of the order.\n /// @param maker The maker of the order.\n /// @param taker The taker of the order.\n /// @param feeRecipient Fee recipient of the order.\n /// @param takerTokenFilledAmount How much taker token was filled.\n /// @param makerTokenFilledAmount How much maker token was filled.\n /// @param protocolFeePaid How much protocol fee was paid.\n /// @param pool The fee pool associated with this order.\n event LimitOrderFilled(\n bytes32 orderHash,\n address maker,\n address taker,\n address feeRecipient,\n address makerToken,\n address takerToken,\n uint128 takerTokenFilledAmount,\n uint128 makerTokenFilledAmount,\n uint128 takerTokenFeeFilledAmount,\n uint256 protocolFeePaid,\n bytes32 pool\n );\n\n /// @dev Emitted whenever an `RfqOrder` is filled.\n /// @param orderHash The canonical hash of the order.\n /// @param maker The maker of the order.\n /// @param taker The taker of the order.\n /// @param takerTokenFilledAmount How much taker token was filled.\n /// @param makerTokenFilledAmount How much maker token was filled.\n /// @param pool The fee pool associated with this order.\n event RfqOrderFilled(\n bytes32 orderHash,\n address maker,\n address taker,\n address makerToken,\n address takerToken,\n uint128 takerTokenFilledAmount,\n uint128 makerTokenFilledAmount,\n bytes32 pool\n );\n\n /// @dev Emitted whenever a limit or RFQ order is cancelled.\n /// @param orderHash The canonical hash of the order.\n /// @param maker The order maker.\n event OrderCancelled(\n bytes32 orderHash,\n address maker\n );\n\n /// @dev Emitted whenever Limit orders are cancelled by pair by a maker.\n /// @param maker The maker of the order.\n /// @param makerToken The maker token in a pair for the orders cancelled.\n /// @param takerToken The taker token in a pair for the orders cancelled.\n /// @param minValidSalt The new minimum valid salt an order with this pair must\n /// have.\n event PairCancelledLimitOrders(\n address maker,\n address makerToken,\n address takerToken,\n uint256 minValidSalt\n );\n\n /// @dev Emitted whenever RFQ orders are cancelled by pair by a maker.\n /// @param maker The maker of the order.\n /// @param makerToken The maker token in a pair for the orders cancelled.\n /// @param takerToken The taker token in a pair for the orders cancelled.\n /// @param minValidSalt The new minimum valid salt an order with this pair must\n /// have.\n event PairCancelledRfqOrders(\n address maker,\n address makerToken,\n address takerToken,\n uint256 minValidSalt\n );\n\n /// @dev Emitted when new addresses are allowed or disallowed to fill\n /// orders with a given txOrigin.\n /// @param origin The address doing the allowing.\n /// @param addrs The address being allowed/disallowed.\n /// @param allowed Indicates whether the address should be allowed.\n event RfqOrderOriginsAllowed(\n address origin,\n address[] addrs,\n bool allowed\n );\n}\n"
|
|
},
|
|
"./interfaces/ITransformERC20Feature.sol": {
|
|
"id": 16,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol\";\nimport \"../../transformers/IERC20Transformer.sol\";\nimport \"../../external/IFlashWallet.sol\";\n\n\n/// @dev Feature to composably transform between ERC20 tokens.\ninterface ITransformERC20Feature {\n\n /// @dev Defines a transformation to run in `transformERC20()`.\n struct Transformation {\n // The deployment nonce for the transformer.\n // The address of the transformer contract will be derived from this\n // value.\n uint32 deploymentNonce;\n // Arbitrary data to pass to the transformer.\n bytes data;\n }\n\n /// @dev Arguments for `_transformERC20()`.\n struct TransformERC20Args {\n // The taker address.\n address payable taker;\n // The token being provided by the taker.\n // If `0xeee...`, ETH is implied and should be provided with the call.`\n IERC20TokenV06 inputToken;\n // The token to be acquired by the taker.\n // `0xeee...` implies ETH.\n IERC20TokenV06 outputToken;\n // The amount of `inputToken` to take from the taker.\n // If set to `uint256(-1)`, the entire spendable balance of the taker\n // will be solt.\n uint256 inputTokenAmount;\n // The minimum amount of `outputToken` the taker\n // must receive for the entire transformation to succeed. If set to zero,\n // the minimum output token transfer will not be asserted.\n uint256 minOutputTokenAmount;\n // The transformations to execute on the token balance(s)\n // in sequence.\n Transformation[] transformations;\n }\n\n /// @dev Raised upon a successful `transformERC20`.\n /// @param taker The taker (caller) address.\n /// @param inputToken The token being provided by the taker.\n /// If `0xeee...`, ETH is implied and should be provided with the call.`\n /// @param outputToken The token to be acquired by the taker.\n /// `0xeee...` implies ETH.\n /// @param inputTokenAmount The amount of `inputToken` to take from the taker.\n /// @param outputTokenAmount The amount of `outputToken` received by the taker.\n event TransformedERC20(\n address indexed taker,\n address inputToken,\n address outputToken,\n uint256 inputTokenAmount,\n uint256 outputTokenAmount\n );\n\n /// @dev Raised when `setTransformerDeployer()` is called.\n /// @param transformerDeployer The new deployer address.\n event TransformerDeployerUpdated(address transformerDeployer);\n\n /// @dev Raised when `setQuoteSigner()` is called.\n /// @param quoteSigner The new quote signer.\n event QuoteSignerUpdated(address quoteSigner);\n\n /// @dev Replace the allowed deployer for transformers.\n /// Only callable by the owner.\n /// @param transformerDeployer The address of the new trusted deployer\n /// for transformers.\n function setTransformerDeployer(address transformerDeployer)\n external;\n\n /// @dev Replace the optional signer for `transformERC20()` calldata.\n /// Only callable by the owner.\n /// @param quoteSigner The address of the new calldata signer.\n function setQuoteSigner(address quoteSigner)\n external;\n\n /// @dev Deploy a new flash wallet instance and replace the current one with it.\n /// Useful if we somehow break the current wallet instance.\n /// Only callable by the owner.\n /// @return wallet The new wallet instance.\n function createTransformWallet()\n external\n returns (IFlashWallet wallet);\n\n /// @dev Executes a series of transformations to convert an ERC20 `inputToken`\n /// to an ERC20 `outputToken`.\n /// @param inputToken The token being provided by the sender.\n /// If `0xeee...`, ETH is implied and should be provided with the call.`\n /// @param outputToken The token to be acquired by the sender.\n /// `0xeee...` implies ETH.\n /// @param inputTokenAmount The amount of `inputToken` to take from the sender.\n /// @param minOutputTokenAmount The minimum amount of `outputToken` the sender\n /// must receive for the entire transformation to succeed.\n /// @param transformations The transformations to execute on the token balance(s)\n /// in sequence.\n /// @return outputTokenAmount The amount of `outputToken` received by the sender.\n function transformERC20(\n IERC20TokenV06 inputToken,\n IERC20TokenV06 outputToken,\n uint256 inputTokenAmount,\n uint256 minOutputTokenAmount,\n Transformation[] calldata transformations\n )\n external\n payable\n returns (uint256 outputTokenAmount);\n\n /// @dev Internal version of `transformERC20()`. Only callable from within.\n /// @param args A `TransformERC20Args` struct.\n /// @return outputTokenAmount The amount of `outputToken` received by the taker.\n function _transformERC20(TransformERC20Args calldata args)\n external\n payable\n returns (uint256 outputTokenAmount);\n\n /// @dev Return the current wallet instance that will serve as the execution\n /// context for transformations.\n /// @return wallet The wallet instance.\n function getTransformWallet()\n external\n view\n returns (IFlashWallet wallet);\n\n /// @dev Return the allowed deployer for transformers.\n /// @return deployer The transform deployer address.\n function getTransformerDeployer()\n external\n view\n returns (address deployer);\n\n /// @dev Return the optional signer for `transformERC20()` calldata.\n /// @return signer The transform deployer address.\n function getQuoteSigner()\n external\n view\n returns (address signer);\n}\n"
|
|
},
|
|
"../transformers/IERC20Transformer.sol": {
|
|
"id": 27,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol\";\n\n\n/// @dev A transformation callback used in `TransformERC20.transformERC20()`.\ninterface IERC20Transformer {\n\n /// @dev Context information to pass into `transform()` by `TransformERC20.transformERC20()`.\n struct TransformContext {\n // The caller of `TransformERC20.transformERC20()`.\n address payable sender;\n // taker The taker address, which may be distinct from `sender` in the case\n // meta-transactions.\n address payable taker;\n // Arbitrary data to pass to the transformer.\n bytes data;\n }\n\n /// @dev Called from `TransformERC20.transformERC20()`. This will be\n /// delegatecalled in the context of the FlashWallet instance being used.\n /// @param context Context information.\n /// @return success The success bytes (`LibERC20Transformer.TRANSFORMER_SUCCESS`).\n function transform(TransformContext calldata context)\n external\n returns (bytes4 success);\n}\n"
|
|
}
|
|
},
|
|
"sourceCodes": {
|
|
"./MetaTransactionsFeature.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"@0x/contracts-utils/contracts/src/v06/LibBytesV06.sol\";\nimport \"@0x/contracts-utils/contracts/src/v06/LibSafeMathV06.sol\";\nimport \"../errors/LibMetaTransactionsRichErrors.sol\";\nimport \"../fixins/FixinCommon.sol\";\nimport \"../fixins/FixinReentrancyGuard.sol\";\nimport \"../fixins/FixinTokenSpender.sol\";\nimport \"../fixins/FixinEIP712.sol\";\nimport \"../migrations/LibMigrate.sol\";\nimport \"../storage/LibMetaTransactionsStorage.sol\";\nimport \"./interfaces/IFeature.sol\";\nimport \"./interfaces/IMetaTransactionsFeature.sol\";\nimport \"./interfaces/INativeOrdersFeature.sol\";\nimport \"./interfaces/ITransformERC20Feature.sol\";\nimport \"./libs/LibSignature.sol\";\n\n/// @dev MetaTransactions feature.\ncontract MetaTransactionsFeature is\n IFeature,\n IMetaTransactionsFeature,\n FixinCommon,\n FixinReentrancyGuard,\n FixinEIP712,\n FixinTokenSpender\n{\n using LibBytesV06 for bytes;\n using LibRichErrorsV06 for bytes;\n\n /// @dev Describes the state of a meta transaction.\n struct ExecuteState {\n // Sender of the meta-transaction.\n address sender;\n // Hash of the meta-transaction data.\n bytes32 hash;\n // The meta-transaction data.\n MetaTransactionData mtx;\n // The meta-transaction signature (by `mtx.signer`).\n LibSignature.Signature signature;\n // The selector of the function being called.\n bytes4 selector;\n // The ETH balance of this contract before performing the call.\n uint256 selfBalance;\n // The block number at which the meta-transaction was executed.\n uint256 executedBlockNumber;\n }\n\n /// @dev Arguments for a `TransformERC20.transformERC20()` call.\n struct ExternalTransformERC20Args {\n IERC20TokenV06 inputToken;\n IERC20TokenV06 outputToken;\n uint256 inputTokenAmount;\n uint256 minOutputTokenAmount;\n ITransformERC20Feature.Transformation[] transformations;\n }\n\n /// @dev Name of this feature.\n string public constant override FEATURE_NAME = \"MetaTransactions\";\n /// @dev Version of this feature.\n uint256 public immutable override FEATURE_VERSION = _encodeVersion(1, 1, 0);\n /// @dev EIP712 typehash of the `MetaTransactionData` struct.\n bytes32 public immutable MTX_EIP712_TYPEHASH = keccak256(\n \"MetaTransactionData(\"\n \"address signer,\"\n \"address sender,\"\n \"uint256 minGasPrice,\"\n \"uint256 maxGasPrice,\"\n \"uint256 expirationTimeSeconds,\"\n \"uint256 salt,\"\n \"bytes callData,\"\n \"uint256 value,\"\n \"address feeToken,\"\n \"uint256 feeAmount\"\n \")\"\n );\n\n /// @dev Refunds up to `msg.value` leftover ETH at the end of the call.\n modifier refundsAttachedEth() {\n _;\n uint256 remainingBalance =\n LibSafeMathV06.min256(msg.value, address(this).balance);\n if (remainingBalance > 0) {\n msg.sender.transfer(remainingBalance);\n }\n }\n\n constructor(address zeroExAddress, bytes32 greedyTokensBloomFilter)\n public\n FixinCommon()\n FixinEIP712(zeroExAddress)\n FixinTokenSpender(greedyTokensBloomFilter)\n {\n // solhint-disable-next-line no-empty-blocks\n }\n\n /// @dev Initialize and register this feature.\n /// Should be delegatecalled by `Migrate.migrate()`.\n /// @return success `LibMigrate.SUCCESS` on success.\n function migrate()\n external\n returns (bytes4 success)\n {\n _registerFeatureFunction(this.executeMetaTransaction.selector);\n _registerFeatureFunction(this.batchExecuteMetaTransactions.selector);\n _registerFeatureFunction(this.getMetaTransactionExecutedBlock.selector);\n _registerFeatureFunction(this.getMetaTransactionHashExecutedBlock.selector);\n _registerFeatureFunction(this.getMetaTransactionHash.selector);\n return LibMigrate.MIGRATE_SUCCESS;\n }\n\n /// @dev Execute a single meta-transaction.\n /// @param mtx The meta-transaction.\n /// @param signature The signature by `mtx.signer`.\n /// @return returnResult The ABI-encoded result of the underlying call.\n function executeMetaTransaction(\n MetaTransactionData memory mtx,\n LibSignature.Signature memory signature\n )\n public\n payable\n override\n nonReentrant(REENTRANCY_MTX)\n refundsAttachedEth\n returns (bytes memory returnResult)\n {\n ExecuteState memory state;\n state.sender = msg.sender;\n state.mtx = mtx;\n state.hash = getMetaTransactionHash(mtx);\n state.signature = signature;\n\n returnResult = _executeMetaTransactionPrivate(state);\n }\n\n /// @dev Execute multiple meta-transactions.\n /// @param mtxs The meta-transactions.\n /// @param signatures The signature by each respective `mtx.signer`.\n /// @return returnResults The ABI-encoded results of the underlying calls.\n function batchExecuteMetaTransactions(\n MetaTransactionData[] memory mtxs,\n LibSignature.Signature[] memory signatures\n )\n public\n payable\n override\n nonReentrant(REENTRANCY_MTX)\n refundsAttachedEth\n returns (bytes[] memory returnResults)\n {\n if (mtxs.length != signatures.length) {\n LibMetaTransactionsRichErrors.InvalidMetaTransactionsArrayLengthsError(\n mtxs.length,\n signatures.length\n ).rrevert();\n }\n returnResults = new bytes[](mtxs.length);\n for (uint256 i = 0; i < mtxs.length; ++i) {\n ExecuteState memory state;\n state.sender = msg.sender;\n state.mtx = mtxs[i];\n state.hash = getMetaTransactionHash(mtxs[i]);\n state.signature = signatures[i];\n\n returnResults[i] = _executeMetaTransactionPrivate(state);\n }\n }\n\n /// @dev Get the block at which a meta-transaction has been executed.\n /// @param mtx The meta-transaction.\n /// @return blockNumber The block height when the meta-transactioin was executed.\n function getMetaTransactionExecutedBlock(MetaTransactionData memory mtx)\n public\n override\n view\n returns (uint256 blockNumber)\n {\n return getMetaTransactionHashExecutedBlock(getMetaTransactionHash(mtx));\n }\n\n /// @dev Get the block at which a meta-transaction hash has been executed.\n /// @param mtxHash The meta-transaction hash.\n /// @return blockNumber The block height when the meta-transactioin was executed.\n function getMetaTransactionHashExecutedBlock(bytes32 mtxHash)\n public\n override\n view\n returns (uint256 blockNumber)\n {\n return LibMetaTransactionsStorage.getStorage().mtxHashToExecutedBlockNumber[mtxHash];\n }\n\n /// @dev Get the EIP712 hash of a meta-transaction.\n /// @param mtx The meta-transaction.\n /// @return mtxHash The EIP712 hash of `mtx`.\n function getMetaTransactionHash(MetaTransactionData memory mtx)\n public\n override\n view\n returns (bytes32 mtxHash)\n {\n return _getEIP712Hash(keccak256(abi.encode(\n MTX_EIP712_TYPEHASH,\n mtx.signer,\n mtx.sender,\n mtx.minGasPrice,\n mtx.maxGasPrice,\n mtx.expirationTimeSeconds,\n mtx.salt,\n keccak256(mtx.callData),\n mtx.value,\n mtx.feeToken,\n mtx.feeAmount\n )));\n }\n\n /// @dev Execute a meta-transaction by `sender`. Low-level, hidden variant.\n /// @param state The `ExecuteState` for this metatransaction, with `sender`,\n /// `hash`, `mtx`, and `signature` fields filled.\n /// @return returnResult The ABI-encoded result of the underlying call.\n function _executeMetaTransactionPrivate(ExecuteState memory state)\n private\n returns (bytes memory returnResult)\n {\n _validateMetaTransaction(state);\n\n // Mark the transaction executed by storing the block at which it was executed.\n // Currently the block number just indicates that the mtx was executed and\n // serves no other purpose from within this contract.\n LibMetaTransactionsStorage.getStorage()\n .mtxHashToExecutedBlockNumber[state.hash] = block.number;\n\n // Pay the fee to the sender.\n if (state.mtx.feeAmount > 0) {\n _transferERC20Tokens(\n state.mtx.feeToken,\n state.mtx.signer,\n state.sender,\n state.mtx.feeAmount\n );\n }\n\n // Execute the call based on the selector.\n state.selector = state.mtx.callData.readBytes4(0);\n if (state.selector == ITransformERC20Feature.transformERC20.selector) {\n returnResult = _executeTransformERC20Call(state);\n } else if (state.selector == INativeOrdersFeature.fillLimitOrder.selector) {\n returnResult = _executeFillLimitOrderCall(state);\n } else if (state.selector == INativeOrdersFeature.fillRfqOrder.selector) {\n returnResult = _executeFillRfqOrderCall(state);\n } else {\n LibMetaTransactionsRichErrors\n .MetaTransactionUnsupportedFunctionError(state.hash, state.selector)\n .rrevert();\n }\n emit MetaTransactionExecuted(\n state.hash,\n state.selector,\n state.mtx.signer,\n state.mtx.sender\n );\n }\n\n /// @dev Validate that a meta-transaction is executable.\n function _validateMetaTransaction(ExecuteState memory state)\n private\n view\n {\n // Must be from the required sender, if set.\n if (state.mtx.sender != address(0) && state.mtx.sender != state.sender) {\n LibMetaTransactionsRichErrors\n .MetaTransactionWrongSenderError(\n state.hash,\n state.sender,\n state.mtx.sender\n ).rrevert();\n }\n // Must not be expired.\n if (state.mtx.expirationTimeSeconds <= block.timestamp) {\n LibMetaTransactionsRichErrors\n .MetaTransactionExpiredError(\n state.hash,\n block.timestamp,\n state.mtx.expirationTimeSeconds\n ).rrevert();\n }\n // Must have a valid gas price.\n if (state.mtx.minGasPrice > tx.gasprice || state.mtx.maxGasPrice < tx.gasprice) {\n LibMetaTransactionsRichErrors\n .MetaTransactionGasPriceError(\n state.hash,\n tx.gasprice,\n state.mtx.minGasPrice,\n state.mtx.maxGasPrice\n ).rrevert();\n }\n // Must have enough ETH.\n state.selfBalance = address(this).balance;\n if (state.mtx.value > state.selfBalance) {\n LibMetaTransactionsRichErrors\n .MetaTransactionInsufficientEthError(\n state.hash,\n state.selfBalance,\n state.mtx.value\n ).rrevert();\n }\n\n if (LibSignature.getSignerOfHash(state.hash, state.signature) !=\n state.mtx.signer) {\n LibSignatureRichErrors.SignatureValidationError(\n LibSignatureRichErrors.SignatureValidationErrorCodes.WRONG_SIGNER,\n state.hash,\n state.mtx.signer,\n // TODO: Remove this field from SignatureValidationError\n // when rich reverts are part of the protocol repo.\n \"\"\n ).rrevert();\n }\n // Transaction must not have been already executed.\n state.executedBlockNumber = LibMetaTransactionsStorage\n .getStorage().mtxHashToExecutedBlockNumber[state.hash];\n if (state.executedBlockNumber != 0) {\n LibMetaTransactionsRichErrors\n .MetaTransactionAlreadyExecutedError(\n state.hash,\n state.executedBlockNumber\n ).rrevert();\n }\n }\n\n /// @dev Execute a `ITransformERC20Feature.transformERC20()` meta-transaction call\n /// by decoding the call args and translating the call to the internal\n /// `ITransformERC20Feature._transformERC20()` variant, where we can override\n /// the taker address.\n function _executeTransformERC20Call(ExecuteState memory state)\n private\n returns (bytes memory returnResult)\n {\n // HACK(dorothy-zbornak): `abi.decode()` with the individual args\n // will cause a stack overflow. But we can prefix the call data with an\n // offset to transform it into the encoding for the equivalent single struct arg,\n // since decoding a single struct arg consumes far less stack space than\n // decoding multiple struct args.\n\n // Where the encoding for multiple args (with the selector ommitted)\n // would typically look like:\n // | argument | offset |\n // |--------------------------|---------|\n // | inputToken | 0 |\n // | outputToken | 32 |\n // | inputTokenAmount | 64 |\n // | minOutputTokenAmount | 96 |\n // | transformations (offset) | 128 | = 32\n // | transformations (data) | 160 |\n\n // We will ABI-decode a single struct arg copy with the layout:\n // | argument | offset |\n // |--------------------------|---------|\n // | (arg 1 offset) | 0 | = 32\n // | inputToken | 32 |\n // | outputToken | 64 |\n // | inputTokenAmount | 96 |\n // | minOutputTokenAmount | 128 |\n // | transformations (offset) | 160 | = 32\n // | transformations (data) | 192 |\n\n ExternalTransformERC20Args memory args;\n {\n bytes memory encodedStructArgs = new bytes(state.mtx.callData.length - 4 + 32);\n // Copy the args data from the original, after the new struct offset prefix.\n bytes memory fromCallData = state.mtx.callData;\n assert(fromCallData.length >= 160);\n uint256 fromMem;\n uint256 toMem;\n assembly {\n // Prefix the calldata with a struct offset,\n // which points to just one word over.\n mstore(add(encodedStructArgs, 32), 32)\n // Copy everything after the selector.\n fromMem := add(fromCallData, 36)\n // Start copying after the struct offset.\n toMem := add(encodedStructArgs, 64)\n }\n LibBytesV06.memCopy(toMem, fromMem, fromCallData.length - 4);\n // Decode call args for `ITransformERC20Feature.transformERC20()` as a struct.\n args = abi.decode(encodedStructArgs, (ExternalTransformERC20Args));\n }\n // Call `ITransformERC20Feature._transformERC20()` (internal variant).\n return _callSelf(\n state.hash,\n abi.encodeWithSelector(\n ITransformERC20Feature._transformERC20.selector,\n ITransformERC20Feature.TransformERC20Args({\n taker: state.mtx.signer, // taker is mtx signer\n inputToken: args.inputToken,\n outputToken: args.outputToken,\n inputTokenAmount: args.inputTokenAmount,\n minOutputTokenAmount: args.minOutputTokenAmount,\n transformations: args.transformations\n })\n ),\n state.mtx.value\n );\n }\n\n /// @dev Extract arguments from call data by copying everything after the\n /// 4-byte selector into a new byte array.\n /// @param callData The call data from which arguments are to be extracted.\n /// @return args The extracted arguments as a byte array.\n function _extractArgumentsFromCallData(\n bytes memory callData\n )\n private\n pure\n returns (bytes memory args)\n {\n args = new bytes(callData.length - 4);\n uint256 fromMem;\n uint256 toMem;\n\n assembly {\n fromMem := add(callData, 36) // skip length and 4-byte selector\n toMem := add(args, 32) // write after length prefix\n }\n\n LibBytesV06.memCopy(toMem, fromMem, args.length);\n\n return args;\n }\n\n /// @dev Execute a `INativeOrdersFeature.fillLimitOrder()` meta-transaction call\n /// by decoding the call args and translating the call to the internal\n /// `INativeOrdersFeature._fillLimitOrder()` variant, where we can override\n /// the taker address.\n function _executeFillLimitOrderCall(ExecuteState memory state)\n private\n returns (bytes memory returnResult)\n {\n LibNativeOrder.LimitOrder memory order;\n LibSignature.Signature memory signature;\n uint128 takerTokenFillAmount;\n\n bytes memory args = _extractArgumentsFromCallData(state.mtx.callData);\n (order, signature, takerTokenFillAmount) = abi.decode(args, (LibNativeOrder.LimitOrder, LibSignature.Signature, uint128));\n\n return _callSelf(\n state.hash,\n abi.encodeWithSelector(\n INativeOrdersFeature._fillLimitOrder.selector,\n order,\n signature,\n takerTokenFillAmount,\n state.mtx.signer, // taker is mtx signer\n msg.sender\n ),\n state.mtx.value\n );\n }\n\n /// @dev Execute a `INativeOrdersFeature.fillRfqOrder()` meta-transaction call\n /// by decoding the call args and translating the call to the internal\n /// `INativeOrdersFeature._fillRfqOrder()` variant, where we can overrideunimpleme\n /// the taker address.\n function _executeFillRfqOrderCall(ExecuteState memory state)\n private\n returns (bytes memory returnResult)\n {\n LibNativeOrder.RfqOrder memory order;\n LibSignature.Signature memory signature;\n uint128 takerTokenFillAmount;\n\n bytes memory args = _extractArgumentsFromCallData(state.mtx.callData);\n (order, signature, takerTokenFillAmount) = abi.decode(args, (LibNativeOrder.RfqOrder, LibSignature.Signature, uint128));\n\n return _callSelf(\n state.hash,\n abi.encodeWithSelector(\n INativeOrdersFeature._fillRfqOrder.selector,\n order,\n signature,\n takerTokenFillAmount,\n state.mtx.signer // taker is mtx signer\n ),\n state.mtx.value\n );\n }\n\n /// @dev Make an arbitrary internal, meta-transaction call.\n /// Warning: Do not let unadulterated `callData` into this function.\n function _callSelf(bytes32 hash, bytes memory callData, uint256 value)\n private\n returns (bytes memory returnResult)\n {\n bool success;\n (success, returnResult) = address(this).call{value: value}(callData);\n if (!success) {\n LibMetaTransactionsRichErrors.MetaTransactionCallFailedError(\n hash,\n callData,\n returnResult\n ).rrevert();\n }\n }\n}\n",
|
|
"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibRichErrorsV06 {\n\n // bytes4(keccak256(\"Error(string)\"))\n bytes4 internal constant STANDARD_ERROR_SELECTOR = 0x08c379a0;\n\n // solhint-disable func-name-mixedcase\n /// @dev ABI encode a standard, string revert error payload.\n /// This is the same payload that would be included by a `revert(string)`\n /// solidity statement. It has the function signature `Error(string)`.\n /// @param message The error string.\n /// @return The ABI encoded error.\n function StandardError(string memory message)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n STANDARD_ERROR_SELECTOR,\n bytes(message)\n );\n }\n // solhint-enable func-name-mixedcase\n\n /// @dev Reverts an encoded rich revert reason `errorData`.\n /// @param errorData ABI encoded error data.\n function rrevert(bytes memory errorData)\n internal\n pure\n {\n assembly {\n revert(add(errorData, 0x20), mload(errorData))\n }\n }\n}\n",
|
|
"@0x/contracts-utils/contracts/src/v06/LibBytesV06.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\nimport \"./errors/LibBytesRichErrorsV06.sol\";\nimport \"./errors/LibRichErrorsV06.sol\";\n\n\nlibrary LibBytesV06 {\n\n using LibBytesV06 for bytes;\n\n /// @dev Gets the memory address for a byte array.\n /// @param input Byte array to lookup.\n /// @return memoryAddress Memory address of byte array. This\n /// points to the header of the byte array which contains\n /// the length.\n function rawAddress(bytes memory input)\n internal\n pure\n returns (uint256 memoryAddress)\n {\n assembly {\n memoryAddress := input\n }\n return memoryAddress;\n }\n\n /// @dev Gets the memory address for the contents of a byte array.\n /// @param input Byte array to lookup.\n /// @return memoryAddress Memory address of the contents of the byte array.\n function contentAddress(bytes memory input)\n internal\n pure\n returns (uint256 memoryAddress)\n {\n assembly {\n memoryAddress := add(input, 32)\n }\n return memoryAddress;\n }\n\n /// @dev Copies `length` bytes from memory location `source` to `dest`.\n /// @param dest memory address to copy bytes to.\n /// @param source memory address to copy bytes from.\n /// @param length number of bytes to copy.\n function memCopy(\n uint256 dest,\n uint256 source,\n uint256 length\n )\n internal\n pure\n {\n if (length < 32) {\n // Handle a partial word by reading destination and masking\n // off the bits we are interested in.\n // This correctly handles overlap, zero lengths and source == dest\n assembly {\n let mask := sub(exp(256, sub(32, length)), 1)\n let s := and(mload(source), not(mask))\n let d := and(mload(dest), mask)\n mstore(dest, or(s, d))\n }\n } else {\n // Skip the O(length) loop when source == dest.\n if (source == dest) {\n return;\n }\n\n // For large copies we copy whole words at a time. The final\n // word is aligned to the end of the range (instead of after the\n // previous) to handle partial words. So a copy will look like this:\n //\n // ####\n // ####\n // ####\n // ####\n //\n // We handle overlap in the source and destination range by\n // changing the copying direction. This prevents us from\n // overwriting parts of source that we still need to copy.\n //\n // This correctly handles source == dest\n //\n if (source > dest) {\n assembly {\n // We subtract 32 from `sEnd` and `dEnd` because it\n // is easier to compare with in the loop, and these\n // are also the addresses we need for copying the\n // last bytes.\n length := sub(length, 32)\n let sEnd := add(source, length)\n let dEnd := add(dest, length)\n\n // Remember the last 32 bytes of source\n // This needs to be done here and not after the loop\n // because we may have overwritten the last bytes in\n // source already due to overlap.\n let last := mload(sEnd)\n\n // Copy whole words front to back\n // Note: the first check is always true,\n // this could have been a do-while loop.\n // solhint-disable-next-line no-empty-blocks\n for {} lt(source, sEnd) {} {\n mstore(dest, mload(source))\n source := add(source, 32)\n dest := add(dest, 32)\n }\n\n // Write the last 32 bytes\n mstore(dEnd, last)\n }\n } else {\n assembly {\n // We subtract 32 from `sEnd` and `dEnd` because those\n // are the starting points when copying a word at the end.\n length := sub(length, 32)\n let sEnd := add(source, length)\n let dEnd := add(dest, length)\n\n // Remember the first 32 bytes of source\n // This needs to be done here and not after the loop\n // because we may have overwritten the first bytes in\n // source already due to overlap.\n let first := mload(source)\n\n // Copy whole words back to front\n // We use a signed comparisson here to allow dEnd to become\n // negative (happens when source and dest < 32). Valid\n // addresses in local memory will never be larger than\n // 2**255, so they can be safely re-interpreted as signed.\n // Note: the first check is always true,\n // this could have been a do-while loop.\n // solhint-disable-next-line no-empty-blocks\n for {} slt(dest, dEnd) {} {\n mstore(dEnd, mload(sEnd))\n sEnd := sub(sEnd, 32)\n dEnd := sub(dEnd, 32)\n }\n\n // Write the first 32 bytes\n mstore(dest, first)\n }\n }\n }\n }\n\n /// @dev Returns a slices from a byte array.\n /// @param b The byte array to take a slice from.\n /// @param from The starting index for the slice (inclusive).\n /// @param to The final index for the slice (exclusive).\n /// @return result The slice containing bytes at indices [from, to)\n function slice(\n bytes memory b,\n uint256 from,\n uint256 to\n )\n internal\n pure\n returns (bytes memory result)\n {\n // Ensure that the from and to positions are valid positions for a slice within\n // the byte array that is being used.\n if (from > to) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.FromLessThanOrEqualsToRequired,\n from,\n to\n ));\n }\n if (to > b.length) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.ToLessThanOrEqualsLengthRequired,\n to,\n b.length\n ));\n }\n\n // Create a new bytes structure and copy contents\n result = new bytes(to - from);\n memCopy(\n result.contentAddress(),\n b.contentAddress() + from,\n result.length\n );\n return result;\n }\n\n /// @dev Returns a slice from a byte array without preserving the input.\n /// When `from == 0`, the original array will match the slice.\n /// In other cases its state will be corrupted.\n /// @param b The byte array to take a slice from. Will be destroyed in the process.\n /// @param from The starting index for the slice (inclusive).\n /// @param to The final index for the slice (exclusive).\n /// @return result The slice containing bytes at indices [from, to)\n function sliceDestructive(\n bytes memory b,\n uint256 from,\n uint256 to\n )\n internal\n pure\n returns (bytes memory result)\n {\n // Ensure that the from and to positions are valid positions for a slice within\n // the byte array that is being used.\n if (from > to) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.FromLessThanOrEqualsToRequired,\n from,\n to\n ));\n }\n if (to > b.length) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.ToLessThanOrEqualsLengthRequired,\n to,\n b.length\n ));\n }\n\n // Create a new bytes structure around [from, to) in-place.\n assembly {\n result := add(b, from)\n mstore(result, sub(to, from))\n }\n return result;\n }\n\n /// @dev Pops the last byte off of a byte array by modifying its length.\n /// @param b Byte array that will be modified.\n /// @return result The byte that was popped off.\n function popLastByte(bytes memory b)\n internal\n pure\n returns (bytes1 result)\n {\n if (b.length == 0) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanZeroRequired,\n b.length,\n 0\n ));\n }\n\n // Store last byte.\n result = b[b.length - 1];\n\n assembly {\n // Decrement length of byte array.\n let newLen := sub(mload(b), 1)\n mstore(b, newLen)\n }\n return result;\n }\n\n /// @dev Tests equality of two byte arrays.\n /// @param lhs First byte array to compare.\n /// @param rhs Second byte array to compare.\n /// @return equal True if arrays are the same. False otherwise.\n function equals(\n bytes memory lhs,\n bytes memory rhs\n )\n internal\n pure\n returns (bool equal)\n {\n // Keccak gas cost is 30 + numWords * 6. This is a cheap way to compare.\n // We early exit on unequal lengths, but keccak would also correctly\n // handle this.\n return lhs.length == rhs.length && keccak256(lhs) == keccak256(rhs);\n }\n\n /// @dev Reads an address from a position in a byte array.\n /// @param b Byte array containing an address.\n /// @param index Index in byte array of address.\n /// @return result address from byte array.\n function readAddress(\n bytes memory b,\n uint256 index\n )\n internal\n pure\n returns (address result)\n {\n if (b.length < index + 20) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsTwentyRequired,\n b.length,\n index + 20 // 20 is length of address\n ));\n }\n\n // Add offset to index:\n // 1. Arrays are prefixed by 32-byte length parameter (add 32 to index)\n // 2. Account for size difference between address length and 32-byte storage word (subtract 12 from index)\n index += 20;\n\n // Read address from array memory\n assembly {\n // 1. Add index to address of bytes array\n // 2. Load 32-byte word from memory\n // 3. Apply 20-byte mask to obtain address\n result := and(mload(add(b, index)), 0xffffffffffffffffffffffffffffffffffffffff)\n }\n return result;\n }\n\n /// @dev Writes an address into a specific position in a byte array.\n /// @param b Byte array to insert address into.\n /// @param index Index in byte array of address.\n /// @param input Address to put into byte array.\n function writeAddress(\n bytes memory b,\n uint256 index,\n address input\n )\n internal\n pure\n {\n if (b.length < index + 20) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsTwentyRequired,\n b.length,\n index + 20 // 20 is length of address\n ));\n }\n\n // Add offset to index:\n // 1. Arrays are prefixed by 32-byte length parameter (add 32 to index)\n // 2. Account for size difference between address length and 32-byte storage word (subtract 12 from index)\n index += 20;\n\n // Store address into array memory\n assembly {\n // The address occupies 20 bytes and mstore stores 32 bytes.\n // First fetch the 32-byte word where we'll be storing the address, then\n // apply a mask so we have only the bytes in the word that the address will not occupy.\n // Then combine these bytes with the address and store the 32 bytes back to memory with mstore.\n\n // 1. Add index to address of bytes array\n // 2. Load 32-byte word from memory\n // 3. Apply 12-byte mask to obtain extra bytes occupying word of memory where we'll store the address\n let neighbors := and(\n mload(add(b, index)),\n 0xffffffffffffffffffffffff0000000000000000000000000000000000000000\n )\n\n // Make sure input address is clean.\n // (Solidity does not guarantee this)\n input := and(input, 0xffffffffffffffffffffffffffffffffffffffff)\n\n // Store the neighbors and address into memory\n mstore(add(b, index), xor(input, neighbors))\n }\n }\n\n /// @dev Reads a bytes32 value from a position in a byte array.\n /// @param b Byte array containing a bytes32 value.\n /// @param index Index in byte array of bytes32 value.\n /// @return result bytes32 value from byte array.\n function readBytes32(\n bytes memory b,\n uint256 index\n )\n internal\n pure\n returns (bytes32 result)\n {\n if (b.length < index + 32) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsThirtyTwoRequired,\n b.length,\n index + 32\n ));\n }\n\n // Arrays are prefixed by a 256 bit length parameter\n index += 32;\n\n // Read the bytes32 from array memory\n assembly {\n result := mload(add(b, index))\n }\n return result;\n }\n\n /// @dev Writes a bytes32 into a specific position in a byte array.\n /// @param b Byte array to insert <input> into.\n /// @param index Index in byte array of <input>.\n /// @param input bytes32 to put into byte array.\n function writeBytes32(\n bytes memory b,\n uint256 index,\n bytes32 input\n )\n internal\n pure\n {\n if (b.length < index + 32) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsThirtyTwoRequired,\n b.length,\n index + 32\n ));\n }\n\n // Arrays are prefixed by a 256 bit length parameter\n index += 32;\n\n // Read the bytes32 from array memory\n assembly {\n mstore(add(b, index), input)\n }\n }\n\n /// @dev Reads a uint256 value from a position in a byte array.\n /// @param b Byte array containing a uint256 value.\n /// @param index Index in byte array of uint256 value.\n /// @return result uint256 value from byte array.\n function readUint256(\n bytes memory b,\n uint256 index\n )\n internal\n pure\n returns (uint256 result)\n {\n result = uint256(readBytes32(b, index));\n return result;\n }\n\n /// @dev Writes a uint256 into a specific position in a byte array.\n /// @param b Byte array to insert <input> into.\n /// @param index Index in byte array of <input>.\n /// @param input uint256 to put into byte array.\n function writeUint256(\n bytes memory b,\n uint256 index,\n uint256 input\n )\n internal\n pure\n {\n writeBytes32(b, index, bytes32(input));\n }\n\n /// @dev Reads an unpadded bytes4 value from a position in a byte array.\n /// @param b Byte array containing a bytes4 value.\n /// @param index Index in byte array of bytes4 value.\n /// @return result bytes4 value from byte array.\n function readBytes4(\n bytes memory b,\n uint256 index\n )\n internal\n pure\n returns (bytes4 result)\n {\n if (b.length < index + 4) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsFourRequired,\n b.length,\n index + 4\n ));\n }\n\n // Arrays are prefixed by a 32 byte length field\n index += 32;\n\n // Read the bytes4 from array memory\n assembly {\n result := mload(add(b, index))\n // Solidity does not require us to clean the trailing bytes.\n // We do it anyway\n result := and(result, 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000)\n }\n return result;\n }\n\n /// @dev Writes a new length to a byte array.\n /// Decreasing length will lead to removing the corresponding lower order bytes from the byte array.\n /// Increasing length may lead to appending adjacent in-memory bytes to the end of the byte array.\n /// @param b Bytes array to write new length to.\n /// @param length New length of byte array.\n function writeLength(bytes memory b, uint256 length)\n internal\n pure\n {\n assembly {\n mstore(b, length)\n }\n }\n}\n",
|
|
"@0x/contracts-utils/contracts/src/v06/errors/LibBytesRichErrorsV06.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibBytesRichErrorsV06 {\n\n enum InvalidByteOperationErrorCodes {\n FromLessThanOrEqualsToRequired,\n ToLessThanOrEqualsLengthRequired,\n LengthGreaterThanZeroRequired,\n LengthGreaterThanOrEqualsFourRequired,\n LengthGreaterThanOrEqualsTwentyRequired,\n LengthGreaterThanOrEqualsThirtyTwoRequired,\n LengthGreaterThanOrEqualsNestedBytesLengthRequired,\n DestinationLengthGreaterThanOrEqualSourceLengthRequired\n }\n\n // bytes4(keccak256(\"InvalidByteOperationError(uint8,uint256,uint256)\"))\n bytes4 internal constant INVALID_BYTE_OPERATION_ERROR_SELECTOR =\n 0x28006595;\n\n // solhint-disable func-name-mixedcase\n function InvalidByteOperationError(\n InvalidByteOperationErrorCodes errorCode,\n uint256 offset,\n uint256 required\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n INVALID_BYTE_OPERATION_ERROR_SELECTOR,\n errorCode,\n offset,\n required\n );\n }\n}\n",
|
|
"@0x/contracts-utils/contracts/src/v06/LibSafeMathV06.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\nimport \"./errors/LibRichErrorsV06.sol\";\nimport \"./errors/LibSafeMathRichErrorsV06.sol\";\n\n\nlibrary LibSafeMathV06 {\n\n function safeMul(uint256 a, uint256 b)\n internal\n pure\n returns (uint256)\n {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n if (c / a != b) {\n LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(\n LibSafeMathRichErrorsV06.BinOpErrorCodes.MULTIPLICATION_OVERFLOW,\n a,\n b\n ));\n }\n return c;\n }\n\n function safeDiv(uint256 a, uint256 b)\n internal\n pure\n returns (uint256)\n {\n if (b == 0) {\n LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(\n LibSafeMathRichErrorsV06.BinOpErrorCodes.DIVISION_BY_ZERO,\n a,\n b\n ));\n }\n uint256 c = a / b;\n return c;\n }\n\n function safeSub(uint256 a, uint256 b)\n internal\n pure\n returns (uint256)\n {\n if (b > a) {\n LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(\n LibSafeMathRichErrorsV06.BinOpErrorCodes.SUBTRACTION_UNDERFLOW,\n a,\n b\n ));\n }\n return a - b;\n }\n\n function safeAdd(uint256 a, uint256 b)\n internal\n pure\n returns (uint256)\n {\n uint256 c = a + b;\n if (c < a) {\n LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(\n LibSafeMathRichErrorsV06.BinOpErrorCodes.ADDITION_OVERFLOW,\n a,\n b\n ));\n }\n return c;\n }\n\n function max256(uint256 a, uint256 b)\n internal\n pure\n returns (uint256)\n {\n return a >= b ? a : b;\n }\n\n function min256(uint256 a, uint256 b)\n internal\n pure\n returns (uint256)\n {\n return a < b ? a : b;\n }\n\n function safeMul128(uint128 a, uint128 b)\n internal\n pure\n returns (uint128)\n {\n if (a == 0) {\n return 0;\n }\n uint128 c = a * b;\n if (c / a != b) {\n LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(\n LibSafeMathRichErrorsV06.BinOpErrorCodes.MULTIPLICATION_OVERFLOW,\n a,\n b\n ));\n }\n return c;\n }\n\n function safeDiv128(uint128 a, uint128 b)\n internal\n pure\n returns (uint128)\n {\n if (b == 0) {\n LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(\n LibSafeMathRichErrorsV06.BinOpErrorCodes.DIVISION_BY_ZERO,\n a,\n b\n ));\n }\n uint128 c = a / b;\n return c;\n }\n\n function safeSub128(uint128 a, uint128 b)\n internal\n pure\n returns (uint128)\n {\n if (b > a) {\n LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(\n LibSafeMathRichErrorsV06.BinOpErrorCodes.SUBTRACTION_UNDERFLOW,\n a,\n b\n ));\n }\n return a - b;\n }\n\n function safeAdd128(uint128 a, uint128 b)\n internal\n pure\n returns (uint128)\n {\n uint128 c = a + b;\n if (c < a) {\n LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(\n LibSafeMathRichErrorsV06.BinOpErrorCodes.ADDITION_OVERFLOW,\n a,\n b\n ));\n }\n return c;\n }\n\n function max128(uint128 a, uint128 b)\n internal\n pure\n returns (uint128)\n {\n return a >= b ? a : b;\n }\n\n function min128(uint128 a, uint128 b)\n internal\n pure\n returns (uint128)\n {\n return a < b ? a : b;\n }\n\n function safeDowncastToUint128(uint256 a)\n internal\n pure\n returns (uint128)\n {\n if (a > type(uint128).max) {\n LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256DowncastError(\n LibSafeMathRichErrorsV06.DowncastErrorCodes.VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT128,\n a\n ));\n }\n return uint128(a);\n }\n}\n",
|
|
"@0x/contracts-utils/contracts/src/v06/errors/LibSafeMathRichErrorsV06.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibSafeMathRichErrorsV06 {\n\n // bytes4(keccak256(\"Uint256BinOpError(uint8,uint256,uint256)\"))\n bytes4 internal constant UINT256_BINOP_ERROR_SELECTOR =\n 0xe946c1bb;\n\n // bytes4(keccak256(\"Uint256DowncastError(uint8,uint256)\"))\n bytes4 internal constant UINT256_DOWNCAST_ERROR_SELECTOR =\n 0xc996af7b;\n\n enum BinOpErrorCodes {\n ADDITION_OVERFLOW,\n MULTIPLICATION_OVERFLOW,\n SUBTRACTION_UNDERFLOW,\n DIVISION_BY_ZERO\n }\n\n enum DowncastErrorCodes {\n VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT32,\n VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT64,\n VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT96,\n VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT128\n }\n\n // solhint-disable func-name-mixedcase\n function Uint256BinOpError(\n BinOpErrorCodes errorCode,\n uint256 a,\n uint256 b\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n UINT256_BINOP_ERROR_SELECTOR,\n errorCode,\n a,\n b\n );\n }\n\n function Uint256DowncastError(\n DowncastErrorCodes errorCode,\n uint256 a\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n UINT256_DOWNCAST_ERROR_SELECTOR,\n errorCode,\n a\n );\n }\n}\n",
|
|
"../errors/LibMetaTransactionsRichErrors.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibMetaTransactionsRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function InvalidMetaTransactionsArrayLengthsError(\n uint256 mtxCount,\n uint256 signatureCount\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"InvalidMetaTransactionsArrayLengthsError(uint256,uint256)\")),\n mtxCount,\n signatureCount\n );\n }\n\n function MetaTransactionUnsupportedFunctionError(\n bytes32 mtxHash,\n bytes4 selector\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"MetaTransactionUnsupportedFunctionError(bytes32,bytes4)\")),\n mtxHash,\n selector\n );\n }\n\n function MetaTransactionWrongSenderError(\n bytes32 mtxHash,\n address sender,\n address expectedSender\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"MetaTransactionWrongSenderError(bytes32,address,address)\")),\n mtxHash,\n sender,\n expectedSender\n );\n }\n\n function MetaTransactionExpiredError(\n bytes32 mtxHash,\n uint256 time,\n uint256 expirationTime\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"MetaTransactionExpiredError(bytes32,uint256,uint256)\")),\n mtxHash,\n time,\n expirationTime\n );\n }\n\n function MetaTransactionGasPriceError(\n bytes32 mtxHash,\n uint256 gasPrice,\n uint256 minGasPrice,\n uint256 maxGasPrice\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"MetaTransactionGasPriceError(bytes32,uint256,uint256,uint256)\")),\n mtxHash,\n gasPrice,\n minGasPrice,\n maxGasPrice\n );\n }\n\n function MetaTransactionInsufficientEthError(\n bytes32 mtxHash,\n uint256 ethBalance,\n uint256 ethRequired\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"MetaTransactionInsufficientEthError(bytes32,uint256,uint256)\")),\n mtxHash,\n ethBalance,\n ethRequired\n );\n }\n\n function MetaTransactionInvalidSignatureError(\n bytes32 mtxHash,\n bytes memory signature,\n bytes memory errData\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"MetaTransactionInvalidSignatureError(bytes32,bytes,bytes)\")),\n mtxHash,\n signature,\n errData\n );\n }\n\n function MetaTransactionAlreadyExecutedError(\n bytes32 mtxHash,\n uint256 executedBlockNumber\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"MetaTransactionAlreadyExecutedError(bytes32,uint256)\")),\n mtxHash,\n executedBlockNumber\n );\n }\n\n function MetaTransactionCallFailedError(\n bytes32 mtxHash,\n bytes memory callData,\n bytes memory returnData\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"MetaTransactionCallFailedError(bytes32,bytes,bytes)\")),\n mtxHash,\n callData,\n returnData\n );\n }\n}\n",
|
|
"../fixins/FixinCommon.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"../errors/LibCommonRichErrors.sol\";\nimport \"../errors/LibOwnableRichErrors.sol\";\nimport \"../features/interfaces/IOwnableFeature.sol\";\nimport \"../features/interfaces/ISimpleFunctionRegistryFeature.sol\";\n\n\n/// @dev Common feature utilities.\nabstract contract FixinCommon {\n\n using LibRichErrorsV06 for bytes;\n\n /// @dev The implementation address of this feature.\n address internal immutable _implementation;\n\n /// @dev The caller must be this contract.\n modifier onlySelf() virtual {\n if (msg.sender != address(this)) {\n LibCommonRichErrors.OnlyCallableBySelfError(msg.sender).rrevert();\n }\n _;\n }\n\n /// @dev The caller of this function must be the owner.\n modifier onlyOwner() virtual {\n {\n address owner = IOwnableFeature(address(this)).owner();\n if (msg.sender != owner) {\n LibOwnableRichErrors.OnlyOwnerError(\n msg.sender,\n owner\n ).rrevert();\n }\n }\n _;\n }\n\n constructor() internal {\n // Remember this feature's original address.\n _implementation = address(this);\n }\n\n /// @dev Registers a function implemented by this feature at `_implementation`.\n /// Can and should only be called within a `migrate()`.\n /// @param selector The selector of the function whose implementation\n /// is at `_implementation`.\n function _registerFeatureFunction(bytes4 selector)\n internal\n {\n ISimpleFunctionRegistryFeature(address(this)).extend(selector, _implementation);\n }\n\n /// @dev Encode a feature version as a `uint256`.\n /// @param major The major version number of the feature.\n /// @param minor The minor version number of the feature.\n /// @param revision The revision number of the feature.\n /// @return encodedVersion The encoded version number.\n function _encodeVersion(uint32 major, uint32 minor, uint32 revision)\n internal\n pure\n returns (uint256 encodedVersion)\n {\n return (uint256(major) << 64) | (uint256(minor) << 32) | uint256(revision);\n }\n}\n",
|
|
"../errors/LibCommonRichErrors.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibCommonRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function OnlyCallableBySelfError(address sender)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"OnlyCallableBySelfError(address)\")),\n sender\n );\n }\n\n function IllegalReentrancyError(bytes4 selector, uint256 reentrancyFlags)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"IllegalReentrancyError(bytes4,uint256)\")),\n selector,\n reentrancyFlags\n );\n }\n}\n",
|
|
"../errors/LibOwnableRichErrors.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibOwnableRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function OnlyOwnerError(\n address sender,\n address owner\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"OnlyOwnerError(address,address)\")),\n sender,\n owner\n );\n }\n\n function TransferOwnerToZeroError()\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"TransferOwnerToZeroError()\"))\n );\n }\n\n function MigrateCallFailedError(address target, bytes memory resultData)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"MigrateCallFailedError(address,bytes)\")),\n target,\n resultData\n );\n }\n}\n",
|
|
"./interfaces/IOwnableFeature.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/interfaces/IOwnableV06.sol\";\n\n\n// solhint-disable no-empty-blocks\n/// @dev Owner management and migration features.\ninterface IOwnableFeature is\n IOwnableV06\n{\n /// @dev Emitted when `migrate()` is called.\n /// @param caller The caller of `migrate()`.\n /// @param migrator The migration contract.\n /// @param newOwner The address of the new owner.\n event Migrated(address caller, address migrator, address newOwner);\n\n /// @dev Execute a migration function in the context of the ZeroEx contract.\n /// The result of the function being called should be the magic bytes\n /// 0x2c64c5ef (`keccack('MIGRATE_SUCCESS')`). Only callable by the owner.\n /// The owner will be temporarily set to `address(this)` inside the call.\n /// Before returning, the owner will be set to `newOwner`.\n /// @param target The migrator contract address.\n /// @param newOwner The address of the new owner.\n /// @param data The call data.\n function migrate(address target, bytes calldata data, address newOwner) external;\n}\n",
|
|
"@0x/contracts-utils/contracts/src/v06/interfaces/IOwnableV06.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\ninterface IOwnableV06 {\n\n /// @dev Emitted by Ownable when ownership is transferred.\n /// @param previousOwner The previous owner of the contract.\n /// @param newOwner The new owner of the contract.\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /// @dev Transfers ownership of the contract to a new address.\n /// @param newOwner The address that will become the owner.\n function transferOwnership(address newOwner) external;\n\n /// @dev The owner of this contract.\n /// @return ownerAddress The owner address.\n function owner() external view returns (address ownerAddress);\n}\n",
|
|
"./interfaces/ISimpleFunctionRegistryFeature.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\n\n/// @dev Basic registry management features.\ninterface ISimpleFunctionRegistryFeature {\n\n /// @dev A function implementation was updated via `extend()` or `rollback()`.\n /// @param selector The function selector.\n /// @param oldImpl The implementation contract address being replaced.\n /// @param newImpl The replacement implementation contract address.\n event ProxyFunctionUpdated(bytes4 indexed selector, address oldImpl, address newImpl);\n\n /// @dev Roll back to a prior implementation of a function.\n /// @param selector The function selector.\n /// @param targetImpl The address of an older implementation of the function.\n function rollback(bytes4 selector, address targetImpl) external;\n\n /// @dev Register or replace a function.\n /// @param selector The function selector.\n /// @param impl The implementation contract for the function.\n function extend(bytes4 selector, address impl) external;\n\n /// @dev Retrieve the length of the rollback history for a function.\n /// @param selector The function selector.\n /// @return rollbackLength The number of items in the rollback history for\n /// the function.\n function getRollbackLength(bytes4 selector)\n external\n view\n returns (uint256 rollbackLength);\n\n /// @dev Retrieve an entry in the rollback history for a function.\n /// @param selector The function selector.\n /// @param idx The index in the rollback history.\n /// @return impl An implementation address for the function at\n /// index `idx`.\n function getRollbackEntryAtIndex(bytes4 selector, uint256 idx)\n external\n view\n returns (address impl);\n}\n",
|
|
"../fixins/FixinReentrancyGuard.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/LibBytesV06.sol\";\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"../errors/LibCommonRichErrors.sol\";\nimport \"../storage/LibReentrancyGuardStorage.sol\";\n\n\n/// @dev Common feature utilities.\nabstract contract FixinReentrancyGuard {\n\n using LibRichErrorsV06 for bytes;\n using LibBytesV06 for bytes;\n\n // Combinable reentrancy flags.\n /// @dev Reentrancy guard flag for meta-transaction functions.\n uint256 constant internal REENTRANCY_MTX = 0x1;\n\n /// @dev Cannot reenter a function with the same reentrancy guard flags.\n modifier nonReentrant(uint256 reentrancyFlags) virtual {\n LibReentrancyGuardStorage.Storage storage stor =\n LibReentrancyGuardStorage.getStorage();\n {\n uint256 currentFlags = stor.reentrancyFlags;\n // Revert if any bits in `reentrancyFlags` has already been set.\n if ((currentFlags & reentrancyFlags) != 0) {\n LibCommonRichErrors.IllegalReentrancyError(\n msg.data.readBytes4(0),\n reentrancyFlags\n ).rrevert();\n }\n // Update reentrancy flags.\n stor.reentrancyFlags = currentFlags | reentrancyFlags;\n }\n\n _;\n\n // Clear reentrancy flags.\n stor.reentrancyFlags = stor.reentrancyFlags & (~reentrancyFlags);\n }\n}\n",
|
|
"../storage/LibReentrancyGuardStorage.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"./LibStorage.sol\";\nimport \"../external/IFlashWallet.sol\";\n\n\n/// @dev Storage helpers for the `FixinReentrancyGuard` mixin.\nlibrary LibReentrancyGuardStorage {\n\n /// @dev Storage bucket for this feature.\n struct Storage {\n // Reentrancy flags set whenever a non-reentrant function is entered\n // and cleared when it is exited.\n uint256 reentrancyFlags;\n }\n\n /// @dev Get the storage bucket for this contract.\n function getStorage() internal pure returns (Storage storage stor) {\n uint256 storageSlot = LibStorage.getStorageSlot(\n LibStorage.StorageId.ReentrancyGuard\n );\n // Dip into assembly to change the slot pointed to by the local\n // variable `stor`.\n // See https://solidity.readthedocs.io/en/v0.6.8/assembly.html?highlight=slot#access-to-external-variables-functions-and-libraries\n assembly { stor_slot := storageSlot }\n }\n}\n",
|
|
"../storage/LibStorage.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\n\n/// @dev Common storage helpers\nlibrary LibStorage {\n\n /// @dev What to bit-shift a storage ID by to get its slot.\n /// This gives us a maximum of 2**128 inline fields in each bucket.\n uint256 private constant STORAGE_SLOT_EXP = 128;\n\n /// @dev Storage IDs for feature storage buckets.\n /// WARNING: APPEND-ONLY.\n enum StorageId {\n Proxy,\n SimpleFunctionRegistry,\n Ownable,\n TokenSpender,\n TransformERC20,\n MetaTransactions,\n ReentrancyGuard,\n NativeOrders\n }\n\n /// @dev Get the storage slot given a storage ID. We assign unique, well-spaced\n /// slots to storage bucket variables to ensure they do not overlap.\n /// See: https://solidity.readthedocs.io/en/v0.6.6/assembly.html#access-to-external-variables-functions-and-libraries\n /// @param storageId An entry in `StorageId`\n /// @return slot The storage slot.\n function getStorageSlot(StorageId storageId)\n internal\n pure\n returns (uint256 slot)\n {\n // This should never overflow with a reasonable `STORAGE_SLOT_EXP`\n // because Solidity will do a range check on `storageId` during the cast.\n return (uint256(storageId) + 1) << STORAGE_SLOT_EXP;\n }\n}\n",
|
|
"../external/IFlashWallet.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/interfaces/IOwnableV06.sol\";\n\n\n/// @dev A contract that can execute arbitrary calls from its owner.\ninterface IFlashWallet {\n\n /// @dev Execute an arbitrary call. Only an authority can call this.\n /// @param target The call target.\n /// @param callData The call data.\n /// @param value Ether to attach to the call.\n /// @return resultData The data returned by the call.\n function executeCall(\n address payable target,\n bytes calldata callData,\n uint256 value\n )\n external\n payable\n returns (bytes memory resultData);\n\n /// @dev Execute an arbitrary delegatecall, in the context of this puppet.\n /// Only an authority can call this.\n /// @param target The call target.\n /// @param callData The call data.\n /// @return resultData The data returned by the call.\n function executeDelegateCall(\n address payable target,\n bytes calldata callData\n )\n external\n payable\n returns (bytes memory resultData);\n\n /// @dev Allows the puppet to receive ETH.\n receive() external payable;\n\n /// @dev Fetch the immutable owner/deployer of this contract.\n /// @return owner_ The immutable owner/deployer/\n function owner() external view returns (address owner_);\n}\n",
|
|
"../fixins/FixinTokenSpender.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-erc20/contracts/src/v06/IEtherTokenV06.sol\";\nimport \"@0x/contracts-utils/contracts/src/v06/LibSafeMathV06.sol\";\nimport \"../features/interfaces/ITokenSpenderFeature.sol\";\nimport \"../errors/LibSpenderRichErrors.sol\";\nimport \"../external/FeeCollector.sol\";\nimport \"../vendor/v3/IStaking.sol\";\nimport \"../vendor/v3/IStaking.sol\";\n\n\n/// @dev Helpers for moving tokens around.\nabstract contract FixinTokenSpender {\n using LibRichErrorsV06 for bytes;\n\n // Mask of the lower 20 bytes of a bytes32.\n uint256 constant private ADDRESS_MASK = 0x000000000000000000000000ffffffffffffffffffffffffffffffffffffffff;\n /// @dev A bloom filter for tokens that consume all gas when `transferFrom()` fails.\n bytes32 public immutable GREEDY_TOKENS_BLOOM_FILTER;\n\n /// @param greedyTokensBloomFilter The bloom filter for all greedy tokens.\n constructor(bytes32 greedyTokensBloomFilter)\n internal\n {\n GREEDY_TOKENS_BLOOM_FILTER = greedyTokensBloomFilter;\n }\n\n /// @dev Transfers ERC20 tokens from `owner` to `to`.\n /// @param token The token to spend.\n /// @param owner The owner of the tokens.\n /// @param to The recipient of the tokens.\n /// @param amount The amount of `token` to transfer.\n function _transferERC20Tokens(\n IERC20TokenV06 token,\n address owner,\n address to,\n uint256 amount\n )\n internal\n {\n bool success;\n bytes memory revertData;\n\n require(address(token) != address(this), \"FixinTokenSpender/CANNOT_INVOKE_SELF\");\n\n // If the token eats all gas when failing, we do not want to perform\n // optimistic fall through to the old AllowanceTarget contract if the\n // direct transferFrom() fails.\n if (_isTokenPossiblyGreedy(token)) {\n // If the token does not have a direct allowance on us then we use\n // the allowance target.\n if (token.allowance(owner, address(this)) < amount) {\n _transferFromLegacyAllowanceTarget(\n token,\n owner,\n to,\n amount,\n \"\"\n );\n return;\n }\n }\n\n assembly {\n let ptr := mload(0x40) // free memory pointer\n\n // selector for transferFrom(address,address,uint256)\n mstore(ptr, 0x23b872dd00000000000000000000000000000000000000000000000000000000)\n mstore(add(ptr, 0x04), and(owner, ADDRESS_MASK))\n mstore(add(ptr, 0x24), and(to, ADDRESS_MASK))\n mstore(add(ptr, 0x44), amount)\n\n success := call(\n gas(),\n and(token, ADDRESS_MASK),\n 0,\n ptr,\n 0x64,\n 0,\n 0\n )\n\n let rdsize := returndatasize()\n\n returndatacopy(add(ptr, 0x20), 0, rdsize) // reuse memory\n\n // Check for ERC20 success. ERC20 tokens should return a boolean,\n // but some don't. We accept 0-length return data as success, or at\n // least 32 bytes that starts with a 32-byte boolean true.\n success := and(\n success, // call itself succeeded\n or(\n iszero(rdsize), // no return data, or\n and(\n iszero(lt(rdsize, 32)), // at least 32 bytes\n eq(mload(add(ptr, 0x20)), 1) // starts with uint256(1)\n )\n )\n )\n\n if iszero(success) {\n // revertData is a bytes, so length-prefixed data\n mstore(ptr, rdsize)\n revertData := ptr\n\n // update free memory pointer (ptr + 32-byte length + return data)\n mstore(0x40, add(add(ptr, 0x20), rdsize))\n }\n }\n\n if (!success) {\n _transferFromLegacyAllowanceTarget(\n token,\n owner,\n to,\n amount,\n revertData\n );\n }\n }\n\n /// @dev Gets the maximum amount of an ERC20 token `token` that can be\n /// pulled from `owner` by this address.\n /// @param token The token to spend.\n /// @param owner The owner of the tokens.\n /// @return amount The amount of tokens that can be pulled.\n function _getSpendableERC20BalanceOf(\n IERC20TokenV06 token,\n address owner\n )\n internal\n view\n returns (uint256)\n {\n return LibSafeMathV06.min256(\n token.allowance(owner, address(this)),\n token.balanceOf(owner)\n );\n }\n\n /// @dev Check if a token possibly belongs to the `GREEDY_TOKENS_BLOOM_FILTER`\n /// bloom filter.\n function _isTokenPossiblyGreedy(IERC20TokenV06 token)\n internal\n view\n returns (bool isPossiblyGreedy)\n {\n // The hash is given by:\n // (1 << (keccak256(token) % 256)) | (1 << (token % 256))\n bytes32 h;\n assembly {\n mstore(0, token)\n h := or(shl(mod(keccak256(0, 32), 256), 1), shl(mod(token, 256), 1))\n }\n return (h & GREEDY_TOKENS_BLOOM_FILTER) == h;\n }\n\n /// @dev Transfer tokens using the legacy allowance target instead of\n /// allowances directly set on the exchange proxy.\n function _transferFromLegacyAllowanceTarget(\n IERC20TokenV06 token,\n address owner,\n address to,\n uint256 amount,\n bytes memory initialRevertData\n )\n private\n {\n // Try the old AllowanceTarget.\n try ITokenSpenderFeature(address(this))._spendERC20Tokens(\n token,\n owner,\n to,\n amount\n ) {\n } catch (bytes memory revertData) {\n // Bubble up the first error message. (In general, the fallback to the\n // allowance target is opportunistic. We ignore the specific error\n // message if it fails.)\n LibSpenderRichErrors.SpenderERC20TransferFromFailedError(\n address(token),\n owner,\n to,\n amount,\n initialRevertData.length != 0 ? initialRevertData : revertData\n ).rrevert();\n }\n }\n}\n",
|
|
"@0x/contracts-erc20/contracts/src/v06/IEtherTokenV06.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\nimport \"./IERC20TokenV06.sol\";\n\n\ninterface IEtherTokenV06 is\n IERC20TokenV06\n{\n /// @dev Wrap ether.\n function deposit() external payable;\n\n /// @dev Unwrap ether.\n function withdraw(uint256 amount) external;\n}\n",
|
|
"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\ninterface IERC20TokenV06 {\n\n // solhint-disable no-simple-event-func-name\n event Transfer(\n address indexed from,\n address indexed to,\n uint256 value\n );\n\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n\n /// @dev send `value` token to `to` from `msg.sender`\n /// @param to The address of the recipient\n /// @param value The amount of token to be transferred\n /// @return True if transfer was successful\n function transfer(address to, uint256 value)\n external\n returns (bool);\n\n /// @dev send `value` token to `to` from `from` on the condition it is approved by `from`\n /// @param from The address of the sender\n /// @param to The address of the recipient\n /// @param value The amount of token to be transferred\n /// @return True if transfer was successful\n function transferFrom(\n address from,\n address to,\n uint256 value\n )\n external\n returns (bool);\n\n /// @dev `msg.sender` approves `spender` to spend `value` tokens\n /// @param spender The address of the account able to transfer the tokens\n /// @param value The amount of wei to be approved for transfer\n /// @return Always true if the call has enough gas to complete execution\n function approve(address spender, uint256 value)\n external\n returns (bool);\n\n /// @dev Query total supply of token\n /// @return Total supply of token\n function totalSupply()\n external\n view\n returns (uint256);\n\n /// @dev Get the balance of `owner`.\n /// @param owner The address from which the balance will be retrieved\n /// @return Balance of owner\n function balanceOf(address owner)\n external\n view\n returns (uint256);\n\n /// @dev Get the allowance for `spender` to spend from `owner`.\n /// @param owner The address of the account owning tokens\n /// @param spender The address of the account able to transfer the tokens\n /// @return Amount of remaining tokens allowed to spent\n function allowance(address owner, address spender)\n external\n view\n returns (uint256);\n\n /// @dev Get the number of decimals this token has.\n function decimals()\n external\n view\n returns (uint8);\n}\n",
|
|
"./interfaces/ITokenSpenderFeature.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol\";\n\n\n/// @dev Feature that allows spending token allowances.\ninterface ITokenSpenderFeature {\n\n /// @dev Transfers ERC20 tokens from `owner` to `to`.\n /// Only callable from within.\n /// @param token The token to spend.\n /// @param owner The owner of the tokens.\n /// @param to The recipient of the tokens.\n /// @param amount The amount of `token` to transfer.\n function _spendERC20Tokens(\n IERC20TokenV06 token,\n address owner,\n address to,\n uint256 amount\n )\n external;\n\n /// @dev Gets the maximum amount of an ERC20 token `token` that can be\n /// pulled from `owner`.\n /// @param token The token to spend.\n /// @param owner The owner of the tokens.\n /// @return amount The amount of tokens that can be pulled.\n function getSpendableERC20BalanceOf(IERC20TokenV06 token, address owner)\n external\n view\n returns (uint256 amount);\n\n /// @dev Get the address of the allowance target.\n /// @return target The target of token allowances.\n function getAllowanceTarget() external view returns (address target);\n}\n",
|
|
"../errors/LibSpenderRichErrors.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibSpenderRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function SpenderERC20TransferFromFailedError(\n address token,\n address owner,\n address to,\n uint256 amount,\n bytes memory errorData\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"SpenderERC20TransferFromFailedError(address,address,address,uint256,bytes)\")),\n token,\n owner,\n to,\n amount,\n errorData\n );\n }\n}\n",
|
|
"../external/FeeCollector.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-erc20/contracts/src/v06/IEtherTokenV06.sol\";\nimport \"@0x/contracts-utils/contracts/src/v06/AuthorizableV06.sol\";\nimport \"../vendor/v3/IStaking.sol\";\n\n/// @dev The collector contract for protocol fees\ncontract FeeCollector is AuthorizableV06 {\n /// @dev Allow ether transfers to the collector.\n receive() external payable { }\n\n constructor() public {\n _addAuthorizedAddress(msg.sender);\n }\n\n /// @dev Approve the staking contract and join a pool. Only an authority\n /// can call this.\n /// @param weth The WETH contract.\n /// @param staking The staking contract.\n /// @param poolId The pool ID this contract is collecting fees for.\n function initialize(\n IEtherTokenV06 weth,\n IStaking staking,\n bytes32 poolId\n )\n external\n onlyAuthorized\n {\n weth.approve(address(staking), type(uint256).max);\n staking.joinStakingPoolAsMaker(poolId);\n }\n\n /// @dev Convert all held ether to WETH. Only an authority can call this.\n /// @param weth The WETH contract.\n function convertToWeth(\n IEtherTokenV06 weth\n )\n external\n onlyAuthorized\n {\n if (address(this).balance > 0) {\n weth.deposit{value: address(this).balance}();\n }\n }\n}\n",
|
|
"@0x/contracts-utils/contracts/src/v06/AuthorizableV06.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\nimport \"./interfaces/IAuthorizableV06.sol\";\nimport \"./errors/LibRichErrorsV06.sol\";\nimport \"./errors/LibAuthorizableRichErrorsV06.sol\";\nimport \"./OwnableV06.sol\";\n\n\n// solhint-disable no-empty-blocks\ncontract AuthorizableV06 is\n OwnableV06,\n IAuthorizableV06\n{\n /// @dev Only authorized addresses can invoke functions with this modifier.\n modifier onlyAuthorized {\n _assertSenderIsAuthorized();\n _;\n }\n\n // @dev Whether an address is authorized to call privileged functions.\n // @param 0 Address to query.\n // @return 0 Whether the address is authorized.\n mapping (address => bool) public override authorized;\n // @dev Whether an address is authorized to call privileged functions.\n // @param 0 Index of authorized address.\n // @return 0 Authorized address.\n address[] public override authorities;\n\n /// @dev Initializes the `owner` address.\n constructor()\n public\n OwnableV06()\n {}\n\n /// @dev Authorizes an address.\n /// @param target Address to authorize.\n function addAuthorizedAddress(address target)\n external\n override\n onlyOwner\n {\n _addAuthorizedAddress(target);\n }\n\n /// @dev Removes authorizion of an address.\n /// @param target Address to remove authorization from.\n function removeAuthorizedAddress(address target)\n external\n override\n onlyOwner\n {\n if (!authorized[target]) {\n LibRichErrorsV06.rrevert(LibAuthorizableRichErrorsV06.TargetNotAuthorizedError(target));\n }\n for (uint256 i = 0; i < authorities.length; i++) {\n if (authorities[i] == target) {\n _removeAuthorizedAddressAtIndex(target, i);\n break;\n }\n }\n }\n\n /// @dev Removes authorizion of an address.\n /// @param target Address to remove authorization from.\n /// @param index Index of target in authorities array.\n function removeAuthorizedAddressAtIndex(\n address target,\n uint256 index\n )\n external\n override\n onlyOwner\n {\n _removeAuthorizedAddressAtIndex(target, index);\n }\n\n /// @dev Gets all authorized addresses.\n /// @return Array of authorized addresses.\n function getAuthorizedAddresses()\n external\n override\n view\n returns (address[] memory)\n {\n return authorities;\n }\n\n /// @dev Reverts if msg.sender is not authorized.\n function _assertSenderIsAuthorized()\n internal\n view\n {\n if (!authorized[msg.sender]) {\n LibRichErrorsV06.rrevert(LibAuthorizableRichErrorsV06.SenderNotAuthorizedError(msg.sender));\n }\n }\n\n /// @dev Authorizes an address.\n /// @param target Address to authorize.\n function _addAuthorizedAddress(address target)\n internal\n {\n // Ensure that the target is not the zero address.\n if (target == address(0)) {\n LibRichErrorsV06.rrevert(LibAuthorizableRichErrorsV06.ZeroCantBeAuthorizedError());\n }\n\n // Ensure that the target is not already authorized.\n if (authorized[target]) {\n LibRichErrorsV06.rrevert(LibAuthorizableRichErrorsV06.TargetAlreadyAuthorizedError(target));\n }\n\n authorized[target] = true;\n authorities.push(target);\n emit AuthorizedAddressAdded(target, msg.sender);\n }\n\n /// @dev Removes authorizion of an address.\n /// @param target Address to remove authorization from.\n /// @param index Index of target in authorities array.\n function _removeAuthorizedAddressAtIndex(\n address target,\n uint256 index\n )\n internal\n {\n if (!authorized[target]) {\n LibRichErrorsV06.rrevert(LibAuthorizableRichErrorsV06.TargetNotAuthorizedError(target));\n }\n if (index >= authorities.length) {\n LibRichErrorsV06.rrevert(LibAuthorizableRichErrorsV06.IndexOutOfBoundsError(\n index,\n authorities.length\n ));\n }\n if (authorities[index] != target) {\n LibRichErrorsV06.rrevert(LibAuthorizableRichErrorsV06.AuthorizedAddressMismatchError(\n authorities[index],\n target\n ));\n }\n\n delete authorized[target];\n authorities[index] = authorities[authorities.length - 1];\n authorities.pop();\n emit AuthorizedAddressRemoved(target, msg.sender);\n }\n}\n",
|
|
"@0x/contracts-utils/contracts/src/v06/interfaces/IAuthorizableV06.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\nimport \"./IOwnableV06.sol\";\n\n\ninterface IAuthorizableV06 is\n IOwnableV06\n{\n // Event logged when a new address is authorized.\n event AuthorizedAddressAdded(\n address indexed target,\n address indexed caller\n );\n\n // Event logged when a currently authorized address is unauthorized.\n event AuthorizedAddressRemoved(\n address indexed target,\n address indexed caller\n );\n\n /// @dev Authorizes an address.\n /// @param target Address to authorize.\n function addAuthorizedAddress(address target)\n external;\n\n /// @dev Removes authorizion of an address.\n /// @param target Address to remove authorization from.\n function removeAuthorizedAddress(address target)\n external;\n\n /// @dev Removes authorizion of an address.\n /// @param target Address to remove authorization from.\n /// @param index Index of target in authorities array.\n function removeAuthorizedAddressAtIndex(\n address target,\n uint256 index\n )\n external;\n\n /// @dev Gets all authorized addresses.\n /// @return authorizedAddresses Array of authorized addresses.\n function getAuthorizedAddresses()\n external\n view\n returns (address[] memory authorizedAddresses);\n\n /// @dev Whether an adderss is authorized to call privileged functions.\n /// @param addr Address to query.\n /// @return isAuthorized Whether the address is authorized.\n function authorized(address addr) external view returns (bool isAuthorized);\n\n /// @dev All addresseses authorized to call privileged functions.\n /// @param idx Index of authorized address.\n /// @return addr Authorized address.\n function authorities(uint256 idx) external view returns (address addr);\n\n}\n",
|
|
"@0x/contracts-utils/contracts/src/v06/IOwnableV06.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\ninterface IOwnableV06 {\n\n /// @dev Emitted by Ownable when ownership is transferred.\n /// @param previousOwner The previous owner of the contract.\n /// @param newOwner The new owner of the contract.\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /// @dev Transfers ownership of the contract to a new address.\n /// @param newOwner The address that will become the owner.\n function transferOwnership(address newOwner) external;\n\n /// @dev The owner of this contract.\n /// @return ownerAddress The owner address.\n function owner() external view returns (address ownerAddress);\n}\n",
|
|
"@0x/contracts-utils/contracts/src/v06/errors/LibAuthorizableRichErrorsV06.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibAuthorizableRichErrorsV06 {\n\n // bytes4(keccak256(\"AuthorizedAddressMismatchError(address,address)\"))\n bytes4 internal constant AUTHORIZED_ADDRESS_MISMATCH_ERROR_SELECTOR =\n 0x140a84db;\n\n // bytes4(keccak256(\"IndexOutOfBoundsError(uint256,uint256)\"))\n bytes4 internal constant INDEX_OUT_OF_BOUNDS_ERROR_SELECTOR =\n 0xe9f83771;\n\n // bytes4(keccak256(\"SenderNotAuthorizedError(address)\"))\n bytes4 internal constant SENDER_NOT_AUTHORIZED_ERROR_SELECTOR =\n 0xb65a25b9;\n\n // bytes4(keccak256(\"TargetAlreadyAuthorizedError(address)\"))\n bytes4 internal constant TARGET_ALREADY_AUTHORIZED_ERROR_SELECTOR =\n 0xde16f1a0;\n\n // bytes4(keccak256(\"TargetNotAuthorizedError(address)\"))\n bytes4 internal constant TARGET_NOT_AUTHORIZED_ERROR_SELECTOR =\n 0xeb5108a2;\n\n // bytes4(keccak256(\"ZeroCantBeAuthorizedError()\"))\n bytes internal constant ZERO_CANT_BE_AUTHORIZED_ERROR_BYTES =\n hex\"57654fe4\";\n\n // solhint-disable func-name-mixedcase\n function AuthorizedAddressMismatchError(\n address authorized,\n address target\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n AUTHORIZED_ADDRESS_MISMATCH_ERROR_SELECTOR,\n authorized,\n target\n );\n }\n\n function IndexOutOfBoundsError(\n uint256 index,\n uint256 length\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n INDEX_OUT_OF_BOUNDS_ERROR_SELECTOR,\n index,\n length\n );\n }\n\n function SenderNotAuthorizedError(address sender)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n SENDER_NOT_AUTHORIZED_ERROR_SELECTOR,\n sender\n );\n }\n\n function TargetAlreadyAuthorizedError(address target)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n TARGET_ALREADY_AUTHORIZED_ERROR_SELECTOR,\n target\n );\n }\n\n function TargetNotAuthorizedError(address target)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n TARGET_NOT_AUTHORIZED_ERROR_SELECTOR,\n target\n );\n }\n\n function ZeroCantBeAuthorizedError()\n internal\n pure\n returns (bytes memory)\n {\n return ZERO_CANT_BE_AUTHORIZED_ERROR_BYTES;\n }\n}\n",
|
|
"@0x/contracts-utils/contracts/src/v06/OwnableV06.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2019 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\nimport \"./interfaces/IOwnableV06.sol\";\nimport \"./errors/LibRichErrorsV06.sol\";\nimport \"./errors/LibOwnableRichErrorsV06.sol\";\n\n\ncontract OwnableV06 is\n IOwnableV06\n{\n /// @dev The owner of this contract.\n /// @return 0 The owner address.\n address public override owner;\n\n constructor() public {\n owner = msg.sender;\n }\n\n modifier onlyOwner() {\n _assertSenderIsOwner();\n _;\n }\n\n /// @dev Change the owner of this contract.\n /// @param newOwner New owner address.\n function transferOwnership(address newOwner)\n public\n override\n onlyOwner\n {\n if (newOwner == address(0)) {\n LibRichErrorsV06.rrevert(LibOwnableRichErrorsV06.TransferOwnerToZeroError());\n } else {\n owner = newOwner;\n emit OwnershipTransferred(msg.sender, newOwner);\n }\n }\n\n function _assertSenderIsOwner()\n internal\n view\n {\n if (msg.sender != owner) {\n LibRichErrorsV06.rrevert(LibOwnableRichErrorsV06.OnlyOwnerError(\n msg.sender,\n owner\n ));\n }\n }\n}\n",
|
|
"@0x/contracts-utils/contracts/src/v06/errors/LibOwnableRichErrorsV06.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\npragma solidity ^0.6.5;\n\n\nlibrary LibOwnableRichErrorsV06 {\n\n // bytes4(keccak256(\"OnlyOwnerError(address,address)\"))\n bytes4 internal constant ONLY_OWNER_ERROR_SELECTOR =\n 0x1de45ad1;\n\n // bytes4(keccak256(\"TransferOwnerToZeroError()\"))\n bytes internal constant TRANSFER_OWNER_TO_ZERO_ERROR_BYTES =\n hex\"e69edc3e\";\n\n // solhint-disable func-name-mixedcase\n function OnlyOwnerError(\n address sender,\n address owner\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n ONLY_OWNER_ERROR_SELECTOR,\n sender,\n owner\n );\n }\n\n function TransferOwnerToZeroError()\n internal\n pure\n returns (bytes memory)\n {\n return TRANSFER_OWNER_TO_ZERO_ERROR_BYTES;\n }\n}\n",
|
|
"../vendor/v3/IStaking.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\ninterface IStaking {\n function joinStakingPoolAsMaker(bytes32) external;\n function payProtocolFee(address, address, uint256) external payable;\n}\n",
|
|
"../fixins/FixinEIP712.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"../errors/LibCommonRichErrors.sol\";\nimport \"../errors/LibOwnableRichErrors.sol\";\n\n\n/// @dev EIP712 helpers for features.\nabstract contract FixinEIP712 {\n\n /// @dev The domain hash separator for the entire exchange proxy.\n bytes32 public immutable EIP712_DOMAIN_SEPARATOR;\n\n constructor(address zeroExAddress) internal {\n // Compute `EIP712_DOMAIN_SEPARATOR`\n {\n uint256 chainId;\n assembly { chainId := chainid() }\n EIP712_DOMAIN_SEPARATOR = keccak256(\n abi.encode(\n keccak256(\n \"EIP712Domain(\"\n \"string name,\"\n \"string version,\"\n \"uint256 chainId,\"\n \"address verifyingContract\"\n \")\"\n ),\n keccak256(\"ZeroEx\"),\n keccak256(\"1.0.0\"),\n chainId,\n zeroExAddress\n )\n );\n }\n }\n\n function _getEIP712Hash(bytes32 structHash)\n internal\n view\n returns (bytes32 eip712Hash)\n {\n return keccak256(abi.encodePacked(\n hex\"1901\",\n EIP712_DOMAIN_SEPARATOR,\n structHash\n ));\n }\n}\n",
|
|
"../migrations/LibMigrate.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"../errors/LibOwnableRichErrors.sol\";\n\n\nlibrary LibMigrate {\n\n /// @dev Magic bytes returned by a migrator to indicate success.\n /// This is `keccack('MIGRATE_SUCCESS')`.\n bytes4 internal constant MIGRATE_SUCCESS = 0x2c64c5ef;\n\n using LibRichErrorsV06 for bytes;\n\n /// @dev Perform a delegatecall and ensure it returns the magic bytes.\n /// @param target The call target.\n /// @param data The call data.\n function delegatecallMigrateFunction(\n address target,\n bytes memory data\n )\n internal\n {\n (bool success, bytes memory resultData) = target.delegatecall(data);\n if (!success ||\n resultData.length != 32 ||\n abi.decode(resultData, (bytes4)) != MIGRATE_SUCCESS)\n {\n LibOwnableRichErrors.MigrateCallFailedError(target, resultData).rrevert();\n }\n }\n}\n",
|
|
"../storage/LibMetaTransactionsStorage.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"./LibStorage.sol\";\n\n\n/// @dev Storage helpers for the `MetaTransactions` feature.\nlibrary LibMetaTransactionsStorage {\n\n /// @dev Storage bucket for this feature.\n struct Storage {\n // The block number when a hash was executed.\n mapping (bytes32 => uint256) mtxHashToExecutedBlockNumber;\n }\n\n /// @dev Get the storage bucket for this contract.\n function getStorage() internal pure returns (Storage storage stor) {\n uint256 storageSlot = LibStorage.getStorageSlot(\n LibStorage.StorageId.MetaTransactions\n );\n // Dip into assembly to change the slot pointed to by the local\n // variable `stor`.\n // See https://solidity.readthedocs.io/en/v0.6.8/assembly.html?highlight=slot#access-to-external-variables-functions-and-libraries\n assembly { stor_slot := storageSlot }\n }\n}\n",
|
|
"./interfaces/IFeature.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\n\n/// @dev Basic interface for a feature contract.\ninterface IFeature {\n\n // solhint-disable func-name-mixedcase\n\n /// @dev The name of this feature set.\n function FEATURE_NAME() external view returns (string memory name);\n\n /// @dev The version of this feature set.\n function FEATURE_VERSION() external view returns (uint256 version);\n}\n",
|
|
"./interfaces/IMetaTransactionsFeature.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol\";\nimport \"../libs/LibSignature.sol\";\n\n/// @dev Meta-transactions feature.\ninterface IMetaTransactionsFeature {\n /// @dev Describes an exchange proxy meta transaction.\n struct MetaTransactionData {\n // Signer of meta-transaction. On whose behalf to execute the MTX.\n address payable signer;\n // Required sender, or NULL for anyone.\n address sender;\n // Minimum gas price.\n uint256 minGasPrice;\n // Maximum gas price.\n uint256 maxGasPrice;\n // MTX is invalid after this time.\n uint256 expirationTimeSeconds;\n // Nonce to make this MTX unique.\n uint256 salt;\n // Encoded call data to a function on the exchange proxy.\n bytes callData;\n // Amount of ETH to attach to the call.\n uint256 value;\n // ERC20 fee `signer` pays `sender`.\n IERC20TokenV06 feeToken;\n // ERC20 fee amount.\n uint256 feeAmount;\n }\n\n /// @dev Emitted whenever a meta-transaction is executed via\n /// `executeMetaTransaction()` or `executeMetaTransactions()`.\n /// @param hash The meta-transaction hash.\n /// @param selector The selector of the function being executed.\n /// @param signer Who to execute the meta-transaction on behalf of.\n /// @param sender Who executed the meta-transaction.\n event MetaTransactionExecuted(\n bytes32 hash,\n bytes4 indexed selector,\n address signer,\n address sender\n );\n\n /// @dev Execute a single meta-transaction.\n /// @param mtx The meta-transaction.\n /// @param signature The signature by `mtx.signer`.\n /// @return returnResult The ABI-encoded result of the underlying call.\n function executeMetaTransaction(\n MetaTransactionData calldata mtx,\n LibSignature.Signature calldata signature\n )\n external\n payable\n returns (bytes memory returnResult);\n\n /// @dev Execute multiple meta-transactions.\n /// @param mtxs The meta-transactions.\n /// @param signatures The signature by each respective `mtx.signer`.\n /// @return returnResults The ABI-encoded results of the underlying calls.\n function batchExecuteMetaTransactions(\n MetaTransactionData[] calldata mtxs,\n LibSignature.Signature[] calldata signatures\n )\n external\n payable\n returns (bytes[] memory returnResults);\n\n /// @dev Get the block at which a meta-transaction has been executed.\n /// @param mtx The meta-transaction.\n /// @return blockNumber The block height when the meta-transactioin was executed.\n function getMetaTransactionExecutedBlock(MetaTransactionData calldata mtx)\n external\n view\n returns (uint256 blockNumber);\n\n /// @dev Get the block at which a meta-transaction hash has been executed.\n /// @param mtxHash The meta-transaction hash.\n /// @return blockNumber The block height when the meta-transactioin was executed.\n function getMetaTransactionHashExecutedBlock(bytes32 mtxHash)\n external\n view\n returns (uint256 blockNumber);\n\n /// @dev Get the EIP712 hash of a meta-transaction.\n /// @param mtx The meta-transaction.\n /// @return mtxHash The EIP712 hash of `mtx`.\n function getMetaTransactionHash(MetaTransactionData calldata mtx)\n external\n view\n returns (bytes32 mtxHash);\n}\n",
|
|
"./libs/LibSignature.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"../../errors/LibSignatureRichErrors.sol\";\n\n\n/// @dev A library for validating signatures.\nlibrary LibSignature {\n using LibRichErrorsV06 for bytes;\n\n // '\\x19Ethereum Signed Message:\\n32\\x00\\x00\\x00\\x00' in a word.\n uint256 private constant ETH_SIGN_HASH_PREFIX =\n 0x19457468657265756d205369676e6564204d6573736167653a0a333200000000;\n /// @dev Exclusive upper limit on ECDSA signatures 'R' values.\n /// The valid range is given by fig (282) of the yellow paper.\n uint256 private constant ECDSA_SIGNATURE_R_LIMIT =\n uint256(0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141);\n /// @dev Exclusive upper limit on ECDSA signatures 'S' values.\n /// The valid range is given by fig (283) of the yellow paper.\n uint256 private constant ECDSA_SIGNATURE_S_LIMIT = ECDSA_SIGNATURE_R_LIMIT / 2 + 1;\n\n /// @dev Allowed signature types.\n enum SignatureType {\n ILLEGAL,\n INVALID,\n EIP712,\n ETHSIGN\n }\n\n /// @dev Encoded EC signature.\n struct Signature {\n // How to validate the signature.\n SignatureType signatureType;\n // EC Signature data.\n uint8 v;\n // EC Signature data.\n bytes32 r;\n // EC Signature data.\n bytes32 s;\n }\n\n /// @dev Retrieve the signer of a signature.\n /// Throws if the signature can't be validated.\n /// @param hash The hash that was signed.\n /// @param signature The signature.\n /// @return recovered The recovered signer address.\n function getSignerOfHash(\n bytes32 hash,\n Signature memory signature\n )\n internal\n pure\n returns (address recovered)\n {\n // Ensure this is a signature type that can be validated against a hash.\n _validateHashCompatibleSignature(hash, signature);\n\n if (signature.signatureType == SignatureType.EIP712) {\n // Signed using EIP712\n recovered = ecrecover(\n hash,\n signature.v,\n signature.r,\n signature.s\n );\n } else if (signature.signatureType == SignatureType.ETHSIGN) {\n // Signed using `eth_sign`\n // Need to hash `hash` with \"\\x19Ethereum Signed Message:\\n32\" prefix\n // in packed encoding.\n bytes32 ethSignHash;\n assembly {\n // Use scratch space\n mstore(0, ETH_SIGN_HASH_PREFIX) // length of 28 bytes\n mstore(28, hash) // length of 32 bytes\n ethSignHash := keccak256(0, 60)\n }\n recovered = ecrecover(\n ethSignHash,\n signature.v,\n signature.r,\n signature.s\n );\n }\n // `recovered` can be null if the signature values are out of range.\n if (recovered == address(0)) {\n LibSignatureRichErrors.SignatureValidationError(\n LibSignatureRichErrors.SignatureValidationErrorCodes.BAD_SIGNATURE_DATA,\n hash\n ).rrevert();\n }\n }\n\n /// @dev Validates that a signature is compatible with a hash signee.\n /// @param hash The hash that was signed.\n /// @param signature The signature.\n function _validateHashCompatibleSignature(\n bytes32 hash,\n Signature memory signature\n )\n private\n pure\n {\n // Ensure the r and s are within malleability limits.\n if (uint256(signature.r) >= ECDSA_SIGNATURE_R_LIMIT ||\n uint256(signature.s) >= ECDSA_SIGNATURE_S_LIMIT)\n {\n LibSignatureRichErrors.SignatureValidationError(\n LibSignatureRichErrors.SignatureValidationErrorCodes.BAD_SIGNATURE_DATA,\n hash\n ).rrevert();\n }\n\n // Always illegal signature.\n if (signature.signatureType == SignatureType.ILLEGAL) {\n LibSignatureRichErrors.SignatureValidationError(\n LibSignatureRichErrors.SignatureValidationErrorCodes.ILLEGAL,\n hash\n ).rrevert();\n }\n\n // Always invalid.\n if (signature.signatureType == SignatureType.INVALID) {\n LibSignatureRichErrors.SignatureValidationError(\n LibSignatureRichErrors.SignatureValidationErrorCodes.ALWAYS_INVALID,\n hash\n ).rrevert();\n }\n\n // Solidity should check that the signature type is within enum range for us\n // when abi-decoding.\n }\n}\n",
|
|
"../errors/LibSignatureRichErrors.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibSignatureRichErrors {\n\n enum SignatureValidationErrorCodes {\n ALWAYS_INVALID,\n INVALID_LENGTH,\n UNSUPPORTED,\n ILLEGAL,\n WRONG_SIGNER,\n BAD_SIGNATURE_DATA\n }\n\n // solhint-disable func-name-mixedcase\n\n function SignatureValidationError(\n SignatureValidationErrorCodes code,\n bytes32 hash,\n address signerAddress,\n bytes memory signature\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"SignatureValidationError(uint8,bytes32,address,bytes)\")),\n code,\n hash,\n signerAddress,\n signature\n );\n }\n\n function SignatureValidationError(\n SignatureValidationErrorCodes code,\n bytes32 hash\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"SignatureValidationError(uint8,bytes32)\")),\n code,\n hash\n );\n }\n}\n",
|
|
"./interfaces/INativeOrdersFeature.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol\";\nimport \"../libs/LibSignature.sol\";\nimport \"../libs/LibNativeOrder.sol\";\nimport \"./INativeOrdersEvents.sol\";\n\n\n/// @dev Feature for interacting with limit orders.\ninterface INativeOrdersFeature is\n INativeOrdersEvents\n{\n\n /// @dev Transfers protocol fees from the `FeeCollector` pools into\n /// the staking contract.\n /// @param poolIds Staking pool IDs\n function transferProtocolFeesForPools(bytes32[] calldata poolIds)\n external;\n\n /// @dev Fill a limit order. The taker and sender will be the caller.\n /// @param order The limit order. ETH protocol fees can be\n /// attached to this call. Any unspent ETH will be refunded to\n /// the caller.\n /// @param signature The order signature.\n /// @param takerTokenFillAmount Maximum taker token amount to fill this order with.\n /// @return takerTokenFilledAmount How much maker token was filled.\n /// @return makerTokenFilledAmount How much maker token was filled.\n function fillLimitOrder(\n LibNativeOrder.LimitOrder calldata order,\n LibSignature.Signature calldata signature,\n uint128 takerTokenFillAmount\n )\n external\n payable\n returns (uint128 takerTokenFilledAmount, uint128 makerTokenFilledAmount);\n\n /// @dev Fill an RFQ order for up to `takerTokenFillAmount` taker tokens.\n /// The taker will be the caller.\n /// @param order The RFQ order.\n /// @param signature The order signature.\n /// @param takerTokenFillAmount Maximum taker token amount to fill this order with.\n /// @return takerTokenFilledAmount How much maker token was filled.\n /// @return makerTokenFilledAmount How much maker token was filled.\n function fillRfqOrder(\n LibNativeOrder.RfqOrder calldata order,\n LibSignature.Signature calldata signature,\n uint128 takerTokenFillAmount\n )\n external\n returns (uint128 takerTokenFilledAmount, uint128 makerTokenFilledAmount);\n\n /// @dev Fill an RFQ order for exactly `takerTokenFillAmount` taker tokens.\n /// The taker will be the caller. ETH protocol fees can be\n /// attached to this call. Any unspent ETH will be refunded to\n /// the caller.\n /// @param order The limit order.\n /// @param signature The order signature.\n /// @param takerTokenFillAmount How much taker token to fill this order with.\n /// @return makerTokenFilledAmount How much maker token was filled.\n function fillOrKillLimitOrder(\n LibNativeOrder.LimitOrder calldata order,\n LibSignature.Signature calldata signature,\n uint128 takerTokenFillAmount\n )\n external\n payable\n returns (uint128 makerTokenFilledAmount);\n\n /// @dev Fill an RFQ order for exactly `takerTokenFillAmount` taker tokens.\n /// The taker will be the caller.\n /// @param order The RFQ order.\n /// @param signature The order signature.\n /// @param takerTokenFillAmount How much taker token to fill this order with.\n /// @return makerTokenFilledAmount How much maker token was filled.\n function fillOrKillRfqOrder(\n LibNativeOrder.RfqOrder calldata order,\n LibSignature.Signature calldata signature,\n uint128 takerTokenFillAmount\n )\n external\n returns (uint128 makerTokenFilledAmount);\n\n /// @dev Fill a limit order. Internal variant. ETH protocol fees can be\n /// attached to this call. Any unspent ETH will be refunded to\n /// `msg.sender` (not `sender`).\n /// @param order The limit order.\n /// @param signature The order signature.\n /// @param takerTokenFillAmount Maximum taker token to fill this order with.\n /// @param taker The order taker.\n /// @param sender The order sender.\n /// @return takerTokenFilledAmount How much maker token was filled.\n /// @return makerTokenFilledAmount How much maker token was filled.\n function _fillLimitOrder(\n LibNativeOrder.LimitOrder calldata order,\n LibSignature.Signature calldata signature,\n uint128 takerTokenFillAmount,\n address taker,\n address sender\n )\n external\n payable\n returns (uint128 takerTokenFilledAmount, uint128 makerTokenFilledAmount);\n\n /// @dev Fill an RFQ order. Internal variant.\n /// @param order The RFQ order.\n /// @param signature The order signature.\n /// @param takerTokenFillAmount Maximum taker token to fill this order with.\n /// @param taker The order taker.\n /// @return takerTokenFilledAmount How much maker token was filled.\n /// @return makerTokenFilledAmount How much maker token was filled.\n function _fillRfqOrder(\n LibNativeOrder.RfqOrder calldata order,\n LibSignature.Signature calldata signature,\n uint128 takerTokenFillAmount,\n address taker\n )\n external\n returns (uint128 takerTokenFilledAmount, uint128 makerTokenFilledAmount);\n\n /// @dev Cancel a single limit order. The caller must be the maker.\n /// Silently succeeds if the order has already been cancelled.\n /// @param order The limit order.\n function cancelLimitOrder(LibNativeOrder.LimitOrder calldata order)\n external;\n\n /// @dev Cancel a single RFQ order. The caller must be the maker.\n /// Silently succeeds if the order has already been cancelled.\n /// @param order The RFQ order.\n function cancelRfqOrder(LibNativeOrder.RfqOrder calldata order)\n external;\n\n /// @dev Mark what tx.origin addresses are allowed to fill an order that\n /// specifies the message sender as its txOrigin.\n /// @param origins An array of origin addresses to update.\n /// @param allowed True to register, false to unregister.\n function registerAllowedRfqOrigins(address[] memory origins, bool allowed)\n external;\n\n /// @dev Cancel multiple limit orders. The caller must be the maker.\n /// Silently succeeds if the order has already been cancelled.\n /// @param orders The limit orders.\n function batchCancelLimitOrders(LibNativeOrder.LimitOrder[] calldata orders)\n external;\n\n /// @dev Cancel multiple RFQ orders. The caller must be the maker.\n /// Silently succeeds if the order has already been cancelled.\n /// @param orders The RFQ orders.\n function batchCancelRfqOrders(LibNativeOrder.RfqOrder[] calldata orders)\n external;\n\n /// @dev Cancel all limit orders for a given maker and pair with a salt less\n /// than the value provided. The caller must be the maker. Subsequent\n /// calls to this function with the same caller and pair require the\n /// new salt to be >= the old salt.\n /// @param makerToken The maker token.\n /// @param takerToken The taker token.\n /// @param minValidSalt The new minimum valid salt.\n function cancelPairLimitOrders(\n IERC20TokenV06 makerToken,\n IERC20TokenV06 takerToken,\n uint256 minValidSalt\n )\n external;\n\n /// @dev Cancel all limit orders for a given maker and pair with a salt less\n /// than the value provided. The caller must be the maker. Subsequent\n /// calls to this function with the same caller and pair require the\n /// new salt to be >= the old salt.\n /// @param makerTokens The maker tokens.\n /// @param takerTokens The taker tokens.\n /// @param minValidSalts The new minimum valid salts.\n function batchCancelPairLimitOrders(\n IERC20TokenV06[] calldata makerTokens,\n IERC20TokenV06[] calldata takerTokens,\n uint256[] calldata minValidSalts\n )\n external;\n\n /// @dev Cancel all RFQ orders for a given maker and pair with a salt less\n /// than the value provided. The caller must be the maker. Subsequent\n /// calls to this function with the same caller and pair require the\n /// new salt to be >= the old salt.\n /// @param makerToken The maker token.\n /// @param takerToken The taker token.\n /// @param minValidSalt The new minimum valid salt.\n function cancelPairRfqOrders(\n IERC20TokenV06 makerToken,\n IERC20TokenV06 takerToken,\n uint256 minValidSalt\n )\n external;\n\n /// @dev Cancel all RFQ orders for a given maker and pair with a salt less\n /// than the value provided. The caller must be the maker. Subsequent\n /// calls to this function with the same caller and pair require the\n /// new salt to be >= the old salt.\n /// @param makerTokens The maker tokens.\n /// @param takerTokens The taker tokens.\n /// @param minValidSalts The new minimum valid salts.\n function batchCancelPairRfqOrders(\n IERC20TokenV06[] calldata makerTokens,\n IERC20TokenV06[] calldata takerTokens,\n uint256[] calldata minValidSalts\n )\n external;\n\n /// @dev Get the order info for a limit order.\n /// @param order The limit order.\n /// @return orderInfo Info about the order.\n function getLimitOrderInfo(LibNativeOrder.LimitOrder calldata order)\n external\n view\n returns (LibNativeOrder.OrderInfo memory orderInfo);\n\n /// @dev Get the order info for an RFQ order.\n /// @param order The RFQ order.\n /// @return orderInfo Info about the order.\n function getRfqOrderInfo(LibNativeOrder.RfqOrder calldata order)\n external\n view\n returns (LibNativeOrder.OrderInfo memory orderInfo);\n\n /// @dev Get the canonical hash of a limit order.\n /// @param order The limit order.\n /// @return orderHash The order hash.\n function getLimitOrderHash(LibNativeOrder.LimitOrder calldata order)\n external\n view\n returns (bytes32 orderHash);\n\n /// @dev Get the canonical hash of an RFQ order.\n /// @param order The RFQ order.\n /// @return orderHash The order hash.\n function getRfqOrderHash(LibNativeOrder.RfqOrder calldata order)\n external\n view\n returns (bytes32 orderHash);\n\n /// @dev Get the protocol fee multiplier. This should be multiplied by the\n /// gas price to arrive at the required protocol fee to fill a native order.\n /// @return multiplier The protocol fee multiplier.\n function getProtocolFeeMultiplier()\n external\n view\n returns (uint32 multiplier);\n\n /// @dev Get order info, fillable amount, and signature validity for a limit order.\n /// Fillable amount is determined using balances and allowances of the maker.\n /// @param order The limit order.\n /// @param signature The order signature.\n /// @return orderInfo Info about the order.\n /// @return actualFillableTakerTokenAmount How much of the order is fillable\n /// based on maker funds, in taker tokens.\n /// @return isSignatureValid Whether the signature is valid.\n function getLimitOrderRelevantState(\n LibNativeOrder.LimitOrder calldata order,\n LibSignature.Signature calldata signature\n )\n external\n view\n returns (\n LibNativeOrder.OrderInfo memory orderInfo,\n uint128 actualFillableTakerTokenAmount,\n bool isSignatureValid\n );\n\n /// @dev Get order info, fillable amount, and signature validity for an RFQ order.\n /// Fillable amount is determined using balances and allowances of the maker.\n /// @param order The RFQ order.\n /// @param signature The order signature.\n /// @return orderInfo Info about the order.\n /// @return actualFillableTakerTokenAmount How much of the order is fillable\n /// based on maker funds, in taker tokens.\n /// @return isSignatureValid Whether the signature is valid.\n function getRfqOrderRelevantState(\n LibNativeOrder.RfqOrder calldata order,\n LibSignature.Signature calldata signature\n )\n external\n view\n returns (\n LibNativeOrder.OrderInfo memory orderInfo,\n uint128 actualFillableTakerTokenAmount,\n bool isSignatureValid\n );\n\n /// @dev Batch version of `getLimitOrderRelevantState()`, without reverting.\n /// Orders that would normally cause `getLimitOrderRelevantState()`\n /// to revert will have empty results.\n /// @param orders The limit orders.\n /// @param signatures The order signatures.\n /// @return orderInfos Info about the orders.\n /// @return actualFillableTakerTokenAmounts How much of each order is fillable\n /// based on maker funds, in taker tokens.\n /// @return isSignatureValids Whether each signature is valid for the order.\n function batchGetLimitOrderRelevantStates(\n LibNativeOrder.LimitOrder[] calldata orders,\n LibSignature.Signature[] calldata signatures\n )\n external\n view\n returns (\n LibNativeOrder.OrderInfo[] memory orderInfos,\n uint128[] memory actualFillableTakerTokenAmounts,\n bool[] memory isSignatureValids\n );\n\n /// @dev Batch version of `getRfqOrderRelevantState()`, without reverting.\n /// Orders that would normally cause `getRfqOrderRelevantState()`\n /// to revert will have empty results.\n /// @param orders The RFQ orders.\n /// @param signatures The order signatures.\n /// @return orderInfos Info about the orders.\n /// @return actualFillableTakerTokenAmounts How much of each order is fillable\n /// based on maker funds, in taker tokens.\n /// @return isSignatureValids Whether each signature is valid for the order.\n function batchGetRfqOrderRelevantStates(\n LibNativeOrder.RfqOrder[] calldata orders,\n LibSignature.Signature[] calldata signatures\n )\n external\n view\n returns (\n LibNativeOrder.OrderInfo[] memory orderInfos,\n uint128[] memory actualFillableTakerTokenAmounts,\n bool[] memory isSignatureValids\n );\n}\n",
|
|
"./libs/LibNativeOrder.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol\";\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"@0x/contracts-utils/contracts/src/v06/LibSafeMathV06.sol\";\nimport \"../../errors/LibNativeOrdersRichErrors.sol\";\n\n\n/// @dev A library for common native order operations.\nlibrary LibNativeOrder {\n using LibSafeMathV06 for uint256;\n using LibRichErrorsV06 for bytes;\n\n enum OrderStatus {\n INVALID,\n FILLABLE,\n FILLED,\n CANCELLED,\n EXPIRED\n }\n\n /// @dev A standard OTC or OO limit order.\n struct LimitOrder {\n IERC20TokenV06 makerToken;\n IERC20TokenV06 takerToken;\n uint128 makerAmount;\n uint128 takerAmount;\n uint128 takerTokenFeeAmount;\n address maker;\n address taker;\n address sender;\n address feeRecipient;\n bytes32 pool;\n uint64 expiry;\n uint256 salt;\n }\n\n /// @dev An RFQ limit order.\n struct RfqOrder {\n IERC20TokenV06 makerToken;\n IERC20TokenV06 takerToken;\n uint128 makerAmount;\n uint128 takerAmount;\n address maker;\n address taker;\n address txOrigin;\n bytes32 pool;\n uint64 expiry;\n uint256 salt;\n }\n\n /// @dev Info on a limit or RFQ order.\n struct OrderInfo {\n bytes32 orderHash;\n OrderStatus status;\n uint128 takerTokenFilledAmount;\n }\n\n uint256 private constant UINT_128_MASK = (1 << 128) - 1;\n uint256 private constant UINT_64_MASK = (1 << 64) - 1;\n uint256 private constant ADDRESS_MASK = (1 << 160) - 1;\n\n // The type hash for limit orders, which is:\n // keccak256(abi.encodePacked(\n // \"LimitOrder(\",\n // \"address makerToken,\",\n // \"address takerToken,\",\n // \"uint128 makerAmount,\",\n // \"uint128 takerAmount,\",\n // \"uint128 takerTokenFeeAmount,\",\n // \"address maker,\",\n // \"address taker,\",\n // \"address sender,\",\n // \"address feeRecipient,\",\n // \"bytes32 pool,\",\n // \"uint64 expiry,\",\n // \"uint256 salt\"\n // \")\"\n // ))\n uint256 private constant _LIMIT_ORDER_TYPEHASH =\n 0xce918627cb55462ddbb85e73de69a8b322f2bc88f4507c52fcad6d4c33c29d49;\n\n // The type hash for RFQ orders, which is:\n // keccak256(abi.encodePacked(\n // \"RfqOrder(\",\n // \"address makerToken,\",\n // \"address takerToken,\",\n // \"uint128 makerAmount,\",\n // \"uint128 takerAmount,\",\n // \"address maker,\",\n // \"address taker,\",\n // \"address txOrigin,\",\n // \"bytes32 pool,\",\n // \"uint64 expiry,\",\n // \"uint256 salt\"\n // \")\"\n // ))\n uint256 private constant _RFQ_ORDER_TYPEHASH =\n 0xe593d3fdfa8b60e5e17a1b2204662ecbe15c23f2084b9ad5bae40359540a7da9;\n\n /// @dev Get the struct hash of a limit order.\n /// @param order The limit order.\n /// @return structHash The struct hash of the order.\n function getLimitOrderStructHash(LimitOrder memory order)\n internal\n pure\n returns (bytes32 structHash)\n {\n // The struct hash is:\n // keccak256(abi.encode(\n // TYPE_HASH,\n // order.makerToken,\n // order.takerToken,\n // order.makerAmount,\n // order.takerAmount,\n // order.takerTokenFeeAmount,\n // order.maker,\n // order.taker,\n // order.sender,\n // order.feeRecipient,\n // order.pool,\n // order.expiry,\n // order.salt,\n // ))\n assembly {\n let mem := mload(0x40)\n mstore(mem, _LIMIT_ORDER_TYPEHASH)\n // order.makerToken;\n mstore(add(mem, 0x20), and(ADDRESS_MASK, mload(order)))\n // order.takerToken;\n mstore(add(mem, 0x40), and(ADDRESS_MASK, mload(add(order, 0x20))))\n // order.makerAmount;\n mstore(add(mem, 0x60), and(UINT_128_MASK, mload(add(order, 0x40))))\n // order.takerAmount;\n mstore(add(mem, 0x80), and(UINT_128_MASK, mload(add(order, 0x60))))\n // order.takerTokenFeeAmount;\n mstore(add(mem, 0xA0), and(UINT_128_MASK, mload(add(order, 0x80))))\n // order.maker;\n mstore(add(mem, 0xC0), and(ADDRESS_MASK, mload(add(order, 0xA0))))\n // order.taker;\n mstore(add(mem, 0xE0), and(ADDRESS_MASK, mload(add(order, 0xC0))))\n // order.sender;\n mstore(add(mem, 0x100), and(ADDRESS_MASK, mload(add(order, 0xE0))))\n // order.feeRecipient;\n mstore(add(mem, 0x120), and(ADDRESS_MASK, mload(add(order, 0x100))))\n // order.pool;\n mstore(add(mem, 0x140), mload(add(order, 0x120)))\n // order.expiry;\n mstore(add(mem, 0x160), and(UINT_64_MASK, mload(add(order, 0x140))))\n // order.salt;\n mstore(add(mem, 0x180), mload(add(order, 0x160)))\n structHash := keccak256(mem, 0x1A0)\n }\n }\n\n /// @dev Get the struct hash of a RFQ order.\n /// @param order The RFQ order.\n /// @return structHash The struct hash of the order.\n function getRfqOrderStructHash(RfqOrder memory order)\n internal\n pure\n returns (bytes32 structHash)\n {\n // The struct hash is:\n // keccak256(abi.encode(\n // TYPE_HASH,\n // order.makerToken,\n // order.takerToken,\n // order.makerAmount,\n // order.takerAmount,\n // order.maker,\n // order.taker,\n // order.txOrigin,\n // order.pool,\n // order.expiry,\n // order.salt,\n // ))\n assembly {\n let mem := mload(0x40)\n mstore(mem, _RFQ_ORDER_TYPEHASH)\n // order.makerToken;\n mstore(add(mem, 0x20), and(ADDRESS_MASK, mload(order)))\n // order.takerToken;\n mstore(add(mem, 0x40), and(ADDRESS_MASK, mload(add(order, 0x20))))\n // order.makerAmount;\n mstore(add(mem, 0x60), and(UINT_128_MASK, mload(add(order, 0x40))))\n // order.takerAmount;\n mstore(add(mem, 0x80), and(UINT_128_MASK, mload(add(order, 0x60))))\n // order.maker;\n mstore(add(mem, 0xA0), and(ADDRESS_MASK, mload(add(order, 0x80))))\n // order.taker;\n mstore(add(mem, 0xC0), and(ADDRESS_MASK, mload(add(order, 0xA0))))\n // order.txOrigin;\n mstore(add(mem, 0xE0), and(ADDRESS_MASK, mload(add(order, 0xC0))))\n // order.pool;\n mstore(add(mem, 0x100), mload(add(order, 0xE0)))\n // order.expiry;\n mstore(add(mem, 0x120), and(UINT_64_MASK, mload(add(order, 0x100))))\n // order.salt;\n mstore(add(mem, 0x140), mload(add(order, 0x120)))\n structHash := keccak256(mem, 0x160)\n }\n }\n\n /// @dev Refund any leftover protocol fees in `msg.value` to `msg.sender`.\n /// @param ethProtocolFeePaid How much ETH was paid in protocol fees.\n function refundExcessProtocolFeeToSender(uint256 ethProtocolFeePaid)\n internal\n {\n if (msg.value > ethProtocolFeePaid && msg.sender != address(this)) {\n uint256 refundAmount = msg.value.safeSub(ethProtocolFeePaid);\n (bool success,) = msg\n .sender\n .call{value: refundAmount}(\"\");\n if (!success) {\n LibNativeOrdersRichErrors.ProtocolFeeRefundFailed(\n msg.sender,\n refundAmount\n ).rrevert();\n }\n }\n }\n}\n",
|
|
"../errors/LibNativeOrdersRichErrors.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibNativeOrdersRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function ProtocolFeeRefundFailed(\n address receiver,\n uint256 refundAmount\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"ProtocolFeeRefundFailed(address,uint256)\")),\n receiver,\n refundAmount\n );\n }\n\n function OrderNotFillableByOriginError(\n bytes32 orderHash,\n address txOrigin,\n address orderTxOrigin\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"OrderNotFillableByOriginError(bytes32,address,address)\")),\n orderHash,\n txOrigin,\n orderTxOrigin\n );\n }\n\n function OrderNotFillableError(\n bytes32 orderHash,\n uint8 orderStatus\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"OrderNotFillableError(bytes32,uint8)\")),\n orderHash,\n orderStatus\n );\n }\n\n function OrderNotSignedByMakerError(\n bytes32 orderHash,\n address signer,\n address maker\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"OrderNotSignedByMakerError(bytes32,address,address)\")),\n orderHash,\n signer,\n maker\n );\n }\n\n function OrderNotFillableBySenderError(\n bytes32 orderHash,\n address sender,\n address orderSender\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"OrderNotFillableBySenderError(bytes32,address,address)\")),\n orderHash,\n sender,\n orderSender\n );\n }\n\n function OrderNotFillableByTakerError(\n bytes32 orderHash,\n address taker,\n address orderTaker\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"OrderNotFillableByTakerError(bytes32,address,address)\")),\n orderHash,\n taker,\n orderTaker\n );\n }\n\n function CancelSaltTooLowError(\n uint256 minValidSalt,\n uint256 oldMinValidSalt\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"CancelSaltTooLowError(uint256,uint256)\")),\n minValidSalt,\n oldMinValidSalt\n );\n }\n\n function FillOrKillFailedError(\n bytes32 orderHash,\n uint256 takerTokenFilledAmount,\n uint256 takerTokenFillAmount\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"FillOrKillFailedError(bytes32,uint256,uint256)\")),\n orderHash,\n takerTokenFilledAmount,\n takerTokenFillAmount\n );\n }\n\n function OnlyOrderMakerAllowed(\n bytes32 orderHash,\n address sender,\n address maker\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"OnlyOrderMakerAllowed(bytes32,address,address)\")),\n orderHash,\n sender,\n maker\n );\n }\n\n function BatchFillIncompleteError(\n bytes32 orderHash,\n uint256 takerTokenFilledAmount,\n uint256 takerTokenFillAmount\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"BatchFillIncompleteError(bytes32,uint256,uint256)\")),\n orderHash,\n takerTokenFilledAmount,\n takerTokenFillAmount\n );\n }\n}\n",
|
|
"./interfaces/INativeOrdersEvents.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2021 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol\";\nimport \"../libs/LibSignature.sol\";\nimport \"../libs/LibNativeOrder.sol\";\n\n\n/// @dev Events emitted by NativeOrdersFeature.\ninterface INativeOrdersEvents {\n\n /// @dev Emitted whenever a `LimitOrder` is filled.\n /// @param orderHash The canonical hash of the order.\n /// @param maker The maker of the order.\n /// @param taker The taker of the order.\n /// @param feeRecipient Fee recipient of the order.\n /// @param takerTokenFilledAmount How much taker token was filled.\n /// @param makerTokenFilledAmount How much maker token was filled.\n /// @param protocolFeePaid How much protocol fee was paid.\n /// @param pool The fee pool associated with this order.\n event LimitOrderFilled(\n bytes32 orderHash,\n address maker,\n address taker,\n address feeRecipient,\n address makerToken,\n address takerToken,\n uint128 takerTokenFilledAmount,\n uint128 makerTokenFilledAmount,\n uint128 takerTokenFeeFilledAmount,\n uint256 protocolFeePaid,\n bytes32 pool\n );\n\n /// @dev Emitted whenever an `RfqOrder` is filled.\n /// @param orderHash The canonical hash of the order.\n /// @param maker The maker of the order.\n /// @param taker The taker of the order.\n /// @param takerTokenFilledAmount How much taker token was filled.\n /// @param makerTokenFilledAmount How much maker token was filled.\n /// @param pool The fee pool associated with this order.\n event RfqOrderFilled(\n bytes32 orderHash,\n address maker,\n address taker,\n address makerToken,\n address takerToken,\n uint128 takerTokenFilledAmount,\n uint128 makerTokenFilledAmount,\n bytes32 pool\n );\n\n /// @dev Emitted whenever a limit or RFQ order is cancelled.\n /// @param orderHash The canonical hash of the order.\n /// @param maker The order maker.\n event OrderCancelled(\n bytes32 orderHash,\n address maker\n );\n\n /// @dev Emitted whenever Limit orders are cancelled by pair by a maker.\n /// @param maker The maker of the order.\n /// @param makerToken The maker token in a pair for the orders cancelled.\n /// @param takerToken The taker token in a pair for the orders cancelled.\n /// @param minValidSalt The new minimum valid salt an order with this pair must\n /// have.\n event PairCancelledLimitOrders(\n address maker,\n address makerToken,\n address takerToken,\n uint256 minValidSalt\n );\n\n /// @dev Emitted whenever RFQ orders are cancelled by pair by a maker.\n /// @param maker The maker of the order.\n /// @param makerToken The maker token in a pair for the orders cancelled.\n /// @param takerToken The taker token in a pair for the orders cancelled.\n /// @param minValidSalt The new minimum valid salt an order with this pair must\n /// have.\n event PairCancelledRfqOrders(\n address maker,\n address makerToken,\n address takerToken,\n uint256 minValidSalt\n );\n\n /// @dev Emitted when new addresses are allowed or disallowed to fill\n /// orders with a given txOrigin.\n /// @param origin The address doing the allowing.\n /// @param addrs The address being allowed/disallowed.\n /// @param allowed Indicates whether the address should be allowed.\n event RfqOrderOriginsAllowed(\n address origin,\n address[] addrs,\n bool allowed\n );\n}\n",
|
|
"./interfaces/ITransformERC20Feature.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol\";\nimport \"../../transformers/IERC20Transformer.sol\";\nimport \"../../external/IFlashWallet.sol\";\n\n\n/// @dev Feature to composably transform between ERC20 tokens.\ninterface ITransformERC20Feature {\n\n /// @dev Defines a transformation to run in `transformERC20()`.\n struct Transformation {\n // The deployment nonce for the transformer.\n // The address of the transformer contract will be derived from this\n // value.\n uint32 deploymentNonce;\n // Arbitrary data to pass to the transformer.\n bytes data;\n }\n\n /// @dev Arguments for `_transformERC20()`.\n struct TransformERC20Args {\n // The taker address.\n address payable taker;\n // The token being provided by the taker.\n // If `0xeee...`, ETH is implied and should be provided with the call.`\n IERC20TokenV06 inputToken;\n // The token to be acquired by the taker.\n // `0xeee...` implies ETH.\n IERC20TokenV06 outputToken;\n // The amount of `inputToken` to take from the taker.\n // If set to `uint256(-1)`, the entire spendable balance of the taker\n // will be solt.\n uint256 inputTokenAmount;\n // The minimum amount of `outputToken` the taker\n // must receive for the entire transformation to succeed. If set to zero,\n // the minimum output token transfer will not be asserted.\n uint256 minOutputTokenAmount;\n // The transformations to execute on the token balance(s)\n // in sequence.\n Transformation[] transformations;\n }\n\n /// @dev Raised upon a successful `transformERC20`.\n /// @param taker The taker (caller) address.\n /// @param inputToken The token being provided by the taker.\n /// If `0xeee...`, ETH is implied and should be provided with the call.`\n /// @param outputToken The token to be acquired by the taker.\n /// `0xeee...` implies ETH.\n /// @param inputTokenAmount The amount of `inputToken` to take from the taker.\n /// @param outputTokenAmount The amount of `outputToken` received by the taker.\n event TransformedERC20(\n address indexed taker,\n address inputToken,\n address outputToken,\n uint256 inputTokenAmount,\n uint256 outputTokenAmount\n );\n\n /// @dev Raised when `setTransformerDeployer()` is called.\n /// @param transformerDeployer The new deployer address.\n event TransformerDeployerUpdated(address transformerDeployer);\n\n /// @dev Raised when `setQuoteSigner()` is called.\n /// @param quoteSigner The new quote signer.\n event QuoteSignerUpdated(address quoteSigner);\n\n /// @dev Replace the allowed deployer for transformers.\n /// Only callable by the owner.\n /// @param transformerDeployer The address of the new trusted deployer\n /// for transformers.\n function setTransformerDeployer(address transformerDeployer)\n external;\n\n /// @dev Replace the optional signer for `transformERC20()` calldata.\n /// Only callable by the owner.\n /// @param quoteSigner The address of the new calldata signer.\n function setQuoteSigner(address quoteSigner)\n external;\n\n /// @dev Deploy a new flash wallet instance and replace the current one with it.\n /// Useful if we somehow break the current wallet instance.\n /// Only callable by the owner.\n /// @return wallet The new wallet instance.\n function createTransformWallet()\n external\n returns (IFlashWallet wallet);\n\n /// @dev Executes a series of transformations to convert an ERC20 `inputToken`\n /// to an ERC20 `outputToken`.\n /// @param inputToken The token being provided by the sender.\n /// If `0xeee...`, ETH is implied and should be provided with the call.`\n /// @param outputToken The token to be acquired by the sender.\n /// `0xeee...` implies ETH.\n /// @param inputTokenAmount The amount of `inputToken` to take from the sender.\n /// @param minOutputTokenAmount The minimum amount of `outputToken` the sender\n /// must receive for the entire transformation to succeed.\n /// @param transformations The transformations to execute on the token balance(s)\n /// in sequence.\n /// @return outputTokenAmount The amount of `outputToken` received by the sender.\n function transformERC20(\n IERC20TokenV06 inputToken,\n IERC20TokenV06 outputToken,\n uint256 inputTokenAmount,\n uint256 minOutputTokenAmount,\n Transformation[] calldata transformations\n )\n external\n payable\n returns (uint256 outputTokenAmount);\n\n /// @dev Internal version of `transformERC20()`. Only callable from within.\n /// @param args A `TransformERC20Args` struct.\n /// @return outputTokenAmount The amount of `outputToken` received by the taker.\n function _transformERC20(TransformERC20Args calldata args)\n external\n payable\n returns (uint256 outputTokenAmount);\n\n /// @dev Return the current wallet instance that will serve as the execution\n /// context for transformations.\n /// @return wallet The wallet instance.\n function getTransformWallet()\n external\n view\n returns (IFlashWallet wallet);\n\n /// @dev Return the allowed deployer for transformers.\n /// @return deployer The transform deployer address.\n function getTransformerDeployer()\n external\n view\n returns (address deployer);\n\n /// @dev Return the optional signer for `transformERC20()` calldata.\n /// @return signer The transform deployer address.\n function getQuoteSigner()\n external\n view\n returns (address signer);\n}\n",
|
|
"../transformers/IERC20Transformer.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol\";\n\n\n/// @dev A transformation callback used in `TransformERC20.transformERC20()`.\ninterface IERC20Transformer {\n\n /// @dev Context information to pass into `transform()` by `TransformERC20.transformERC20()`.\n struct TransformContext {\n // The caller of `TransformERC20.transformERC20()`.\n address payable sender;\n // taker The taker address, which may be distinct from `sender` in the case\n // meta-transactions.\n address payable taker;\n // Arbitrary data to pass to the transformer.\n bytes data;\n }\n\n /// @dev Called from `TransformERC20.transformERC20()`. This will be\n /// delegatecalled in the context of the FlashWallet instance being used.\n /// @param context Context information.\n /// @return success The success bytes (`LibERC20Transformer.TRANSFORMER_SUCCESS`).\n function transform(TransformContext calldata context)\n external\n returns (bytes4 success);\n}\n"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.6.12+commit.27d51765",
|
|
"settings": {
|
|
"remappings": [
|
|
"@0x/contracts-utils=/Users/michaelzhu/protocol/node_modules/@0x/contracts-utils",
|
|
"@0x/contracts-erc20=/Users/michaelzhu/protocol/contracts/zero-ex/node_modules/@0x/contracts-erc20"
|
|
],
|
|
"optimizer": {
|
|
"enabled": true,
|
|
"runs": 1000000,
|
|
"details": {
|
|
"yul": true,
|
|
"deduplicate": true,
|
|
"cse": true,
|
|
"constantOptimizer": true
|
|
}
|
|
},
|
|
"outputSelection": {
|
|
"*": {
|
|
"*": [
|
|
"abi",
|
|
"devdoc",
|
|
"evm.bytecode.object",
|
|
"evm.bytecode.sourceMap",
|
|
"evm.deployedBytecode.object",
|
|
"evm.deployedBytecode.sourceMap",
|
|
"evm.methodIdentifiers"
|
|
]
|
|
}
|
|
},
|
|
"evmVersion": "istanbul"
|
|
}
|
|
},
|
|
"chains": {}
|
|
}
|