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

173 lines
111 KiB
JSON

{
"schemaVersion": "2.0.0",
"contractName": "ZeroEx",
"compilerOutput": {
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "bootstrapper",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"stateMutability": "payable",
"type": "fallback"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "selector",
"type": "bytes4"
}
],
"name": "getFunctionImplementation",
"outputs": [
{
"internalType": "address",
"name": "impl",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
],
"devdoc": {
"details": "An extensible proxy contract that serves as a universal entry point for interacting with the 0x protocol.",
"kind": "dev",
"methods": {
"constructor": {
"details": "Construct this contract and register the `BootstrapFeature` feature. After constructing this contract, `bootstrap()` should be called by `bootstrap()` to seed the initial feature set.",
"params": {
"bootstrapper": "Who can call `bootstrap()`."
}
},
"getFunctionImplementation(bytes4)": {
"details": "Get the implementation contract of a registered function.",
"params": {
"selector": "The function selector."
},
"returns": {
"impl": "The implementation contract address."
}
}
},
"version": 1
},
"evm": {
"bytecode": {
"linkReferences": {},
"object": "0x608060405234801561001057600080fd5b50604051610db8380380610db883398101604081905261002f916100fc565b60008160405161003e906100ef565b610048919061012a565b604051809103906000f080158015610064573d6000803e3d6000fd5b5090508061007a6100b760201b6102db1760201c565b6373f208d560e01b60009081526020919091526040902080546001600160a01b0319166001600160a01b03929092169190911790555061013e9050565b6000806100ce60006100d460201b6102ee1760201c565b92915050565b600060808260078111156100e457fe5b600101901b92915050565b6107c0806105f883390190565b60006020828403121561010d578081fd5b81516001600160a01b0381168114610123578182fd5b9392505050565b6001600160a01b0391909116815260200190565b6104ab8061014d6000396000f3fe6080604052600436106100225760003560e01c8063972fdd261461013857610029565b3661002957005b600061006f600080368080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929392505061016e9050565b9050600061007c826101ba565b905073ffffffffffffffffffffffffffffffffffffffff81166100aa576100aa6100a583610213565b6102cb565b600060608273ffffffffffffffffffffffffffffffffffffffff166000366040516100d69291906103f5565b600060405180830381855af49150503d8060008114610111576040519150601f19603f3d011682016040523d82523d6000602084013e610116565b606091505b50915091508161012957610129816102cb565b610132816102d3565b50505050005b34801561014457600080fd5b506101586101533660046103ae565b6101ba565b6040516101659190610405565b60405180910390f35b6000816004018351101561018f5761018f6100a56003855185600401610309565b5001602001517fffffffff000000000000000000000000000000000000000000000000000000001690565b60006101c46102db565b7fffffffff0000000000000000000000000000000000000000000000000000000092909216600090815260209290925250604090205473ffffffffffffffffffffffffffffffffffffffff1690565b60607f734e6e1c6ec3f883cac8d13d3e7390b280f5e94424662aa29e27394ed56586c9826040516024016102479190610426565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529050919050565b805160208201fd5b805160208201f35b6000806102e860006102ee565b92915050565b600060808260078111156102fe57fe5b600101901b92915050565b6060632800659560e01b84848460405160240161032893929190610453565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290509392505050565b6000602082840312156103bf578081fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103ee578182fd5b9392505050565b6000828483379101908152919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b606081016008851061046157fe5b93815260208101929092526040909101529056fea2646970667358221220d9230615ed32c0204f9b39093ddd7689211614d528d2aaa2de32d45bca5d4f4764736f6c634300060c003360e060405234801561001057600080fd5b506040516107c03803806107c083398101604081905261002f91610051565b33606090811b60805230811b60a0521b6001600160601b03191660c05261007f565b600060208284031215610062578081fd5b81516001600160a01b0381168114610078578182fd5b9392505050565b60805160601c60a05160601c60c05160601c6107006100c060003980610121528061014f5250806070528061021652508060af528060dd52506107006000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806335f469941461003b57806373f208d514610045575b600080fd5b610043610058565b005b61004361005336600461050e565b610109565b3073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461009757fe5b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461010657610106610101337f00000000000000000000000000000000000000000000000000000000000000006102ba565b610375565b33ff5b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461017357610173610101337f000000000000000000000000000000000000000000000000000000000000000061037d565b600061017d6103b3565b7f73f208d5000000000000000000000000000000000000000000000000000000006000908152602091909152604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff94851617905580517f35f4699400000000000000000000000000000000000000000000000000000000815290517f0000000000000000000000000000000000000000000000000000000000000000909316926335f469949260048084019391929182900301818387803b15801561025d57600080fd5b505af1158015610271573d6000803e3d6000fd5b505050506102b58383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506103c692505050565b505050565b60607fabeb420c997af2b939cfae9ef422a08b8467cc0cf89064c140b7edf8a22cedc283836040516024016102f0929190610609565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905092915050565b805160208201fd5b60607fb84f6d63d81ee2a3bc5c6658be21fc96c31d7cdc4dc460ea0d6f7b7218b5b4b383836040516024016102f0929190610609565b6000806103c060006104bd565b92915050565b600060608373ffffffffffffffffffffffffffffffffffffffff16836040516103ef91906105ed565b600060405180830381855af49150503d806000811461042a576040519150601f19603f3d011682016040523d82523d6000602084013e61042f565b606091505b509150915081158061044357508051602014155b806104a5575080517fd150751b000000000000000000000000000000000000000000000000000000009061048090830160209081019084016105a6565b7fffffffff000000000000000000000000000000000000000000000000000000001614155b156104b7576104b761010185836104d8565b50505050565b600060808260078111156104cd57fe5b600101901b92915050565b60607fd19d65df6830e3cb0da1e12b8e9738e2dc473f830d8af813bcc031eb5a1675d183836040516024016102f0929190610630565b600080600060408486031215610522578283fd5b833573ffffffffffffffffffffffffffffffffffffffff81168114610545578384fd5b9250602084013567ffffffffffffffff80821115610561578384fd5b818601915086601f830112610574578384fd5b813581811115610582578485fd5b876020828501011115610593578485fd5b6020830194508093505050509250925092565b6000602082840312156105b7578081fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146105e6578182fd5b9392505050565b600082516105ff81846020870161069e565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b600073ffffffffffffffffffffffffffffffffffffffff8416825260406020830152825180604084015261066b81606085016020870161069e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016060019392505050565b60005b838110156106b95781810151838201526020016106a1565b838111156104b7575050600091015256fea26469706673582212206c74f26beb7156a0de47c5aca861889920cad64f8784976e169a544ce6b91e8764736f6c634300060c0033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0xDB8 CODESIZE SUB DUP1 PUSH2 0xDB8 DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH2 0x2F SWAP2 PUSH2 0xFC JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x40 MLOAD PUSH2 0x3E SWAP1 PUSH2 0xEF JUMP JUMPDEST PUSH2 0x48 SWAP2 SWAP1 PUSH2 0x12A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 PUSH1 0x0 CREATE DUP1 ISZERO DUP1 ISZERO PUSH2 0x64 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP SWAP1 POP DUP1 PUSH2 0x7A PUSH2 0xB7 PUSH1 0x20 SHL PUSH2 0x2DB OR PUSH1 0x20 SHR JUMP JUMPDEST PUSH4 0x73F208D5 PUSH1 0xE0 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE POP PUSH2 0x13E SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0xCE PUSH1 0x0 PUSH2 0xD4 PUSH1 0x20 SHL PUSH2 0x2EE OR PUSH1 0x20 SHR JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 PUSH1 0x7 DUP2 GT ISZERO PUSH2 0xE4 JUMPI INVALID JUMPDEST PUSH1 0x1 ADD SWAP1 SHL SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x7C0 DUP1 PUSH2 0x5F8 DUP4 CODECOPY ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x10D JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x123 JUMPI DUP2 DUP3 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH2 0x4AB DUP1 PUSH2 0x14D PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x22 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x972FDD26 EQ PUSH2 0x138 JUMPI PUSH2 0x29 JUMP JUMPDEST CALLDATASIZE PUSH2 0x29 JUMPI STOP JUMPDEST PUSH1 0x0 PUSH2 0x6F PUSH1 0x0 DUP1 CALLDATASIZE DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP4 SWAP3 POP POP PUSH2 0x16E SWAP1 POP JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x7C DUP3 PUSH2 0x1BA JUMP JUMPDEST SWAP1 POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH2 0xAA JUMPI PUSH2 0xAA PUSH2 0xA5 DUP4 PUSH2 0x213 JUMP JUMPDEST PUSH2 0x2CB JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x0 CALLDATASIZE PUSH1 0x40 MLOAD PUSH2 0xD6 SWAP3 SWAP2 SWAP1 PUSH2 0x3F5 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 GAS DELEGATECALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x111 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 0x116 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP2 POP SWAP2 POP DUP2 PUSH2 0x129 JUMPI PUSH2 0x129 DUP2 PUSH2 0x2CB JUMP JUMPDEST PUSH2 0x132 DUP2 PUSH2 0x2D3 JUMP JUMPDEST POP POP POP POP STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x144 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x158 PUSH2 0x153 CALLDATASIZE PUSH1 0x4 PUSH2 0x3AE JUMP JUMPDEST PUSH2 0x1BA JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x165 SWAP2 SWAP1 PUSH2 0x405 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x4 ADD DUP4 MLOAD LT ISZERO PUSH2 0x18F JUMPI PUSH2 0x18F PUSH2 0xA5 PUSH1 0x3 DUP6 MLOAD DUP6 PUSH1 0x4 ADD PUSH2 0x309 JUMP JUMPDEST POP ADD PUSH1 0x20 ADD MLOAD PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 AND SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1C4 PUSH2 0x2DB JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP3 SWAP1 SWAP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP3 SWAP1 SWAP3 MSTORE POP PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH32 0x734E6E1C6EC3F883CAC8D13D3E7390B280F5E94424662AA29E27394ED56586C9 DUP3 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x247 SWAP2 SWAP1 PUSH2 0x426 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 SWAP2 SWAP1 POP JUMP JUMPDEST DUP1 MLOAD PUSH1 0x20 DUP3 ADD REVERT JUMPDEST DUP1 MLOAD PUSH1 0x20 DUP3 ADD RETURN JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2E8 PUSH1 0x0 PUSH2 0x2EE JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 PUSH1 0x7 DUP2 GT ISZERO PUSH2 0x2FE JUMPI INVALID JUMPDEST PUSH1 0x1 ADD SWAP1 SHL SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x60 PUSH4 0x28006595 PUSH1 0xE0 SHL DUP5 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x328 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x453 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 MSTORE SWAP1 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x3BF JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 DUP2 AND DUP2 EQ PUSH2 0x3EE JUMPI DUP2 DUP3 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP5 DUP4 CALLDATACOPY SWAP2 ADD SWAP1 DUP2 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP2 ADD PUSH1 0x8 DUP6 LT PUSH2 0x461 JUMPI INVALID JUMPDEST SWAP4 DUP2 MSTORE PUSH1 0x20 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 SWAP1 SWAP2 ADD MSTORE SWAP1 JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xD9 0x23 MOD ISZERO 0xED ORIGIN 0xC0 KECCAK256 0x4F SWAP12 CODECOPY MULMOD RETURNDATASIZE 0xDD PUSH23 0x89211614D528D2AAA2DE32D45BCA5D4F4764736F6C6343 STOP MOD 0xC STOP CALLER PUSH1 0xE0 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x7C0 CODESIZE SUB DUP1 PUSH2 0x7C0 DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH2 0x2F SWAP2 PUSH2 0x51 JUMP JUMPDEST CALLER PUSH1 0x60 SWAP1 DUP2 SHL PUSH1 0x80 MSTORE ADDRESS DUP2 SHL PUSH1 0xA0 MSTORE SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH1 0xC0 MSTORE PUSH2 0x7F JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x62 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x78 JUMPI DUP2 DUP3 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x80 MLOAD PUSH1 0x60 SHR PUSH1 0xA0 MLOAD PUSH1 0x60 SHR PUSH1 0xC0 MLOAD PUSH1 0x60 SHR PUSH2 0x700 PUSH2 0xC0 PUSH1 0x0 CODECOPY DUP1 PUSH2 0x121 MSTORE DUP1 PUSH2 0x14F MSTORE POP DUP1 PUSH1 0x70 MSTORE DUP1 PUSH2 0x216 MSTORE POP DUP1 PUSH1 0xAF MSTORE DUP1 PUSH1 0xDD MSTORE POP PUSH2 0x700 PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x36 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x35F46994 EQ PUSH2 0x3B JUMPI DUP1 PUSH4 0x73F208D5 EQ PUSH2 0x45 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x43 PUSH2 0x58 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x43 PUSH2 0x53 CALLDATASIZE PUSH1 0x4 PUSH2 0x50E JUMP JUMPDEST PUSH2 0x109 JUMP JUMPDEST ADDRESS PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH32 0x0 AND EQ PUSH2 0x97 JUMPI INVALID JUMPDEST CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH32 0x0 AND EQ PUSH2 0x106 JUMPI PUSH2 0x106 PUSH2 0x101 CALLER PUSH32 0x0 PUSH2 0x2BA JUMP JUMPDEST PUSH2 0x375 JUMP JUMPDEST CALLER SELFDESTRUCT JUMPDEST CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH32 0x0 AND EQ PUSH2 0x173 JUMPI PUSH2 0x173 PUSH2 0x101 CALLER PUSH32 0x0 PUSH2 0x37D JUMP JUMPDEST PUSH1 0x0 PUSH2 0x17D PUSH2 0x3B3 JUMP JUMPDEST PUSH32 0x73F208D500000000000000000000000000000000000000000000000000000000 PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP5 DUP6 AND OR SWAP1 SSTORE DUP1 MLOAD PUSH32 0x35F4699400000000000000000000000000000000000000000000000000000000 DUP2 MSTORE SWAP1 MLOAD PUSH32 0x0 SWAP1 SWAP4 AND SWAP3 PUSH4 0x35F46994 SWAP3 PUSH1 0x4 DUP1 DUP5 ADD SWAP4 SWAP2 SWAP3 SWAP2 DUP3 SWAP1 SUB ADD DUP2 DUP4 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x25D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x271 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH2 0x2B5 DUP4 DUP4 DUP4 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP PUSH2 0x3C6 SWAP3 POP POP POP JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH32 0xABEB420C997AF2B939CFAE9EF422A08B8467CC0CF89064C140B7EDF8A22CEDC2 DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x2F0 SWAP3 SWAP2 SWAP1 PUSH2 0x609 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 MSTORE SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 MLOAD PUSH1 0x20 DUP3 ADD REVERT JUMPDEST PUSH1 0x60 PUSH32 0xB84F6D63D81EE2A3BC5C6658BE21FC96C31D7CDC4DC460EA0D6F7B7218B5B4B3 DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x2F0 SWAP3 SWAP2 SWAP1 PUSH2 0x609 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x3C0 PUSH1 0x0 PUSH2 0x4BD JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 PUSH1 0x40 MLOAD PUSH2 0x3EF SWAP2 SWAP1 PUSH2 0x5ED JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 GAS DELEGATECALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x42A 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 0x42F JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP2 POP SWAP2 POP DUP2 ISZERO DUP1 PUSH2 0x443 JUMPI POP DUP1 MLOAD PUSH1 0x20 EQ ISZERO JUMPDEST DUP1 PUSH2 0x4A5 JUMPI POP DUP1 MLOAD PUSH32 0xD150751B00000000000000000000000000000000000000000000000000000000 SWAP1 PUSH2 0x480 SWAP1 DUP4 ADD PUSH1 0x20 SWAP1 DUP2 ADD SWAP1 DUP5 ADD PUSH2 0x5A6 JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 AND EQ ISZERO JUMPDEST ISZERO PUSH2 0x4B7 JUMPI PUSH2 0x4B7 PUSH2 0x101 DUP6 DUP4 PUSH2 0x4D8 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 PUSH1 0x7 DUP2 GT ISZERO PUSH2 0x4CD JUMPI INVALID JUMPDEST PUSH1 0x1 ADD SWAP1 SHL SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x60 PUSH32 0xD19D65DF6830E3CB0DA1E12B8E9738E2DC473F830D8AF813BCC031EB5A1675D1 DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x2F0 SWAP3 SWAP2 SWAP1 PUSH2 0x630 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x40 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x522 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x545 JUMPI DUP4 DUP5 REVERT JUMPDEST SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x561 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP7 ADD SWAP2 POP DUP7 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x574 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 CALLDATALOAD DUP2 DUP2 GT ISZERO PUSH2 0x582 JUMPI DUP5 DUP6 REVERT JUMPDEST DUP8 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x593 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH1 0x20 DUP4 ADD SWAP5 POP DUP1 SWAP4 POP POP POP POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x5B7 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 DUP2 AND DUP2 EQ PUSH2 0x5E6 JUMPI DUP2 DUP3 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 MLOAD PUSH2 0x5FF DUP2 DUP5 PUSH1 0x20 DUP8 ADD PUSH2 0x69E JUMP JUMPDEST SWAP2 SWAP1 SWAP2 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP3 DUP4 AND DUP2 MSTORE SWAP2 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP5 AND DUP3 MSTORE PUSH1 0x40 PUSH1 0x20 DUP4 ADD MSTORE DUP3 MLOAD DUP1 PUSH1 0x40 DUP5 ADD MSTORE PUSH2 0x66B DUP2 PUSH1 0x60 DUP6 ADD PUSH1 0x20 DUP8 ADD PUSH2 0x69E JUMP JUMPDEST PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND SWAP2 SWAP1 SWAP2 ADD PUSH1 0x60 ADD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x6B9 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x6A1 JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x4B7 JUMPI POP POP PUSH1 0x0 SWAP2 ADD MSTORE JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH13 0x74F26BEB7156A0DE47C5ACA861 DUP9 SWAP10 KECCAK256 0xCA 0xD6 0x4F DUP8 DUP5 SWAP8 PUSH15 0x169A544CE6B91E8764736F6C634300 MOD 0xC STOP CALLER ",
"sourceMap": "1032:2256:0:-:0;;;1449:368;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1640:26;1690:12;1669:34;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;1640:63;;1800:9;1713:28;:26;;;;;:28;;:::i;:::-;-1:-1:-1;;;1713:34:0;:64;;;;;;;;;;;:97;;-1:-1:-1;;;;;;1713:97:0;-1:-1:-1;;;;;1713:97:0;;;;;;;;;;-1:-1:-1;1032:2256:0;;-1:-1:-1;1032:2256:0;1094:466:5;1139:20;1171:19;1193:75;1232:26;1193:25;;;;;:75;;:::i;:::-;1171:97;1526:28;-1:-1:-1;;1526:28:5:o;1606:335:6:-;1698:12;922:3;1899:9;1891:18;;;;;;;;1912:1;1891:22;1890:44;;;1606:335;-1:-1:-1;;1606:335:6:o;1032:2256:0:-;;;;;;;;:::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;;;;;925:54;;1050:35;;1040:2;;-1:-1;;1089:12;1040:2;319:74;223:186;-1:-1;;;223:186::o;536:222::-;-1:-1;;;;;925:54;;;;487:37;;663:2;648:18;;634:124::o;:::-;1032:2256:0;;;;;;"
},
"deployedBytecode": {
"immutableReferences": {},
"linkReferences": {},
"object": "0x6080604052600436106100225760003560e01c8063972fdd261461013857610029565b3661002957005b600061006f600080368080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929392505061016e9050565b9050600061007c826101ba565b905073ffffffffffffffffffffffffffffffffffffffff81166100aa576100aa6100a583610213565b6102cb565b600060608273ffffffffffffffffffffffffffffffffffffffff166000366040516100d69291906103f5565b600060405180830381855af49150503d8060008114610111576040519150601f19603f3d011682016040523d82523d6000602084013e610116565b606091505b50915091508161012957610129816102cb565b610132816102d3565b50505050005b34801561014457600080fd5b506101586101533660046103ae565b6101ba565b6040516101659190610405565b60405180910390f35b6000816004018351101561018f5761018f6100a56003855185600401610309565b5001602001517fffffffff000000000000000000000000000000000000000000000000000000001690565b60006101c46102db565b7fffffffff0000000000000000000000000000000000000000000000000000000092909216600090815260209290925250604090205473ffffffffffffffffffffffffffffffffffffffff1690565b60607f734e6e1c6ec3f883cac8d13d3e7390b280f5e94424662aa29e27394ed56586c9826040516024016102479190610426565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529050919050565b805160208201fd5b805160208201f35b6000806102e860006102ee565b92915050565b600060808260078111156102fe57fe5b600101901b92915050565b6060632800659560e01b84848460405160240161032893929190610453565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290509392505050565b6000602082840312156103bf578081fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103ee578182fd5b9392505050565b6000828483379101908152919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b606081016008851061046157fe5b93815260208101929092526040909101529056fea2646970667358221220d9230615ed32c0204f9b39093ddd7689211614d528d2aaa2de32d45bca5d4f4764736f6c634300060c0033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x22 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x972FDD26 EQ PUSH2 0x138 JUMPI PUSH2 0x29 JUMP JUMPDEST CALLDATASIZE PUSH2 0x29 JUMPI STOP JUMPDEST PUSH1 0x0 PUSH2 0x6F PUSH1 0x0 DUP1 CALLDATASIZE DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP4 SWAP3 POP POP PUSH2 0x16E SWAP1 POP JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x7C DUP3 PUSH2 0x1BA JUMP JUMPDEST SWAP1 POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH2 0xAA JUMPI PUSH2 0xAA PUSH2 0xA5 DUP4 PUSH2 0x213 JUMP JUMPDEST PUSH2 0x2CB JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x0 CALLDATASIZE PUSH1 0x40 MLOAD PUSH2 0xD6 SWAP3 SWAP2 SWAP1 PUSH2 0x3F5 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 GAS DELEGATECALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x111 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 0x116 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP2 POP SWAP2 POP DUP2 PUSH2 0x129 JUMPI PUSH2 0x129 DUP2 PUSH2 0x2CB JUMP JUMPDEST PUSH2 0x132 DUP2 PUSH2 0x2D3 JUMP JUMPDEST POP POP POP POP STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x144 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x158 PUSH2 0x153 CALLDATASIZE PUSH1 0x4 PUSH2 0x3AE JUMP JUMPDEST PUSH2 0x1BA JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x165 SWAP2 SWAP1 PUSH2 0x405 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x4 ADD DUP4 MLOAD LT ISZERO PUSH2 0x18F JUMPI PUSH2 0x18F PUSH2 0xA5 PUSH1 0x3 DUP6 MLOAD DUP6 PUSH1 0x4 ADD PUSH2 0x309 JUMP JUMPDEST POP ADD PUSH1 0x20 ADD MLOAD PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 AND SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1C4 PUSH2 0x2DB JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP3 SWAP1 SWAP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP3 SWAP1 SWAP3 MSTORE POP PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH32 0x734E6E1C6EC3F883CAC8D13D3E7390B280F5E94424662AA29E27394ED56586C9 DUP3 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x247 SWAP2 SWAP1 PUSH2 0x426 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 SWAP2 SWAP1 POP JUMP JUMPDEST DUP1 MLOAD PUSH1 0x20 DUP3 ADD REVERT JUMPDEST DUP1 MLOAD PUSH1 0x20 DUP3 ADD RETURN JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2E8 PUSH1 0x0 PUSH2 0x2EE JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 PUSH1 0x7 DUP2 GT ISZERO PUSH2 0x2FE JUMPI INVALID JUMPDEST PUSH1 0x1 ADD SWAP1 SHL SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x60 PUSH4 0x28006595 PUSH1 0xE0 SHL DUP5 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x328 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x453 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 MSTORE SWAP1 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x3BF JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 DUP2 AND DUP2 EQ PUSH2 0x3EE JUMPI DUP2 DUP3 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP5 DUP4 CALLDATACOPY SWAP2 ADD SWAP1 DUP2 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP2 ADD PUSH1 0x8 DUP6 LT PUSH2 0x461 JUMPI INVALID JUMPDEST SWAP4 DUP2 MSTORE PUSH1 0x20 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 SWAP1 SWAP2 ADD MSTORE SWAP1 JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xD9 0x23 MOD ISZERO 0xED ORIGIN 0xC0 KECCAK256 0x4F SWAP12 CODECOPY MULMOD RETURNDATASIZE 0xDD PUSH23 0x89211614D528D2AAA2DE32D45BCA5D4F4764736F6C6343 STOP MOD 0xC STOP CALLER ",
"sourceMap": "1032:2256:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;1974:15;1992:22;2012:1;1992:8;;:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1992:19:0;;:22;-1:-1:-1;;1992:19:0;:22;-1:-1:-1;1992:22:0:i;:::-;1974:40;;2024:12;2039:35;2065:8;2039:25;:35::i;:::-;2024:50;-1:-1:-1;2088:18:0;;;2084:114;;2122:65;2138:48;2177:8;2138:38;:48::i;:::-;2122:15;:65::i;:::-;2209:12;2223:23;2250:4;:17;;2268:8;;2250:27;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2208:69;;;;2292:7;2287:66;;2315:27;2331:10;2315:15;:27::i;:::-;2362;2378:10;2362:15;:27::i;:::-;1936:460;;;;1032:2256;2701:183;;;;;;;;;;-1:-1:-1;2701:183:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;17014:880:7;17134:13;17178:5;17186:1;17178:9;17167:1;:8;:20;17163:299;;;17203:248;17228:222;17293:90;17401:1;:8;17427:5;17435:1;17427:9;17228:47;:222::i;17203:248::-;-1:-1:-1;17635:13:7;17538:2;17635:13;17629:20;17788:66;17776:79;;17014:880::o;2701:183:0:-;2798:12;2833:28;:26;:28::i;:::-;:44;;;;;:34;:44;;;;;;;;-1:-1:-1;2833:44:0;;;;;;;2701:183::o;723:251:1:-;816:12;894:40;949:8;851:116;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;723:251:1;;;:::o;2965:120:0:-;3071:4;3065:11;3060:2;3054:4;3050:13;3043:34;3166:120;3272:4;3266:11;3261:2;3255:4;3251:13;3244:34;1094:466:5;1139:20;1171:19;1193:75;1232:26;1193:25;:75::i;:::-;1171:97;1526:28;-1:-1:-1;;1526:28:5:o;1606:335:6:-;1698:12;922:3;1899:9;1891:18;;;;;;;;1912:1;1891:22;1890:44;;;1606:335;-1:-1:-1;;1606:335:6:o;1334:378:8:-;1522:12;1274:10;1593:37;;1644:9;1667:6;1687:8;1557:148;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1334:378:8;;;;;:::o;140:239:-1:-;;243:2;231:9;222:7;218:23;214:32;211:2;;;-1:-1;;249:12;211:2;84:6;71:20;2875:66;3899:5;2864:78;3875:5;3872:34;3862:2;;-1:-1;;3910:12;3862:2;301:62;205:174;-1:-1;;;205:174::o;1283:291::-;;3609:6;3604:3;3599;3586:30;3647:16;;3640:27;;;3647:16;1427:147;-1:-1;1427:147::o;1581:222::-;3210:42;3199:54;;;;457:37;;1708:2;1693:18;;1679:124::o;1810:218::-;2875:66;2864:78;;;;575:36;;1935:2;1920:18;;1906:122::o;2035:510::-;2251:2;2236:18;;3785:1;3775:12;;3765:2;;3791:9;3765:2;1068:83;;;2448:2;2433:18;;1234:37;;;;2531:2;2516:18;;;1234:37;2222:323;:::o"
},
"methodIdentifiers": {
"getFunctionImplementation(bytes4)": "972fdd26"
}
}
},
"sourceTreeHashHex": "0x6426afba5ad6b96100538ef89e19476cbec05534153332ab6b6eb8b201e9ec31",
"sources": {
"./ZeroEx.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;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/LibBytesV06.sol\";\nimport \"./migrations/LibBootstrap.sol\";\nimport \"./features/BootstrapFeature.sol\";\nimport \"./storage/LibProxyStorage.sol\";\nimport \"./errors/LibProxyRichErrors.sol\";\n\n\n/// @dev An extensible proxy contract that serves as a universal entry point for\n/// interacting with the 0x protocol.\ncontract ZeroEx {\n // solhint-disable separate-by-one-line-in-contract,indent,var-name-mixedcase\n using LibBytesV06 for bytes;\n\n /// @dev Construct this contract and register the `BootstrapFeature` feature.\n /// After constructing this contract, `bootstrap()` should be called\n /// by `bootstrap()` to seed the initial feature set.\n /// @param bootstrapper Who can call `bootstrap()`.\n constructor(address bootstrapper) public {\n // Temporarily create and register the bootstrap feature.\n // It will deregister itself after `bootstrap()` has been called.\n BootstrapFeature bootstrap = new BootstrapFeature(bootstrapper);\n LibProxyStorage.getStorage().impls[bootstrap.bootstrap.selector] =\n address(bootstrap);\n }\n\n // solhint-disable state-visibility\n\n /// @dev Forwards calls to the appropriate implementation contract.\n fallback() external payable {\n bytes4 selector = msg.data.readBytes4(0);\n address impl = getFunctionImplementation(selector);\n if (impl == address(0)) {\n _revertWithData(LibProxyRichErrors.NotImplementedError(selector));\n }\n\n (bool success, bytes memory resultData) = impl.delegatecall(msg.data);\n if (!success) {\n _revertWithData(resultData);\n }\n _returnWithData(resultData);\n }\n\n /// @dev Fallback for just receiving ether.\n receive() external payable {}\n\n // solhint-enable state-visibility\n\n /// @dev Get the implementation contract of a registered function.\n /// @param selector The function selector.\n /// @return impl The implementation contract address.\n function getFunctionImplementation(bytes4 selector)\n public\n view\n returns (address impl)\n {\n return LibProxyStorage.getStorage().impls[selector];\n }\n\n /// @dev Revert with arbitrary bytes.\n /// @param data Revert data.\n function _revertWithData(bytes memory data) private pure {\n assembly { revert(add(data, 32), mload(data)) }\n }\n\n /// @dev Return with arbitrary bytes.\n /// @param data Return data.\n function _returnWithData(bytes memory data) private pure {\n assembly { return(add(data, 32), mload(data)) }\n }\n}\n"
},
"@0x/contracts-utils/contracts/src/v06/LibBytesV06.sol": {
"id": 7,
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\nimport \"./errors/LibBytesRichErrorsV06.sol\";\nimport \"./errors/LibRichErrorsV06.sol\";\n\n\nlibrary LibBytesV06 {\n\n using LibBytesV06 for bytes;\n\n /// @dev Gets the memory address for a byte array.\n /// @param input Byte array to lookup.\n /// @return memoryAddress Memory address of byte array. This\n /// points to the header of the byte array which contains\n /// the length.\n function rawAddress(bytes memory input)\n internal\n pure\n returns (uint256 memoryAddress)\n {\n assembly {\n memoryAddress := input\n }\n return memoryAddress;\n }\n\n /// @dev Gets the memory address for the contents of a byte array.\n /// @param input Byte array to lookup.\n /// @return memoryAddress Memory address of the contents of the byte array.\n function contentAddress(bytes memory input)\n internal\n pure\n returns (uint256 memoryAddress)\n {\n assembly {\n memoryAddress := add(input, 32)\n }\n return memoryAddress;\n }\n\n /// @dev Copies `length` bytes from memory location `source` to `dest`.\n /// @param dest memory address to copy bytes to.\n /// @param source memory address to copy bytes from.\n /// @param length number of bytes to copy.\n function memCopy(\n uint256 dest,\n uint256 source,\n uint256 length\n )\n internal\n pure\n {\n if (length < 32) {\n // Handle a partial word by reading destination and masking\n // off the bits we are interested in.\n // This correctly handles overlap, zero lengths and source == dest\n assembly {\n let mask := sub(exp(256, sub(32, length)), 1)\n let s := and(mload(source), not(mask))\n let d := and(mload(dest), mask)\n mstore(dest, or(s, d))\n }\n } else {\n // Skip the O(length) loop when source == dest.\n if (source == dest) {\n return;\n }\n\n // For large copies we copy whole words at a time. The final\n // word is aligned to the end of the range (instead of after the\n // previous) to handle partial words. So a copy will look like this:\n //\n // ####\n // ####\n // ####\n // ####\n //\n // We handle overlap in the source and destination range by\n // changing the copying direction. This prevents us from\n // overwriting parts of source that we still need to copy.\n //\n // This correctly handles source == dest\n //\n if (source > dest) {\n assembly {\n // We subtract 32 from `sEnd` and `dEnd` because it\n // is easier to compare with in the loop, and these\n // are also the addresses we need for copying the\n // last bytes.\n length := sub(length, 32)\n let sEnd := add(source, length)\n let dEnd := add(dest, length)\n\n // Remember the last 32 bytes of source\n // This needs to be done here and not after the loop\n // because we may have overwritten the last bytes in\n // source already due to overlap.\n let last := mload(sEnd)\n\n // Copy whole words front to back\n // Note: the first check is always true,\n // this could have been a do-while loop.\n // solhint-disable-next-line no-empty-blocks\n for {} lt(source, sEnd) {} {\n mstore(dest, mload(source))\n source := add(source, 32)\n dest := add(dest, 32)\n }\n\n // Write the last 32 bytes\n mstore(dEnd, last)\n }\n } else {\n assembly {\n // We subtract 32 from `sEnd` and `dEnd` because those\n // are the starting points when copying a word at the end.\n length := sub(length, 32)\n let sEnd := add(source, length)\n let dEnd := add(dest, length)\n\n // Remember the first 32 bytes of source\n // This needs to be done here and not after the loop\n // because we may have overwritten the first bytes in\n // source already due to overlap.\n let first := mload(source)\n\n // Copy whole words back to front\n // We use a signed comparisson here to allow dEnd to become\n // negative (happens when source and dest < 32). Valid\n // addresses in local memory will never be larger than\n // 2**255, so they can be safely re-interpreted as signed.\n // Note: the first check is always true,\n // this could have been a do-while loop.\n // solhint-disable-next-line no-empty-blocks\n for {} slt(dest, dEnd) {} {\n mstore(dEnd, mload(sEnd))\n sEnd := sub(sEnd, 32)\n dEnd := sub(dEnd, 32)\n }\n\n // Write the first 32 bytes\n mstore(dest, first)\n }\n }\n }\n }\n\n /// @dev Returns a slices from a byte array.\n /// @param b The byte array to take a slice from.\n /// @param from The starting index for the slice (inclusive).\n /// @param to The final index for the slice (exclusive).\n /// @return result The slice containing bytes at indices [from, to)\n function slice(\n bytes memory b,\n uint256 from,\n uint256 to\n )\n internal\n pure\n returns (bytes memory result)\n {\n // Ensure that the from and to positions are valid positions for a slice within\n // the byte array that is being used.\n if (from > to) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.FromLessThanOrEqualsToRequired,\n from,\n to\n ));\n }\n if (to > b.length) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.ToLessThanOrEqualsLengthRequired,\n to,\n b.length\n ));\n }\n\n // Create a new bytes structure and copy contents\n result = new bytes(to - from);\n memCopy(\n result.contentAddress(),\n b.contentAddress() + from,\n result.length\n );\n return result;\n }\n\n /// @dev Returns a slice from a byte array without preserving the input.\n /// When `from == 0`, the original array will match the slice.\n /// In other cases its state will be corrupted.\n /// @param b The byte array to take a slice from. Will be destroyed in the process.\n /// @param from The starting index for the slice (inclusive).\n /// @param to The final index for the slice (exclusive).\n /// @return result The slice containing bytes at indices [from, to)\n function sliceDestructive(\n bytes memory b,\n uint256 from,\n uint256 to\n )\n internal\n pure\n returns (bytes memory result)\n {\n // Ensure that the from and to positions are valid positions for a slice within\n // the byte array that is being used.\n if (from > to) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.FromLessThanOrEqualsToRequired,\n from,\n to\n ));\n }\n if (to > b.length) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.ToLessThanOrEqualsLengthRequired,\n to,\n b.length\n ));\n }\n\n // Create a new bytes structure around [from, to) in-place.\n assembly {\n result := add(b, from)\n mstore(result, sub(to, from))\n }\n return result;\n }\n\n /// @dev Pops the last byte off of a byte array by modifying its length.\n /// @param b Byte array that will be modified.\n /// @return result The byte that was popped off.\n function popLastByte(bytes memory b)\n internal\n pure\n returns (bytes1 result)\n {\n if (b.length == 0) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanZeroRequired,\n b.length,\n 0\n ));\n }\n\n // Store last byte.\n result = b[b.length - 1];\n\n assembly {\n // Decrement length of byte array.\n let newLen := sub(mload(b), 1)\n mstore(b, newLen)\n }\n return result;\n }\n\n /// @dev Tests equality of two byte arrays.\n /// @param lhs First byte array to compare.\n /// @param rhs Second byte array to compare.\n /// @return equal True if arrays are the same. False otherwise.\n function equals(\n bytes memory lhs,\n bytes memory rhs\n )\n internal\n pure\n returns (bool equal)\n {\n // Keccak gas cost is 30 + numWords * 6. This is a cheap way to compare.\n // We early exit on unequal lengths, but keccak would also correctly\n // handle this.\n return lhs.length == rhs.length && keccak256(lhs) == keccak256(rhs);\n }\n\n /// @dev Reads an address from a position in a byte array.\n /// @param b Byte array containing an address.\n /// @param index Index in byte array of address.\n /// @return result address from byte array.\n function readAddress(\n bytes memory b,\n uint256 index\n )\n internal\n pure\n returns (address result)\n {\n if (b.length < index + 20) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsTwentyRequired,\n b.length,\n index + 20 // 20 is length of address\n ));\n }\n\n // Add offset to index:\n // 1. Arrays are prefixed by 32-byte length parameter (add 32 to index)\n // 2. Account for size difference between address length and 32-byte storage word (subtract 12 from index)\n index += 20;\n\n // Read address from array memory\n assembly {\n // 1. Add index to address of bytes array\n // 2. Load 32-byte word from memory\n // 3. Apply 20-byte mask to obtain address\n result := and(mload(add(b, index)), 0xffffffffffffffffffffffffffffffffffffffff)\n }\n return result;\n }\n\n /// @dev Writes an address into a specific position in a byte array.\n /// @param b Byte array to insert address into.\n /// @param index Index in byte array of address.\n /// @param input Address to put into byte array.\n function writeAddress(\n bytes memory b,\n uint256 index,\n address input\n )\n internal\n pure\n {\n if (b.length < index + 20) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsTwentyRequired,\n b.length,\n index + 20 // 20 is length of address\n ));\n }\n\n // Add offset to index:\n // 1. Arrays are prefixed by 32-byte length parameter (add 32 to index)\n // 2. Account for size difference between address length and 32-byte storage word (subtract 12 from index)\n index += 20;\n\n // Store address into array memory\n assembly {\n // The address occupies 20 bytes and mstore stores 32 bytes.\n // First fetch the 32-byte word where we'll be storing the address, then\n // apply a mask so we have only the bytes in the word that the address will not occupy.\n // Then combine these bytes with the address and store the 32 bytes back to memory with mstore.\n\n // 1. Add index to address of bytes array\n // 2. Load 32-byte word from memory\n // 3. Apply 12-byte mask to obtain extra bytes occupying word of memory where we'll store the address\n let neighbors := and(\n mload(add(b, index)),\n 0xffffffffffffffffffffffff0000000000000000000000000000000000000000\n )\n\n // Make sure input address is clean.\n // (Solidity does not guarantee this)\n input := and(input, 0xffffffffffffffffffffffffffffffffffffffff)\n\n // Store the neighbors and address into memory\n mstore(add(b, index), xor(input, neighbors))\n }\n }\n\n /// @dev Reads a bytes32 value from a position in a byte array.\n /// @param b Byte array containing a bytes32 value.\n /// @param index Index in byte array of bytes32 value.\n /// @return result bytes32 value from byte array.\n function readBytes32(\n bytes memory b,\n uint256 index\n )\n internal\n pure\n returns (bytes32 result)\n {\n if (b.length < index + 32) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsThirtyTwoRequired,\n b.length,\n index + 32\n ));\n }\n\n // Arrays are prefixed by a 256 bit length parameter\n index += 32;\n\n // Read the bytes32 from array memory\n assembly {\n result := mload(add(b, index))\n }\n return result;\n }\n\n /// @dev Writes a bytes32 into a specific position in a byte array.\n /// @param b Byte array to insert <input> into.\n /// @param index Index in byte array of <input>.\n /// @param input bytes32 to put into byte array.\n function writeBytes32(\n bytes memory b,\n uint256 index,\n bytes32 input\n )\n internal\n pure\n {\n if (b.length < index + 32) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsThirtyTwoRequired,\n b.length,\n index + 32\n ));\n }\n\n // Arrays are prefixed by a 256 bit length parameter\n index += 32;\n\n // Read the bytes32 from array memory\n assembly {\n mstore(add(b, index), input)\n }\n }\n\n /// @dev Reads a uint256 value from a position in a byte array.\n /// @param b Byte array containing a uint256 value.\n /// @param index Index in byte array of uint256 value.\n /// @return result uint256 value from byte array.\n function readUint256(\n bytes memory b,\n uint256 index\n )\n internal\n pure\n returns (uint256 result)\n {\n result = uint256(readBytes32(b, index));\n return result;\n }\n\n /// @dev Writes a uint256 into a specific position in a byte array.\n /// @param b Byte array to insert <input> into.\n /// @param index Index in byte array of <input>.\n /// @param input uint256 to put into byte array.\n function writeUint256(\n bytes memory b,\n uint256 index,\n uint256 input\n )\n internal\n pure\n {\n writeBytes32(b, index, bytes32(input));\n }\n\n /// @dev Reads an unpadded bytes4 value from a position in a byte array.\n /// @param b Byte array containing a bytes4 value.\n /// @param index Index in byte array of bytes4 value.\n /// @return result bytes4 value from byte array.\n function readBytes4(\n bytes memory b,\n uint256 index\n )\n internal\n pure\n returns (bytes4 result)\n {\n if (b.length < index + 4) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsFourRequired,\n b.length,\n index + 4\n ));\n }\n\n // Arrays are prefixed by a 32 byte length field\n index += 32;\n\n // Read the bytes4 from array memory\n assembly {\n result := mload(add(b, index))\n // Solidity does not require us to clean the trailing bytes.\n // We do it anyway\n result := and(result, 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000)\n }\n return result;\n }\n\n /// @dev Writes a new length to a byte array.\n /// Decreasing length will lead to removing the corresponding lower order bytes from the byte array.\n /// Increasing length may lead to appending adjacent in-memory bytes to the end of the byte array.\n /// @param b Bytes array to write new length to.\n /// @param length New length of byte array.\n function writeLength(bytes memory b, uint256 length)\n internal\n pure\n {\n assembly {\n mstore(b, length)\n }\n }\n}\n"
},
"@0x/contracts-utils/contracts/src/v06/errors/LibBytesRichErrorsV06.sol": {
"id": 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;\n\n\nlibrary LibBytesRichErrorsV06 {\n\n enum InvalidByteOperationErrorCodes {\n FromLessThanOrEqualsToRequired,\n ToLessThanOrEqualsLengthRequired,\n LengthGreaterThanZeroRequired,\n LengthGreaterThanOrEqualsFourRequired,\n LengthGreaterThanOrEqualsTwentyRequired,\n LengthGreaterThanOrEqualsThirtyTwoRequired,\n LengthGreaterThanOrEqualsNestedBytesLengthRequired,\n DestinationLengthGreaterThanOrEqualSourceLengthRequired\n }\n\n // bytes4(keccak256(\"InvalidByteOperationError(uint8,uint256,uint256)\"))\n bytes4 internal constant INVALID_BYTE_OPERATION_ERROR_SELECTOR =\n 0x28006595;\n\n // solhint-disable func-name-mixedcase\n function InvalidByteOperationError(\n InvalidByteOperationErrorCodes errorCode,\n uint256 offset,\n uint256 required\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n INVALID_BYTE_OPERATION_ERROR_SELECTOR,\n errorCode,\n offset,\n required\n );\n }\n}\n"
},
"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.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;\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"
},
"./migrations/LibBootstrap.sol": {
"id": 4,
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"../errors/LibProxyRichErrors.sol\";\n\n\nlibrary LibBootstrap {\n\n /// @dev Magic bytes returned by the bootstrapper to indicate success.\n /// This is `keccack('BOOTSTRAP_SUCCESS')`.\n bytes4 internal constant BOOTSTRAP_SUCCESS = 0xd150751b;\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 delegatecallBootstrapFunction(\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)) != BOOTSTRAP_SUCCESS)\n {\n LibProxyRichErrors.BootstrapCallFailedError(target, resultData).rrevert();\n }\n }\n}\n"
},
"./errors/LibProxyRichErrors.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 LibProxyRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function NotImplementedError(bytes4 selector)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"NotImplementedError(bytes4)\")),\n selector\n );\n }\n\n function InvalidBootstrapCallerError(address actual, address expected)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"InvalidBootstrapCallerError(address,address)\")),\n actual,\n expected\n );\n }\n\n function InvalidDieCallerError(address actual, address expected)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"InvalidDieCallerError(address,address)\")),\n actual,\n expected\n );\n }\n\n function BootstrapCallFailedError(address target, bytes memory resultData)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"BootstrapCallFailedError(address,bytes)\")),\n target,\n resultData\n );\n }\n}\n"
},
"./features/BootstrapFeature.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;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"../migrations/LibBootstrap.sol\";\nimport \"../storage/LibProxyStorage.sol\";\nimport \"./interfaces/IBootstrapFeature.sol\";\n\n\n/// @dev Detachable `bootstrap()` feature.\ncontract BootstrapFeature is\n IBootstrapFeature\n{\n // solhint-disable state-visibility,indent\n /// @dev The ZeroEx contract.\n /// This has to be immutable to persist across delegatecalls.\n address immutable private _deployer;\n /// @dev The implementation address of this contract.\n /// This has to be immutable to persist across delegatecalls.\n address immutable private _implementation;\n /// @dev The deployer.\n /// This has to be immutable to persist across delegatecalls.\n address immutable private _bootstrapCaller;\n // solhint-enable state-visibility,indent\n\n using LibRichErrorsV06 for bytes;\n\n /// @dev Construct this contract and set the bootstrap migration contract.\n /// After constructing this contract, `bootstrap()` should be called\n /// to seed the initial feature set.\n /// @param bootstrapCaller The allowed caller of `bootstrap()`.\n constructor(address bootstrapCaller) public {\n _deployer = msg.sender;\n _implementation = address(this);\n _bootstrapCaller = bootstrapCaller;\n }\n\n /// @dev Bootstrap the initial feature set of this contract by delegatecalling\n /// into `target`. Before exiting the `bootstrap()` function will\n /// deregister itself from the proxy to prevent being called again.\n /// @param target The bootstrapper contract address.\n /// @param callData The call data to execute on `target`.\n function bootstrap(address target, bytes calldata callData) external override {\n // Only the bootstrap caller can call this function.\n if (msg.sender != _bootstrapCaller) {\n LibProxyRichErrors.InvalidBootstrapCallerError(\n msg.sender,\n _bootstrapCaller\n ).rrevert();\n }\n // Deregister.\n LibProxyStorage.getStorage().impls[this.bootstrap.selector] = address(0);\n // Self-destruct.\n BootstrapFeature(_implementation).die();\n // Call the bootstrapper.\n LibBootstrap.delegatecallBootstrapFunction(target, callData);\n }\n\n /// @dev Self-destructs this contract.\n /// Can only be called by the deployer.\n function die() external {\n assert(address(this) == _implementation);\n if (msg.sender != _deployer) {\n LibProxyRichErrors.InvalidDieCallerError(msg.sender, _deployer).rrevert();\n }\n selfdestruct(msg.sender);\n }\n}\n"
},
"./storage/LibProxyStorage.sol": {
"id": 5,
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"./LibStorage.sol\";\n\n\n/// @dev Storage helpers for the proxy contract.\nlibrary LibProxyStorage {\n\n /// @dev Storage bucket for proxy contract.\n struct Storage {\n // Mapping of function selector -> function implementation\n mapping(bytes4 => address) impls;\n // The owner of the proxy contract.\n address owner;\n }\n\n /// @dev Get the storage bucket for this contract.\n function getStorage() internal pure returns (Storage storage stor) {\n uint256 storageSlot = LibStorage.getStorageSlot(\n LibStorage.StorageId.Proxy\n );\n // Dip into assembly to change the slot pointed to by the local\n // variable `stor`.\n // See https://solidity.readthedocs.io/en/v0.6.8/assembly.html?highlight=slot#access-to-external-variables-functions-and-libraries\n assembly { stor_slot := storageSlot }\n }\n}\n"
},
"./storage/LibStorage.sol": {
"id": 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 Common storage helpers\nlibrary LibStorage {\n\n /// @dev What to bit-shift a storage ID by to get its slot.\n /// This gives us a maximum of 2**128 inline fields in each bucket.\n uint256 private constant STORAGE_SLOT_EXP = 128;\n\n /// @dev Storage IDs for feature storage buckets.\n /// WARNING: APPEND-ONLY.\n enum StorageId {\n Proxy,\n SimpleFunctionRegistry,\n Ownable,\n TokenSpender,\n TransformERC20,\n MetaTransactions,\n ReentrancyGuard,\n NativeOrders\n }\n\n /// @dev Get the storage slot given a storage ID. We assign unique, well-spaced\n /// slots to storage bucket variables to ensure they do not overlap.\n /// See: https://solidity.readthedocs.io/en/v0.6.6/assembly.html#access-to-external-variables-functions-and-libraries\n /// @param storageId An entry in `StorageId`\n /// @return slot The storage slot.\n function getStorageSlot(StorageId storageId)\n internal\n pure\n returns (uint256 slot)\n {\n // This should never overflow with a reasonable `STORAGE_SLOT_EXP`\n // because Solidity will do a range check on `storageId` during the cast.\n return (uint256(storageId) + 1) << STORAGE_SLOT_EXP;\n }\n}\n"
},
"./features/interfaces/IBootstrapFeature.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;\npragma experimental ABIEncoderV2;\n\n\n/// @dev Detachable `bootstrap()` feature.\ninterface IBootstrapFeature {\n\n /// @dev Bootstrap the initial feature set of this contract by delegatecalling\n /// into `target`. Before exiting the `bootstrap()` function will\n /// deregister itself from the proxy to prevent being called again.\n /// @param target The bootstrapper contract address.\n /// @param callData The call data to execute on `target`.\n function bootstrap(address target, bytes calldata callData) external;\n}\n"
}
},
"sourceCodes": {
"./ZeroEx.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/LibBytesV06.sol\";\nimport \"./migrations/LibBootstrap.sol\";\nimport \"./features/BootstrapFeature.sol\";\nimport \"./storage/LibProxyStorage.sol\";\nimport \"./errors/LibProxyRichErrors.sol\";\n\n\n/// @dev An extensible proxy contract that serves as a universal entry point for\n/// interacting with the 0x protocol.\ncontract ZeroEx {\n // solhint-disable separate-by-one-line-in-contract,indent,var-name-mixedcase\n using LibBytesV06 for bytes;\n\n /// @dev Construct this contract and register the `BootstrapFeature` feature.\n /// After constructing this contract, `bootstrap()` should be called\n /// by `bootstrap()` to seed the initial feature set.\n /// @param bootstrapper Who can call `bootstrap()`.\n constructor(address bootstrapper) public {\n // Temporarily create and register the bootstrap feature.\n // It will deregister itself after `bootstrap()` has been called.\n BootstrapFeature bootstrap = new BootstrapFeature(bootstrapper);\n LibProxyStorage.getStorage().impls[bootstrap.bootstrap.selector] =\n address(bootstrap);\n }\n\n // solhint-disable state-visibility\n\n /// @dev Forwards calls to the appropriate implementation contract.\n fallback() external payable {\n bytes4 selector = msg.data.readBytes4(0);\n address impl = getFunctionImplementation(selector);\n if (impl == address(0)) {\n _revertWithData(LibProxyRichErrors.NotImplementedError(selector));\n }\n\n (bool success, bytes memory resultData) = impl.delegatecall(msg.data);\n if (!success) {\n _revertWithData(resultData);\n }\n _returnWithData(resultData);\n }\n\n /// @dev Fallback for just receiving ether.\n receive() external payable {}\n\n // solhint-enable state-visibility\n\n /// @dev Get the implementation contract of a registered function.\n /// @param selector The function selector.\n /// @return impl The implementation contract address.\n function getFunctionImplementation(bytes4 selector)\n public\n view\n returns (address impl)\n {\n return LibProxyStorage.getStorage().impls[selector];\n }\n\n /// @dev Revert with arbitrary bytes.\n /// @param data Revert data.\n function _revertWithData(bytes memory data) private pure {\n assembly { revert(add(data, 32), mload(data)) }\n }\n\n /// @dev Return with arbitrary bytes.\n /// @param data Return data.\n function _returnWithData(bytes memory data) private pure {\n assembly { return(add(data, 32), mload(data)) }\n }\n}\n",
"@0x/contracts-utils/contracts/src/v06/LibBytesV06.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\nimport \"./errors/LibBytesRichErrorsV06.sol\";\nimport \"./errors/LibRichErrorsV06.sol\";\n\n\nlibrary LibBytesV06 {\n\n using LibBytesV06 for bytes;\n\n /// @dev Gets the memory address for a byte array.\n /// @param input Byte array to lookup.\n /// @return memoryAddress Memory address of byte array. This\n /// points to the header of the byte array which contains\n /// the length.\n function rawAddress(bytes memory input)\n internal\n pure\n returns (uint256 memoryAddress)\n {\n assembly {\n memoryAddress := input\n }\n return memoryAddress;\n }\n\n /// @dev Gets the memory address for the contents of a byte array.\n /// @param input Byte array to lookup.\n /// @return memoryAddress Memory address of the contents of the byte array.\n function contentAddress(bytes memory input)\n internal\n pure\n returns (uint256 memoryAddress)\n {\n assembly {\n memoryAddress := add(input, 32)\n }\n return memoryAddress;\n }\n\n /// @dev Copies `length` bytes from memory location `source` to `dest`.\n /// @param dest memory address to copy bytes to.\n /// @param source memory address to copy bytes from.\n /// @param length number of bytes to copy.\n function memCopy(\n uint256 dest,\n uint256 source,\n uint256 length\n )\n internal\n pure\n {\n if (length < 32) {\n // Handle a partial word by reading destination and masking\n // off the bits we are interested in.\n // This correctly handles overlap, zero lengths and source == dest\n assembly {\n let mask := sub(exp(256, sub(32, length)), 1)\n let s := and(mload(source), not(mask))\n let d := and(mload(dest), mask)\n mstore(dest, or(s, d))\n }\n } else {\n // Skip the O(length) loop when source == dest.\n if (source == dest) {\n return;\n }\n\n // For large copies we copy whole words at a time. The final\n // word is aligned to the end of the range (instead of after the\n // previous) to handle partial words. So a copy will look like this:\n //\n // ####\n // ####\n // ####\n // ####\n //\n // We handle overlap in the source and destination range by\n // changing the copying direction. This prevents us from\n // overwriting parts of source that we still need to copy.\n //\n // This correctly handles source == dest\n //\n if (source > dest) {\n assembly {\n // We subtract 32 from `sEnd` and `dEnd` because it\n // is easier to compare with in the loop, and these\n // are also the addresses we need for copying the\n // last bytes.\n length := sub(length, 32)\n let sEnd := add(source, length)\n let dEnd := add(dest, length)\n\n // Remember the last 32 bytes of source\n // This needs to be done here and not after the loop\n // because we may have overwritten the last bytes in\n // source already due to overlap.\n let last := mload(sEnd)\n\n // Copy whole words front to back\n // Note: the first check is always true,\n // this could have been a do-while loop.\n // solhint-disable-next-line no-empty-blocks\n for {} lt(source, sEnd) {} {\n mstore(dest, mload(source))\n source := add(source, 32)\n dest := add(dest, 32)\n }\n\n // Write the last 32 bytes\n mstore(dEnd, last)\n }\n } else {\n assembly {\n // We subtract 32 from `sEnd` and `dEnd` because those\n // are the starting points when copying a word at the end.\n length := sub(length, 32)\n let sEnd := add(source, length)\n let dEnd := add(dest, length)\n\n // Remember the first 32 bytes of source\n // This needs to be done here and not after the loop\n // because we may have overwritten the first bytes in\n // source already due to overlap.\n let first := mload(source)\n\n // Copy whole words back to front\n // We use a signed comparisson here to allow dEnd to become\n // negative (happens when source and dest < 32). Valid\n // addresses in local memory will never be larger than\n // 2**255, so they can be safely re-interpreted as signed.\n // Note: the first check is always true,\n // this could have been a do-while loop.\n // solhint-disable-next-line no-empty-blocks\n for {} slt(dest, dEnd) {} {\n mstore(dEnd, mload(sEnd))\n sEnd := sub(sEnd, 32)\n dEnd := sub(dEnd, 32)\n }\n\n // Write the first 32 bytes\n mstore(dest, first)\n }\n }\n }\n }\n\n /// @dev Returns a slices from a byte array.\n /// @param b The byte array to take a slice from.\n /// @param from The starting index for the slice (inclusive).\n /// @param to The final index for the slice (exclusive).\n /// @return result The slice containing bytes at indices [from, to)\n function slice(\n bytes memory b,\n uint256 from,\n uint256 to\n )\n internal\n pure\n returns (bytes memory result)\n {\n // Ensure that the from and to positions are valid positions for a slice within\n // the byte array that is being used.\n if (from > to) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.FromLessThanOrEqualsToRequired,\n from,\n to\n ));\n }\n if (to > b.length) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.ToLessThanOrEqualsLengthRequired,\n to,\n b.length\n ));\n }\n\n // Create a new bytes structure and copy contents\n result = new bytes(to - from);\n memCopy(\n result.contentAddress(),\n b.contentAddress() + from,\n result.length\n );\n return result;\n }\n\n /// @dev Returns a slice from a byte array without preserving the input.\n /// When `from == 0`, the original array will match the slice.\n /// In other cases its state will be corrupted.\n /// @param b The byte array to take a slice from. Will be destroyed in the process.\n /// @param from The starting index for the slice (inclusive).\n /// @param to The final index for the slice (exclusive).\n /// @return result The slice containing bytes at indices [from, to)\n function sliceDestructive(\n bytes memory b,\n uint256 from,\n uint256 to\n )\n internal\n pure\n returns (bytes memory result)\n {\n // Ensure that the from and to positions are valid positions for a slice within\n // the byte array that is being used.\n if (from > to) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.FromLessThanOrEqualsToRequired,\n from,\n to\n ));\n }\n if (to > b.length) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.ToLessThanOrEqualsLengthRequired,\n to,\n b.length\n ));\n }\n\n // Create a new bytes structure around [from, to) in-place.\n assembly {\n result := add(b, from)\n mstore(result, sub(to, from))\n }\n return result;\n }\n\n /// @dev Pops the last byte off of a byte array by modifying its length.\n /// @param b Byte array that will be modified.\n /// @return result The byte that was popped off.\n function popLastByte(bytes memory b)\n internal\n pure\n returns (bytes1 result)\n {\n if (b.length == 0) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanZeroRequired,\n b.length,\n 0\n ));\n }\n\n // Store last byte.\n result = b[b.length - 1];\n\n assembly {\n // Decrement length of byte array.\n let newLen := sub(mload(b), 1)\n mstore(b, newLen)\n }\n return result;\n }\n\n /// @dev Tests equality of two byte arrays.\n /// @param lhs First byte array to compare.\n /// @param rhs Second byte array to compare.\n /// @return equal True if arrays are the same. False otherwise.\n function equals(\n bytes memory lhs,\n bytes memory rhs\n )\n internal\n pure\n returns (bool equal)\n {\n // Keccak gas cost is 30 + numWords * 6. This is a cheap way to compare.\n // We early exit on unequal lengths, but keccak would also correctly\n // handle this.\n return lhs.length == rhs.length && keccak256(lhs) == keccak256(rhs);\n }\n\n /// @dev Reads an address from a position in a byte array.\n /// @param b Byte array containing an address.\n /// @param index Index in byte array of address.\n /// @return result address from byte array.\n function readAddress(\n bytes memory b,\n uint256 index\n )\n internal\n pure\n returns (address result)\n {\n if (b.length < index + 20) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsTwentyRequired,\n b.length,\n index + 20 // 20 is length of address\n ));\n }\n\n // Add offset to index:\n // 1. Arrays are prefixed by 32-byte length parameter (add 32 to index)\n // 2. Account for size difference between address length and 32-byte storage word (subtract 12 from index)\n index += 20;\n\n // Read address from array memory\n assembly {\n // 1. Add index to address of bytes array\n // 2. Load 32-byte word from memory\n // 3. Apply 20-byte mask to obtain address\n result := and(mload(add(b, index)), 0xffffffffffffffffffffffffffffffffffffffff)\n }\n return result;\n }\n\n /// @dev Writes an address into a specific position in a byte array.\n /// @param b Byte array to insert address into.\n /// @param index Index in byte array of address.\n /// @param input Address to put into byte array.\n function writeAddress(\n bytes memory b,\n uint256 index,\n address input\n )\n internal\n pure\n {\n if (b.length < index + 20) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsTwentyRequired,\n b.length,\n index + 20 // 20 is length of address\n ));\n }\n\n // Add offset to index:\n // 1. Arrays are prefixed by 32-byte length parameter (add 32 to index)\n // 2. Account for size difference between address length and 32-byte storage word (subtract 12 from index)\n index += 20;\n\n // Store address into array memory\n assembly {\n // The address occupies 20 bytes and mstore stores 32 bytes.\n // First fetch the 32-byte word where we'll be storing the address, then\n // apply a mask so we have only the bytes in the word that the address will not occupy.\n // Then combine these bytes with the address and store the 32 bytes back to memory with mstore.\n\n // 1. Add index to address of bytes array\n // 2. Load 32-byte word from memory\n // 3. Apply 12-byte mask to obtain extra bytes occupying word of memory where we'll store the address\n let neighbors := and(\n mload(add(b, index)),\n 0xffffffffffffffffffffffff0000000000000000000000000000000000000000\n )\n\n // Make sure input address is clean.\n // (Solidity does not guarantee this)\n input := and(input, 0xffffffffffffffffffffffffffffffffffffffff)\n\n // Store the neighbors and address into memory\n mstore(add(b, index), xor(input, neighbors))\n }\n }\n\n /// @dev Reads a bytes32 value from a position in a byte array.\n /// @param b Byte array containing a bytes32 value.\n /// @param index Index in byte array of bytes32 value.\n /// @return result bytes32 value from byte array.\n function readBytes32(\n bytes memory b,\n uint256 index\n )\n internal\n pure\n returns (bytes32 result)\n {\n if (b.length < index + 32) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsThirtyTwoRequired,\n b.length,\n index + 32\n ));\n }\n\n // Arrays are prefixed by a 256 bit length parameter\n index += 32;\n\n // Read the bytes32 from array memory\n assembly {\n result := mload(add(b, index))\n }\n return result;\n }\n\n /// @dev Writes a bytes32 into a specific position in a byte array.\n /// @param b Byte array to insert <input> into.\n /// @param index Index in byte array of <input>.\n /// @param input bytes32 to put into byte array.\n function writeBytes32(\n bytes memory b,\n uint256 index,\n bytes32 input\n )\n internal\n pure\n {\n if (b.length < index + 32) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsThirtyTwoRequired,\n b.length,\n index + 32\n ));\n }\n\n // Arrays are prefixed by a 256 bit length parameter\n index += 32;\n\n // Read the bytes32 from array memory\n assembly {\n mstore(add(b, index), input)\n }\n }\n\n /// @dev Reads a uint256 value from a position in a byte array.\n /// @param b Byte array containing a uint256 value.\n /// @param index Index in byte array of uint256 value.\n /// @return result uint256 value from byte array.\n function readUint256(\n bytes memory b,\n uint256 index\n )\n internal\n pure\n returns (uint256 result)\n {\n result = uint256(readBytes32(b, index));\n return result;\n }\n\n /// @dev Writes a uint256 into a specific position in a byte array.\n /// @param b Byte array to insert <input> into.\n /// @param index Index in byte array of <input>.\n /// @param input uint256 to put into byte array.\n function writeUint256(\n bytes memory b,\n uint256 index,\n uint256 input\n )\n internal\n pure\n {\n writeBytes32(b, index, bytes32(input));\n }\n\n /// @dev Reads an unpadded bytes4 value from a position in a byte array.\n /// @param b Byte array containing a bytes4 value.\n /// @param index Index in byte array of bytes4 value.\n /// @return result bytes4 value from byte array.\n function readBytes4(\n bytes memory b,\n uint256 index\n )\n internal\n pure\n returns (bytes4 result)\n {\n if (b.length < index + 4) {\n LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(\n LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsFourRequired,\n b.length,\n index + 4\n ));\n }\n\n // Arrays are prefixed by a 32 byte length field\n index += 32;\n\n // Read the bytes4 from array memory\n assembly {\n result := mload(add(b, index))\n // Solidity does not require us to clean the trailing bytes.\n // We do it anyway\n result := and(result, 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000)\n }\n return result;\n }\n\n /// @dev Writes a new length to a byte array.\n /// Decreasing length will lead to removing the corresponding lower order bytes from the byte array.\n /// Increasing length may lead to appending adjacent in-memory bytes to the end of the byte array.\n /// @param b Bytes array to write new length to.\n /// @param length New length of byte array.\n function writeLength(bytes memory b, uint256 length)\n internal\n pure\n {\n assembly {\n mstore(b, length)\n }\n }\n}\n",
"@0x/contracts-utils/contracts/src/v06/errors/LibBytesRichErrorsV06.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibBytesRichErrorsV06 {\n\n enum InvalidByteOperationErrorCodes {\n FromLessThanOrEqualsToRequired,\n ToLessThanOrEqualsLengthRequired,\n LengthGreaterThanZeroRequired,\n LengthGreaterThanOrEqualsFourRequired,\n LengthGreaterThanOrEqualsTwentyRequired,\n LengthGreaterThanOrEqualsThirtyTwoRequired,\n LengthGreaterThanOrEqualsNestedBytesLengthRequired,\n DestinationLengthGreaterThanOrEqualSourceLengthRequired\n }\n\n // bytes4(keccak256(\"InvalidByteOperationError(uint8,uint256,uint256)\"))\n bytes4 internal constant INVALID_BYTE_OPERATION_ERROR_SELECTOR =\n 0x28006595;\n\n // solhint-disable func-name-mixedcase\n function InvalidByteOperationError(\n InvalidByteOperationErrorCodes errorCode,\n uint256 offset,\n uint256 required\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n INVALID_BYTE_OPERATION_ERROR_SELECTOR,\n errorCode,\n offset,\n required\n );\n }\n}\n",
"@0x/contracts-utils/contracts/src/v06/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",
"./migrations/LibBootstrap.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/LibProxyRichErrors.sol\";\n\n\nlibrary LibBootstrap {\n\n /// @dev Magic bytes returned by the bootstrapper to indicate success.\n /// This is `keccack('BOOTSTRAP_SUCCESS')`.\n bytes4 internal constant BOOTSTRAP_SUCCESS = 0xd150751b;\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 delegatecallBootstrapFunction(\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)) != BOOTSTRAP_SUCCESS)\n {\n LibProxyRichErrors.BootstrapCallFailedError(target, resultData).rrevert();\n }\n }\n}\n",
"./errors/LibProxyRichErrors.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 LibProxyRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function NotImplementedError(bytes4 selector)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"NotImplementedError(bytes4)\")),\n selector\n );\n }\n\n function InvalidBootstrapCallerError(address actual, address expected)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"InvalidBootstrapCallerError(address,address)\")),\n actual,\n expected\n );\n }\n\n function InvalidDieCallerError(address actual, address expected)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"InvalidDieCallerError(address,address)\")),\n actual,\n expected\n );\n }\n\n function BootstrapCallFailedError(address target, bytes memory resultData)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"BootstrapCallFailedError(address,bytes)\")),\n target,\n resultData\n );\n }\n}\n",
"./features/BootstrapFeature.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 \"../migrations/LibBootstrap.sol\";\nimport \"../storage/LibProxyStorage.sol\";\nimport \"./interfaces/IBootstrapFeature.sol\";\n\n\n/// @dev Detachable `bootstrap()` feature.\ncontract BootstrapFeature is\n IBootstrapFeature\n{\n // solhint-disable state-visibility,indent\n /// @dev The ZeroEx contract.\n /// This has to be immutable to persist across delegatecalls.\n address immutable private _deployer;\n /// @dev The implementation address of this contract.\n /// This has to be immutable to persist across delegatecalls.\n address immutable private _implementation;\n /// @dev The deployer.\n /// This has to be immutable to persist across delegatecalls.\n address immutable private _bootstrapCaller;\n // solhint-enable state-visibility,indent\n\n using LibRichErrorsV06 for bytes;\n\n /// @dev Construct this contract and set the bootstrap migration contract.\n /// After constructing this contract, `bootstrap()` should be called\n /// to seed the initial feature set.\n /// @param bootstrapCaller The allowed caller of `bootstrap()`.\n constructor(address bootstrapCaller) public {\n _deployer = msg.sender;\n _implementation = address(this);\n _bootstrapCaller = bootstrapCaller;\n }\n\n /// @dev Bootstrap the initial feature set of this contract by delegatecalling\n /// into `target`. Before exiting the `bootstrap()` function will\n /// deregister itself from the proxy to prevent being called again.\n /// @param target The bootstrapper contract address.\n /// @param callData The call data to execute on `target`.\n function bootstrap(address target, bytes calldata callData) external override {\n // Only the bootstrap caller can call this function.\n if (msg.sender != _bootstrapCaller) {\n LibProxyRichErrors.InvalidBootstrapCallerError(\n msg.sender,\n _bootstrapCaller\n ).rrevert();\n }\n // Deregister.\n LibProxyStorage.getStorage().impls[this.bootstrap.selector] = address(0);\n // Self-destruct.\n BootstrapFeature(_implementation).die();\n // Call the bootstrapper.\n LibBootstrap.delegatecallBootstrapFunction(target, callData);\n }\n\n /// @dev Self-destructs this contract.\n /// Can only be called by the deployer.\n function die() external {\n assert(address(this) == _implementation);\n if (msg.sender != _deployer) {\n LibProxyRichErrors.InvalidDieCallerError(msg.sender, _deployer).rrevert();\n }\n selfdestruct(msg.sender);\n }\n}\n",
"./storage/LibProxyStorage.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"./LibStorage.sol\";\n\n\n/// @dev Storage helpers for the proxy contract.\nlibrary LibProxyStorage {\n\n /// @dev Storage bucket for proxy contract.\n struct Storage {\n // Mapping of function selector -> function implementation\n mapping(bytes4 => address) impls;\n // The owner of the proxy contract.\n address owner;\n }\n\n /// @dev Get the storage bucket for this contract.\n function getStorage() internal pure returns (Storage storage stor) {\n uint256 storageSlot = LibStorage.getStorageSlot(\n LibStorage.StorageId.Proxy\n );\n // Dip into assembly to change the slot pointed to by the local\n // variable `stor`.\n // See https://solidity.readthedocs.io/en/v0.6.8/assembly.html?highlight=slot#access-to-external-variables-functions-and-libraries\n assembly { stor_slot := storageSlot }\n }\n}\n",
"./storage/LibStorage.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\n\n/// @dev Common storage helpers\nlibrary LibStorage {\n\n /// @dev What to bit-shift a storage ID by to get its slot.\n /// This gives us a maximum of 2**128 inline fields in each bucket.\n uint256 private constant STORAGE_SLOT_EXP = 128;\n\n /// @dev Storage IDs for feature storage buckets.\n /// WARNING: APPEND-ONLY.\n enum StorageId {\n Proxy,\n SimpleFunctionRegistry,\n Ownable,\n TokenSpender,\n TransformERC20,\n MetaTransactions,\n ReentrancyGuard,\n NativeOrders\n }\n\n /// @dev Get the storage slot given a storage ID. We assign unique, well-spaced\n /// slots to storage bucket variables to ensure they do not overlap.\n /// See: https://solidity.readthedocs.io/en/v0.6.6/assembly.html#access-to-external-variables-functions-and-libraries\n /// @param storageId An entry in `StorageId`\n /// @return slot The storage slot.\n function getStorageSlot(StorageId storageId)\n internal\n pure\n returns (uint256 slot)\n {\n // This should never overflow with a reasonable `STORAGE_SLOT_EXP`\n // because Solidity will do a range check on `storageId` during the cast.\n return (uint256(storageId) + 1) << STORAGE_SLOT_EXP;\n }\n}\n",
"./features/interfaces/IBootstrapFeature.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 Detachable `bootstrap()` feature.\ninterface IBootstrapFeature {\n\n /// @dev Bootstrap the initial feature set of this contract by delegatecalling\n /// into `target`. Before exiting the `bootstrap()` function will\n /// deregister itself from the proxy to prevent being called again.\n /// @param target The bootstrapper contract address.\n /// @param callData The call data to execute on `target`.\n function bootstrap(address target, bytes calldata callData) external;\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": {}
}