diff --git a/packages/contract-artifacts/artifacts/Broker.json b/packages/contract-artifacts/artifacts/Broker.json new file mode 100644 index 0000000000..c2b63cd890 --- /dev/null +++ b/packages/contract-artifacts/artifacts/Broker.json @@ -0,0 +1,206 @@ +{ + "schemaVersion": "2.0.0", + "contractName": "Broker", + "compilerOutput": { + "abi": [ + { + "inputs": [ + { "internalType": "address", "name": "exchange", "type": "address" }, + { "internalType": "address", "name": "weth", "type": "address" } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { "payable": true, "stateMutability": "payable", "type": "fallback" }, + { + "constant": false, + "inputs": [ + { "internalType": "uint256[]", "name": "brokeredTokenIds", "type": "uint256[]" }, + { + "components": [ + { "internalType": "address", "name": "makerAddress", "type": "address" }, + { "internalType": "address", "name": "takerAddress", "type": "address" }, + { "internalType": "address", "name": "feeRecipientAddress", "type": "address" }, + { "internalType": "address", "name": "senderAddress", "type": "address" }, + { "internalType": "uint256", "name": "makerAssetAmount", "type": "uint256" }, + { "internalType": "uint256", "name": "takerAssetAmount", "type": "uint256" }, + { "internalType": "uint256", "name": "makerFee", "type": "uint256" }, + { "internalType": "uint256", "name": "takerFee", "type": "uint256" }, + { "internalType": "uint256", "name": "expirationTimeSeconds", "type": "uint256" }, + { "internalType": "uint256", "name": "salt", "type": "uint256" }, + { "internalType": "bytes", "name": "makerAssetData", "type": "bytes" }, + { "internalType": "bytes", "name": "takerAssetData", "type": "bytes" }, + { "internalType": "bytes", "name": "makerFeeAssetData", "type": "bytes" }, + { "internalType": "bytes", "name": "takerFeeAssetData", "type": "bytes" } + ], + "internalType": "struct LibOrder.Order[]", + "name": "orders", + "type": "tuple[]" + }, + { "internalType": "uint256[]", "name": "takerAssetFillAmounts", "type": "uint256[]" }, + { "internalType": "bytes[]", "name": "signatures", "type": "bytes[]" }, + { "internalType": "bytes4", "name": "batchFillFunctionSelector", "type": "bytes4" }, + { "internalType": "uint256[]", "name": "ethFeeAmounts", "type": "uint256[]" }, + { "internalType": "address payable[]", "name": "feeRecipients", "type": "address[]" } + ], + "name": "batchBrokerTrade", + "outputs": [ + { + "components": [ + { "internalType": "uint256", "name": "makerAssetFilledAmount", "type": "uint256" }, + { "internalType": "uint256", "name": "takerAssetFilledAmount", "type": "uint256" }, + { "internalType": "uint256", "name": "makerFeePaid", "type": "uint256" }, + { "internalType": "uint256", "name": "takerFeePaid", "type": "uint256" }, + { "internalType": "uint256", "name": "protocolFeePaid", "type": "uint256" } + ], + "internalType": "struct LibFillResults.FillResults[]", + "name": "fillResults", + "type": "tuple[]" + } + ], + "payable": true, + "stateMutability": "payable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "uint256[]", "name": "brokeredTokenIds", "type": "uint256[]" }, + { + "components": [ + { "internalType": "address", "name": "makerAddress", "type": "address" }, + { "internalType": "address", "name": "takerAddress", "type": "address" }, + { "internalType": "address", "name": "feeRecipientAddress", "type": "address" }, + { "internalType": "address", "name": "senderAddress", "type": "address" }, + { "internalType": "uint256", "name": "makerAssetAmount", "type": "uint256" }, + { "internalType": "uint256", "name": "takerAssetAmount", "type": "uint256" }, + { "internalType": "uint256", "name": "makerFee", "type": "uint256" }, + { "internalType": "uint256", "name": "takerFee", "type": "uint256" }, + { "internalType": "uint256", "name": "expirationTimeSeconds", "type": "uint256" }, + { "internalType": "uint256", "name": "salt", "type": "uint256" }, + { "internalType": "bytes", "name": "makerAssetData", "type": "bytes" }, + { "internalType": "bytes", "name": "takerAssetData", "type": "bytes" }, + { "internalType": "bytes", "name": "makerFeeAssetData", "type": "bytes" }, + { "internalType": "bytes", "name": "takerFeeAssetData", "type": "bytes" } + ], + "internalType": "struct LibOrder.Order", + "name": "order", + "type": "tuple" + }, + { "internalType": "uint256", "name": "takerAssetFillAmount", "type": "uint256" }, + { "internalType": "bytes", "name": "signature", "type": "bytes" }, + { "internalType": "bytes4", "name": "fillFunctionSelector", "type": "bytes4" }, + { "internalType": "uint256[]", "name": "ethFeeAmounts", "type": "uint256[]" }, + { "internalType": "address payable[]", "name": "feeRecipients", "type": "address[]" } + ], + "name": "brokerTrade", + "outputs": [ + { + "components": [ + { "internalType": "uint256", "name": "makerAssetFilledAmount", "type": "uint256" }, + { "internalType": "uint256", "name": "takerAssetFilledAmount", "type": "uint256" }, + { "internalType": "uint256", "name": "makerFeePaid", "type": "uint256" }, + { "internalType": "uint256", "name": "takerFeePaid", "type": "uint256" }, + { "internalType": "uint256", "name": "protocolFeePaid", "type": "uint256" } + ], + "internalType": "struct LibFillResults.FillResults", + "name": "fillResults", + "type": "tuple" + } + ], + "payable": true, + "stateMutability": "payable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "from", "type": "address" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256[]", "name": "", "type": "uint256[]" }, + { "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }, + { "internalType": "bytes", "name": "data", "type": "bytes" } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "devdoc": { + "methods": { + "batchBrokerTrade(uint256[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],uint256[],bytes[],bytes4,uint256[],address[])": { + "details": "Fills multiple property-based orders by the given amounts using the given assets. Pays protocol fees using either the ETH supplied by the taker to the transaction or WETH acquired from the maker during settlement. The final WETH balance is sent to the taker.", + "params": { + "batchFillFunctionSelector": "The selector for either `batchFillOrders`, `batchFillOrKillOrders`, or `batchFillOrdersNoThrow`.", + "brokeredTokenIds": "Token IDs specified by the taker to be used to fill the orders.", + "ethFeeAmounts": "Amounts of ETH, denominated in Wei, that are paid to corresponding feeRecipients.", + "feeRecipients": "Addresses that will receive ETH when orders are filled.", + "orders": "The property-based orders to fill. The format of a property-based order is the same as that of a normal order, except the takerAssetData. Instaed of specifying a specific ERC721 asset, the takerAssetData should be ERC1155 assetData where the underlying tokenAddress is this contract's address and the desired properties are encoded in the extra data field. Also note that takerFees must be denominated in WETH (or zero).", + "signatures": "The makers' signatures for the given orders.", + "takerAssetFillAmounts": "The amounts to fill the orders by." + }, + "return": "fillResults Amounts filled and fees paid by the makers and taker." + }, + "brokerTrade(uint256[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),uint256,bytes,bytes4,uint256[],address[])": { + "details": "Fills a single property-based order by the given amount using the given assets. Pays protocol fees using either the ETH supplied by the taker to the transaction or WETH acquired from the maker during settlement. The final WETH balance is sent to the taker.", + "params": { + "brokeredTokenIds": "Token IDs specified by the taker to be used to fill the orders.", + "ethFeeAmounts": "Amounts of ETH, denominated in Wei, that are paid to corresponding feeRecipients.", + "feeRecipients": "Addresses that will receive ETH when orders are filled.", + "fillFunctionSelector": "The selector for either `fillOrder` or `fillOrKillOrder`.", + "order": "The property-based order to fill. The format of a property-based order is the same as that of a normal order, except the takerAssetData. Instaed of specifying a specific ERC721 asset, the takerAssetData should be ERC1155 assetData where the underlying tokenAddress is this contract's address and the desired properties are encoded in the extra data field. Also note that takerFees must be denominated in WETH (or zero).", + "signature": "The maker's signature of the given order.", + "takerAssetFillAmount": "The amount to fill the order by." + }, + "return": "fillResults Amounts filled and fees paid by the maker and taker." + }, + "constructor": { "params": { "exchange": "Address of the 0x ERC1155 Asset Proxy contract." } }, + "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)": { + "details": "The Broker implements the ERC1155 transfer function to be compatible with the ERC1155 asset proxy", + "params": { + "amounts": "Should be an array of just one `uint256`, specifying the amount of the brokered assets to transfer.", + "data": "Encodes the validator contract address and any auxiliary data it needs for property validation.", + "from": "Since the Broker serves as the taker of the order, this should equal `address(this)`", + "to": "This should be the maker of the order." + } + } + } + }, + "evm": { + "bytecode": { + "object": "0x60806040523480156200001157600080fd5b506040516200309a3803806200309a8339810160408190526200003491620004f1565b600080546001600160a01b0319166001600160a01b03831617905560405182908290630f47261b60e41b906200006f90839060240162000551565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217825251620000af916001916200041f565b50604051630c0e082160e31b81526000906001600160a01b03841690636070410890620000e890630f47261b60e41b906004016200057e565b60206040518083038186803b1580156200010157600080fd5b505afa15801562000116573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506200013c9190810190620004c1565b90506001600160a01b03811662000177576200017762000166620003ea60201b62002a411760201c565b6200041760201b6200016e1760201c565b60005460405163095ea7b360e01b81526001600160a01b039091169063095ea7b390620001ad9084906000199060040162000565565b602060405180830381600087803b158015620001c857600080fd5b505af1158015620001dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506200020391908101906200052f565b506000836001600160a01b031663850a15016040518163ffffffff1660e01b815260040160206040518083038186803b1580156200024057600080fd5b505afa15801562000255573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506200027b9190810190620004c1565b90506001600160a01b038116156200031b5760005460405163095ea7b360e01b81526001600160a01b039091169063095ea7b390620002c39084906000199060040162000565565b602060405180830381600087803b158015620002de57600080fd5b505af1158015620002f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506200031991908101906200052f565b505b5050600280546001600160a01b0319166001600160a01b038681169190911791829055604051630c0e082160e31b815291169250636070410891506200036d9063a7cb5fb760e01b906004016200057e565b60206040518083038186803b1580156200038657600080fd5b505afa1580156200039b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250620003c19190810190620004c1565b600380546001600160a01b0319166001600160a01b039290921691909117905550620005ac9050565b6040805160048152602481019091526020810180516001600160e01b031663f3b96b8d60e01b1790525b90565b805160208201fd5b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200046257805160ff191683800117855562000492565b8280016001018555821562000492579182015b828111156200049257825182559160200191906001019062000475565b50620004a0929150620004a4565b5090565b6200041491905b80821115620004a05760008155600101620004ab565b600060208284031215620004d3578081fd5b81516001600160a01b0381168114620004ea578182fd5b9392505050565b6000806040838503121562000504578081fd5b8251620005118162000593565b6020840151909250620005248162000593565b809150509250929050565b60006020828403121562000541578081fd5b81518015158114620004ea578182fd5b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160e01b031991909116815260200190565b6001600160a01b0381168114620005a957600080fd5b50565b612ade80620005bc6000396000f3fe6080604052600436106100345760003560e01c80632eb2c2d61461006657806385afeaa014610086578063a2b18d95146100af575b60005473ffffffffffffffffffffffffffffffffffffffff1633146100645761006461005f336100cf565b61016e565b005b34801561007257600080fd5b5061006461008136600461208a565b610176565b610099610094366004612312565b6103bc565b6040516100a691906128f9565b60405180910390f35b6100c26100bd366004612211565b610789565b6040516100a69190612749565b60606308b1869860e01b826040516024016100ea9190612667565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529050919050565b805160208201fd5b60035473ffffffffffffffffffffffffffffffffffffffff1633146101a1576101a161005f33610b88565b73ffffffffffffffffffffffffffffffffffffffff881630146101ca576101ca61005f89610ba3565b600183146101de576101de61005f84610bbe565b6005546000858582816101ed57fe5b9050602002013590508061020f83600480549050610bd990919063ffffffff16565b1015610225576004546102259061005f90610bfd565b600080606061023686880188611f92565b9250925092505b83156103a85760006004868154811061025257fe5b6000918252602090912001546040517f9256050a00000000000000000000000000000000000000000000000000000000815260019097019690915073ffffffffffffffffffffffffffffffffffffffff841690639256050a906102bb908490869060040161293b565b60006040518083038186803b1580156102d357600080fd5b505afa1580156102e7573d6000803e3d6000fd5b505050508373ffffffffffffffffffffffffffffffffffffffff166323b872dd600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168f846040518463ffffffff1660e01b815260040161034a939291906126f2565b600060405180830381600087803b15801561036457600080fd5b505af1158015610378573d6000803e3d6000fd5b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909601955061023d915050565b505050600591909155505050505050505050565b6103c4611a31565b87516103d79060049060208b0190611a60565b50600680547fffffffffffffffffffffffff000000000000000000000000000000000000000016331790557fffffffff0000000000000000000000000000000000000000000000000000000084167f9b44d556000000000000000000000000000000000000000000000000000000001480159061049657507fffffffff0000000000000000000000000000000000000000000000000000000084167fe14b58c40000000000000000000000000000000000000000000000000000000014155b156104a6576104a484610c18565b505b6104b08383610c33565b506060848888886040516024016104c993929190612907565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090941693909317909252600254915190925060009160609173ffffffffffffffffffffffffffffffffffffffff9091169061057890859061264b565b6000604051808303816000865af19150503d80600081146105b5576040519150601f19603f3d011682016040523d82523d6000602084013e6105ba565b606091505b509150915081156105e057808060200190516105d99190810190612448565b93506105e9565b6105e98161016e565b60018054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610100878916150201909516949094049384018190048102820181019092528281526106ab93909290918301828280156106935780601f1061066857610100808354040283529160200191610693565b820191906000526020600020905b81548152906001019060200180831161067657829003601f168201915b5050506101408e01519291505063ffffffff610d8a16565b6106c65783516101408b01516106c69163ffffffff610db116565b6000546040517f70a082310000000000000000000000000000000000000000000000000000000081526107739173ffffffffffffffffffffffffffffffffffffffff16906370a082319061071e903090600401612667565b60206040518083038186803b15801561073657600080fd5b505afa15801561074a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061076e9190810190612463565b610dc7565b61077b610e85565b505050979650505050505050565b865160609061079f9060049060208b0190611a60565b50600680547fffffffffffffffffffffffff000000000000000000000000000000000000000016331790557fffffffff0000000000000000000000000000000000000000000000000000000084167f9694a402000000000000000000000000000000000000000000000000000000001480159061085e57507fffffffff0000000000000000000000000000000000000000000000000000000084167fbeee2e140000000000000000000000000000000000000000000000000000000014155b80156108ac57507fffffffff0000000000000000000000000000000000000000000000000000000084167f8ea8dfe40000000000000000000000000000000000000000000000000000000014155b156108bc576108ba84610c18565b505b6108c68383610c33565b506060848888886040516024016108df93929190612797565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090941693909317909252600254915190925060009160609173ffffffffffffffffffffffffffffffffffffffff9091169061098e90859061264b565b6000604051808303816000865af19150503d80600081146109cb576040519150601f19603f3d011682016040523d82523d6000602084013e6109d0565b606091505b509150915081156109f657808060200190516109ef919081019061216f565b93506109ff565b6109ff8161016e565b60005b8a51811015610b2f5760018054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61010087891615020190951694909404938401819004810282018101909252828152610ae19390929091830182828015610ab55780601f10610a8a57610100808354040283529160200191610ab5565b820191906000526020600020905b815481529060010190602001808311610a9857829003601f168201915b50505050508c8381518110610ac657fe5b60200260200101516101400151610d8a90919063ffffffff16565b610b2757610b27858281518110610af457fe5b6020026020010151600001518c8381518110610b0c57fe5b60200260200101516101400151610db190919063ffffffff16565b600101610a02565b506000546040517f70a082310000000000000000000000000000000000000000000000000000000081526107739173ffffffffffffffffffffffffffffffffffffffff16906370a082319061071e903090600401612667565b606063ccc529af60e01b826040516024016100ea9190612667565b606063906bfb3c60e01b826040516024016100ea9190612667565b606063ba9be20060e01b826040516024016100ea9190612932565b600082821115610bf257610bf261005f60028585610ec0565b508082035b92915050565b6060635527258660e01b826040516024016100ea9190612932565b606063540943f160e01b826040516024016100ea919061289c565b81518151600091908114610c4f57610c4f61005f828551610f65565b34915060005b818114610cfe576000858281518110610c6a57fe5b6020026020010151905080841015610c8957610c8961005f8286611007565b610c99848263ffffffff610bd916565b9350848281518110610ca757fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610cf4573d6000803e3d6000fd5b5050600101610c55565b5060008054604080517fd0e30db0000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff9092169263d0e30db0928692600480820193929182900301818588803b158015610d6a57600080fd5b505af1158015610d7e573d6000803e3d6000fd5b50505050505092915050565b600081518351148015610daa575081805190602001208380519060200120145b9392505050565b610dc38230338463ffffffff61102416565b5050565b8015610e82576000546040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690632e1a7d4d90610e23908490600401612932565b600060405180830381600087803b158015610e3d57600080fd5b505af1158015610e51573d6000803e3d6000fd5b505060405133925083156108fc02915083906000818181858888f19350505050158015610dc3573d6000803e3d6000fd5b50565b610e9160046000611aab565b6000600555600680547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b606063e946c1bb60e01b848484604051602401610edf939291906128c9565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290509392505050565b6060633ecb6ceb60e01b8383604051602401610f8292919061295c565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905092915050565b606063ecf40fd960e01b8383604051602401610f8292919061295c565b8061102e5761125a565b6000611040858263ffffffff61126016565b90507fffffffff0000000000000000000000000000000000000000000000000000000081167ff47261b00000000000000000000000000000000000000000000000000000000014806110d357507fffffffff0000000000000000000000000000000000000000000000000000000081167fdc1600f300000000000000000000000000000000000000000000000000000000145b156110ef576110ea8585858563ffffffff6112ac16565b611258565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f0257179200000000000000000000000000000000000000000000000000000000141561114b576110ea8585858563ffffffff6112f616565b7fffffffff0000000000000000000000000000000000000000000000000000000081167fa7cb5fb70000000000000000000000000000000000000000000000000000000014156111a7576110ea8585858563ffffffff6113c516565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f94cfcdd7000000000000000000000000000000000000000000000000000000001415611203576110ea8585858563ffffffff61151b16565b7fffffffff0000000000000000000000000000000000000000000000000000000081167fc339d10a00000000000000000000000000000000000000000000000000000000146112585761125861005f826115af565b505b50505050565b600081600401835110156112815761128161005f60038551856004016115ca565b5001602001517fffffffff000000000000000000000000000000000000000000000000000000001690565b60006112bf85601063ffffffff6115e916565b905073ffffffffffffffffffffffffffffffffffffffff84163014156112ea576110ea818484611629565b611258818585856116ea565b8060011461130a5761130a61005f826117ad565b600061131d85601063ffffffff6115e916565b9050600061133286602463ffffffff6117c816565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff8316906323b872dd9061138b908890889086906004016126f2565b600060405180830381600087803b1580156113a557600080fd5b505af11580156113b9573d6000803e3d6000fd5b50505050505050505050565b600060608060606113e3600489518a6117d49092919063ffffffff16565b8060200190516113f69190810190611ff2565b9350935093509350600082519050606081604051908082528060200260200182016040528015611430578160200160208202803883390190505b50905060005b828114611482576114638886838151811061144d57fe5b602002602001015161185490919063ffffffff16565b82828151811061146f57fe5b6020908102919091010152600101611436565b506040517f2eb2c2d600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff871690632eb2c2d6906114dd908c908c908a9087908a90600401612688565b600060405180830381600087803b1580156114f757600080fd5b505af115801561150b573d6000803e3d6000fd5b5050505050505050505050505050565b60608061153560048751886117d49092919063ffffffff16565b8060200190516115489190810190612398565b8051919350915060005b8181146115a55761159d83828151811061156857fe5b6020026020010151888861159888868151811061158157fe5b60200260200101518a61185490919063ffffffff16565b611024565b600101611552565b5050505050505050565b6060637996a27160e01b826040516024016100ea919061289c565b6060632800659560e01b848484604051602401610edf939291906128eb565b6000816014018351101561160a5761160a61005f60048551856014016115ca565b50016014015173ffffffffffffffffffffffffffffffffffffffff1690565b6040516060907fa9059cbb00000000000000000000000000000000000000000000000000000000906116619085908590602401612723565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905061125a8482611885565b6040516060907f23b872dd0000000000000000000000000000000000000000000000000000000090611724908690869086906024016126f2565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290506112588582611885565b606063baffa47460e01b826040516024016100ea9190612932565b6000610daa838361193d565b6060818311156117ed576117ed61005f600085856115ca565b83518211156118065761180661005f60018487516115ca565b8282036040519080825280601f01601f191660200182016040528015611833576020820181803883390190505b509050610daa61184282611967565b8461184c87611967565b01835161196d565b60008261186357506000610bf7565b8282028284828161187057fe5b0414610daa57610daa61005f60018686610ec0565b600060608373ffffffffffffffffffffffffffffffffffffffff16836040516118ae919061264b565b6000604051808303816000865af19150503d80600081146118eb576040519150601f19603f3d011682016040523d82523d6000602084013e6118f0565b606091505b50915091508115611934578051611908575050610dc3565b80516020141561193457600061191f8260006117c8565b9050806001141561193257505050610dc3565b505b61125a8161016e565b6000816020018351101561195e5761195e61005f60058551856020016115ca565b50016020015190565b60200190565b6020811015611997576001816020036101000a038019835116818551168082178652505050611a2c565b828214156119a457611a2c565b828211156119de5760208103905080820181840181515b828510156119d65784518652602095860195909401936119bb565b905250611a2c565b60208103905080820181840183515b81861215611a2757825182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe092830192909101906119ed565b855250505b505050565b6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b828054828255906000526020600020908101928215611a9b579160200282015b82811115611a9b578251825591602001919060010190611a80565b50611aa7929150611ac5565b5090565b5080546000825590600052602060002090810190610e8291905b611adf91905b80821115611aa75760008155600101611acb565b90565b8035610bf781612a1f565b600082601f830112611afd578081fd5b8135611b10611b0b82612991565b61296a565b818152915060208083019084810181840286018201871015611b3157600080fd5b60005b84811015611b59578135611b4781612a1f565b84529282019290820190600101611b34565b505050505092915050565b600082601f830112611b74578081fd5b8135611b82611b0b82612991565b8181529150602080830190840160005b83811015611bbf57611baa8760208435890101611d59565b83526020928301929190910190600101611b92565b5050505092915050565b600082601f830112611bd9578081fd5b8135611be7611b0b82612991565b8181529150602080830190840160005b83811015611bbf57611c0f8760208435890101611e43565b83526020928301929190910190600101611bf7565b60008083601f840112611c35578182fd5b50813567ffffffffffffffff811115611c4c578182fd5b6020830191508360208083028501011115611c6657600080fd5b9250929050565b600082601f830112611c7d578081fd5b8151611c8b611b0b82612991565b818152915060208083019084810181840286018201871015611cac57600080fd5b60005b84811015611b5957815184529282019290820190600101611caf565b600082601f830112611cdb578081fd5b8135611ce9611b0b82612991565b818152915060208083019084810181840286018201871015611d0a57600080fd5b60005b84811015611b5957813584529282019290820190600101611d0d565b80357fffffffff0000000000000000000000000000000000000000000000000000000081168114610bf757600080fd5b600082601f830112611d69578081fd5b8135611d77611b0b826129b1565b9150808252836020828501011115611d8e57600080fd5b8060208401602084013760009082016020015292915050565b600082601f830112611db7578081fd5b8151611dc5611b0b826129b1565b9150808252836020828501011115611ddc57600080fd5b611ded8160208401602086016129f3565b5092915050565b600060a08284031215611e05578081fd5b611e0f60a061296a565b9050815181526020820151602082015260408201516040820152606082015160608201526080820151608082015292915050565b60006101c0808385031215611e56578182fd5b611e5f8161296a565b915050611e6c8383611ae2565b8152611e7b8360208401611ae2565b6020820152611e8d8360408401611ae2565b6040820152611e9f8360608401611ae2565b60608201526080820135608082015260a082013560a082015260c082013560c082015260e082013560e08201526101008083013581830152506101208083013581830152506101408083013567ffffffffffffffff80821115611f0157600080fd5b611f0d86838701611d59565b83850152610160925082850135915080821115611f2957600080fd5b611f3586838701611d59565b83850152610180925082850135915080821115611f5157600080fd5b611f5d86838701611d59565b838501526101a0925082850135915080821115611f7957600080fd5b50611f8685828601611d59565b82840152505092915050565b600080600060608486031215611fa6578283fd5b8335611fb181612a1f565b92506020840135611fc181612a1f565b9150604084013567ffffffffffffffff811115611fdc578182fd5b611fe886828701611d59565b9150509250925092565b60008060008060808587031215612007578182fd5b845161201281612a1f565b602086015190945067ffffffffffffffff8082111561202f578384fd5b61203b88838901611c6d565b94506040870151915080821115612050578384fd5b61205c88838901611c6d565b93506060870151915080821115612071578283fd5b5061207e87828801611da7565b91505092959194509250565b60008060008060008060008060a0898b0312156120a5578586fd5b88356120b081612a1f565b975060208901356120c081612a1f565b9650604089013567ffffffffffffffff808211156120dc578788fd5b6120e88c838d01611c24565b909850965060608b0135915080821115612100578586fd5b61210c8c838d01611c24565b909650945060808b0135915080821115612124578384fd5b818b018c601f820112612135578485fd5b8035925081831115612145578485fd5b8c6020848301011115612156578485fd5b6020810194505050809150509295985092959890939650565b600060208284031215612180578081fd5b815167ffffffffffffffff811115612196578182fd5b80830184601f8201126121a7578283fd5b805191506121b7611b0b83612991565b808382526020820191506020830187602060a0870286010111156121d9578586fd5b8593505b84841015612206576121ef8882611df4565b83526001939093019260209092019160a0016121dd565b509695505050505050565b600080600080600080600060e0888a03121561222b578081fd5b873567ffffffffffffffff80821115612242578283fd5b61224e8b838c01611ccb565b985060208a0135915080821115612263578283fd5b61226f8b838c01611bc9565b975060408a0135915080821115612284578283fd5b6122908b838c01611ccb565b965060608a01359150808211156122a5578283fd5b6122b18b838c01611b64565b95506122c08b60808c01611d29565b945060a08a01359150808211156122d5578283fd5b6122e18b838c01611ccb565b935060c08a01359150808211156122f6578283fd5b506123038a828b01611aed565b91505092959891949750929550565b600080600080600080600060e0888a03121561232c578081fd5b873567ffffffffffffffff80821115612343578283fd5b61234f8b838c01611ccb565b985060208a0135915080821115612364578283fd5b6123708b838c01611e43565b975060408a0135965060608a013591508082111561238c578283fd5b6122b18b838c01611d59565b600080604083850312156123aa578182fd5b825167ffffffffffffffff808211156123c1578384fd5b6123cd86838701611c6d565b93506020915081850151818111156123e3578384fd5b85019050601f810186136123f5578283fd5b8051612403611b0b82612991565b81815283810190838501865b84811015612438576124268b888451890101611da7565b8452928601929086019060010161240f565b5096999098509650505050505050565b600060a08284031215612459578081fd5b610daa8383611df4565b600060208284031215612474578081fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff169052565b6000815180845260208401935060208301825b828110156124c65781518652602095860195909101906001016124a8565b5093949350505050565b600081518084526124e88160208601602086016129f3565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b80518252602081015160208301526040810151604083015260608101516060830152608081015160808301525050565b60006101c061255a84845161247b565b602083015161256c602086018261247b565b50604083015161257f604086018261247b565b506060830151612592606086018261247b565b506080830151608085015260a083015160a085015260c083015160c085015260e083015160e08501526101008084015181860152506101208084015181860152506101408084015182828701526125eb838701826124d0565b9150506101609150818401518582038387015261260882826124d0565b92505050610180808401518583038287015261262483826124d0565b9150506101a09150818401518582038387015261264182826124d0565b9695505050505050565b6000825161265d8184602087016129f3565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff808816835280871660208401525060a060408301526126c160a0830186612495565b82810360608401526126d38186612495565b83810360808501526126e581866124d0565b9998505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b602080825282518282018190526000918401906040840190835b8181101561278c5761277683855161251a565b6020939093019260a09290920191600101612763565b509095945050505050565b60006060820160608352808651808352608085019150602092506080838202860101838901855b8381101561280a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808884030185526127f883835161254a565b948601949250908501906001016127be565b50508581038487015261281d8189612495565b925050508381036040850152808551808352838301915083848202840101848801865b8381101561288c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe086840301855261287a8383516124d0565b94870194925090860190600101612840565b50909a9950505050505050505050565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b60608101600485106128d757fe5b938152602081019290925260409091015290565b60608101600885106128d757fe5b60a08101610bf7828461251a565b60006060825261291a606083018661254a565b846020840152828103604084015261264181856124d0565b90815260200190565b60008382526040602083015261295460408301846124d0565b949350505050565b918252602082015260400190565b60405181810167ffffffffffffffff8111828210171561298957600080fd5b604052919050565b600067ffffffffffffffff8211156129a7578081fd5b5060209081020190565b600067ffffffffffffffff8211156129c7578081fd5b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60005b83811015612a0e5781810151838201526020016129f6565b8381111561125a5750506000910152565b73ffffffffffffffffffffffffffffffffffffffff81168114610e8257600080fd5b6040805160048152602481019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167ff3b96b8d000000000000000000000000000000000000000000000000000000001790529056fea365627a7a723158208d14f5d218c3a076c1d9cc46cc7bba85eb91343de1b83a38afec0fae47158b036c6578706572696d656e74616cf564736f6c63430005100040" + }, + "deployedBytecode": { + "object": "0x6080604052600436106100345760003560e01c80632eb2c2d61461006657806385afeaa014610086578063a2b18d95146100af575b60005473ffffffffffffffffffffffffffffffffffffffff1633146100645761006461005f336100cf565b61016e565b005b34801561007257600080fd5b5061006461008136600461208a565b610176565b610099610094366004612312565b6103bc565b6040516100a691906128f9565b60405180910390f35b6100c26100bd366004612211565b610789565b6040516100a69190612749565b60606308b1869860e01b826040516024016100ea9190612667565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529050919050565b805160208201fd5b60035473ffffffffffffffffffffffffffffffffffffffff1633146101a1576101a161005f33610b88565b73ffffffffffffffffffffffffffffffffffffffff881630146101ca576101ca61005f89610ba3565b600183146101de576101de61005f84610bbe565b6005546000858582816101ed57fe5b9050602002013590508061020f83600480549050610bd990919063ffffffff16565b1015610225576004546102259061005f90610bfd565b600080606061023686880188611f92565b9250925092505b83156103a85760006004868154811061025257fe5b6000918252602090912001546040517f9256050a00000000000000000000000000000000000000000000000000000000815260019097019690915073ffffffffffffffffffffffffffffffffffffffff841690639256050a906102bb908490869060040161293b565b60006040518083038186803b1580156102d357600080fd5b505afa1580156102e7573d6000803e3d6000fd5b505050508373ffffffffffffffffffffffffffffffffffffffff166323b872dd600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168f846040518463ffffffff1660e01b815260040161034a939291906126f2565b600060405180830381600087803b15801561036457600080fd5b505af1158015610378573d6000803e3d6000fd5b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909601955061023d915050565b505050600591909155505050505050505050565b6103c4611a31565b87516103d79060049060208b0190611a60565b50600680547fffffffffffffffffffffffff000000000000000000000000000000000000000016331790557fffffffff0000000000000000000000000000000000000000000000000000000084167f9b44d556000000000000000000000000000000000000000000000000000000001480159061049657507fffffffff0000000000000000000000000000000000000000000000000000000084167fe14b58c40000000000000000000000000000000000000000000000000000000014155b156104a6576104a484610c18565b505b6104b08383610c33565b506060848888886040516024016104c993929190612907565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090941693909317909252600254915190925060009160609173ffffffffffffffffffffffffffffffffffffffff9091169061057890859061264b565b6000604051808303816000865af19150503d80600081146105b5576040519150601f19603f3d011682016040523d82523d6000602084013e6105ba565b606091505b509150915081156105e057808060200190516105d99190810190612448565b93506105e9565b6105e98161016e565b60018054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610100878916150201909516949094049384018190048102820181019092528281526106ab93909290918301828280156106935780601f1061066857610100808354040283529160200191610693565b820191906000526020600020905b81548152906001019060200180831161067657829003601f168201915b5050506101408e01519291505063ffffffff610d8a16565b6106c65783516101408b01516106c69163ffffffff610db116565b6000546040517f70a082310000000000000000000000000000000000000000000000000000000081526107739173ffffffffffffffffffffffffffffffffffffffff16906370a082319061071e903090600401612667565b60206040518083038186803b15801561073657600080fd5b505afa15801561074a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061076e9190810190612463565b610dc7565b61077b610e85565b505050979650505050505050565b865160609061079f9060049060208b0190611a60565b50600680547fffffffffffffffffffffffff000000000000000000000000000000000000000016331790557fffffffff0000000000000000000000000000000000000000000000000000000084167f9694a402000000000000000000000000000000000000000000000000000000001480159061085e57507fffffffff0000000000000000000000000000000000000000000000000000000084167fbeee2e140000000000000000000000000000000000000000000000000000000014155b80156108ac57507fffffffff0000000000000000000000000000000000000000000000000000000084167f8ea8dfe40000000000000000000000000000000000000000000000000000000014155b156108bc576108ba84610c18565b505b6108c68383610c33565b506060848888886040516024016108df93929190612797565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090941693909317909252600254915190925060009160609173ffffffffffffffffffffffffffffffffffffffff9091169061098e90859061264b565b6000604051808303816000865af19150503d80600081146109cb576040519150601f19603f3d011682016040523d82523d6000602084013e6109d0565b606091505b509150915081156109f657808060200190516109ef919081019061216f565b93506109ff565b6109ff8161016e565b60005b8a51811015610b2f5760018054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61010087891615020190951694909404938401819004810282018101909252828152610ae19390929091830182828015610ab55780601f10610a8a57610100808354040283529160200191610ab5565b820191906000526020600020905b815481529060010190602001808311610a9857829003601f168201915b50505050508c8381518110610ac657fe5b60200260200101516101400151610d8a90919063ffffffff16565b610b2757610b27858281518110610af457fe5b6020026020010151600001518c8381518110610b0c57fe5b60200260200101516101400151610db190919063ffffffff16565b600101610a02565b506000546040517f70a082310000000000000000000000000000000000000000000000000000000081526107739173ffffffffffffffffffffffffffffffffffffffff16906370a082319061071e903090600401612667565b606063ccc529af60e01b826040516024016100ea9190612667565b606063906bfb3c60e01b826040516024016100ea9190612667565b606063ba9be20060e01b826040516024016100ea9190612932565b600082821115610bf257610bf261005f60028585610ec0565b508082035b92915050565b6060635527258660e01b826040516024016100ea9190612932565b606063540943f160e01b826040516024016100ea919061289c565b81518151600091908114610c4f57610c4f61005f828551610f65565b34915060005b818114610cfe576000858281518110610c6a57fe5b6020026020010151905080841015610c8957610c8961005f8286611007565b610c99848263ffffffff610bd916565b9350848281518110610ca757fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610cf4573d6000803e3d6000fd5b5050600101610c55565b5060008054604080517fd0e30db0000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff9092169263d0e30db0928692600480820193929182900301818588803b158015610d6a57600080fd5b505af1158015610d7e573d6000803e3d6000fd5b50505050505092915050565b600081518351148015610daa575081805190602001208380519060200120145b9392505050565b610dc38230338463ffffffff61102416565b5050565b8015610e82576000546040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690632e1a7d4d90610e23908490600401612932565b600060405180830381600087803b158015610e3d57600080fd5b505af1158015610e51573d6000803e3d6000fd5b505060405133925083156108fc02915083906000818181858888f19350505050158015610dc3573d6000803e3d6000fd5b50565b610e9160046000611aab565b6000600555600680547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b606063e946c1bb60e01b848484604051602401610edf939291906128c9565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290509392505050565b6060633ecb6ceb60e01b8383604051602401610f8292919061295c565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905092915050565b606063ecf40fd960e01b8383604051602401610f8292919061295c565b8061102e5761125a565b6000611040858263ffffffff61126016565b90507fffffffff0000000000000000000000000000000000000000000000000000000081167ff47261b00000000000000000000000000000000000000000000000000000000014806110d357507fffffffff0000000000000000000000000000000000000000000000000000000081167fdc1600f300000000000000000000000000000000000000000000000000000000145b156110ef576110ea8585858563ffffffff6112ac16565b611258565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f0257179200000000000000000000000000000000000000000000000000000000141561114b576110ea8585858563ffffffff6112f616565b7fffffffff0000000000000000000000000000000000000000000000000000000081167fa7cb5fb70000000000000000000000000000000000000000000000000000000014156111a7576110ea8585858563ffffffff6113c516565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f94cfcdd7000000000000000000000000000000000000000000000000000000001415611203576110ea8585858563ffffffff61151b16565b7fffffffff0000000000000000000000000000000000000000000000000000000081167fc339d10a00000000000000000000000000000000000000000000000000000000146112585761125861005f826115af565b505b50505050565b600081600401835110156112815761128161005f60038551856004016115ca565b5001602001517fffffffff000000000000000000000000000000000000000000000000000000001690565b60006112bf85601063ffffffff6115e916565b905073ffffffffffffffffffffffffffffffffffffffff84163014156112ea576110ea818484611629565b611258818585856116ea565b8060011461130a5761130a61005f826117ad565b600061131d85601063ffffffff6115e916565b9050600061133286602463ffffffff6117c816565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff8316906323b872dd9061138b908890889086906004016126f2565b600060405180830381600087803b1580156113a557600080fd5b505af11580156113b9573d6000803e3d6000fd5b50505050505050505050565b600060608060606113e3600489518a6117d49092919063ffffffff16565b8060200190516113f69190810190611ff2565b9350935093509350600082519050606081604051908082528060200260200182016040528015611430578160200160208202803883390190505b50905060005b828114611482576114638886838151811061144d57fe5b602002602001015161185490919063ffffffff16565b82828151811061146f57fe5b6020908102919091010152600101611436565b506040517f2eb2c2d600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff871690632eb2c2d6906114dd908c908c908a9087908a90600401612688565b600060405180830381600087803b1580156114f757600080fd5b505af115801561150b573d6000803e3d6000fd5b5050505050505050505050505050565b60608061153560048751886117d49092919063ffffffff16565b8060200190516115489190810190612398565b8051919350915060005b8181146115a55761159d83828151811061156857fe5b6020026020010151888861159888868151811061158157fe5b60200260200101518a61185490919063ffffffff16565b611024565b600101611552565b5050505050505050565b6060637996a27160e01b826040516024016100ea919061289c565b6060632800659560e01b848484604051602401610edf939291906128eb565b6000816014018351101561160a5761160a61005f60048551856014016115ca565b50016014015173ffffffffffffffffffffffffffffffffffffffff1690565b6040516060907fa9059cbb00000000000000000000000000000000000000000000000000000000906116619085908590602401612723565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905061125a8482611885565b6040516060907f23b872dd0000000000000000000000000000000000000000000000000000000090611724908690869086906024016126f2565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290506112588582611885565b606063baffa47460e01b826040516024016100ea9190612932565b6000610daa838361193d565b6060818311156117ed576117ed61005f600085856115ca565b83518211156118065761180661005f60018487516115ca565b8282036040519080825280601f01601f191660200182016040528015611833576020820181803883390190505b509050610daa61184282611967565b8461184c87611967565b01835161196d565b60008261186357506000610bf7565b8282028284828161187057fe5b0414610daa57610daa61005f60018686610ec0565b600060608373ffffffffffffffffffffffffffffffffffffffff16836040516118ae919061264b565b6000604051808303816000865af19150503d80600081146118eb576040519150601f19603f3d011682016040523d82523d6000602084013e6118f0565b606091505b50915091508115611934578051611908575050610dc3565b80516020141561193457600061191f8260006117c8565b9050806001141561193257505050610dc3565b505b61125a8161016e565b6000816020018351101561195e5761195e61005f60058551856020016115ca565b50016020015190565b60200190565b6020811015611997576001816020036101000a038019835116818551168082178652505050611a2c565b828214156119a457611a2c565b828211156119de5760208103905080820181840181515b828510156119d65784518652602095860195909401936119bb565b905250611a2c565b60208103905080820181840183515b81861215611a2757825182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe092830192909101906119ed565b855250505b505050565b6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b828054828255906000526020600020908101928215611a9b579160200282015b82811115611a9b578251825591602001919060010190611a80565b50611aa7929150611ac5565b5090565b5080546000825590600052602060002090810190610e8291905b611adf91905b80821115611aa75760008155600101611acb565b90565b8035610bf781612a1f565b600082601f830112611afd578081fd5b8135611b10611b0b82612991565b61296a565b818152915060208083019084810181840286018201871015611b3157600080fd5b60005b84811015611b59578135611b4781612a1f565b84529282019290820190600101611b34565b505050505092915050565b600082601f830112611b74578081fd5b8135611b82611b0b82612991565b8181529150602080830190840160005b83811015611bbf57611baa8760208435890101611d59565b83526020928301929190910190600101611b92565b5050505092915050565b600082601f830112611bd9578081fd5b8135611be7611b0b82612991565b8181529150602080830190840160005b83811015611bbf57611c0f8760208435890101611e43565b83526020928301929190910190600101611bf7565b60008083601f840112611c35578182fd5b50813567ffffffffffffffff811115611c4c578182fd5b6020830191508360208083028501011115611c6657600080fd5b9250929050565b600082601f830112611c7d578081fd5b8151611c8b611b0b82612991565b818152915060208083019084810181840286018201871015611cac57600080fd5b60005b84811015611b5957815184529282019290820190600101611caf565b600082601f830112611cdb578081fd5b8135611ce9611b0b82612991565b818152915060208083019084810181840286018201871015611d0a57600080fd5b60005b84811015611b5957813584529282019290820190600101611d0d565b80357fffffffff0000000000000000000000000000000000000000000000000000000081168114610bf757600080fd5b600082601f830112611d69578081fd5b8135611d77611b0b826129b1565b9150808252836020828501011115611d8e57600080fd5b8060208401602084013760009082016020015292915050565b600082601f830112611db7578081fd5b8151611dc5611b0b826129b1565b9150808252836020828501011115611ddc57600080fd5b611ded8160208401602086016129f3565b5092915050565b600060a08284031215611e05578081fd5b611e0f60a061296a565b9050815181526020820151602082015260408201516040820152606082015160608201526080820151608082015292915050565b60006101c0808385031215611e56578182fd5b611e5f8161296a565b915050611e6c8383611ae2565b8152611e7b8360208401611ae2565b6020820152611e8d8360408401611ae2565b6040820152611e9f8360608401611ae2565b60608201526080820135608082015260a082013560a082015260c082013560c082015260e082013560e08201526101008083013581830152506101208083013581830152506101408083013567ffffffffffffffff80821115611f0157600080fd5b611f0d86838701611d59565b83850152610160925082850135915080821115611f2957600080fd5b611f3586838701611d59565b83850152610180925082850135915080821115611f5157600080fd5b611f5d86838701611d59565b838501526101a0925082850135915080821115611f7957600080fd5b50611f8685828601611d59565b82840152505092915050565b600080600060608486031215611fa6578283fd5b8335611fb181612a1f565b92506020840135611fc181612a1f565b9150604084013567ffffffffffffffff811115611fdc578182fd5b611fe886828701611d59565b9150509250925092565b60008060008060808587031215612007578182fd5b845161201281612a1f565b602086015190945067ffffffffffffffff8082111561202f578384fd5b61203b88838901611c6d565b94506040870151915080821115612050578384fd5b61205c88838901611c6d565b93506060870151915080821115612071578283fd5b5061207e87828801611da7565b91505092959194509250565b60008060008060008060008060a0898b0312156120a5578586fd5b88356120b081612a1f565b975060208901356120c081612a1f565b9650604089013567ffffffffffffffff808211156120dc578788fd5b6120e88c838d01611c24565b909850965060608b0135915080821115612100578586fd5b61210c8c838d01611c24565b909650945060808b0135915080821115612124578384fd5b818b018c601f820112612135578485fd5b8035925081831115612145578485fd5b8c6020848301011115612156578485fd5b6020810194505050809150509295985092959890939650565b600060208284031215612180578081fd5b815167ffffffffffffffff811115612196578182fd5b80830184601f8201126121a7578283fd5b805191506121b7611b0b83612991565b808382526020820191506020830187602060a0870286010111156121d9578586fd5b8593505b84841015612206576121ef8882611df4565b83526001939093019260209092019160a0016121dd565b509695505050505050565b600080600080600080600060e0888a03121561222b578081fd5b873567ffffffffffffffff80821115612242578283fd5b61224e8b838c01611ccb565b985060208a0135915080821115612263578283fd5b61226f8b838c01611bc9565b975060408a0135915080821115612284578283fd5b6122908b838c01611ccb565b965060608a01359150808211156122a5578283fd5b6122b18b838c01611b64565b95506122c08b60808c01611d29565b945060a08a01359150808211156122d5578283fd5b6122e18b838c01611ccb565b935060c08a01359150808211156122f6578283fd5b506123038a828b01611aed565b91505092959891949750929550565b600080600080600080600060e0888a03121561232c578081fd5b873567ffffffffffffffff80821115612343578283fd5b61234f8b838c01611ccb565b985060208a0135915080821115612364578283fd5b6123708b838c01611e43565b975060408a0135965060608a013591508082111561238c578283fd5b6122b18b838c01611d59565b600080604083850312156123aa578182fd5b825167ffffffffffffffff808211156123c1578384fd5b6123cd86838701611c6d565b93506020915081850151818111156123e3578384fd5b85019050601f810186136123f5578283fd5b8051612403611b0b82612991565b81815283810190838501865b84811015612438576124268b888451890101611da7565b8452928601929086019060010161240f565b5096999098509650505050505050565b600060a08284031215612459578081fd5b610daa8383611df4565b600060208284031215612474578081fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff169052565b6000815180845260208401935060208301825b828110156124c65781518652602095860195909101906001016124a8565b5093949350505050565b600081518084526124e88160208601602086016129f3565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b80518252602081015160208301526040810151604083015260608101516060830152608081015160808301525050565b60006101c061255a84845161247b565b602083015161256c602086018261247b565b50604083015161257f604086018261247b565b506060830151612592606086018261247b565b506080830151608085015260a083015160a085015260c083015160c085015260e083015160e08501526101008084015181860152506101208084015181860152506101408084015182828701526125eb838701826124d0565b9150506101609150818401518582038387015261260882826124d0565b92505050610180808401518583038287015261262483826124d0565b9150506101a09150818401518582038387015261264182826124d0565b9695505050505050565b6000825161265d8184602087016129f3565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff808816835280871660208401525060a060408301526126c160a0830186612495565b82810360608401526126d38186612495565b83810360808501526126e581866124d0565b9998505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b602080825282518282018190526000918401906040840190835b8181101561278c5761277683855161251a565b6020939093019260a09290920191600101612763565b509095945050505050565b60006060820160608352808651808352608085019150602092506080838202860101838901855b8381101561280a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808884030185526127f883835161254a565b948601949250908501906001016127be565b50508581038487015261281d8189612495565b925050508381036040850152808551808352838301915083848202840101848801865b8381101561288c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe086840301855261287a8383516124d0565b94870194925090860190600101612840565b50909a9950505050505050505050565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b60608101600485106128d757fe5b938152602081019290925260409091015290565b60608101600885106128d757fe5b60a08101610bf7828461251a565b60006060825261291a606083018661254a565b846020840152828103604084015261264181856124d0565b90815260200190565b60008382526040602083015261295460408301846124d0565b949350505050565b918252602082015260400190565b60405181810167ffffffffffffffff8111828210171561298957600080fd5b604052919050565b600067ffffffffffffffff8211156129a7578081fd5b5060209081020190565b600067ffffffffffffffff8211156129c7578081fd5b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60005b83811015612a0e5781810151838201526020016129f6565b8381111561125a5750506000910152565b73ffffffffffffffffffffffffffffffffffffffff81168114610e8257600080fd5b6040805160048152602481019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167ff3b96b8d000000000000000000000000000000000000000000000000000000001790529056fea365627a7a723158208d14f5d218c3a076c1d9cc46cc7bba85eb91343de1b83a38afec0fae47158b036c6578706572696d656e74616cf564736f6c63430005100040" + } + } + }, + "compiler": { + "name": "solc", + "version": "soljson-v0.5.16+commit.9c3226ce.js", + "settings": { + "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" + ] + } + }, + "evmVersion": "istanbul" + } + }, + "chains": {} +} diff --git a/packages/contract-artifacts/artifacts/GodsUnchainedValidator.json b/packages/contract-artifacts/artifacts/GodsUnchainedValidator.json new file mode 100644 index 0000000000..60eca2282a --- /dev/null +++ b/packages/contract-artifacts/artifacts/GodsUnchainedValidator.json @@ -0,0 +1,70 @@ +{ + "schemaVersion": "2.0.0", + "contractName": "GodsUnchainedValidator", + "compilerOutput": { + "abi": [ + { + "inputs": [{ "internalType": "address", "name": "_godsUnchained", "type": "address" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "constant": true, + "inputs": [ + { "internalType": "uint256", "name": "tokenId", "type": "uint256" }, + { "internalType": "bytes", "name": "propertyData", "type": "bytes" } + ], + "name": "checkBrokerAsset", + "outputs": [], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "devdoc": { + "methods": { + "checkBrokerAsset(uint256,bytes)": { + "details": "Checks that the given card (encoded as assetData) has the proto and quality encoded in `propertyData`. Reverts if the card doesn't match the specified proto and quality.", + "params": { + "propertyData": "Encoded proto and quality that the card is expected to have.", + "tokenId": "The ERC721 tokenId of the card to check." + } + } + } + }, + "evm": { + "bytecode": { + "object": "0x608060405234801561001057600080fd5b5060405161042b38038061042b83398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610082565b600060208284031215610065578081fd5b81516001600160a01b038116811461007b578182fd5b9392505050565b61039a806100916000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80639256050a14610030575b600080fd5b61004361003e3660046101fd565b610045565b005b60008061005483850185610197565b600080546040517fb93a89f700000000000000000000000000000000000000000000000000000000815293955091935091829173ffffffffffffffffffffffffffffffffffffffff169063b93a89f7906100b2908a9060040161032c565b604080518083038186803b1580156100c957600080fd5b505afa1580156100dd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061010191908101906101cf565b915091508361ffff168261ffff161461014f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610146906102cf565b60405180910390fd5b8260ff168160ff161461018e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161014690610272565b50505050505050565b600080604083850312156101a9578182fd5b82356101b481610335565b915060208301356101c481610348565b809150509250929050565b600080604083850312156101e1578182fd5b82516101ec81610335565b60208401519092506101c481610348565b600080600060408486031215610211578081fd5b83359250602084013567ffffffffffffffff8082111561022f578283fd5b81860187601f820112610240578384fd5b8035925081831115610250578384fd5b876020848301011115610261578384fd5b949760209095019650909450505050565b60208082526027908201527f476f6473556e636861696e656456616c696461746f722f5155414c4954595f4d60408201527f49534d4154434800000000000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f476f6473556e636861696e656456616c696461746f722f50524f544f5f4d495360408201527f4d41544348000000000000000000000000000000000000000000000000000000606082015260800190565b90815260200190565b61ffff8116811461034557600080fd5b50565b60ff8116811461034557600080fdfea365627a7a723158203028b97b542e7c9694b2dfadb335cd83bec3bff6276b5f2cdb1d7c1abed796e46c6578706572696d656e74616cf564736f6c63430005100040" + }, + "deployedBytecode": { + "object": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80639256050a14610030575b600080fd5b61004361003e3660046101fd565b610045565b005b60008061005483850185610197565b600080546040517fb93a89f700000000000000000000000000000000000000000000000000000000815293955091935091829173ffffffffffffffffffffffffffffffffffffffff169063b93a89f7906100b2908a9060040161032c565b604080518083038186803b1580156100c957600080fd5b505afa1580156100dd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061010191908101906101cf565b915091508361ffff168261ffff161461014f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610146906102cf565b60405180910390fd5b8260ff168160ff161461018e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161014690610272565b50505050505050565b600080604083850312156101a9578182fd5b82356101b481610335565b915060208301356101c481610348565b809150509250929050565b600080604083850312156101e1578182fd5b82516101ec81610335565b60208401519092506101c481610348565b600080600060408486031215610211578081fd5b83359250602084013567ffffffffffffffff8082111561022f578283fd5b81860187601f820112610240578384fd5b8035925081831115610250578384fd5b876020848301011115610261578384fd5b949760209095019650909450505050565b60208082526027908201527f476f6473556e636861696e656456616c696461746f722f5155414c4954595f4d60408201527f49534d4154434800000000000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f476f6473556e636861696e656456616c696461746f722f50524f544f5f4d495360408201527f4d41544348000000000000000000000000000000000000000000000000000000606082015260800190565b90815260200190565b61ffff8116811461034557600080fd5b50565b60ff8116811461034557600080fdfea365627a7a723158203028b97b542e7c9694b2dfadb335cd83bec3bff6276b5f2cdb1d7c1abed796e46c6578706572696d656e74616cf564736f6c63430005100040" + } + } + }, + "compiler": { + "name": "solc", + "version": "soljson-v0.5.16+commit.9c3226ce.js", + "settings": { + "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" + ] + } + }, + "evmVersion": "istanbul" + } + }, + "chains": {} +} diff --git a/packages/contract-artifacts/src/index.ts b/packages/contract-artifacts/src/index.ts index f4678b2976..0b3e89579e 100644 --- a/packages/contract-artifacts/src/index.ts +++ b/packages/contract-artifacts/src/index.ts @@ -1,4 +1,5 @@ import * as AssetProxyOwner from '../artifacts/AssetProxyOwner.json'; +import * as Broker from '../artifacts/Broker.json'; import * as Coordinator from '../artifacts/Coordinator.json'; import * as CoordinatorRegistry from '../artifacts/CoordinatorRegistry.json'; import * as DevUtils from '../artifacts/DevUtils.json'; @@ -12,6 +13,7 @@ import * as ERC721Proxy from '../artifacts/ERC721Proxy.json'; import * as ERC721Token from '../artifacts/ERC721Token.json'; import * as Exchange from '../artifacts/Exchange.json'; import * as Forwarder from '../artifacts/Forwarder.json'; +import * as GodsUnchainedValidator from '../artifacts/GodsUnchainedValidator.json'; import * as IAssetProxy from '../artifacts/IAssetProxy.json'; import * as IValidator from '../artifacts/IValidator.json'; import * as IWallet from '../artifacts/IWallet.json'; @@ -28,6 +30,7 @@ import * as IERC20BridgeSampler from '../artifacts/IERC20BridgeSampler.json'; export { AssetProxyOwner, + Broker, DevUtils, DummyERC20Token, DummyERC721Token, @@ -40,6 +43,7 @@ export { ERC721Token, Exchange, Forwarder, + GodsUnchainedValidator, IAssetProxy, IValidator, IWallet, diff --git a/packages/contract-artifacts/tsconfig.json b/packages/contract-artifacts/tsconfig.json index 681825c0cf..2612b7f470 100644 --- a/packages/contract-artifacts/tsconfig.json +++ b/packages/contract-artifacts/tsconfig.json @@ -8,6 +8,7 @@ "include": ["./src/**/*", "./test/**/*"], "files": [ "./artifacts/AssetProxyOwner.json", + "./artifacts/Broker.json", "./artifacts/DevUtils.json", "./artifacts/DutchAuction.json", "./artifacts/DummyERC20Token.json", @@ -19,6 +20,7 @@ "./artifacts/ERC721Token.json", "./artifacts/Exchange.json", "./artifacts/Forwarder.json", + "./artifacts/GodsUnchainedValidator.json", "./artifacts/LibTransactionDecoder.json", "./artifacts/IAssetProxy.json", "./artifacts/IValidator.json",