{
"schemaVersion": "2.0.0",
"contractName": "FullMigration",
"compilerOutput": {
"abi": [
{
"inputs": [
{
"internalType": "address payable",
"name": "deployer_",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "address payable",
"name": "owner",
"type": "address"
},
{
"components": [
{
"internalType": "contract SimpleFunctionRegistry",
"name": "registry",
"type": "address"
},
{
"internalType": "contract Ownable",
"name": "ownable",
"type": "address"
},
{
"internalType": "contract TokenSpender",
"name": "tokenSpender",
"type": "address"
},
{
"internalType": "contract TransformERC20",
"name": "transformERC20",
"type": "address"
}
],
"internalType": "struct FullMigration.Features",
"name": "features",
"type": "tuple"
},
{
"components": [
{
"internalType": "address",
"name": "transformerDeployer",
"type": "address"
}
],
"internalType": "struct FullMigration.MigrateOpts",
"name": "migrateOpts",
"type": "tuple"
}
],
"name": "deploy",
"outputs": [
{
"internalType": "contract ZeroEx",
"name": "zeroEx",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "deployer",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address payable",
"name": "ethRecipient",
"type": "address"
}
],
"name": "die",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"devdoc": {
"details": "A contract for deploying and configuring the full ZeroEx contract.",
"methods": {
"constructor": {
"details": "Instantiate this contract and set the allowed caller of `deploy()` to `deployer`.",
"params": {
"deployer_": "The allowed caller of `deploy()`."
}
},
"deploy(address,(address,address,address,address),(address))": {
"details": "Deploy the `ZeroEx` contract with the full feature set, transfer ownership to `owner`, then self-destruct.",
"params": {
"features": "Features to add to the proxy.",
"migrateOpts": "Parameters needed to initialize features.",
"owner": "The owner of the contract."
},
"returns": {
"zeroEx": "The deployed and configured `ZeroEx` contract."
}
},
"die(address)": {
"details": "Destroy this contract. Only callable from ourselves (from `deploy()`).",
"params": {
"ethRecipient": "Receiver of any ETH in this contract."
}
}
},
"stateVariables": {
"_initialMigration": {
"details": "The initial migration contract."
},
"deployer": {
"details": "The allowed caller of `deploy()`."
}
}
},
"evm": {
"bytecode": {
"linkReferences": {},
"object": "0x60a060405234801561001057600080fd5b5060405161312838038061312883398101604081905261002f916100a9565b6001600160601b0319606082901b16608052604051309061004f9061009c565b61005991906100d7565b604051809103906000f080158015610075573d6000803e3d6000fd5b50600080546001600160a01b0319166001600160a01b0392909216919091179055506100eb565b61192e806117fa83390190565b6000602082840312156100ba578081fd5b81516001600160a01b03811681146100d0578182fd5b9392505050565b6001600160a01b0391909116815260200190565b60805160601c6116ee61010c6000398060a6528061032552506116ee6000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80633df79a9f14610046578063c9353cb51461006f578063d5f3948814610084575b600080fd5b6100596100543660046106e3565b61008c565b60405161006691906107f6565b60405180910390f35b61008261007d3660046106c0565b6102d1565b005b610059610323565b60003373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610106576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100fd906108e9565b60405180910390fd5b600054604080518082018252855173ffffffffffffffffffffffffffffffffffffffff908116825260208088015182169083015291517fccadf409000000000000000000000000000000000000000000000000000000008152919092169163ccadf40991610178913091600401610817565b602060405180830381600087803b15801561019257600080fd5b505af11580156101a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101ca91906107da565b90506101d881858585610347565b6040517ff2fde38b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82169063f2fde38b9061022a9087906004016107f6565b600060405180830381600087803b15801561024457600080fd5b505af1158015610258573d6000803e3d6000fd5b50506040517fc9353cb500000000000000000000000000000000000000000000000000000000815230925063c9353cb591506102989087906004016107f6565b600060405180830381600087803b1580156102b257600080fd5b505af11580156102c6573d6000803e3d6000fd5b505050509392505050565b33301461030a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100fd906108e9565b8073ffffffffffffffffffffffffffffffffffffffff16ff5b7f000000000000000000000000000000000000000000000000000000000000000081565b6040518490600090610358906106a2565b604051809103906000f080158015610374573d6000803e3d6000fd5b506040517f42f1181e00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff8216906342f1181e906103ca9089906004016107f6565b600060405180830381600087803b1580156103e457600080fd5b505af11580156103f8573d6000803e3d6000fd5b50506040517ff2fde38b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416925063f2fde38b915061044e9088906004016107f6565b600060405180830381600087803b15801561046857600080fd5b505af115801561047c573d6000803e3d6000fd5b505050508173ffffffffffffffffffffffffffffffffffffffff1663261fe679856040015163ce5494bb60e01b846040516024016104ba91906107f6565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e085901b909216825261054d92913090600401610850565b600060405180830381600087803b15801561056757600080fd5b505af115801561057b573d6000803e3d6000fd5b5050506060850151845160405173ffffffffffffffffffffffffffffffffffffffff8616945063261fe67993507fce5494bb00000000000000000000000000000000000000000000000000000000916105d6916024016107f6565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e085901b909216825261066992913090600401610850565b600060405180830381600087803b15801561068357600080fd5b505af1158015610697573d6000803e3d6000fd5b505050505050505050565b610d4c8061096d83390190565b80356106ba81610947565b92915050565b6000602082840312156106d1578081fd5b81356106dc81610947565b9392505050565b600080600083850360c08112156106f8578283fd5b843561070381610947565b935060807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082011215610734578283fd5b61073e6080610920565b602086013561074c81610947565b815261075b87604088016106af565b602082015261076d87606088016106af565b604082015261077f87608088016106af565b6060820152925060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60820112156107b5578182fd5b506107c06020610920565b6107cd8660a087016106af565b8152809150509250925092565b6000602082840312156107eb578081fd5b81516106dc81610947565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff92831681528151831660208083019190915290910151909116604082015260600190565b600073ffffffffffffffffffffffffffffffffffffffff808616835260206060818501528551806060860152835b8181101561089a5787810183015186820160800152820161087e565b818111156108ab5784608083880101525b509490911660408401525050601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160160800192915050565b6020808252601c908201527f46756c6c4d6967726174696f6e2f494e56414c49445f53454e44455200000000604082015260600190565b60405181810167ffffffffffffffff8111828210171561093f57600080fd5b604052919050565b73ffffffffffffffffffffffffffffffffffffffff8116811461096957600080fd5b5056fe608060405234801561001057600080fd5b50600080546001600160a01b03191633179055610d1a806100326000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c80639ad2674411610076578063bca8c7b51161005b578063bca8c7b514610134578063d39de6e914610154578063f2fde38b14610169576100a3565b80639ad2674414610101578063b918161114610114576100a3565b806342f1181e146100a8578063494503d4146100bd57806370712939146100e65780638da5cb5b146100f9575b600080fd5b6100bb6100b6366004610aa2565b61017c565b005b6100d06100cb366004610b6e565b610190565b6040516100dd9190610b96565b60405180910390f35b6100bb6100f4366004610aa2565b6101c4565b6100d061027e565b6100bb61010f366004610b43565b61029a565b610127610122366004610aa2565b6102ac565b6040516100dd9190610c38565b610147610142366004610ac5565b6102c1565b6040516100dd9190610c43565b61015c610351565b6040516100dd9190610bde565b6100bb610177366004610aa2565b6103c0565b610184610463565b61018d816104ac565b50565b6002818154811061019d57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b6101cc610463565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff1661020a5761020a610205826105dd565b61067c565b60005b60025481101561027a578173ffffffffffffffffffffffffffffffffffffffff166002828154811061023b57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614156102725761026d8282610684565b61027a565b60010161020d565b5050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6102a2610463565b61027a8282610684565b60016020526000908152604090205460ff1681565b60606102cb6108ff565b60008473ffffffffffffffffffffffffffffffffffffffff1684846040516102f4929190610b86565b6000604051808303816000865af19150503d8060008114610331576040519150601f19603f3d011682016040523d82523d6000602084013e610336565b606091505b509250905080610349576103498261067c565b509392505050565b606060028054806020026020016040519081016040528092919081815260200182805480156103b657602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff16815260019091019060200180831161038b575b5050505050905090565b6103c8610463565b73ffffffffffffffffffffffffffffffffffffffff81166103f3576103ee610205610922565b61018d565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b60005473ffffffffffffffffffffffffffffffffffffffff1633146104aa576000546104aa9061020590339073ffffffffffffffffffffffffffffffffffffffff16610959565b565b73ffffffffffffffffffffffffffffffffffffffff81166104d2576104d26102056109fb565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff161561050c5761050c61020582610a32565b73ffffffffffffffffffffffffffffffffffffffff8116600081815260016020819052604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168317905560028054928301815583527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001684179055513392917f3147867c59d17e8fa9d522465651d44aae0a9e38f902f3475b97e58072f0ed4c91a350565b606063eb5108a260e01b826040516024016105f89190610b96565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529050919050565b805160208201fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604090205460ff166106bd576106bd610205836105dd565b60025481106106d8576106d861020582600280549050610a4d565b8173ffffffffffffffffffffffffffffffffffffffff16600282815481106106fc57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff161461075e5761075e6102056002838154811061073657fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1684610a6a565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81019081106107d957fe5b6000918252602090912001546002805473ffffffffffffffffffffffffffffffffffffffff909216918390811061080c57fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600280548061085f57fe5b60008281526020812082017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055909101909155604051339173ffffffffffffffffffffffffffffffffffffffff8516917f1f32c1b084e2de0713b8fb16bd46bb9df710a3dbeae2f3ca93af46e016dcc6b09190a35050565b3360009081526001602052604090205460ff166104aa576104aa61020533610a87565b60408051808201909152600481527fe69edc3e00000000000000000000000000000000000000000000000000000000602082015290565b6060631de45ad160e01b8383604051602401610976929190610bb7565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905092915050565b60408051808201909152600481527f57654fe400000000000000000000000000000000000000000000000000000000602082015290565b606063de16f1a060e01b826040516024016105f89190610b96565b606063e9f8377160e01b8383604051602401610976929190610cb4565b606063140a84db60e01b8383604051602401610976929190610bb7565b606063b65a25b960e01b826040516024016105f89190610b96565b600060208284031215610ab3578081fd5b8135610abe81610cc2565b9392505050565b600080600060408486031215610ad9578182fd5b8335610ae481610cc2565b9250602084013567ffffffffffffffff80821115610b00578384fd5b81860187601f820112610b11578485fd5b8035925081831115610b21578485fd5b876020848301011115610b32578485fd5b949760209095019650909450505050565b60008060408385031215610b55578182fd5b8235610b6081610cc2565b946020939093013593505050565b600060208284031215610b7f578081fd5b5035919050565b6000828483379101908152919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b6020808252825182820181905260009190848201906040850190845b81811015610c2c57835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101610bfa565b50909695505050505050565b901515815260200190565b6000602080835283518082850152825b81811015610c6f57858101830151858201604001528201610c53565b81811115610c805783604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b918252602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff8116811461018d57600080fdfea2646970667358221220ea2decf0a069ea1d113e648ef695370140520dfb3e3762abf449a6e769efef7564736f6c634300060a0033a2646970667358221220775833d230436b742ab34e3bfccf39d46480fc3f201417bb2c3689dfc5c4456564736f6c634300060a003360c060405234801561001057600080fd5b5060405161192e38038061192e83398101604081905261002f9161004c565b6001600160601b0319606091821b1660805230901b60a05261007a565b60006020828403121561005d578081fd5b81516001600160a01b0381168114610073578182fd5b9392505050565b60805160601c60a05160601c6118866100a8600039806102c0525080610353528061054652506118866000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806308cf793414610051578063c9353cb51461007a578063ccadf4091461008f578063d5f39488146100af575b600080fd5b61006461005f3660046107dd565b6100b7565b6040516100719190610962565b60405180910390f35b61008d610088366004610785565b6102a8565b005b6100a261009d3660046107a8565b610339565b604051610071919061089a565b6100a2610544565b80516040805160048152602481019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167ffb969b0a0000000000000000000000000000000000000000000000000000000017905260009161011c91610568565b60208083015160408051600481526024810190915291820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167ffb969b0a0000000000000000000000000000000000000000000000000000000017905261018191610568565b6040517f9db64a400000000000000000000000000000000000000000000000000000000081523090639db64a40906101e0907f0ee8be1b000000000000000000000000000000000000000000000000000000009060009060040161098f565b600060405180830381600087803b1580156101fa57600080fd5b505af115801561020e573d6000803e3d6000fd5b50506040517ff2fde38b00000000000000000000000000000000000000000000000000000000815230925063f2fde38b915061024e90869060040161089a565b600060405180830381600087803b15801561026857600080fd5b505af115801561027c573d6000803e3d6000fd5b507fd150751b000000000000000000000000000000000000000000000000000000009695505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610320576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610317906109d7565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16ff5b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146103aa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610317906109d7565b6040516103b69061071a565b604051809103906000f0801580156103d2573d6000803e3d6000fd5b5090508073ffffffffffffffffffffffffffffffffffffffff166373f208d5306308cf793460e01b868660405160240161040d9291906108bb565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e085901b909216825261049e92916004016108f4565b600060405180830381600087803b1580156104b857600080fd5b505af11580156104cc573d6000803e3d6000fd5b50506040517fc9353cb500000000000000000000000000000000000000000000000000000000815230925063c9353cb5915061050c90869060040161089a565b600060405180830381600087803b15801561052657600080fd5b505af115801561053a573d6000803e3d6000fd5b5050505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600060608373ffffffffffffffffffffffffffffffffffffffff1683604051610591919061082f565b600060405180830381855af49150503d80600081146105cc576040519150601f19603f3d011682016040523d82523d6000602084013e6105d1565b606091505b50915091508115806105e557508051602014155b80610647575080517fd150751b000000000000000000000000000000000000000000000000000000009061062290830160209081019084016107ef565b7fffffffff000000000000000000000000000000000000000000000000000000001614155b1561065e5761065e6106598583610664565b610712565b50505050565b60606040516106729061084b565b6040518091039020838360405160240161068d9291906108f4565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905092915050565b805160208201fd5b610df180610a6083390190565b600060408284031215610738578081fd5b6040516040810181811067ffffffffffffffff82111715610757578283fd5b604052905080823561076881610a3a565b8152602083013561077881610a3a565b6020919091015292915050565b600060208284031215610796578081fd5b81356107a181610a3a565b9392505050565b600080606083850312156107ba578081fd5b82356107c581610a3a565b91506107d48460208501610727565b90509250929050565b600080606083850312156107ba578182fd5b600060208284031215610800578081fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146107a1578182fd5b60008251610841818460208701610a0e565b9190910192915050565b7f426f6f74737472617043616c6c4661696c65644572726f72286164647265737381527f2c62797465732900000000000000000000000000000000000000000000000000602082015260270190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff92831681528151831660208083019190915290910151909116604082015260600190565b600073ffffffffffffffffffffffffffffffffffffffff8416825260406020830152825180604084015261092f816060850160208701610a0e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016060019392505050565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b7fffffffff0000000000000000000000000000000000000000000000000000000092909216825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b6020808252601f908201527f496e697469616c4d6967726174696f6e2f494e56414c49445f53454e44455200604082015260600190565b60005b83811015610a29578181015183820152602001610a11565b8381111561065e5750506000910152565b73ffffffffffffffffffffffffffffffffffffffff81168114610a5c57600080fd5b5056fe608060405234801561001057600080fd5b50600033604051610020906100cf565b61002a91906100dc565b604051809103906000f080158015610046573d6000803e3d6000fd5b5090508061005c61009760201b6102d41760201c565b6373f208d560e01b60009081526020919091526040902080546001600160a01b0319166001600160a01b0392909216919091179055506100f0565b6000806100ae60006100b460201b6102e71760201c565b92915050565b600060808260048111156100c457fe5b600101901b92915050565b610825806105cc83390190565b6001600160a01b0391909116815260200190565b6104cd806100ff6000396000f3fe6080604052600436106100225760003560e01c8063972fdd261461013e57610029565b3661002957005b6000610075600080368080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929392505063ffffffff610174169050565b90506000610082826101c0565b905073ffffffffffffffffffffffffffffffffffffffff81166100b0576100b06100ab83610219565b6102c4565b600060608273ffffffffffffffffffffffffffffffffffffffff166000366040516100dc9291906103ee565b600060405180830381855af49150503d8060008114610117576040519150601f19603f3d011682016040523d82523d6000602084013e61011c565b606091505b50915091508161012f5761012f816102c4565b610138816102cc565b50505050005b34801561014a57600080fd5b5061015e6101593660046103a7565b6101c0565b60405161016b9190610427565b60405180910390f35b60008160040183511015610195576101956100ab6003855185600401610302565b5001602001517fffffffff000000000000000000000000000000000000000000000000000000001690565b60006101ca6102d4565b7fffffffff0000000000000000000000000000000000000000000000000000000092909216600090815260209290925250604090205473ffffffffffffffffffffffffffffffffffffffff1690565b6060604051610227906103fe565b6040518091039020826040516024016102409190610448565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529050919050565b805160208201fd5b805160208201f35b6000806102e160006102e7565b92915050565b600060808260048111156102f757fe5b600101901b92915050565b6060632800659560e01b84848460405160240161032193929190610475565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290509392505050565b6000602082840312156103b8578081fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103e7578182fd5b9392505050565b6000828483379101908152919050565b7f4e6f74496d706c656d656e7465644572726f72286279746573342900000000008152601b0190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b606081016008851061048357fe5b93815260208101929092526040909101529056fea26469706673582212201c6a33632aa53d272b4b5f85566445a4b77e2850500dcb9466842cca1b4d3d7364736f6c634300060a003360e060405234801561001057600080fd5b5060405161082538038061082583398101604081905261002f91610051565b33606090811b60805230811b60a0521b6001600160601b03191660c05261007f565b600060208284031215610062578081fd5b81516001600160a01b0381168114610078578182fd5b9392505050565b60805160601c60a05160601c60c05160601c61076a6100bb6000398060e252806101105250806101d752508060705280609e525061076a6000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806335f469941461003b57806373f208d514610045575b600080fd5b610043610058565b005b61004361005336600461048d565b6100ca565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146100c7576100c76100c2337f000000000000000000000000000000000000000000000000000000000000000061027b565b610329565b33ff5b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610134576101346100c2337f0000000000000000000000000000000000000000000000000000000000000000610331565b600061013e61033f565b7f73f208d5000000000000000000000000000000000000000000000000000000006000908152602091909152604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff94851617905580517f35f4699400000000000000000000000000000000000000000000000000000000815290517f0000000000000000000000000000000000000000000000000000000000000000909316926335f469949260048084019391929182900301818387803b15801561021e57600080fd5b505af1158015610232573d6000803e3d6000fd5b505050506102768383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061035292505050565b505050565b606060405161028990610586565b604051809103902083836040516024016102a4929190610673565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905092915050565b805160208201fd5b6060604051610289906105d5565b60008061034c6000610449565b92915050565b600060608373ffffffffffffffffffffffffffffffffffffffff168360405161037b919061056a565b600060405180830381855af49150503d80600081146103b6576040519150601f19603f3d011682016040523d82523d6000602084013e6103bb565b606091505b50915091508115806103cf57508051602014155b80610431575080517fd150751b000000000000000000000000000000000000000000000000000000009061040c9083016020908101908401610523565b7fffffffff000000000000000000000000000000000000000000000000000000001614155b15610443576104436100c28583610464565b50505050565b6000608082600481111561045957fe5b600101901b92915050565b606060405161047290610624565b604051809103902083836040516024016102a492919061069a565b6000806000604084860312156104a1578283fd5b833573ffffffffffffffffffffffffffffffffffffffff811681146104c4578384fd5b9250602084013567ffffffffffffffff808211156104e0578384fd5b81860187601f8201126104f1578485fd5b8035925081831115610501578485fd5b876020848301011115610512578485fd5b949760209095019650909450505050565b600060208284031215610534578081fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610563578182fd5b9392505050565b6000825161057c818460208701610708565b9190910192915050565b7f496e76616c696444696543616c6c65724572726f7228616464726573732c616481527f6472657373290000000000000000000000000000000000000000000000000000602082015260260190565b7f496e76616c6964426f6f74737472617043616c6c65724572726f72286164647281527f6573732c616464726573732900000000000000000000000000000000000000006020820152602c0190565b7f426f6f74737472617043616c6c4661696c65644572726f72286164647265737381527f2c62797465732900000000000000000000000000000000000000000000000000602082015260270190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b600073ffffffffffffffffffffffffffffffffffffffff841682526040602083015282518060408401526106d5816060850160208701610708565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016060019392505050565b60005b8381101561072357818101518382015260200161070b565b83811115610443575050600091015256fea26469706673582212201a61151226d6d9a933688cc4b3cb691c3dae899a5e985b7065b9ef15b7b22d8e64736f6c634300060a0033a264697066735822122000e3999b66f9ad5c613a3ac3f56a52a2eb8a487daa09ab0ef7a453ffe3eb368464736f6c634300060a0033",
"opcodes": "PUSH1 0xA0 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x3128 CODESIZE SUB DUP1 PUSH2 0x3128 DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH2 0x2F SWAP2 PUSH2 0xA9 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT PUSH1 0x60 DUP3 SWAP1 SHL AND PUSH1 0x80 MSTORE PUSH1 0x40 MLOAD ADDRESS SWAP1 PUSH2 0x4F SWAP1 PUSH2 0x9C JUMP JUMPDEST PUSH2 0x59 SWAP2 SWAP1 PUSH2 0xD7 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 PUSH1 0x0 CREATE DUP1 ISZERO DUP1 ISZERO PUSH2 0x75 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH1 0x0 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 0xEB JUMP JUMPDEST PUSH2 0x192E DUP1 PUSH2 0x17FA DUP4 CODECOPY ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xBA JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0xD0 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 PUSH1 0x80 MLOAD PUSH1 0x60 SHR PUSH2 0x16EE PUSH2 0x10C PUSH1 0x0 CODECOPY DUP1 PUSH1 0xA6 MSTORE DUP1 PUSH2 0x325 MSTORE POP PUSH2 0x16EE 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 0x41 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x3DF79A9F EQ PUSH2 0x46 JUMPI DUP1 PUSH4 0xC9353CB5 EQ PUSH2 0x6F JUMPI DUP1 PUSH4 0xD5F39488 EQ PUSH2 0x84 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x59 PUSH2 0x54 CALLDATASIZE PUSH1 0x4 PUSH2 0x6E3 JUMP JUMPDEST PUSH2 0x8C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x66 SWAP2 SWAP1 PUSH2 0x7F6 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x82 PUSH2 0x7D CALLDATASIZE PUSH1 0x4 PUSH2 0x6C0 JUMP JUMPDEST PUSH2 0x2D1 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x59 PUSH2 0x323 JUMP JUMPDEST PUSH1 0x0 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH32 0x0 AND EQ PUSH2 0x106 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xFD SWAP1 PUSH2 0x8E9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE DUP6 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 DUP2 AND DUP3 MSTORE PUSH1 0x20 DUP1 DUP9 ADD MLOAD DUP3 AND SWAP1 DUP4 ADD MSTORE SWAP2 MLOAD PUSH32 0xCCADF40900000000000000000000000000000000000000000000000000000000 DUP2 MSTORE SWAP2 SWAP1 SWAP3 AND SWAP2 PUSH4 0xCCADF409 SWAP2 PUSH2 0x178 SWAP2 ADDRESS SWAP2 PUSH1 0x4 ADD PUSH2 0x817 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x192 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x1A6 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x1CA SWAP2 SWAP1 PUSH2 0x7DA JUMP JUMPDEST SWAP1 POP PUSH2 0x1D8 DUP2 DUP6 DUP6 DUP6 PUSH2 0x347 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0xF2FDE38B00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 PUSH4 0xF2FDE38B SWAP1 PUSH2 0x22A SWAP1 DUP8 SWAP1 PUSH1 0x4 ADD PUSH2 0x7F6 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x244 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x258 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH32 0xC9353CB500000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS SWAP3 POP PUSH4 0xC9353CB5 SWAP2 POP PUSH2 0x298 SWAP1 DUP8 SWAP1 PUSH1 0x4 ADD PUSH2 0x7F6 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x2B2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x2C6 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0x30A JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xFD SWAP1 PUSH2 0x8E9 JUMP JUMPDEST DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SELFDESTRUCT JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP5 SWAP1 PUSH1 0x0 SWAP1 PUSH2 0x358 SWAP1 PUSH2 0x6A2 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 PUSH1 0x0 CREATE DUP1 ISZERO DUP1 ISZERO PUSH2 0x374 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH32 0x42F1181E00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE SWAP1 SWAP2 POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 PUSH4 0x42F1181E SWAP1 PUSH2 0x3CA SWAP1 DUP10 SWAP1 PUSH1 0x4 ADD PUSH2 0x7F6 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x3E4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x3F8 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH32 0xF2FDE38B00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP5 AND SWAP3 POP PUSH4 0xF2FDE38B SWAP2 POP PUSH2 0x44E SWAP1 DUP9 SWAP1 PUSH1 0x4 ADD PUSH2 0x7F6 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x468 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x47C JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x261FE679 DUP6 PUSH1 0x40 ADD MLOAD PUSH4 0xCE5494BB PUSH1 0xE0 SHL DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x4BA SWAP2 SWAP1 PUSH2 0x7F6 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 DUP2 MSTORE PUSH1 0x20 DUP3 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP5 DUP6 AND OR SWAP1 MSTORE MLOAD PUSH1 0xE0 DUP6 SWAP1 SHL SWAP1 SWAP3 AND DUP3 MSTORE PUSH2 0x54D SWAP3 SWAP2 ADDRESS SWAP1 PUSH1 0x4 ADD PUSH2 0x850 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x567 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x57B JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP PUSH1 0x60 DUP6 ADD MLOAD DUP5 MLOAD PUSH1 0x40 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP7 AND SWAP5 POP PUSH4 0x261FE679 SWAP4 POP PUSH32 0xCE5494BB00000000000000000000000000000000000000000000000000000000 SWAP2 PUSH2 0x5D6 SWAP2 PUSH1 0x24 ADD PUSH2 0x7F6 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 DUP2 MSTORE PUSH1 0x20 DUP3 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP5 DUP6 AND OR SWAP1 MSTORE MLOAD PUSH1 0xE0 DUP6 SWAP1 SHL SWAP1 SWAP3 AND DUP3 MSTORE PUSH2 0x669 SWAP3 SWAP2 ADDRESS SWAP1 PUSH1 0x4 ADD PUSH2 0x850 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x683 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x697 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH2 0xD4C DUP1 PUSH2 0x96D DUP4 CODECOPY ADD SWAP1 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH2 0x6BA DUP2 PUSH2 0x947 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x6D1 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x6DC DUP2 PUSH2 0x947 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP4 DUP6 SUB PUSH1 0xC0 DUP2 SLT ISZERO PUSH2 0x6F8 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP5 CALLDATALOAD PUSH2 0x703 DUP2 PUSH2 0x947 JUMP JUMPDEST SWAP4 POP PUSH1 0x80 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP3 ADD SLT ISZERO PUSH2 0x734 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x73E PUSH1 0x80 PUSH2 0x920 JUMP JUMPDEST PUSH1 0x20 DUP7 ADD CALLDATALOAD PUSH2 0x74C DUP2 PUSH2 0x947 JUMP JUMPDEST DUP2 MSTORE PUSH2 0x75B DUP8 PUSH1 0x40 DUP9 ADD PUSH2 0x6AF JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0x76D DUP8 PUSH1 0x60 DUP9 ADD PUSH2 0x6AF JUMP JUMPDEST PUSH1 0x40 DUP3 ADD MSTORE PUSH2 0x77F DUP8 PUSH1 0x80 DUP9 ADD PUSH2 0x6AF JUMP JUMPDEST PUSH1 0x60 DUP3 ADD MSTORE SWAP3 POP PUSH1 0x20 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF60 DUP3 ADD SLT ISZERO PUSH2 0x7B5 JUMPI DUP2 DUP3 REVERT JUMPDEST POP PUSH2 0x7C0 PUSH1 0x20 PUSH2 0x920 JUMP JUMPDEST PUSH2 0x7CD DUP7 PUSH1 0xA0 DUP8 ADD PUSH2 0x6AF JUMP JUMPDEST DUP2 MSTORE DUP1 SWAP2 POP POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x7EB JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x6DC DUP2 PUSH2 0x947 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP3 DUP4 AND DUP2 MSTORE DUP2 MLOAD DUP4 AND PUSH1 0x20 DUP1 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE SWAP1 SWAP2 ADD MLOAD SWAP1 SWAP2 AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP7 AND DUP4 MSTORE PUSH1 0x20 PUSH1 0x60 DUP2 DUP6 ADD MSTORE DUP6 MLOAD DUP1 PUSH1 0x60 DUP7 ADD MSTORE DUP4 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x89A JUMPI DUP8 DUP2 ADD DUP4 ADD MLOAD DUP7 DUP3 ADD PUSH1 0x80 ADD MSTORE DUP3 ADD PUSH2 0x87E JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0x8AB JUMPI DUP5 PUSH1 0x80 DUP4 DUP9 ADD ADD MSTORE JUMPDEST POP SWAP5 SWAP1 SWAP2 AND PUSH1 0x40 DUP5 ADD MSTORE POP POP PUSH1 0x1F SWAP2 SWAP1 SWAP2 ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND ADD PUSH1 0x80 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x1C SWAP1 DUP3 ADD MSTORE PUSH32 0x46756C6C4D6967726174696F6E2F494E56414C49445F53454E44455200000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x93F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x969 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND CALLER OR SWAP1 SSTORE PUSH2 0xD1A DUP1 PUSH2 0x32 PUSH1 0x0 CODECOPY 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 0xA3 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x9AD26744 GT PUSH2 0x76 JUMPI DUP1 PUSH4 0xBCA8C7B5 GT PUSH2 0x5B JUMPI DUP1 PUSH4 0xBCA8C7B5 EQ PUSH2 0x134 JUMPI DUP1 PUSH4 0xD39DE6E9 EQ PUSH2 0x154 JUMPI DUP1 PUSH4 0xF2FDE38B EQ PUSH2 0x169 JUMPI PUSH2 0xA3 JUMP JUMPDEST DUP1 PUSH4 0x9AD26744 EQ PUSH2 0x101 JUMPI DUP1 PUSH4 0xB9181611 EQ PUSH2 0x114 JUMPI PUSH2 0xA3 JUMP JUMPDEST DUP1 PUSH4 0x42F1181E EQ PUSH2 0xA8 JUMPI DUP1 PUSH4 0x494503D4 EQ PUSH2 0xBD JUMPI DUP1 PUSH4 0x70712939 EQ PUSH2 0xE6 JUMPI DUP1 PUSH4 0x8DA5CB5B EQ PUSH2 0xF9 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xBB PUSH2 0xB6 CALLDATASIZE PUSH1 0x4 PUSH2 0xAA2 JUMP JUMPDEST PUSH2 0x17C JUMP JUMPDEST STOP JUMPDEST PUSH2 0xD0 PUSH2 0xCB CALLDATASIZE PUSH1 0x4 PUSH2 0xB6E JUMP JUMPDEST PUSH2 0x190 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xDD SWAP2 SWAP1 PUSH2 0xB96 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xBB PUSH2 0xF4 CALLDATASIZE PUSH1 0x4 PUSH2 0xAA2 JUMP JUMPDEST PUSH2 0x1C4 JUMP JUMPDEST PUSH2 0xD0 PUSH2 0x27E JUMP JUMPDEST PUSH2 0xBB PUSH2 0x10F CALLDATASIZE PUSH1 0x4 PUSH2 0xB43 JUMP JUMPDEST PUSH2 0x29A JUMP JUMPDEST PUSH2 0x127 PUSH2 0x122 CALLDATASIZE PUSH1 0x4 PUSH2 0xAA2 JUMP JUMPDEST PUSH2 0x2AC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xDD SWAP2 SWAP1 PUSH2 0xC38 JUMP JUMPDEST PUSH2 0x147 PUSH2 0x142 CALLDATASIZE PUSH1 0x4 PUSH2 0xAC5 JUMP JUMPDEST PUSH2 0x2C1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xDD SWAP2 SWAP1 PUSH2 0xC43 JUMP JUMPDEST PUSH2 0x15C PUSH2 0x351 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xDD SWAP2 SWAP1 PUSH2 0xBDE JUMP JUMPDEST PUSH2 0xBB PUSH2 0x177 CALLDATASIZE PUSH1 0x4 PUSH2 0xAA2 JUMP JUMPDEST PUSH2 0x3C0 JUMP JUMPDEST PUSH2 0x184 PUSH2 0x463 JUMP JUMPDEST PUSH2 0x18D DUP2 PUSH2 0x4AC JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x2 DUP2 DUP2 SLOAD DUP2 LT PUSH2 0x19D JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP DUP2 JUMP JUMPDEST PUSH2 0x1CC PUSH2 0x463 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND PUSH2 0x20A JUMPI PUSH2 0x20A PUSH2 0x205 DUP3 PUSH2 0x5DD JUMP JUMPDEST PUSH2 0x67C JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH1 0x2 SLOAD DUP2 LT ISZERO PUSH2 0x27A JUMPI DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x2 DUP3 DUP2 SLOAD DUP2 LT PUSH2 0x23B JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO PUSH2 0x272 JUMPI PUSH2 0x26D DUP3 DUP3 PUSH2 0x684 JUMP JUMPDEST PUSH2 0x27A JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x20D JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH2 0x2A2 PUSH2 0x463 JUMP JUMPDEST PUSH2 0x27A DUP3 DUP3 PUSH2 0x684 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND DUP2 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x2CB PUSH2 0x8FF JUMP JUMPDEST PUSH1 0x0 DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP5 DUP5 PUSH1 0x40 MLOAD PUSH2 0x2F4 SWAP3 SWAP2 SWAP1 PUSH2 0xB86 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP7 GAS CALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x331 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 0x336 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP3 POP SWAP1 POP DUP1 PUSH2 0x349 JUMPI PUSH2 0x349 DUP3 PUSH2 0x67C JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x2 DUP1 SLOAD DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD DUP1 ISZERO PUSH2 0x3B6 JUMPI PUSH1 0x20 MUL DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x1 SWAP1 SWAP2 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x38B JUMPI JUMPDEST POP POP POP POP POP SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x3C8 PUSH2 0x463 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH2 0x3F3 JUMPI PUSH2 0x3EE PUSH2 0x205 PUSH2 0x922 JUMP JUMPDEST PUSH2 0x18D JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND SWAP1 DUP2 OR DUP3 SSTORE PUSH1 0x40 MLOAD SWAP1 SWAP2 CALLER SWAP2 PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 SWAP2 SWAP1 LOG3 POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER EQ PUSH2 0x4AA JUMPI PUSH1 0x0 SLOAD PUSH2 0x4AA SWAP1 PUSH2 0x205 SWAP1 CALLER SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x959 JUMP JUMPDEST JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH2 0x4D2 JUMPI PUSH2 0x4D2 PUSH2 0x205 PUSH2 0x9FB JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x50C JUMPI PUSH2 0x50C PUSH2 0x205 DUP3 PUSH2 0xA32 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND DUP4 OR SWAP1 SSTORE PUSH1 0x2 DUP1 SLOAD SWAP3 DUP4 ADD DUP2 SSTORE DUP4 MSTORE PUSH32 0x405787FA12A823E0F2B7631CC41B3BA8828B3321CA811111FA75CD3AA3BB5ACE SWAP1 SWAP2 ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND DUP5 OR SWAP1 SSTORE MLOAD CALLER SWAP3 SWAP2 PUSH32 0x3147867C59D17E8FA9D522465651D44AAE0A9E38F902F3475B97E58072F0ED4C SWAP2 LOG3 POP JUMP JUMPDEST PUSH1 0x60 PUSH4 0xEB5108A2 PUSH1 0xE0 SHL DUP3 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x5F8 SWAP2 SWAP1 PUSH2 0xB96 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 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND PUSH2 0x6BD JUMPI PUSH2 0x6BD PUSH2 0x205 DUP4 PUSH2 0x5DD JUMP JUMPDEST PUSH1 0x2 SLOAD DUP2 LT PUSH2 0x6D8 JUMPI PUSH2 0x6D8 PUSH2 0x205 DUP3 PUSH1 0x2 DUP1 SLOAD SWAP1 POP PUSH2 0xA4D JUMP JUMPDEST DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x2 DUP3 DUP2 SLOAD DUP2 LT PUSH2 0x6FC JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x75E JUMPI PUSH2 0x75E PUSH2 0x205 PUSH1 0x2 DUP4 DUP2 SLOAD DUP2 LT PUSH2 0x736 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP5 PUSH2 0xA6A JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND SWAP1 SSTORE PUSH1 0x2 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 ADD SWAP1 DUP2 LT PUSH2 0x7D9 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH1 0x2 DUP1 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND SWAP2 DUP4 SWAP1 DUP2 LT PUSH2 0x80C JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP PUSH1 0x2 DUP1 SLOAD DUP1 PUSH2 0x85F JUMPI INVALID JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 KECCAK256 DUP3 ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 DUP2 ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND SWAP1 SSTORE SWAP1 SWAP2 ADD SWAP1 SWAP2 SSTORE PUSH1 0x40 MLOAD CALLER SWAP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP6 AND SWAP2 PUSH32 0x1F32C1B084E2DE0713B8FB16BD46BB9DF710A3DBEAE2F3CA93AF46E016DCC6B0 SWAP2 SWAP1 LOG3 POP POP JUMP JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND PUSH2 0x4AA JUMPI PUSH2 0x4AA PUSH2 0x205 CALLER PUSH2 0xA87 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x4 DUP2 MSTORE PUSH32 0xE69EDC3E00000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH4 0x1DE45AD1 PUSH1 0xE0 SHL DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x976 SWAP3 SWAP2 SWAP1 PUSH2 0xBB7 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 PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x4 DUP2 MSTORE PUSH32 0x57654FE400000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH4 0xDE16F1A0 PUSH1 0xE0 SHL DUP3 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x5F8 SWAP2 SWAP1 PUSH2 0xB96 JUMP JUMPDEST PUSH1 0x60 PUSH4 0xE9F83771 PUSH1 0xE0 SHL DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x976 SWAP3 SWAP2 SWAP1 PUSH2 0xCB4 JUMP JUMPDEST PUSH1 0x60 PUSH4 0x140A84DB PUSH1 0xE0 SHL DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x976 SWAP3 SWAP2 SWAP1 PUSH2 0xBB7 JUMP JUMPDEST PUSH1 0x60 PUSH4 0xB65A25B9 PUSH1 0xE0 SHL DUP3 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x5F8 SWAP2 SWAP1 PUSH2 0xB96 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xAB3 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0xABE DUP2 PUSH2 0xCC2 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x40 DUP5 DUP7 SUB SLT ISZERO PUSH2 0xAD9 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH2 0xAE4 DUP2 PUSH2 0xCC2 JUMP JUMPDEST SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xB00 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP7 ADD DUP8 PUSH1 0x1F DUP3 ADD SLT PUSH2 0xB11 JUMPI DUP5 DUP6 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP3 POP DUP2 DUP4 GT ISZERO PUSH2 0xB21 JUMPI DUP5 DUP6 REVERT JUMPDEST DUP8 PUSH1 0x20 DUP5 DUP4 ADD ADD GT ISZERO PUSH2 0xB32 JUMPI DUP5 DUP6 REVERT JUMPDEST SWAP5 SWAP8 PUSH1 0x20 SWAP1 SWAP6 ADD SWAP7 POP SWAP1 SWAP5 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xB55 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0xB60 DUP2 PUSH2 0xCC2 JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xB7F JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 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 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP3 DUP4 AND DUP2 MSTORE SWAP2 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP3 MLOAD DUP3 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP2 SWAP1 DUP5 DUP3 ADD SWAP1 PUSH1 0x40 DUP6 ADD SWAP1 DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0xC2C JUMPI DUP4 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 MSTORE SWAP3 DUP5 ADD SWAP3 SWAP2 DUP5 ADD SWAP2 PUSH1 0x1 ADD PUSH2 0xBFA JUMP JUMPDEST POP SWAP1 SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 MSTORE DUP4 MLOAD DUP1 DUP3 DUP6 ADD MSTORE DUP3 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0xC6F JUMPI DUP6 DUP2 ADD DUP4 ADD MLOAD DUP6 DUP3 ADD PUSH1 0x40 ADD MSTORE DUP3 ADD PUSH2 0xC53 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0xC80 JUMPI DUP4 PUSH1 0x40 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x40 ADD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x18D JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xEA 0x2D 0xEC CREATE LOG0 PUSH10 0xEA1D113E648EF6953701 BLOCKHASH MSTORE 0xD 0xFB RETURNDATACOPY CALLDATACOPY PUSH3 0xABF449 0xA6 0xE7 PUSH10 0xEFEF7564736F6C634300 MOD EXP STOP CALLER LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH24 0x5833D230436B742AB34E3BFCCF39D46480FC3F201417BB2C CALLDATASIZE DUP10 0xDF 0xC5 0xC4 GASLIMIT PUSH6 0x64736F6C6343 STOP MOD EXP STOP CALLER PUSH1 0xC0 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x192E CODESIZE SUB DUP1 PUSH2 0x192E DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH2 0x2F SWAP2 PUSH2 0x4C JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT PUSH1 0x60 SWAP2 DUP3 SHL AND PUSH1 0x80 MSTORE ADDRESS SWAP1 SHL PUSH1 0xA0 MSTORE PUSH2 0x7A JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x5D JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x73 JUMPI DUP2 DUP3 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x80 MLOAD PUSH1 0x60 SHR PUSH1 0xA0 MLOAD PUSH1 0x60 SHR PUSH2 0x1886 PUSH2 0xA8 PUSH1 0x0 CODECOPY DUP1 PUSH2 0x2C0 MSTORE POP DUP1 PUSH2 0x353 MSTORE DUP1 PUSH2 0x546 MSTORE POP PUSH2 0x1886 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 0x4C JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x8CF7934 EQ PUSH2 0x51 JUMPI DUP1 PUSH4 0xC9353CB5 EQ PUSH2 0x7A JUMPI DUP1 PUSH4 0xCCADF409 EQ PUSH2 0x8F JUMPI DUP1 PUSH4 0xD5F39488 EQ PUSH2 0xAF JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x64 PUSH2 0x5F CALLDATASIZE PUSH1 0x4 PUSH2 0x7DD JUMP JUMPDEST PUSH2 0xB7 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x71 SWAP2 SWAP1 PUSH2 0x962 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x8D PUSH2 0x88 CALLDATASIZE PUSH1 0x4 PUSH2 0x785 JUMP JUMPDEST PUSH2 0x2A8 JUMP JUMPDEST STOP JUMPDEST PUSH2 0xA2 PUSH2 0x9D CALLDATASIZE PUSH1 0x4 PUSH2 0x7A8 JUMP JUMPDEST PUSH2 0x339 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x71 SWAP2 SWAP1 PUSH2 0x89A JUMP JUMPDEST PUSH2 0xA2 PUSH2 0x544 JUMP JUMPDEST DUP1 MLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x4 DUP2 MSTORE PUSH1 0x24 DUP2 ADD SWAP1 SWAP2 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFB969B0A00000000000000000000000000000000000000000000000000000000 OR SWAP1 MSTORE PUSH1 0x0 SWAP2 PUSH2 0x11C SWAP2 PUSH2 0x568 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP4 ADD MLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x4 DUP2 MSTORE PUSH1 0x24 DUP2 ADD SWAP1 SWAP2 MSTORE SWAP2 DUP3 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFB969B0A00000000000000000000000000000000000000000000000000000000 OR SWAP1 MSTORE PUSH2 0x181 SWAP2 PUSH2 0x568 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x9DB64A4000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS SWAP1 PUSH4 0x9DB64A40 SWAP1 PUSH2 0x1E0 SWAP1 PUSH32 0xEE8BE1B00000000000000000000000000000000000000000000000000000000 SWAP1 PUSH1 0x0 SWAP1 PUSH1 0x4 ADD PUSH2 0x98F JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1FA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x20E JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH32 0xF2FDE38B00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS SWAP3 POP PUSH4 0xF2FDE38B SWAP2 POP PUSH2 0x24E SWAP1 DUP7 SWAP1 PUSH1 0x4 ADD PUSH2 0x89A JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x268 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x27C JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH32 0xD150751B00000000000000000000000000000000000000000000000000000000 SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH32 0x0 AND EQ PUSH2 0x320 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x317 SWAP1 PUSH2 0x9D7 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SELFDESTRUCT JUMPDEST PUSH1 0x0 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH32 0x0 AND EQ PUSH2 0x3AA JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x317 SWAP1 PUSH2 0x9D7 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x3B6 SWAP1 PUSH2 0x71A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 PUSH1 0x0 CREATE DUP1 ISZERO DUP1 ISZERO PUSH2 0x3D2 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP SWAP1 POP DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x73F208D5 ADDRESS PUSH4 0x8CF7934 PUSH1 0xE0 SHL DUP7 DUP7 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x40D SWAP3 SWAP2 SWAP1 PUSH2 0x8BB JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 DUP2 MSTORE PUSH1 0x20 DUP3 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP5 DUP6 AND OR SWAP1 MSTORE MLOAD PUSH1 0xE0 DUP6 SWAP1 SHL SWAP1 SWAP3 AND DUP3 MSTORE PUSH2 0x49E SWAP3 SWAP2 PUSH1 0x4 ADD PUSH2 0x8F4 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x4B8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x4CC JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH32 0xC9353CB500000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS SWAP3 POP PUSH4 0xC9353CB5 SWAP2 POP PUSH2 0x50C SWAP1 DUP7 SWAP1 PUSH1 0x4 ADD PUSH2 0x89A JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x526 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x53A JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 PUSH1 0x40 MLOAD PUSH2 0x591 SWAP2 SWAP1 PUSH2 0x82F JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 GAS DELEGATECALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x5CC 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 0x5D1 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP2 POP SWAP2 POP DUP2 ISZERO DUP1 PUSH2 0x5E5 JUMPI POP DUP1 MLOAD PUSH1 0x20 EQ ISZERO JUMPDEST DUP1 PUSH2 0x647 JUMPI POP DUP1 MLOAD PUSH32 0xD150751B00000000000000000000000000000000000000000000000000000000 SWAP1 PUSH2 0x622 SWAP1 DUP4 ADD PUSH1 0x20 SWAP1 DUP2 ADD SWAP1 DUP5 ADD PUSH2 0x7EF JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 AND EQ ISZERO JUMPDEST ISZERO PUSH2 0x65E JUMPI PUSH2 0x65E PUSH2 0x659 DUP6 DUP4 PUSH2 0x664 JUMP JUMPDEST PUSH2 0x712 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x40 MLOAD PUSH2 0x672 SWAP1 PUSH2 0x84B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 KECCAK256 DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x68D SWAP3 SWAP2 SWAP1 PUSH2 0x8F4 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 PUSH2 0xDF1 DUP1 PUSH2 0xA60 DUP4 CODECOPY ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x738 JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x40 DUP2 ADD DUP2 DUP2 LT PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT OR ISZERO PUSH2 0x757 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP1 POP DUP1 DUP3 CALLDATALOAD PUSH2 0x768 DUP2 PUSH2 0xA3A JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x778 DUP2 PUSH2 0xA3A JUMP JUMPDEST PUSH1 0x20 SWAP2 SWAP1 SWAP2 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x796 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x7A1 DUP2 PUSH2 0xA3A JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x60 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x7BA JUMPI DUP1 DUP2 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x7C5 DUP2 PUSH2 0xA3A JUMP JUMPDEST SWAP2 POP PUSH2 0x7D4 DUP5 PUSH1 0x20 DUP6 ADD PUSH2 0x727 JUMP JUMPDEST SWAP1 POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x60 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x7BA JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x800 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 DUP2 AND DUP2 EQ PUSH2 0x7A1 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 DUP3 MLOAD PUSH2 0x841 DUP2 DUP5 PUSH1 0x20 DUP8 ADD PUSH2 0xA0E JUMP JUMPDEST SWAP2 SWAP1 SWAP2 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x426F6F74737472617043616C6C4661696C65644572726F722861646472657373 DUP2 MSTORE PUSH32 0x2C62797465732900000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x27 ADD SWAP1 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP3 DUP4 AND DUP2 MSTORE DUP2 MLOAD DUP4 AND PUSH1 0x20 DUP1 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE SWAP1 SWAP2 ADD MLOAD SWAP1 SWAP2 AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 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 0x92F DUP2 PUSH1 0x60 DUP6 ADD PUSH1 0x20 DUP8 ADD PUSH2 0xA0E JUMP JUMPDEST PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND SWAP2 SWAP1 SWAP2 ADD PUSH1 0x60 ADD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP3 SWAP1 SWAP3 AND DUP3 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x1F SWAP1 DUP3 ADD MSTORE PUSH32 0x496E697469616C4D6967726174696F6E2F494E56414C49445F53454E44455200 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xA29 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xA11 JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x65E JUMPI POP POP PUSH1 0x0 SWAP2 ADD MSTORE JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0xA5C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x0 CALLER PUSH1 0x40 MLOAD PUSH2 0x20 SWAP1 PUSH2 0xCF JUMP JUMPDEST PUSH2 0x2A SWAP2 SWAP1 PUSH2 0xDC JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 PUSH1 0x0 CREATE DUP1 ISZERO DUP1 ISZERO PUSH2 0x46 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP SWAP1 POP DUP1 PUSH2 0x5C PUSH2 0x97 PUSH1 0x20 SHL PUSH2 0x2D4 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 0xF0 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0xAE PUSH1 0x0 PUSH2 0xB4 PUSH1 0x20 SHL PUSH2 0x2E7 OR PUSH1 0x20 SHR JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 PUSH1 0x4 DUP2 GT ISZERO PUSH2 0xC4 JUMPI INVALID JUMPDEST PUSH1 0x1 ADD SWAP1 SHL SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x825 DUP1 PUSH2 0x5CC DUP4 CODECOPY ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH2 0x4CD DUP1 PUSH2 0xFF 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 0x13E JUMPI PUSH2 0x29 JUMP JUMPDEST CALLDATASIZE PUSH2 0x29 JUMPI STOP JUMPDEST PUSH1 0x0 PUSH2 0x75 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 PUSH4 0xFFFFFFFF PUSH2 0x174 AND SWAP1 POP JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x82 DUP3 PUSH2 0x1C0 JUMP JUMPDEST SWAP1 POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH2 0xB0 JUMPI PUSH2 0xB0 PUSH2 0xAB DUP4 PUSH2 0x219 JUMP JUMPDEST PUSH2 0x2C4 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x0 CALLDATASIZE PUSH1 0x40 MLOAD PUSH2 0xDC SWAP3 SWAP2 SWAP1 PUSH2 0x3EE JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 GAS DELEGATECALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x117 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 0x11C JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP2 POP SWAP2 POP DUP2 PUSH2 0x12F JUMPI PUSH2 0x12F DUP2 PUSH2 0x2C4 JUMP JUMPDEST PUSH2 0x138 DUP2 PUSH2 0x2CC JUMP JUMPDEST POP POP POP POP STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x14A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x15E PUSH2 0x159 CALLDATASIZE PUSH1 0x4 PUSH2 0x3A7 JUMP JUMPDEST PUSH2 0x1C0 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x16B SWAP2 SWAP1 PUSH2 0x427 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x4 ADD DUP4 MLOAD LT ISZERO PUSH2 0x195 JUMPI PUSH2 0x195 PUSH2 0xAB PUSH1 0x3 DUP6 MLOAD DUP6 PUSH1 0x4 ADD PUSH2 0x302 JUMP JUMPDEST POP ADD PUSH1 0x20 ADD MLOAD PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 AND SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1CA PUSH2 0x2D4 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 PUSH1 0x40 MLOAD PUSH2 0x227 SWAP1 PUSH2 0x3FE JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 KECCAK256 DUP3 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x240 SWAP2 SWAP1 PUSH2 0x448 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 0x2E1 PUSH1 0x0 PUSH2 0x2E7 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 PUSH1 0x4 DUP2 GT ISZERO PUSH2 0x2F7 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 0x321 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x475 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 0x3B8 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 DUP2 AND DUP2 EQ PUSH2 0x3E7 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 PUSH32 0x4E6F74496D706C656D656E7465644572726F7228627974657334290000000000 DUP2 MSTORE PUSH1 0x1B ADD SWAP1 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 0x483 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 SHR PUSH11 0x33632AA53D272B4B5F8556 PUSH5 0x45A4B77E28 POP POP 0xD 0xCB SWAP5 PUSH7 0x842CCA1B4D3D73 PUSH5 0x736F6C6343 STOP MOD EXP STOP CALLER PUSH1 0xE0 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x825 CODESIZE SUB DUP1 PUSH2 0x825 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 0x76A PUSH2 0xBB PUSH1 0x0 CODECOPY DUP1 PUSH1 0xE2 MSTORE DUP1 PUSH2 0x110 MSTORE POP DUP1 PUSH2 0x1D7 MSTORE POP DUP1 PUSH1 0x70 MSTORE DUP1 PUSH1 0x9E MSTORE POP PUSH2 0x76A 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 0x48D JUMP JUMPDEST PUSH2 0xCA JUMP JUMPDEST CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH32 0x0 AND EQ PUSH2 0xC7 JUMPI PUSH2 0xC7 PUSH2 0xC2 CALLER PUSH32 0x0 PUSH2 0x27B JUMP JUMPDEST PUSH2 0x329 JUMP JUMPDEST CALLER SELFDESTRUCT JUMPDEST CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH32 0x0 AND EQ PUSH2 0x134 JUMPI PUSH2 0x134 PUSH2 0xC2 CALLER PUSH32 0x0 PUSH2 0x331 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x13E PUSH2 0x33F 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 0x21E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x232 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH2 0x276 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 0x352 SWAP3 POP POP POP JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x40 MLOAD PUSH2 0x289 SWAP1 PUSH2 0x586 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 KECCAK256 DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x2A4 SWAP3 SWAP2 SWAP1 PUSH2 0x673 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 PUSH1 0x40 MLOAD PUSH2 0x289 SWAP1 PUSH2 0x5D5 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x34C PUSH1 0x0 PUSH2 0x449 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 PUSH1 0x40 MLOAD PUSH2 0x37B SWAP2 SWAP1 PUSH2 0x56A JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 GAS DELEGATECALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x3B6 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 0x3BB JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP2 POP SWAP2 POP DUP2 ISZERO DUP1 PUSH2 0x3CF JUMPI POP DUP1 MLOAD PUSH1 0x20 EQ ISZERO JUMPDEST DUP1 PUSH2 0x431 JUMPI POP DUP1 MLOAD PUSH32 0xD150751B00000000000000000000000000000000000000000000000000000000 SWAP1 PUSH2 0x40C SWAP1 DUP4 ADD PUSH1 0x20 SWAP1 DUP2 ADD SWAP1 DUP5 ADD PUSH2 0x523 JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 AND EQ ISZERO JUMPDEST ISZERO PUSH2 0x443 JUMPI PUSH2 0x443 PUSH2 0xC2 DUP6 DUP4 PUSH2 0x464 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 PUSH1 0x4 DUP2 GT ISZERO PUSH2 0x459 JUMPI INVALID JUMPDEST PUSH1 0x1 ADD SWAP1 SHL SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x40 MLOAD PUSH2 0x472 SWAP1 PUSH2 0x624 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 KECCAK256 DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x2A4 SWAP3 SWAP2 SWAP1 PUSH2 0x69A JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x40 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x4A1 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x4C4 JUMPI DUP4 DUP5 REVERT JUMPDEST SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x4E0 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP7 ADD DUP8 PUSH1 0x1F DUP3 ADD SLT PUSH2 0x4F1 JUMPI DUP5 DUP6 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP3 POP DUP2 DUP4 GT ISZERO PUSH2 0x501 JUMPI DUP5 DUP6 REVERT JUMPDEST DUP8 PUSH1 0x20 DUP5 DUP4 ADD ADD GT ISZERO PUSH2 0x512 JUMPI DUP5 DUP6 REVERT JUMPDEST SWAP5 SWAP8 PUSH1 0x20 SWAP1 SWAP6 ADD SWAP7 POP SWAP1 SWAP5 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x534 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 DUP2 AND DUP2 EQ PUSH2 0x563 JUMPI DUP2 DUP3 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 MLOAD PUSH2 0x57C DUP2 DUP5 PUSH1 0x20 DUP8 ADD PUSH2 0x708 JUMP JUMPDEST SWAP2 SWAP1 SWAP2 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x496E76616C696444696543616C6C65724572726F7228616464726573732C6164 DUP2 MSTORE PUSH32 0x6472657373290000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x26 ADD SWAP1 JUMP JUMPDEST PUSH32 0x496E76616C6964426F6F74737472617043616C6C65724572726F722861646472 DUP2 MSTORE PUSH32 0x6573732C61646472657373290000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x2C ADD SWAP1 JUMP JUMPDEST PUSH32 0x426F6F74737472617043616C6C4661696C65644572726F722861646472657373 DUP2 MSTORE PUSH32 0x2C62797465732900000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x27 ADD SWAP1 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP3 DUP4 AND DUP2 MSTORE SWAP2 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP5 AND DUP3 MSTORE PUSH1 0x40 PUSH1 0x20 DUP4 ADD MSTORE DUP3 MLOAD DUP1 PUSH1 0x40 DUP5 ADD MSTORE PUSH2 0x6D5 DUP2 PUSH1 0x60 DUP6 ADD PUSH1 0x20 DUP8 ADD PUSH2 0x708 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 0x723 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x70B JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x443 JUMPI POP POP PUSH1 0x0 SWAP2 ADD MSTORE JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 BYTE PUSH2 0x1512 0x26 0xD6 0xD9 0xA9 CALLER PUSH9 0x8CC4B3CB691C3DAE89 SWAP11 0x5E SWAP9 JUMPDEST PUSH17 0x65B9EF15B7B22D8E64736F6C634300060A STOP CALLER LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 STOP 0xE3 SWAP10 SWAP12 PUSH7 0xF9AD5C613A3AC3 CREATE2 PUSH11 0x52A2EB8A487DAA09AB0EF7 LOG4 MSTORE8 SELFDESTRUCT 0xE3 0xEB CALLDATASIZE DUP5 PUSH5 0x736F6C6343 STOP MOD EXP STOP CALLER ",
"sourceMap": "931:4366:25:-:0;;;1701:267;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1769:20:25;;;;;;;1926:35;;1955:4;;1926:35;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1906:17:25;:55;;-1:-1:-1;;;;;;1906:55:25;-1:-1:-1;;;;;1906:55:25;;;;;;;;;;-1:-1:-1;931:4366:25;;;;;;;;;;:::o;162:279:-1:-;;285:2;273:9;264:7;260:23;256:32;253:2;;;-1:-1;;291:12;253:2;91:13;;-1:-1;;;;;1063:54;;1196:43;;1186:2;;-1:-1;;1243:12;1186:2;343:82;247:194;-1:-1;;;247:194;568:222;-1:-1;;;;;1063:54;;;;519:37;;695:2;680:18;;666:124;;931:4366:25;;;;;;;;;;;"
},
"deployedBytecode": {
"immutableReferences": {
"3134": [
{
"length": 32,
"start": 166
},
{
"length": 32,
"start": 805
}
]
},
"linkReferences": {},
"object": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c80633df79a9f14610046578063c9353cb51461006f578063d5f3948814610084575b600080fd5b6100596100543660046106e3565b61008c565b60405161006691906107f6565b60405180910390f35b61008261007d3660046106c0565b6102d1565b005b610059610323565b60003373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610106576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100fd906108e9565b60405180910390fd5b600054604080518082018252855173ffffffffffffffffffffffffffffffffffffffff908116825260208088015182169083015291517fccadf409000000000000000000000000000000000000000000000000000000008152919092169163ccadf40991610178913091600401610817565b602060405180830381600087803b15801561019257600080fd5b505af11580156101a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101ca91906107da565b90506101d881858585610347565b6040517ff2fde38b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82169063f2fde38b9061022a9087906004016107f6565b600060405180830381600087803b15801561024457600080fd5b505af1158015610258573d6000803e3d6000fd5b50506040517fc9353cb500000000000000000000000000000000000000000000000000000000815230925063c9353cb591506102989087906004016107f6565b600060405180830381600087803b1580156102b257600080fd5b505af11580156102c6573d6000803e3d6000fd5b505050509392505050565b33301461030a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100fd906108e9565b8073ffffffffffffffffffffffffffffffffffffffff16ff5b7f000000000000000000000000000000000000000000000000000000000000000081565b6040518490600090610358906106a2565b604051809103906000f080158015610374573d6000803e3d6000fd5b506040517f42f1181e00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff8216906342f1181e906103ca9089906004016107f6565b600060405180830381600087803b1580156103e457600080fd5b505af11580156103f8573d6000803e3d6000fd5b50506040517ff2fde38b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416925063f2fde38b915061044e9088906004016107f6565b600060405180830381600087803b15801561046857600080fd5b505af115801561047c573d6000803e3d6000fd5b505050508173ffffffffffffffffffffffffffffffffffffffff1663261fe679856040015163ce5494bb60e01b846040516024016104ba91906107f6565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e085901b909216825261054d92913090600401610850565b600060405180830381600087803b15801561056757600080fd5b505af115801561057b573d6000803e3d6000fd5b5050506060850151845160405173ffffffffffffffffffffffffffffffffffffffff8616945063261fe67993507fce5494bb00000000000000000000000000000000000000000000000000000000916105d6916024016107f6565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009485161790525160e085901b909216825261066992913090600401610850565b600060405180830381600087803b15801561068357600080fd5b505af1158015610697573d6000803e3d6000fd5b505050505050505050565b610d4c8061096d83390190565b80356106ba81610947565b92915050565b6000602082840312156106d1578081fd5b81356106dc81610947565b9392505050565b600080600083850360c08112156106f8578283fd5b843561070381610947565b935060807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082011215610734578283fd5b61073e6080610920565b602086013561074c81610947565b815261075b87604088016106af565b602082015261076d87606088016106af565b604082015261077f87608088016106af565b6060820152925060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60820112156107b5578182fd5b506107c06020610920565b6107cd8660a087016106af565b8152809150509250925092565b6000602082840312156107eb578081fd5b81516106dc81610947565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff92831681528151831660208083019190915290910151909116604082015260600190565b600073ffffffffffffffffffffffffffffffffffffffff808616835260206060818501528551806060860152835b8181101561089a5787810183015186820160800152820161087e565b818111156108ab5784608083880101525b509490911660408401525050601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160160800192915050565b6020808252601c908201527f46756c6c4d6967726174696f6e2f494e56414c49445f53454e44455200000000604082015260600190565b60405181810167ffffffffffffffff8111828210171561093f57600080fd5b604052919050565b73ffffffffffffffffffffffffffffffffffffffff8116811461096957600080fd5b5056fe608060405234801561001057600080fd5b50600080546001600160a01b03191633179055610d1a806100326000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c80639ad2674411610076578063bca8c7b51161005b578063bca8c7b514610134578063d39de6e914610154578063f2fde38b14610169576100a3565b80639ad2674414610101578063b918161114610114576100a3565b806342f1181e146100a8578063494503d4146100bd57806370712939146100e65780638da5cb5b146100f9575b600080fd5b6100bb6100b6366004610aa2565b61017c565b005b6100d06100cb366004610b6e565b610190565b6040516100dd9190610b96565b60405180910390f35b6100bb6100f4366004610aa2565b6101c4565b6100d061027e565b6100bb61010f366004610b43565b61029a565b610127610122366004610aa2565b6102ac565b6040516100dd9190610c38565b610147610142366004610ac5565b6102c1565b6040516100dd9190610c43565b61015c610351565b6040516100dd9190610bde565b6100bb610177366004610aa2565b6103c0565b610184610463565b61018d816104ac565b50565b6002818154811061019d57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b6101cc610463565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff1661020a5761020a610205826105dd565b61067c565b60005b60025481101561027a578173ffffffffffffffffffffffffffffffffffffffff166002828154811061023b57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614156102725761026d8282610684565b61027a565b60010161020d565b5050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6102a2610463565b61027a8282610684565b60016020526000908152604090205460ff1681565b60606102cb6108ff565b60008473ffffffffffffffffffffffffffffffffffffffff1684846040516102f4929190610b86565b6000604051808303816000865af19150503d8060008114610331576040519150601f19603f3d011682016040523d82523d6000602084013e610336565b606091505b509250905080610349576103498261067c565b509392505050565b606060028054806020026020016040519081016040528092919081815260200182805480156103b657602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff16815260019091019060200180831161038b575b5050505050905090565b6103c8610463565b73ffffffffffffffffffffffffffffffffffffffff81166103f3576103ee610205610922565b61018d565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b60005473ffffffffffffffffffffffffffffffffffffffff1633146104aa576000546104aa9061020590339073ffffffffffffffffffffffffffffffffffffffff16610959565b565b73ffffffffffffffffffffffffffffffffffffffff81166104d2576104d26102056109fb565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff161561050c5761050c61020582610a32565b73ffffffffffffffffffffffffffffffffffffffff8116600081815260016020819052604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168317905560028054928301815583527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001684179055513392917f3147867c59d17e8fa9d522465651d44aae0a9e38f902f3475b97e58072f0ed4c91a350565b606063eb5108a260e01b826040516024016105f89190610b96565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529050919050565b805160208201fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604090205460ff166106bd576106bd610205836105dd565b60025481106106d8576106d861020582600280549050610a4d565b8173ffffffffffffffffffffffffffffffffffffffff16600282815481106106fc57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff161461075e5761075e6102056002838154811061073657fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1684610a6a565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81019081106107d957fe5b6000918252602090912001546002805473ffffffffffffffffffffffffffffffffffffffff909216918390811061080c57fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600280548061085f57fe5b60008281526020812082017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055909101909155604051339173ffffffffffffffffffffffffffffffffffffffff8516917f1f32c1b084e2de0713b8fb16bd46bb9df710a3dbeae2f3ca93af46e016dcc6b09190a35050565b3360009081526001602052604090205460ff166104aa576104aa61020533610a87565b60408051808201909152600481527fe69edc3e00000000000000000000000000000000000000000000000000000000602082015290565b6060631de45ad160e01b8383604051602401610976929190610bb7565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905092915050565b60408051808201909152600481527f57654fe400000000000000000000000000000000000000000000000000000000602082015290565b606063de16f1a060e01b826040516024016105f89190610b96565b606063e9f8377160e01b8383604051602401610976929190610cb4565b606063140a84db60e01b8383604051602401610976929190610bb7565b606063b65a25b960e01b826040516024016105f89190610b96565b600060208284031215610ab3578081fd5b8135610abe81610cc2565b9392505050565b600080600060408486031215610ad9578182fd5b8335610ae481610cc2565b9250602084013567ffffffffffffffff80821115610b00578384fd5b81860187601f820112610b11578485fd5b8035925081831115610b21578485fd5b876020848301011115610b32578485fd5b949760209095019650909450505050565b60008060408385031215610b55578182fd5b8235610b6081610cc2565b946020939093013593505050565b600060208284031215610b7f578081fd5b5035919050565b6000828483379101908152919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b6020808252825182820181905260009190848201906040850190845b81811015610c2c57835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101610bfa565b50909695505050505050565b901515815260200190565b6000602080835283518082850152825b81811015610c6f57858101830151858201604001528201610c53565b81811115610c805783604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b918252602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff8116811461018d57600080fdfea2646970667358221220ea2decf0a069ea1d113e648ef695370140520dfb3e3762abf449a6e769efef7564736f6c634300060a0033a2646970667358221220775833d230436b742ab34e3bfccf39d46480fc3f201417bb2c3689dfc5c4456564736f6c634300060a0033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x41 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x3DF79A9F EQ PUSH2 0x46 JUMPI DUP1 PUSH4 0xC9353CB5 EQ PUSH2 0x6F JUMPI DUP1 PUSH4 0xD5F39488 EQ PUSH2 0x84 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x59 PUSH2 0x54 CALLDATASIZE PUSH1 0x4 PUSH2 0x6E3 JUMP JUMPDEST PUSH2 0x8C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x66 SWAP2 SWAP1 PUSH2 0x7F6 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x82 PUSH2 0x7D CALLDATASIZE PUSH1 0x4 PUSH2 0x6C0 JUMP JUMPDEST PUSH2 0x2D1 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x59 PUSH2 0x323 JUMP JUMPDEST PUSH1 0x0 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH32 0x0 AND EQ PUSH2 0x106 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xFD SWAP1 PUSH2 0x8E9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE DUP6 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 DUP2 AND DUP3 MSTORE PUSH1 0x20 DUP1 DUP9 ADD MLOAD DUP3 AND SWAP1 DUP4 ADD MSTORE SWAP2 MLOAD PUSH32 0xCCADF40900000000000000000000000000000000000000000000000000000000 DUP2 MSTORE SWAP2 SWAP1 SWAP3 AND SWAP2 PUSH4 0xCCADF409 SWAP2 PUSH2 0x178 SWAP2 ADDRESS SWAP2 PUSH1 0x4 ADD PUSH2 0x817 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x192 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x1A6 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x1CA SWAP2 SWAP1 PUSH2 0x7DA JUMP JUMPDEST SWAP1 POP PUSH2 0x1D8 DUP2 DUP6 DUP6 DUP6 PUSH2 0x347 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0xF2FDE38B00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 PUSH4 0xF2FDE38B SWAP1 PUSH2 0x22A SWAP1 DUP8 SWAP1 PUSH1 0x4 ADD PUSH2 0x7F6 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x244 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x258 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH32 0xC9353CB500000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS SWAP3 POP PUSH4 0xC9353CB5 SWAP2 POP PUSH2 0x298 SWAP1 DUP8 SWAP1 PUSH1 0x4 ADD PUSH2 0x7F6 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x2B2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x2C6 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0x30A JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xFD SWAP1 PUSH2 0x8E9 JUMP JUMPDEST DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SELFDESTRUCT JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP5 SWAP1 PUSH1 0x0 SWAP1 PUSH2 0x358 SWAP1 PUSH2 0x6A2 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 PUSH1 0x0 CREATE DUP1 ISZERO DUP1 ISZERO PUSH2 0x374 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH32 0x42F1181E00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE SWAP1 SWAP2 POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 PUSH4 0x42F1181E SWAP1 PUSH2 0x3CA SWAP1 DUP10 SWAP1 PUSH1 0x4 ADD PUSH2 0x7F6 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x3E4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x3F8 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH32 0xF2FDE38B00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP5 AND SWAP3 POP PUSH4 0xF2FDE38B SWAP2 POP PUSH2 0x44E SWAP1 DUP9 SWAP1 PUSH1 0x4 ADD PUSH2 0x7F6 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x468 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x47C JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x261FE679 DUP6 PUSH1 0x40 ADD MLOAD PUSH4 0xCE5494BB PUSH1 0xE0 SHL DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x4BA SWAP2 SWAP1 PUSH2 0x7F6 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 DUP2 MSTORE PUSH1 0x20 DUP3 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP5 DUP6 AND OR SWAP1 MSTORE MLOAD PUSH1 0xE0 DUP6 SWAP1 SHL SWAP1 SWAP3 AND DUP3 MSTORE PUSH2 0x54D SWAP3 SWAP2 ADDRESS SWAP1 PUSH1 0x4 ADD PUSH2 0x850 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x567 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x57B JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP PUSH1 0x60 DUP6 ADD MLOAD DUP5 MLOAD PUSH1 0x40 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP7 AND SWAP5 POP PUSH4 0x261FE679 SWAP4 POP PUSH32 0xCE5494BB00000000000000000000000000000000000000000000000000000000 SWAP2 PUSH2 0x5D6 SWAP2 PUSH1 0x24 ADD PUSH2 0x7F6 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 DUP2 MSTORE PUSH1 0x20 DUP3 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP5 DUP6 AND OR SWAP1 MSTORE MLOAD PUSH1 0xE0 DUP6 SWAP1 SHL SWAP1 SWAP3 AND DUP3 MSTORE PUSH2 0x669 SWAP3 SWAP2 ADDRESS SWAP1 PUSH1 0x4 ADD PUSH2 0x850 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x683 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x697 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH2 0xD4C DUP1 PUSH2 0x96D DUP4 CODECOPY ADD SWAP1 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH2 0x6BA DUP2 PUSH2 0x947 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x6D1 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x6DC DUP2 PUSH2 0x947 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP4 DUP6 SUB PUSH1 0xC0 DUP2 SLT ISZERO PUSH2 0x6F8 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP5 CALLDATALOAD PUSH2 0x703 DUP2 PUSH2 0x947 JUMP JUMPDEST SWAP4 POP PUSH1 0x80 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP3 ADD SLT ISZERO PUSH2 0x734 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x73E PUSH1 0x80 PUSH2 0x920 JUMP JUMPDEST PUSH1 0x20 DUP7 ADD CALLDATALOAD PUSH2 0x74C DUP2 PUSH2 0x947 JUMP JUMPDEST DUP2 MSTORE PUSH2 0x75B DUP8 PUSH1 0x40 DUP9 ADD PUSH2 0x6AF JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0x76D DUP8 PUSH1 0x60 DUP9 ADD PUSH2 0x6AF JUMP JUMPDEST PUSH1 0x40 DUP3 ADD MSTORE PUSH2 0x77F DUP8 PUSH1 0x80 DUP9 ADD PUSH2 0x6AF JUMP JUMPDEST PUSH1 0x60 DUP3 ADD MSTORE SWAP3 POP PUSH1 0x20 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF60 DUP3 ADD SLT ISZERO PUSH2 0x7B5 JUMPI DUP2 DUP3 REVERT JUMPDEST POP PUSH2 0x7C0 PUSH1 0x20 PUSH2 0x920 JUMP JUMPDEST PUSH2 0x7CD DUP7 PUSH1 0xA0 DUP8 ADD PUSH2 0x6AF JUMP JUMPDEST DUP2 MSTORE DUP1 SWAP2 POP POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x7EB JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x6DC DUP2 PUSH2 0x947 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP3 DUP4 AND DUP2 MSTORE DUP2 MLOAD DUP4 AND PUSH1 0x20 DUP1 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE SWAP1 SWAP2 ADD MLOAD SWAP1 SWAP2 AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP7 AND DUP4 MSTORE PUSH1 0x20 PUSH1 0x60 DUP2 DUP6 ADD MSTORE DUP6 MLOAD DUP1 PUSH1 0x60 DUP7 ADD MSTORE DUP4 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x89A JUMPI DUP8 DUP2 ADD DUP4 ADD MLOAD DUP7 DUP3 ADD PUSH1 0x80 ADD MSTORE DUP3 ADD PUSH2 0x87E JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0x8AB JUMPI DUP5 PUSH1 0x80 DUP4 DUP9 ADD ADD MSTORE JUMPDEST POP SWAP5 SWAP1 SWAP2 AND PUSH1 0x40 DUP5 ADD MSTORE POP POP PUSH1 0x1F SWAP2 SWAP1 SWAP2 ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND ADD PUSH1 0x80 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x1C SWAP1 DUP3 ADD MSTORE PUSH32 0x46756C6C4D6967726174696F6E2F494E56414C49445F53454E44455200000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x93F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x969 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND CALLER OR SWAP1 SSTORE PUSH2 0xD1A DUP1 PUSH2 0x32 PUSH1 0x0 CODECOPY 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 0xA3 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x9AD26744 GT PUSH2 0x76 JUMPI DUP1 PUSH4 0xBCA8C7B5 GT PUSH2 0x5B JUMPI DUP1 PUSH4 0xBCA8C7B5 EQ PUSH2 0x134 JUMPI DUP1 PUSH4 0xD39DE6E9 EQ PUSH2 0x154 JUMPI DUP1 PUSH4 0xF2FDE38B EQ PUSH2 0x169 JUMPI PUSH2 0xA3 JUMP JUMPDEST DUP1 PUSH4 0x9AD26744 EQ PUSH2 0x101 JUMPI DUP1 PUSH4 0xB9181611 EQ PUSH2 0x114 JUMPI PUSH2 0xA3 JUMP JUMPDEST DUP1 PUSH4 0x42F1181E EQ PUSH2 0xA8 JUMPI DUP1 PUSH4 0x494503D4 EQ PUSH2 0xBD JUMPI DUP1 PUSH4 0x70712939 EQ PUSH2 0xE6 JUMPI DUP1 PUSH4 0x8DA5CB5B EQ PUSH2 0xF9 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xBB PUSH2 0xB6 CALLDATASIZE PUSH1 0x4 PUSH2 0xAA2 JUMP JUMPDEST PUSH2 0x17C JUMP JUMPDEST STOP JUMPDEST PUSH2 0xD0 PUSH2 0xCB CALLDATASIZE PUSH1 0x4 PUSH2 0xB6E JUMP JUMPDEST PUSH2 0x190 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xDD SWAP2 SWAP1 PUSH2 0xB96 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xBB PUSH2 0xF4 CALLDATASIZE PUSH1 0x4 PUSH2 0xAA2 JUMP JUMPDEST PUSH2 0x1C4 JUMP JUMPDEST PUSH2 0xD0 PUSH2 0x27E JUMP JUMPDEST PUSH2 0xBB PUSH2 0x10F CALLDATASIZE PUSH1 0x4 PUSH2 0xB43 JUMP JUMPDEST PUSH2 0x29A JUMP JUMPDEST PUSH2 0x127 PUSH2 0x122 CALLDATASIZE PUSH1 0x4 PUSH2 0xAA2 JUMP JUMPDEST PUSH2 0x2AC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xDD SWAP2 SWAP1 PUSH2 0xC38 JUMP JUMPDEST PUSH2 0x147 PUSH2 0x142 CALLDATASIZE PUSH1 0x4 PUSH2 0xAC5 JUMP JUMPDEST PUSH2 0x2C1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xDD SWAP2 SWAP1 PUSH2 0xC43 JUMP JUMPDEST PUSH2 0x15C PUSH2 0x351 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xDD SWAP2 SWAP1 PUSH2 0xBDE JUMP JUMPDEST PUSH2 0xBB PUSH2 0x177 CALLDATASIZE PUSH1 0x4 PUSH2 0xAA2 JUMP JUMPDEST PUSH2 0x3C0 JUMP JUMPDEST PUSH2 0x184 PUSH2 0x463 JUMP JUMPDEST PUSH2 0x18D DUP2 PUSH2 0x4AC JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x2 DUP2 DUP2 SLOAD DUP2 LT PUSH2 0x19D JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP DUP2 JUMP JUMPDEST PUSH2 0x1CC PUSH2 0x463 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND PUSH2 0x20A JUMPI PUSH2 0x20A PUSH2 0x205 DUP3 PUSH2 0x5DD JUMP JUMPDEST PUSH2 0x67C JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH1 0x2 SLOAD DUP2 LT ISZERO PUSH2 0x27A JUMPI DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x2 DUP3 DUP2 SLOAD DUP2 LT PUSH2 0x23B JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO PUSH2 0x272 JUMPI PUSH2 0x26D DUP3 DUP3 PUSH2 0x684 JUMP JUMPDEST PUSH2 0x27A JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x20D JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH2 0x2A2 PUSH2 0x463 JUMP JUMPDEST PUSH2 0x27A DUP3 DUP3 PUSH2 0x684 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND DUP2 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x2CB PUSH2 0x8FF JUMP JUMPDEST PUSH1 0x0 DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP5 DUP5 PUSH1 0x40 MLOAD PUSH2 0x2F4 SWAP3 SWAP2 SWAP1 PUSH2 0xB86 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP7 GAS CALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x331 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 0x336 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP3 POP SWAP1 POP DUP1 PUSH2 0x349 JUMPI PUSH2 0x349 DUP3 PUSH2 0x67C JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x2 DUP1 SLOAD DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD DUP1 ISZERO PUSH2 0x3B6 JUMPI PUSH1 0x20 MUL DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x1 SWAP1 SWAP2 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x38B JUMPI JUMPDEST POP POP POP POP POP SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x3C8 PUSH2 0x463 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH2 0x3F3 JUMPI PUSH2 0x3EE PUSH2 0x205 PUSH2 0x922 JUMP JUMPDEST PUSH2 0x18D JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND SWAP1 DUP2 OR DUP3 SSTORE PUSH1 0x40 MLOAD SWAP1 SWAP2 CALLER SWAP2 PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 SWAP2 SWAP1 LOG3 POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER EQ PUSH2 0x4AA JUMPI PUSH1 0x0 SLOAD PUSH2 0x4AA SWAP1 PUSH2 0x205 SWAP1 CALLER SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x959 JUMP JUMPDEST JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH2 0x4D2 JUMPI PUSH2 0x4D2 PUSH2 0x205 PUSH2 0x9FB JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x50C JUMPI PUSH2 0x50C PUSH2 0x205 DUP3 PUSH2 0xA32 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND DUP4 OR SWAP1 SSTORE PUSH1 0x2 DUP1 SLOAD SWAP3 DUP4 ADD DUP2 SSTORE DUP4 MSTORE PUSH32 0x405787FA12A823E0F2B7631CC41B3BA8828B3321CA811111FA75CD3AA3BB5ACE SWAP1 SWAP2 ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND DUP5 OR SWAP1 SSTORE MLOAD CALLER SWAP3 SWAP2 PUSH32 0x3147867C59D17E8FA9D522465651D44AAE0A9E38F902F3475B97E58072F0ED4C SWAP2 LOG3 POP JUMP JUMPDEST PUSH1 0x60 PUSH4 0xEB5108A2 PUSH1 0xE0 SHL DUP3 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x5F8 SWAP2 SWAP1 PUSH2 0xB96 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 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND PUSH2 0x6BD JUMPI PUSH2 0x6BD PUSH2 0x205 DUP4 PUSH2 0x5DD JUMP JUMPDEST PUSH1 0x2 SLOAD DUP2 LT PUSH2 0x6D8 JUMPI PUSH2 0x6D8 PUSH2 0x205 DUP3 PUSH1 0x2 DUP1 SLOAD SWAP1 POP PUSH2 0xA4D JUMP JUMPDEST DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x2 DUP3 DUP2 SLOAD DUP2 LT PUSH2 0x6FC JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x75E JUMPI PUSH2 0x75E PUSH2 0x205 PUSH1 0x2 DUP4 DUP2 SLOAD DUP2 LT PUSH2 0x736 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP5 PUSH2 0xA6A JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND SWAP1 SSTORE PUSH1 0x2 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 ADD SWAP1 DUP2 LT PUSH2 0x7D9 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH1 0x2 DUP1 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND SWAP2 DUP4 SWAP1 DUP2 LT PUSH2 0x80C JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP PUSH1 0x2 DUP1 SLOAD DUP1 PUSH2 0x85F JUMPI INVALID JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 KECCAK256 DUP3 ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 DUP2 ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND SWAP1 SSTORE SWAP1 SWAP2 ADD SWAP1 SWAP2 SSTORE PUSH1 0x40 MLOAD CALLER SWAP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP6 AND SWAP2 PUSH32 0x1F32C1B084E2DE0713B8FB16BD46BB9DF710A3DBEAE2F3CA93AF46E016DCC6B0 SWAP2 SWAP1 LOG3 POP POP JUMP JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND PUSH2 0x4AA JUMPI PUSH2 0x4AA PUSH2 0x205 CALLER PUSH2 0xA87 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x4 DUP2 MSTORE PUSH32 0xE69EDC3E00000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH4 0x1DE45AD1 PUSH1 0xE0 SHL DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x976 SWAP3 SWAP2 SWAP1 PUSH2 0xBB7 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 PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x4 DUP2 MSTORE PUSH32 0x57654FE400000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH4 0xDE16F1A0 PUSH1 0xE0 SHL DUP3 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x5F8 SWAP2 SWAP1 PUSH2 0xB96 JUMP JUMPDEST PUSH1 0x60 PUSH4 0xE9F83771 PUSH1 0xE0 SHL DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x976 SWAP3 SWAP2 SWAP1 PUSH2 0xCB4 JUMP JUMPDEST PUSH1 0x60 PUSH4 0x140A84DB PUSH1 0xE0 SHL DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x976 SWAP3 SWAP2 SWAP1 PUSH2 0xBB7 JUMP JUMPDEST PUSH1 0x60 PUSH4 0xB65A25B9 PUSH1 0xE0 SHL DUP3 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x5F8 SWAP2 SWAP1 PUSH2 0xB96 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xAB3 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0xABE DUP2 PUSH2 0xCC2 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x40 DUP5 DUP7 SUB SLT ISZERO PUSH2 0xAD9 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH2 0xAE4 DUP2 PUSH2 0xCC2 JUMP JUMPDEST SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xB00 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP7 ADD DUP8 PUSH1 0x1F DUP3 ADD SLT PUSH2 0xB11 JUMPI DUP5 DUP6 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP3 POP DUP2 DUP4 GT ISZERO PUSH2 0xB21 JUMPI DUP5 DUP6 REVERT JUMPDEST DUP8 PUSH1 0x20 DUP5 DUP4 ADD ADD GT ISZERO PUSH2 0xB32 JUMPI DUP5 DUP6 REVERT JUMPDEST SWAP5 SWAP8 PUSH1 0x20 SWAP1 SWAP6 ADD SWAP7 POP SWAP1 SWAP5 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xB55 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0xB60 DUP2 PUSH2 0xCC2 JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xB7F JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 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 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP3 DUP4 AND DUP2 MSTORE SWAP2 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP3 MLOAD DUP3 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP2 SWAP1 DUP5 DUP3 ADD SWAP1 PUSH1 0x40 DUP6 ADD SWAP1 DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0xC2C JUMPI DUP4 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 MSTORE SWAP3 DUP5 ADD SWAP3 SWAP2 DUP5 ADD SWAP2 PUSH1 0x1 ADD PUSH2 0xBFA JUMP JUMPDEST POP SWAP1 SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 MSTORE DUP4 MLOAD DUP1 DUP3 DUP6 ADD MSTORE DUP3 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0xC6F JUMPI DUP6 DUP2 ADD DUP4 ADD MLOAD DUP6 DUP3 ADD PUSH1 0x40 ADD MSTORE DUP3 ADD PUSH2 0xC53 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0xC80 JUMPI DUP4 PUSH1 0x40 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x40 ADD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x18D JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xEA 0x2D 0xEC CREATE LOG0 PUSH10 0xEA1D113E648EF6953701 BLOCKHASH MSTORE 0xD 0xFB RETURNDATACOPY CALLDATACOPY PUSH3 0xABF449 0xA6 0xE7 PUSH10 0xEFEF7564736F6C634300 MOD EXP STOP CALLER LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH24 0x5833D230436B742AB34E3BFCCF39D46480FC3F201417BB2C CALLDATASIZE DUP10 0xDF 0xC5 0xC4 GASLIMIT PUSH6 0x64736F6C6343 STOP MOD EXP STOP CALLER ",
"sourceMap": "931:4366:25:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2348:835;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;3339:314;;;;;;;;;:::i;:::-;;1401:33;;;:::i;2348:835::-;2507:13;2544:10;:22;2558:8;2544:22;;2536:63;;;;;;;;;;;;;;;;;;;;;;2697:17;;2780:138;;;;;;;;2843:17;;2697;2780:138;;;;;;2887:16;;;;2780:138;;;;;;2697:231;;;;;:17;;;;;:24;;:231;;2759:4;;2697:231;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2688:240;;2964:50;2977:6;2985:5;2992:8;3002:11;2964:12;:50::i;:::-;3074;;;;;:43;;;;;;:50;;3118:5;;3074:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;3161:15:25;;;;;:4;;-1:-1:-1;3161:8:25;;-1:-1:-1;3161:15:25;;3170:5;;3161:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2348:835;;;;;:::o;3339:314::-;3437:10;3459:4;3437:27;3429:68;;;;;;;;;;;;;;3633:12;3620:26;;;1401:33;;;:::o;3968:1327::-;4316:21;;4182:6;;4146:16;;4316:21;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4416:53:25;;;;;4282:55;;-1:-1:-1;4416:36:25;;;;;;:53;;4461:6;;4416:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4562:40:25;;;;;:33;;;;-1:-1:-1;4562:33:25;;-1:-1:-1;4562:40:25;;4596:5;;4562:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4653:7;:15;;;4694:8;:21;;;4778:29;;;4829:15;4734:128;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4653:254;;;;;;;;;;;;;4888:4;;4653:254;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5045:23:25;;;;5184:31;;5087:146;;5004:15;;;;-1:-1:-1;5004:15:25;;-1:-1:-1;5131:31:25;;5087:146;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5004:274;;;;;;;;;;;;;5259:4;;5004:274;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3968:1327;;;;;:::o;-1:-1:-1:-;;;;;;;;:::o;5:130::-;72:20;;97:33;72:20;97:33;;;57:78;;;;;2497:257;;2609:2;2597:9;2588:7;2584:23;2580:32;2577:2;;;-1:-1;;2615:12;2577:2;230:6;217:20;242:41;277:5;242:41;;;2667:71;2571:183;-1:-1;;;2571:183;2761:619;;;;2950:9;2941:7;2937:23;2962:3;2937:23;2933:33;2930:2;;;-1:-1;;2969:12;2930:2;230:6;217:20;242:41;277:5;242:41;;;3021:71;-1:-1;1345:4;1324:19;;;1320:30;1317:2;;;-1:-1;;1353:12;1317:2;1381:20;1345:4;1381:20;;;3129:2;3198:9;3194:22;72:20;97:33;124:5;97:33;;;1462:106;;1665:65;1726:3;1702:22;;;1665:65;;;3129:2;1651:5;1647:16;1640:91;1833:70;1899:3;1875:22;3198:9;1875:22;1833:70;;;1702:22;1819:5;1815:16;1808:96;2008:72;2076:3;1345:4;3198:9;2052:22;2008:72;;;1875:22;1990:16;;1983:98;1994:5;-1:-1;3129:2;2245:19;;;2241:30;2238:2;;;-1:-1;;2274:12;2238:2;;2302:20;3129:2;2302:20;;;2419:49;2464:3;3263;3336:9;3332:22;2419:49;;;2401:16;2394:75;3272:92;;;;2924:456;;;;;;3387:291;;3516:2;3504:9;3495:7;3491:23;3487:32;3484:2;;;-1:-1;;3522:12;3484:2;1123:6;1117:13;1135:47;1176:5;1135:47;;6131:222;10498:42;10487:54;;;;3921:45;;6258:2;6243:18;;6229:124;6866:505;10498:42;10487:54;;;3921:45;;5807:23;;10487:54;;7357:2;7342:18;;;4542:73;;;;6001:16;;;5995:23;10487:54;;;6088:14;;;4542:73;7107:2;7092:18;;7078:293;7378:528;;10498:42;;3959:5;10487:54;3928:3;3921:45;7697:2;7579;7697;7686:9;7682:18;7675:48;4240:5;9234:12;9390:6;7579:2;7568:9;7564:18;9378:19;-1:-1;12237:101;12251:6;12248:1;12245:13;12237:101;;;12318:11;;;;;12312:18;12299:11;;;9418:14;12299:11;12292:39;12266:10;;12237:101;;;12353:6;12350:1;12347:13;12344:2;;;-1:-1;9418:14;12409:6;7568:9;12400:16;;12393:27;12344:2;-1:-1;10487:54;;;;7892:2;7877:18;;3921:45;-1:-1;;12529:2;12509:14;;;;12525:7;12505:28;4397:39;9418:14;4397:39;;7550:356;-1:-1;;7550:356;8461:416;8661:2;8675:47;;;5369:2;8646:18;;;9378:19;5405:30;9418:14;;;5385:51;5455:12;;;8632:245;8884:256;8946:2;8940:9;8972:17;;;9047:18;9032:34;;9068:22;;;9029:62;9026:2;;;9104:1;;9094:12;9026:2;8946;9113:22;8924:216;;-1:-1;8924:216;12546:117;10498:42;12633:5;10487:54;12608:5;12605:35;12595:2;;12654:1;;12644:12;12595:2;12589:74;"
}
}
},
"sourceTreeHashHex": "0x7b5775afb7a7ef0c6cda9a5b2e72a2d9fef1f293eb1fa6acd7112bab945e30ca",
"sources": {
"./FullMigration.sol": {
"id": 25
},
"../ZeroEx.sol": {
"id": 0
},
"@0x/contracts-utils/contracts/src/v06/LibBytesV06.sol": {
"id": 68
},
"@0x/contracts-utils/contracts/src/v06/errors/LibBytesRichErrorsV06.sol": {
"id": 73
},
"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol": {
"id": 76
},
"./LibBootstrap.sol": {
"id": 27
},
"../errors/LibProxyRichErrors.sol": {
"id": 3
},
"../features/Bootstrap.sol": {
"id": 13
},
"../storage/LibProxyStorage.sol": {
"id": 30
},
"../storage/LibStorage.sol": {
"id": 32
},
"../features/IBootstrap.sol": {
"id": 14
},
"../features/IOwnable.sol": {
"id": 16
},
"@0x/contracts-utils/contracts/src/v06/interfaces/IOwnableV06.sol": {
"id": 79
},
"../features/TokenSpender.sol": {
"id": 22
},
"@0x/contracts-utils/contracts/src/v06/LibSafeMathV06.sol": {
"id": 70
},
"@0x/contracts-utils/contracts/src/v06/errors/LibSafeMathRichErrorsV06.sol": {
"id": 77
},
"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol": {
"id": 64
},
"@0x/contracts-erc20/contracts/src/v06/LibERC20TokenV06.sol": {
"id": 66
},
"../errors/LibSpenderRichErrors.sol": {
"id": 5
},
"../fixins/FixinCommon.sol": {
"id": 24
},
"../errors/LibCommonRichErrors.sol": {
"id": 1
},
"../errors/LibOwnableRichErrors.sol": {
"id": 2
},
"./LibMigrate.sol": {
"id": 28
},
"../external/IAllowanceTarget.sol": {
"id": 10
},
"@0x/contracts-utils/contracts/src/v06/interfaces/IAuthorizableV06.sol": {
"id": 78
},
"../storage/LibTokenSpenderStorage.sol": {
"id": 33
},
"../features/ITokenSpender.sol": {
"id": 18
},
"../features/IFeature.sol": {
"id": 15
},
"../features/ISimpleFunctionRegistry.sol": {
"id": 17
},
"../features/TransformERC20.sol": {
"id": 23
},
"../errors/LibTransformERC20RichErrors.sol": {
"id": 6
},
"../external/IFlashWallet.sol": {
"id": 11
},
"../external/FlashWallet.sol": {
"id": 9
},
"@0x/contracts-utils/contracts/src/v06/errors/LibOwnableRichErrorsV06.sol": {
"id": 75
},
"../errors/LibWalletRichErrors.sol": {
"id": 7
},
"../storage/LibTransformERC20Storage.sol": {
"id": 34
},
"../transformers/IERC20Transformer.sol": {
"id": 37
},
"../transformers/LibERC20Transformer.sol": {
"id": 38
},
"../features/ITransformERC20.sol": {
"id": 19
},
"../external/AllowanceTarget.sol": {
"id": 8
},
"@0x/contracts-utils/contracts/src/v06/AuthorizableV06.sol": {
"id": 67
},
"@0x/contracts-utils/contracts/src/v06/errors/LibAuthorizableRichErrorsV06.sol": {
"id": 72
},
"@0x/contracts-utils/contracts/src/v06/OwnableV06.sol": {
"id": 71
},
"./InitialMigration.sol": {
"id": 26
},
"../features/SimpleFunctionRegistry.sol": {
"id": 21
},
"../storage/LibSimpleFunctionRegistryStorage.sol": {
"id": 31
},
"../errors/LibSimpleFunctionRegistryRichErrors.sol": {
"id": 4
},
"../features/Ownable.sol": {
"id": 20
},
"../storage/LibOwnableStorage.sol": {
"id": 29
}
},
"sourceCodes": {
"./FullMigration.sol": "/*\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 \"../ZeroEx.sol\";\nimport \"../features/IOwnable.sol\";\nimport \"../features/TokenSpender.sol\";\nimport \"../features/TransformERC20.sol\";\nimport \"../external/AllowanceTarget.sol\";\nimport \"./InitialMigration.sol\";\n\n\n/// @dev A contract for deploying and configuring the full ZeroEx contract.\ncontract FullMigration {\n\n // solhint-disable no-empty-blocks,indent\n\n /// @dev Features to add the the proxy contract.\n struct Features {\n SimpleFunctionRegistry registry;\n Ownable ownable;\n TokenSpender tokenSpender;\n TransformERC20 transformERC20;\n }\n\n /// @dev Parameters needed to initialize features.\n struct MigrateOpts {\n address transformerDeployer;\n }\n\n /// @dev The allowed caller of `deploy()`.\n address public immutable deployer;\n /// @dev The initial migration contract.\n InitialMigration private _initialMigration;\n\n /// @dev Instantiate this contract and set the allowed caller of `deploy()`\n /// to `deployer`.\n /// @param deployer_ The allowed caller of `deploy()`.\n constructor(address payable deployer_)\n public\n {\n deployer = deployer_;\n // Create an initial migration contract with this contract set to the\n // allowed deployer.\n _initialMigration = new InitialMigration(address(this));\n }\n\n /// @dev Deploy the `ZeroEx` contract with the full feature set,\n /// transfer ownership to `owner`, then self-destruct.\n /// @param owner The owner of the contract.\n /// @param features Features to add to the proxy.\n /// @return zeroEx The deployed and configured `ZeroEx` contract.\n /// @param migrateOpts Parameters needed to initialize features.\n function deploy(\n address payable owner,\n Features memory features,\n MigrateOpts memory migrateOpts\n )\n public\n returns (ZeroEx zeroEx)\n {\n require(msg.sender == deployer, \"FullMigration/INVALID_SENDER\");\n\n // Perform the initial migration with the owner set to this contract.\n zeroEx = _initialMigration.deploy(\n address(uint160(address(this))),\n InitialMigration.BootstrapFeatures({\n registry: features.registry,\n ownable: features.ownable\n })\n );\n\n // Add features.\n _addFeatures(zeroEx, owner, features, migrateOpts);\n\n // Transfer ownership to the real owner.\n IOwnable(address(zeroEx)).transferOwnership(owner);\n\n // Self-destruct.\n this.die(owner);\n }\n\n /// @dev Destroy this contract. Only callable from ourselves (from `deploy()`).\n /// @param ethRecipient Receiver of any ETH in this contract.\n function die(address payable ethRecipient)\n external\n virtual\n {\n require(msg.sender == address(this), \"FullMigration/INVALID_SENDER\");\n // This contract should not hold any funds but we send\n // them to the ethRecipient just in case.\n selfdestruct(ethRecipient);\n }\n\n /// @dev Deploy and register features to the ZeroEx contract.\n /// @param zeroEx The bootstrapped ZeroEx contract.\n /// @param owner The ultimate owner of the ZeroEx contract.\n /// @param features Features to add to the proxy.\n /// @param migrateOpts Parameters needed to initialize features.\n function _addFeatures(\n ZeroEx zeroEx,\n address owner,\n Features memory features,\n MigrateOpts memory migrateOpts\n )\n private\n {\n IOwnable ownable = IOwnable(address(zeroEx));\n // TokenSpender\n {\n // Create the allowance target.\n AllowanceTarget allowanceTarget = new AllowanceTarget();\n // Let the ZeroEx contract use the allowance target.\n allowanceTarget.addAuthorizedAddress(address(zeroEx));\n // Transfer ownership of the allowance target to the (real) owner.\n allowanceTarget.transferOwnership(owner);\n // Register the feature.\n ownable.migrate(\n address(features.tokenSpender),\n abi.encodeWithSelector(\n TokenSpender.migrate.selector,\n allowanceTarget\n ),\n address(this)\n );\n }\n // TransformERC20\n {\n // Register the feature.\n ownable.migrate(\n address(features.transformERC20),\n abi.encodeWithSelector(\n TransformERC20.migrate.selector,\n migrateOpts.transformerDeployer\n ),\n address(this)\n );\n }\n }\n}\n",
"../ZeroEx.sol": "/*\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/Bootstrap.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 `Bootstrap` feature.\n /// After constructing this contract, `bootstrap()` should be called\n /// to seed the initial feature set.\n constructor() public {\n // Temporarily create and register the bootstrap feature.\n // It will deregister itself after `bootstrap()` has been called.\n Bootstrap bootstrap = new Bootstrap(msg.sender);\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": "/*\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 into.\n /// @param index Index in byte array of .\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 into.\n /// @param index Index in byte array of .\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": "/*\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": "/*\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",
"./LibBootstrap.sol": "/*\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": "/*\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/Bootstrap.sol": "/*\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 \"./IBootstrap.sol\";\n\n\n/// @dev Detachable `bootstrap()` feature.\ncontract Bootstrap is\n IBootstrap\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 Bootstrap(_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 if (msg.sender != _deployer) {\n LibProxyRichErrors.InvalidDieCallerError(msg.sender, _deployer).rrevert();\n }\n selfdestruct(msg.sender);\n }\n}\n",
"../storage/LibProxyStorage.sol": "/*\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": "/*\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 }\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/IBootstrap.sol": "/*\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 IBootstrap {\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",
"../features/IOwnable.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/interfaces/IOwnableV06.sol\";\n\n\n// solhint-disable no-empty-blocks\n/// @dev Owner management and migration features.\ninterface IOwnable is\n IOwnableV06\n{\n /// @dev Emitted when `migrate()` is called.\n /// @param caller The caller of `migrate()`.\n /// @param migrator The migration contract.\n /// @param newOwner The address of the new owner.\n event Migrated(address caller, address migrator, address newOwner);\n\n /// @dev Execute a migration function in the context of the ZeroEx contract.\n /// The result of the function being called should be the magic bytes\n /// 0x2c64c5ef (`keccack('MIGRATE_SUCCESS')`). Only callable by the owner.\n /// The owner will be temporarily set to `address(this)` inside the call.\n /// Before returning, the owner will be set to `newOwner`.\n /// @param target The migrator contract address.\n /// @param newOwner The address of the new owner.\n /// @param data The call data.\n function migrate(address target, bytes calldata data, address newOwner) external;\n}\n",
"@0x/contracts-utils/contracts/src/v06/interfaces/IOwnableV06.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\ninterface IOwnableV06 {\n\n /// @dev Emitted by Ownable when ownership is transferred.\n /// @param previousOwner The previous owner of the contract.\n /// @param newOwner The new owner of the contract.\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /// @dev Transfers ownership of the contract to a new address.\n /// @param newOwner The address that will become the owner.\n function transferOwnership(address newOwner) external;\n\n /// @dev The owner of this contract.\n /// @return ownerAddress The owner address.\n function owner() external view returns (address ownerAddress);\n}\n",
"../features/TokenSpender.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"@0x/contracts-utils/contracts/src/v06/LibSafeMathV06.sol\";\nimport \"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol\";\nimport \"@0x/contracts-erc20/contracts/src/v06/LibERC20TokenV06.sol\";\nimport \"../errors/LibSpenderRichErrors.sol\";\nimport \"../fixins/FixinCommon.sol\";\nimport \"../migrations/LibMigrate.sol\";\nimport \"../external/IAllowanceTarget.sol\";\nimport \"../storage/LibTokenSpenderStorage.sol\";\nimport \"./ITokenSpender.sol\";\nimport \"./IFeature.sol\";\nimport \"./ISimpleFunctionRegistry.sol\";\n\n\n/// @dev Feature that allows spending token allowances.\ncontract TokenSpender is\n IFeature,\n ITokenSpender,\n FixinCommon\n{\n // solhint-disable\n /// @dev Name of this feature.\n string public constant override FEATURE_NAME = \"TokenSpender\";\n /// @dev Version of this feature.\n uint256 public immutable override FEATURE_VERSION = _encodeVersion(1, 0, 0);\n /// @dev The implementation address of this feature.\n address private immutable _implementation;\n // solhint-enable\n\n using LibRichErrorsV06 for bytes;\n\n constructor() public {\n _implementation = address(this);\n }\n\n /// @dev Initialize and register this feature. Should be delegatecalled\n /// into during a `Migrate.migrate()`.\n /// @param allowanceTarget An `allowanceTarget` instance, configured to have\n /// the ZeroeEx contract as an authority.\n /// @return success `MIGRATE_SUCCESS` on success.\n function migrate(IAllowanceTarget allowanceTarget) external returns (bytes4 success) {\n LibTokenSpenderStorage.getStorage().allowanceTarget = allowanceTarget;\n ISimpleFunctionRegistry(address(this))\n .extend(this.getAllowanceTarget.selector, _implementation);\n ISimpleFunctionRegistry(address(this))\n .extend(this._spendERC20Tokens.selector, _implementation);\n ISimpleFunctionRegistry(address(this))\n .extend(this.getSpendableERC20BalanceOf.selector, _implementation);\n return LibMigrate.MIGRATE_SUCCESS;\n }\n\n /// @dev Transfers ERC20 tokens from `owner` to `to`. Only callable from within.\n /// @param token The token to spend.\n /// @param owner The owner of the tokens.\n /// @param to The recipient of the tokens.\n /// @param amount The amount of `token` to transfer.\n function _spendERC20Tokens(\n IERC20TokenV06 token,\n address owner,\n address to,\n uint256 amount\n )\n external\n override\n onlySelf\n {\n IAllowanceTarget spender = LibTokenSpenderStorage.getStorage().allowanceTarget;\n // Have the allowance target execute an ERC20 `transferFrom()`.\n (bool didSucceed, bytes memory resultData) = address(spender).call(\n abi.encodeWithSelector(\n IAllowanceTarget.executeCall.selector,\n address(token),\n abi.encodeWithSelector(\n IERC20TokenV06.transferFrom.selector,\n owner,\n to,\n amount\n )\n )\n );\n if (didSucceed) {\n resultData = abi.decode(resultData, (bytes));\n }\n if (!didSucceed || !LibERC20TokenV06.isSuccessfulResult(resultData)) {\n LibSpenderRichErrors.SpenderERC20TransferFromFailedError(\n address(token),\n owner,\n to,\n amount,\n resultData\n ).rrevert();\n }\n }\n\n /// @dev Gets the maximum amount of an ERC20 token `token` that can be\n /// pulled from `owner` by the token spender.\n /// @param token The token to spend.\n /// @param owner The owner of the tokens.\n /// @return amount The amount of tokens that can be pulled.\n function getSpendableERC20BalanceOf(IERC20TokenV06 token, address owner)\n external\n override\n view\n returns (uint256 amount)\n {\n return LibSafeMathV06.min256(\n token.allowance(owner, address(LibTokenSpenderStorage.getStorage().allowanceTarget)),\n token.balanceOf(owner)\n );\n }\n\n /// @dev Get the address of the allowance target.\n /// @return target The target of token allowances.\n function getAllowanceTarget()\n external\n override\n view\n returns (address target)\n {\n return address(LibTokenSpenderStorage.getStorage().allowanceTarget);\n }\n}\n",
"@0x/contracts-utils/contracts/src/v06/LibSafeMathV06.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\nimport \"./errors/LibRichErrorsV06.sol\";\nimport \"./errors/LibSafeMathRichErrorsV06.sol\";\n\n\nlibrary LibSafeMathV06 {\n\n function safeMul(uint256 a, uint256 b)\n internal\n pure\n returns (uint256)\n {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n if (c / a != b) {\n LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(\n LibSafeMathRichErrorsV06.BinOpErrorCodes.MULTIPLICATION_OVERFLOW,\n a,\n b\n ));\n }\n return c;\n }\n\n function safeDiv(uint256 a, uint256 b)\n internal\n pure\n returns (uint256)\n {\n if (b == 0) {\n LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(\n LibSafeMathRichErrorsV06.BinOpErrorCodes.DIVISION_BY_ZERO,\n a,\n b\n ));\n }\n uint256 c = a / b;\n return c;\n }\n\n function safeSub(uint256 a, uint256 b)\n internal\n pure\n returns (uint256)\n {\n if (b > a) {\n LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(\n LibSafeMathRichErrorsV06.BinOpErrorCodes.SUBTRACTION_UNDERFLOW,\n a,\n b\n ));\n }\n return a - b;\n }\n\n function safeAdd(uint256 a, uint256 b)\n internal\n pure\n returns (uint256)\n {\n uint256 c = a + b;\n if (c < a) {\n LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(\n LibSafeMathRichErrorsV06.BinOpErrorCodes.ADDITION_OVERFLOW,\n a,\n b\n ));\n }\n return c;\n }\n\n function max256(uint256 a, uint256 b)\n internal\n pure\n returns (uint256)\n {\n return a >= b ? a : b;\n }\n\n function min256(uint256 a, uint256 b)\n internal\n pure\n returns (uint256)\n {\n return a < b ? a : b;\n }\n}\n",
"@0x/contracts-utils/contracts/src/v06/errors/LibSafeMathRichErrorsV06.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibSafeMathRichErrorsV06 {\n\n // bytes4(keccak256(\"Uint256BinOpError(uint8,uint256,uint256)\"))\n bytes4 internal constant UINT256_BINOP_ERROR_SELECTOR =\n 0xe946c1bb;\n\n // bytes4(keccak256(\"Uint256DowncastError(uint8,uint256)\"))\n bytes4 internal constant UINT256_DOWNCAST_ERROR_SELECTOR =\n 0xc996af7b;\n\n enum BinOpErrorCodes {\n ADDITION_OVERFLOW,\n MULTIPLICATION_OVERFLOW,\n SUBTRACTION_UNDERFLOW,\n DIVISION_BY_ZERO\n }\n\n enum DowncastErrorCodes {\n VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT32,\n VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT64,\n VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT96\n }\n\n // solhint-disable func-name-mixedcase\n function Uint256BinOpError(\n BinOpErrorCodes errorCode,\n uint256 a,\n uint256 b\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n UINT256_BINOP_ERROR_SELECTOR,\n errorCode,\n a,\n b\n );\n }\n\n function Uint256DowncastError(\n DowncastErrorCodes errorCode,\n uint256 a\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n UINT256_DOWNCAST_ERROR_SELECTOR,\n errorCode,\n a\n );\n }\n}\n",
"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\ninterface IERC20TokenV06 {\n\n // solhint-disable no-simple-event-func-name\n event Transfer(\n address indexed from,\n address indexed to,\n uint256 value\n );\n\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n\n /// @dev send `value` token to `to` from `msg.sender`\n /// @param to The address of the recipient\n /// @param value The amount of token to be transferred\n /// @return True if transfer was successful\n function transfer(address to, uint256 value)\n external\n returns (bool);\n\n /// @dev send `value` token to `to` from `from` on the condition it is approved by `from`\n /// @param from The address of the sender\n /// @param to The address of the recipient\n /// @param value The amount of token to be transferred\n /// @return True if transfer was successful\n function transferFrom(\n address from,\n address to,\n uint256 value\n )\n external\n returns (bool);\n\n /// @dev `msg.sender` approves `spender` to spend `value` tokens\n /// @param spender The address of the account able to transfer the tokens\n /// @param value The amount of wei to be approved for transfer\n /// @return Always true if the call has enough gas to complete execution\n function approve(address spender, uint256 value)\n external\n returns (bool);\n\n /// @dev Query total supply of token\n /// @return Total supply of token\n function totalSupply()\n external\n view\n returns (uint256);\n\n /// @dev Get the balance of `owner`.\n /// @param owner The address from which the balance will be retrieved\n /// @return Balance of owner\n function balanceOf(address owner)\n external\n view\n returns (uint256);\n\n /// @dev Get the allowance for `spender` to spend from `owner`.\n /// @param owner The address of the account owning tokens\n /// @param spender The address of the account able to transfer the tokens\n /// @return Amount of remaining tokens allowed to spent\n function allowance(address owner, address spender)\n external\n view\n returns (uint256);\n\n /// @dev Get the number of decimals this token has.\n function decimals()\n external\n view\n returns (uint8);\n}\n",
"@0x/contracts-erc20/contracts/src/v06/LibERC20TokenV06.sol": "/*\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 \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"@0x/contracts-utils/contracts/src/v06/LibBytesV06.sol\";\nimport \"./IERC20TokenV06.sol\";\n\n\nlibrary LibERC20TokenV06 {\n bytes constant private DECIMALS_CALL_DATA = hex\"313ce567\";\n\n /// @dev Calls `IERC20TokenV06(token).approve()`.\n /// Reverts if the result fails `isSuccessfulResult()` or the call reverts.\n /// @param token The address of the token contract.\n /// @param spender The address that receives an allowance.\n /// @param allowance The allowance to set.\n function compatApprove(\n IERC20TokenV06 token,\n address spender,\n uint256 allowance\n )\n internal\n {\n bytes memory callData = abi.encodeWithSelector(\n token.approve.selector,\n spender,\n allowance\n );\n _callWithOptionalBooleanResult(address(token), callData);\n }\n\n /// @dev Calls `IERC20TokenV06(token).approve()` and sets the allowance to the\n /// maximum if the current approval is not already >= an amount.\n /// Reverts if the result fails `isSuccessfulResult()` or the call reverts.\n /// @param token The address of the token contract.\n /// @param spender The address that receives an allowance.\n /// @param amount The minimum allowance needed.\n function approveIfBelow(\n IERC20TokenV06 token,\n address spender,\n uint256 amount\n )\n internal\n {\n if (token.allowance(address(this), spender) < amount) {\n compatApprove(token, spender, uint256(-1));\n }\n }\n\n /// @dev Calls `IERC20TokenV06(token).transfer()`.\n /// Reverts if the result fails `isSuccessfulResult()` or the call reverts.\n /// @param token The address of the token contract.\n /// @param to The address that receives the tokens\n /// @param amount Number of tokens to transfer.\n function compatTransfer(\n IERC20TokenV06 token,\n address to,\n uint256 amount\n )\n internal\n {\n bytes memory callData = abi.encodeWithSelector(\n token.transfer.selector,\n to,\n amount\n );\n _callWithOptionalBooleanResult(address(token), callData);\n }\n\n /// @dev Calls `IERC20TokenV06(token).transferFrom()`.\n /// Reverts if the result fails `isSuccessfulResult()` or the call reverts.\n /// @param token The address of the token contract.\n /// @param from The owner of the tokens.\n /// @param to The address that receives the tokens\n /// @param amount Number of tokens to transfer.\n function compatTransferFrom(\n IERC20TokenV06 token,\n address from,\n address to,\n uint256 amount\n )\n internal\n {\n bytes memory callData = abi.encodeWithSelector(\n token.transferFrom.selector,\n from,\n to,\n amount\n );\n _callWithOptionalBooleanResult(address(token), callData);\n }\n\n /// @dev Retrieves the number of decimals for a token.\n /// Returns `18` if the call reverts.\n /// @param token The address of the token contract.\n /// @return tokenDecimals The number of decimals places for the token.\n function compatDecimals(IERC20TokenV06 token)\n internal\n view\n returns (uint8 tokenDecimals)\n {\n tokenDecimals = 18;\n (bool didSucceed, bytes memory resultData) = address(token).staticcall(DECIMALS_CALL_DATA);\n if (didSucceed && resultData.length == 32) {\n tokenDecimals = uint8(LibBytesV06.readUint256(resultData, 0));\n }\n }\n\n /// @dev Retrieves the allowance for a token, owner, and spender.\n /// Returns `0` if the call reverts.\n /// @param token The address of the token contract.\n /// @param owner The owner of the tokens.\n /// @param spender The address the spender.\n /// @return allowance_ The allowance for a token, owner, and spender.\n function compatAllowance(IERC20TokenV06 token, address owner, address spender)\n internal\n view\n returns (uint256 allowance_)\n {\n (bool didSucceed, bytes memory resultData) = address(token).staticcall(\n abi.encodeWithSelector(\n token.allowance.selector,\n owner,\n spender\n )\n );\n if (didSucceed && resultData.length == 32) {\n allowance_ = LibBytesV06.readUint256(resultData, 0);\n }\n }\n\n /// @dev Retrieves the balance for a token owner.\n /// Returns `0` if the call reverts.\n /// @param token The address of the token contract.\n /// @param owner The owner of the tokens.\n /// @return balance The token balance of an owner.\n function compatBalanceOf(IERC20TokenV06 token, address owner)\n internal\n view\n returns (uint256 balance)\n {\n (bool didSucceed, bytes memory resultData) = address(token).staticcall(\n abi.encodeWithSelector(\n token.balanceOf.selector,\n owner\n )\n );\n if (didSucceed && resultData.length == 32) {\n balance = LibBytesV06.readUint256(resultData, 0);\n }\n }\n\n /// @dev Check if the data returned by a non-static call to an ERC20 token\n /// is a successful result. Supported functions are `transfer()`,\n /// `transferFrom()`, and `approve()`.\n /// @param resultData The raw data returned by a non-static call to the ERC20 token.\n /// @return isSuccessful Whether the result data indicates success.\n function isSuccessfulResult(bytes memory resultData)\n internal\n pure\n returns (bool isSuccessful)\n {\n if (resultData.length == 0) {\n return true;\n }\n if (resultData.length == 32) {\n uint256 result = LibBytesV06.readUint256(resultData, 0);\n if (result == 1) {\n return true;\n }\n }\n }\n\n /// @dev Executes a call on address `target` with calldata `callData`\n /// and asserts that either nothing was returned or a single boolean\n /// was returned equal to `true`.\n /// @param target The call target.\n /// @param callData The abi-encoded call data.\n function _callWithOptionalBooleanResult(\n address target,\n bytes memory callData\n )\n private\n {\n (bool didSucceed, bytes memory resultData) = target.call(callData);\n if (didSucceed && isSuccessfulResult(resultData)) {\n return;\n }\n LibRichErrorsV06.rrevert(resultData);\n }\n}\n",
"../errors/LibSpenderRichErrors.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibSpenderRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function SpenderERC20TransferFromFailedError(\n address token,\n address owner,\n address to,\n uint256 amount,\n bytes memory errorData\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"SpenderERC20TransferFromFailedError(address,address,address,uint256,bytes)\")),\n token,\n owner,\n to,\n amount,\n errorData\n );\n }\n}\n",
"../fixins/FixinCommon.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"../errors/LibCommonRichErrors.sol\";\nimport \"../errors/LibOwnableRichErrors.sol\";\nimport \"../features/IOwnable.sol\";\n\n\n/// @dev Common feature utilities.\ncontract FixinCommon {\n\n using LibRichErrorsV06 for bytes;\n\n /// @dev The caller must be this contract.\n modifier onlySelf() virtual {\n if (msg.sender != address(this)) {\n LibCommonRichErrors.OnlyCallableBySelfError(msg.sender).rrevert();\n }\n _;\n }\n\n /// @dev The caller of this function must be the owner.\n modifier onlyOwner() virtual {\n {\n address owner = IOwnable(address(this)).owner();\n if (msg.sender != owner) {\n LibOwnableRichErrors.OnlyOwnerError(\n msg.sender,\n owner\n ).rrevert();\n }\n }\n _;\n }\n\n /// @dev Encode a feature version as a `uint256`.\n /// @param major The major version number of the feature.\n /// @param minor The minor version number of the feature.\n /// @param revision The revision number of the feature.\n /// @return encodedVersion The encoded version number.\n function _encodeVersion(uint32 major, uint32 minor, uint32 revision)\n internal\n pure\n returns (uint256 encodedVersion)\n {\n return (major << 64) | (minor << 32) | revision;\n }\n}\n",
"../errors/LibCommonRichErrors.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibCommonRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function OnlyCallableBySelfError(address sender)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"OnlyCallableBySelfError(address)\")),\n sender\n );\n }\n\n function IllegalReentrancyError()\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"IllegalReentrancyError()\"))\n );\n }\n}\n",
"../errors/LibOwnableRichErrors.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibOwnableRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function OnlyOwnerError(\n address sender,\n address owner\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"OnlyOwnerError(address,address)\")),\n sender,\n owner\n );\n }\n\n function TransferOwnerToZeroError()\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"TransferOwnerToZeroError()\"))\n );\n }\n\n function MigrateCallFailedError(address target, bytes memory resultData)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"MigrateCallFailedError(address,bytes)\")),\n target,\n resultData\n );\n }\n}\n",
"./LibMigrate.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"../errors/LibOwnableRichErrors.sol\";\n\n\nlibrary LibMigrate {\n\n /// @dev Magic bytes returned by a migrator to indicate success.\n /// This is `keccack('MIGRATE_SUCCESS')`.\n bytes4 internal constant MIGRATE_SUCCESS = 0x2c64c5ef;\n\n using LibRichErrorsV06 for bytes;\n\n /// @dev Perform a delegatecall and ensure it returns the magic bytes.\n /// @param target The call target.\n /// @param data The call data.\n function delegatecallMigrateFunction(\n address target,\n bytes memory data\n )\n internal\n {\n (bool success, bytes memory resultData) = target.delegatecall(data);\n if (!success ||\n resultData.length != 32 ||\n abi.decode(resultData, (bytes4)) != MIGRATE_SUCCESS)\n {\n LibOwnableRichErrors.MigrateCallFailedError(target, resultData).rrevert();\n }\n }\n}\n",
"../external/IAllowanceTarget.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/interfaces/IAuthorizableV06.sol\";\n\n\n/// @dev The allowance target for the TokenSpender feature.\ninterface IAllowanceTarget is\n IAuthorizableV06\n{\n /// @dev Execute an arbitrary call. Only an authority can call this.\n /// @param target The call target.\n /// @param callData The call data.\n /// @return resultData The data returned by the call.\n function executeCall(\n address payable target,\n bytes calldata callData\n )\n external\n returns (bytes memory resultData);\n}\n",
"@0x/contracts-utils/contracts/src/v06/interfaces/IAuthorizableV06.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\nimport \"./IOwnableV06.sol\";\n\n\ninterface IAuthorizableV06 is\n IOwnableV06\n{\n // Event logged when a new address is authorized.\n event AuthorizedAddressAdded(\n address indexed target,\n address indexed caller\n );\n\n // Event logged when a currently authorized address is unauthorized.\n event AuthorizedAddressRemoved(\n address indexed target,\n address indexed caller\n );\n\n /// @dev Authorizes an address.\n /// @param target Address to authorize.\n function addAuthorizedAddress(address target)\n external;\n\n /// @dev Removes authorizion of an address.\n /// @param target Address to remove authorization from.\n function removeAuthorizedAddress(address target)\n external;\n\n /// @dev Removes authorizion of an address.\n /// @param target Address to remove authorization from.\n /// @param index Index of target in authorities array.\n function removeAuthorizedAddressAtIndex(\n address target,\n uint256 index\n )\n external;\n\n /// @dev Gets all authorized addresses.\n /// @return authorizedAddresses Array of authorized addresses.\n function getAuthorizedAddresses()\n external\n view\n returns (address[] memory authorizedAddresses);\n\n /// @dev Whether an adderss is authorized to call privileged functions.\n /// @param addr Address to query.\n /// @return isAuthorized Whether the address is authorized.\n function authorized(address addr) external view returns (bool isAuthorized);\n\n /// @dev All addresseses authorized to call privileged functions.\n /// @param idx Index of authorized address.\n /// @return addr Authorized address.\n function authorities(uint256 idx) external view returns (address addr);\n\n}\n",
"../storage/LibTokenSpenderStorage.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"./LibStorage.sol\";\nimport \"../external/IAllowanceTarget.sol\";\n\n\n/// @dev Storage helpers for the `TokenSpender` feature.\nlibrary LibTokenSpenderStorage {\n\n /// @dev Storage bucket for this feature.\n struct Storage {\n // Allowance target contract.\n IAllowanceTarget allowanceTarget;\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.TokenSpender\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",
"../features/ITokenSpender.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol\";\n\n\n/// @dev Feature that allows spending token allowances.\ninterface ITokenSpender {\n\n /// @dev Transfers ERC20 tokens from `owner` to `to`.\n /// Only callable from within.\n /// @param token The token to spend.\n /// @param owner The owner of the tokens.\n /// @param to The recipient of the tokens.\n /// @param amount The amount of `token` to transfer.\n function _spendERC20Tokens(\n IERC20TokenV06 token,\n address owner,\n address to,\n uint256 amount\n )\n external;\n\n /// @dev Gets the maximum amount of an ERC20 token `token` that can be\n /// pulled from `owner`.\n /// @param token The token to spend.\n /// @param owner The owner of the tokens.\n /// @return amount The amount of tokens that can be pulled.\n function getSpendableERC20BalanceOf(IERC20TokenV06 token, address owner)\n external\n view\n returns (uint256 amount);\n\n /// @dev Get the address of the allowance target.\n /// @return target The target of token allowances.\n function getAllowanceTarget() external view returns (address target);\n}\n",
"../features/IFeature.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\n\n/// @dev Basic interface for a feature contract.\ninterface IFeature {\n\n // solhint-disable func-name-mixedcase\n\n /// @dev The name of this feature set.\n function FEATURE_NAME() external view returns (string memory name);\n\n /// @dev The version of this feature set.\n function FEATURE_VERSION() external view returns (uint256 version);\n}\n",
"../features/ISimpleFunctionRegistry.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\n\n/// @dev Basic registry management features.\ninterface ISimpleFunctionRegistry {\n\n /// @dev A function implementation was updated via `extend()` or `rollback()`.\n /// @param selector The function selector.\n /// @param oldImpl The implementation contract address being replaced.\n /// @param newImpl The replacement implementation contract address.\n event ProxyFunctionUpdated(bytes4 indexed selector, address oldImpl, address newImpl);\n\n /// @dev Roll back to a prior implementation of a function.\n /// @param selector The function selector.\n /// @param targetImpl The address of an older implementation of the function.\n function rollback(bytes4 selector, address targetImpl) external;\n\n /// @dev Register or replace a function.\n /// @param selector The function selector.\n /// @param impl The implementation contract for the function.\n function extend(bytes4 selector, address impl) external;\n\n /// @dev Retrieve the length of the rollback history for a function.\n /// @param selector The function selector.\n /// @return rollbackLength The number of items in the rollback history for\n /// the function.\n function getRollbackLength(bytes4 selector)\n external\n view\n returns (uint256 rollbackLength);\n\n /// @dev Retrieve an entry in the rollback history for a function.\n /// @param selector The function selector.\n /// @param idx The index in the rollback history.\n /// @return impl An implementation address for the function at\n /// index `idx`.\n function getRollbackEntryAtIndex(bytes4 selector, uint256 idx)\n external\n view\n returns (address impl);\n}\n",
"../features/TransformERC20.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol\";\nimport \"@0x/contracts-erc20/contracts/src/v06/LibERC20TokenV06.sol\";\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"@0x/contracts-utils/contracts/src/v06/LibSafeMathV06.sol\";\nimport \"../errors/LibTransformERC20RichErrors.sol\";\nimport \"../fixins/FixinCommon.sol\";\nimport \"../migrations/LibMigrate.sol\";\nimport \"../external/IFlashWallet.sol\";\nimport \"../external/FlashWallet.sol\";\nimport \"../storage/LibTransformERC20Storage.sol\";\nimport \"../transformers/IERC20Transformer.sol\";\nimport \"../transformers/LibERC20Transformer.sol\";\nimport \"./ITransformERC20.sol\";\nimport \"./ITokenSpender.sol\";\nimport \"./IFeature.sol\";\nimport \"./ISimpleFunctionRegistry.sol\";\n\n\n/// @dev Feature to composably transform between ERC20 tokens.\ncontract TransformERC20 is\n IFeature,\n ITransformERC20,\n FixinCommon\n{\n\n /// @dev Stack vars for `_transformERC20Private()`.\n struct TransformERC20PrivateState {\n IFlashWallet wallet;\n address transformerDeployer;\n uint256 takerOutputTokenBalanceBefore;\n uint256 takerOutputTokenBalanceAfter;\n }\n\n // solhint-disable\n /// @dev Name of this feature.\n string public constant override FEATURE_NAME = \"TransformERC20\";\n /// @dev Version of this feature.\n uint256 public immutable override FEATURE_VERSION = _encodeVersion(1, 0, 0);\n /// @dev The implementation address of this feature.\n address private immutable _implementation;\n // solhint-enable\n\n using LibSafeMathV06 for uint256;\n using LibRichErrorsV06 for bytes;\n\n constructor() public {\n _implementation = address(this);\n }\n\n /// @dev Initialize and register this feature.\n /// Should be delegatecalled by `Migrate.migrate()`.\n /// @param transformerDeployer The trusted deployer for transformers.\n /// @return success `LibMigrate.SUCCESS` on success.\n function migrate(address transformerDeployer) external returns (bytes4 success) {\n ISimpleFunctionRegistry(address(this))\n .extend(this.getTransformerDeployer.selector, _implementation);\n ISimpleFunctionRegistry(address(this))\n .extend(this.createTransformWallet.selector, _implementation);\n ISimpleFunctionRegistry(address(this))\n .extend(this.getTransformWallet.selector, _implementation);\n ISimpleFunctionRegistry(address(this))\n .extend(this.setTransformerDeployer.selector, _implementation);\n ISimpleFunctionRegistry(address(this))\n .extend(this.transformERC20.selector, _implementation);\n ISimpleFunctionRegistry(address(this))\n .extend(this._transformERC20.selector, _implementation);\n createTransformWallet();\n LibTransformERC20Storage.getStorage().transformerDeployer = transformerDeployer;\n return LibMigrate.MIGRATE_SUCCESS;\n }\n\n /// @dev Replace the allowed deployer for transformers.\n /// Only callable by the owner.\n /// @param transformerDeployer The address of the trusted deployer for transformers.\n function setTransformerDeployer(address transformerDeployer)\n external\n override\n onlyOwner\n {\n LibTransformERC20Storage.getStorage().transformerDeployer = transformerDeployer;\n emit TransformerDeployerUpdated(transformerDeployer);\n }\n\n /// @dev Return the allowed deployer for transformers.\n /// @return deployer The transform deployer address.\n function getTransformerDeployer()\n public\n override\n view\n returns (address deployer)\n {\n return LibTransformERC20Storage.getStorage().transformerDeployer;\n }\n\n /// @dev Deploy a new wallet instance and replace the current one with it.\n /// Useful if we somehow break the current wallet instance.\n /// Anyone can call this.\n /// @return wallet The new wallet instance.\n function createTransformWallet()\n public\n override\n returns (IFlashWallet wallet)\n {\n wallet = new FlashWallet();\n LibTransformERC20Storage.getStorage().wallet = wallet;\n }\n\n /// @dev Executes a series of transformations to convert an ERC20 `inputToken`\n /// to an ERC20 `outputToken`.\n /// @param inputToken The token being provided by the sender.\n /// If `0xeee...`, ETH is implied and should be provided with the call.`\n /// @param outputToken The token to be acquired by the sender.\n /// `0xeee...` implies ETH.\n /// @param inputTokenAmount The amount of `inputToken` to take from the sender.\n /// If set to `uint256(-1)`, the entire spendable balance of the taker\n /// will be solt.\n /// @param minOutputTokenAmount The minimum amount of `outputToken` the sender\n /// must receive for the entire transformation to succeed. If set to zero,\n /// the minimum output token transfer will not be asserted.\n /// @param transformations The transformations to execute on the token balance(s)\n /// in sequence.\n /// @return outputTokenAmount The amount of `outputToken` received by the sender.\n function transformERC20(\n IERC20TokenV06 inputToken,\n IERC20TokenV06 outputToken,\n uint256 inputTokenAmount,\n uint256 minOutputTokenAmount,\n Transformation[] memory transformations\n )\n public\n override\n payable\n returns (uint256 outputTokenAmount)\n {\n return _transformERC20Private(\n keccak256(msg.data),\n msg.sender,\n inputToken,\n outputToken,\n inputTokenAmount,\n minOutputTokenAmount,\n transformations\n );\n }\n\n /// @dev Internal version of `transformERC20()`. Only callable from within.\n /// @param callDataHash Hash of the ingress calldata.\n /// @param taker The taker address.\n /// @param inputToken The token being provided by the taker.\n /// If `0xeee...`, ETH is implied and should be provided with the call.`\n /// @param outputToken The token to be acquired by the taker.\n /// `0xeee...` implies ETH.\n /// @param inputTokenAmount The amount of `inputToken` to take from the taker.\n /// If set to `uint256(-1)`, the entire spendable balance of the taker\n /// will be solt.\n /// @param minOutputTokenAmount The minimum amount of `outputToken` the taker\n /// must receive for the entire transformation to succeed. If set to zero,\n /// the minimum output token transfer will not be asserted.\n /// @param transformations The transformations to execute on the token balance(s)\n /// in sequence.\n /// @return outputTokenAmount The amount of `outputToken` received by the taker.\n function _transformERC20(\n bytes32 callDataHash,\n address payable taker,\n IERC20TokenV06 inputToken,\n IERC20TokenV06 outputToken,\n uint256 inputTokenAmount,\n uint256 minOutputTokenAmount,\n Transformation[] memory transformations\n )\n public\n override\n payable\n onlySelf\n returns (uint256 outputTokenAmount)\n {\n return _transformERC20Private(\n callDataHash,\n taker,\n inputToken,\n outputToken,\n inputTokenAmount,\n minOutputTokenAmount,\n transformations\n );\n }\n\n /// @dev Private version of `transformERC20()`.\n /// @param callDataHash Hash of the ingress calldata.\n /// @param taker The taker address.\n /// @param inputToken The token being provided by the taker.\n /// If `0xeee...`, ETH is implied and should be provided with the call.`\n /// @param outputToken The token to be acquired by the taker.\n /// `0xeee...` implies ETH.\n /// @param inputTokenAmount The amount of `inputToken` to take from the taker.\n /// If set to `uint256(-1)`, the entire spendable balance of the taker\n /// will be solt.\n /// @param minOutputTokenAmount The minimum amount of `outputToken` the taker\n /// must receive for the entire transformation to succeed. If set to zero,\n /// the minimum output token transfer will not be asserted.\n /// @param transformations The transformations to execute on the token balance(s)\n /// in sequence.\n /// @return outputTokenAmount The amount of `outputToken` received by the taker.\n function _transformERC20Private(\n bytes32 callDataHash,\n address payable taker,\n IERC20TokenV06 inputToken,\n IERC20TokenV06 outputToken,\n uint256 inputTokenAmount,\n uint256 minOutputTokenAmount,\n Transformation[] memory transformations\n )\n private\n returns (uint256 outputTokenAmount)\n {\n // If the input token amount is -1, transform the taker's entire\n // spendable balance.\n if (inputTokenAmount == uint256(-1)) {\n inputTokenAmount = ITokenSpender(address(this))\n .getSpendableERC20BalanceOf(inputToken, taker);\n }\n\n TransformERC20PrivateState memory state;\n state.wallet = getTransformWallet();\n state.transformerDeployer = getTransformerDeployer();\n\n // Remember the initial output token balance of the taker.\n state.takerOutputTokenBalanceBefore =\n LibERC20Transformer.getTokenBalanceOf(outputToken, taker);\n\n // Pull input tokens from the taker to the wallet and transfer attached ETH.\n _transferInputTokensAndAttachedEth(\n inputToken,\n taker,\n address(state.wallet),\n inputTokenAmount\n );\n\n // Perform transformations.\n for (uint256 i = 0; i < transformations.length; ++i) {\n _executeTransformation(\n state.wallet,\n transformations[i],\n state.transformerDeployer,\n taker,\n callDataHash\n );\n }\n\n // Compute how much output token has been transferred to the taker.\n state.takerOutputTokenBalanceAfter =\n LibERC20Transformer.getTokenBalanceOf(outputToken, taker);\n if (state.takerOutputTokenBalanceAfter > state.takerOutputTokenBalanceBefore) {\n outputTokenAmount = state.takerOutputTokenBalanceAfter.safeSub(\n state.takerOutputTokenBalanceBefore\n );\n } else if (state.takerOutputTokenBalanceAfter < state.takerOutputTokenBalanceBefore) {\n LibTransformERC20RichErrors.NegativeTransformERC20OutputError(\n address(outputToken),\n state.takerOutputTokenBalanceBefore - state.takerOutputTokenBalanceAfter\n ).rrevert();\n }\n // Ensure enough output token has been sent to the taker.\n if (outputTokenAmount < minOutputTokenAmount) {\n LibTransformERC20RichErrors.IncompleteTransformERC20Error(\n address(outputToken),\n outputTokenAmount,\n minOutputTokenAmount\n ).rrevert();\n }\n\n // Emit an event.\n emit TransformedERC20(\n taker,\n address(inputToken),\n address(outputToken),\n inputTokenAmount,\n outputTokenAmount\n );\n }\n\n /// @dev Return the current wallet instance that will serve as the execution\n /// context for transformations.\n /// @return wallet The wallet instance.\n function getTransformWallet()\n public\n override\n view\n returns (IFlashWallet wallet)\n {\n return LibTransformERC20Storage.getStorage().wallet;\n }\n\n /// @dev Transfer input tokens from the taker and any attached ETH to `to`\n /// @param inputToken The token to pull from the taker.\n /// @param from The from (taker) address.\n /// @param to The recipient of tokens and ETH.\n /// @param amount Amount of `inputToken` tokens to transfer.\n function _transferInputTokensAndAttachedEth(\n IERC20TokenV06 inputToken,\n address from,\n address payable to,\n uint256 amount\n )\n private\n {\n // Transfer any attached ETH.\n if (msg.value != 0) {\n to.transfer(msg.value);\n }\n // Transfer input tokens.\n if (!LibERC20Transformer.isTokenETH(inputToken)) {\n // Token is not ETH, so pull ERC20 tokens.\n ITokenSpender(address(this))._spendERC20Tokens(\n inputToken,\n from,\n to,\n amount\n );\n } else if (msg.value < amount) {\n // Token is ETH, so the caller must attach enough ETH to the call.\n LibTransformERC20RichErrors.InsufficientEthAttachedError(\n msg.value,\n amount\n ).rrevert();\n }\n }\n\n /// @dev Executs a transformer in the context of `wallet`.\n /// @param wallet The wallet instance.\n /// @param transformation The transformation.\n /// @param transformerDeployer The address of the transformer deployer.\n /// @param taker The taker address.\n /// @param callDataHash Hash of the calldata.\n function _executeTransformation(\n IFlashWallet wallet,\n Transformation memory transformation,\n address transformerDeployer,\n address payable taker,\n bytes32 callDataHash\n )\n private\n {\n // Derive the transformer address from the deployment nonce.\n address payable transformer = LibERC20Transformer.getDeployedAddress(\n transformerDeployer,\n transformation.deploymentNonce\n );\n // Call `transformer.transform()` as the wallet.\n bytes memory resultData = wallet.executeDelegateCall(\n // The call target.\n transformer,\n // Call data.\n abi.encodeWithSelector(\n IERC20Transformer.transform.selector,\n callDataHash,\n taker,\n transformation.data\n )\n );\n // Ensure the transformer returned the magic bytes.\n if (resultData.length != 32 ||\n abi.decode(resultData, (bytes4)) != LibERC20Transformer.TRANSFORMER_SUCCESS\n ) {\n LibTransformERC20RichErrors.TransformerFailedError(\n transformer,\n transformation.data,\n resultData\n ).rrevert();\n }\n }\n}\n",
"../errors/LibTransformERC20RichErrors.sol": "/*\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 LibTransformERC20RichErrors {\n\n // solhint-disable func-name-mixedcase,separate-by-one-line-in-contract\n\n function InsufficientEthAttachedError(\n uint256 ethAttached,\n uint256 ethNeeded\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"InsufficientEthAttachedError(uint256,uint256)\")),\n ethAttached,\n ethNeeded\n );\n }\n\n function IncompleteTransformERC20Error(\n address outputToken,\n uint256 outputTokenAmount,\n uint256 minOutputTokenAmount\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"IncompleteTransformERC20Error(address,uint256,uint256)\")),\n outputToken,\n outputTokenAmount,\n minOutputTokenAmount\n );\n }\n\n function NegativeTransformERC20OutputError(\n address outputToken,\n uint256 outputTokenLostAmount\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"NegativeTransformERC20OutputError(address,uint256)\")),\n outputToken,\n outputTokenLostAmount\n );\n }\n\n function TransformerFailedError(\n address transformer,\n bytes memory transformerData,\n bytes memory resultData\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"TransformerFailedError(address,bytes,bytes)\")),\n transformer,\n transformerData,\n resultData\n );\n }\n\n // Common Transformer errors ///////////////////////////////////////////////\n\n function OnlyCallableByDeployerError(\n address caller,\n address deployer\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"OnlyCallableByDeployerError(address,address)\")),\n caller,\n deployer\n );\n }\n\n function InvalidExecutionContextError(\n address actualContext,\n address expectedContext\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"InvalidExecutionContextError(address,address)\")),\n actualContext,\n expectedContext\n );\n }\n\n enum InvalidTransformDataErrorCode {\n INVALID_TOKENS,\n INVALID_ARRAY_LENGTH\n }\n\n function InvalidTransformDataError(\n InvalidTransformDataErrorCode errorCode,\n bytes memory transformData\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"InvalidTransformDataError(uint8,bytes)\")),\n errorCode,\n transformData\n );\n }\n\n // FillQuoteTransformer errors /////////////////////////////////////////////\n\n function IncompleteFillSellQuoteError(\n address sellToken,\n uint256 soldAmount,\n uint256 sellAmount\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"IncompleteFillSellQuoteError(address,uint256,uint256)\")),\n sellToken,\n soldAmount,\n sellAmount\n );\n }\n\n function IncompleteFillBuyQuoteError(\n address buyToken,\n uint256 boughtAmount,\n uint256 buyAmount\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"IncompleteFillBuyQuoteError(address,uint256,uint256)\")),\n buyToken,\n boughtAmount,\n buyAmount\n );\n }\n\n function InsufficientTakerTokenError(\n uint256 tokenBalance,\n uint256 tokensNeeded\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"InsufficientTakerTokenError(uint256,uint256)\")),\n tokenBalance,\n tokensNeeded\n );\n }\n\n function InsufficientProtocolFeeError(\n uint256 ethBalance,\n uint256 ethNeeded\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"InsufficientProtocolFeeError(uint256,uint256)\")),\n ethBalance,\n ethNeeded\n );\n }\n\n function InvalidERC20AssetDataError(\n bytes memory assetData\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"InvalidERC20AssetDataError(bytes)\")),\n assetData\n );\n }\n\n function InvalidTakerFeeTokenError(\n address token\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"InvalidTakerFeeTokenError(address)\")),\n token\n );\n }\n}\n",
"../external/IFlashWallet.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/interfaces/IOwnableV06.sol\";\n\n\n/// @dev A contract that can execute arbitrary calls from its owner.\ninterface IFlashWallet {\n\n /// @dev Execute an arbitrary call. Only an authority can call this.\n /// @param target The call target.\n /// @param callData The call data.\n /// @param value Ether to attach to the call.\n /// @return resultData The data returned by the call.\n function executeCall(\n address payable target,\n bytes calldata callData,\n uint256 value\n )\n external\n payable\n returns (bytes memory resultData);\n\n /// @dev Execute an arbitrary delegatecall, in the context of this puppet.\n /// Only an authority can call this.\n /// @param target The call target.\n /// @param callData The call data.\n /// @return resultData The data returned by the call.\n function executeDelegateCall(\n address payable target,\n bytes calldata callData\n )\n external\n payable\n returns (bytes memory resultData);\n\n /// @dev Allows the puppet to receive ETH.\n receive() external payable;\n\n /// @dev Fetch the immutable owner/deployer of this contract.\n /// @return owner_ The immutable owner/deployer/\n function owner() external view returns (address owner_);\n}\n",
"../external/FlashWallet.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibOwnableRichErrorsV06.sol\";\nimport \"../errors/LibWalletRichErrors.sol\";\nimport \"./IFlashWallet.sol\";\n\n\n/// @dev A contract that can execute arbitrary calls from its owner.\ncontract FlashWallet is\n IFlashWallet\n{\n // solhint-disable no-unused-vars,indent,no-empty-blocks\n using LibRichErrorsV06 for bytes;\n\n // solhint-disable\n /// @dev Store the owner/deployer as an immutable to make this contract stateless.\n address public override immutable owner;\n // solhint-enable\n\n constructor() public {\n // The deployer is the owner.\n owner = msg.sender;\n }\n\n /// @dev Allows only the (immutable) owner to call a function.\n modifier onlyOwner() virtual {\n if (msg.sender != owner) {\n LibOwnableRichErrorsV06.OnlyOwnerError(\n msg.sender,\n owner\n ).rrevert();\n }\n _;\n }\n\n /// @dev Execute an arbitrary call. Only an authority can call this.\n /// @param target The call target.\n /// @param callData The call data.\n /// @param value Ether to attach to the call.\n /// @return resultData The data returned by the call.\n function executeCall(\n address payable target,\n bytes calldata callData,\n uint256 value\n )\n external\n payable\n override\n onlyOwner\n returns (bytes memory resultData)\n {\n bool success;\n (success, resultData) = target.call{value: value}(callData);\n if (!success) {\n LibWalletRichErrors\n .WalletExecuteCallFailedError(\n address(this),\n target,\n callData,\n value,\n resultData\n )\n .rrevert();\n }\n }\n\n /// @dev Execute an arbitrary delegatecall, in the context of this puppet.\n /// Only an authority can call this.\n /// @param target The call target.\n /// @param callData The call data.\n /// @return resultData The data returned by the call.\n function executeDelegateCall(\n address payable target,\n bytes calldata callData\n )\n external\n payable\n override\n onlyOwner\n returns (bytes memory resultData)\n {\n bool success;\n (success, resultData) = target.delegatecall(callData);\n if (!success) {\n LibWalletRichErrors\n .WalletExecuteDelegateCallFailedError(\n address(this),\n target,\n callData,\n resultData\n )\n .rrevert();\n }\n }\n\n // solhint-disable\n /// @dev Allows this contract to receive ether.\n receive() external override payable {}\n // solhint-enable\n\n /// @dev Signal support for receiving ERC1155 tokens.\n /// @param interfaceID The interface ID, as per ERC-165 rules.\n /// @return hasSupport `true` if this contract supports an ERC-165 interface.\n function supportsInterface(bytes4 interfaceID)\n external\n pure\n returns (bool hasSupport)\n {\n return interfaceID == this.supportsInterface.selector ||\n interfaceID == this.onERC1155Received.selector ^ this.onERC1155BatchReceived.selector ||\n interfaceID == this.tokenFallback.selector;\n }\n\n /// @dev Allow this contract to receive ERC1155 tokens.\n /// @return success `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n function onERC1155Received(\n address, // operator,\n address, // from,\n uint256, // id,\n uint256, // value,\n bytes calldata //data\n )\n external\n pure\n returns (bytes4 success)\n {\n return this.onERC1155Received.selector;\n }\n\n /// @dev Allow this contract to receive ERC1155 tokens.\n /// @return success `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n function onERC1155BatchReceived(\n address, // operator,\n address, // from,\n uint256[] calldata, // ids,\n uint256[] calldata, // values,\n bytes calldata // data\n )\n external\n pure\n returns (bytes4 success)\n {\n return this.onERC1155BatchReceived.selector;\n }\n\n /// @dev Allows this contract to receive ERC223 tokens.\n function tokenFallback(\n address, // from,\n uint256, // value,\n bytes calldata // value\n )\n external\n pure\n {}\n}\n",
"@0x/contracts-utils/contracts/src/v06/errors/LibOwnableRichErrorsV06.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\npragma solidity ^0.6.5;\n\n\nlibrary LibOwnableRichErrorsV06 {\n\n // bytes4(keccak256(\"OnlyOwnerError(address,address)\"))\n bytes4 internal constant ONLY_OWNER_ERROR_SELECTOR =\n 0x1de45ad1;\n\n // bytes4(keccak256(\"TransferOwnerToZeroError()\"))\n bytes internal constant TRANSFER_OWNER_TO_ZERO_ERROR_BYTES =\n hex\"e69edc3e\";\n\n // solhint-disable func-name-mixedcase\n function OnlyOwnerError(\n address sender,\n address owner\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n ONLY_OWNER_ERROR_SELECTOR,\n sender,\n owner\n );\n }\n\n function TransferOwnerToZeroError()\n internal\n pure\n returns (bytes memory)\n {\n return TRANSFER_OWNER_TO_ZERO_ERROR_BYTES;\n }\n}\n",
"../errors/LibWalletRichErrors.sol": "/*\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 LibWalletRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function WalletExecuteCallFailedError(\n address wallet,\n address callTarget,\n bytes memory callData,\n uint256 callValue,\n bytes memory errorData\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"WalletExecuteCallFailedError(address,address,bytes,uint256,bytes)\")),\n wallet,\n callTarget,\n callData,\n callValue,\n errorData\n );\n }\n\n function WalletExecuteDelegateCallFailedError(\n address wallet,\n address callTarget,\n bytes memory callData,\n bytes memory errorData\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"WalletExecuteDelegateCallFailedError(address,address,bytes,bytes)\")),\n wallet,\n callTarget,\n callData,\n errorData\n );\n }\n}\n",
"../storage/LibTransformERC20Storage.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"./LibStorage.sol\";\nimport \"../external/IFlashWallet.sol\";\n\n\n/// @dev Storage helpers for the `TokenSpender` feature.\nlibrary LibTransformERC20Storage {\n\n /// @dev Storage bucket for this feature.\n struct Storage {\n // The current wallet instance.\n IFlashWallet wallet;\n // The transformer deployer address.\n address transformerDeployer;\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.TransformERC20\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",
"../transformers/IERC20Transformer.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol\";\n\n\n/// @dev A transformation callback used in `TransformERC20.transformERC20()`.\ninterface IERC20Transformer {\n\n /// @dev Called from `TransformERC20.transformERC20()`. This will be\n /// delegatecalled in the context of the FlashWallet instance being used.\n /// @param callDataHash The hash of the `TransformERC20.transformERC20()` calldata.\n /// @param taker The taker address (caller of `TransformERC20.transformERC20()`).\n /// @param data Arbitrary data to pass to the transformer.\n /// @return success The success bytes (`LibERC20Transformer.TRANSFORMER_SUCCESS`).\n function transform(\n bytes32 callDataHash,\n address payable taker,\n bytes calldata data\n )\n external\n returns (bytes4 success);\n}\n",
"../transformers/LibERC20Transformer.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol\";\nimport \"@0x/contracts-erc20/contracts/src/v06/LibERC20TokenV06.sol\";\n\n\nlibrary LibERC20Transformer {\n\n using LibERC20TokenV06 for IERC20TokenV06;\n\n /// @dev ETH pseudo-token address.\n address constant internal ETH_TOKEN_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n /// @dev Return value indicating success in `IERC20Transformer.transform()`.\n /// This is just `keccak256('TRANSFORMER_SUCCESS')`.\n bytes4 constant internal TRANSFORMER_SUCCESS = 0x13c9929e;\n\n /// @dev Transfer ERC20 tokens and ETH.\n /// @param token An ERC20 or the ETH pseudo-token address (`ETH_TOKEN_ADDRESS`).\n /// @param to The recipient.\n /// @param amount The transfer amount.\n function transformerTransfer(\n IERC20TokenV06 token,\n address payable to,\n uint256 amount\n )\n internal\n {\n if (isTokenETH(token)) {\n to.transfer(amount);\n } else {\n token.compatTransfer(to, amount);\n }\n }\n\n /// @dev Check if a token is the ETH pseudo-token.\n /// @param token The token to check.\n /// @return isETH `true` if the token is the ETH pseudo-token.\n function isTokenETH(IERC20TokenV06 token)\n internal\n pure\n returns (bool isETH)\n {\n return address(token) == ETH_TOKEN_ADDRESS;\n }\n\n /// @dev Check the balance of an ERC20 token or ETH.\n /// @param token An ERC20 or the ETH pseudo-token address (`ETH_TOKEN_ADDRESS`).\n /// @param owner Holder of the tokens.\n /// @return tokenBalance The balance of `owner`.\n function getTokenBalanceOf(IERC20TokenV06 token, address owner)\n internal\n view\n returns (uint256 tokenBalance)\n {\n if (isTokenETH(token)) {\n return owner.balance;\n }\n return token.balanceOf(owner);\n }\n\n /// @dev RLP-encode a 32-bit or less account nonce.\n /// @param nonce A positive integer in the range 0 <= nonce < 2^32.\n /// @return rlpNonce The RLP encoding.\n function rlpEncodeNonce(uint32 nonce)\n internal\n pure\n returns (bytes memory rlpNonce)\n {\n // See https://github.com/ethereum/wiki/wiki/RLP for RLP encoding rules.\n if (nonce == 0) {\n rlpNonce = new bytes(1);\n rlpNonce[0] = 0x80;\n } else if (nonce < 0x80) {\n rlpNonce = new bytes(1);\n rlpNonce[0] = byte(uint8(nonce));\n } else if (nonce <= 0xFF) {\n rlpNonce = new bytes(2);\n rlpNonce[0] = 0x81;\n rlpNonce[1] = byte(uint8(nonce));\n } else if (nonce <= 0xFFFF) {\n rlpNonce = new bytes(3);\n rlpNonce[0] = 0x82;\n rlpNonce[1] = byte(uint8((nonce & 0xFF00) >> 8));\n rlpNonce[2] = byte(uint8(nonce));\n } else if (nonce <= 0xFFFFFF) {\n rlpNonce = new bytes(4);\n rlpNonce[0] = 0x83;\n rlpNonce[1] = byte(uint8((nonce & 0xFF0000) >> 16));\n rlpNonce[2] = byte(uint8((nonce & 0xFF00) >> 8));\n rlpNonce[3] = byte(uint8(nonce));\n } else {\n rlpNonce = new bytes(5);\n rlpNonce[0] = 0x84;\n rlpNonce[1] = byte(uint8((nonce & 0xFF000000) >> 24));\n rlpNonce[2] = byte(uint8((nonce & 0xFF0000) >> 16));\n rlpNonce[3] = byte(uint8((nonce & 0xFF00) >> 8));\n rlpNonce[4] = byte(uint8(nonce));\n }\n }\n\n /// @dev Compute the expected deployment address by `deployer` at\n /// the nonce given by `deploymentNonce`.\n /// @param deployer The address of the deployer.\n /// @param deploymentNonce The nonce that the deployer had when deploying\n /// a contract.\n /// @return deploymentAddress The deployment address.\n function getDeployedAddress(address deployer, uint32 deploymentNonce)\n internal\n pure\n returns (address payable deploymentAddress)\n {\n // The address of if a deployed contract is the lower 20 bytes of the\n // hash of the RLP-encoded deployer's account address + account nonce.\n // See: https://ethereum.stackexchange.com/questions/760/how-is-the-address-of-an-ethereum-contract-computed\n bytes memory rlpNonce = rlpEncodeNonce(deploymentNonce);\n return address(uint160(uint256(keccak256(abi.encodePacked(\n byte(uint8(0xC0 + 21 + rlpNonce.length)),\n byte(uint8(0x80 + 20)),\n deployer,\n rlpNonce\n )))));\n }\n}\n",
"../features/ITransformERC20.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol\";\nimport \"../transformers/IERC20Transformer.sol\";\nimport \"../external/IFlashWallet.sol\";\n\n\n/// @dev Feature to composably transform between ERC20 tokens.\ninterface ITransformERC20 {\n\n /// @dev Defines a transformation to run in `transformERC20()`.\n struct Transformation {\n // The deployment nonce for the transformer.\n // The address of the transformer contract will be derived from this\n // value.\n uint32 deploymentNonce;\n // Arbitrary data to pass to the transformer.\n bytes data;\n }\n\n /// @dev Raised upon a successful `transformERC20`.\n /// @param taker The taker (caller) address.\n /// @param inputToken The token being provided by the taker.\n /// If `0xeee...`, ETH is implied and should be provided with the call.`\n /// @param outputToken The token to be acquired by the taker.\n /// `0xeee...` implies ETH.\n /// @param inputTokenAmount The amount of `inputToken` to take from the taker.\n /// @param outputTokenAmount The amount of `outputToken` received by the taker.\n event TransformedERC20(\n address indexed taker,\n address inputToken,\n address outputToken,\n uint256 inputTokenAmount,\n uint256 outputTokenAmount\n );\n\n /// @dev Raised when `setTransformerDeployer()` is called.\n /// @param transformerDeployer The new deployer address.\n event TransformerDeployerUpdated(address transformerDeployer);\n\n /// @dev Replace the allowed deployer for transformers.\n /// Only callable by the owner.\n /// @param transformerDeployer The address of the trusted deployer for transformers.\n function setTransformerDeployer(address transformerDeployer)\n external;\n\n /// @dev Deploy a new flash wallet instance and replace the current one with it.\n /// Useful if we somehow break the current wallet instance.\n /// Anyone can call this.\n /// @return wallet The new wallet instance.\n function createTransformWallet()\n external\n returns (IFlashWallet wallet);\n\n /// @dev Executes a series of transformations to convert an ERC20 `inputToken`\n /// to an ERC20 `outputToken`.\n /// @param inputToken The token being provided by the sender.\n /// If `0xeee...`, ETH is implied and should be provided with the call.`\n /// @param outputToken The token to be acquired by the sender.\n /// `0xeee...` implies ETH.\n /// @param inputTokenAmount The amount of `inputToken` to take from the sender.\n /// @param minOutputTokenAmount The minimum amount of `outputToken` the sender\n /// must receive for the entire transformation to succeed.\n /// @param transformations The transformations to execute on the token balance(s)\n /// in sequence.\n /// @return outputTokenAmount The amount of `outputToken` received by the sender.\n function transformERC20(\n IERC20TokenV06 inputToken,\n IERC20TokenV06 outputToken,\n uint256 inputTokenAmount,\n uint256 minOutputTokenAmount,\n Transformation[] calldata transformations\n )\n external\n payable\n returns (uint256 outputTokenAmount);\n\n /// @dev Internal version of `transformERC20()`. Only callable from within.\n /// @param callDataHash Hash of the ingress calldata.\n /// @param taker The taker address.\n /// @param inputToken The token being provided by the taker.\n /// If `0xeee...`, ETH is implied and should be provided with the call.`\n /// @param outputToken The token to be acquired by the taker.\n /// `0xeee...` implies ETH.\n /// @param inputTokenAmount The amount of `inputToken` to take from the taker.\n /// @param minOutputTokenAmount The minimum amount of `outputToken` the taker\n /// must receive for the entire transformation to succeed.\n /// @param transformations The transformations to execute on the token balance(s)\n /// in sequence.\n /// @return outputTokenAmount The amount of `outputToken` received by the taker.\n function _transformERC20(\n bytes32 callDataHash,\n address payable taker,\n IERC20TokenV06 inputToken,\n IERC20TokenV06 outputToken,\n uint256 inputTokenAmount,\n uint256 minOutputTokenAmount,\n Transformation[] calldata transformations\n )\n external\n payable\n returns (uint256 outputTokenAmount);\n\n /// @dev Return the current wallet instance that will serve as the execution\n /// context for transformations.\n /// @return wallet The wallet instance.\n function getTransformWallet()\n external\n view\n returns (IFlashWallet wallet);\n\n /// @dev Return the allowed deployer for transformers.\n /// @return deployer The transform deployer address.\n function getTransformerDeployer()\n external\n view\n returns (address deployer);\n}\n",
"../external/AllowanceTarget.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"@0x/contracts-utils/contracts/src/v06/AuthorizableV06.sol\";\nimport \"../errors/LibSpenderRichErrors.sol\";\nimport \"./IAllowanceTarget.sol\";\n\n\n/// @dev The allowance target for the TokenSpender feature.\ncontract AllowanceTarget is\n IAllowanceTarget,\n AuthorizableV06\n{\n // solhint-disable no-unused-vars,indent,no-empty-blocks\n using LibRichErrorsV06 for bytes;\n\n /// @dev Execute an arbitrary call. Only an authority can call this.\n /// @param target The call target.\n /// @param callData The call data.\n /// @return resultData The data returned by the call.\n function executeCall(\n address payable target,\n bytes calldata callData\n )\n external\n override\n onlyAuthorized\n returns (bytes memory resultData)\n {\n bool success;\n (success, resultData) = target.call(callData);\n if (!success) {\n resultData.rrevert();\n }\n }\n}\n",
"@0x/contracts-utils/contracts/src/v06/AuthorizableV06.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\nimport \"./interfaces/IAuthorizableV06.sol\";\nimport \"./errors/LibRichErrorsV06.sol\";\nimport \"./errors/LibAuthorizableRichErrorsV06.sol\";\nimport \"./OwnableV06.sol\";\n\n\n// solhint-disable no-empty-blocks\ncontract AuthorizableV06 is\n OwnableV06,\n IAuthorizableV06\n{\n /// @dev Only authorized addresses can invoke functions with this modifier.\n modifier onlyAuthorized {\n _assertSenderIsAuthorized();\n _;\n }\n\n // @dev Whether an address is authorized to call privileged functions.\n // @param 0 Address to query.\n // @return 0 Whether the address is authorized.\n mapping (address => bool) public override authorized;\n // @dev Whether an address is authorized to call privileged functions.\n // @param 0 Index of authorized address.\n // @return 0 Authorized address.\n address[] public override authorities;\n\n /// @dev Initializes the `owner` address.\n constructor()\n public\n OwnableV06()\n {}\n\n /// @dev Authorizes an address.\n /// @param target Address to authorize.\n function addAuthorizedAddress(address target)\n external\n override\n onlyOwner\n {\n _addAuthorizedAddress(target);\n }\n\n /// @dev Removes authorizion of an address.\n /// @param target Address to remove authorization from.\n function removeAuthorizedAddress(address target)\n external\n override\n onlyOwner\n {\n if (!authorized[target]) {\n LibRichErrorsV06.rrevert(LibAuthorizableRichErrorsV06.TargetNotAuthorizedError(target));\n }\n for (uint256 i = 0; i < authorities.length; i++) {\n if (authorities[i] == target) {\n _removeAuthorizedAddressAtIndex(target, i);\n break;\n }\n }\n }\n\n /// @dev Removes authorizion of an address.\n /// @param target Address to remove authorization from.\n /// @param index Index of target in authorities array.\n function removeAuthorizedAddressAtIndex(\n address target,\n uint256 index\n )\n external\n override\n onlyOwner\n {\n _removeAuthorizedAddressAtIndex(target, index);\n }\n\n /// @dev Gets all authorized addresses.\n /// @return Array of authorized addresses.\n function getAuthorizedAddresses()\n external\n override\n view\n returns (address[] memory)\n {\n return authorities;\n }\n\n /// @dev Reverts if msg.sender is not authorized.\n function _assertSenderIsAuthorized()\n internal\n view\n {\n if (!authorized[msg.sender]) {\n LibRichErrorsV06.rrevert(LibAuthorizableRichErrorsV06.SenderNotAuthorizedError(msg.sender));\n }\n }\n\n /// @dev Authorizes an address.\n /// @param target Address to authorize.\n function _addAuthorizedAddress(address target)\n internal\n {\n // Ensure that the target is not the zero address.\n if (target == address(0)) {\n LibRichErrorsV06.rrevert(LibAuthorizableRichErrorsV06.ZeroCantBeAuthorizedError());\n }\n\n // Ensure that the target is not already authorized.\n if (authorized[target]) {\n LibRichErrorsV06.rrevert(LibAuthorizableRichErrorsV06.TargetAlreadyAuthorizedError(target));\n }\n\n authorized[target] = true;\n authorities.push(target);\n emit AuthorizedAddressAdded(target, msg.sender);\n }\n\n /// @dev Removes authorizion of an address.\n /// @param target Address to remove authorization from.\n /// @param index Index of target in authorities array.\n function _removeAuthorizedAddressAtIndex(\n address target,\n uint256 index\n )\n internal\n {\n if (!authorized[target]) {\n LibRichErrorsV06.rrevert(LibAuthorizableRichErrorsV06.TargetNotAuthorizedError(target));\n }\n if (index >= authorities.length) {\n LibRichErrorsV06.rrevert(LibAuthorizableRichErrorsV06.IndexOutOfBoundsError(\n index,\n authorities.length\n ));\n }\n if (authorities[index] != target) {\n LibRichErrorsV06.rrevert(LibAuthorizableRichErrorsV06.AuthorizedAddressMismatchError(\n authorities[index],\n target\n ));\n }\n\n delete authorized[target];\n authorities[index] = authorities[authorities.length - 1];\n authorities.pop();\n emit AuthorizedAddressRemoved(target, msg.sender);\n }\n}\n",
"@0x/contracts-utils/contracts/src/v06/errors/LibAuthorizableRichErrorsV06.sol": "/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibAuthorizableRichErrorsV06 {\n\n // bytes4(keccak256(\"AuthorizedAddressMismatchError(address,address)\"))\n bytes4 internal constant AUTHORIZED_ADDRESS_MISMATCH_ERROR_SELECTOR =\n 0x140a84db;\n\n // bytes4(keccak256(\"IndexOutOfBoundsError(uint256,uint256)\"))\n bytes4 internal constant INDEX_OUT_OF_BOUNDS_ERROR_SELECTOR =\n 0xe9f83771;\n\n // bytes4(keccak256(\"SenderNotAuthorizedError(address)\"))\n bytes4 internal constant SENDER_NOT_AUTHORIZED_ERROR_SELECTOR =\n 0xb65a25b9;\n\n // bytes4(keccak256(\"TargetAlreadyAuthorizedError(address)\"))\n bytes4 internal constant TARGET_ALREADY_AUTHORIZED_ERROR_SELECTOR =\n 0xde16f1a0;\n\n // bytes4(keccak256(\"TargetNotAuthorizedError(address)\"))\n bytes4 internal constant TARGET_NOT_AUTHORIZED_ERROR_SELECTOR =\n 0xeb5108a2;\n\n // bytes4(keccak256(\"ZeroCantBeAuthorizedError()\"))\n bytes internal constant ZERO_CANT_BE_AUTHORIZED_ERROR_BYTES =\n hex\"57654fe4\";\n\n // solhint-disable func-name-mixedcase\n function AuthorizedAddressMismatchError(\n address authorized,\n address target\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n AUTHORIZED_ADDRESS_MISMATCH_ERROR_SELECTOR,\n authorized,\n target\n );\n }\n\n function IndexOutOfBoundsError(\n uint256 index,\n uint256 length\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n INDEX_OUT_OF_BOUNDS_ERROR_SELECTOR,\n index,\n length\n );\n }\n\n function SenderNotAuthorizedError(address sender)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n SENDER_NOT_AUTHORIZED_ERROR_SELECTOR,\n sender\n );\n }\n\n function TargetAlreadyAuthorizedError(address target)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n TARGET_ALREADY_AUTHORIZED_ERROR_SELECTOR,\n target\n );\n }\n\n function TargetNotAuthorizedError(address target)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n TARGET_NOT_AUTHORIZED_ERROR_SELECTOR,\n target\n );\n }\n\n function ZeroCantBeAuthorizedError()\n internal\n pure\n returns (bytes memory)\n {\n return ZERO_CANT_BE_AUTHORIZED_ERROR_BYTES;\n }\n}\n",
"@0x/contracts-utils/contracts/src/v06/OwnableV06.sol": "/*\n\n Copyright 2019 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\nimport \"./interfaces/IOwnableV06.sol\";\nimport \"./errors/LibRichErrorsV06.sol\";\nimport \"./errors/LibOwnableRichErrorsV06.sol\";\n\n\ncontract OwnableV06 is\n IOwnableV06\n{\n /// @dev The owner of this contract.\n /// @return 0 The owner address.\n address public override owner;\n\n constructor() public {\n owner = msg.sender;\n }\n\n modifier onlyOwner() {\n _assertSenderIsOwner();\n _;\n }\n\n /// @dev Change the owner of this contract.\n /// @param newOwner New owner address.\n function transferOwnership(address newOwner)\n public\n override\n onlyOwner\n {\n if (newOwner == address(0)) {\n LibRichErrorsV06.rrevert(LibOwnableRichErrorsV06.TransferOwnerToZeroError());\n } else {\n owner = newOwner;\n emit OwnershipTransferred(msg.sender, newOwner);\n }\n }\n\n function _assertSenderIsOwner()\n internal\n view\n {\n if (msg.sender != owner) {\n LibRichErrorsV06.rrevert(LibOwnableRichErrorsV06.OnlyOwnerError(\n msg.sender,\n owner\n ));\n }\n }\n}\n",
"./InitialMigration.sol": "/*\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 \"../ZeroEx.sol\";\nimport \"../features/IBootstrap.sol\";\nimport \"../features/SimpleFunctionRegistry.sol\";\nimport \"../features/Ownable.sol\";\nimport \"./LibBootstrap.sol\";\n\n\n/// @dev A contract for deploying and configuring a minimal ZeroEx contract.\ncontract InitialMigration {\n\n /// @dev Features to bootstrap into the the proxy contract.\n struct BootstrapFeatures {\n SimpleFunctionRegistry registry;\n Ownable ownable;\n }\n\n /// @dev The allowed caller of `deploy()`. In production, this would be\n /// the governor.\n address public immutable deployer;\n /// @dev The real address of this contract.\n address private immutable _implementation;\n\n /// @dev Instantiate this contract and set the allowed caller of `deploy()`\n /// to `deployer_`.\n /// @param deployer_ The allowed caller of `deploy()`.\n constructor(address deployer_) public {\n deployer = deployer_;\n _implementation = address(this);\n }\n\n /// @dev Deploy the `ZeroEx` contract with the minimum feature set,\n /// transfers ownership to `owner`, then self-destructs.\n /// Only callable by `deployer` set in the contstructor.\n /// @param owner The owner of the contract.\n /// @param features Features to bootstrap into the proxy.\n /// @return zeroEx The deployed and configured `ZeroEx` contract.\n function deploy(address payable owner, BootstrapFeatures memory features)\n public\n virtual\n returns (ZeroEx zeroEx)\n {\n // Must be called by the allowed deployer.\n require(msg.sender == deployer, \"InitialMigration/INVALID_SENDER\");\n\n // Deploy the ZeroEx contract, setting ourselves as the bootstrapper.\n zeroEx = new ZeroEx();\n\n // Bootstrap the initial feature set.\n IBootstrap(address(zeroEx)).bootstrap(\n address(this),\n abi.encodeWithSelector(this.bootstrap.selector, owner, features)\n );\n\n // Self-destruct. This contract should not hold any funds but we send\n // them to the owner just in case.\n this.die(owner);\n }\n\n /// @dev Sets up the initial state of the `ZeroEx` contract.\n /// The `ZeroEx` contract will delegatecall into this function.\n /// @param owner The new owner of the ZeroEx contract.\n /// @param features Features to bootstrap into the proxy.\n /// @return success Magic bytes if successful.\n function bootstrap(address owner, BootstrapFeatures memory features)\n public\n virtual\n returns (bytes4 success)\n {\n // Deploy and migrate the initial features.\n // Order matters here.\n\n // Initialize Registry.\n LibBootstrap.delegatecallBootstrapFunction(\n address(features.registry),\n abi.encodeWithSelector(\n SimpleFunctionRegistry.bootstrap.selector\n )\n );\n\n // Initialize Ownable.\n LibBootstrap.delegatecallBootstrapFunction(\n address(features.ownable),\n abi.encodeWithSelector(\n Ownable.bootstrap.selector\n )\n );\n\n // De-register `SimpleFunctionRegistry._extendSelf`.\n SimpleFunctionRegistry(address(this)).rollback(\n SimpleFunctionRegistry._extendSelf.selector,\n address(0)\n );\n\n // Transfer ownership to the real owner.\n Ownable(address(this)).transferOwnership(owner);\n\n success = LibBootstrap.BOOTSTRAP_SUCCESS;\n }\n\n /// @dev Self-destructs this contract. Only callable by this contract.\n /// @param ethRecipient Who to transfer outstanding ETH to.\n function die(address payable ethRecipient) public virtual {\n require(msg.sender == _implementation, \"InitialMigration/INVALID_SENDER\");\n selfdestruct(ethRecipient);\n }\n}\n",
"../features/SimpleFunctionRegistry.sol": "/*\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 \"../fixins/FixinCommon.sol\";\nimport \"../storage/LibProxyStorage.sol\";\nimport \"../storage/LibSimpleFunctionRegistryStorage.sol\";\nimport \"../errors/LibSimpleFunctionRegistryRichErrors.sol\";\nimport \"../migrations/LibBootstrap.sol\";\nimport \"./IFeature.sol\";\nimport \"./ISimpleFunctionRegistry.sol\";\n\n\n/// @dev Basic registry management features.\ncontract SimpleFunctionRegistry is\n IFeature,\n ISimpleFunctionRegistry,\n FixinCommon\n{\n // solhint-disable\n /// @dev Name of this feature.\n string public constant override FEATURE_NAME = \"SimpleFunctionRegistry\";\n /// @dev Version of this feature.\n uint256 public immutable override FEATURE_VERSION = _encodeVersion(1, 0, 0);\n /// @dev The deployed address of this contract.\n address private immutable _implementation;\n // solhint-enable\n\n using LibRichErrorsV06 for bytes;\n\n constructor() public {\n _implementation = address(this);\n }\n\n /// @dev Initializes this feature, registering its own functions.\n /// @return success Magic bytes if successful.\n function bootstrap()\n external\n returns (bytes4 success)\n {\n // Register the registration functions (inception vibes).\n _extend(this.extend.selector, _implementation);\n _extend(this._extendSelf.selector, _implementation);\n // Register the rollback function.\n _extend(this.rollback.selector, _implementation);\n // Register getters.\n _extend(this.getRollbackLength.selector, _implementation);\n _extend(this.getRollbackEntryAtIndex.selector, _implementation);\n return LibBootstrap.BOOTSTRAP_SUCCESS;\n }\n\n /// @dev Roll back to a prior implementation of a function.\n /// Only directly callable by an authority.\n /// @param selector The function selector.\n /// @param targetImpl The address of an older implementation of the function.\n function rollback(bytes4 selector, address targetImpl)\n external\n override\n onlyOwner\n {\n (\n LibSimpleFunctionRegistryStorage.Storage storage stor,\n LibProxyStorage.Storage storage proxyStor\n ) = _getStorages();\n\n address currentImpl = proxyStor.impls[selector];\n if (currentImpl == targetImpl) {\n // Do nothing if already at targetImpl.\n return;\n }\n // Walk history backwards until we find the target implementation.\n address[] storage history = stor.implHistory[selector];\n uint256 i = history.length;\n for (; i > 0; --i) {\n address impl = history[i - 1];\n history.pop();\n if (impl == targetImpl) {\n break;\n }\n }\n if (i == 0) {\n LibSimpleFunctionRegistryRichErrors.NotInRollbackHistoryError(\n selector,\n targetImpl\n ).rrevert();\n }\n proxyStor.impls[selector] = targetImpl;\n emit ProxyFunctionUpdated(selector, currentImpl, targetImpl);\n }\n\n /// @dev Register or replace a function.\n /// Only directly callable by an authority.\n /// @param selector The function selector.\n /// @param impl The implementation contract for the function.\n function extend(bytes4 selector, address impl)\n external\n override\n onlyOwner\n {\n _extend(selector, impl);\n }\n\n /// @dev Register or replace a function.\n /// Only callable from within.\n /// This function is only used during the bootstrap process and\n /// should be deregistered by the deployer after bootstrapping is\n /// complete.\n /// @param selector The function selector.\n /// @param impl The implementation contract for the function.\n function _extendSelf(bytes4 selector, address impl)\n external\n onlySelf\n {\n _extend(selector, impl);\n }\n\n /// @dev Retrieve the length of the rollback history for a function.\n /// @param selector The function selector.\n /// @return rollbackLength The number of items in the rollback history for\n /// the function.\n function getRollbackLength(bytes4 selector)\n external\n override\n view\n returns (uint256 rollbackLength)\n {\n return LibSimpleFunctionRegistryStorage.getStorage().implHistory[selector].length;\n }\n\n /// @dev Retrieve an entry in the rollback history for a function.\n /// @param selector The function selector.\n /// @param idx The index in the rollback history.\n /// @return impl An implementation address for the function at\n /// index `idx`.\n function getRollbackEntryAtIndex(bytes4 selector, uint256 idx)\n external\n override\n view\n returns (address impl)\n {\n return LibSimpleFunctionRegistryStorage.getStorage().implHistory[selector][idx];\n }\n\n /// @dev Register or replace a function.\n /// @param selector The function selector.\n /// @param impl The implementation contract for the function.\n function _extend(bytes4 selector, address impl)\n private\n {\n (\n LibSimpleFunctionRegistryStorage.Storage storage stor,\n LibProxyStorage.Storage storage proxyStor\n ) = _getStorages();\n\n address oldImpl = proxyStor.impls[selector];\n address[] storage history = stor.implHistory[selector];\n history.push(oldImpl);\n proxyStor.impls[selector] = impl;\n emit ProxyFunctionUpdated(selector, oldImpl, impl);\n }\n\n /// @dev Get the storage buckets for this feature and the proxy.\n /// @return stor Storage bucket for this feature.\n /// @return proxyStor age bucket for the proxy.\n function _getStorages()\n private\n pure\n returns (\n LibSimpleFunctionRegistryStorage.Storage storage stor,\n LibProxyStorage.Storage storage proxyStor\n )\n {\n return (\n LibSimpleFunctionRegistryStorage.getStorage(),\n LibProxyStorage.getStorage()\n );\n }\n}\n",
"../storage/LibSimpleFunctionRegistryStorage.sol": "/*\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 `SimpleFunctionRegistry` feature.\nlibrary LibSimpleFunctionRegistryStorage {\n\n /// @dev Storage bucket for this feature.\n struct Storage {\n // Mapping of function selector -> implementation history.\n mapping(bytes4 => address[]) implHistory;\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.SimpleFunctionRegistry\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",
"../errors/LibSimpleFunctionRegistryRichErrors.sol": "/*\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 LibSimpleFunctionRegistryRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function NotInRollbackHistoryError(bytes4 selector, address targetImpl)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"NotInRollbackHistoryError(bytes4,address)\")),\n selector,\n targetImpl\n );\n }\n}\n",
"../features/Ownable.sol": "/*\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 \"../fixins/FixinCommon.sol\";\nimport \"../errors/LibOwnableRichErrors.sol\";\nimport \"../storage/LibOwnableStorage.sol\";\nimport \"../migrations/LibBootstrap.sol\";\nimport \"../migrations/LibMigrate.sol\";\nimport \"./IFeature.sol\";\nimport \"./IOwnable.sol\";\nimport \"./SimpleFunctionRegistry.sol\";\n\n\n/// @dev Owner management features.\ncontract Ownable is\n IFeature,\n IOwnable,\n FixinCommon\n{\n\n // solhint-disable\n /// @dev Name of this feature.\n string public constant override FEATURE_NAME = \"Ownable\";\n /// @dev Version of this feature.\n uint256 public immutable override FEATURE_VERSION = _encodeVersion(1, 0, 0);\n /// @dev The deployed address of this contract.\n address immutable private _implementation;\n // solhint-enable\n\n using LibRichErrorsV06 for bytes;\n\n constructor() public {\n _implementation = address(this);\n }\n\n /// @dev Initializes this feature. The intial owner will be set to this (ZeroEx)\n /// to allow the bootstrappers to call `extend()`. Ownership should be\n /// transferred to the real owner by the bootstrapper after\n /// bootstrapping is complete.\n /// @return success Magic bytes if successful.\n function bootstrap() external returns (bytes4 success) {\n // Set the owner to ourselves to allow bootstrappers to call `extend()`.\n LibOwnableStorage.getStorage().owner = address(this);\n\n // Register feature functions.\n SimpleFunctionRegistry(address(this))._extendSelf(this.transferOwnership.selector, _implementation);\n SimpleFunctionRegistry(address(this))._extendSelf(this.owner.selector, _implementation);\n SimpleFunctionRegistry(address(this))._extendSelf(this.migrate.selector, _implementation);\n return LibBootstrap.BOOTSTRAP_SUCCESS;\n }\n\n /// @dev Change the owner of this contract.\n /// Only directly callable by the owner.\n /// @param newOwner New owner address.\n function transferOwnership(address newOwner)\n external\n override\n onlyOwner\n {\n LibOwnableStorage.Storage storage proxyStor = LibOwnableStorage.getStorage();\n\n if (newOwner == address(0)) {\n LibOwnableRichErrors.TransferOwnerToZeroError().rrevert();\n } else {\n proxyStor.owner = newOwner;\n emit OwnershipTransferred(msg.sender, newOwner);\n }\n }\n\n /// @dev Execute a migration function in the context of the ZeroEx contract.\n /// The result of the function being called should be the magic bytes\n /// 0x2c64c5ef (`keccack('MIGRATE_SUCCESS')`). Only callable by the owner.\n /// Temporarily sets the owner to ourselves so we can perform admin functions.\n /// Before returning, the owner will be set to `newOwner`.\n /// @param target The migrator contract address.\n /// @param data The call data.\n /// @param newOwner The address of the new owner.\n function migrate(address target, bytes calldata data, address newOwner)\n external\n override\n onlyOwner\n {\n if (newOwner == address(0)) {\n LibOwnableRichErrors.TransferOwnerToZeroError().rrevert();\n }\n\n LibOwnableStorage.Storage storage stor = LibOwnableStorage.getStorage();\n // The owner will be temporarily set to `address(this)` inside the call.\n stor.owner = address(this);\n\n // Perform the migration.\n LibMigrate.delegatecallMigrateFunction(target, data);\n\n // Update the owner.\n stor.owner = newOwner;\n\n emit Migrated(msg.sender, target, newOwner);\n }\n\n /// @dev Get the owner of this contract.\n /// @return owner_ The owner of this contract.\n function owner() external override view returns (address owner_) {\n return LibOwnableStorage.getStorage().owner;\n }\n}\n",
"../storage/LibOwnableStorage.sol": "/*\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 `Ownable` feature.\nlibrary LibOwnableStorage {\n\n /// @dev Storage bucket for this feature.\n struct Storage {\n // The owner of this 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.Ownable\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"
},
"compiler": {
"name": "solc",
"version": "0.6.10+commit.00c0fcaf",
"settings": {
"remappings": [
"@0x/contracts-utils=/home/gene/dev/0x-monorepo/node_modules/@0x/contracts-utils",
"@0x/contracts-erc20=/home/gene/dev/0x-monorepo/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"
]
}
},
"evmVersion": "istanbul"
}
},
"chains": {}
}