Files
protocol/lib/generated-artifacts/BatchFillNativeOrdersFeature.json
T
Michael Zhu dd132c611c gitpkg
2021-03-16 10:53:37 -07:00

556 lines
299 KiB
JSON

{
"schemaVersion": "2.0.0",
"contractName": "BatchFillNativeOrdersFeature",
"compilerOutput": {
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "zeroExAddress",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"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": [
{
"components": [
{
"internalType": "contract IERC20TokenV06",
"name": "makerToken",
"type": "address"
},
{
"internalType": "contract IERC20TokenV06",
"name": "takerToken",
"type": "address"
},
{
"internalType": "uint128",
"name": "makerAmount",
"type": "uint128"
},
{
"internalType": "uint128",
"name": "takerAmount",
"type": "uint128"
},
{
"internalType": "uint128",
"name": "takerTokenFeeAmount",
"type": "uint128"
},
{
"internalType": "address",
"name": "maker",
"type": "address"
},
{
"internalType": "address",
"name": "taker",
"type": "address"
},
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "address",
"name": "feeRecipient",
"type": "address"
},
{
"internalType": "bytes32",
"name": "pool",
"type": "bytes32"
},
{
"internalType": "uint64",
"name": "expiry",
"type": "uint64"
},
{
"internalType": "uint256",
"name": "salt",
"type": "uint256"
}
],
"internalType": "struct LibNativeOrder.LimitOrder[]",
"name": "orders",
"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[]"
},
{
"internalType": "uint128[]",
"name": "takerTokenFillAmounts",
"type": "uint128[]"
},
{
"internalType": "bool",
"name": "revertIfIncomplete",
"type": "bool"
}
],
"name": "batchFillLimitOrders",
"outputs": [
{
"internalType": "uint128[]",
"name": "takerTokenFilledAmounts",
"type": "uint128[]"
},
{
"internalType": "uint128[]",
"name": "makerTokenFilledAmounts",
"type": "uint128[]"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "contract IERC20TokenV06",
"name": "makerToken",
"type": "address"
},
{
"internalType": "contract IERC20TokenV06",
"name": "takerToken",
"type": "address"
},
{
"internalType": "uint128",
"name": "makerAmount",
"type": "uint128"
},
{
"internalType": "uint128",
"name": "takerAmount",
"type": "uint128"
},
{
"internalType": "address",
"name": "maker",
"type": "address"
},
{
"internalType": "address",
"name": "taker",
"type": "address"
},
{
"internalType": "address",
"name": "txOrigin",
"type": "address"
},
{
"internalType": "bytes32",
"name": "pool",
"type": "bytes32"
},
{
"internalType": "uint64",
"name": "expiry",
"type": "uint64"
},
{
"internalType": "uint256",
"name": "salt",
"type": "uint256"
}
],
"internalType": "struct LibNativeOrder.RfqOrder[]",
"name": "orders",
"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[]"
},
{
"internalType": "uint128[]",
"name": "takerTokenFillAmounts",
"type": "uint128[]"
},
{
"internalType": "bool",
"name": "revertIfIncomplete",
"type": "bool"
}
],
"name": "batchFillRfqOrders",
"outputs": [
{
"internalType": "uint128[]",
"name": "takerTokenFilledAmounts",
"type": "uint128[]"
},
{
"internalType": "uint128[]",
"name": "makerTokenFilledAmounts",
"type": "uint128[]"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "migrate",
"outputs": [
{
"internalType": "bytes4",
"name": "success",
"type": "bytes4"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
],
"devdoc": {
"details": "Feature for batch/market filling limit and RFQ orders.",
"kind": "dev",
"methods": {
"batchFillLimitOrders((address,address,uint128,uint128,uint128,address,address,address,address,bytes32,uint64,uint256)[],(uint8,uint8,bytes32,bytes32)[],uint128[],bool)": {
"details": "Fills multiple limit orders.",
"params": {
"orders": "Array of limit orders.",
"revertIfIncomplete": "If true, reverts if this function fails to fill the full fill amount for any individual order.",
"signatures": "Array of signatures corresponding to each order.",
"takerTokenFillAmounts": "Array of desired amounts to fill each order."
},
"returns": {
"makerTokenFilledAmounts": "Array of amounts filled, in maker token.",
"takerTokenFilledAmounts": "Array of amounts filled, in taker token."
}
},
"batchFillRfqOrders((address,address,uint128,uint128,address,address,address,bytes32,uint64,uint256)[],(uint8,uint8,bytes32,bytes32)[],uint128[],bool)": {
"details": "Fills multiple RFQ orders.",
"params": {
"orders": "Array of RFQ orders.",
"revertIfIncomplete": "If true, reverts if this function fails to fill the full fill amount for any individual order.",
"signatures": "Array of signatures corresponding to each order.",
"takerTokenFillAmounts": "Array of desired amounts to fill each order."
},
"returns": {
"makerTokenFilledAmounts": "Array of amounts filled, in maker token.",
"takerTokenFilledAmounts": "Array of amounts filled, in taker token."
}
},
"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."
}
},
"version": 1
},
"evm": {
"bytecode": {
"linkReferences": {},
"object": "0x60e0604052620000136001600080620000f1565b60c0523480156200002357600080fd5b5060405162001c0138038062001c01833981016040819052620000469162000123565b3060601b60805260405181904690620000cc907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f907f9e5dae0addaf20578aeb5d70341d092b53b4e14480ac5726438fd436df7ba427907f06c015bd22b4c69690933c1058878ebdfef31f9aaae40bbe86d8a09fe1b2972c908590879060200162000153565b60408051601f19818403018152919052805160209091012060a052506200017f915050565b6bffffffff0000000000000000604084901b1667ffffffff00000000602084901b161763ffffffff8216179392505050565b60006020828403121562000135578081fd5b81516001600160a01b03811681146200014c578182fd5b9392505050565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b60805160601c60a05160c051611a4d620001b4600039806101315250806108c65280610ab9525080610de05250611a4d6000f3fe6080604052600436106100655760003560e01c806375103cb91161004357806375103cb9146100d85780638fd3ab80146100f8578063dab400f31461011a57610065565b8063031b905c1461006a5780631baaa00b146100955780636ae4b4f7146100b6575b600080fd5b34801561007657600080fd5b5061007f61012f565b60405161008c91906114c9565b60405180910390f35b6100a86100a3366004611000565b610153565b60405161008c92919061149b565b3480156100c257600080fd5b506100cb61052c565b60405161008c919061157e565b3480156100e457600080fd5b506100a86100f33660046110d4565b610565565b34801561010457600080fd5b5061010d61084b565b60405161008c91906114e8565b34801561012657600080fd5b5061007f6108c4565b7f000000000000000000000000000000000000000000000000000000000000000081565b606080878614801561016457508784145b6101a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161019a906115ef565b60405180910390fd5b8767ffffffffffffffff811180156101ba57600080fd5b506040519080825280602002602001820160405280156101e4578160200160208202803683370190505b5091508767ffffffffffffffff811180156101fe57600080fd5b50604051908082528060200260200182016040528015610228578160200160208202803683370190505b50905060006102c33a3073ffffffffffffffffffffffffffffffffffffffff1663487b5c206040518163ffffffff1660e01b815260040160206040518083038186803b15801561027757600080fd5b505afa15801561028b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102af9190611344565b63ffffffff166108e890919063ffffffff16565b90506000805b808b14610514573063414e4ccf8d8d848181106102e257fe5b905061018002018c8c858181106102f557fe5b9050608002018b8b8681811061030757fe5b905060200201602081019061031c91906112ef565b33336040518663ffffffff1660e01b815260040161033e9594939291906116f5565b6040805180830381600087803b15801561035757600080fd5b505af19250505080156103a5575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103a29181019061130b565b60015b6103ae57610401565b81818885815181106103bc57fe5b602002602001018886815181106103cf57fe5b6fffffffffffffffffffffffffffffffff9384166020918202929092010152911690526103fc8486610922565b935050505b858015610464575087878281811061041557fe5b905060200201602081019061042a91906112ef565b6fffffffffffffffffffffffffffffffff1685828151811061044857fe5b60200260200101516fffffffffffffffffffffffffffffffff16105b1561050c57600061049e6104998e8e8581811061047d57fe5b90506101800201803603810190610494919061113b565b61093e565b610ab5565b905061050a610505828885815181106104b357fe5b60200260200101516fffffffffffffffffffffffffffffffff168c8c878181106104d957fe5b90506020020160208101906104ee91906112ef565b6fffffffffffffffffffffffffffffffff16610b07565b610bc5565b505b6001016102c9565b5061051e81610bcd565b505097509795505050505050565b6040518060400160405280600981526020017f426174636846696c6c000000000000000000000000000000000000000000000081525081565b606080878614801561057657508784145b6105ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161019a90611672565b8767ffffffffffffffff811180156105c357600080fd5b506040519080825280602002602001820160405280156105ed578160200160208202803683370190505b5091508767ffffffffffffffff8111801561060757600080fd5b50604051908082528060200260200182016040528015610631578160200160208202803683370190505b50905060005b80891461083e573063a656186b8b8b8481811061065057fe5b905061014002018a8a8581811061066357fe5b90506080020189898681811061067557fe5b905060200201602081019061068a91906112ef565b336040518563ffffffff1660e01b81526004016106aa949392919061185f565b6040805180830381600087803b1580156106c357600080fd5b505af1925050508015610711575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261070e9181019061130b565b60015b61071a57610761565b818186858151811061072857fe5b6020026020010186868151811061073b57fe5b6fffffffffffffffffffffffffffffffff93841660209182029290920101529116905250505b8380156107c4575085858281811061077557fe5b905060200201602081019061078a91906112ef565b6fffffffffffffffffffffffffffffffff168382815181106107a857fe5b60200260200101516fffffffffffffffffffffffffffffffff16105b156108365760006107f96104998c8c858181106107dd57fe5b905061014002018036038101906107f49190611228565b610c73565b90506108346105058286858151811061080e57fe5b60200260200101516fffffffffffffffffffffffffffffffff168a8a878181106104d957fe5b505b600101610637565b5097509795505050505050565b60006108767f1baaa00b00000000000000000000000000000000000000000000000000000000610daa565b61089f7f75103cb900000000000000000000000000000000000000000000000000000000610daa565b507f2c64c5ef0000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000826108f75750600061091c565b8282028284828161090457fe5b04146109195761091961050560018686610e3d565b90505b92915050565b6000828201838110156109195761091961050560008686610e3d565b60006040517fce918627cb55462ddbb85e73de69a8b322f2bc88f4507c52fcad6d4c33c29d498152825173ffffffffffffffffffffffffffffffffffffffff166020820152602083015173ffffffffffffffffffffffffffffffffffffffff16604082015260408301516fffffffffffffffffffffffffffffffff16606082015260608301516fffffffffffffffffffffffffffffffff16608082015260808301516fffffffffffffffffffffffffffffffff1660a082015260a083015173ffffffffffffffffffffffffffffffffffffffff1660c082015260c083015173ffffffffffffffffffffffffffffffffffffffff1660e082015260e083015173ffffffffffffffffffffffffffffffffffffffff1661010082015261010083015173ffffffffffffffffffffffffffffffffffffffff1661012082015261012083015161014082015261014083015167ffffffffffffffff166101608201526101608301516101808201526101a08120915050919050565b60007f000000000000000000000000000000000000000000000000000000000000000082604051602001610aea92919061143c565b604051602081830303815290604052805190602001209050919050565b60607f1d44aa5d44fd7162f13b456f3c7766598d02f56029c083df67a6f11a6edd3c3e848484604051602401610b3f939291906114d2565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290509392505050565b805160208201fd5b8034118015610bdc5750333014155b15610c70576000610bed3483610e5c565b905060003373ffffffffffffffffffffffffffffffffffffffff1682604051610c1590611472565b60006040518083038185875af1925050503d8060008114610c52576040519150601f19603f3d011682016040523d82523d6000602084013e610c57565b606091505b5050905080610c6d57610c6d6105053384610e7b565b50505b50565b60006040517fe593d3fdfa8b60e5e17a1b2204662ecbe15c23f2084b9ad5bae40359540a7da98152825173ffffffffffffffffffffffffffffffffffffffff166020820152602083015173ffffffffffffffffffffffffffffffffffffffff16604082015260408301516fffffffffffffffffffffffffffffffff16606082015260608301516fffffffffffffffffffffffffffffffff166080820152608083015173ffffffffffffffffffffffffffffffffffffffff1660a082015260a083015173ffffffffffffffffffffffffffffffffffffffff1660c082015260c083015173ffffffffffffffffffffffffffffffffffffffff1660e082015260e083015161010082015261010083015167ffffffffffffffff166101208201526101208301516101408201526101608120915050919050565b6040517f6eb224cb0000000000000000000000000000000000000000000000000000000081523090636eb224cb90610e089084907f000000000000000000000000000000000000000000000000000000000000000090600401611515565b600060405180830381600087803b158015610e2257600080fd5b505af1158015610e36573d6000803e3d6000fd5b5050505050565b606063e946c1bb60e01b848484604051602401610b3f9392919061155d565b600082821115610e7557610e7561050560028585610e3d565b50900390565b60607fbde95cc2119e0200d80642397198abfcf98e6e4dddd0de9c6320d86252ad40ab8383604051602401610eb1929190611475565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905092915050565b803561091c816119d7565b60008083601f840112610f52578182fd5b50813567ffffffffffffffff811115610f69578182fd5b602083019150836020608083028501011115610f8457600080fd5b9250929050565b60008083601f840112610f9c578182fd5b50813567ffffffffffffffff811115610fb3578182fd5b6020830191508360208083028501011115610f8457600080fd5b8035801515811461091c57600080fd5b803561091c816119f9565b803567ffffffffffffffff8116811461091c57600080fd5b60008060008060008060006080888a03121561101a578283fd5b873567ffffffffffffffff80821115611031578485fd5b818a0191508a601f830112611044578485fd5b813581811115611052578586fd5b8b602061018083028501011115611067578586fd5b602092830199509750908901359080821115611081578485fd5b61108d8b838c01610f41565b909750955060408a01359150808211156110a5578485fd5b506110b28a828b01610f8b565b90945092506110c690508960608a01610fcd565b905092959891949750929550565b60008060008060008060006080888a0312156110ee578283fd5b873567ffffffffffffffff80821115611105578485fd5b818a0191508a601f830112611118578485fd5b813581811115611126578586fd5b8b602061014083028501011115611067578586fd5b600061018080838503121561114e578182fd5b61115781611973565b90506111638484610f36565b81526111728460208501610f36565b60208201526111848460408501610fdd565b60408201526111968460608501610fdd565b60608201526111a88460808501610fdd565b60808201526111ba8460a08501610f36565b60a08201526111cc8460c08501610f36565b60c08201526111de8460e08501610f36565b60e08201526101006111f285828601610f36565b90820152610120838101359082015261014061121085828601610fe8565b90820152610160928301359281019290925250919050565b600061014080838503121561123b578182fd5b61124481611973565b90506112508484610f36565b815261125f8460208501610f36565b60208201526112718460408501610fdd565b60408201526112838460608501610fdd565b60608201526112958460808501610f36565b60808201526112a78460a08501610f36565b60a08201526112b98460c08501610f36565b60c082015260e083013560e08201526101006112d785828601610fe8565b90820152610120928301359281019290925250919050565b600060208284031215611300578081fd5b8135610919816119f9565b6000806040838503121561131d578182fd5b8251611328816119f9565b6020840151909250611339816119f9565b809150509250929050565b600060208284031215611355578081fd5b815163ffffffff81168114610919578182fd5b73ffffffffffffffffffffffffffffffffffffffff169052565b6000815180845260208085019450808401835b838110156113c35781516fffffffffffffffffffffffffffffffff1687529582019590820190600101611395565b509495945050505050565b8035600481106113dd57600080fd5b6113e6816119cd565b8252602081013560ff81168082146113fd57600080fd5b60208401525060408181013590830152606090810135910152565b6fffffffffffffffffffffffffffffffff169052565b67ffffffffffffffff169052565b7f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b90565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b6000604082526114ae6040830185611382565b82810360208401526114c08185611382565b95945050505050565b90815260200190565b9283526020830191909152604082015260600190565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b7fffffffff0000000000000000000000000000000000000000000000000000000092909216825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b6060810161156a856119cd565b938152602081019290925260409091015290565b6000602080835283518082850152825b818110156115aa5785810183015185820160400152820161158e565b818111156115bb5783604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b6020808252604b908201527f426174636846696c6c4e61746976654f7264657273466561747572653a3a626160408201527f74636846696c6c4c696d69744f72646572732f4d49534d4154434845445f415260608201527f5241595f4c454e47544853000000000000000000000000000000000000000000608082015260a00190565b60208082526049908201527f426174636846696c6c4e61746976654f7264657273466561747572653a3a626160408201527f74636846696c6c5266714f72646572732f4d49534d4154434845445f4152524160608201527f595f4c454e475448530000000000000000000000000000000000000000000000608082015260a00190565b6102608101602087016117118361170c838b610f36565b611368565b61171b818961199a565b905061172a6020840182611368565b5061173860408801886119a7565b6117456040840182611418565b5061175360608801886119a7565b6117606060840182611418565b5061176e60808801886119a7565b61177b6080840182611418565b5061178960a088018861199a565b61179660a0840182611368565b506117a460c088018861199a565b6117b160c0840182611368565b506117bf60e088018861199a565b6117cc60e0840182611368565b506101006117dc8189018961199a565b6117e882850182611368565b50506101208781013590830152610140611804818901896119b4565b6118108285018261142e565b5050610160878101359083015261182b6101808301876113ce565b611839610200830186611418565b611847610220830185611368565b611855610240830184611368565b9695505050505050565b6102008101602086016118768361170c838a610f36565b611880818861199a565b905061188f6020840182611368565b5061189d60408701876119a7565b6118aa6040840182611418565b506118b860608701876119a7565b6118c56060840182611418565b506118d3608087018761199a565b6118e06080840182611368565b506118ee60a087018761199a565b6118fb60a0840182611368565b5061190960c087018761199a565b61191660c0840182611368565b5060e086013560e0830152610100611930818801886119b4565b61193c8285018261142e565b505061012086810135908301526119576101408301866113ce565b6119656101c0830185611418565b6114c06101e0830184611368565b60405181810167ffffffffffffffff8111828210171561199257600080fd5b604052919050565b60008235610919816119d7565b60008235610919816119f9565b6000823567ffffffffffffffff81168114610919578182fd5b60048110610c7057fe5b73ffffffffffffffffffffffffffffffffffffffff81168114610c7057600080fd5b6fffffffffffffffffffffffffffffffff81168114610c7057600080fdfea2646970667358221220468a5bca7c07b19ea9c8e9e4fbb38847f05a9445111740a4b5a55cf8ce73a5d364736f6c634300060c0033",
"opcodes": "PUSH1 0xE0 PUSH1 0x40 MSTORE PUSH3 0x13 PUSH1 0x1 PUSH1 0x0 DUP1 PUSH3 0xF1 JUMP JUMPDEST PUSH1 0xC0 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x23 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH3 0x1C01 CODESIZE SUB DUP1 PUSH3 0x1C01 DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH3 0x46 SWAP2 PUSH3 0x123 JUMP JUMPDEST ADDRESS PUSH1 0x60 SHL PUSH1 0x80 MSTORE PUSH1 0x40 MLOAD DUP2 SWAP1 CHAINID SWAP1 PUSH3 0xCC SWAP1 PUSH32 0x8B73C3C69BB8FE3D512ECC4CF759CC79239F7B179B0FFACAA9A75D522B39400F SWAP1 PUSH32 0x9E5DAE0ADDAF20578AEB5D70341D092B53B4E14480AC5726438FD436DF7BA427 SWAP1 PUSH32 0x6C015BD22B4C69690933C1058878EBDFEF31F9AAAE40BBE86D8A09FE1B2972C SWAP1 DUP6 SWAP1 DUP8 SWAP1 PUSH1 0x20 ADD PUSH3 0x153 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 PUSH3 0x17F SWAP2 POP 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 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH3 0x135 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH3 0x14C JUMPI DUP2 DUP3 REVERT JUMPDEST SWAP4 SWAP3 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 PUSH2 0x1A4D PUSH3 0x1B4 PUSH1 0x0 CODECOPY DUP1 PUSH2 0x131 MSTORE POP DUP1 PUSH2 0x8C6 MSTORE DUP1 PUSH2 0xAB9 MSTORE POP DUP1 PUSH2 0xDE0 MSTORE POP PUSH2 0x1A4D PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x65 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x75103CB9 GT PUSH2 0x43 JUMPI DUP1 PUSH4 0x75103CB9 EQ PUSH2 0xD8 JUMPI DUP1 PUSH4 0x8FD3AB80 EQ PUSH2 0xF8 JUMPI DUP1 PUSH4 0xDAB400F3 EQ PUSH2 0x11A JUMPI PUSH2 0x65 JUMP JUMPDEST DUP1 PUSH4 0x31B905C EQ PUSH2 0x6A JUMPI DUP1 PUSH4 0x1BAAA00B EQ PUSH2 0x95 JUMPI DUP1 PUSH4 0x6AE4B4F7 EQ PUSH2 0xB6 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x76 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x7F PUSH2 0x12F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x8C SWAP2 SWAP1 PUSH2 0x14C9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xA8 PUSH2 0xA3 CALLDATASIZE PUSH1 0x4 PUSH2 0x1000 JUMP JUMPDEST PUSH2 0x153 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x8C SWAP3 SWAP2 SWAP1 PUSH2 0x149B JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xC2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xCB PUSH2 0x52C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x8C SWAP2 SWAP1 PUSH2 0x157E JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xE4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xA8 PUSH2 0xF3 CALLDATASIZE PUSH1 0x4 PUSH2 0x10D4 JUMP JUMPDEST PUSH2 0x565 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x104 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x10D PUSH2 0x84B JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x8C SWAP2 SWAP1 PUSH2 0x14E8 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x126 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x7F PUSH2 0x8C4 JUMP JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x60 DUP1 DUP8 DUP7 EQ DUP1 ISZERO PUSH2 0x164 JUMPI POP DUP8 DUP5 EQ JUMPDEST PUSH2 0x1A3 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x19A SWAP1 PUSH2 0x15EF JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP8 PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0x1BA 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 0x1E4 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP2 POP DUP8 PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0x1FE 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 0x228 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 PUSH2 0x2C3 GASPRICE ADDRESS PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x487B5C20 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x277 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x28B 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 0x2AF SWAP2 SWAP1 PUSH2 0x1344 JUMP JUMPDEST PUSH4 0xFFFFFFFF AND PUSH2 0x8E8 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP1 DUP12 EQ PUSH2 0x514 JUMPI ADDRESS PUSH4 0x414E4CCF DUP14 DUP14 DUP5 DUP2 DUP2 LT PUSH2 0x2E2 JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x180 MUL ADD DUP13 DUP13 DUP6 DUP2 DUP2 LT PUSH2 0x2F5 JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x80 MUL ADD DUP12 DUP12 DUP7 DUP2 DUP2 LT PUSH2 0x307 JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x31C SWAP2 SWAP1 PUSH2 0x12EF JUMP JUMPDEST CALLER CALLER PUSH1 0x40 MLOAD DUP7 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x33E SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x16F5 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x357 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0x3A5 JUMPI POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND DUP3 ADD SWAP1 SWAP3 MSTORE PUSH2 0x3A2 SWAP2 DUP2 ADD SWAP1 PUSH2 0x130B JUMP JUMPDEST PUSH1 0x1 JUMPDEST PUSH2 0x3AE JUMPI PUSH2 0x401 JUMP JUMPDEST DUP2 DUP2 DUP9 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x3BC JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP9 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x3CF JUMPI INVALID JUMPDEST PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP4 DUP5 AND PUSH1 0x20 SWAP2 DUP3 MUL SWAP3 SWAP1 SWAP3 ADD ADD MSTORE SWAP2 AND SWAP1 MSTORE PUSH2 0x3FC DUP5 DUP7 PUSH2 0x922 JUMP JUMPDEST SWAP4 POP POP POP JUMPDEST DUP6 DUP1 ISZERO PUSH2 0x464 JUMPI POP DUP8 DUP8 DUP3 DUP2 DUP2 LT PUSH2 0x415 JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x42A SWAP2 SWAP1 PUSH2 0x12EF JUMP JUMPDEST PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP6 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x448 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND LT JUMPDEST ISZERO PUSH2 0x50C JUMPI PUSH1 0x0 PUSH2 0x49E PUSH2 0x499 DUP15 DUP15 DUP6 DUP2 DUP2 LT PUSH2 0x47D JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x180 MUL ADD DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x494 SWAP2 SWAP1 PUSH2 0x113B JUMP JUMPDEST PUSH2 0x93E JUMP JUMPDEST PUSH2 0xAB5 JUMP JUMPDEST SWAP1 POP PUSH2 0x50A PUSH2 0x505 DUP3 DUP9 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x4B3 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP13 DUP13 DUP8 DUP2 DUP2 LT PUSH2 0x4D9 JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x4EE SWAP2 SWAP1 PUSH2 0x12EF JUMP JUMPDEST PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0xB07 JUMP JUMPDEST PUSH2 0xBC5 JUMP JUMPDEST POP JUMPDEST PUSH1 0x1 ADD PUSH2 0x2C9 JUMP JUMPDEST POP PUSH2 0x51E DUP2 PUSH2 0xBCD JUMP JUMPDEST POP POP SWAP8 POP SWAP8 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x9 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x426174636846696C6C0000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP2 JUMP JUMPDEST PUSH1 0x60 DUP1 DUP8 DUP7 EQ DUP1 ISZERO PUSH2 0x576 JUMPI POP DUP8 DUP5 EQ JUMPDEST PUSH2 0x5AC JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x19A SWAP1 PUSH2 0x1672 JUMP JUMPDEST DUP8 PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0x5C3 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 0x5ED JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP2 POP DUP8 PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0x607 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 0x631 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP1 DUP10 EQ PUSH2 0x83E JUMPI ADDRESS PUSH4 0xA656186B DUP12 DUP12 DUP5 DUP2 DUP2 LT PUSH2 0x650 JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x140 MUL ADD DUP11 DUP11 DUP6 DUP2 DUP2 LT PUSH2 0x663 JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x80 MUL ADD DUP10 DUP10 DUP7 DUP2 DUP2 LT PUSH2 0x675 JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x68A SWAP2 SWAP1 PUSH2 0x12EF JUMP JUMPDEST CALLER PUSH1 0x40 MLOAD DUP6 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x6AA SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x185F JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x6C3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0x711 JUMPI POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND DUP3 ADD SWAP1 SWAP3 MSTORE PUSH2 0x70E SWAP2 DUP2 ADD SWAP1 PUSH2 0x130B JUMP JUMPDEST PUSH1 0x1 JUMPDEST PUSH2 0x71A JUMPI PUSH2 0x761 JUMP JUMPDEST DUP2 DUP2 DUP7 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x728 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP7 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x73B JUMPI INVALID JUMPDEST PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP4 DUP5 AND PUSH1 0x20 SWAP2 DUP3 MUL SWAP3 SWAP1 SWAP3 ADD ADD MSTORE SWAP2 AND SWAP1 MSTORE POP POP JUMPDEST DUP4 DUP1 ISZERO PUSH2 0x7C4 JUMPI POP DUP6 DUP6 DUP3 DUP2 DUP2 LT PUSH2 0x775 JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x78A SWAP2 SWAP1 PUSH2 0x12EF JUMP JUMPDEST PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x7A8 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND LT JUMPDEST ISZERO PUSH2 0x836 JUMPI PUSH1 0x0 PUSH2 0x7F9 PUSH2 0x499 DUP13 DUP13 DUP6 DUP2 DUP2 LT PUSH2 0x7DD JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x140 MUL ADD DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x7F4 SWAP2 SWAP1 PUSH2 0x1228 JUMP JUMPDEST PUSH2 0xC73 JUMP JUMPDEST SWAP1 POP PUSH2 0x834 PUSH2 0x505 DUP3 DUP7 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x80E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP11 DUP11 DUP8 DUP2 DUP2 LT PUSH2 0x4D9 JUMPI INVALID JUMPDEST POP JUMPDEST PUSH1 0x1 ADD PUSH2 0x637 JUMP JUMPDEST POP SWAP8 POP SWAP8 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x876 PUSH32 0x1BAAA00B00000000000000000000000000000000000000000000000000000000 PUSH2 0xDAA JUMP JUMPDEST PUSH2 0x89F PUSH32 0x75103CB900000000000000000000000000000000000000000000000000000000 PUSH2 0xDAA JUMP JUMPDEST POP PUSH32 0x2C64C5EF00000000000000000000000000000000000000000000000000000000 SWAP1 JUMP JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH2 0x8F7 JUMPI POP PUSH1 0x0 PUSH2 0x91C JUMP JUMPDEST DUP3 DUP3 MUL DUP3 DUP5 DUP3 DUP2 PUSH2 0x904 JUMPI INVALID JUMPDEST DIV EQ PUSH2 0x919 JUMPI PUSH2 0x919 PUSH2 0x505 PUSH1 0x1 DUP7 DUP7 PUSH2 0xE3D JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD DUP4 DUP2 LT ISZERO PUSH2 0x919 JUMPI PUSH2 0x919 PUSH2 0x505 PUSH1 0x0 DUP7 DUP7 PUSH2 0xE3D JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD PUSH32 0xCE918627CB55462DDBB85E73DE69A8B322F2BC88F4507C52FCAD6D4C33C29D49 DUP2 MSTORE DUP3 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x20 DUP4 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x40 DUP4 ADD MLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x60 DUP4 ADD MLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0x80 DUP4 ADD MLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xA0 DUP4 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0xC0 DUP3 ADD MSTORE PUSH1 0xC0 DUP4 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0xE0 DUP3 ADD MSTORE PUSH1 0xE0 DUP4 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x100 DUP3 ADD MSTORE PUSH2 0x100 DUP4 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x120 DUP3 ADD MSTORE PUSH2 0x120 DUP4 ADD MLOAD PUSH2 0x140 DUP3 ADD MSTORE PUSH2 0x140 DUP4 ADD MLOAD PUSH8 0xFFFFFFFFFFFFFFFF AND PUSH2 0x160 DUP3 ADD MSTORE PUSH2 0x160 DUP4 ADD MLOAD PUSH2 0x180 DUP3 ADD MSTORE PUSH2 0x1A0 DUP2 KECCAK256 SWAP2 POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0xAEA SWAP3 SWAP2 SWAP1 PUSH2 0x143C 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 0x1D44AA5D44FD7162F13B456F3C7766598D02F56029C083DF67A6F11A6EDD3C3E DUP5 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0xB3F SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x14D2 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 DUP1 MLOAD PUSH1 0x20 DUP3 ADD REVERT JUMPDEST DUP1 CALLVALUE GT DUP1 ISZERO PUSH2 0xBDC JUMPI POP CALLER ADDRESS EQ ISZERO JUMPDEST ISZERO PUSH2 0xC70 JUMPI PUSH1 0x0 PUSH2 0xBED CALLVALUE DUP4 PUSH2 0xE5C JUMP JUMPDEST SWAP1 POP PUSH1 0x0 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP3 PUSH1 0x40 MLOAD PUSH2 0xC15 SWAP1 PUSH2 0x1472 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 0xC52 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 0xC57 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP POP SWAP1 POP DUP1 PUSH2 0xC6D JUMPI PUSH2 0xC6D PUSH2 0x505 CALLER DUP5 PUSH2 0xE7B JUMP JUMPDEST POP POP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD PUSH32 0xE593D3FDFA8B60E5E17A1B2204662ECBE15C23F2084B9AD5BAE40359540A7DA9 DUP2 MSTORE DUP3 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x20 DUP4 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x40 DUP4 ADD MLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x60 DUP4 ADD MLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0x80 DUP4 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xA0 DUP4 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0xC0 DUP3 ADD MSTORE PUSH1 0xC0 DUP4 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0xE0 DUP3 ADD MSTORE PUSH1 0xE0 DUP4 ADD MLOAD PUSH2 0x100 DUP3 ADD MSTORE PUSH2 0x100 DUP4 ADD MLOAD PUSH8 0xFFFFFFFFFFFFFFFF AND PUSH2 0x120 DUP3 ADD MSTORE PUSH2 0x120 DUP4 ADD MLOAD PUSH2 0x140 DUP3 ADD MSTORE PUSH2 0x160 DUP2 KECCAK256 SWAP2 POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x6EB224CB00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS SWAP1 PUSH4 0x6EB224CB SWAP1 PUSH2 0xE08 SWAP1 DUP5 SWAP1 PUSH32 0x0 SWAP1 PUSH1 0x4 ADD PUSH2 0x1515 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xE22 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0xE36 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH4 0xE946C1BB PUSH1 0xE0 SHL DUP5 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0xB3F SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x155D JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 GT ISZERO PUSH2 0xE75 JUMPI PUSH2 0xE75 PUSH2 0x505 PUSH1 0x2 DUP6 DUP6 PUSH2 0xE3D JUMP JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH32 0xBDE95CC2119E0200D80642397198ABFCF98E6E4DDDD0DE9C6320D86252AD40AB DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0xEB1 SWAP3 SWAP2 SWAP1 PUSH2 0x1475 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 CALLDATALOAD PUSH2 0x91C DUP2 PUSH2 0x19D7 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP4 PUSH1 0x1F DUP5 ADD SLT PUSH2 0xF52 JUMPI DUP2 DUP3 REVERT JUMPDEST POP DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xF69 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x20 DUP4 ADD SWAP2 POP DUP4 PUSH1 0x20 PUSH1 0x80 DUP4 MUL DUP6 ADD ADD GT ISZERO PUSH2 0xF84 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP4 PUSH1 0x1F DUP5 ADD SLT PUSH2 0xF9C JUMPI DUP2 DUP3 REVERT JUMPDEST POP DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xFB3 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x20 DUP4 ADD SWAP2 POP DUP4 PUSH1 0x20 DUP1 DUP4 MUL DUP6 ADD ADD GT ISZERO PUSH2 0xF84 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x91C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD PUSH2 0x91C DUP2 PUSH2 0x19F9 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x91C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x80 DUP9 DUP11 SUB SLT ISZERO PUSH2 0x101A JUMPI DUP3 DUP4 REVERT JUMPDEST DUP8 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x1031 JUMPI DUP5 DUP6 REVERT JUMPDEST DUP2 DUP11 ADD SWAP2 POP DUP11 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x1044 JUMPI DUP5 DUP6 REVERT JUMPDEST DUP2 CALLDATALOAD DUP2 DUP2 GT ISZERO PUSH2 0x1052 JUMPI DUP6 DUP7 REVERT JUMPDEST DUP12 PUSH1 0x20 PUSH2 0x180 DUP4 MUL DUP6 ADD ADD GT ISZERO PUSH2 0x1067 JUMPI DUP6 DUP7 REVERT JUMPDEST PUSH1 0x20 SWAP3 DUP4 ADD SWAP10 POP SWAP8 POP SWAP1 DUP10 ADD CALLDATALOAD SWAP1 DUP1 DUP3 GT ISZERO PUSH2 0x1081 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0x108D DUP12 DUP4 DUP13 ADD PUSH2 0xF41 JUMP JUMPDEST SWAP1 SWAP8 POP SWAP6 POP PUSH1 0x40 DUP11 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x10A5 JUMPI DUP5 DUP6 REVERT JUMPDEST POP PUSH2 0x10B2 DUP11 DUP3 DUP12 ADD PUSH2 0xF8B JUMP JUMPDEST SWAP1 SWAP5 POP SWAP3 POP PUSH2 0x10C6 SWAP1 POP DUP10 PUSH1 0x60 DUP11 ADD PUSH2 0xFCD JUMP JUMPDEST SWAP1 POP SWAP3 SWAP6 SWAP9 SWAP2 SWAP5 SWAP8 POP SWAP3 SWAP6 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x80 DUP9 DUP11 SUB SLT ISZERO PUSH2 0x10EE JUMPI DUP3 DUP4 REVERT JUMPDEST DUP8 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x1105 JUMPI DUP5 DUP6 REVERT JUMPDEST DUP2 DUP11 ADD SWAP2 POP DUP11 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x1118 JUMPI DUP5 DUP6 REVERT JUMPDEST DUP2 CALLDATALOAD DUP2 DUP2 GT ISZERO PUSH2 0x1126 JUMPI DUP6 DUP7 REVERT JUMPDEST DUP12 PUSH1 0x20 PUSH2 0x140 DUP4 MUL DUP6 ADD ADD GT ISZERO PUSH2 0x1067 JUMPI DUP6 DUP7 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x180 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x114E JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x1157 DUP2 PUSH2 0x1973 JUMP JUMPDEST SWAP1 POP PUSH2 0x1163 DUP5 DUP5 PUSH2 0xF36 JUMP JUMPDEST DUP2 MSTORE PUSH2 0x1172 DUP5 PUSH1 0x20 DUP6 ADD PUSH2 0xF36 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0x1184 DUP5 PUSH1 0x40 DUP6 ADD PUSH2 0xFDD JUMP JUMPDEST PUSH1 0x40 DUP3 ADD MSTORE PUSH2 0x1196 DUP5 PUSH1 0x60 DUP6 ADD PUSH2 0xFDD JUMP JUMPDEST PUSH1 0x60 DUP3 ADD MSTORE PUSH2 0x11A8 DUP5 PUSH1 0x80 DUP6 ADD PUSH2 0xFDD JUMP JUMPDEST PUSH1 0x80 DUP3 ADD MSTORE PUSH2 0x11BA DUP5 PUSH1 0xA0 DUP6 ADD PUSH2 0xF36 JUMP JUMPDEST PUSH1 0xA0 DUP3 ADD MSTORE PUSH2 0x11CC DUP5 PUSH1 0xC0 DUP6 ADD PUSH2 0xF36 JUMP JUMPDEST PUSH1 0xC0 DUP3 ADD MSTORE PUSH2 0x11DE DUP5 PUSH1 0xE0 DUP6 ADD PUSH2 0xF36 JUMP JUMPDEST PUSH1 0xE0 DUP3 ADD MSTORE PUSH2 0x100 PUSH2 0x11F2 DUP6 DUP3 DUP7 ADD PUSH2 0xF36 JUMP JUMPDEST SWAP1 DUP3 ADD MSTORE PUSH2 0x120 DUP4 DUP2 ADD CALLDATALOAD SWAP1 DUP3 ADD MSTORE PUSH2 0x140 PUSH2 0x1210 DUP6 DUP3 DUP7 ADD PUSH2 0xFE8 JUMP JUMPDEST SWAP1 DUP3 ADD MSTORE PUSH2 0x160 SWAP3 DUP4 ADD CALLDATALOAD SWAP3 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x140 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x123B JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x1244 DUP2 PUSH2 0x1973 JUMP JUMPDEST SWAP1 POP PUSH2 0x1250 DUP5 DUP5 PUSH2 0xF36 JUMP JUMPDEST DUP2 MSTORE PUSH2 0x125F DUP5 PUSH1 0x20 DUP6 ADD PUSH2 0xF36 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0x1271 DUP5 PUSH1 0x40 DUP6 ADD PUSH2 0xFDD JUMP JUMPDEST PUSH1 0x40 DUP3 ADD MSTORE PUSH2 0x1283 DUP5 PUSH1 0x60 DUP6 ADD PUSH2 0xFDD JUMP JUMPDEST PUSH1 0x60 DUP3 ADD MSTORE PUSH2 0x1295 DUP5 PUSH1 0x80 DUP6 ADD PUSH2 0xF36 JUMP JUMPDEST PUSH1 0x80 DUP3 ADD MSTORE PUSH2 0x12A7 DUP5 PUSH1 0xA0 DUP6 ADD PUSH2 0xF36 JUMP JUMPDEST PUSH1 0xA0 DUP3 ADD MSTORE PUSH2 0x12B9 DUP5 PUSH1 0xC0 DUP6 ADD PUSH2 0xF36 JUMP JUMPDEST PUSH1 0xC0 DUP3 ADD MSTORE PUSH1 0xE0 DUP4 ADD CALLDATALOAD PUSH1 0xE0 DUP3 ADD MSTORE PUSH2 0x100 PUSH2 0x12D7 DUP6 DUP3 DUP7 ADD PUSH2 0xFE8 JUMP JUMPDEST SWAP1 DUP3 ADD MSTORE PUSH2 0x120 SWAP3 DUP4 ADD CALLDATALOAD SWAP3 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x1300 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x919 DUP2 PUSH2 0x19F9 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x131D JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD PUSH2 0x1328 DUP2 PUSH2 0x19F9 JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MLOAD SWAP1 SWAP3 POP PUSH2 0x1339 DUP2 PUSH2 0x19F9 JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x1355 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH4 0xFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x919 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 MSTORE JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x13C3 JUMPI DUP2 MLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x1395 JUMP JUMPDEST POP SWAP5 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x4 DUP2 LT PUSH2 0x13DD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x13E6 DUP2 PUSH2 0x19CD JUMP JUMPDEST DUP3 MSTORE PUSH1 0x20 DUP2 ADD CALLDATALOAD PUSH1 0xFF DUP2 AND DUP1 DUP3 EQ PUSH2 0x13FD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x20 DUP5 ADD MSTORE POP PUSH1 0x40 DUP2 DUP2 ADD CALLDATALOAD SWAP1 DUP4 ADD MSTORE PUSH1 0x60 SWAP1 DUP2 ADD CALLDATALOAD SWAP2 ADD MSTORE JUMP JUMPDEST PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 MSTORE JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF AND SWAP1 MSTORE 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 SWAP1 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP3 SWAP1 SWAP3 AND DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 MSTORE PUSH2 0x14AE PUSH1 0x40 DUP4 ADD DUP6 PUSH2 0x1382 JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x14C0 DUP2 DUP6 PUSH2 0x1382 JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 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 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 PUSH1 0x60 DUP2 ADD PUSH2 0x156A DUP6 PUSH2 0x19CD JUMP JUMPDEST SWAP4 DUP2 MSTORE PUSH1 0x20 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 SWAP1 SWAP2 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 MSTORE DUP4 MLOAD DUP1 DUP3 DUP6 ADD MSTORE DUP3 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x15AA JUMPI DUP6 DUP2 ADD DUP4 ADD MLOAD DUP6 DUP3 ADD PUSH1 0x40 ADD MSTORE DUP3 ADD PUSH2 0x158E JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0x15BB JUMPI DUP4 PUSH1 0x40 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x40 ADD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x4B SWAP1 DUP3 ADD MSTORE PUSH32 0x426174636846696C6C4E61746976654F7264657273466561747572653A3A6261 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x74636846696C6C4C696D69744F72646572732F4D49534D4154434845445F4152 PUSH1 0x60 DUP3 ADD MSTORE PUSH32 0x5241595F4C454E47544853000000000000000000000000000000000000000000 PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x49 SWAP1 DUP3 ADD MSTORE PUSH32 0x426174636846696C6C4E61746976654F7264657273466561747572653A3A6261 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x74636846696C6C5266714F72646572732F4D49534D4154434845445F41525241 PUSH1 0x60 DUP3 ADD MSTORE PUSH32 0x595F4C454E475448530000000000000000000000000000000000000000000000 PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH2 0x260 DUP2 ADD PUSH1 0x20 DUP8 ADD PUSH2 0x1711 DUP4 PUSH2 0x170C DUP4 DUP12 PUSH2 0xF36 JUMP JUMPDEST PUSH2 0x1368 JUMP JUMPDEST PUSH2 0x171B DUP2 DUP10 PUSH2 0x199A JUMP JUMPDEST SWAP1 POP PUSH2 0x172A PUSH1 0x20 DUP5 ADD DUP3 PUSH2 0x1368 JUMP JUMPDEST POP PUSH2 0x1738 PUSH1 0x40 DUP9 ADD DUP9 PUSH2 0x19A7 JUMP JUMPDEST PUSH2 0x1745 PUSH1 0x40 DUP5 ADD DUP3 PUSH2 0x1418 JUMP JUMPDEST POP PUSH2 0x1753 PUSH1 0x60 DUP9 ADD DUP9 PUSH2 0x19A7 JUMP JUMPDEST PUSH2 0x1760 PUSH1 0x60 DUP5 ADD DUP3 PUSH2 0x1418 JUMP JUMPDEST POP PUSH2 0x176E PUSH1 0x80 DUP9 ADD DUP9 PUSH2 0x19A7 JUMP JUMPDEST PUSH2 0x177B PUSH1 0x80 DUP5 ADD DUP3 PUSH2 0x1418 JUMP JUMPDEST POP PUSH2 0x1789 PUSH1 0xA0 DUP9 ADD DUP9 PUSH2 0x199A JUMP JUMPDEST PUSH2 0x1796 PUSH1 0xA0 DUP5 ADD DUP3 PUSH2 0x1368 JUMP JUMPDEST POP PUSH2 0x17A4 PUSH1 0xC0 DUP9 ADD DUP9 PUSH2 0x199A JUMP JUMPDEST PUSH2 0x17B1 PUSH1 0xC0 DUP5 ADD DUP3 PUSH2 0x1368 JUMP JUMPDEST POP PUSH2 0x17BF PUSH1 0xE0 DUP9 ADD DUP9 PUSH2 0x199A JUMP JUMPDEST PUSH2 0x17CC PUSH1 0xE0 DUP5 ADD DUP3 PUSH2 0x1368 JUMP JUMPDEST POP PUSH2 0x100 PUSH2 0x17DC DUP2 DUP10 ADD DUP10 PUSH2 0x199A JUMP JUMPDEST PUSH2 0x17E8 DUP3 DUP6 ADD DUP3 PUSH2 0x1368 JUMP JUMPDEST POP POP PUSH2 0x120 DUP8 DUP2 ADD CALLDATALOAD SWAP1 DUP4 ADD MSTORE PUSH2 0x140 PUSH2 0x1804 DUP2 DUP10 ADD DUP10 PUSH2 0x19B4 JUMP JUMPDEST PUSH2 0x1810 DUP3 DUP6 ADD DUP3 PUSH2 0x142E JUMP JUMPDEST POP POP PUSH2 0x160 DUP8 DUP2 ADD CALLDATALOAD SWAP1 DUP4 ADD MSTORE PUSH2 0x182B PUSH2 0x180 DUP4 ADD DUP8 PUSH2 0x13CE JUMP JUMPDEST PUSH2 0x1839 PUSH2 0x200 DUP4 ADD DUP7 PUSH2 0x1418 JUMP JUMPDEST PUSH2 0x1847 PUSH2 0x220 DUP4 ADD DUP6 PUSH2 0x1368 JUMP JUMPDEST PUSH2 0x1855 PUSH2 0x240 DUP4 ADD DUP5 PUSH2 0x1368 JUMP JUMPDEST SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH2 0x200 DUP2 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x1876 DUP4 PUSH2 0x170C DUP4 DUP11 PUSH2 0xF36 JUMP JUMPDEST PUSH2 0x1880 DUP2 DUP9 PUSH2 0x199A JUMP JUMPDEST SWAP1 POP PUSH2 0x188F PUSH1 0x20 DUP5 ADD DUP3 PUSH2 0x1368 JUMP JUMPDEST POP PUSH2 0x189D PUSH1 0x40 DUP8 ADD DUP8 PUSH2 0x19A7 JUMP JUMPDEST PUSH2 0x18AA PUSH1 0x40 DUP5 ADD DUP3 PUSH2 0x1418 JUMP JUMPDEST POP PUSH2 0x18B8 PUSH1 0x60 DUP8 ADD DUP8 PUSH2 0x19A7 JUMP JUMPDEST PUSH2 0x18C5 PUSH1 0x60 DUP5 ADD DUP3 PUSH2 0x1418 JUMP JUMPDEST POP PUSH2 0x18D3 PUSH1 0x80 DUP8 ADD DUP8 PUSH2 0x199A JUMP JUMPDEST PUSH2 0x18E0 PUSH1 0x80 DUP5 ADD DUP3 PUSH2 0x1368 JUMP JUMPDEST POP PUSH2 0x18EE PUSH1 0xA0 DUP8 ADD DUP8 PUSH2 0x199A JUMP JUMPDEST PUSH2 0x18FB PUSH1 0xA0 DUP5 ADD DUP3 PUSH2 0x1368 JUMP JUMPDEST POP PUSH2 0x1909 PUSH1 0xC0 DUP8 ADD DUP8 PUSH2 0x199A JUMP JUMPDEST PUSH2 0x1916 PUSH1 0xC0 DUP5 ADD DUP3 PUSH2 0x1368 JUMP JUMPDEST POP PUSH1 0xE0 DUP7 ADD CALLDATALOAD PUSH1 0xE0 DUP4 ADD MSTORE PUSH2 0x100 PUSH2 0x1930 DUP2 DUP9 ADD DUP9 PUSH2 0x19B4 JUMP JUMPDEST PUSH2 0x193C DUP3 DUP6 ADD DUP3 PUSH2 0x142E JUMP JUMPDEST POP POP PUSH2 0x120 DUP7 DUP2 ADD CALLDATALOAD SWAP1 DUP4 ADD MSTORE PUSH2 0x1957 PUSH2 0x140 DUP4 ADD DUP7 PUSH2 0x13CE JUMP JUMPDEST PUSH2 0x1965 PUSH2 0x1C0 DUP4 ADD DUP6 PUSH2 0x1418 JUMP JUMPDEST PUSH2 0x14C0 PUSH2 0x1E0 DUP4 ADD DUP5 PUSH2 0x1368 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x1992 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 CALLDATALOAD PUSH2 0x919 DUP2 PUSH2 0x19D7 JUMP JUMPDEST PUSH1 0x0 DUP3 CALLDATALOAD PUSH2 0x919 DUP2 PUSH2 0x19F9 JUMP JUMPDEST PUSH1 0x0 DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x919 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x4 DUP2 LT PUSH2 0xC70 JUMPI INVALID JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0xC70 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0xC70 JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 CHAINID DUP11 JUMPDEST 0xCA PUSH29 0x7B19EA9C8E9E4FBB38847F05A9445111740A4B5A55CF8CE73A5D36473 PUSH16 0x6C634300060C00330000000000000000 ",
"sourceMap": "1322:6490:4:-:0;;;1755:23;1770:1;1773;;1755:14;:23::i;:::-;1703:75;;1785:139;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1920:4:13;1894:31;;;;1286:487:14;;1855:13:4;;1209:9:14;;1286:487;;1318:292;;1632:19;;1673:18;;1209:9;;1855:13:4;;1286:487:14;;;:::i;:::-;;;;-1:-1:-1;;1286:487:14;;;;;;;;;1259:528;;1286:487;1259:528;;;;1233:554;;-1:-1:-1;1322:6490:4;;-1:-1:-1;;1322:6490:4;2672:235:13;2834:20;2852:2;2834:20;;;;2859;2877:2;2859:20;;;;2833:47;2883:17;;;2833:67;2672:235;;;;;:::o;146:263:-1:-;;261:2;249:9;240:7;236:23;232:32;229:2;;;-1:-1;;267:12;229:2;83:13;;-1:-1;;;;;1690:54;;1894:35;;1884:2;;-1:-1;;1933:12;1884:2;319:74;223:186;-1:-1;;;223:186::o;776:668::-;607:37;;;1180:2;1165:18;;607:37;;;;1263:2;1248:18;;607:37;;;;1346:2;1331:18;;607:37;-1:-1;;;;;1690:54;1429:3;1414:19;;487:37;1015:3;1000:19;;986:458::o;:::-;1322:6490:4;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"immutableReferences": {
"457": [
{
"length": 32,
"start": 305
}
],
"1722": [
{
"length": 32,
"start": 3552
}
],
"1852": [
{
"length": 32,
"start": 2246
},
{
"length": 32,
"start": 2745
}
]
},
"linkReferences": {},
"object": "0x6080604052600436106100655760003560e01c806375103cb91161004357806375103cb9146100d85780638fd3ab80146100f8578063dab400f31461011a57610065565b8063031b905c1461006a5780631baaa00b146100955780636ae4b4f7146100b6575b600080fd5b34801561007657600080fd5b5061007f61012f565b60405161008c91906114c9565b60405180910390f35b6100a86100a3366004611000565b610153565b60405161008c92919061149b565b3480156100c257600080fd5b506100cb61052c565b60405161008c919061157e565b3480156100e457600080fd5b506100a86100f33660046110d4565b610565565b34801561010457600080fd5b5061010d61084b565b60405161008c91906114e8565b34801561012657600080fd5b5061007f6108c4565b7f000000000000000000000000000000000000000000000000000000000000000081565b606080878614801561016457508784145b6101a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161019a906115ef565b60405180910390fd5b8767ffffffffffffffff811180156101ba57600080fd5b506040519080825280602002602001820160405280156101e4578160200160208202803683370190505b5091508767ffffffffffffffff811180156101fe57600080fd5b50604051908082528060200260200182016040528015610228578160200160208202803683370190505b50905060006102c33a3073ffffffffffffffffffffffffffffffffffffffff1663487b5c206040518163ffffffff1660e01b815260040160206040518083038186803b15801561027757600080fd5b505afa15801561028b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102af9190611344565b63ffffffff166108e890919063ffffffff16565b90506000805b808b14610514573063414e4ccf8d8d848181106102e257fe5b905061018002018c8c858181106102f557fe5b9050608002018b8b8681811061030757fe5b905060200201602081019061031c91906112ef565b33336040518663ffffffff1660e01b815260040161033e9594939291906116f5565b6040805180830381600087803b15801561035757600080fd5b505af19250505080156103a5575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103a29181019061130b565b60015b6103ae57610401565b81818885815181106103bc57fe5b602002602001018886815181106103cf57fe5b6fffffffffffffffffffffffffffffffff9384166020918202929092010152911690526103fc8486610922565b935050505b858015610464575087878281811061041557fe5b905060200201602081019061042a91906112ef565b6fffffffffffffffffffffffffffffffff1685828151811061044857fe5b60200260200101516fffffffffffffffffffffffffffffffff16105b1561050c57600061049e6104998e8e8581811061047d57fe5b90506101800201803603810190610494919061113b565b61093e565b610ab5565b905061050a610505828885815181106104b357fe5b60200260200101516fffffffffffffffffffffffffffffffff168c8c878181106104d957fe5b90506020020160208101906104ee91906112ef565b6fffffffffffffffffffffffffffffffff16610b07565b610bc5565b505b6001016102c9565b5061051e81610bcd565b505097509795505050505050565b6040518060400160405280600981526020017f426174636846696c6c000000000000000000000000000000000000000000000081525081565b606080878614801561057657508784145b6105ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161019a90611672565b8767ffffffffffffffff811180156105c357600080fd5b506040519080825280602002602001820160405280156105ed578160200160208202803683370190505b5091508767ffffffffffffffff8111801561060757600080fd5b50604051908082528060200260200182016040528015610631578160200160208202803683370190505b50905060005b80891461083e573063a656186b8b8b8481811061065057fe5b905061014002018a8a8581811061066357fe5b90506080020189898681811061067557fe5b905060200201602081019061068a91906112ef565b336040518563ffffffff1660e01b81526004016106aa949392919061185f565b6040805180830381600087803b1580156106c357600080fd5b505af1925050508015610711575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261070e9181019061130b565b60015b61071a57610761565b818186858151811061072857fe5b6020026020010186868151811061073b57fe5b6fffffffffffffffffffffffffffffffff93841660209182029290920101529116905250505b8380156107c4575085858281811061077557fe5b905060200201602081019061078a91906112ef565b6fffffffffffffffffffffffffffffffff168382815181106107a857fe5b60200260200101516fffffffffffffffffffffffffffffffff16105b156108365760006107f96104998c8c858181106107dd57fe5b905061014002018036038101906107f49190611228565b610c73565b90506108346105058286858151811061080e57fe5b60200260200101516fffffffffffffffffffffffffffffffff168a8a878181106104d957fe5b505b600101610637565b5097509795505050505050565b60006108767f1baaa00b00000000000000000000000000000000000000000000000000000000610daa565b61089f7f75103cb900000000000000000000000000000000000000000000000000000000610daa565b507f2c64c5ef0000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000826108f75750600061091c565b8282028284828161090457fe5b04146109195761091961050560018686610e3d565b90505b92915050565b6000828201838110156109195761091961050560008686610e3d565b60006040517fce918627cb55462ddbb85e73de69a8b322f2bc88f4507c52fcad6d4c33c29d498152825173ffffffffffffffffffffffffffffffffffffffff166020820152602083015173ffffffffffffffffffffffffffffffffffffffff16604082015260408301516fffffffffffffffffffffffffffffffff16606082015260608301516fffffffffffffffffffffffffffffffff16608082015260808301516fffffffffffffffffffffffffffffffff1660a082015260a083015173ffffffffffffffffffffffffffffffffffffffff1660c082015260c083015173ffffffffffffffffffffffffffffffffffffffff1660e082015260e083015173ffffffffffffffffffffffffffffffffffffffff1661010082015261010083015173ffffffffffffffffffffffffffffffffffffffff1661012082015261012083015161014082015261014083015167ffffffffffffffff166101608201526101608301516101808201526101a08120915050919050565b60007f000000000000000000000000000000000000000000000000000000000000000082604051602001610aea92919061143c565b604051602081830303815290604052805190602001209050919050565b60607f1d44aa5d44fd7162f13b456f3c7766598d02f56029c083df67a6f11a6edd3c3e848484604051602401610b3f939291906114d2565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290509392505050565b805160208201fd5b8034118015610bdc5750333014155b15610c70576000610bed3483610e5c565b905060003373ffffffffffffffffffffffffffffffffffffffff1682604051610c1590611472565b60006040518083038185875af1925050503d8060008114610c52576040519150601f19603f3d011682016040523d82523d6000602084013e610c57565b606091505b5050905080610c6d57610c6d6105053384610e7b565b50505b50565b60006040517fe593d3fdfa8b60e5e17a1b2204662ecbe15c23f2084b9ad5bae40359540a7da98152825173ffffffffffffffffffffffffffffffffffffffff166020820152602083015173ffffffffffffffffffffffffffffffffffffffff16604082015260408301516fffffffffffffffffffffffffffffffff16606082015260608301516fffffffffffffffffffffffffffffffff166080820152608083015173ffffffffffffffffffffffffffffffffffffffff1660a082015260a083015173ffffffffffffffffffffffffffffffffffffffff1660c082015260c083015173ffffffffffffffffffffffffffffffffffffffff1660e082015260e083015161010082015261010083015167ffffffffffffffff166101208201526101208301516101408201526101608120915050919050565b6040517f6eb224cb0000000000000000000000000000000000000000000000000000000081523090636eb224cb90610e089084907f000000000000000000000000000000000000000000000000000000000000000090600401611515565b600060405180830381600087803b158015610e2257600080fd5b505af1158015610e36573d6000803e3d6000fd5b5050505050565b606063e946c1bb60e01b848484604051602401610b3f9392919061155d565b600082821115610e7557610e7561050560028585610e3d565b50900390565b60607fbde95cc2119e0200d80642397198abfcf98e6e4dddd0de9c6320d86252ad40ab8383604051602401610eb1929190611475565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905092915050565b803561091c816119d7565b60008083601f840112610f52578182fd5b50813567ffffffffffffffff811115610f69578182fd5b602083019150836020608083028501011115610f8457600080fd5b9250929050565b60008083601f840112610f9c578182fd5b50813567ffffffffffffffff811115610fb3578182fd5b6020830191508360208083028501011115610f8457600080fd5b8035801515811461091c57600080fd5b803561091c816119f9565b803567ffffffffffffffff8116811461091c57600080fd5b60008060008060008060006080888a03121561101a578283fd5b873567ffffffffffffffff80821115611031578485fd5b818a0191508a601f830112611044578485fd5b813581811115611052578586fd5b8b602061018083028501011115611067578586fd5b602092830199509750908901359080821115611081578485fd5b61108d8b838c01610f41565b909750955060408a01359150808211156110a5578485fd5b506110b28a828b01610f8b565b90945092506110c690508960608a01610fcd565b905092959891949750929550565b60008060008060008060006080888a0312156110ee578283fd5b873567ffffffffffffffff80821115611105578485fd5b818a0191508a601f830112611118578485fd5b813581811115611126578586fd5b8b602061014083028501011115611067578586fd5b600061018080838503121561114e578182fd5b61115781611973565b90506111638484610f36565b81526111728460208501610f36565b60208201526111848460408501610fdd565b60408201526111968460608501610fdd565b60608201526111a88460808501610fdd565b60808201526111ba8460a08501610f36565b60a08201526111cc8460c08501610f36565b60c08201526111de8460e08501610f36565b60e08201526101006111f285828601610f36565b90820152610120838101359082015261014061121085828601610fe8565b90820152610160928301359281019290925250919050565b600061014080838503121561123b578182fd5b61124481611973565b90506112508484610f36565b815261125f8460208501610f36565b60208201526112718460408501610fdd565b60408201526112838460608501610fdd565b60608201526112958460808501610f36565b60808201526112a78460a08501610f36565b60a08201526112b98460c08501610f36565b60c082015260e083013560e08201526101006112d785828601610fe8565b90820152610120928301359281019290925250919050565b600060208284031215611300578081fd5b8135610919816119f9565b6000806040838503121561131d578182fd5b8251611328816119f9565b6020840151909250611339816119f9565b809150509250929050565b600060208284031215611355578081fd5b815163ffffffff81168114610919578182fd5b73ffffffffffffffffffffffffffffffffffffffff169052565b6000815180845260208085019450808401835b838110156113c35781516fffffffffffffffffffffffffffffffff1687529582019590820190600101611395565b509495945050505050565b8035600481106113dd57600080fd5b6113e6816119cd565b8252602081013560ff81168082146113fd57600080fd5b60208401525060408181013590830152606090810135910152565b6fffffffffffffffffffffffffffffffff169052565b67ffffffffffffffff169052565b7f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b90565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b6000604082526114ae6040830185611382565b82810360208401526114c08185611382565b95945050505050565b90815260200190565b9283526020830191909152604082015260600190565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b7fffffffff0000000000000000000000000000000000000000000000000000000092909216825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b6060810161156a856119cd565b938152602081019290925260409091015290565b6000602080835283518082850152825b818110156115aa5785810183015185820160400152820161158e565b818111156115bb5783604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b6020808252604b908201527f426174636846696c6c4e61746976654f7264657273466561747572653a3a626160408201527f74636846696c6c4c696d69744f72646572732f4d49534d4154434845445f415260608201527f5241595f4c454e47544853000000000000000000000000000000000000000000608082015260a00190565b60208082526049908201527f426174636846696c6c4e61746976654f7264657273466561747572653a3a626160408201527f74636846696c6c5266714f72646572732f4d49534d4154434845445f4152524160608201527f595f4c454e475448530000000000000000000000000000000000000000000000608082015260a00190565b6102608101602087016117118361170c838b610f36565b611368565b61171b818961199a565b905061172a6020840182611368565b5061173860408801886119a7565b6117456040840182611418565b5061175360608801886119a7565b6117606060840182611418565b5061176e60808801886119a7565b61177b6080840182611418565b5061178960a088018861199a565b61179660a0840182611368565b506117a460c088018861199a565b6117b160c0840182611368565b506117bf60e088018861199a565b6117cc60e0840182611368565b506101006117dc8189018961199a565b6117e882850182611368565b50506101208781013590830152610140611804818901896119b4565b6118108285018261142e565b5050610160878101359083015261182b6101808301876113ce565b611839610200830186611418565b611847610220830185611368565b611855610240830184611368565b9695505050505050565b6102008101602086016118768361170c838a610f36565b611880818861199a565b905061188f6020840182611368565b5061189d60408701876119a7565b6118aa6040840182611418565b506118b860608701876119a7565b6118c56060840182611418565b506118d3608087018761199a565b6118e06080840182611368565b506118ee60a087018761199a565b6118fb60a0840182611368565b5061190960c087018761199a565b61191660c0840182611368565b5060e086013560e0830152610100611930818801886119b4565b61193c8285018261142e565b505061012086810135908301526119576101408301866113ce565b6119656101c0830185611418565b6114c06101e0830184611368565b60405181810167ffffffffffffffff8111828210171561199257600080fd5b604052919050565b60008235610919816119d7565b60008235610919816119f9565b6000823567ffffffffffffffff81168114610919578182fd5b60048110610c7057fe5b73ffffffffffffffffffffffffffffffffffffffff81168114610c7057600080fd5b6fffffffffffffffffffffffffffffffff81168114610c7057600080fdfea2646970667358221220468a5bca7c07b19ea9c8e9e4fbb38847f05a9445111740a4b5a55cf8ce73a5d364736f6c634300060c0033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x65 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x75103CB9 GT PUSH2 0x43 JUMPI DUP1 PUSH4 0x75103CB9 EQ PUSH2 0xD8 JUMPI DUP1 PUSH4 0x8FD3AB80 EQ PUSH2 0xF8 JUMPI DUP1 PUSH4 0xDAB400F3 EQ PUSH2 0x11A JUMPI PUSH2 0x65 JUMP JUMPDEST DUP1 PUSH4 0x31B905C EQ PUSH2 0x6A JUMPI DUP1 PUSH4 0x1BAAA00B EQ PUSH2 0x95 JUMPI DUP1 PUSH4 0x6AE4B4F7 EQ PUSH2 0xB6 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x76 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x7F PUSH2 0x12F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x8C SWAP2 SWAP1 PUSH2 0x14C9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xA8 PUSH2 0xA3 CALLDATASIZE PUSH1 0x4 PUSH2 0x1000 JUMP JUMPDEST PUSH2 0x153 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x8C SWAP3 SWAP2 SWAP1 PUSH2 0x149B JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xC2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xCB PUSH2 0x52C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x8C SWAP2 SWAP1 PUSH2 0x157E JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xE4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xA8 PUSH2 0xF3 CALLDATASIZE PUSH1 0x4 PUSH2 0x10D4 JUMP JUMPDEST PUSH2 0x565 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x104 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x10D PUSH2 0x84B JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x8C SWAP2 SWAP1 PUSH2 0x14E8 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x126 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x7F PUSH2 0x8C4 JUMP JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x60 DUP1 DUP8 DUP7 EQ DUP1 ISZERO PUSH2 0x164 JUMPI POP DUP8 DUP5 EQ JUMPDEST PUSH2 0x1A3 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x19A SWAP1 PUSH2 0x15EF JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP8 PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0x1BA 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 0x1E4 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP2 POP DUP8 PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0x1FE 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 0x228 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 PUSH2 0x2C3 GASPRICE ADDRESS PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x487B5C20 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x277 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x28B 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 0x2AF SWAP2 SWAP1 PUSH2 0x1344 JUMP JUMPDEST PUSH4 0xFFFFFFFF AND PUSH2 0x8E8 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP1 DUP12 EQ PUSH2 0x514 JUMPI ADDRESS PUSH4 0x414E4CCF DUP14 DUP14 DUP5 DUP2 DUP2 LT PUSH2 0x2E2 JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x180 MUL ADD DUP13 DUP13 DUP6 DUP2 DUP2 LT PUSH2 0x2F5 JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x80 MUL ADD DUP12 DUP12 DUP7 DUP2 DUP2 LT PUSH2 0x307 JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x31C SWAP2 SWAP1 PUSH2 0x12EF JUMP JUMPDEST CALLER CALLER PUSH1 0x40 MLOAD DUP7 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x33E SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x16F5 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x357 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0x3A5 JUMPI POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND DUP3 ADD SWAP1 SWAP3 MSTORE PUSH2 0x3A2 SWAP2 DUP2 ADD SWAP1 PUSH2 0x130B JUMP JUMPDEST PUSH1 0x1 JUMPDEST PUSH2 0x3AE JUMPI PUSH2 0x401 JUMP JUMPDEST DUP2 DUP2 DUP9 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x3BC JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP9 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x3CF JUMPI INVALID JUMPDEST PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP4 DUP5 AND PUSH1 0x20 SWAP2 DUP3 MUL SWAP3 SWAP1 SWAP3 ADD ADD MSTORE SWAP2 AND SWAP1 MSTORE PUSH2 0x3FC DUP5 DUP7 PUSH2 0x922 JUMP JUMPDEST SWAP4 POP POP POP JUMPDEST DUP6 DUP1 ISZERO PUSH2 0x464 JUMPI POP DUP8 DUP8 DUP3 DUP2 DUP2 LT PUSH2 0x415 JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x42A SWAP2 SWAP1 PUSH2 0x12EF JUMP JUMPDEST PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP6 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x448 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND LT JUMPDEST ISZERO PUSH2 0x50C JUMPI PUSH1 0x0 PUSH2 0x49E PUSH2 0x499 DUP15 DUP15 DUP6 DUP2 DUP2 LT PUSH2 0x47D JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x180 MUL ADD DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x494 SWAP2 SWAP1 PUSH2 0x113B JUMP JUMPDEST PUSH2 0x93E JUMP JUMPDEST PUSH2 0xAB5 JUMP JUMPDEST SWAP1 POP PUSH2 0x50A PUSH2 0x505 DUP3 DUP9 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x4B3 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP13 DUP13 DUP8 DUP2 DUP2 LT PUSH2 0x4D9 JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x4EE SWAP2 SWAP1 PUSH2 0x12EF JUMP JUMPDEST PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0xB07 JUMP JUMPDEST PUSH2 0xBC5 JUMP JUMPDEST POP JUMPDEST PUSH1 0x1 ADD PUSH2 0x2C9 JUMP JUMPDEST POP PUSH2 0x51E DUP2 PUSH2 0xBCD JUMP JUMPDEST POP POP SWAP8 POP SWAP8 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x9 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x426174636846696C6C0000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP2 JUMP JUMPDEST PUSH1 0x60 DUP1 DUP8 DUP7 EQ DUP1 ISZERO PUSH2 0x576 JUMPI POP DUP8 DUP5 EQ JUMPDEST PUSH2 0x5AC JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x19A SWAP1 PUSH2 0x1672 JUMP JUMPDEST DUP8 PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0x5C3 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 0x5ED JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP2 POP DUP8 PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0x607 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 0x631 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP1 DUP10 EQ PUSH2 0x83E JUMPI ADDRESS PUSH4 0xA656186B DUP12 DUP12 DUP5 DUP2 DUP2 LT PUSH2 0x650 JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x140 MUL ADD DUP11 DUP11 DUP6 DUP2 DUP2 LT PUSH2 0x663 JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x80 MUL ADD DUP10 DUP10 DUP7 DUP2 DUP2 LT PUSH2 0x675 JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x68A SWAP2 SWAP1 PUSH2 0x12EF JUMP JUMPDEST CALLER PUSH1 0x40 MLOAD DUP6 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x6AA SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x185F JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x6C3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0x711 JUMPI POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND DUP3 ADD SWAP1 SWAP3 MSTORE PUSH2 0x70E SWAP2 DUP2 ADD SWAP1 PUSH2 0x130B JUMP JUMPDEST PUSH1 0x1 JUMPDEST PUSH2 0x71A JUMPI PUSH2 0x761 JUMP JUMPDEST DUP2 DUP2 DUP7 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x728 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP7 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x73B JUMPI INVALID JUMPDEST PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP4 DUP5 AND PUSH1 0x20 SWAP2 DUP3 MUL SWAP3 SWAP1 SWAP3 ADD ADD MSTORE SWAP2 AND SWAP1 MSTORE POP POP JUMPDEST DUP4 DUP1 ISZERO PUSH2 0x7C4 JUMPI POP DUP6 DUP6 DUP3 DUP2 DUP2 LT PUSH2 0x775 JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x78A SWAP2 SWAP1 PUSH2 0x12EF JUMP JUMPDEST PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x7A8 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND LT JUMPDEST ISZERO PUSH2 0x836 JUMPI PUSH1 0x0 PUSH2 0x7F9 PUSH2 0x499 DUP13 DUP13 DUP6 DUP2 DUP2 LT PUSH2 0x7DD JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x140 MUL ADD DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x7F4 SWAP2 SWAP1 PUSH2 0x1228 JUMP JUMPDEST PUSH2 0xC73 JUMP JUMPDEST SWAP1 POP PUSH2 0x834 PUSH2 0x505 DUP3 DUP7 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x80E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP11 DUP11 DUP8 DUP2 DUP2 LT PUSH2 0x4D9 JUMPI INVALID JUMPDEST POP JUMPDEST PUSH1 0x1 ADD PUSH2 0x637 JUMP JUMPDEST POP SWAP8 POP SWAP8 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x876 PUSH32 0x1BAAA00B00000000000000000000000000000000000000000000000000000000 PUSH2 0xDAA JUMP JUMPDEST PUSH2 0x89F PUSH32 0x75103CB900000000000000000000000000000000000000000000000000000000 PUSH2 0xDAA JUMP JUMPDEST POP PUSH32 0x2C64C5EF00000000000000000000000000000000000000000000000000000000 SWAP1 JUMP JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH2 0x8F7 JUMPI POP PUSH1 0x0 PUSH2 0x91C JUMP JUMPDEST DUP3 DUP3 MUL DUP3 DUP5 DUP3 DUP2 PUSH2 0x904 JUMPI INVALID JUMPDEST DIV EQ PUSH2 0x919 JUMPI PUSH2 0x919 PUSH2 0x505 PUSH1 0x1 DUP7 DUP7 PUSH2 0xE3D JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD DUP4 DUP2 LT ISZERO PUSH2 0x919 JUMPI PUSH2 0x919 PUSH2 0x505 PUSH1 0x0 DUP7 DUP7 PUSH2 0xE3D JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD PUSH32 0xCE918627CB55462DDBB85E73DE69A8B322F2BC88F4507C52FCAD6D4C33C29D49 DUP2 MSTORE DUP3 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x20 DUP4 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x40 DUP4 ADD MLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x60 DUP4 ADD MLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0x80 DUP4 ADD MLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xA0 DUP4 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0xC0 DUP3 ADD MSTORE PUSH1 0xC0 DUP4 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0xE0 DUP3 ADD MSTORE PUSH1 0xE0 DUP4 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x100 DUP3 ADD MSTORE PUSH2 0x100 DUP4 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x120 DUP3 ADD MSTORE PUSH2 0x120 DUP4 ADD MLOAD PUSH2 0x140 DUP3 ADD MSTORE PUSH2 0x140 DUP4 ADD MLOAD PUSH8 0xFFFFFFFFFFFFFFFF AND PUSH2 0x160 DUP3 ADD MSTORE PUSH2 0x160 DUP4 ADD MLOAD PUSH2 0x180 DUP3 ADD MSTORE PUSH2 0x1A0 DUP2 KECCAK256 SWAP2 POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0xAEA SWAP3 SWAP2 SWAP1 PUSH2 0x143C 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 0x1D44AA5D44FD7162F13B456F3C7766598D02F56029C083DF67A6F11A6EDD3C3E DUP5 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0xB3F SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x14D2 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 DUP1 MLOAD PUSH1 0x20 DUP3 ADD REVERT JUMPDEST DUP1 CALLVALUE GT DUP1 ISZERO PUSH2 0xBDC JUMPI POP CALLER ADDRESS EQ ISZERO JUMPDEST ISZERO PUSH2 0xC70 JUMPI PUSH1 0x0 PUSH2 0xBED CALLVALUE DUP4 PUSH2 0xE5C JUMP JUMPDEST SWAP1 POP PUSH1 0x0 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP3 PUSH1 0x40 MLOAD PUSH2 0xC15 SWAP1 PUSH2 0x1472 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 0xC52 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 0xC57 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP POP SWAP1 POP DUP1 PUSH2 0xC6D JUMPI PUSH2 0xC6D PUSH2 0x505 CALLER DUP5 PUSH2 0xE7B JUMP JUMPDEST POP POP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD PUSH32 0xE593D3FDFA8B60E5E17A1B2204662ECBE15C23F2084B9AD5BAE40359540A7DA9 DUP2 MSTORE DUP3 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x20 DUP4 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x40 DUP4 ADD MLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x60 DUP4 ADD MLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0x80 DUP4 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xA0 DUP4 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0xC0 DUP3 ADD MSTORE PUSH1 0xC0 DUP4 ADD MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0xE0 DUP3 ADD MSTORE PUSH1 0xE0 DUP4 ADD MLOAD PUSH2 0x100 DUP3 ADD MSTORE PUSH2 0x100 DUP4 ADD MLOAD PUSH8 0xFFFFFFFFFFFFFFFF AND PUSH2 0x120 DUP3 ADD MSTORE PUSH2 0x120 DUP4 ADD MLOAD PUSH2 0x140 DUP3 ADD MSTORE PUSH2 0x160 DUP2 KECCAK256 SWAP2 POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x6EB224CB00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS SWAP1 PUSH4 0x6EB224CB SWAP1 PUSH2 0xE08 SWAP1 DUP5 SWAP1 PUSH32 0x0 SWAP1 PUSH1 0x4 ADD PUSH2 0x1515 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xE22 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0xE36 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH4 0xE946C1BB PUSH1 0xE0 SHL DUP5 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0xB3F SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x155D JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 GT ISZERO PUSH2 0xE75 JUMPI PUSH2 0xE75 PUSH2 0x505 PUSH1 0x2 DUP6 DUP6 PUSH2 0xE3D JUMP JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH32 0xBDE95CC2119E0200D80642397198ABFCF98E6E4DDDD0DE9C6320D86252AD40AB DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0xEB1 SWAP3 SWAP2 SWAP1 PUSH2 0x1475 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 CALLDATALOAD PUSH2 0x91C DUP2 PUSH2 0x19D7 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP4 PUSH1 0x1F DUP5 ADD SLT PUSH2 0xF52 JUMPI DUP2 DUP3 REVERT JUMPDEST POP DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xF69 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x20 DUP4 ADD SWAP2 POP DUP4 PUSH1 0x20 PUSH1 0x80 DUP4 MUL DUP6 ADD ADD GT ISZERO PUSH2 0xF84 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP4 PUSH1 0x1F DUP5 ADD SLT PUSH2 0xF9C JUMPI DUP2 DUP3 REVERT JUMPDEST POP DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xFB3 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x20 DUP4 ADD SWAP2 POP DUP4 PUSH1 0x20 DUP1 DUP4 MUL DUP6 ADD ADD GT ISZERO PUSH2 0xF84 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x91C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD PUSH2 0x91C DUP2 PUSH2 0x19F9 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x91C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x80 DUP9 DUP11 SUB SLT ISZERO PUSH2 0x101A JUMPI DUP3 DUP4 REVERT JUMPDEST DUP8 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x1031 JUMPI DUP5 DUP6 REVERT JUMPDEST DUP2 DUP11 ADD SWAP2 POP DUP11 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x1044 JUMPI DUP5 DUP6 REVERT JUMPDEST DUP2 CALLDATALOAD DUP2 DUP2 GT ISZERO PUSH2 0x1052 JUMPI DUP6 DUP7 REVERT JUMPDEST DUP12 PUSH1 0x20 PUSH2 0x180 DUP4 MUL DUP6 ADD ADD GT ISZERO PUSH2 0x1067 JUMPI DUP6 DUP7 REVERT JUMPDEST PUSH1 0x20 SWAP3 DUP4 ADD SWAP10 POP SWAP8 POP SWAP1 DUP10 ADD CALLDATALOAD SWAP1 DUP1 DUP3 GT ISZERO PUSH2 0x1081 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0x108D DUP12 DUP4 DUP13 ADD PUSH2 0xF41 JUMP JUMPDEST SWAP1 SWAP8 POP SWAP6 POP PUSH1 0x40 DUP11 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x10A5 JUMPI DUP5 DUP6 REVERT JUMPDEST POP PUSH2 0x10B2 DUP11 DUP3 DUP12 ADD PUSH2 0xF8B JUMP JUMPDEST SWAP1 SWAP5 POP SWAP3 POP PUSH2 0x10C6 SWAP1 POP DUP10 PUSH1 0x60 DUP11 ADD PUSH2 0xFCD JUMP JUMPDEST SWAP1 POP SWAP3 SWAP6 SWAP9 SWAP2 SWAP5 SWAP8 POP SWAP3 SWAP6 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x80 DUP9 DUP11 SUB SLT ISZERO PUSH2 0x10EE JUMPI DUP3 DUP4 REVERT JUMPDEST DUP8 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x1105 JUMPI DUP5 DUP6 REVERT JUMPDEST DUP2 DUP11 ADD SWAP2 POP DUP11 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x1118 JUMPI DUP5 DUP6 REVERT JUMPDEST DUP2 CALLDATALOAD DUP2 DUP2 GT ISZERO PUSH2 0x1126 JUMPI DUP6 DUP7 REVERT JUMPDEST DUP12 PUSH1 0x20 PUSH2 0x140 DUP4 MUL DUP6 ADD ADD GT ISZERO PUSH2 0x1067 JUMPI DUP6 DUP7 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x180 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x114E JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x1157 DUP2 PUSH2 0x1973 JUMP JUMPDEST SWAP1 POP PUSH2 0x1163 DUP5 DUP5 PUSH2 0xF36 JUMP JUMPDEST DUP2 MSTORE PUSH2 0x1172 DUP5 PUSH1 0x20 DUP6 ADD PUSH2 0xF36 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0x1184 DUP5 PUSH1 0x40 DUP6 ADD PUSH2 0xFDD JUMP JUMPDEST PUSH1 0x40 DUP3 ADD MSTORE PUSH2 0x1196 DUP5 PUSH1 0x60 DUP6 ADD PUSH2 0xFDD JUMP JUMPDEST PUSH1 0x60 DUP3 ADD MSTORE PUSH2 0x11A8 DUP5 PUSH1 0x80 DUP6 ADD PUSH2 0xFDD JUMP JUMPDEST PUSH1 0x80 DUP3 ADD MSTORE PUSH2 0x11BA DUP5 PUSH1 0xA0 DUP6 ADD PUSH2 0xF36 JUMP JUMPDEST PUSH1 0xA0 DUP3 ADD MSTORE PUSH2 0x11CC DUP5 PUSH1 0xC0 DUP6 ADD PUSH2 0xF36 JUMP JUMPDEST PUSH1 0xC0 DUP3 ADD MSTORE PUSH2 0x11DE DUP5 PUSH1 0xE0 DUP6 ADD PUSH2 0xF36 JUMP JUMPDEST PUSH1 0xE0 DUP3 ADD MSTORE PUSH2 0x100 PUSH2 0x11F2 DUP6 DUP3 DUP7 ADD PUSH2 0xF36 JUMP JUMPDEST SWAP1 DUP3 ADD MSTORE PUSH2 0x120 DUP4 DUP2 ADD CALLDATALOAD SWAP1 DUP3 ADD MSTORE PUSH2 0x140 PUSH2 0x1210 DUP6 DUP3 DUP7 ADD PUSH2 0xFE8 JUMP JUMPDEST SWAP1 DUP3 ADD MSTORE PUSH2 0x160 SWAP3 DUP4 ADD CALLDATALOAD SWAP3 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x140 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x123B JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x1244 DUP2 PUSH2 0x1973 JUMP JUMPDEST SWAP1 POP PUSH2 0x1250 DUP5 DUP5 PUSH2 0xF36 JUMP JUMPDEST DUP2 MSTORE PUSH2 0x125F DUP5 PUSH1 0x20 DUP6 ADD PUSH2 0xF36 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0x1271 DUP5 PUSH1 0x40 DUP6 ADD PUSH2 0xFDD JUMP JUMPDEST PUSH1 0x40 DUP3 ADD MSTORE PUSH2 0x1283 DUP5 PUSH1 0x60 DUP6 ADD PUSH2 0xFDD JUMP JUMPDEST PUSH1 0x60 DUP3 ADD MSTORE PUSH2 0x1295 DUP5 PUSH1 0x80 DUP6 ADD PUSH2 0xF36 JUMP JUMPDEST PUSH1 0x80 DUP3 ADD MSTORE PUSH2 0x12A7 DUP5 PUSH1 0xA0 DUP6 ADD PUSH2 0xF36 JUMP JUMPDEST PUSH1 0xA0 DUP3 ADD MSTORE PUSH2 0x12B9 DUP5 PUSH1 0xC0 DUP6 ADD PUSH2 0xF36 JUMP JUMPDEST PUSH1 0xC0 DUP3 ADD MSTORE PUSH1 0xE0 DUP4 ADD CALLDATALOAD PUSH1 0xE0 DUP3 ADD MSTORE PUSH2 0x100 PUSH2 0x12D7 DUP6 DUP3 DUP7 ADD PUSH2 0xFE8 JUMP JUMPDEST SWAP1 DUP3 ADD MSTORE PUSH2 0x120 SWAP3 DUP4 ADD CALLDATALOAD SWAP3 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x1300 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x919 DUP2 PUSH2 0x19F9 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x131D JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD PUSH2 0x1328 DUP2 PUSH2 0x19F9 JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MLOAD SWAP1 SWAP3 POP PUSH2 0x1339 DUP2 PUSH2 0x19F9 JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x1355 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH4 0xFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x919 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 MSTORE JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x13C3 JUMPI DUP2 MLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x1395 JUMP JUMPDEST POP SWAP5 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x4 DUP2 LT PUSH2 0x13DD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x13E6 DUP2 PUSH2 0x19CD JUMP JUMPDEST DUP3 MSTORE PUSH1 0x20 DUP2 ADD CALLDATALOAD PUSH1 0xFF DUP2 AND DUP1 DUP3 EQ PUSH2 0x13FD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x20 DUP5 ADD MSTORE POP PUSH1 0x40 DUP2 DUP2 ADD CALLDATALOAD SWAP1 DUP4 ADD MSTORE PUSH1 0x60 SWAP1 DUP2 ADD CALLDATALOAD SWAP2 ADD MSTORE JUMP JUMPDEST PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 MSTORE JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF AND SWAP1 MSTORE 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 SWAP1 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP3 SWAP1 SWAP3 AND DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 MSTORE PUSH2 0x14AE PUSH1 0x40 DUP4 ADD DUP6 PUSH2 0x1382 JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x14C0 DUP2 DUP6 PUSH2 0x1382 JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 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 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 PUSH1 0x60 DUP2 ADD PUSH2 0x156A DUP6 PUSH2 0x19CD JUMP JUMPDEST SWAP4 DUP2 MSTORE PUSH1 0x20 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 SWAP1 SWAP2 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 MSTORE DUP4 MLOAD DUP1 DUP3 DUP6 ADD MSTORE DUP3 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x15AA JUMPI DUP6 DUP2 ADD DUP4 ADD MLOAD DUP6 DUP3 ADD PUSH1 0x40 ADD MSTORE DUP3 ADD PUSH2 0x158E JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0x15BB JUMPI DUP4 PUSH1 0x40 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x40 ADD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x4B SWAP1 DUP3 ADD MSTORE PUSH32 0x426174636846696C6C4E61746976654F7264657273466561747572653A3A6261 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x74636846696C6C4C696D69744F72646572732F4D49534D4154434845445F4152 PUSH1 0x60 DUP3 ADD MSTORE PUSH32 0x5241595F4C454E47544853000000000000000000000000000000000000000000 PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x49 SWAP1 DUP3 ADD MSTORE PUSH32 0x426174636846696C6C4E61746976654F7264657273466561747572653A3A6261 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x74636846696C6C5266714F72646572732F4D49534D4154434845445F41525241 PUSH1 0x60 DUP3 ADD MSTORE PUSH32 0x595F4C454E475448530000000000000000000000000000000000000000000000 PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH2 0x260 DUP2 ADD PUSH1 0x20 DUP8 ADD PUSH2 0x1711 DUP4 PUSH2 0x170C DUP4 DUP12 PUSH2 0xF36 JUMP JUMPDEST PUSH2 0x1368 JUMP JUMPDEST PUSH2 0x171B DUP2 DUP10 PUSH2 0x199A JUMP JUMPDEST SWAP1 POP PUSH2 0x172A PUSH1 0x20 DUP5 ADD DUP3 PUSH2 0x1368 JUMP JUMPDEST POP PUSH2 0x1738 PUSH1 0x40 DUP9 ADD DUP9 PUSH2 0x19A7 JUMP JUMPDEST PUSH2 0x1745 PUSH1 0x40 DUP5 ADD DUP3 PUSH2 0x1418 JUMP JUMPDEST POP PUSH2 0x1753 PUSH1 0x60 DUP9 ADD DUP9 PUSH2 0x19A7 JUMP JUMPDEST PUSH2 0x1760 PUSH1 0x60 DUP5 ADD DUP3 PUSH2 0x1418 JUMP JUMPDEST POP PUSH2 0x176E PUSH1 0x80 DUP9 ADD DUP9 PUSH2 0x19A7 JUMP JUMPDEST PUSH2 0x177B PUSH1 0x80 DUP5 ADD DUP3 PUSH2 0x1418 JUMP JUMPDEST POP PUSH2 0x1789 PUSH1 0xA0 DUP9 ADD DUP9 PUSH2 0x199A JUMP JUMPDEST PUSH2 0x1796 PUSH1 0xA0 DUP5 ADD DUP3 PUSH2 0x1368 JUMP JUMPDEST POP PUSH2 0x17A4 PUSH1 0xC0 DUP9 ADD DUP9 PUSH2 0x199A JUMP JUMPDEST PUSH2 0x17B1 PUSH1 0xC0 DUP5 ADD DUP3 PUSH2 0x1368 JUMP JUMPDEST POP PUSH2 0x17BF PUSH1 0xE0 DUP9 ADD DUP9 PUSH2 0x199A JUMP JUMPDEST PUSH2 0x17CC PUSH1 0xE0 DUP5 ADD DUP3 PUSH2 0x1368 JUMP JUMPDEST POP PUSH2 0x100 PUSH2 0x17DC DUP2 DUP10 ADD DUP10 PUSH2 0x199A JUMP JUMPDEST PUSH2 0x17E8 DUP3 DUP6 ADD DUP3 PUSH2 0x1368 JUMP JUMPDEST POP POP PUSH2 0x120 DUP8 DUP2 ADD CALLDATALOAD SWAP1 DUP4 ADD MSTORE PUSH2 0x140 PUSH2 0x1804 DUP2 DUP10 ADD DUP10 PUSH2 0x19B4 JUMP JUMPDEST PUSH2 0x1810 DUP3 DUP6 ADD DUP3 PUSH2 0x142E JUMP JUMPDEST POP POP PUSH2 0x160 DUP8 DUP2 ADD CALLDATALOAD SWAP1 DUP4 ADD MSTORE PUSH2 0x182B PUSH2 0x180 DUP4 ADD DUP8 PUSH2 0x13CE JUMP JUMPDEST PUSH2 0x1839 PUSH2 0x200 DUP4 ADD DUP7 PUSH2 0x1418 JUMP JUMPDEST PUSH2 0x1847 PUSH2 0x220 DUP4 ADD DUP6 PUSH2 0x1368 JUMP JUMPDEST PUSH2 0x1855 PUSH2 0x240 DUP4 ADD DUP5 PUSH2 0x1368 JUMP JUMPDEST SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH2 0x200 DUP2 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x1876 DUP4 PUSH2 0x170C DUP4 DUP11 PUSH2 0xF36 JUMP JUMPDEST PUSH2 0x1880 DUP2 DUP9 PUSH2 0x199A JUMP JUMPDEST SWAP1 POP PUSH2 0x188F PUSH1 0x20 DUP5 ADD DUP3 PUSH2 0x1368 JUMP JUMPDEST POP PUSH2 0x189D PUSH1 0x40 DUP8 ADD DUP8 PUSH2 0x19A7 JUMP JUMPDEST PUSH2 0x18AA PUSH1 0x40 DUP5 ADD DUP3 PUSH2 0x1418 JUMP JUMPDEST POP PUSH2 0x18B8 PUSH1 0x60 DUP8 ADD DUP8 PUSH2 0x19A7 JUMP JUMPDEST PUSH2 0x18C5 PUSH1 0x60 DUP5 ADD DUP3 PUSH2 0x1418 JUMP JUMPDEST POP PUSH2 0x18D3 PUSH1 0x80 DUP8 ADD DUP8 PUSH2 0x199A JUMP JUMPDEST PUSH2 0x18E0 PUSH1 0x80 DUP5 ADD DUP3 PUSH2 0x1368 JUMP JUMPDEST POP PUSH2 0x18EE PUSH1 0xA0 DUP8 ADD DUP8 PUSH2 0x199A JUMP JUMPDEST PUSH2 0x18FB PUSH1 0xA0 DUP5 ADD DUP3 PUSH2 0x1368 JUMP JUMPDEST POP PUSH2 0x1909 PUSH1 0xC0 DUP8 ADD DUP8 PUSH2 0x199A JUMP JUMPDEST PUSH2 0x1916 PUSH1 0xC0 DUP5 ADD DUP3 PUSH2 0x1368 JUMP JUMPDEST POP PUSH1 0xE0 DUP7 ADD CALLDATALOAD PUSH1 0xE0 DUP4 ADD MSTORE PUSH2 0x100 PUSH2 0x1930 DUP2 DUP9 ADD DUP9 PUSH2 0x19B4 JUMP JUMPDEST PUSH2 0x193C DUP3 DUP6 ADD DUP3 PUSH2 0x142E JUMP JUMPDEST POP POP PUSH2 0x120 DUP7 DUP2 ADD CALLDATALOAD SWAP1 DUP4 ADD MSTORE PUSH2 0x1957 PUSH2 0x140 DUP4 ADD DUP7 PUSH2 0x13CE JUMP JUMPDEST PUSH2 0x1965 PUSH2 0x1C0 DUP4 ADD DUP6 PUSH2 0x1418 JUMP JUMPDEST PUSH2 0x14C0 PUSH2 0x1E0 DUP4 ADD DUP5 PUSH2 0x1368 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x1992 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 CALLDATALOAD PUSH2 0x919 DUP2 PUSH2 0x19D7 JUMP JUMPDEST PUSH1 0x0 DUP3 CALLDATALOAD PUSH2 0x919 DUP2 PUSH2 0x19F9 JUMP JUMPDEST PUSH1 0x0 DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x919 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x4 DUP2 LT PUSH2 0xC70 JUMPI INVALID JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0xC70 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0xC70 JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 CHAINID DUP11 JUMPDEST 0xCA PUSH29 0x7B19EA9C8E9E4FBB38847F05A9445111740A4B5A55CF8CE73A5D36473 PUSH16 0x6C634300060C00330000000000000000 ",
"sourceMap": "1322:6490:4:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1703:75;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2917:2365;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;1601:58::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;5834:1976::-;;;;;;;;;;-1:-1:-1;5834:1976:4;;;;;:::i;:::-;;:::i;2100:261::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;990:48:14:-;;;;;;;;;;;;;:::i;1703:75:4:-;;;:::o;2917:2365::-;3223:40;;3363:34;;;:83;;;;-1:-1:-1;3401:45:4;;;3363:83;3342:205;;;;;;;;;;;;:::i;:::-;;;;;;;;;3597:6;3583:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3583:28:4;-1:-1:-1;3557:54:4;-1:-1:-1;3661:6:4;3647:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3647:28:4;;3621:54;;3685:19;3707:105;3800:11;3744:4;3715:60;;;:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3707:71;;:92;;:105;;;;:::i;:::-;3685:127;-1:-1:-1;3822:26:4;;3858:1342;3878:18;;;3858:1342;;3966:4;3937:51;4035:6;;4042:1;4035:9;;;;;;;;;;;;4070:10;;4081:1;4070:13;;;;;;;;;;;;4109:21;;4131:1;4109:24;;;;;;;;;;;;;;;;;;;;:::i;:::-;4159:10;4195;3937:290;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3937:290:4;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;3917:701;;;;;4469:22;4493;4390:23;4414:1;4390:26;;;;;;;;;;;;;4418:23;4442:1;4418:26;;;;;;;;4389:127;;;;4418:26;;;;;;;;;4389:127;;;;;4555:39;:18;4582:11;4555:26;:39::i;:::-;4534:60;;4244:365;;3917:701;4653:18;:91;;;;;4720:21;;4742:1;4720:24;;;;;;;;;;;;;;;;;;;;:::i;:::-;4691:53;;:23;4715:1;4691:26;;;;;;;;;;;;;;:53;;;4653:91;4632:558;;;4777:17;4797:103;4833:49;4872:6;;4879:1;4872:9;;;;;;;;;;;;4833:49;;;;;;;;;;:::i;:::-;:38;:49::i;:::-;4797:14;:103::i;:::-;4777:123;;4972:203;:193;5044:9;5075:23;5099:1;5075:26;;;;;;;;;;;;;;4972:193;;5123:21;;5145:1;5123:24;;;;;;;;;;;;;;;;;;;;:::i;:::-;4972:193;;:50;:193::i;:::-;:201;:203::i;:::-;4632:558;;3898:3;;3858:1342;;;;5209:66;5256:18;5209:46;:66::i;:::-;2917:2365;;;;;;;;;;;;:::o;1601:58::-;;;;;;;;;;;;;;;;;;;:::o;5834:1976::-;6120:40;;6260:34;;;:83;;;;-1:-1:-1;6298:45:4;;;6260:83;6239:203;;;;;;;;;;;;:::i;:::-;6492:6;6478:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6478:28:4;-1:-1:-1;6452:54:4;-1:-1:-1;6556:6:4;6542:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6542:28:4;;6516:54;;6585:9;6580:1224;6600:18;;;6580:1224;;6688:4;6659:49;6755:6;;6762:1;6755:9;;;;;;;;;;;;6790:10;;6801:1;6790:13;;;;;;;;;;;;6829:21;;6851:1;6829:24;;;;;;;;;;;;;;;;;;;;:::i;:::-;6879:10;6659:252;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6659:252:4;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;6639:585;;;;;7153:22;7177;7074:23;7098:1;7074:26;;;;;;;;;;;;;7102:23;7126:1;7102:26;;;;;;;;7073:127;;;;7102:26;;;;;;;;;7073:127;;;;;-1:-1:-1;;6639:585:4;7259:18;:91;;;;;7326:21;;7348:1;7326:24;;;;;;;;;;;;;;;;;;;;:::i;:::-;7297:53;;:23;7321:1;7297:26;;;;;;;;;;;;;;:53;;;7259:91;7238:556;;;7437:17;7457:101;7493:47;7530:6;;7537:1;7530:9;;;;;;;;;;;;7493:47;;;;;;;;;;:::i;:::-;:36;:47::i;7457:101::-;7437:121;;7576:203;:193;7648:9;7679:23;7703:1;7679:26;;;;;;;;;;;;;;7576:193;;7727:21;;7749:1;7727:24;;;;;;7576:203;7238:556;;6620:3;;6580:1224;;;;5834:1976;;;;;;;;;;:::o;2100:261::-;2153:14;2183:60;2208:34;2183:24;:60::i;:::-;2253:58;2278:32;2253:24;:58::i;:::-;-1:-1:-1;2328:26:4;2100:261;:::o;990:48:14:-;;;:::o;764:457:18:-;850:7;877:6;873:45;;-1:-1:-1;906:1:18;899:8;;873:45;939:5;;;943:1;939;:5;:1;958:5;;;;;:10;954:243;;984:202;1009:176;1069:64;1151:1;1170;1009:42;:176::i;984:202::-;1213:1;-1:-1:-1;764:457:18;;;;;:::o;2004:392::-;2090:7;2125:5;;;2144;;;2140:232;;;2165:196;2190:170;2250:58;2326:1;2345;2190:42;:170::i;3721:2042:11:-;3826:18;4357:4;4351:11;4387:21;4382:3;4375:34;4502:5;4496:12;4482;4478:31;4471:4;4466:3;4462:14;4455:55;4614:4;4607:5;4603:16;4597:23;4583:12;4579:42;4572:4;4567:3;4563:14;4556:66;4728:4;4721:5;4717:16;4711:23;4696:13;4692:43;4685:4;4680:3;4676:14;4669:67;4842:4;4835:5;4831:16;4825:23;4810:13;4806:43;4799:4;4794:3;4790:14;4783:67;4964:4;4957:5;4953:16;4947:23;4932:13;4928:43;4921:4;4916:3;4912:14;4905:67;5071:4;5064:5;5060:16;5054:23;5040:12;5036:42;5029:4;5024:3;5020:14;5013:66;5178:4;5171:5;5167:16;5161:23;5147:12;5143:42;5136:4;5131:3;5127:14;5120:66;5287:4;5280:5;5276:16;5270:23;5256:12;5252:42;5244:5;5239:3;5235:15;5228:67;5402:5;5395;5391:17;5385:24;5371:12;5367:43;5359:5;5354:3;5350:15;5343:68;5492:5;5485;5481:17;5475:24;5467:5;5462:3;5458:15;5451:49;5601:5;5594;5590:17;5584:24;5570:12;5566:43;5558:5;5553:3;5549:15;5542:68;5691:5;5684;5680:17;5674:24;5666:5;5661:3;5657:15;5650:49;5741:5;5736:3;5726:21;5712:35;;;4326:1431;;;:::o;1810:260:14:-;1901:18;2005:23;2042:10;1952:110;;;;;;;;;:::i;:::-;;;;;;;;;;;;;1942:121;;;;;;1935:128;;1810:260;;;:::o;4211:443:1:-;4403:12;4481:62;4558:9;4581:22;4617:20;4438:209;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4211:443:1;;;;;:::o;1531:170:20:-;1674:9;1668:16;1661:4;1650:9;1646:20;1639:46;7797:567:11;7913:18;7901:9;:30;:61;;;;-1:-1:-1;7935:10:11;7957:4;7935:27;;7901:61;7897:461;;;7978:20;8001:37;:9;8019:18;8001:17;:37::i;:::-;7978:60;;8053:12;8070:27;:49;;8127:12;8070:74;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8052:92;;;8163:7;8158:190;;8190:143;:133;8261:10;8293:12;8190:49;:133::i;:143::-;7897:461;;;7797:567;:::o;5911:1727::-;6012:18;6472:4;6466:11;6502:19;6497:3;6490:32;6615:5;6609:12;6595;6591:31;6584:4;6579:3;6575:14;6568:55;6727:4;6720:5;6716:16;6710:23;6696:12;6692:42;6685:4;6680:3;6676:14;6669:66;6841:4;6834:5;6830:16;6824:23;6809:13;6805:43;6798:4;6793:3;6789:14;6782:67;6955:4;6948:5;6944:16;6938:23;6923:13;6919:43;6912:4;6907:3;6903:14;6896:67;7062:4;7055:5;7051:16;7045:23;7031:12;7027:42;7020:4;7015:3;7011:14;7004:66;7169:4;7162:5;7158:16;7152:23;7138:12;7134:42;7127:4;7122:3;7118:14;7111:66;7279:4;7272:5;7268:16;7262:23;7248:12;7244:42;7237:4;7232:3;7228:14;7221:66;7368:4;7361:5;7357:16;7351:23;7343:5;7338:3;7334:15;7327:48;7476:5;7469;7465:17;7459:24;7445:12;7441:43;7433:5;7428:3;7424:15;7417:68;7566:5;7559;7555:17;7549:24;7541:5;7536:3;7532:15;7525:49;7616:5;7611:3;7601:21;7587:35;;;6441:1191;;;:::o;2201:168:13:-;2283:79;;;;;2322:4;;2283:52;;:79;;2336:8;;2346:15;;2283:79;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2201:168;:::o;1401:322:21:-;1554:12;818:10;1625:28;;1667:9;1690:1;1705;1589:127;;;;;;;;;;:::i;1625:373:18:-;1711:7;1742:1;1738;:5;1734:236;;;1759:200;1784:174;1844:62;1924:1;1943;1784:42;:174::i;1759:200::-;-1:-1:-1;1986:5:18;;;1625:373::o;730:339:1:-;872:12;950:53;1018:8;1040:12;907:155;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;730:339:1;;;;:::o;5:130:-1:-;72:20;;97:33;72:20;97:33;:::i;1048:381::-;;;1207:3;1200:4;1192:6;1188:17;1184:27;1174:2;;-1:-1;;1215:12;1174:2;-1:-1;1245:20;;1285:18;1274:30;;1271:2;;;-1:-1;;1307:12;1271:2;1351:4;1343:6;1339:17;1327:29;;1402:3;1351:4;1394;1386:6;1382:17;1343:6;1368:32;;1365:41;1362:2;;;1419:1;;1409:12;1362:2;1167:262;;;;;:::o;1455:352::-;;;1585:3;1578:4;1570:6;1566:17;1562:27;1552:2;;-1:-1;;1593:12;1552:2;-1:-1;1623:20;;1663:18;1652:30;;1649:2;;;-1:-1;;1685:12;1649:2;1729:4;1721:6;1717:17;1705:29;;1780:3;1729:4;;1764:6;1760:17;1721:6;1746:32;;1743:41;1740:2;;;1797:1;;1787:12;1815:124;1879:20;;31380:13;;31373:21;34542:32;;34532:2;;34588:1;;34578:12;6272:130;6339:20;;6364:33;6339:20;6364:33;:::i;6826:128::-;6892:20;;32553:18;32542:30;;35445:34;;35435:2;;35493:1;;35483:12;7094:1197;;;;;;;;7410:3;7398:9;7389:7;7385:23;7381:33;7378:2;;;-1:-1;;7417:12;7378:2;7475:17;7462:31;7513:18;;7505:6;7502:30;7499:2;;;-1:-1;;7535:12;7499:2;7666:6;7655:9;7651:22;;;345:3;338:4;330:6;326:17;322:27;312:2;;-1:-1;;353:12;312:2;396:6;383:20;7513:18;415:6;412:30;409:2;;;-1:-1;;445:12;409:2;542:3;489:4;532:6;524;520:19;481:6;506:34;;503:43;500:2;;;-1:-1;;549:12;500:2;489:4;477:17;;;;-1:-1;7555:128;-1:-1;7733:18;;;7720:32;;7761:30;;;7758:2;;;-1:-1;;7794:12;7758:2;7832:109;7933:7;7924:6;7913:9;7909:22;7832:109;:::i;:::-;7814:127;;-1:-1;7814:127;-1:-1;8006:2;7991:18;;7978:32;;-1:-1;8019:30;;;8016:2;;;-1:-1;;8052:12;8016:2;;8090:80;8162:7;8153:6;8142:9;8138:22;8090:80;:::i;:::-;8072:98;;-1:-1;8072:98;-1:-1;8225:50;;-1:-1;8267:7;8207:2;8243:22;;8225:50;:::i;:::-;8215:60;;7372:919;;;;;;;;;;:::o;8298:1193::-;;;;;;;;8612:3;8600:9;8591:7;8587:23;8583:33;8580:2;;;-1:-1;;8619:12;8580:2;8677:17;8664:31;8715:18;;8707:6;8704:30;8701:2;;;-1:-1;;8737:12;8701:2;8866:6;8855:9;8851:22;;;776:3;769:4;761:6;757:17;753:27;743:2;;-1:-1;;784:12;743:2;827:6;814:20;8715:18;846:6;843:30;840:2;;;-1:-1;;876:12;840:2;973:3;920:4;963:6;955;951:19;912:6;937:34;;934:43;931:2;;;-1:-1;;980:12;9498:298;;9630:3;;9618:9;9609:7;9605:23;9601:33;9598:2;;;-1:-1;;9637:12;9598:2;2633:22;9630:3;2633:22;:::i;:::-;2624:31;;2743:72;2811:3;2787:22;2743:72;:::i;:::-;2725:16;2718:98;2916:72;2984:3;2883:2;2964:9;2960:22;2916:72;:::i;:::-;2883:2;2902:5;2898:16;2891:98;3090:49;3135:3;3057:2;3115:9;3111:22;3090:49;:::i;:::-;3057:2;3076:5;3072:16;3065:75;3241:49;3286:3;3208:2;3266:9;3262:22;3241:49;:::i;:::-;3208:2;3227:5;3223:16;3216:75;3401:49;3446:3;3367;3426:9;3422:22;3401:49;:::i;:::-;3367:3;3387:5;3383:16;3376:75;3547:49;3592:3;3513;3572:9;3568:22;3547:49;:::i;:::-;3513:3;3533:5;3529:16;3522:75;3693:49;3738:3;3659;3718:9;3714:22;3693:49;:::i;:::-;3659:3;3679:5;3675:16;3668:75;3840:49;3885:3;3806;3865:9;3861:22;3840:49;:::i;:::-;3806:3;3826:5;3822:16;3815:75;3959:3;3995:49;4040:3;3959;4020:9;4016:22;3995:49;:::i;:::-;3975:18;;;3968:77;4106:3;4163:22;;;2013:20;4122:18;;;4115:77;4255:3;4291:48;4335:3;4311:22;;;4291:48;:::i;:::-;4271:18;;;4264:76;4401:3;4458:22;;;6617:20;4417:18;;;4410:77;;;;-1:-1;4275:5;9592:204;-1:-1;9592:204::o;9803:294::-;;9933:3;;9921:9;9912:7;9908:23;9904:33;9901:2;;;-1:-1;;9940:12;9901:2;4705:22;9933:3;4705:22;:::i;:::-;4696:31;;4815:72;4883:3;4859:22;4815:72;:::i;:::-;4797:16;4790:98;4988:72;5056:3;4955:2;5036:9;5032:22;4988:72;:::i;:::-;4955:2;4974:5;4970:16;4963:98;5162:49;5207:3;5129:2;5187:9;5183:22;5162:49;:::i;:::-;5129:2;5148:5;5144:16;5137:75;5313:49;5358:3;5280:2;5338:9;5334:22;5313:49;:::i;:::-;5280:2;5299:5;5295:16;5288:75;5459:49;5504:3;5425;5484:9;5480:22;5459:49;:::i;:::-;5425:3;5445:5;5441:16;5434:75;5605:49;5650:3;5571;5630:9;5626:22;5605:49;:::i;:::-;5571:3;5591:5;5587:16;5580:75;5754:49;5799:3;5720;5779:9;5775:22;5754:49;:::i;:::-;5720:3;5740:5;5736:16;5729:75;5865:3;5924:9;5920:22;2013:20;5865:3;5885:5;5881:16;5874:75;6012:3;6048:48;6092:3;6012;6072:9;6068:22;6048:48;:::i;:::-;6028:18;;;6021:76;6158:3;6215:22;;;6617:20;6174:18;;;6167:77;;;;-1:-1;6032:5;9895:202;-1:-1;9895:202::o;10104:241::-;;10208:2;10196:9;10187:7;10183:23;10179:32;10176:2;;;-1:-1;;10214:12;10176:2;6352:6;6339:20;6364:33;6391:5;6364:33;:::i;10352:399::-;;;10484:2;10472:9;10463:7;10459:23;10455:32;10452:2;;;-1:-1;;10490:12;10452:2;6493:6;6487:13;6505:33;6532:5;6505:33;:::i;:::-;10653:2;10703:22;;6487:13;10542:74;;-1:-1;6505:33;6487:13;6505:33;:::i;:::-;10661:74;;;;10446:305;;;;;:::o;10758:261::-;;10872:2;10860:9;10851:7;10847:23;10843:32;10840:2;;;-1:-1;;10878:12;10840:2;6770:6;6764:13;32458:10;35350:5;32447:22;35326:5;35323:34;35313:2;;-1:-1;;35361:12;11208:142;32252:42;32241:54;11287:58;;11281:69::o;11618:690::-;;11811:5;29165:12;29581:6;29576:3;29569:19;29618:4;;29613:3;29609:14;11823:93;;29618:4;11987:5;29019:14;-1:-1;12026:260;12051:6;12048:1;12045:13;12026:260;;;12112:13;;32132:34;32121:46;21143:37;;11180:14;;;;29424;;;;12073:1;12066:9;12026:260;;;-1:-1;12292:10;;11742:566;-1:-1;;;;;11742:566::o;20149:926::-;2364:6;2351:20;34985:1;34978:5;34975:12;34965:2;;-1:-1;;34991:12;34965:2;31845:53;31892:5;31845:53;:::i;:::-;13237:66;;30692:2;30683:12;;7026:20;32655:4;32644:16;;35566:33;;;35556:2;;-1:-1;;35603:12;35556:2;30692;20683:14;;21706:35;-1:-1;20801:4;20790:16;;;2013:20;20861:14;;;12377:37;30345:12;;;;2013:20;21039:14;;12377:37;20271:804::o;21082:103::-;32132:34;32121:46;21143:37;;21137:48::o;21542:100::-;32553:18;32542:30;21601:36;;21595:47::o;21753:659::-;14423:66;14403:87;;14388:1;14509:11;;12377:37;;;;22264:12;;;12377:37;22375:12;;;21998:414::o;22419:379::-;22783:10;22607:191::o;22805:333::-;32252:42;32241:54;;;;11418:37;;23124:2;23109:18;;12377:37;22960:2;22945:18;;22931:207::o;23145:629::-;;23400:2;23421:17;23414:47;23475:108;23400:2;23389:9;23385:18;23569:6;23475:108;:::i;:::-;23631:9;23625:4;23621:20;23616:2;23605:9;23601:18;23594:48;23656:108;23759:4;23750:6;23656:108;:::i;:::-;23648:116;23371:403;-1:-1;;;;;23371:403::o;23781:222::-;12377:37;;;23908:2;23893:18;;23879:124::o;24010:444::-;12377:37;;;24357:2;24342:18;;12377:37;;;;24440:2;24425:18;;12377:37;24193:2;24178:18;;24164:290::o;24461:218::-;31557:66;31546:78;;;;12774:36;;24586:2;24571:18;;24557:122::o;24686:329::-;31557:66;31546:78;;;;12774:36;;32252:42;32241:54;25001:2;24986:18;;11418:37;24839:2;24824:18;;24810:205::o;25022:480::-;25223:2;25208:18;;31845:53;31892:5;31845:53;:::i;:::-;13080:68;;;25405:2;25390:18;;12377:37;;;;25488:2;25473:18;;;12377:37;25194:308;:::o;25509:310::-;;25656:2;;25677:17;25670:47;13460:5;29165:12;29581:6;25656:2;25645:9;25641:18;29569:19;-1:-1;33738:101;33752:6;33749:1;33746:13;33738:101;;;33819:11;;;;;33813:18;33800:11;;;29609:14;33800:11;33793:39;33767:10;;33738:101;;;33854:6;33851:1;33848:13;33845:2;;;-1:-1;29609:14;33910:6;25645:9;33901:16;;33894:27;33845:2;-1:-1;34111:2;34091:14;34107:7;34087:28;13618:39;;;;29609:14;13618:39;;25627:192;-1:-1;;;25627:192::o;25826:416::-;26026:2;26040:47;;;13894:2;26011:18;;;29569:19;13930:34;29609:14;;;13910:55;13999:34;13985:12;;;13978:56;14068:13;14054:12;;;14047:35;14101:12;;;25997:245::o;26249:416::-;26449:2;26463:47;;;14759:2;26434:18;;;29569:19;14795:34;29609:14;;;14775:55;14864:34;14850:12;;;14843:56;14933:11;14919:12;;;14912:33;14964:12;;;26420:245::o;26672:931::-;27041:3;27026:19;;30528:2;30519:12;;15674:86;27030:9;30470:62;30519:12;15651:16;30470:62;:::i;:::-;15674:86;:::i;:::-;15828:73;15884:16;15877:5;15828:73;:::i;:::-;15808:93;;15907:86;30528:2;15982:3;15978:14;15964:12;15907:86;:::i;:::-;;16062:50;16106:4;16099:5;16095:16;16088:5;16062:50;:::i;:::-;16118:63;16106:4;16170:3;16166:14;16152:12;16118:63;:::i;:::-;;16250:50;16294:4;16287:5;16283:16;16276:5;16250:50;:::i;:::-;16306:63;16294:4;16358:3;16354:14;16340:12;16306:63;:::i;:::-;;16446:50;16490:4;16483:5;16479:16;16472:5;16446:50;:::i;:::-;16502:63;16490:4;16554:3;16550:14;16536:12;16502:63;:::i;:::-;;16628:50;16672:4;16665:5;16661:16;16654:5;16628:50;:::i;:::-;16684:63;16672:4;16736:3;16732:14;16718:12;16684:63;:::i;:::-;;16810:50;16854:4;16847:5;16843:16;16836:5;16810:50;:::i;:::-;16866:63;16854:4;16918:3;16914:14;16900:12;16866:63;:::i;:::-;;16993:50;17037:4;17030:5;17026:16;17019:5;16993:50;:::i;:::-;17049:63;17037:4;17101:3;17097:14;17083:12;17049:63;:::i;:::-;;17226:6;17182:52;17226:6;17219:5;17215:18;17208:5;17182:52;:::i;:::-;17240:65;17226:6;17292:3;17288:16;17274:12;17240:65;:::i;:::-;-1:-1;;17411:6;17400:18;;;2013:20;17473:16;;;12377:37;17597:6;17554:51;17586:18;;;17404:5;17554:51;:::i;:::-;17611:63;17597:6;17661:3;17657:16;17643:12;17611:63;:::i;:::-;-1:-1;;17780:6;17769:18;;;6617:20;17842:16;;;12377:37;27196:129;27320:3;27305:19;;27296:6;27196:129;:::i;:::-;27336:73;27404:3;27393:9;27389:19;27380:6;27336:73;:::i;:::-;27420:81;27496:3;27485:9;27481:19;27472:6;27420:81;:::i;:::-;27512;27588:3;27577:9;27573:19;27564:6;27512:81;:::i;:::-;27012:591;;;;;;;;:::o;27610:795::-;27939:3;27924:19;;30528:2;30519:12;;18258:86;27928:9;30470:62;30519:12;18235:16;30470:62;:::i;18258:86::-;18412:73;18468:16;18461:5;18412:73;:::i;:::-;18392:93;;18491:86;30528:2;18566:3;18562:14;18548:12;18491:86;:::i;:::-;;18646:50;18690:4;18683:5;18679:16;18672:5;18646:50;:::i;:::-;18702:63;18690:4;18754:3;18750:14;18736:12;18702:63;:::i;:::-;;18834:50;18878:4;18871:5;18867:16;18860:5;18834:50;:::i;:::-;18890:63;18878:4;18942:3;18938:14;18924:12;18890:63;:::i;:::-;;19016:50;19060:4;19053:5;19049:16;19042:5;19016:50;:::i;:::-;19072:63;19060:4;19124:3;19120:14;19106:12;19072:63;:::i;:::-;;19198:50;19242:4;19235:5;19231:16;19224:5;19198:50;:::i;:::-;19254:63;19242:4;19306:3;19302:14;19288:12;19254:63;:::i;:::-;;19383:50;19427:4;19420:5;19416:16;19409:5;19383:50;:::i;:::-;19439:63;19427:4;19491:3;19487:14;19473:12;19439:63;:::i;:::-;;19608:4;19601:5;19597:16;2013:20;19608:4;19672:3;19668:14;12377:37;19790:6;19747:51;19790:6;19783:5;19779:18;19772:5;19747:51;:::i;:::-;19804:63;19790:6;19854:3;19850:16;19836:12;19804:63;:::i;:::-;-1:-1;;19973:6;19962:18;;;6617:20;20035:16;;;12377:37;28090:129;28214:3;28199:19;;28190:6;28090:129;:::i;:::-;28230:73;28298:3;28287:9;28283:19;28274:6;28230:73;:::i;:::-;28314:81;28390:3;28379:9;28375:19;28366:6;28314:81;:::i;28641:256::-;28703:2;28697:9;28729:17;;;28804:18;28789:34;;28825:22;;;28786:62;28783:2;;;28861:1;;28851:12;28783:2;28703;28870:22;28681:216;;-1:-1;28681:216::o;30117:119::-;;85:6;72:20;97:33;124:5;97:33;:::i;30711:119::-;;6352:6;6339:20;6364:33;6391:5;6364:33;:::i;30967:117::-;;6905:6;6892:20;32553:18;35472:5;32542:30;35448:5;35445:34;35435:2;;-1:-1;;35483:12;34128:111;34217:1;34210:5;34207:12;34197:2;;34223:9;34362:117;32252:42;34449:5;32241:54;34424:5;34421:35;34411:2;;34470:1;;34460:12;35017:117;32132:34;35104:5;32121:46;35079:5;35076:35;35066:2;;35125:1;;35115:12"
},
"methodIdentifiers": {
"EIP712_DOMAIN_SEPARATOR()": "dab400f3",
"FEATURE_NAME()": "6ae4b4f7",
"FEATURE_VERSION()": "031b905c",
"batchFillLimitOrders((address,address,uint128,uint128,uint128,address,address,address,address,bytes32,uint64,uint256)[],(uint8,uint8,bytes32,bytes32)[],uint128[],bool)": "1baaa00b",
"batchFillRfqOrders((address,address,uint128,uint128,address,address,address,bytes32,uint64,uint256)[],(uint8,uint8,bytes32,bytes32)[],uint128[],bool)": "75103cb9",
"migrate()": "8fd3ab80"
}
}
},
"sourceTreeHashHex": "0xb39c21786df9b9b7e45dbeca084295a0d7a355da83bfa2d78494ee4458f23427",
"sources": {
"./BatchFillNativeOrdersFeature.sol": {
"id": 4,
"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-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"@0x/contracts-utils/contracts/src/v06/LibSafeMathV06.sol\";\nimport \"@0x/contracts-utils/contracts/src/v06/LibMathV06.sol\";\nimport \"../errors/LibNativeOrdersRichErrors.sol\";\nimport \"../fixins/FixinCommon.sol\";\nimport \"../fixins/FixinEIP712.sol\";\nimport \"../migrations/LibMigrate.sol\";\nimport \"./interfaces/IFeature.sol\";\nimport \"./interfaces/IBatchFillNativeOrdersFeature.sol\";\nimport \"./interfaces/INativeOrdersFeature.sol\";\nimport \"./libs/LibNativeOrder.sol\";\nimport \"./libs/LibSignature.sol\";\n\n\n/// @dev Feature for batch/market filling limit and RFQ orders.\ncontract BatchFillNativeOrdersFeature is\n IFeature,\n IBatchFillNativeOrdersFeature,\n FixinCommon,\n FixinEIP712\n{\n using LibSafeMathV06 for uint128;\n using LibSafeMathV06 for uint256;\n using LibRichErrorsV06 for bytes;\n\n /// @dev Name of this feature.\n string public constant override FEATURE_NAME = \"BatchFill\";\n /// @dev Version of this feature.\n uint256 public immutable override FEATURE_VERSION = _encodeVersion(1, 0, 0);\n\n constructor(address zeroExAddress)\n public\n FixinEIP712(zeroExAddress)\n {\n // solhint-disable 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.batchFillLimitOrders.selector);\n _registerFeatureFunction(this.batchFillRfqOrders.selector);\n return LibMigrate.MIGRATE_SUCCESS;\n }\n\n /// @dev Fills multiple limit orders.\n /// @param orders Array of limit orders.\n /// @param signatures Array of signatures corresponding to each order.\n /// @param takerTokenFillAmounts Array of desired amounts to fill each order.\n /// @param revertIfIncomplete If true, reverts if this function fails to\n /// fill the full fill amount for any individual order.\n /// @return takerTokenFilledAmounts Array of amounts filled, in taker token.\n /// @return makerTokenFilledAmounts Array of amounts filled, in maker token.\n function batchFillLimitOrders(\n LibNativeOrder.LimitOrder[] calldata orders,\n LibSignature.Signature[] calldata signatures,\n uint128[] calldata takerTokenFillAmounts,\n bool revertIfIncomplete\n )\n external\n payable\n override\n returns (\n uint128[] memory takerTokenFilledAmounts,\n uint128[] memory makerTokenFilledAmounts\n )\n {\n require(\n orders.length == signatures.length && orders.length == takerTokenFillAmounts.length,\n 'BatchFillNativeOrdersFeature::batchFillLimitOrders/MISMATCHED_ARRAY_LENGTHS'\n );\n takerTokenFilledAmounts = new uint128[](orders.length);\n makerTokenFilledAmounts = new uint128[](orders.length);\n uint256 protocolFee = uint256(INativeOrdersFeature(address(this)).getProtocolFeeMultiplier())\n .safeMul(tx.gasprice);\n uint256 ethProtocolFeePaid;\n for (uint256 i = 0; i != orders.length; i++) {\n try\n INativeOrdersFeature(address(this))._fillLimitOrder\n (\n orders[i],\n signatures[i],\n takerTokenFillAmounts[i],\n msg.sender,\n msg.sender\n )\n returns (uint128 takerTokenFilledAmount, uint128 makerTokenFilledAmount)\n {\n // Update amounts filled.\n (takerTokenFilledAmounts[i], makerTokenFilledAmounts[i]) =\n (takerTokenFilledAmount, makerTokenFilledAmount);\n ethProtocolFeePaid = ethProtocolFeePaid.safeAdd(protocolFee);\n } catch {}\n\n if (\n revertIfIncomplete &&\n takerTokenFilledAmounts[i] < takerTokenFillAmounts[i]\n ) {\n bytes32 orderHash = _getEIP712Hash(\n LibNativeOrder.getLimitOrderStructHash(orders[i])\n );\n // Did not fill the amount requested.\n LibNativeOrdersRichErrors.BatchFillIncompleteError(\n orderHash,\n takerTokenFilledAmounts[i],\n takerTokenFillAmounts[i]\n ).rrevert();\n }\n }\n LibNativeOrder.refundExcessProtocolFeeToSender(ethProtocolFeePaid);\n }\n\n /// @dev Fills multiple RFQ orders.\n /// @param orders Array of RFQ orders.\n /// @param signatures Array of signatures corresponding to each order.\n /// @param takerTokenFillAmounts Array of desired amounts to fill each order.\n /// @param revertIfIncomplete If true, reverts if this function fails to\n /// fill the full fill amount for any individual order.\n /// @return takerTokenFilledAmounts Array of amounts filled, in taker token.\n /// @return makerTokenFilledAmounts Array of amounts filled, in maker token.\n function batchFillRfqOrders(\n LibNativeOrder.RfqOrder[] calldata orders,\n LibSignature.Signature[] calldata signatures,\n uint128[] calldata takerTokenFillAmounts,\n bool revertIfIncomplete\n )\n external\n override\n returns (\n uint128[] memory takerTokenFilledAmounts,\n uint128[] memory makerTokenFilledAmounts\n )\n {\n require(\n orders.length == signatures.length && orders.length == takerTokenFillAmounts.length,\n 'BatchFillNativeOrdersFeature::batchFillRfqOrders/MISMATCHED_ARRAY_LENGTHS'\n );\n takerTokenFilledAmounts = new uint128[](orders.length);\n makerTokenFilledAmounts = new uint128[](orders.length);\n for (uint256 i = 0; i != orders.length; i++) {\n try\n INativeOrdersFeature(address(this))._fillRfqOrder\n (\n orders[i],\n signatures[i],\n takerTokenFillAmounts[i],\n msg.sender\n )\n returns (uint128 takerTokenFilledAmount, uint128 makerTokenFilledAmount)\n {\n // Update amounts filled.\n (takerTokenFilledAmounts[i], makerTokenFilledAmounts[i]) =\n (takerTokenFilledAmount, makerTokenFilledAmount);\n } catch {}\n\n if (\n revertIfIncomplete &&\n takerTokenFilledAmounts[i] < takerTokenFillAmounts[i]\n ) {\n // Did not fill the amount requested.\n bytes32 orderHash = _getEIP712Hash(\n LibNativeOrder.getRfqOrderStructHash(orders[i])\n );\n LibNativeOrdersRichErrors.BatchFillIncompleteError(\n orderHash,\n takerTokenFilledAmounts[i],\n takerTokenFillAmounts[i]\n ).rrevert();\n }\n }\n }\n}\n"
},
"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.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;\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/LibSafeMathV06.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;\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": 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;\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"
},
"@0x/contracts-utils/contracts/src/v06/LibMathV06.sol": {
"id": 17,
"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 \"./LibSafeMathV06.sol\";\nimport \"./errors/LibRichErrorsV06.sol\";\nimport \"./errors/LibMathRichErrorsV06.sol\";\n\n\nlibrary LibMathV06 {\n\n using LibSafeMathV06 for uint256;\n\n /// @dev Calculates partial value given a numerator and denominator rounded down.\n /// Reverts if rounding error is >= 0.1%\n /// @param numerator Numerator.\n /// @param denominator Denominator.\n /// @param target Value to calculate partial of.\n /// @return partialAmount Partial value of target rounded down.\n function safeGetPartialAmountFloor(\n uint256 numerator,\n uint256 denominator,\n uint256 target\n )\n internal\n pure\n returns (uint256 partialAmount)\n {\n if (isRoundingErrorFloor(\n numerator,\n denominator,\n target\n )) {\n LibRichErrorsV06.rrevert(LibMathRichErrorsV06.RoundingError(\n numerator,\n denominator,\n target\n ));\n }\n\n partialAmount = numerator.safeMul(target).safeDiv(denominator);\n return partialAmount;\n }\n\n /// @dev Calculates partial value given a numerator and denominator rounded down.\n /// Reverts if rounding error is >= 0.1%\n /// @param numerator Numerator.\n /// @param denominator Denominator.\n /// @param target Value to calculate partial of.\n /// @return partialAmount Partial value of target rounded up.\n function safeGetPartialAmountCeil(\n uint256 numerator,\n uint256 denominator,\n uint256 target\n )\n internal\n pure\n returns (uint256 partialAmount)\n {\n if (isRoundingErrorCeil(\n numerator,\n denominator,\n target\n )) {\n LibRichErrorsV06.rrevert(LibMathRichErrorsV06.RoundingError(\n numerator,\n denominator,\n target\n ));\n }\n\n // safeDiv computes `floor(a / b)`. We use the identity (a, b integer):\n // ceil(a / b) = floor((a + b - 1) / b)\n // To implement `ceil(a / b)` using safeDiv.\n partialAmount = numerator.safeMul(target)\n .safeAdd(denominator.safeSub(1))\n .safeDiv(denominator);\n\n return partialAmount;\n }\n\n /// @dev Calculates partial value given a numerator and denominator rounded down.\n /// @param numerator Numerator.\n /// @param denominator Denominator.\n /// @param target Value to calculate partial of.\n /// @return partialAmount Partial value of target rounded down.\n function getPartialAmountFloor(\n uint256 numerator,\n uint256 denominator,\n uint256 target\n )\n internal\n pure\n returns (uint256 partialAmount)\n {\n partialAmount = numerator.safeMul(target).safeDiv(denominator);\n return partialAmount;\n }\n\n /// @dev Calculates partial value given a numerator and denominator rounded down.\n /// @param numerator Numerator.\n /// @param denominator Denominator.\n /// @param target Value to calculate partial of.\n /// @return partialAmount Partial value of target rounded up.\n function getPartialAmountCeil(\n uint256 numerator,\n uint256 denominator,\n uint256 target\n )\n internal\n pure\n returns (uint256 partialAmount)\n {\n // safeDiv computes `floor(a / b)`. We use the identity (a, b integer):\n // ceil(a / b) = floor((a + b - 1) / b)\n // To implement `ceil(a / b)` using safeDiv.\n partialAmount = numerator.safeMul(target)\n .safeAdd(denominator.safeSub(1))\n .safeDiv(denominator);\n\n return partialAmount;\n }\n\n /// @dev Checks if rounding error >= 0.1% when rounding down.\n /// @param numerator Numerator.\n /// @param denominator Denominator.\n /// @param target Value to multiply with numerator/denominator.\n /// @return isError Rounding error is present.\n function isRoundingErrorFloor(\n uint256 numerator,\n uint256 denominator,\n uint256 target\n )\n internal\n pure\n returns (bool isError)\n {\n if (denominator == 0) {\n LibRichErrorsV06.rrevert(LibMathRichErrorsV06.DivisionByZeroError());\n }\n\n // The absolute rounding error is the difference between the rounded\n // value and the ideal value. The relative rounding error is the\n // absolute rounding error divided by the absolute value of the\n // ideal value. This is undefined when the ideal value is zero.\n //\n // The ideal value is `numerator * target / denominator`.\n // Let's call `numerator * target % denominator` the remainder.\n // The absolute error is `remainder / denominator`.\n //\n // When the ideal value is zero, we require the absolute error to\n // be zero. Fortunately, this is always the case. The ideal value is\n // zero iff `numerator == 0` and/or `target == 0`. In this case the\n // remainder and absolute error are also zero.\n if (target == 0 || numerator == 0) {\n return false;\n }\n\n // Otherwise, we want the relative rounding error to be strictly\n // less than 0.1%.\n // The relative error is `remainder / (numerator * target)`.\n // We want the relative error less than 1 / 1000:\n // remainder / (numerator * denominator) < 1 / 1000\n // or equivalently:\n // 1000 * remainder < numerator * target\n // so we have a rounding error iff:\n // 1000 * remainder >= numerator * target\n uint256 remainder = mulmod(\n target,\n numerator,\n denominator\n );\n isError = remainder.safeMul(1000) >= numerator.safeMul(target);\n return isError;\n }\n\n /// @dev Checks if rounding error >= 0.1% when rounding up.\n /// @param numerator Numerator.\n /// @param denominator Denominator.\n /// @param target Value to multiply with numerator/denominator.\n /// @return isError Rounding error is present.\n function isRoundingErrorCeil(\n uint256 numerator,\n uint256 denominator,\n uint256 target\n )\n internal\n pure\n returns (bool isError)\n {\n if (denominator == 0) {\n LibRichErrorsV06.rrevert(LibMathRichErrorsV06.DivisionByZeroError());\n }\n\n // See the comments in `isRoundingError`.\n if (target == 0 || numerator == 0) {\n // When either is zero, the ideal value and rounded value are zero\n // and there is no rounding error. (Although the relative error\n // is undefined.)\n return false;\n }\n // Compute remainder as before\n uint256 remainder = mulmod(\n target,\n numerator,\n denominator\n );\n remainder = denominator.safeSub(remainder) % denominator;\n isError = remainder.safeMul(1000) >= numerator.safeMul(target);\n return isError;\n }\n}\n"
},
"@0x/contracts-utils/contracts/src/v06/errors/LibMathRichErrorsV06.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;\n\n\nlibrary LibMathRichErrorsV06 {\n\n // bytes4(keccak256(\"DivisionByZeroError()\"))\n bytes internal constant DIVISION_BY_ZERO_ERROR =\n hex\"a791837c\";\n\n // bytes4(keccak256(\"RoundingError(uint256,uint256,uint256)\"))\n bytes4 internal constant ROUNDING_ERROR_SELECTOR =\n 0x339f3de2;\n\n // solhint-disable func-name-mixedcase\n function DivisionByZeroError()\n internal\n pure\n returns (bytes memory)\n {\n return DIVISION_BY_ZERO_ERROR;\n }\n\n function RoundingError(\n uint256 numerator,\n uint256 denominator,\n uint256 target\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n ROUNDING_ERROR_SELECTOR,\n numerator,\n denominator,\n target\n );\n }\n}\n"
},
"../errors/LibNativeOrdersRichErrors.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 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"
},
"../fixins/FixinCommon.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/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": 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 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": 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\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": 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;\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": 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\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/FixinEIP712.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\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": 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-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"
},
"./interfaces/IFeature.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\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/IBatchFillNativeOrdersFeature.sol": {
"id": 5,
"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 \"../libs/LibNativeOrder.sol\";\nimport \"../libs/LibSignature.sol\";\n\n\n/// @dev Feature for batch/market filling limit and RFQ orders.\ninterface IBatchFillNativeOrdersFeature {\n\n /// @dev Fills multiple limit orders.\n /// @param orders Array of limit orders.\n /// @param signatures Array of signatures corresponding to each order.\n /// @param takerTokenFillAmounts Array of desired amounts to fill each order.\n /// @param revertIfIncomplete If true, reverts if this function fails to\n /// fill the full fill amount for any individual order.\n /// @return takerTokenFilledAmounts Array of amounts filled, in taker token.\n /// @return makerTokenFilledAmounts Array of amounts filled, in maker token.\n function batchFillLimitOrders(\n LibNativeOrder.LimitOrder[] calldata orders,\n LibSignature.Signature[] calldata signatures,\n uint128[] calldata takerTokenFillAmounts,\n bool revertIfIncomplete\n )\n external\n payable\n returns (\n uint128[] memory takerTokenFilledAmounts,\n uint128[] memory makerTokenFilledAmounts\n );\n\n /// @dev Fills multiple RFQ orders.\n /// @param orders Array of RFQ orders.\n /// @param signatures Array of signatures corresponding to each order.\n /// @param takerTokenFillAmounts Array of desired amounts to fill each order.\n /// @param revertIfIncomplete If true, reverts if this function fails to\n /// fill the full fill amount for any individual order.\n /// @return takerTokenFilledAmounts Array of amounts filled, in taker token.\n /// @return makerTokenFilledAmounts Array of amounts filled, in maker token.\n function batchFillRfqOrders(\n LibNativeOrder.RfqOrder[] calldata orders,\n LibSignature.Signature[] calldata signatures,\n uint128[] calldata takerTokenFillAmounts,\n bool revertIfIncomplete\n )\n external\n returns (\n uint128[] memory takerTokenFilledAmounts,\n uint128[] memory makerTokenFilledAmounts\n );\n}\n"
},
"./libs/LibNativeOrder.sol": {
"id": 11,
"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"
},
"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.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;\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"
},
"./libs/LibSignature.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-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": 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 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": 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-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"
},
"./interfaces/INativeOrdersEvents.sol": {
"id": 7,
"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"
}
},
"sourceCodes": {
"./BatchFillNativeOrdersFeature.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-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"@0x/contracts-utils/contracts/src/v06/LibSafeMathV06.sol\";\nimport \"@0x/contracts-utils/contracts/src/v06/LibMathV06.sol\";\nimport \"../errors/LibNativeOrdersRichErrors.sol\";\nimport \"../fixins/FixinCommon.sol\";\nimport \"../fixins/FixinEIP712.sol\";\nimport \"../migrations/LibMigrate.sol\";\nimport \"./interfaces/IFeature.sol\";\nimport \"./interfaces/IBatchFillNativeOrdersFeature.sol\";\nimport \"./interfaces/INativeOrdersFeature.sol\";\nimport \"./libs/LibNativeOrder.sol\";\nimport \"./libs/LibSignature.sol\";\n\n\n/// @dev Feature for batch/market filling limit and RFQ orders.\ncontract BatchFillNativeOrdersFeature is\n IFeature,\n IBatchFillNativeOrdersFeature,\n FixinCommon,\n FixinEIP712\n{\n using LibSafeMathV06 for uint128;\n using LibSafeMathV06 for uint256;\n using LibRichErrorsV06 for bytes;\n\n /// @dev Name of this feature.\n string public constant override FEATURE_NAME = \"BatchFill\";\n /// @dev Version of this feature.\n uint256 public immutable override FEATURE_VERSION = _encodeVersion(1, 0, 0);\n\n constructor(address zeroExAddress)\n public\n FixinEIP712(zeroExAddress)\n {\n // solhint-disable 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.batchFillLimitOrders.selector);\n _registerFeatureFunction(this.batchFillRfqOrders.selector);\n return LibMigrate.MIGRATE_SUCCESS;\n }\n\n /// @dev Fills multiple limit orders.\n /// @param orders Array of limit orders.\n /// @param signatures Array of signatures corresponding to each order.\n /// @param takerTokenFillAmounts Array of desired amounts to fill each order.\n /// @param revertIfIncomplete If true, reverts if this function fails to\n /// fill the full fill amount for any individual order.\n /// @return takerTokenFilledAmounts Array of amounts filled, in taker token.\n /// @return makerTokenFilledAmounts Array of amounts filled, in maker token.\n function batchFillLimitOrders(\n LibNativeOrder.LimitOrder[] calldata orders,\n LibSignature.Signature[] calldata signatures,\n uint128[] calldata takerTokenFillAmounts,\n bool revertIfIncomplete\n )\n external\n payable\n override\n returns (\n uint128[] memory takerTokenFilledAmounts,\n uint128[] memory makerTokenFilledAmounts\n )\n {\n require(\n orders.length == signatures.length && orders.length == takerTokenFillAmounts.length,\n 'BatchFillNativeOrdersFeature::batchFillLimitOrders/MISMATCHED_ARRAY_LENGTHS'\n );\n takerTokenFilledAmounts = new uint128[](orders.length);\n makerTokenFilledAmounts = new uint128[](orders.length);\n uint256 protocolFee = uint256(INativeOrdersFeature(address(this)).getProtocolFeeMultiplier())\n .safeMul(tx.gasprice);\n uint256 ethProtocolFeePaid;\n for (uint256 i = 0; i != orders.length; i++) {\n try\n INativeOrdersFeature(address(this))._fillLimitOrder\n (\n orders[i],\n signatures[i],\n takerTokenFillAmounts[i],\n msg.sender,\n msg.sender\n )\n returns (uint128 takerTokenFilledAmount, uint128 makerTokenFilledAmount)\n {\n // Update amounts filled.\n (takerTokenFilledAmounts[i], makerTokenFilledAmounts[i]) =\n (takerTokenFilledAmount, makerTokenFilledAmount);\n ethProtocolFeePaid = ethProtocolFeePaid.safeAdd(protocolFee);\n } catch {}\n\n if (\n revertIfIncomplete &&\n takerTokenFilledAmounts[i] < takerTokenFillAmounts[i]\n ) {\n bytes32 orderHash = _getEIP712Hash(\n LibNativeOrder.getLimitOrderStructHash(orders[i])\n );\n // Did not fill the amount requested.\n LibNativeOrdersRichErrors.BatchFillIncompleteError(\n orderHash,\n takerTokenFilledAmounts[i],\n takerTokenFillAmounts[i]\n ).rrevert();\n }\n }\n LibNativeOrder.refundExcessProtocolFeeToSender(ethProtocolFeePaid);\n }\n\n /// @dev Fills multiple RFQ orders.\n /// @param orders Array of RFQ orders.\n /// @param signatures Array of signatures corresponding to each order.\n /// @param takerTokenFillAmounts Array of desired amounts to fill each order.\n /// @param revertIfIncomplete If true, reverts if this function fails to\n /// fill the full fill amount for any individual order.\n /// @return takerTokenFilledAmounts Array of amounts filled, in taker token.\n /// @return makerTokenFilledAmounts Array of amounts filled, in maker token.\n function batchFillRfqOrders(\n LibNativeOrder.RfqOrder[] calldata orders,\n LibSignature.Signature[] calldata signatures,\n uint128[] calldata takerTokenFillAmounts,\n bool revertIfIncomplete\n )\n external\n override\n returns (\n uint128[] memory takerTokenFilledAmounts,\n uint128[] memory makerTokenFilledAmounts\n )\n {\n require(\n orders.length == signatures.length && orders.length == takerTokenFillAmounts.length,\n 'BatchFillNativeOrdersFeature::batchFillRfqOrders/MISMATCHED_ARRAY_LENGTHS'\n );\n takerTokenFilledAmounts = new uint128[](orders.length);\n makerTokenFilledAmounts = new uint128[](orders.length);\n for (uint256 i = 0; i != orders.length; i++) {\n try\n INativeOrdersFeature(address(this))._fillRfqOrder\n (\n orders[i],\n signatures[i],\n takerTokenFillAmounts[i],\n msg.sender\n )\n returns (uint128 takerTokenFilledAmount, uint128 makerTokenFilledAmount)\n {\n // Update amounts filled.\n (takerTokenFilledAmounts[i], makerTokenFilledAmounts[i]) =\n (takerTokenFilledAmount, makerTokenFilledAmount);\n } catch {}\n\n if (\n revertIfIncomplete &&\n takerTokenFilledAmounts[i] < takerTokenFillAmounts[i]\n ) {\n // Did not fill the amount requested.\n bytes32 orderHash = _getEIP712Hash(\n LibNativeOrder.getRfqOrderStructHash(orders[i])\n );\n LibNativeOrdersRichErrors.BatchFillIncompleteError(\n orderHash,\n takerTokenFilledAmounts[i],\n takerTokenFillAmounts[i]\n ).rrevert();\n }\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/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",
"@0x/contracts-utils/contracts/src/v06/LibMathV06.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 \"./LibSafeMathV06.sol\";\nimport \"./errors/LibRichErrorsV06.sol\";\nimport \"./errors/LibMathRichErrorsV06.sol\";\n\n\nlibrary LibMathV06 {\n\n using LibSafeMathV06 for uint256;\n\n /// @dev Calculates partial value given a numerator and denominator rounded down.\n /// Reverts if rounding error is >= 0.1%\n /// @param numerator Numerator.\n /// @param denominator Denominator.\n /// @param target Value to calculate partial of.\n /// @return partialAmount Partial value of target rounded down.\n function safeGetPartialAmountFloor(\n uint256 numerator,\n uint256 denominator,\n uint256 target\n )\n internal\n pure\n returns (uint256 partialAmount)\n {\n if (isRoundingErrorFloor(\n numerator,\n denominator,\n target\n )) {\n LibRichErrorsV06.rrevert(LibMathRichErrorsV06.RoundingError(\n numerator,\n denominator,\n target\n ));\n }\n\n partialAmount = numerator.safeMul(target).safeDiv(denominator);\n return partialAmount;\n }\n\n /// @dev Calculates partial value given a numerator and denominator rounded down.\n /// Reverts if rounding error is >= 0.1%\n /// @param numerator Numerator.\n /// @param denominator Denominator.\n /// @param target Value to calculate partial of.\n /// @return partialAmount Partial value of target rounded up.\n function safeGetPartialAmountCeil(\n uint256 numerator,\n uint256 denominator,\n uint256 target\n )\n internal\n pure\n returns (uint256 partialAmount)\n {\n if (isRoundingErrorCeil(\n numerator,\n denominator,\n target\n )) {\n LibRichErrorsV06.rrevert(LibMathRichErrorsV06.RoundingError(\n numerator,\n denominator,\n target\n ));\n }\n\n // safeDiv computes `floor(a / b)`. We use the identity (a, b integer):\n // ceil(a / b) = floor((a + b - 1) / b)\n // To implement `ceil(a / b)` using safeDiv.\n partialAmount = numerator.safeMul(target)\n .safeAdd(denominator.safeSub(1))\n .safeDiv(denominator);\n\n return partialAmount;\n }\n\n /// @dev Calculates partial value given a numerator and denominator rounded down.\n /// @param numerator Numerator.\n /// @param denominator Denominator.\n /// @param target Value to calculate partial of.\n /// @return partialAmount Partial value of target rounded down.\n function getPartialAmountFloor(\n uint256 numerator,\n uint256 denominator,\n uint256 target\n )\n internal\n pure\n returns (uint256 partialAmount)\n {\n partialAmount = numerator.safeMul(target).safeDiv(denominator);\n return partialAmount;\n }\n\n /// @dev Calculates partial value given a numerator and denominator rounded down.\n /// @param numerator Numerator.\n /// @param denominator Denominator.\n /// @param target Value to calculate partial of.\n /// @return partialAmount Partial value of target rounded up.\n function getPartialAmountCeil(\n uint256 numerator,\n uint256 denominator,\n uint256 target\n )\n internal\n pure\n returns (uint256 partialAmount)\n {\n // safeDiv computes `floor(a / b)`. We use the identity (a, b integer):\n // ceil(a / b) = floor((a + b - 1) / b)\n // To implement `ceil(a / b)` using safeDiv.\n partialAmount = numerator.safeMul(target)\n .safeAdd(denominator.safeSub(1))\n .safeDiv(denominator);\n\n return partialAmount;\n }\n\n /// @dev Checks if rounding error >= 0.1% when rounding down.\n /// @param numerator Numerator.\n /// @param denominator Denominator.\n /// @param target Value to multiply with numerator/denominator.\n /// @return isError Rounding error is present.\n function isRoundingErrorFloor(\n uint256 numerator,\n uint256 denominator,\n uint256 target\n )\n internal\n pure\n returns (bool isError)\n {\n if (denominator == 0) {\n LibRichErrorsV06.rrevert(LibMathRichErrorsV06.DivisionByZeroError());\n }\n\n // The absolute rounding error is the difference between the rounded\n // value and the ideal value. The relative rounding error is the\n // absolute rounding error divided by the absolute value of the\n // ideal value. This is undefined when the ideal value is zero.\n //\n // The ideal value is `numerator * target / denominator`.\n // Let's call `numerator * target % denominator` the remainder.\n // The absolute error is `remainder / denominator`.\n //\n // When the ideal value is zero, we require the absolute error to\n // be zero. Fortunately, this is always the case. The ideal value is\n // zero iff `numerator == 0` and/or `target == 0`. In this case the\n // remainder and absolute error are also zero.\n if (target == 0 || numerator == 0) {\n return false;\n }\n\n // Otherwise, we want the relative rounding error to be strictly\n // less than 0.1%.\n // The relative error is `remainder / (numerator * target)`.\n // We want the relative error less than 1 / 1000:\n // remainder / (numerator * denominator) < 1 / 1000\n // or equivalently:\n // 1000 * remainder < numerator * target\n // so we have a rounding error iff:\n // 1000 * remainder >= numerator * target\n uint256 remainder = mulmod(\n target,\n numerator,\n denominator\n );\n isError = remainder.safeMul(1000) >= numerator.safeMul(target);\n return isError;\n }\n\n /// @dev Checks if rounding error >= 0.1% when rounding up.\n /// @param numerator Numerator.\n /// @param denominator Denominator.\n /// @param target Value to multiply with numerator/denominator.\n /// @return isError Rounding error is present.\n function isRoundingErrorCeil(\n uint256 numerator,\n uint256 denominator,\n uint256 target\n )\n internal\n pure\n returns (bool isError)\n {\n if (denominator == 0) {\n LibRichErrorsV06.rrevert(LibMathRichErrorsV06.DivisionByZeroError());\n }\n\n // See the comments in `isRoundingError`.\n if (target == 0 || numerator == 0) {\n // When either is zero, the ideal value and rounded value are zero\n // and there is no rounding error. (Although the relative error\n // is undefined.)\n return false;\n }\n // Compute remainder as before\n uint256 remainder = mulmod(\n target,\n numerator,\n denominator\n );\n remainder = denominator.safeSub(remainder) % denominator;\n isError = remainder.safeMul(1000) >= numerator.safeMul(target);\n return isError;\n }\n}\n",
"@0x/contracts-utils/contracts/src/v06/errors/LibMathRichErrorsV06.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 LibMathRichErrorsV06 {\n\n // bytes4(keccak256(\"DivisionByZeroError()\"))\n bytes internal constant DIVISION_BY_ZERO_ERROR =\n hex\"a791837c\";\n\n // bytes4(keccak256(\"RoundingError(uint256,uint256,uint256)\"))\n bytes4 internal constant ROUNDING_ERROR_SELECTOR =\n 0x339f3de2;\n\n // solhint-disable func-name-mixedcase\n function DivisionByZeroError()\n internal\n pure\n returns (bytes memory)\n {\n return DIVISION_BY_ZERO_ERROR;\n }\n\n function RoundingError(\n uint256 numerator,\n uint256 denominator,\n uint256 target\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n ROUNDING_ERROR_SELECTOR,\n numerator,\n denominator,\n target\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",
"../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/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",
"./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/IBatchFillNativeOrdersFeature.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 \"../libs/LibNativeOrder.sol\";\nimport \"../libs/LibSignature.sol\";\n\n\n/// @dev Feature for batch/market filling limit and RFQ orders.\ninterface IBatchFillNativeOrdersFeature {\n\n /// @dev Fills multiple limit orders.\n /// @param orders Array of limit orders.\n /// @param signatures Array of signatures corresponding to each order.\n /// @param takerTokenFillAmounts Array of desired amounts to fill each order.\n /// @param revertIfIncomplete If true, reverts if this function fails to\n /// fill the full fill amount for any individual order.\n /// @return takerTokenFilledAmounts Array of amounts filled, in taker token.\n /// @return makerTokenFilledAmounts Array of amounts filled, in maker token.\n function batchFillLimitOrders(\n LibNativeOrder.LimitOrder[] calldata orders,\n LibSignature.Signature[] calldata signatures,\n uint128[] calldata takerTokenFillAmounts,\n bool revertIfIncomplete\n )\n external\n payable\n returns (\n uint128[] memory takerTokenFilledAmounts,\n uint128[] memory makerTokenFilledAmounts\n );\n\n /// @dev Fills multiple RFQ orders.\n /// @param orders Array of RFQ orders.\n /// @param signatures Array of signatures corresponding to each order.\n /// @param takerTokenFillAmounts Array of desired amounts to fill each order.\n /// @param revertIfIncomplete If true, reverts if this function fails to\n /// fill the full fill amount for any individual order.\n /// @return takerTokenFilledAmounts Array of amounts filled, in taker token.\n /// @return makerTokenFilledAmounts Array of amounts filled, in maker token.\n function batchFillRfqOrders(\n LibNativeOrder.RfqOrder[] calldata orders,\n LibSignature.Signature[] calldata signatures,\n uint128[] calldata takerTokenFillAmounts,\n bool revertIfIncomplete\n )\n external\n returns (\n uint128[] memory takerTokenFilledAmounts,\n uint128[] memory makerTokenFilledAmounts\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",
"@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",
"./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",
"./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"
},
"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": {}
}