2019-06-27 22:00:41 -07:00

157 lines
19 KiB
JSON
Generated

{
"schemaVersion": "2.0.0",
"contractName": "DutchAuction",
"compilerOutput": {
"abi": [
{
"constant": false,
"inputs": [
{
"components": [
{ "name": "makerAddress", "type": "address" },
{ "name": "takerAddress", "type": "address" },
{ "name": "feeRecipientAddress", "type": "address" },
{ "name": "senderAddress", "type": "address" },
{ "name": "makerAssetAmount", "type": "uint256" },
{ "name": "takerAssetAmount", "type": "uint256" },
{ "name": "makerFee", "type": "uint256" },
{ "name": "takerFee", "type": "uint256" },
{ "name": "expirationTimeSeconds", "type": "uint256" },
{ "name": "salt", "type": "uint256" },
{ "name": "makerAssetData", "type": "bytes" },
{ "name": "takerAssetData", "type": "bytes" }
],
"name": "order",
"type": "tuple"
}
],
"name": "getAuctionDetails",
"outputs": [
{
"components": [
{ "name": "beginTimeSeconds", "type": "uint256" },
{ "name": "endTimeSeconds", "type": "uint256" },
{ "name": "beginAmount", "type": "uint256" },
{ "name": "endAmount", "type": "uint256" },
{ "name": "currentAmount", "type": "uint256" },
{ "name": "currentTimeSeconds", "type": "uint256" }
],
"name": "auctionDetails",
"type": "tuple"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"components": [
{ "name": "makerAddress", "type": "address" },
{ "name": "takerAddress", "type": "address" },
{ "name": "feeRecipientAddress", "type": "address" },
{ "name": "senderAddress", "type": "address" },
{ "name": "makerAssetAmount", "type": "uint256" },
{ "name": "takerAssetAmount", "type": "uint256" },
{ "name": "makerFee", "type": "uint256" },
{ "name": "takerFee", "type": "uint256" },
{ "name": "expirationTimeSeconds", "type": "uint256" },
{ "name": "salt", "type": "uint256" },
{ "name": "makerAssetData", "type": "bytes" },
{ "name": "takerAssetData", "type": "bytes" }
],
"name": "buyOrder",
"type": "tuple"
},
{
"components": [
{ "name": "makerAddress", "type": "address" },
{ "name": "takerAddress", "type": "address" },
{ "name": "feeRecipientAddress", "type": "address" },
{ "name": "senderAddress", "type": "address" },
{ "name": "makerAssetAmount", "type": "uint256" },
{ "name": "takerAssetAmount", "type": "uint256" },
{ "name": "makerFee", "type": "uint256" },
{ "name": "takerFee", "type": "uint256" },
{ "name": "expirationTimeSeconds", "type": "uint256" },
{ "name": "salt", "type": "uint256" },
{ "name": "makerAssetData", "type": "bytes" },
{ "name": "takerAssetData", "type": "bytes" }
],
"name": "sellOrder",
"type": "tuple"
},
{ "name": "buySignature", "type": "bytes" },
{ "name": "sellSignature", "type": "bytes" }
],
"name": "matchOrders",
"outputs": [
{
"components": [
{
"components": [
{ "name": "makerAssetFilledAmount", "type": "uint256" },
{ "name": "takerAssetFilledAmount", "type": "uint256" },
{ "name": "makerFeePaid", "type": "uint256" },
{ "name": "takerFeePaid", "type": "uint256" }
],
"name": "left",
"type": "tuple"
},
{
"components": [
{ "name": "makerAssetFilledAmount", "type": "uint256" },
{ "name": "takerAssetFilledAmount", "type": "uint256" },
{ "name": "makerFeePaid", "type": "uint256" },
{ "name": "takerFeePaid", "type": "uint256" }
],
"name": "right",
"type": "tuple"
},
{ "name": "leftMakerAssetSpreadAmount", "type": "uint256" }
],
"name": "matchedFillResults",
"type": "tuple"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [{ "name": "_exchange", "type": "address" }],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
}
],
"devdoc": {
"methods": {
"getAuctionDetails((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))": {
"details": "Calculates the Auction Details for the given order",
"params": { "order": "The sell order" },
"return": "AuctionDetails"
},
"matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)": {
"details": "Matches the buy and sell orders at an amount given the following: the current block time, the auction start time and the auction begin amount. The sell order is a an order at the lowest amount at the end of the auction. Excess from the match is transferred to the seller. Over time the price moves from beginAmount to endAmount given the current block.timestamp. sellOrder.expiryTimeSeconds is the end time of the auction. sellOrder.takerAssetAmount is the end amount of the auction (lowest possible amount). sellOrder.makerAssetData is the ABI encoded Asset Proxy data with the following data appended buyOrder.makerAssetData is the buyers bid on the auction, must meet the amount for the current block timestamp (uint256 beginTimeSeconds, uint256 beginAmount). This function reverts in the following scenarios: * Auction has not started (auctionDetails.currentTimeSeconds < auctionDetails.beginTimeSeconds) * Auction has expired (auctionDetails.endTimeSeconds < auctionDetails.currentTimeSeconds) * Amount is invalid: Buy order amount is too low (buyOrder.makerAssetAmount < auctionDetails.currentAmount) * Amount is invalid: Invalid begin amount (auctionDetails.beginAmount > auctionDetails.endAmount) * Any failure in the 0x Match Orders",
"params": {
"buyOrder": "The Buyer's order. This order is for the current expected price of the auction.",
"buySignature": "Proof that order was created by the buyer.",
"sellOrder": "The Seller's order. This order is for the lowest amount (at the end of the auction).",
"sellSignature": "Proof that order was created by the seller."
},
"return": "matchedFillResults amounts filled and fees paid by maker and taker of matched orders."
}
}
},
"evm": {
"bytecode": {
"object": "0x608060405234801561001057600080fd5b50604051602080611352833981018060405261002f9190810190610067565b60008054600160a060020a031916600160a060020a0392909216919091179055610099565b6000610060825161008d565b9392505050565b60006020828403121561007957600080fd5b60006100858484610054565b949350505050565b600160a060020a031690565b6112aa806100a86000396000f30060806040526004361061004b5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632e9cd03381146100505780633c28d86114610086575b600080fd5b34801561005c57600080fd5b5061007061006b366004610b25565b6100b3565b60405161007d919061110a565b60405180910390f35b34801561009257600080fd5b506100a66100a1366004610b5a565b61029c565b60405161007d9190611118565b6100bb6107b1565b610140820151516000808080808080606488101561010e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610105906110aa565b60405180910390fd5b6101408a0151610146907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08a0163ffffffff6105f216565b6101408b0151909750610181907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08a0163ffffffff6105f216565b9550868a61010001511115156101c3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610105906110ba565b868a61010001510394508960a001519350838611151561020f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610105906110fa565b50505083865261010087018051602088015260408701849052606087018290524260a088018190529051828503919081900386821015610255576080890186905261028f565b6101008a0151821061026d576080890184905261028f565b6102898461028461027e8487610607565b8861066d565b610684565b60808a01525b5050505050505050919050565b6102a46107e8565b6102ac6107b1565b6000606060008060006102be8a6100b3565b805160a08201519197501115610300576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610105906110ea565b60a08601516101008b015111610342576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610105906110ca565b608080870151908c01511015610384576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610105906110fa565b6000546040517f3c28d86100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690633c28d861906103e0908e908e908e908e90600401611127565b61012060405180830381600087803b1580156103fb57600080fd5b505af115801561040f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506104339190810190610b06565b96508660400151945060008511156105e4576101608a0151935061045e84601063ffffffff6106c316565b92506104728b608001518760800151610724565b915061047e8583610724565b905060008111156105325789516040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169163a9059cbb916104de9190859060040161105f565b602060405180830381600087803b1580156104f857600080fd5b505af115801561050c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506105309190810190610ae0565b505b60008211156105e4578a516040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169163a9059cbb916105909190869060040161105f565b602060405180830381600087803b1580156105aa57600080fd5b505af11580156105be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506105e29190810190610ae0565b505b505050505050949350505050565b60006105fe8383610766565b90505b92915050565b60008083151561061a5760009150610666565b5082820282848281151561062a57fe5b0414610662576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101059061109a565b8091505b5092915050565b600080828481151561067b57fe5b04949350505050565b600082820183811015610662576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101059061109a565b600081601401835110151515610705576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610105906110da565b50016014015173ffffffffffffffffffffffffffffffffffffffff1690565b600082821115610760576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101059061107a565b50900390565b6000816020018351101515156107a8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101059061108a565b50016020015190565b60c0604051908101604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b610120604051908101604052806107fd610817565b815260200161080a610817565b8152602001600081525090565b608060405190810160405280600081526020016000815260200160008152602001600081525090565b600061084c82356111ef565b9392505050565b600061084c825161120b565b6000601f8201831361087057600080fd5b813561088361087e826111a5565b61117e565b9150808252602083016020830185838301111561089f57600080fd5b6108aa838284611210565b50505092915050565b6000608082840312156108c557600080fd5b6108cf608061117e565b905060006108dd8484610ad4565b82525060206108ee84848301610ad4565b602083015250604061090284828501610ad4565b604083015250606061091684828501610ad4565b60608301525092915050565b6000610120828403121561093557600080fd5b61093f606061117e565b9050600061094d84846108b3565b825250608061095e848483016108b3565b60208301525061010061097384828501610ad4565b60408301525092915050565b6000610180828403121561099257600080fd5b61099d61018061117e565b905060006109ab8484610840565b82525060206109bc84848301610840565b60208301525060406109d084828501610840565b60408301525060606109e484828501610840565b60608301525060806109f884828501610ac8565b60808301525060a0610a0c84828501610ac8565b60a08301525060c0610a2084828501610ac8565b60c08301525060e0610a3484828501610ac8565b60e083015250610100610a4984828501610ac8565b61010083015250610120610a5f84828501610ac8565b6101208301525061014082013567ffffffffffffffff811115610a8157600080fd5b610a8d8482850161085f565b6101408301525061016082013567ffffffffffffffff811115610aaf57600080fd5b610abb8482850161085f565b6101608301525092915050565b600061084c8235611208565b600061084c8251611208565b600060208284031215610af257600080fd5b6000610afe8484610853565b949350505050565b60006101208284031215610b1957600080fd5b6000610afe8484610922565b600060208284031215610b3757600080fd5b813567ffffffffffffffff811115610b4e57600080fd5b610afe8482850161097f565b60008060008060808587031215610b7057600080fd5b843567ffffffffffffffff811115610b8757600080fd5b610b938782880161097f565b945050602085013567ffffffffffffffff811115610bb057600080fd5b610bbc8782880161097f565b935050604085013567ffffffffffffffff811115610bd957600080fd5b610be58782880161085f565b925050606085013567ffffffffffffffff811115610c0257600080fd5b610c0e8782880161085f565b91505092959194509250565b610c23816111ef565b82525050565b6000610c34826111eb565b808452610c4881602086016020860161121c565b610c5181611248565b9093016020019392505050565b601181527f55494e543235365f554e444552464c4f57000000000000000000000000000000602082015260400190565b602681527f475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f524560208201527f5155495245440000000000000000000000000000000000000000000000000000604082015260600190565b601081527f55494e543235365f4f564552464c4f5700000000000000000000000000000000602082015260400190565b601281527f494e56414c49445f41535345545f444154410000000000000000000000000000602082015260400190565b601281527f494e56414c49445f424547494e5f54494d450000000000000000000000000000602082015260400190565b600f81527f41554354494f4e5f455850495245440000000000000000000000000000000000602082015260400190565b602681527f475245415445525f4f525f455155414c5f544f5f32305f4c454e4754485f524560208201527f5155495245440000000000000000000000000000000000000000000000000000604082015260600190565b601381527f41554354494f4e5f4e4f545f5354415254454400000000000000000000000000602082015260400190565b600e81527f494e56414c49445f414d4f554e54000000000000000000000000000000000000602082015260400190565b805160c0830190610e6b8482611056565b506020820151610e7e6020850182611056565b506040820151610e916040850182611056565b506060820151610ea46060850182611056565b506080820151610eb76080850182611056565b5060a0820151610eca60a0850182611056565b50505050565b80516080830190610ee18482611056565b506020820151610ef46020850182611056565b506040820151610f076040850182611056565b506060820151610eca6060850182611056565b8051610120830190610f2c8482610ed0565b506020820151610f3f6080850182610ed0565b506040820151610eca610100850182611056565b8051600090610180840190610f688582610c1a565b506020830151610f7b6020860182610c1a565b506040830151610f8e6040860182610c1a565b506060830151610fa16060860182610c1a565b506080830151610fb46080860182611056565b5060a0830151610fc760a0860182611056565b5060c0830151610fda60c0860182611056565b5060e0830151610fed60e0860182611056565b50610100830151611002610100860182611056565b50610120830151611017610120860182611056565b506101408301518482036101408601526110318282610c29565b91505061016083015184820361016086015261104d8282610c29565b95945050505050565b610c2381611208565b6040810161106d8285610c1a565b61084c6020830184611056565b6020808252810161060181610c5e565b6020808252810161060181610c8e565b6020808252810161060181610ce4565b6020808252810161060181610d14565b6020808252810161060181610d44565b6020808252810161060181610d74565b6020808252810161060181610da4565b6020808252810161060181610dfa565b6020808252810161060181610e2a565b60c081016106018284610e5a565b61012081016106018284610f1a565b608080825281016111388187610f53565b9050818103602083015261114c8186610f53565b905081810360408301526111608185610c29565b905081810360608301526111748184610c29565b9695505050505050565b60405181810167ffffffffffffffff8111828210171561119d57600080fd5b604052919050565b600067ffffffffffffffff8211156111bc57600080fd5b506020601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160190565b5190565b73ffffffffffffffffffffffffffffffffffffffff1690565b90565b151590565b82818337506000910152565b60005b8381101561123757818101518382015260200161121f565b83811115610eca5750506000910152565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016905600a265627a7a723058209cf70b04b75fc23e6762ae4c6c8f25ccad25dfcb39cf1dd3966eb27ce513de036c6578706572696d656e74616cf50037"
}
}
},
"networks": {}
}