Created
October 23, 2019 16:53
-
-
Save mrwillis/a32bd4f7f0bd4153343fb79d670344e0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"contractName": "Fills", | |
"abi": [ | |
{ | |
"inputs": [ | |
{ | |
"internalType": "contract IFillOrder", | |
"name": "_fillOrder", | |
"type": "address" | |
}, | |
{ | |
"internalType": "contract ICancelOrder", | |
"name": "_cancelOrder", | |
"type": "address" | |
} | |
], | |
"payable": false, | |
"stateMutability": "nonpayable", | |
"type": "constructor" | |
}, | |
{ | |
"constant": false, | |
"inputs": [ | |
{ | |
"components": [ | |
{ | |
"internalType": "bytes32", | |
"name": "marketHash", | |
"type": "bytes32" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "totalBetSize", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "percentageOdds", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "expiry", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "relayerMakerFee", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "relayerTakerFee", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "salt", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "address", | |
"name": "maker", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "relayer", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "executor", | |
"type": "address" | |
}, | |
{ | |
"internalType": "bool", | |
"name": "isMakerBettingOutcomeOne", | |
"type": "bool" | |
} | |
], | |
"internalType": "struct LibOrder.Order", | |
"name": "order", | |
"type": "tuple" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "amount", | |
"type": "uint256" | |
} | |
], | |
"name": "fill", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"payable": false, | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"constant": false, | |
"inputs": [ | |
{ | |
"components": [ | |
{ | |
"internalType": "bytes32", | |
"name": "marketHash", | |
"type": "bytes32" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "totalBetSize", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "percentageOdds", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "expiry", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "relayerMakerFee", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "relayerTakerFee", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "salt", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "address", | |
"name": "maker", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "relayer", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "executor", | |
"type": "address" | |
}, | |
{ | |
"internalType": "bool", | |
"name": "isMakerBettingOutcomeOne", | |
"type": "bool" | |
} | |
], | |
"internalType": "struct LibOrder.Order", | |
"name": "order", | |
"type": "tuple" | |
} | |
], | |
"name": "cancel", | |
"outputs": [], | |
"payable": false, | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"constant": false, | |
"inputs": [ | |
{ | |
"internalType": "bytes32", | |
"name": "fillHash", | |
"type": "bytes32" | |
} | |
], | |
"name": "setFillHashSubmitted", | |
"outputs": [], | |
"payable": false, | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"constant": true, | |
"inputs": [ | |
{ | |
"internalType": "bytes32", | |
"name": "orderHash", | |
"type": "bytes32" | |
} | |
], | |
"name": "getFilled", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"payable": false, | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"constant": true, | |
"inputs": [ | |
{ | |
"internalType": "bytes32", | |
"name": "orderHash", | |
"type": "bytes32" | |
} | |
], | |
"name": "getCancelled", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"payable": false, | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"constant": true, | |
"inputs": [ | |
{ | |
"internalType": "bytes32", | |
"name": "fillHash", | |
"type": "bytes32" | |
} | |
], | |
"name": "getFillHashSubmitted", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"payable": false, | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"constant": true, | |
"inputs": [ | |
{ | |
"components": [ | |
{ | |
"internalType": "bytes32", | |
"name": "marketHash", | |
"type": "bytes32" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "totalBetSize", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "percentageOdds", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "expiry", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "relayerMakerFee", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "relayerTakerFee", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "salt", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "address", | |
"name": "maker", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "relayer", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "executor", | |
"type": "address" | |
}, | |
{ | |
"internalType": "bool", | |
"name": "isMakerBettingOutcomeOne", | |
"type": "bool" | |
} | |
], | |
"internalType": "struct LibOrder.Order", | |
"name": "order", | |
"type": "tuple" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "takerAmount", | |
"type": "uint256" | |
} | |
], | |
"name": "orderHasSpace", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"payable": false, | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"constant": true, | |
"inputs": [ | |
{ | |
"components": [ | |
{ | |
"internalType": "bytes32", | |
"name": "marketHash", | |
"type": "bytes32" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "totalBetSize", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "percentageOdds", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "expiry", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "relayerMakerFee", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "relayerTakerFee", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "salt", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "address", | |
"name": "maker", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "relayer", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "executor", | |
"type": "address" | |
}, | |
{ | |
"internalType": "bool", | |
"name": "isMakerBettingOutcomeOne", | |
"type": "bool" | |
} | |
], | |
"internalType": "struct LibOrder.Order", | |
"name": "order", | |
"type": "tuple" | |
} | |
], | |
"name": "remainingSpace", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"payable": false, | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"constant": true, | |
"inputs": [ | |
{ | |
"components": [ | |
{ | |
"internalType": "bytes32", | |
"name": "marketHash", | |
"type": "bytes32" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "totalBetSize", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "percentageOdds", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "expiry", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "relayerMakerFee", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "relayerTakerFee", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "salt", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "address", | |
"name": "maker", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "relayer", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "executor", | |
"type": "address" | |
}, | |
{ | |
"internalType": "bool", | |
"name": "isMakerBettingOutcomeOne", | |
"type": "bool" | |
} | |
], | |
"internalType": "struct LibOrder.Order", | |
"name": "order", | |
"type": "tuple" | |
} | |
], | |
"name": "isOrderCancelled", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"payable": false, | |
"stateMutability": "view", | |
"type": "function" | |
} | |
], | |
"metadata": "{\"compiler\":{\"version\":\"0.5.11+commit.c082d0b4\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"orderHash\",\"type\":\"bytes32\"}],\"name\":\"getCancelled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"marketHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"totalBetSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"percentageOdds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"relayerMakerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"relayerTakerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"maker\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isMakerBettingOutcomeOne\",\"type\":\"bool\"}],\"internalType\":\"struct LibOrder.Order\",\"name\":\"order\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"fill\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"marketHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"totalBetSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"percentageOdds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"relayerMakerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"relayerTakerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"maker\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isMakerBettingOutcomeOne\",\"type\":\"bool\"}],\"internalType\":\"struct LibOrder.Order\",\"name\":\"order\",\"type\":\"tuple\"}],\"name\":\"remainingSpace\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"orderHash\",\"type\":\"bytes32\"}],\"name\":\"getFilled\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"marketHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"totalBetSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"percentageOdds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"relayerMakerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"relayerTakerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"maker\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isMakerBettingOutcomeOne\",\"type\":\"bool\"}],\"internalType\":\"struct LibOrder.Order\",\"name\":\"order\",\"type\":\"tuple\"}],\"name\":\"isOrderCancelled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"marketHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"totalBetSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"percentageOdds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"relayerMakerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"relayerTakerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"maker\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isMakerBettingOutcomeOne\",\"type\":\"bool\"}],\"internalType\":\"struct LibOrder.Order\",\"name\":\"order\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"takerAmount\",\"type\":\"uint256\"}],\"name\":\"orderHasSpace\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"fillHash\",\"type\":\"bytes32\"}],\"name\":\"getFillHashSubmitted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"marketHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"totalBetSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"percentageOdds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"relayerMakerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"relayerTakerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"maker\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isMakerBettingOutcomeOne\",\"type\":\"bool\"}],\"internalType\":\"struct LibOrder.Order\",\"name\":\"order\",\"type\":\"tuple\"}],\"name\":\"cancel\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"fillHash\",\"type\":\"bytes32\"}],\"name\":\"setFillHashSubmitted\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IFillOrder\",\"name\":\"_fillOrder\",\"type\":\"address\"},{\"internalType\":\"contract ICancelOrder\",\"name\":\"_cancelOrder\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"author\":\"Julian Wilson <[email protected]>\",\"methods\":{\"cancel((bytes32,uint256,uint256,uint256,uint256,uint256,uint256,address,address,address,bool))\":{\"params\":{\"order\":\"The order to cancel.\"}},\"fill((bytes32,uint256,uint256,uint256,uint256,uint256,uint256,address,address,address,bool),uint256)\":{\"params\":{\"amount\":\"The amount to fill it by.\",\"order\":\"The order to fill.\"},\"return\":\"The new filled amount for this order.\"},\"getCancelled(bytes32)\":{\"params\":{\"orderHash\":\"The hash of the order to check.\"},\"return\":\"true if the order has been cancelled, false otherwise.\"},\"getFillHashSubmitted(bytes32)\":{\"params\":{\"fillHash\":\"The fill hash to check.\"},\"return\":\"true if the fill has been submitted, false otherwise.\"},\"getFilled(bytes32)\":{\"params\":{\"orderHash\":\"The hash of the order to check.\"},\"return\":\"The amount the order has been filled by.\"},\"isOrderCancelled((bytes32,uint256,uint256,uint256,uint256,uint256,uint256,address,address,address,bool))\":{\"params\":{\"order\":\"The order to check.\"},\"return\":\"true if the order is cancelled, false otherwise.\"},\"orderHasSpace((bytes32,uint256,uint256,uint256,uint256,uint256,uint256,address,address,address,bool),uint256)\":{\"params\":{\"order\":\"The order to examine.\",\"takerAmount\":\"The amount to fill.\"},\"return\":\"true if there is enough space, false otherwise.\"},\"remainingSpace((bytes32,uint256,uint256,uint256,uint256,uint256,uint256,address,address,address,bool))\":{\"params\":{\"order\":\"The order to check.\"},\"return\":\"The remaining space on the order. It returns 0 if the order is cancelled.\"},\"setFillHashSubmitted(bytes32)\":{\"params\":{\"fillHash\":\"The hash to set as submitted.\"}}},\"title\":\"Fills\"},\"userdoc\":{\"methods\":{\"cancel((bytes32,uint256,uint256,uint256,uint256,uint256,uint256,address,address,address,bool))\":{\"notice\":\"Cancels an order.\"},\"fill((bytes32,uint256,uint256,uint256,uint256,uint256,uint256,address,address,address,bool),uint256)\":{\"notice\":\"Fill an order by the given amount.\"},\"getCancelled(bytes32)\":{\"notice\":\"Checks if an order has been cancelled.\"},\"getFillHashSubmitted(bytes32)\":{\"notice\":\"Checks if a fill hash was submitted.\"},\"getFilled(bytes32)\":{\"notice\":\"Gets the amount an order has been filled by.\"},\"isOrderCancelled((bytes32,uint256,uint256,uint256,uint256,uint256,uint256,address,address,address,bool))\":{\"notice\":\"Checks if the order is cancelled.\"},\"orderHasSpace((bytes32,uint256,uint256,uint256,uint256,uint256,uint256,address,address,address,bool),uint256)\":{\"notice\":\"Check if an order has sufficient space.\"},\"remainingSpace((bytes32,uint256,uint256,uint256,uint256,uint256,uint256,address,address,address,bool))\":{\"notice\":\"Gets the remaining space for an order.\"},\"setFillHashSubmitted(bytes32)\":{\"notice\":\"Sets a fill hash as submitted. It cannot be filled again.\"}},\"notice\":\"Stores the \\\"fullness\\\" of each order, whose ID is its hash. \"}},\"settings\":{\"compilationTarget\":{\"/home/julian/betx/betx-contracts/contracts/impl/trading/Fills.sol\":\"Fills\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"details\":{\"constantOptimizer\":true,\"cse\":true,\"deduplicate\":true,\"jumpdestRemover\":true,\"orderLiterals\":true,\"peephole\":true,\"yul\":true,\"yulDetails\":{\"stackAllocation\":true}},\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/julian/betx/betx-contracts/contracts/impl/trading/Fills.sol\":{\"keccak256\":\"0xa262aaf8e8e8d2521556307a1fb5e0a401c9f90b8bb20124a65c7571a86f1048\",\"urls\":[\"bzz-raw://6f49b1418a13abd90579d5077c75f4823609e16b2550e0619bbb8aa3d6f7a63b\",\"dweb:/ipfs/QmfQPsuRoLgXRwwKqjwi7QXVdDfmY67NTN2L9ABy7THUYC\"]},\"/home/julian/betx/betx-contracts/contracts/interfaces/trading/ICancelOrder.sol\":{\"keccak256\":\"0x97da5753fa3b5b3c957960b01aea8fd3fab5026880391d807199a428eeb6a02d\",\"urls\":[\"bzz-raw://ef626b84350b818225a9a1a252a62ed1dcb88837f95e2bc65ad24ce58e835102\",\"dweb:/ipfs/Qmb3Get6foSt2wcfc2DYnzAHhM4Xy8y5h4cde6pUeY2V84\"]},\"/home/julian/betx/betx-contracts/contracts/interfaces/trading/IFillOrder.sol\":{\"keccak256\":\"0xea4cca445cbf898b3e162eced0638a7f091974e67ae351de49fe461b10c291fd\",\"urls\":[\"bzz-raw://0a4d0caa3a87dd559748fd88a5a3d267ebcf6f93e0cdbdb837c81aec3e6f5209\",\"dweb:/ipfs/QmRiXqXsW1f8JZmwfVFHzEyDnNXEqPiwEg7kGdwQQpoTFd\"]},\"/home/julian/betx/betx-contracts/contracts/interfaces/trading/IFills.sol\":{\"keccak256\":\"0x345f2f02246d44eabd80d5729c2d0d471b47bc83231c9796f268afbf611efa7a\",\"urls\":[\"bzz-raw://098ba3fdafbef40df2dcb1a903afec7c329b9f8f3d9bff078bfb28ee36ee568c\",\"dweb:/ipfs/Qme6jAujY5wiZjyg1vWLmRDZzXEbzwuvce2wgv48Ci24kp\"]},\"/home/julian/betx/betx-contracts/contracts/libraries/LibOrder.sol\":{\"keccak256\":\"0xd243b120beb4178919b788992c1e367363753a0690ad5adc68fd0b3b9e5445ad\",\"urls\":[\"bzz-raw://cb05f8b9792bb599794293b1a814dff1792d9e684a0ebf34d7516d437365df7f\",\"dweb:/ipfs/QmdwiUCGf1qUXgQUNPYhv3Kkki3vhSusF3MeRCMp6U1XbC\"]},\"openzeppelin-solidity/contracts/cryptography/ECDSA.sol\":{\"keccak256\":\"0xc19027309407a962d4d5f68ad3e5c31eab6ffb6b134dd4811fd0f3d93ffd618a\",\"urls\":[\"bzz-raw://6f56b64191ca32a253b4468dde12e0d4232796467579c7ec8ee82873dce65dea\",\"dweb:/ipfs/QmWzfweLGo8YcAcdcPSM9GRQQYayPFJv3GCCVWLzkXc4bE\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x4ccf2d7b51873db1ccfd54ca2adae5eac3b184f9699911ed4490438419f1c690\",\"urls\":[\"bzz-raw://d62d769b2219d5de39013093412623e624fa887f871826ea3bae6052ee893610\",\"dweb:/ipfs/QmV3yVktya1s617QmuzQR2CfuJgUi3dR2xEZY9ecmqZ2G1\"]}},\"version\":1}", | |
"bytecode": "0x608060405234801561001057600080fd5b506040516107d23803806107d283398101604081905261002f91610060565b600080546001600160a01b039384166001600160a01b031991821617909155600180549290931691161790556100b2565b6000806040838503121561007357600080fd5b825161007e8161009a565b602084015190925061008f8161009a565b809150509250929050565b6001600160a01b03811681146100af57600080fd5b50565b610711806100c16000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063a4873a5611610066578063a4873a5614610107578063af5acbb81461011a578063d2d596581461012d578063e58ed6ce14610140578063e758eaf41461015557610093565b806317d60c6a146100985780635b9a3e7a146100c15780637a1de5ad146100e15780637c7efce0146100f4575b600080fd5b6100ab6100a63660046104e5565b610168565b6040516100b891906105b7565b60405180910390f35b6100d46100cf36600461051b565b610180565b6040516100b8919061069e565b6100d46100ef3660046104fe565b6101fc565b6100d46101023660046104e5565b610259565b6100ab6101153660046104fe565b61026b565b6100ab61012836600461051b565b610290565b6100ab61013b3660046104e5565b6102a5565b61015361014e3660046104fe565b6102ba565b005b6101536101633660046104e5565b61030c565b60008181526003602052604090205460ff165b919050565b600080546001600160a01b031633146101b45760405162461bcd60e51b81526004016101ab90610630565b60405180910390fd5b60006101bf84610351565b6000818152600260205260409020549091506101e1908463ffffffff6103ba16565b60009182526002602052604090912081905590505b92915050565b60008061020883610351565b60008181526003602052604090205490915060ff161561022c57600091505061017b565b600081815260026020908152604090912054908401516102519163ffffffff6103e616565b91505061017b565b60009081526002602052604090205490565b60008061027783610351565b60009081526003602052604090205460ff169392505050565b600061029b836101fc565b9091111592915050565b60009081526004602052604090205460ff1690565b6001546001600160a01b031633146102e45760405162461bcd60e51b81526004016101ab90610667565b60006102ef82610351565b6000908152600360205260409020805460ff191660011790555050565b6000546001600160a01b031633146103365760405162461bcd60e51b81526004016101ab90610630565b6000908152600460205260409020805460ff19166001179055565b80516020808301516040808501516060860151608087015160a088015160c089015160e08a01516101008b01516101208c01516101408d0151985160009c61039d9c909b9a9101610548565b604051602081830303815290604052805190602001209050919050565b6000828201838110156103df5760405162461bcd60e51b81526004016101ab906105c2565b9392505050565b6000828211156104085760405162461bcd60e51b81526004016101ab906105f9565b50900390565b80356001600160a01b03811681146101f657600080fd5b803580151581146101f657600080fd5b6000610160808385031215610448578182fd5b610451816106a7565b915050813581526020820135602082015260408201356040820152606082013560608201526080820135608082015260a082013560a082015260c082013560c08201526104a18360e0840161040e565b60e08201526101006104b58482850161040e565b908201526101206104c88484830161040e565b908201526101406104db84848301610425565b9082015292915050565b6000602082840312156104f757600080fd5b5035919050565b6000610160828403121561051157600080fd5b6103df8383610435565b600080610180838503121561052f57600080fd5b6105398484610435565b94610160939093013593505050565b9a8b5260208b019990995260408a01979097526060808a0196909652608089019490945260a088019290925260c0870152821b6bffffffffffffffffffffffff1990811660e087015290821b811660f486015291901b16610108830152151560f81b61011c82015261011d0190565b901515815260200190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252601b908201527f4f4e4c595f46494c4c5f4f524445525f44455249564154495645530000000000604082015260600190565b6020808252601a908201527f4f4e4c595f43414e43454c5f4f524445525f434f4e5452414354000000000000604082015260600190565b90815260200190565b60405181810167ffffffffffffffff811182821017156106c657600080fd5b60405291905056fea365627a7a72315820d97aa72ae7fcb264d2820d407f6fd8ab836c4096877c1d293f0ecfe1812d51f96c6578706572696d656e74616cf564736f6c634300050b0040", | |
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063a4873a5611610066578063a4873a5614610107578063af5acbb81461011a578063d2d596581461012d578063e58ed6ce14610140578063e758eaf41461015557610093565b806317d60c6a146100985780635b9a3e7a146100c15780637a1de5ad146100e15780637c7efce0146100f4575b600080fd5b6100ab6100a63660046104e5565b610168565b6040516100b891906105b7565b60405180910390f35b6100d46100cf36600461051b565b610180565b6040516100b8919061069e565b6100d46100ef3660046104fe565b6101fc565b6100d46101023660046104e5565b610259565b6100ab6101153660046104fe565b61026b565b6100ab61012836600461051b565b610290565b6100ab61013b3660046104e5565b6102a5565b61015361014e3660046104fe565b6102ba565b005b6101536101633660046104e5565b61030c565b60008181526003602052604090205460ff165b919050565b600080546001600160a01b031633146101b45760405162461bcd60e51b81526004016101ab90610630565b60405180910390fd5b60006101bf84610351565b6000818152600260205260409020549091506101e1908463ffffffff6103ba16565b60009182526002602052604090912081905590505b92915050565b60008061020883610351565b60008181526003602052604090205490915060ff161561022c57600091505061017b565b600081815260026020908152604090912054908401516102519163ffffffff6103e616565b91505061017b565b60009081526002602052604090205490565b60008061027783610351565b60009081526003602052604090205460ff169392505050565b600061029b836101fc565b9091111592915050565b60009081526004602052604090205460ff1690565b6001546001600160a01b031633146102e45760405162461bcd60e51b81526004016101ab90610667565b60006102ef82610351565b6000908152600360205260409020805460ff191660011790555050565b6000546001600160a01b031633146103365760405162461bcd60e51b81526004016101ab90610630565b6000908152600460205260409020805460ff19166001179055565b80516020808301516040808501516060860151608087015160a088015160c089015160e08a01516101008b01516101208c01516101408d0151985160009c61039d9c909b9a9101610548565b604051602081830303815290604052805190602001209050919050565b6000828201838110156103df5760405162461bcd60e51b81526004016101ab906105c2565b9392505050565b6000828211156104085760405162461bcd60e51b81526004016101ab906105f9565b50900390565b80356001600160a01b03811681146101f657600080fd5b803580151581146101f657600080fd5b6000610160808385031215610448578182fd5b610451816106a7565b915050813581526020820135602082015260408201356040820152606082013560608201526080820135608082015260a082013560a082015260c082013560c08201526104a18360e0840161040e565b60e08201526101006104b58482850161040e565b908201526101206104c88484830161040e565b908201526101406104db84848301610425565b9082015292915050565b6000602082840312156104f757600080fd5b5035919050565b6000610160828403121561051157600080fd5b6103df8383610435565b600080610180838503121561052f57600080fd5b6105398484610435565b94610160939093013593505050565b9a8b5260208b019990995260408a01979097526060808a0196909652608089019490945260a088019290925260c0870152821b6bffffffffffffffffffffffff1990811660e087015290821b811660f486015291901b16610108830152151560f81b61011c82015261011d0190565b901515815260200190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252601b908201527f4f4e4c595f46494c4c5f4f524445525f44455249564154495645530000000000604082015260600190565b6020808252601a908201527f4f4e4c595f43414e43454c5f4f524445525f434f4e5452414354000000000000604082015260600190565b90815260200190565b60405181810167ffffffffffffffff811182821017156106c657600080fd5b60405291905056fea365627a7a72315820d97aa72ae7fcb264d2820d407f6fd8ab836c4096877c1d293f0ecfe1812d51f96c6578706572696d656e74616cf564736f6c634300050b0040", | |
"sourceMap": "460:4253:28:-;;;1281:144;8:9:-1;5:2;;;30:1;27;20:12;5:2;1281:144:28;;;;;;;;;;;;;;;;;;;;;1360:9;:22;;-1:-1:-1;;;;;1360:22:28;;;-1:-1:-1;;;;;;1360:22:28;;;;;;;;1392:26;;;;;;;;;;;460:4253;;367:479:-1;;;539:2;527:9;518:7;514:23;510:32;507:2;;;-1:-1;;545:12;507:2;291:6;285:13;303:52;349:5;303:52;;;727:2;798:22;;104:13;597:93;;-1:-1;122:54;104:13;122:54;;;735:95;;;;501:345;;;;;;1315:159;-1:-1;;;;;1249:54;;1395:56;;1385:2;;1465:1;;1455:12;1385:2;1379:95;;;460:4253:28;;;;;;", | |
"deployedSourceMap": "460:4253:28:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;460:4253:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2973:112;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;1624:310;;;;;;;;;:::i;:::-;;;;;;;;4028:317;;;;;;;;;:::i;2675:109::-;;;;;;;;;:::i;4507:204::-;;;;;;;;;:::i;3604:215::-;;;;;;;;;:::i;3262:126::-;;;;;;;;;:::i;2019:193::-;;;;;;;;;:::i;:::-;;2346:148;;;;;;;;;:::i;2973:112::-;3035:4;3058:20;;;:9;:20;;;;;;;;2973:112;;;;:::o;1624:310::-;1770:7;947:9;;-1:-1:-1;;;;;947:9:28;925:10;:32;904:107;;;;-1:-1:-1;;;904:107:28;;;;;;;;;;;;;;;;;1794:17;1814:20;:5;:18;:20::i;:::-;1864:17;;;;:6;:17;;;;;;1794:40;;-1:-1:-1;1864:29:28;;1886:6;1864:29;:21;:29;:::i;:::-;1844:17;;;;:6;:17;;;;;;:49;;;;-1:-1:-1;1021:1:28;1624:310;;;;:::o;4028:317::-;4127:7;4151:17;4171:20;:5;:18;:20::i;:::-;4205;;;;:9;:20;;;;;;4151:40;;-1:-1:-1;4205:20:28;;4201:138;;;4248:1;4241:8;;;;;4201:138;4310:17;;;;:6;:17;;;;;;;;;4287:18;;;;:41;;;:22;:41;:::i;:::-;4280:48;;;;;2675:109;2734:7;2760:17;;;:6;:17;;;;;;;2675:109::o;4507:204::-;4607:4;4627:17;4647:20;:5;:18;:20::i;:::-;4684;;;;:9;:20;;;;;;;;;4507:204;-1:-1:-1;;;4507:204:28:o;3604:215::-;3748:4;3791:21;3806:5;3791:14;:21::i;:::-;3776:36;;;;;3604:215;-1:-1:-1;;3604:215:28:o;3262:126::-;3331:4;3354:27;;;:17;:27;;;;;;;;;3262:126::o;2019:193::-;1193:11;;-1:-1:-1;;;;;1193:11:28;1171:10;:34;1150:107;;;;-1:-1:-1;;;1150:107:28;;;;;;;;;2128:17;2148:20;:5;:18;:20::i;:::-;2178;;;;:9;:20;;;;;:27;;-1:-1:-1;;2178:27:28;2201:4;2178:27;;;-1:-1:-1;;2019:193:28:o;2346:148::-;947:9;;-1:-1:-1;;;;;947:9:28;925:10;:32;904:107;;;;-1:-1:-1;;;904:107:28;;;;;;;;;2453:27;;;;:17;:27;;;;;:34;;-1:-1:-1;;2453:34:28;2483:4;2453:34;;;2346:148::o;5129:545:51:-;5277:16;;5311:18;;;;;5347:20;;;;;5385:12;;;;5415:21;;;;5454;;;;5493:10;;;;5521:11;;;;5550:13;;;;5581:14;;;;5613:30;;;;5243:414;;5194:7;;5243:414;;5277:16;;5311:18;5613:30;5243:414;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;5243:414:51;;;5220:447;;;;;;5213:454;;5129:545;;;:::o;834:176:60:-;892:7;923:5;;;946:6;;;;938:46;;;;-1:-1:-1;;;938:46:60;;;;;;;;;1002:1;834:176;-1:-1:-1;;;834:176:60:o;1274:179::-;1332:7;1364:1;1359;:6;;1351:49;;;;-1:-1:-1;;;1351:49:60;;;;;;;;;-1:-1:-1;1422:5:60;;;1274:179::o;5:130:-1:-;72:20;;-1:-1;;;;;10218:54;;11180:35;;11170:2;;11229:1;;11219:12;142:124;206:20;;10051:13;;10044:21;11301:32;;11291:2;;11347:1;;11337:12;438:1845;;550:5;;538:9;533:3;529:19;525:31;522:2;;;-1:-1;;559:12;522:2;587:21;602:5;587:21;;;578:30;;;716:22;340:20;678:15;671:74;814:2;872:9;868:22;340:20;814:2;833:5;829:16;822:75;968:2;1026:9;1022:22;340:20;968:2;987:5;983:16;976:75;1114:2;1172:9;1168:22;340:20;1114:2;1133:5;1129:16;1122:75;1269:3;1328:9;1324:22;340:20;1269:3;1289:5;1285:16;1278:75;1425:3;1484:9;1480:22;340:20;1425:3;1445:5;1441:16;1434:75;1570:3;1629:9;1625:22;340:20;1570:3;1590:5;1586:16;1579:75;1750:49;1795:3;1716;1775:9;1771:22;1750:49;;;1716:3;1736:5;1732:16;1725:75;1864:3;1899:49;1944:3;1935:6;1924:9;1920:22;1899:49;;;1880:17;;;1873:76;2014:3;2049:49;2094:3;2070:22;;;2049:49;;;2030:17;;;2023:76;2180:3;2215:46;2257:3;2233:22;;;2215:46;;;2196:17;;;2189:73;2200:5;516:1767;-1:-1;;516:1767;2427:241;;2531:2;2519:9;2510:7;2506:23;2502:32;2499:2;;;-1:-1;;2537:12;2499:2;-1:-1;340:20;;2493:175;-1:-1;2493:175;2675:288;;2802:3;2790:9;2781:7;2777:23;2773:33;2770:2;;;-1:-1;;2809:12;2770:2;2871:76;2939:7;2915:22;2871:76;;2970:414;;;3114:3;3102:9;3093:7;3089:23;3085:33;3082:2;;;-1:-1;;3121:12;3082:2;3183:76;3251:7;3227:22;3183:76;;;3173:86;3296:3;3336:22;;;;2357:20;;-1:-1;;;3076:308;5738:1623;3897:58;;;6229:2;6220:12;;3897:58;;;;6331:12;;;3897:58;;;;6442:12;;;;3897:58;;;;6553:12;;;3897:58;;;;6664:12;;;3897:58;;;;6775:12;;;3897:58;11089:14;;-1:-1;;11089:14;;;6886:12;;;3480:58;11089:14;;;;;6997:12;;;3480:58;11089:14;;;;7108:12;;;3480:58;10051:13;10044:21;10990:3;10986:15;7219:12;;;3744:52;7325:11;;;6120:1241;7368:201;10051:13;;10044:21;3615:34;;7480:2;7465:18;;7451:118;7576:407;7767:2;7781:47;;;4192:2;7752:18;;;9819:19;4228:66;9859:14;;;4208:87;4314:12;;;7738:245;7990:407;8181:2;8195:47;;;4565:2;8166:18;;;9819:19;4601:66;9859:14;;;4581:87;4687:12;;;8152:245;8404:407;8595:2;8609:47;;;4938:2;8580:18;;;9819:19;4974:66;9859:14;;;4954:87;5060:12;;;8566:245;8818:407;9009:2;9023:47;;;5311:2;8994:18;;;9819:19;5347:66;9859:14;;;5327:87;5433:12;;;8980:245;9232:213;3897:58;;;9350:2;9335:18;;9321:124;9452:256;9514:2;9508:9;9540:17;;;9615:18;9600:34;;9636:22;;;9597:62;9594:2;;;9672:1;;9662:12;9594:2;9514;9681:22;9492:216;;-1:-1;9492:216", | |
"source": "pragma solidity 0.5.11;\npragma experimental ABIEncoderV2;\n\nimport \"../../libraries/LibOrder.sol\";\nimport \"../../interfaces/trading/IFillOrder.sol\";\nimport \"../../interfaces/trading/ICancelOrder.sol\";\nimport \"../../interfaces/trading/IFills.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\n\n\n/// @title Fills\n/// @author Julian Wilson <[email protected]>\n/// @notice Stores the \"fullness\" of each order, whose ID\n/// is its hash. \ncontract Fills is IFills {\n using LibOrder for LibOrder.Order;\n using SafeMath for uint256;\n\n IFillOrder private fillOrder;\n ICancelOrder private cancelOrder;\n \n mapping(bytes32 => uint256) private filled;\n mapping(bytes32 => bool) private cancelled;\n mapping(bytes32 => bool) private fillHashSubmitted;\n\n /// @notice Throws if the caller is not the FillOrder contract.\n modifier onlyFillOrderContract() {\n require(\n msg.sender == address(fillOrder), \n \"ONLY_FILL_ORDER_DERIVATIVES\"\n );\n _;\n }\n\n /// @notice Throws if the caller is not the CancelOrder contract.\n modifier onlyCancelOrderContract() {\n require(\n msg.sender == address(cancelOrder),\n \"ONLY_CANCEL_ORDER_CONTRACT\"\n );\n _;\n }\n\n constructor(IFillOrder _fillOrder, ICancelOrder _cancelOrder) public {\n fillOrder = _fillOrder;\n cancelOrder = _cancelOrder;\n }\n\n /// @notice Fill an order by the given amount.\n /// @param order The order to fill.\n /// @param amount The amount to fill it by.\n /// @return The new filled amount for this order.\n function fill(\n LibOrder.Order memory order, \n uint256 amount\n ) \n public \n onlyFillOrderContract\n returns (uint256) \n {\n bytes32 orderHash = order.getOrderHash();\n filled[orderHash] = filled[orderHash].add(amount);\n return filled[orderHash];\n } \n\n /// @notice Cancels an order.\n /// @param order The order to cancel.\n function cancel(LibOrder.Order memory order) \n public \n onlyCancelOrderContract \n {\n bytes32 orderHash = order.getOrderHash();\n cancelled[orderHash] = true;\n }\n\n /// @notice Sets a fill hash as submitted. It cannot be filled again.\n /// @param fillHash The hash to set as submitted.\n function setFillHashSubmitted(bytes32 fillHash)\n public\n onlyFillOrderContract\n {\n fillHashSubmitted[fillHash] = true;\n }\n\n /// @notice Gets the amount an order has been filled by.\n /// @param orderHash The hash of the order to check.\n /// @return The amount the order has been filled by.\n function getFilled(bytes32 orderHash) public view returns (uint256) {\n return filled[orderHash];\n }\n\n /// @notice Checks if an order has been cancelled.\n /// @param orderHash The hash of the order to check.\n /// @return true if the order has been cancelled, false otherwise.\n function getCancelled(bytes32 orderHash) public view returns (bool) {\n return cancelled[orderHash];\n }\n\n /// @notice Checks if a fill hash was submitted.\n /// @param fillHash The fill hash to check.\n /// @return true if the fill has been submitted, false otherwise.\n function getFillHashSubmitted(bytes32 fillHash) public view returns (bool) {\n return fillHashSubmitted[fillHash];\n }\n\n /// @notice Check if an order has sufficient space.\n /// @param order The order to examine.\n /// @param takerAmount The amount to fill.\n /// @return true if there is enough space, false otherwise.\n function orderHasSpace(\n LibOrder.Order memory order, \n uint256 takerAmount\n ) \n public \n view \n returns (bool) \n {\n return takerAmount <= remainingSpace(order);\n }\n\n /// @notice Gets the remaining space for an order.\n /// @param order The order to check.\n /// @return The remaining space on the order. It returns 0 if \n /// the order is cancelled.\n function remainingSpace(LibOrder.Order memory order)\n public \n view\n returns (uint256) \n {\n bytes32 orderHash = order.getOrderHash();\n if (cancelled[orderHash]) {\n return 0;\n } else {\n return order.totalBetSize.sub(filled[orderHash]);\n }\n }\n\n /// @notice Checks if the order is cancelled.\n /// @param order The order to check.\n /// @return true if the order is cancelled, false otherwise.\n function isOrderCancelled(LibOrder.Order memory order) \n public\n view\n returns(bool)\n {\n bytes32 orderHash = order.getOrderHash();\n return cancelled[orderHash];\n }\n}", | |
"sourcePath": "/home/julian/betx/betx-contracts/contracts/impl/trading/Fills.sol", | |
"ast": { | |
"absolutePath": "/home/julian/betx/betx-contracts/contracts/impl/trading/Fills.sol", | |
"exportedSymbols": { | |
"Fills": [ | |
8215 | |
] | |
}, | |
"id": 8216, | |
"nodeType": "SourceUnit", | |
"nodes": [ | |
{ | |
"id": 7973, | |
"literals": [ | |
"solidity", | |
"0.5", | |
".11" | |
], | |
"nodeType": "PragmaDirective", | |
"src": "0:23:28" | |
}, | |
{ | |
"id": 7974, | |
"literals": [ | |
"experimental", | |
"ABIEncoderV2" | |
], | |
"nodeType": "PragmaDirective", | |
"src": "24:33:28" | |
}, | |
{ | |
"absolutePath": "/home/julian/betx/betx-contracts/contracts/libraries/LibOrder.sol", | |
"file": "../../libraries/LibOrder.sol", | |
"id": 7975, | |
"nodeType": "ImportDirective", | |
"scope": 8216, | |
"sourceUnit": 9594, | |
"src": "59:38:28", | |
"symbolAliases": [], | |
"unitAlias": "" | |
}, | |
{ | |
"absolutePath": "/home/julian/betx/betx-contracts/contracts/interfaces/trading/IFillOrder.sol", | |
"file": "../../interfaces/trading/IFillOrder.sol", | |
"id": 7976, | |
"nodeType": "ImportDirective", | |
"scope": 8216, | |
"sourceUnit": 9085, | |
"src": "98:49:28", | |
"symbolAliases": [], | |
"unitAlias": "" | |
}, | |
{ | |
"absolutePath": "/home/julian/betx/betx-contracts/contracts/interfaces/trading/ICancelOrder.sol", | |
"file": "../../interfaces/trading/ICancelOrder.sol", | |
"id": 7977, | |
"nodeType": "ImportDirective", | |
"scope": 8216, | |
"sourceUnit": 9007, | |
"src": "148:51:28", | |
"symbolAliases": [], | |
"unitAlias": "" | |
}, | |
{ | |
"absolutePath": "/home/julian/betx/betx-contracts/contracts/interfaces/trading/IFills.sol", | |
"file": "../../interfaces/trading/IFills.sol", | |
"id": 7978, | |
"nodeType": "ImportDirective", | |
"scope": 8216, | |
"sourceUnit": 9153, | |
"src": "200:45:28", | |
"symbolAliases": [], | |
"unitAlias": "" | |
}, | |
{ | |
"absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", | |
"file": "openzeppelin-solidity/contracts/math/SafeMath.sol", | |
"id": 7979, | |
"nodeType": "ImportDirective", | |
"scope": 8216, | |
"sourceUnit": 10370, | |
"src": "246:59:28", | |
"symbolAliases": [], | |
"unitAlias": "" | |
}, | |
{ | |
"baseContracts": [ | |
{ | |
"arguments": null, | |
"baseName": { | |
"contractScope": null, | |
"id": 7980, | |
"name": "IFills", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 9152, | |
"src": "478:6:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_IFills_$9152", | |
"typeString": "contract IFills" | |
} | |
}, | |
"id": 7981, | |
"nodeType": "InheritanceSpecifier", | |
"src": "478:6:28" | |
} | |
], | |
"contractDependencies": [ | |
9152 | |
], | |
"contractKind": "contract", | |
"documentation": "@title Fills\n @author Julian Wilson <[email protected]>\n @notice Stores the \"fullness\" of each order, whose ID\n is its hash. ", | |
"fullyImplemented": true, | |
"id": 8215, | |
"linearizedBaseContracts": [ | |
8215, | |
9152 | |
], | |
"name": "Fills", | |
"nodeType": "ContractDefinition", | |
"nodes": [ | |
{ | |
"id": 7984, | |
"libraryName": { | |
"contractScope": null, | |
"id": 7982, | |
"name": "LibOrder", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 9593, | |
"src": "497:8:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_LibOrder_$9593", | |
"typeString": "library LibOrder" | |
} | |
}, | |
"nodeType": "UsingForDirective", | |
"src": "491:34:28", | |
"typeName": { | |
"contractScope": null, | |
"id": 7983, | |
"name": "LibOrder.Order", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 9266, | |
"src": "510:14:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_storage_ptr", | |
"typeString": "struct LibOrder.Order" | |
} | |
} | |
}, | |
{ | |
"id": 7987, | |
"libraryName": { | |
"contractScope": null, | |
"id": 7985, | |
"name": "SafeMath", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 10369, | |
"src": "536:8:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_SafeMath_$10369", | |
"typeString": "library SafeMath" | |
} | |
}, | |
"nodeType": "UsingForDirective", | |
"src": "530:27:28", | |
"typeName": { | |
"id": 7986, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "549:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
}, | |
{ | |
"constant": false, | |
"id": 7989, | |
"name": "fillOrder", | |
"nodeType": "VariableDeclaration", | |
"scope": 8215, | |
"src": "563:28:28", | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_IFillOrder_$9084", | |
"typeString": "contract IFillOrder" | |
}, | |
"typeName": { | |
"contractScope": null, | |
"id": 7988, | |
"name": "IFillOrder", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 9084, | |
"src": "563:10:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_IFillOrder_$9084", | |
"typeString": "contract IFillOrder" | |
} | |
}, | |
"value": null, | |
"visibility": "private" | |
}, | |
{ | |
"constant": false, | |
"id": 7991, | |
"name": "cancelOrder", | |
"nodeType": "VariableDeclaration", | |
"scope": 8215, | |
"src": "597:32:28", | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_ICancelOrder_$9006", | |
"typeString": "contract ICancelOrder" | |
}, | |
"typeName": { | |
"contractScope": null, | |
"id": 7990, | |
"name": "ICancelOrder", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 9006, | |
"src": "597:12:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_ICancelOrder_$9006", | |
"typeString": "contract ICancelOrder" | |
} | |
}, | |
"value": null, | |
"visibility": "private" | |
}, | |
{ | |
"constant": false, | |
"id": 7995, | |
"name": "filled", | |
"nodeType": "VariableDeclaration", | |
"scope": 8215, | |
"src": "640:42:28", | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", | |
"typeString": "mapping(bytes32 => uint256)" | |
}, | |
"typeName": { | |
"id": 7994, | |
"keyType": { | |
"id": 7992, | |
"name": "bytes32", | |
"nodeType": "ElementaryTypeName", | |
"src": "648:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"nodeType": "Mapping", | |
"src": "640:27:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", | |
"typeString": "mapping(bytes32 => uint256)" | |
}, | |
"valueType": { | |
"id": 7993, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "659:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
}, | |
"value": null, | |
"visibility": "private" | |
}, | |
{ | |
"constant": false, | |
"id": 7999, | |
"name": "cancelled", | |
"nodeType": "VariableDeclaration", | |
"scope": 8215, | |
"src": "688:42:28", | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", | |
"typeString": "mapping(bytes32 => bool)" | |
}, | |
"typeName": { | |
"id": 7998, | |
"keyType": { | |
"id": 7996, | |
"name": "bytes32", | |
"nodeType": "ElementaryTypeName", | |
"src": "696:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"nodeType": "Mapping", | |
"src": "688:24:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", | |
"typeString": "mapping(bytes32 => bool)" | |
}, | |
"valueType": { | |
"id": 7997, | |
"name": "bool", | |
"nodeType": "ElementaryTypeName", | |
"src": "707:4:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
} | |
}, | |
"value": null, | |
"visibility": "private" | |
}, | |
{ | |
"constant": false, | |
"id": 8003, | |
"name": "fillHashSubmitted", | |
"nodeType": "VariableDeclaration", | |
"scope": 8215, | |
"src": "736:50:28", | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", | |
"typeString": "mapping(bytes32 => bool)" | |
}, | |
"typeName": { | |
"id": 8002, | |
"keyType": { | |
"id": 8000, | |
"name": "bytes32", | |
"nodeType": "ElementaryTypeName", | |
"src": "744:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"nodeType": "Mapping", | |
"src": "736:24:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", | |
"typeString": "mapping(bytes32 => bool)" | |
}, | |
"valueType": { | |
"id": 8001, | |
"name": "bool", | |
"nodeType": "ElementaryTypeName", | |
"src": "755:4:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
} | |
}, | |
"value": null, | |
"visibility": "private" | |
}, | |
{ | |
"body": { | |
"id": 8016, | |
"nodeType": "Block", | |
"src": "894:135:28", | |
"statements": [ | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"arguments": [ | |
{ | |
"argumentTypes": null, | |
"commonType": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"id": 8011, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"argumentTypes": null, | |
"expression": { | |
"argumentTypes": null, | |
"id": 8006, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 12086, | |
"src": "925:3:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 8007, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": null, | |
"src": "925:10:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address_payable", | |
"typeString": "address payable" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "==", | |
"rightExpression": { | |
"argumentTypes": null, | |
"arguments": [ | |
{ | |
"argumentTypes": null, | |
"id": 8009, | |
"name": "fillOrder", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7989, | |
"src": "947:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_IFillOrder_$9084", | |
"typeString": "contract IFillOrder" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_IFillOrder_$9084", | |
"typeString": "contract IFillOrder" | |
} | |
], | |
"id": 8008, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "939:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_address_$", | |
"typeString": "type(address)" | |
}, | |
"typeName": "address" | |
}, | |
"id": 8010, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "939:18:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"src": "925:32:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"argumentTypes": null, | |
"hexValue": "4f4e4c595f46494c4c5f4f524445525f4445524956415449564553", | |
"id": 8012, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "972:29:28", | |
"subdenomination": null, | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_d4f3e9c7ae7acee57d019b88bb10acca5c60ab2d01c040a4484dd4c29776e974", | |
"typeString": "literal_string \"ONLY_FILL_ORDER_DERIVATIVES\"" | |
}, | |
"value": "ONLY_FILL_ORDER_DERIVATIVES" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_d4f3e9c7ae7acee57d019b88bb10acca5c60ab2d01c040a4484dd4c29776e974", | |
"typeString": "literal_string \"ONLY_FILL_ORDER_DERIVATIVES\"" | |
} | |
], | |
"id": 8005, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
12089, | |
12090 | |
], | |
"referencedDeclaration": 12090, | |
"src": "904:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 8013, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "904:107:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 8014, | |
"nodeType": "ExpressionStatement", | |
"src": "904:107:28" | |
}, | |
{ | |
"id": 8015, | |
"nodeType": "PlaceholderStatement", | |
"src": "1021:1:28" | |
} | |
] | |
}, | |
"documentation": "@notice Throws if the caller is not the FillOrder contract.", | |
"id": 8017, | |
"name": "onlyFillOrderContract", | |
"nodeType": "ModifierDefinition", | |
"parameters": { | |
"id": 8004, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "891:2:28" | |
}, | |
"src": "861:168:28", | |
"visibility": "internal" | |
}, | |
{ | |
"body": { | |
"id": 8030, | |
"nodeType": "Block", | |
"src": "1140:135:28", | |
"statements": [ | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"arguments": [ | |
{ | |
"argumentTypes": null, | |
"commonType": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"id": 8025, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"argumentTypes": null, | |
"expression": { | |
"argumentTypes": null, | |
"id": 8020, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 12086, | |
"src": "1171:3:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 8021, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": null, | |
"src": "1171:10:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address_payable", | |
"typeString": "address payable" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "==", | |
"rightExpression": { | |
"argumentTypes": null, | |
"arguments": [ | |
{ | |
"argumentTypes": null, | |
"id": 8023, | |
"name": "cancelOrder", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7991, | |
"src": "1193:11:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_ICancelOrder_$9006", | |
"typeString": "contract ICancelOrder" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_ICancelOrder_$9006", | |
"typeString": "contract ICancelOrder" | |
} | |
], | |
"id": 8022, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "1185:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_address_$", | |
"typeString": "type(address)" | |
}, | |
"typeName": "address" | |
}, | |
"id": 8024, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "1185:20:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"src": "1171:34:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"argumentTypes": null, | |
"hexValue": "4f4e4c595f43414e43454c5f4f524445525f434f4e5452414354", | |
"id": 8026, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "1219:28:28", | |
"subdenomination": null, | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_e9f25b96262dc08a73826d402ff4abba3da6405cf6eee14c61567028b4cc0c6f", | |
"typeString": "literal_string \"ONLY_CANCEL_ORDER_CONTRACT\"" | |
}, | |
"value": "ONLY_CANCEL_ORDER_CONTRACT" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_e9f25b96262dc08a73826d402ff4abba3da6405cf6eee14c61567028b4cc0c6f", | |
"typeString": "literal_string \"ONLY_CANCEL_ORDER_CONTRACT\"" | |
} | |
], | |
"id": 8019, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
12089, | |
12090 | |
], | |
"referencedDeclaration": 12090, | |
"src": "1150:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 8027, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "1150:107:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 8028, | |
"nodeType": "ExpressionStatement", | |
"src": "1150:107:28" | |
}, | |
{ | |
"id": 8029, | |
"nodeType": "PlaceholderStatement", | |
"src": "1267:1:28" | |
} | |
] | |
}, | |
"documentation": "@notice Throws if the caller is not the CancelOrder contract.", | |
"id": 8031, | |
"name": "onlyCancelOrderContract", | |
"nodeType": "ModifierDefinition", | |
"parameters": { | |
"id": 8018, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "1137:2:28" | |
}, | |
"src": "1105:170:28", | |
"visibility": "internal" | |
}, | |
{ | |
"body": { | |
"id": 8046, | |
"nodeType": "Block", | |
"src": "1350:75:28", | |
"statements": [ | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"id": 8040, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"argumentTypes": null, | |
"id": 8038, | |
"name": "fillOrder", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7989, | |
"src": "1360:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_IFillOrder_$9084", | |
"typeString": "contract IFillOrder" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"argumentTypes": null, | |
"id": 8039, | |
"name": "_fillOrder", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8033, | |
"src": "1372:10:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_IFillOrder_$9084", | |
"typeString": "contract IFillOrder" | |
} | |
}, | |
"src": "1360:22:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_IFillOrder_$9084", | |
"typeString": "contract IFillOrder" | |
} | |
}, | |
"id": 8041, | |
"nodeType": "ExpressionStatement", | |
"src": "1360:22:28" | |
}, | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"id": 8044, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"argumentTypes": null, | |
"id": 8042, | |
"name": "cancelOrder", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7991, | |
"src": "1392:11:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_ICancelOrder_$9006", | |
"typeString": "contract ICancelOrder" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"argumentTypes": null, | |
"id": 8043, | |
"name": "_cancelOrder", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8035, | |
"src": "1406:12:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_ICancelOrder_$9006", | |
"typeString": "contract ICancelOrder" | |
} | |
}, | |
"src": "1392:26:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_ICancelOrder_$9006", | |
"typeString": "contract ICancelOrder" | |
} | |
}, | |
"id": 8045, | |
"nodeType": "ExpressionStatement", | |
"src": "1392:26:28" | |
} | |
] | |
}, | |
"documentation": null, | |
"id": 8047, | |
"implemented": true, | |
"kind": "constructor", | |
"modifiers": [], | |
"name": "", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 8036, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8033, | |
"name": "_fillOrder", | |
"nodeType": "VariableDeclaration", | |
"scope": 8047, | |
"src": "1293:21:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_IFillOrder_$9084", | |
"typeString": "contract IFillOrder" | |
}, | |
"typeName": { | |
"contractScope": null, | |
"id": 8032, | |
"name": "IFillOrder", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 9084, | |
"src": "1293:10:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_IFillOrder_$9084", | |
"typeString": "contract IFillOrder" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 8035, | |
"name": "_cancelOrder", | |
"nodeType": "VariableDeclaration", | |
"scope": 8047, | |
"src": "1316:25:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_ICancelOrder_$9006", | |
"typeString": "contract ICancelOrder" | |
}, | |
"typeName": { | |
"contractScope": null, | |
"id": 8034, | |
"name": "ICancelOrder", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 9006, | |
"src": "1316:12:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_ICancelOrder_$9006", | |
"typeString": "contract ICancelOrder" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "1292:50:28" | |
}, | |
"returnParameters": { | |
"id": 8037, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "1350:0:28" | |
}, | |
"scope": 8215, | |
"src": "1281:144:28", | |
"stateMutability": "nonpayable", | |
"superFunction": null, | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 8079, | |
"nodeType": "Block", | |
"src": "1784:150:28", | |
"statements": [ | |
{ | |
"assignments": [ | |
8059 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 8059, | |
"name": "orderHash", | |
"nodeType": "VariableDeclaration", | |
"scope": 8079, | |
"src": "1794:17:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
}, | |
"typeName": { | |
"id": 8058, | |
"name": "bytes32", | |
"nodeType": "ElementaryTypeName", | |
"src": "1794:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"id": 8063, | |
"initialValue": { | |
"argumentTypes": null, | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"expression": { | |
"argumentTypes": null, | |
"id": 8060, | |
"name": "order", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8049, | |
"src": "1814:5:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_memory_ptr", | |
"typeString": "struct LibOrder.Order memory" | |
} | |
}, | |
"id": 8061, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "getOrderHash", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 9592, | |
"src": "1814:18:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_pure$_t_struct$_Order_$9266_memory_ptr_$returns$_t_bytes32_$bound_to$_t_struct$_Order_$9266_memory_ptr_$", | |
"typeString": "function (struct LibOrder.Order memory) pure returns (bytes32)" | |
} | |
}, | |
"id": 8062, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "1814:20:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "1794:40:28" | |
}, | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"id": 8073, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 8064, | |
"name": "filled", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7995, | |
"src": "1844:6:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", | |
"typeString": "mapping(bytes32 => uint256)" | |
} | |
}, | |
"id": 8066, | |
"indexExpression": { | |
"argumentTypes": null, | |
"id": 8065, | |
"name": "orderHash", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8059, | |
"src": "1851:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "1844:17:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"argumentTypes": null, | |
"arguments": [ | |
{ | |
"argumentTypes": null, | |
"id": 8071, | |
"name": "amount", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8051, | |
"src": "1886:6:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"expression": { | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 8067, | |
"name": "filled", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7995, | |
"src": "1864:6:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", | |
"typeString": "mapping(bytes32 => uint256)" | |
} | |
}, | |
"id": 8069, | |
"indexExpression": { | |
"argumentTypes": null, | |
"id": 8068, | |
"name": "orderHash", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8059, | |
"src": "1871:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "1864:17:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 8070, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "add", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 10263, | |
"src": "1864:21:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", | |
"typeString": "function (uint256,uint256) pure returns (uint256)" | |
} | |
}, | |
"id": 8072, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "1864:29:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "1844:49:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 8074, | |
"nodeType": "ExpressionStatement", | |
"src": "1844:49:28" | |
}, | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 8075, | |
"name": "filled", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7995, | |
"src": "1910:6:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", | |
"typeString": "mapping(bytes32 => uint256)" | |
} | |
}, | |
"id": 8077, | |
"indexExpression": { | |
"argumentTypes": null, | |
"id": 8076, | |
"name": "orderHash", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8059, | |
"src": "1917:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "1910:17:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"functionReturnParameters": 8057, | |
"id": 8078, | |
"nodeType": "Return", | |
"src": "1903:24:28" | |
} | |
] | |
}, | |
"documentation": "@notice Fill an order by the given amount.\n @param order The order to fill.\n @param amount The amount to fill it by.\n @return The new filled amount for this order.", | |
"id": 8080, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [ | |
{ | |
"arguments": null, | |
"id": 8054, | |
"modifierName": { | |
"argumentTypes": null, | |
"id": 8053, | |
"name": "onlyFillOrderContract", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8017, | |
"src": "1731:21:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_modifier$__$", | |
"typeString": "modifier ()" | |
} | |
}, | |
"nodeType": "ModifierInvocation", | |
"src": "1731:21:28" | |
} | |
], | |
"name": "fill", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 8052, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8049, | |
"name": "order", | |
"nodeType": "VariableDeclaration", | |
"scope": 8080, | |
"src": "1647:27:28", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_memory_ptr", | |
"typeString": "struct LibOrder.Order" | |
}, | |
"typeName": { | |
"contractScope": null, | |
"id": 8048, | |
"name": "LibOrder.Order", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 9266, | |
"src": "1647:14:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_storage_ptr", | |
"typeString": "struct LibOrder.Order" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 8051, | |
"name": "amount", | |
"nodeType": "VariableDeclaration", | |
"scope": 8080, | |
"src": "1685:14:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 8050, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "1685:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "1637:68:28" | |
}, | |
"returnParameters": { | |
"id": 8057, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8056, | |
"name": "", | |
"nodeType": "VariableDeclaration", | |
"scope": 8080, | |
"src": "1770:7:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 8055, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "1770:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "1769:9:28" | |
}, | |
"scope": 8215, | |
"src": "1624:310:28", | |
"stateMutability": "nonpayable", | |
"superFunction": 9097, | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 8099, | |
"nodeType": "Block", | |
"src": "2118:94:28", | |
"statements": [ | |
{ | |
"assignments": [ | |
8088 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 8088, | |
"name": "orderHash", | |
"nodeType": "VariableDeclaration", | |
"scope": 8099, | |
"src": "2128:17:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
}, | |
"typeName": { | |
"id": 8087, | |
"name": "bytes32", | |
"nodeType": "ElementaryTypeName", | |
"src": "2128:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"id": 8092, | |
"initialValue": { | |
"argumentTypes": null, | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"expression": { | |
"argumentTypes": null, | |
"id": 8089, | |
"name": "order", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8082, | |
"src": "2148:5:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_memory_ptr", | |
"typeString": "struct LibOrder.Order memory" | |
} | |
}, | |
"id": 8090, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "getOrderHash", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 9592, | |
"src": "2148:18:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_pure$_t_struct$_Order_$9266_memory_ptr_$returns$_t_bytes32_$bound_to$_t_struct$_Order_$9266_memory_ptr_$", | |
"typeString": "function (struct LibOrder.Order memory) pure returns (bytes32)" | |
} | |
}, | |
"id": 8091, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "2148:20:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "2128:40:28" | |
}, | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"id": 8097, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 8093, | |
"name": "cancelled", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7999, | |
"src": "2178:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", | |
"typeString": "mapping(bytes32 => bool)" | |
} | |
}, | |
"id": 8095, | |
"indexExpression": { | |
"argumentTypes": null, | |
"id": 8094, | |
"name": "orderHash", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8088, | |
"src": "2188:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "2178:20:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"argumentTypes": null, | |
"hexValue": "74727565", | |
"id": 8096, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "bool", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "2201:4:28", | |
"subdenomination": null, | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"value": "true" | |
}, | |
"src": "2178:27:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 8098, | |
"nodeType": "ExpressionStatement", | |
"src": "2178:27:28" | |
} | |
] | |
}, | |
"documentation": "@notice Cancels an order.\n @param order The order to cancel.", | |
"id": 8100, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [ | |
{ | |
"arguments": null, | |
"id": 8085, | |
"modifierName": { | |
"argumentTypes": null, | |
"id": 8084, | |
"name": "onlyCancelOrderContract", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8031, | |
"src": "2089:23:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_modifier$__$", | |
"typeString": "modifier ()" | |
} | |
}, | |
"nodeType": "ModifierInvocation", | |
"src": "2089:23:28" | |
} | |
], | |
"name": "cancel", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 8083, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8082, | |
"name": "order", | |
"nodeType": "VariableDeclaration", | |
"scope": 8100, | |
"src": "2035:27:28", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_memory_ptr", | |
"typeString": "struct LibOrder.Order" | |
}, | |
"typeName": { | |
"contractScope": null, | |
"id": 8081, | |
"name": "LibOrder.Order", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 9266, | |
"src": "2035:14:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_storage_ptr", | |
"typeString": "struct LibOrder.Order" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "2034:29:28" | |
}, | |
"returnParameters": { | |
"id": 8086, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "2118:0:28" | |
}, | |
"scope": 8215, | |
"src": "2019:193:28", | |
"stateMutability": "nonpayable", | |
"superFunction": 9102, | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 8113, | |
"nodeType": "Block", | |
"src": "2443:51:28", | |
"statements": [ | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"id": 8111, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 8107, | |
"name": "fillHashSubmitted", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8003, | |
"src": "2453:17:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", | |
"typeString": "mapping(bytes32 => bool)" | |
} | |
}, | |
"id": 8109, | |
"indexExpression": { | |
"argumentTypes": null, | |
"id": 8108, | |
"name": "fillHash", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8102, | |
"src": "2471:8:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "2453:27:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"argumentTypes": null, | |
"hexValue": "74727565", | |
"id": 8110, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "bool", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "2483:4:28", | |
"subdenomination": null, | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"value": "true" | |
}, | |
"src": "2453:34:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 8112, | |
"nodeType": "ExpressionStatement", | |
"src": "2453:34:28" | |
} | |
] | |
}, | |
"documentation": "@notice Sets a fill hash as submitted. It cannot be filled again.\n @param fillHash The hash to set as submitted.", | |
"id": 8114, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [ | |
{ | |
"arguments": null, | |
"id": 8105, | |
"modifierName": { | |
"argumentTypes": null, | |
"id": 8104, | |
"name": "onlyFillOrderContract", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8017, | |
"src": "2417:21:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_modifier$__$", | |
"typeString": "modifier ()" | |
} | |
}, | |
"nodeType": "ModifierInvocation", | |
"src": "2417:21:28" | |
} | |
], | |
"name": "setFillHashSubmitted", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 8103, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8102, | |
"name": "fillHash", | |
"nodeType": "VariableDeclaration", | |
"scope": 8114, | |
"src": "2376:16:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
}, | |
"typeName": { | |
"id": 8101, | |
"name": "bytes32", | |
"nodeType": "ElementaryTypeName", | |
"src": "2376:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "2375:18:28" | |
}, | |
"returnParameters": { | |
"id": 8106, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "2443:0:28" | |
}, | |
"scope": 8215, | |
"src": "2346:148:28", | |
"stateMutability": "nonpayable", | |
"superFunction": 9107, | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 8125, | |
"nodeType": "Block", | |
"src": "2743:41:28", | |
"statements": [ | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 8121, | |
"name": "filled", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7995, | |
"src": "2760:6:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", | |
"typeString": "mapping(bytes32 => uint256)" | |
} | |
}, | |
"id": 8123, | |
"indexExpression": { | |
"argumentTypes": null, | |
"id": 8122, | |
"name": "orderHash", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8116, | |
"src": "2767:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "2760:17:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"functionReturnParameters": 8120, | |
"id": 8124, | |
"nodeType": "Return", | |
"src": "2753:24:28" | |
} | |
] | |
}, | |
"documentation": "@notice Gets the amount an order has been filled by.\n @param orderHash The hash of the order to check.\n @return The amount the order has been filled by.", | |
"id": 8126, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "getFilled", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 8117, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8116, | |
"name": "orderHash", | |
"nodeType": "VariableDeclaration", | |
"scope": 8126, | |
"src": "2694:17:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
}, | |
"typeName": { | |
"id": 8115, | |
"name": "bytes32", | |
"nodeType": "ElementaryTypeName", | |
"src": "2694:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "2693:19:28" | |
}, | |
"returnParameters": { | |
"id": 8120, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8119, | |
"name": "", | |
"nodeType": "VariableDeclaration", | |
"scope": 8126, | |
"src": "2734:7:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 8118, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "2734:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "2733:9:28" | |
}, | |
"scope": 8215, | |
"src": "2675:109:28", | |
"stateMutability": "view", | |
"superFunction": 9114, | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 8137, | |
"nodeType": "Block", | |
"src": "3041:44:28", | |
"statements": [ | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 8133, | |
"name": "cancelled", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7999, | |
"src": "3058:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", | |
"typeString": "mapping(bytes32 => bool)" | |
} | |
}, | |
"id": 8135, | |
"indexExpression": { | |
"argumentTypes": null, | |
"id": 8134, | |
"name": "orderHash", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8128, | |
"src": "3068:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "3058:20:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"functionReturnParameters": 8132, | |
"id": 8136, | |
"nodeType": "Return", | |
"src": "3051:27:28" | |
} | |
] | |
}, | |
"documentation": "@notice Checks if an order has been cancelled.\n @param orderHash The hash of the order to check.\n @return true if the order has been cancelled, false otherwise.", | |
"id": 8138, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "getCancelled", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 8129, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8128, | |
"name": "orderHash", | |
"nodeType": "VariableDeclaration", | |
"scope": 8138, | |
"src": "2995:17:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
}, | |
"typeName": { | |
"id": 8127, | |
"name": "bytes32", | |
"nodeType": "ElementaryTypeName", | |
"src": "2995:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "2994:19:28" | |
}, | |
"returnParameters": { | |
"id": 8132, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8131, | |
"name": "", | |
"nodeType": "VariableDeclaration", | |
"scope": 8138, | |
"src": "3035:4:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"typeName": { | |
"id": 8130, | |
"name": "bool", | |
"nodeType": "ElementaryTypeName", | |
"src": "3035:4:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "3034:6:28" | |
}, | |
"scope": 8215, | |
"src": "2973:112:28", | |
"stateMutability": "view", | |
"superFunction": 9121, | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 8149, | |
"nodeType": "Block", | |
"src": "3337:51:28", | |
"statements": [ | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 8145, | |
"name": "fillHashSubmitted", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8003, | |
"src": "3354:17:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", | |
"typeString": "mapping(bytes32 => bool)" | |
} | |
}, | |
"id": 8147, | |
"indexExpression": { | |
"argumentTypes": null, | |
"id": 8146, | |
"name": "fillHash", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8140, | |
"src": "3372:8:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "3354:27:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"functionReturnParameters": 8144, | |
"id": 8148, | |
"nodeType": "Return", | |
"src": "3347:34:28" | |
} | |
] | |
}, | |
"documentation": "@notice Checks if a fill hash was submitted.\n @param fillHash The fill hash to check.\n @return true if the fill has been submitted, false otherwise.", | |
"id": 8150, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "getFillHashSubmitted", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 8141, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8140, | |
"name": "fillHash", | |
"nodeType": "VariableDeclaration", | |
"scope": 8150, | |
"src": "3292:16:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
}, | |
"typeName": { | |
"id": 8139, | |
"name": "bytes32", | |
"nodeType": "ElementaryTypeName", | |
"src": "3292:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "3291:18:28" | |
}, | |
"returnParameters": { | |
"id": 8144, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8143, | |
"name": "", | |
"nodeType": "VariableDeclaration", | |
"scope": 8150, | |
"src": "3331:4:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"typeName": { | |
"id": 8142, | |
"name": "bool", | |
"nodeType": "ElementaryTypeName", | |
"src": "3331:4:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "3330:6:28" | |
}, | |
"scope": 8215, | |
"src": "3262:126:28", | |
"stateMutability": "view", | |
"superFunction": 9151, | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 8165, | |
"nodeType": "Block", | |
"src": "3759:60:28", | |
"statements": [ | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 8163, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"argumentTypes": null, | |
"id": 8159, | |
"name": "takerAmount", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8154, | |
"src": "3776:11:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "<=", | |
"rightExpression": { | |
"argumentTypes": null, | |
"arguments": [ | |
{ | |
"argumentTypes": null, | |
"id": 8161, | |
"name": "order", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8152, | |
"src": "3806:5:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_memory_ptr", | |
"typeString": "struct LibOrder.Order memory" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_struct$_Order_$9266_memory_ptr", | |
"typeString": "struct LibOrder.Order memory" | |
} | |
], | |
"id": 8160, | |
"name": "remainingSpace", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
8196 | |
], | |
"referencedDeclaration": 8196, | |
"src": "3791:14:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_view$_t_struct$_Order_$9266_memory_ptr_$returns$_t_uint256_$", | |
"typeString": "function (struct LibOrder.Order memory) view returns (uint256)" | |
} | |
}, | |
"id": 8162, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3791:21:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "3776:36:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"functionReturnParameters": 8158, | |
"id": 8164, | |
"nodeType": "Return", | |
"src": "3769:43:28" | |
} | |
] | |
}, | |
"documentation": "@notice Check if an order has sufficient space.\n @param order The order to examine.\n @param takerAmount The amount to fill.\n @return true if there is enough space, false otherwise.", | |
"id": 8166, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "orderHasSpace", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 8155, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8152, | |
"name": "order", | |
"nodeType": "VariableDeclaration", | |
"scope": 8166, | |
"src": "3636:27:28", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_memory_ptr", | |
"typeString": "struct LibOrder.Order" | |
}, | |
"typeName": { | |
"contractScope": null, | |
"id": 8151, | |
"name": "LibOrder.Order", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 9266, | |
"src": "3636:14:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_storage_ptr", | |
"typeString": "struct LibOrder.Order" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 8154, | |
"name": "takerAmount", | |
"nodeType": "VariableDeclaration", | |
"scope": 8166, | |
"src": "3674:19:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 8153, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "3674:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "3626:73:28" | |
}, | |
"returnParameters": { | |
"id": 8158, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8157, | |
"name": "", | |
"nodeType": "VariableDeclaration", | |
"scope": 8166, | |
"src": "3748:4:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"typeName": { | |
"id": 8156, | |
"name": "bool", | |
"nodeType": "ElementaryTypeName", | |
"src": "3748:4:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "3747:6:28" | |
}, | |
"scope": 8215, | |
"src": "3604:215:28", | |
"stateMutability": "view", | |
"superFunction": 9130, | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 8195, | |
"nodeType": "Block", | |
"src": "4141:204:28", | |
"statements": [ | |
{ | |
"assignments": [ | |
8174 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 8174, | |
"name": "orderHash", | |
"nodeType": "VariableDeclaration", | |
"scope": 8195, | |
"src": "4151:17:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
}, | |
"typeName": { | |
"id": 8173, | |
"name": "bytes32", | |
"nodeType": "ElementaryTypeName", | |
"src": "4151:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"id": 8178, | |
"initialValue": { | |
"argumentTypes": null, | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"expression": { | |
"argumentTypes": null, | |
"id": 8175, | |
"name": "order", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8168, | |
"src": "4171:5:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_memory_ptr", | |
"typeString": "struct LibOrder.Order memory" | |
} | |
}, | |
"id": 8176, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "getOrderHash", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 9592, | |
"src": "4171:18:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_pure$_t_struct$_Order_$9266_memory_ptr_$returns$_t_bytes32_$bound_to$_t_struct$_Order_$9266_memory_ptr_$", | |
"typeString": "function (struct LibOrder.Order memory) pure returns (bytes32)" | |
} | |
}, | |
"id": 8177, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "4171:20:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "4151:40:28" | |
}, | |
{ | |
"condition": { | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 8179, | |
"name": "cancelled", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7999, | |
"src": "4205:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", | |
"typeString": "mapping(bytes32 => bool)" | |
} | |
}, | |
"id": 8181, | |
"indexExpression": { | |
"argumentTypes": null, | |
"id": 8180, | |
"name": "orderHash", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8174, | |
"src": "4215:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "4205:20:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"falseBody": { | |
"id": 8193, | |
"nodeType": "Block", | |
"src": "4266:73:28", | |
"statements": [ | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"arguments": [ | |
{ | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 8188, | |
"name": "filled", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7995, | |
"src": "4310:6:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", | |
"typeString": "mapping(bytes32 => uint256)" | |
} | |
}, | |
"id": 8190, | |
"indexExpression": { | |
"argumentTypes": null, | |
"id": 8189, | |
"name": "orderHash", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8174, | |
"src": "4317:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "4310:17:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"expression": { | |
"argumentTypes": null, | |
"expression": { | |
"argumentTypes": null, | |
"id": 8185, | |
"name": "order", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8168, | |
"src": "4287:5:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_memory_ptr", | |
"typeString": "struct LibOrder.Order memory" | |
} | |
}, | |
"id": 8186, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "totalBetSize", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 9247, | |
"src": "4287:18:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 8187, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "sub", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 10288, | |
"src": "4287:22:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", | |
"typeString": "function (uint256,uint256) pure returns (uint256)" | |
} | |
}, | |
"id": 8191, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "4287:41:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"functionReturnParameters": 8172, | |
"id": 8192, | |
"nodeType": "Return", | |
"src": "4280:48:28" | |
} | |
] | |
}, | |
"id": 8194, | |
"nodeType": "IfStatement", | |
"src": "4201:138:28", | |
"trueBody": { | |
"id": 8184, | |
"nodeType": "Block", | |
"src": "4227:33:28", | |
"statements": [ | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"hexValue": "30", | |
"id": 8182, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "4248:1:28", | |
"subdenomination": null, | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"functionReturnParameters": 8172, | |
"id": 8183, | |
"nodeType": "Return", | |
"src": "4241:8:28" | |
} | |
] | |
} | |
} | |
] | |
}, | |
"documentation": "@notice Gets the remaining space for an order.\n @param order The order to check.\n @return The remaining space on the order. It returns 0 if \n the order is cancelled.", | |
"id": 8196, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "remainingSpace", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 8169, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8168, | |
"name": "order", | |
"nodeType": "VariableDeclaration", | |
"scope": 8196, | |
"src": "4052:27:28", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_memory_ptr", | |
"typeString": "struct LibOrder.Order" | |
}, | |
"typeName": { | |
"contractScope": null, | |
"id": 8167, | |
"name": "LibOrder.Order", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 9266, | |
"src": "4052:14:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_storage_ptr", | |
"typeString": "struct LibOrder.Order" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "4051:29:28" | |
}, | |
"returnParameters": { | |
"id": 8172, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8171, | |
"name": "", | |
"nodeType": "VariableDeclaration", | |
"scope": 8196, | |
"src": "4127:7:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 8170, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "4127:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "4126:9:28" | |
}, | |
"scope": 8215, | |
"src": "4028:317:28", | |
"stateMutability": "view", | |
"superFunction": 9137, | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 8213, | |
"nodeType": "Block", | |
"src": "4617:94:28", | |
"statements": [ | |
{ | |
"assignments": [ | |
8204 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 8204, | |
"name": "orderHash", | |
"nodeType": "VariableDeclaration", | |
"scope": 8213, | |
"src": "4627:17:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
}, | |
"typeName": { | |
"id": 8203, | |
"name": "bytes32", | |
"nodeType": "ElementaryTypeName", | |
"src": "4627:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"id": 8208, | |
"initialValue": { | |
"argumentTypes": null, | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"expression": { | |
"argumentTypes": null, | |
"id": 8205, | |
"name": "order", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8198, | |
"src": "4647:5:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_memory_ptr", | |
"typeString": "struct LibOrder.Order memory" | |
} | |
}, | |
"id": 8206, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "getOrderHash", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 9592, | |
"src": "4647:18:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_pure$_t_struct$_Order_$9266_memory_ptr_$returns$_t_bytes32_$bound_to$_t_struct$_Order_$9266_memory_ptr_$", | |
"typeString": "function (struct LibOrder.Order memory) pure returns (bytes32)" | |
} | |
}, | |
"id": 8207, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "4647:20:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "4627:40:28" | |
}, | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 8209, | |
"name": "cancelled", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7999, | |
"src": "4684:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", | |
"typeString": "mapping(bytes32 => bool)" | |
} | |
}, | |
"id": 8211, | |
"indexExpression": { | |
"argumentTypes": null, | |
"id": 8210, | |
"name": "orderHash", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8204, | |
"src": "4694:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "4684:20:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"functionReturnParameters": 8202, | |
"id": 8212, | |
"nodeType": "Return", | |
"src": "4677:27:28" | |
} | |
] | |
}, | |
"documentation": "@notice Checks if the order is cancelled.\n @param order The order to check.\n @return true if the order is cancelled, false otherwise.", | |
"id": 8214, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "isOrderCancelled", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 8199, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8198, | |
"name": "order", | |
"nodeType": "VariableDeclaration", | |
"scope": 8214, | |
"src": "4533:27:28", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_memory_ptr", | |
"typeString": "struct LibOrder.Order" | |
}, | |
"typeName": { | |
"contractScope": null, | |
"id": 8197, | |
"name": "LibOrder.Order", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 9266, | |
"src": "4533:14:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_storage_ptr", | |
"typeString": "struct LibOrder.Order" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "4532:29:28" | |
}, | |
"returnParameters": { | |
"id": 8202, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8201, | |
"name": "", | |
"nodeType": "VariableDeclaration", | |
"scope": 8214, | |
"src": "4607:4:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"typeName": { | |
"id": 8200, | |
"name": "bool", | |
"nodeType": "ElementaryTypeName", | |
"src": "4607:4:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "4606:6:28" | |
}, | |
"scope": 8215, | |
"src": "4507:204:28", | |
"stateMutability": "view", | |
"superFunction": 9144, | |
"visibility": "public" | |
} | |
], | |
"scope": 8216, | |
"src": "460:4253:28" | |
} | |
], | |
"src": "0:4713:28" | |
}, | |
"legacyAST": { | |
"absolutePath": "/home/julian/betx/betx-contracts/contracts/impl/trading/Fills.sol", | |
"exportedSymbols": { | |
"Fills": [ | |
8215 | |
] | |
}, | |
"id": 8216, | |
"nodeType": "SourceUnit", | |
"nodes": [ | |
{ | |
"id": 7973, | |
"literals": [ | |
"solidity", | |
"0.5", | |
".11" | |
], | |
"nodeType": "PragmaDirective", | |
"src": "0:23:28" | |
}, | |
{ | |
"id": 7974, | |
"literals": [ | |
"experimental", | |
"ABIEncoderV2" | |
], | |
"nodeType": "PragmaDirective", | |
"src": "24:33:28" | |
}, | |
{ | |
"absolutePath": "/home/julian/betx/betx-contracts/contracts/libraries/LibOrder.sol", | |
"file": "../../libraries/LibOrder.sol", | |
"id": 7975, | |
"nodeType": "ImportDirective", | |
"scope": 8216, | |
"sourceUnit": 9594, | |
"src": "59:38:28", | |
"symbolAliases": [], | |
"unitAlias": "" | |
}, | |
{ | |
"absolutePath": "/home/julian/betx/betx-contracts/contracts/interfaces/trading/IFillOrder.sol", | |
"file": "../../interfaces/trading/IFillOrder.sol", | |
"id": 7976, | |
"nodeType": "ImportDirective", | |
"scope": 8216, | |
"sourceUnit": 9085, | |
"src": "98:49:28", | |
"symbolAliases": [], | |
"unitAlias": "" | |
}, | |
{ | |
"absolutePath": "/home/julian/betx/betx-contracts/contracts/interfaces/trading/ICancelOrder.sol", | |
"file": "../../interfaces/trading/ICancelOrder.sol", | |
"id": 7977, | |
"nodeType": "ImportDirective", | |
"scope": 8216, | |
"sourceUnit": 9007, | |
"src": "148:51:28", | |
"symbolAliases": [], | |
"unitAlias": "" | |
}, | |
{ | |
"absolutePath": "/home/julian/betx/betx-contracts/contracts/interfaces/trading/IFills.sol", | |
"file": "../../interfaces/trading/IFills.sol", | |
"id": 7978, | |
"nodeType": "ImportDirective", | |
"scope": 8216, | |
"sourceUnit": 9153, | |
"src": "200:45:28", | |
"symbolAliases": [], | |
"unitAlias": "" | |
}, | |
{ | |
"absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", | |
"file": "openzeppelin-solidity/contracts/math/SafeMath.sol", | |
"id": 7979, | |
"nodeType": "ImportDirective", | |
"scope": 8216, | |
"sourceUnit": 10370, | |
"src": "246:59:28", | |
"symbolAliases": [], | |
"unitAlias": "" | |
}, | |
{ | |
"baseContracts": [ | |
{ | |
"arguments": null, | |
"baseName": { | |
"contractScope": null, | |
"id": 7980, | |
"name": "IFills", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 9152, | |
"src": "478:6:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_IFills_$9152", | |
"typeString": "contract IFills" | |
} | |
}, | |
"id": 7981, | |
"nodeType": "InheritanceSpecifier", | |
"src": "478:6:28" | |
} | |
], | |
"contractDependencies": [ | |
9152 | |
], | |
"contractKind": "contract", | |
"documentation": "@title Fills\n @author Julian Wilson <[email protected]>\n @notice Stores the \"fullness\" of each order, whose ID\n is its hash. ", | |
"fullyImplemented": true, | |
"id": 8215, | |
"linearizedBaseContracts": [ | |
8215, | |
9152 | |
], | |
"name": "Fills", | |
"nodeType": "ContractDefinition", | |
"nodes": [ | |
{ | |
"id": 7984, | |
"libraryName": { | |
"contractScope": null, | |
"id": 7982, | |
"name": "LibOrder", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 9593, | |
"src": "497:8:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_LibOrder_$9593", | |
"typeString": "library LibOrder" | |
} | |
}, | |
"nodeType": "UsingForDirective", | |
"src": "491:34:28", | |
"typeName": { | |
"contractScope": null, | |
"id": 7983, | |
"name": "LibOrder.Order", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 9266, | |
"src": "510:14:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_storage_ptr", | |
"typeString": "struct LibOrder.Order" | |
} | |
} | |
}, | |
{ | |
"id": 7987, | |
"libraryName": { | |
"contractScope": null, | |
"id": 7985, | |
"name": "SafeMath", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 10369, | |
"src": "536:8:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_SafeMath_$10369", | |
"typeString": "library SafeMath" | |
} | |
}, | |
"nodeType": "UsingForDirective", | |
"src": "530:27:28", | |
"typeName": { | |
"id": 7986, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "549:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
}, | |
{ | |
"constant": false, | |
"id": 7989, | |
"name": "fillOrder", | |
"nodeType": "VariableDeclaration", | |
"scope": 8215, | |
"src": "563:28:28", | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_IFillOrder_$9084", | |
"typeString": "contract IFillOrder" | |
}, | |
"typeName": { | |
"contractScope": null, | |
"id": 7988, | |
"name": "IFillOrder", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 9084, | |
"src": "563:10:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_IFillOrder_$9084", | |
"typeString": "contract IFillOrder" | |
} | |
}, | |
"value": null, | |
"visibility": "private" | |
}, | |
{ | |
"constant": false, | |
"id": 7991, | |
"name": "cancelOrder", | |
"nodeType": "VariableDeclaration", | |
"scope": 8215, | |
"src": "597:32:28", | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_ICancelOrder_$9006", | |
"typeString": "contract ICancelOrder" | |
}, | |
"typeName": { | |
"contractScope": null, | |
"id": 7990, | |
"name": "ICancelOrder", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 9006, | |
"src": "597:12:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_ICancelOrder_$9006", | |
"typeString": "contract ICancelOrder" | |
} | |
}, | |
"value": null, | |
"visibility": "private" | |
}, | |
{ | |
"constant": false, | |
"id": 7995, | |
"name": "filled", | |
"nodeType": "VariableDeclaration", | |
"scope": 8215, | |
"src": "640:42:28", | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", | |
"typeString": "mapping(bytes32 => uint256)" | |
}, | |
"typeName": { | |
"id": 7994, | |
"keyType": { | |
"id": 7992, | |
"name": "bytes32", | |
"nodeType": "ElementaryTypeName", | |
"src": "648:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"nodeType": "Mapping", | |
"src": "640:27:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", | |
"typeString": "mapping(bytes32 => uint256)" | |
}, | |
"valueType": { | |
"id": 7993, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "659:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
}, | |
"value": null, | |
"visibility": "private" | |
}, | |
{ | |
"constant": false, | |
"id": 7999, | |
"name": "cancelled", | |
"nodeType": "VariableDeclaration", | |
"scope": 8215, | |
"src": "688:42:28", | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", | |
"typeString": "mapping(bytes32 => bool)" | |
}, | |
"typeName": { | |
"id": 7998, | |
"keyType": { | |
"id": 7996, | |
"name": "bytes32", | |
"nodeType": "ElementaryTypeName", | |
"src": "696:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"nodeType": "Mapping", | |
"src": "688:24:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", | |
"typeString": "mapping(bytes32 => bool)" | |
}, | |
"valueType": { | |
"id": 7997, | |
"name": "bool", | |
"nodeType": "ElementaryTypeName", | |
"src": "707:4:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
} | |
}, | |
"value": null, | |
"visibility": "private" | |
}, | |
{ | |
"constant": false, | |
"id": 8003, | |
"name": "fillHashSubmitted", | |
"nodeType": "VariableDeclaration", | |
"scope": 8215, | |
"src": "736:50:28", | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", | |
"typeString": "mapping(bytes32 => bool)" | |
}, | |
"typeName": { | |
"id": 8002, | |
"keyType": { | |
"id": 8000, | |
"name": "bytes32", | |
"nodeType": "ElementaryTypeName", | |
"src": "744:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"nodeType": "Mapping", | |
"src": "736:24:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", | |
"typeString": "mapping(bytes32 => bool)" | |
}, | |
"valueType": { | |
"id": 8001, | |
"name": "bool", | |
"nodeType": "ElementaryTypeName", | |
"src": "755:4:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
} | |
}, | |
"value": null, | |
"visibility": "private" | |
}, | |
{ | |
"body": { | |
"id": 8016, | |
"nodeType": "Block", | |
"src": "894:135:28", | |
"statements": [ | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"arguments": [ | |
{ | |
"argumentTypes": null, | |
"commonType": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"id": 8011, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"argumentTypes": null, | |
"expression": { | |
"argumentTypes": null, | |
"id": 8006, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 12086, | |
"src": "925:3:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 8007, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": null, | |
"src": "925:10:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address_payable", | |
"typeString": "address payable" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "==", | |
"rightExpression": { | |
"argumentTypes": null, | |
"arguments": [ | |
{ | |
"argumentTypes": null, | |
"id": 8009, | |
"name": "fillOrder", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7989, | |
"src": "947:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_IFillOrder_$9084", | |
"typeString": "contract IFillOrder" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_IFillOrder_$9084", | |
"typeString": "contract IFillOrder" | |
} | |
], | |
"id": 8008, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "939:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_address_$", | |
"typeString": "type(address)" | |
}, | |
"typeName": "address" | |
}, | |
"id": 8010, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "939:18:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"src": "925:32:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"argumentTypes": null, | |
"hexValue": "4f4e4c595f46494c4c5f4f524445525f4445524956415449564553", | |
"id": 8012, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "972:29:28", | |
"subdenomination": null, | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_d4f3e9c7ae7acee57d019b88bb10acca5c60ab2d01c040a4484dd4c29776e974", | |
"typeString": "literal_string \"ONLY_FILL_ORDER_DERIVATIVES\"" | |
}, | |
"value": "ONLY_FILL_ORDER_DERIVATIVES" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_d4f3e9c7ae7acee57d019b88bb10acca5c60ab2d01c040a4484dd4c29776e974", | |
"typeString": "literal_string \"ONLY_FILL_ORDER_DERIVATIVES\"" | |
} | |
], | |
"id": 8005, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
12089, | |
12090 | |
], | |
"referencedDeclaration": 12090, | |
"src": "904:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 8013, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "904:107:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 8014, | |
"nodeType": "ExpressionStatement", | |
"src": "904:107:28" | |
}, | |
{ | |
"id": 8015, | |
"nodeType": "PlaceholderStatement", | |
"src": "1021:1:28" | |
} | |
] | |
}, | |
"documentation": "@notice Throws if the caller is not the FillOrder contract.", | |
"id": 8017, | |
"name": "onlyFillOrderContract", | |
"nodeType": "ModifierDefinition", | |
"parameters": { | |
"id": 8004, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "891:2:28" | |
}, | |
"src": "861:168:28", | |
"visibility": "internal" | |
}, | |
{ | |
"body": { | |
"id": 8030, | |
"nodeType": "Block", | |
"src": "1140:135:28", | |
"statements": [ | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"arguments": [ | |
{ | |
"argumentTypes": null, | |
"commonType": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"id": 8025, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"argumentTypes": null, | |
"expression": { | |
"argumentTypes": null, | |
"id": 8020, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 12086, | |
"src": "1171:3:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 8021, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": null, | |
"src": "1171:10:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address_payable", | |
"typeString": "address payable" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "==", | |
"rightExpression": { | |
"argumentTypes": null, | |
"arguments": [ | |
{ | |
"argumentTypes": null, | |
"id": 8023, | |
"name": "cancelOrder", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7991, | |
"src": "1193:11:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_ICancelOrder_$9006", | |
"typeString": "contract ICancelOrder" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_ICancelOrder_$9006", | |
"typeString": "contract ICancelOrder" | |
} | |
], | |
"id": 8022, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "1185:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_address_$", | |
"typeString": "type(address)" | |
}, | |
"typeName": "address" | |
}, | |
"id": 8024, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "1185:20:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"src": "1171:34:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"argumentTypes": null, | |
"hexValue": "4f4e4c595f43414e43454c5f4f524445525f434f4e5452414354", | |
"id": 8026, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "1219:28:28", | |
"subdenomination": null, | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_e9f25b96262dc08a73826d402ff4abba3da6405cf6eee14c61567028b4cc0c6f", | |
"typeString": "literal_string \"ONLY_CANCEL_ORDER_CONTRACT\"" | |
}, | |
"value": "ONLY_CANCEL_ORDER_CONTRACT" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_e9f25b96262dc08a73826d402ff4abba3da6405cf6eee14c61567028b4cc0c6f", | |
"typeString": "literal_string \"ONLY_CANCEL_ORDER_CONTRACT\"" | |
} | |
], | |
"id": 8019, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
12089, | |
12090 | |
], | |
"referencedDeclaration": 12090, | |
"src": "1150:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 8027, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "1150:107:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 8028, | |
"nodeType": "ExpressionStatement", | |
"src": "1150:107:28" | |
}, | |
{ | |
"id": 8029, | |
"nodeType": "PlaceholderStatement", | |
"src": "1267:1:28" | |
} | |
] | |
}, | |
"documentation": "@notice Throws if the caller is not the CancelOrder contract.", | |
"id": 8031, | |
"name": "onlyCancelOrderContract", | |
"nodeType": "ModifierDefinition", | |
"parameters": { | |
"id": 8018, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "1137:2:28" | |
}, | |
"src": "1105:170:28", | |
"visibility": "internal" | |
}, | |
{ | |
"body": { | |
"id": 8046, | |
"nodeType": "Block", | |
"src": "1350:75:28", | |
"statements": [ | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"id": 8040, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"argumentTypes": null, | |
"id": 8038, | |
"name": "fillOrder", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7989, | |
"src": "1360:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_IFillOrder_$9084", | |
"typeString": "contract IFillOrder" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"argumentTypes": null, | |
"id": 8039, | |
"name": "_fillOrder", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8033, | |
"src": "1372:10:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_IFillOrder_$9084", | |
"typeString": "contract IFillOrder" | |
} | |
}, | |
"src": "1360:22:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_IFillOrder_$9084", | |
"typeString": "contract IFillOrder" | |
} | |
}, | |
"id": 8041, | |
"nodeType": "ExpressionStatement", | |
"src": "1360:22:28" | |
}, | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"id": 8044, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"argumentTypes": null, | |
"id": 8042, | |
"name": "cancelOrder", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7991, | |
"src": "1392:11:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_ICancelOrder_$9006", | |
"typeString": "contract ICancelOrder" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"argumentTypes": null, | |
"id": 8043, | |
"name": "_cancelOrder", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8035, | |
"src": "1406:12:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_ICancelOrder_$9006", | |
"typeString": "contract ICancelOrder" | |
} | |
}, | |
"src": "1392:26:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_ICancelOrder_$9006", | |
"typeString": "contract ICancelOrder" | |
} | |
}, | |
"id": 8045, | |
"nodeType": "ExpressionStatement", | |
"src": "1392:26:28" | |
} | |
] | |
}, | |
"documentation": null, | |
"id": 8047, | |
"implemented": true, | |
"kind": "constructor", | |
"modifiers": [], | |
"name": "", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 8036, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8033, | |
"name": "_fillOrder", | |
"nodeType": "VariableDeclaration", | |
"scope": 8047, | |
"src": "1293:21:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_IFillOrder_$9084", | |
"typeString": "contract IFillOrder" | |
}, | |
"typeName": { | |
"contractScope": null, | |
"id": 8032, | |
"name": "IFillOrder", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 9084, | |
"src": "1293:10:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_IFillOrder_$9084", | |
"typeString": "contract IFillOrder" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 8035, | |
"name": "_cancelOrder", | |
"nodeType": "VariableDeclaration", | |
"scope": 8047, | |
"src": "1316:25:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_ICancelOrder_$9006", | |
"typeString": "contract ICancelOrder" | |
}, | |
"typeName": { | |
"contractScope": null, | |
"id": 8034, | |
"name": "ICancelOrder", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 9006, | |
"src": "1316:12:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_ICancelOrder_$9006", | |
"typeString": "contract ICancelOrder" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "1292:50:28" | |
}, | |
"returnParameters": { | |
"id": 8037, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "1350:0:28" | |
}, | |
"scope": 8215, | |
"src": "1281:144:28", | |
"stateMutability": "nonpayable", | |
"superFunction": null, | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 8079, | |
"nodeType": "Block", | |
"src": "1784:150:28", | |
"statements": [ | |
{ | |
"assignments": [ | |
8059 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 8059, | |
"name": "orderHash", | |
"nodeType": "VariableDeclaration", | |
"scope": 8079, | |
"src": "1794:17:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
}, | |
"typeName": { | |
"id": 8058, | |
"name": "bytes32", | |
"nodeType": "ElementaryTypeName", | |
"src": "1794:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"id": 8063, | |
"initialValue": { | |
"argumentTypes": null, | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"expression": { | |
"argumentTypes": null, | |
"id": 8060, | |
"name": "order", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8049, | |
"src": "1814:5:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_memory_ptr", | |
"typeString": "struct LibOrder.Order memory" | |
} | |
}, | |
"id": 8061, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "getOrderHash", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 9592, | |
"src": "1814:18:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_pure$_t_struct$_Order_$9266_memory_ptr_$returns$_t_bytes32_$bound_to$_t_struct$_Order_$9266_memory_ptr_$", | |
"typeString": "function (struct LibOrder.Order memory) pure returns (bytes32)" | |
} | |
}, | |
"id": 8062, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "1814:20:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "1794:40:28" | |
}, | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"id": 8073, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 8064, | |
"name": "filled", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7995, | |
"src": "1844:6:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", | |
"typeString": "mapping(bytes32 => uint256)" | |
} | |
}, | |
"id": 8066, | |
"indexExpression": { | |
"argumentTypes": null, | |
"id": 8065, | |
"name": "orderHash", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8059, | |
"src": "1851:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "1844:17:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"argumentTypes": null, | |
"arguments": [ | |
{ | |
"argumentTypes": null, | |
"id": 8071, | |
"name": "amount", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8051, | |
"src": "1886:6:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"expression": { | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 8067, | |
"name": "filled", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7995, | |
"src": "1864:6:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", | |
"typeString": "mapping(bytes32 => uint256)" | |
} | |
}, | |
"id": 8069, | |
"indexExpression": { | |
"argumentTypes": null, | |
"id": 8068, | |
"name": "orderHash", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8059, | |
"src": "1871:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "1864:17:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 8070, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "add", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 10263, | |
"src": "1864:21:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", | |
"typeString": "function (uint256,uint256) pure returns (uint256)" | |
} | |
}, | |
"id": 8072, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "1864:29:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "1844:49:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 8074, | |
"nodeType": "ExpressionStatement", | |
"src": "1844:49:28" | |
}, | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 8075, | |
"name": "filled", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7995, | |
"src": "1910:6:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", | |
"typeString": "mapping(bytes32 => uint256)" | |
} | |
}, | |
"id": 8077, | |
"indexExpression": { | |
"argumentTypes": null, | |
"id": 8076, | |
"name": "orderHash", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8059, | |
"src": "1917:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "1910:17:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"functionReturnParameters": 8057, | |
"id": 8078, | |
"nodeType": "Return", | |
"src": "1903:24:28" | |
} | |
] | |
}, | |
"documentation": "@notice Fill an order by the given amount.\n @param order The order to fill.\n @param amount The amount to fill it by.\n @return The new filled amount for this order.", | |
"id": 8080, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [ | |
{ | |
"arguments": null, | |
"id": 8054, | |
"modifierName": { | |
"argumentTypes": null, | |
"id": 8053, | |
"name": "onlyFillOrderContract", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8017, | |
"src": "1731:21:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_modifier$__$", | |
"typeString": "modifier ()" | |
} | |
}, | |
"nodeType": "ModifierInvocation", | |
"src": "1731:21:28" | |
} | |
], | |
"name": "fill", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 8052, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8049, | |
"name": "order", | |
"nodeType": "VariableDeclaration", | |
"scope": 8080, | |
"src": "1647:27:28", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_memory_ptr", | |
"typeString": "struct LibOrder.Order" | |
}, | |
"typeName": { | |
"contractScope": null, | |
"id": 8048, | |
"name": "LibOrder.Order", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 9266, | |
"src": "1647:14:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_storage_ptr", | |
"typeString": "struct LibOrder.Order" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 8051, | |
"name": "amount", | |
"nodeType": "VariableDeclaration", | |
"scope": 8080, | |
"src": "1685:14:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 8050, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "1685:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "1637:68:28" | |
}, | |
"returnParameters": { | |
"id": 8057, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8056, | |
"name": "", | |
"nodeType": "VariableDeclaration", | |
"scope": 8080, | |
"src": "1770:7:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 8055, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "1770:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "1769:9:28" | |
}, | |
"scope": 8215, | |
"src": "1624:310:28", | |
"stateMutability": "nonpayable", | |
"superFunction": 9097, | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 8099, | |
"nodeType": "Block", | |
"src": "2118:94:28", | |
"statements": [ | |
{ | |
"assignments": [ | |
8088 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 8088, | |
"name": "orderHash", | |
"nodeType": "VariableDeclaration", | |
"scope": 8099, | |
"src": "2128:17:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
}, | |
"typeName": { | |
"id": 8087, | |
"name": "bytes32", | |
"nodeType": "ElementaryTypeName", | |
"src": "2128:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"id": 8092, | |
"initialValue": { | |
"argumentTypes": null, | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"expression": { | |
"argumentTypes": null, | |
"id": 8089, | |
"name": "order", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8082, | |
"src": "2148:5:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_memory_ptr", | |
"typeString": "struct LibOrder.Order memory" | |
} | |
}, | |
"id": 8090, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "getOrderHash", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 9592, | |
"src": "2148:18:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_pure$_t_struct$_Order_$9266_memory_ptr_$returns$_t_bytes32_$bound_to$_t_struct$_Order_$9266_memory_ptr_$", | |
"typeString": "function (struct LibOrder.Order memory) pure returns (bytes32)" | |
} | |
}, | |
"id": 8091, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "2148:20:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "2128:40:28" | |
}, | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"id": 8097, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 8093, | |
"name": "cancelled", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7999, | |
"src": "2178:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", | |
"typeString": "mapping(bytes32 => bool)" | |
} | |
}, | |
"id": 8095, | |
"indexExpression": { | |
"argumentTypes": null, | |
"id": 8094, | |
"name": "orderHash", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8088, | |
"src": "2188:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "2178:20:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"argumentTypes": null, | |
"hexValue": "74727565", | |
"id": 8096, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "bool", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "2201:4:28", | |
"subdenomination": null, | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"value": "true" | |
}, | |
"src": "2178:27:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 8098, | |
"nodeType": "ExpressionStatement", | |
"src": "2178:27:28" | |
} | |
] | |
}, | |
"documentation": "@notice Cancels an order.\n @param order The order to cancel.", | |
"id": 8100, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [ | |
{ | |
"arguments": null, | |
"id": 8085, | |
"modifierName": { | |
"argumentTypes": null, | |
"id": 8084, | |
"name": "onlyCancelOrderContract", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8031, | |
"src": "2089:23:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_modifier$__$", | |
"typeString": "modifier ()" | |
} | |
}, | |
"nodeType": "ModifierInvocation", | |
"src": "2089:23:28" | |
} | |
], | |
"name": "cancel", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 8083, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8082, | |
"name": "order", | |
"nodeType": "VariableDeclaration", | |
"scope": 8100, | |
"src": "2035:27:28", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_memory_ptr", | |
"typeString": "struct LibOrder.Order" | |
}, | |
"typeName": { | |
"contractScope": null, | |
"id": 8081, | |
"name": "LibOrder.Order", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 9266, | |
"src": "2035:14:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_storage_ptr", | |
"typeString": "struct LibOrder.Order" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "2034:29:28" | |
}, | |
"returnParameters": { | |
"id": 8086, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "2118:0:28" | |
}, | |
"scope": 8215, | |
"src": "2019:193:28", | |
"stateMutability": "nonpayable", | |
"superFunction": 9102, | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 8113, | |
"nodeType": "Block", | |
"src": "2443:51:28", | |
"statements": [ | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"id": 8111, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 8107, | |
"name": "fillHashSubmitted", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8003, | |
"src": "2453:17:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", | |
"typeString": "mapping(bytes32 => bool)" | |
} | |
}, | |
"id": 8109, | |
"indexExpression": { | |
"argumentTypes": null, | |
"id": 8108, | |
"name": "fillHash", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8102, | |
"src": "2471:8:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "2453:27:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"argumentTypes": null, | |
"hexValue": "74727565", | |
"id": 8110, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "bool", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "2483:4:28", | |
"subdenomination": null, | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"value": "true" | |
}, | |
"src": "2453:34:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 8112, | |
"nodeType": "ExpressionStatement", | |
"src": "2453:34:28" | |
} | |
] | |
}, | |
"documentation": "@notice Sets a fill hash as submitted. It cannot be filled again.\n @param fillHash The hash to set as submitted.", | |
"id": 8114, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [ | |
{ | |
"arguments": null, | |
"id": 8105, | |
"modifierName": { | |
"argumentTypes": null, | |
"id": 8104, | |
"name": "onlyFillOrderContract", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8017, | |
"src": "2417:21:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_modifier$__$", | |
"typeString": "modifier ()" | |
} | |
}, | |
"nodeType": "ModifierInvocation", | |
"src": "2417:21:28" | |
} | |
], | |
"name": "setFillHashSubmitted", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 8103, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8102, | |
"name": "fillHash", | |
"nodeType": "VariableDeclaration", | |
"scope": 8114, | |
"src": "2376:16:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
}, | |
"typeName": { | |
"id": 8101, | |
"name": "bytes32", | |
"nodeType": "ElementaryTypeName", | |
"src": "2376:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "2375:18:28" | |
}, | |
"returnParameters": { | |
"id": 8106, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "2443:0:28" | |
}, | |
"scope": 8215, | |
"src": "2346:148:28", | |
"stateMutability": "nonpayable", | |
"superFunction": 9107, | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 8125, | |
"nodeType": "Block", | |
"src": "2743:41:28", | |
"statements": [ | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 8121, | |
"name": "filled", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7995, | |
"src": "2760:6:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", | |
"typeString": "mapping(bytes32 => uint256)" | |
} | |
}, | |
"id": 8123, | |
"indexExpression": { | |
"argumentTypes": null, | |
"id": 8122, | |
"name": "orderHash", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8116, | |
"src": "2767:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "2760:17:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"functionReturnParameters": 8120, | |
"id": 8124, | |
"nodeType": "Return", | |
"src": "2753:24:28" | |
} | |
] | |
}, | |
"documentation": "@notice Gets the amount an order has been filled by.\n @param orderHash The hash of the order to check.\n @return The amount the order has been filled by.", | |
"id": 8126, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "getFilled", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 8117, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8116, | |
"name": "orderHash", | |
"nodeType": "VariableDeclaration", | |
"scope": 8126, | |
"src": "2694:17:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
}, | |
"typeName": { | |
"id": 8115, | |
"name": "bytes32", | |
"nodeType": "ElementaryTypeName", | |
"src": "2694:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "2693:19:28" | |
}, | |
"returnParameters": { | |
"id": 8120, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8119, | |
"name": "", | |
"nodeType": "VariableDeclaration", | |
"scope": 8126, | |
"src": "2734:7:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 8118, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "2734:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "2733:9:28" | |
}, | |
"scope": 8215, | |
"src": "2675:109:28", | |
"stateMutability": "view", | |
"superFunction": 9114, | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 8137, | |
"nodeType": "Block", | |
"src": "3041:44:28", | |
"statements": [ | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 8133, | |
"name": "cancelled", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7999, | |
"src": "3058:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", | |
"typeString": "mapping(bytes32 => bool)" | |
} | |
}, | |
"id": 8135, | |
"indexExpression": { | |
"argumentTypes": null, | |
"id": 8134, | |
"name": "orderHash", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8128, | |
"src": "3068:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "3058:20:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"functionReturnParameters": 8132, | |
"id": 8136, | |
"nodeType": "Return", | |
"src": "3051:27:28" | |
} | |
] | |
}, | |
"documentation": "@notice Checks if an order has been cancelled.\n @param orderHash The hash of the order to check.\n @return true if the order has been cancelled, false otherwise.", | |
"id": 8138, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "getCancelled", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 8129, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8128, | |
"name": "orderHash", | |
"nodeType": "VariableDeclaration", | |
"scope": 8138, | |
"src": "2995:17:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
}, | |
"typeName": { | |
"id": 8127, | |
"name": "bytes32", | |
"nodeType": "ElementaryTypeName", | |
"src": "2995:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "2994:19:28" | |
}, | |
"returnParameters": { | |
"id": 8132, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8131, | |
"name": "", | |
"nodeType": "VariableDeclaration", | |
"scope": 8138, | |
"src": "3035:4:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"typeName": { | |
"id": 8130, | |
"name": "bool", | |
"nodeType": "ElementaryTypeName", | |
"src": "3035:4:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "3034:6:28" | |
}, | |
"scope": 8215, | |
"src": "2973:112:28", | |
"stateMutability": "view", | |
"superFunction": 9121, | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 8149, | |
"nodeType": "Block", | |
"src": "3337:51:28", | |
"statements": [ | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 8145, | |
"name": "fillHashSubmitted", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8003, | |
"src": "3354:17:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", | |
"typeString": "mapping(bytes32 => bool)" | |
} | |
}, | |
"id": 8147, | |
"indexExpression": { | |
"argumentTypes": null, | |
"id": 8146, | |
"name": "fillHash", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8140, | |
"src": "3372:8:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "3354:27:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"functionReturnParameters": 8144, | |
"id": 8148, | |
"nodeType": "Return", | |
"src": "3347:34:28" | |
} | |
] | |
}, | |
"documentation": "@notice Checks if a fill hash was submitted.\n @param fillHash The fill hash to check.\n @return true if the fill has been submitted, false otherwise.", | |
"id": 8150, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "getFillHashSubmitted", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 8141, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8140, | |
"name": "fillHash", | |
"nodeType": "VariableDeclaration", | |
"scope": 8150, | |
"src": "3292:16:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
}, | |
"typeName": { | |
"id": 8139, | |
"name": "bytes32", | |
"nodeType": "ElementaryTypeName", | |
"src": "3292:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "3291:18:28" | |
}, | |
"returnParameters": { | |
"id": 8144, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8143, | |
"name": "", | |
"nodeType": "VariableDeclaration", | |
"scope": 8150, | |
"src": "3331:4:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"typeName": { | |
"id": 8142, | |
"name": "bool", | |
"nodeType": "ElementaryTypeName", | |
"src": "3331:4:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "3330:6:28" | |
}, | |
"scope": 8215, | |
"src": "3262:126:28", | |
"stateMutability": "view", | |
"superFunction": 9151, | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 8165, | |
"nodeType": "Block", | |
"src": "3759:60:28", | |
"statements": [ | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 8163, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"argumentTypes": null, | |
"id": 8159, | |
"name": "takerAmount", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8154, | |
"src": "3776:11:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "<=", | |
"rightExpression": { | |
"argumentTypes": null, | |
"arguments": [ | |
{ | |
"argumentTypes": null, | |
"id": 8161, | |
"name": "order", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8152, | |
"src": "3806:5:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_memory_ptr", | |
"typeString": "struct LibOrder.Order memory" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_struct$_Order_$9266_memory_ptr", | |
"typeString": "struct LibOrder.Order memory" | |
} | |
], | |
"id": 8160, | |
"name": "remainingSpace", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
8196 | |
], | |
"referencedDeclaration": 8196, | |
"src": "3791:14:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_view$_t_struct$_Order_$9266_memory_ptr_$returns$_t_uint256_$", | |
"typeString": "function (struct LibOrder.Order memory) view returns (uint256)" | |
} | |
}, | |
"id": 8162, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3791:21:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "3776:36:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"functionReturnParameters": 8158, | |
"id": 8164, | |
"nodeType": "Return", | |
"src": "3769:43:28" | |
} | |
] | |
}, | |
"documentation": "@notice Check if an order has sufficient space.\n @param order The order to examine.\n @param takerAmount The amount to fill.\n @return true if there is enough space, false otherwise.", | |
"id": 8166, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "orderHasSpace", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 8155, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8152, | |
"name": "order", | |
"nodeType": "VariableDeclaration", | |
"scope": 8166, | |
"src": "3636:27:28", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_memory_ptr", | |
"typeString": "struct LibOrder.Order" | |
}, | |
"typeName": { | |
"contractScope": null, | |
"id": 8151, | |
"name": "LibOrder.Order", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 9266, | |
"src": "3636:14:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_storage_ptr", | |
"typeString": "struct LibOrder.Order" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 8154, | |
"name": "takerAmount", | |
"nodeType": "VariableDeclaration", | |
"scope": 8166, | |
"src": "3674:19:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 8153, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "3674:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "3626:73:28" | |
}, | |
"returnParameters": { | |
"id": 8158, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8157, | |
"name": "", | |
"nodeType": "VariableDeclaration", | |
"scope": 8166, | |
"src": "3748:4:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"typeName": { | |
"id": 8156, | |
"name": "bool", | |
"nodeType": "ElementaryTypeName", | |
"src": "3748:4:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "3747:6:28" | |
}, | |
"scope": 8215, | |
"src": "3604:215:28", | |
"stateMutability": "view", | |
"superFunction": 9130, | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 8195, | |
"nodeType": "Block", | |
"src": "4141:204:28", | |
"statements": [ | |
{ | |
"assignments": [ | |
8174 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 8174, | |
"name": "orderHash", | |
"nodeType": "VariableDeclaration", | |
"scope": 8195, | |
"src": "4151:17:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
}, | |
"typeName": { | |
"id": 8173, | |
"name": "bytes32", | |
"nodeType": "ElementaryTypeName", | |
"src": "4151:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"id": 8178, | |
"initialValue": { | |
"argumentTypes": null, | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"expression": { | |
"argumentTypes": null, | |
"id": 8175, | |
"name": "order", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8168, | |
"src": "4171:5:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_memory_ptr", | |
"typeString": "struct LibOrder.Order memory" | |
} | |
}, | |
"id": 8176, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "getOrderHash", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 9592, | |
"src": "4171:18:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_pure$_t_struct$_Order_$9266_memory_ptr_$returns$_t_bytes32_$bound_to$_t_struct$_Order_$9266_memory_ptr_$", | |
"typeString": "function (struct LibOrder.Order memory) pure returns (bytes32)" | |
} | |
}, | |
"id": 8177, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "4171:20:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "4151:40:28" | |
}, | |
{ | |
"condition": { | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 8179, | |
"name": "cancelled", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7999, | |
"src": "4205:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", | |
"typeString": "mapping(bytes32 => bool)" | |
} | |
}, | |
"id": 8181, | |
"indexExpression": { | |
"argumentTypes": null, | |
"id": 8180, | |
"name": "orderHash", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8174, | |
"src": "4215:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "4205:20:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"falseBody": { | |
"id": 8193, | |
"nodeType": "Block", | |
"src": "4266:73:28", | |
"statements": [ | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"arguments": [ | |
{ | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 8188, | |
"name": "filled", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7995, | |
"src": "4310:6:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", | |
"typeString": "mapping(bytes32 => uint256)" | |
} | |
}, | |
"id": 8190, | |
"indexExpression": { | |
"argumentTypes": null, | |
"id": 8189, | |
"name": "orderHash", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8174, | |
"src": "4317:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "4310:17:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"expression": { | |
"argumentTypes": null, | |
"expression": { | |
"argumentTypes": null, | |
"id": 8185, | |
"name": "order", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8168, | |
"src": "4287:5:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_memory_ptr", | |
"typeString": "struct LibOrder.Order memory" | |
} | |
}, | |
"id": 8186, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "totalBetSize", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 9247, | |
"src": "4287:18:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 8187, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "sub", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 10288, | |
"src": "4287:22:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", | |
"typeString": "function (uint256,uint256) pure returns (uint256)" | |
} | |
}, | |
"id": 8191, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "4287:41:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"functionReturnParameters": 8172, | |
"id": 8192, | |
"nodeType": "Return", | |
"src": "4280:48:28" | |
} | |
] | |
}, | |
"id": 8194, | |
"nodeType": "IfStatement", | |
"src": "4201:138:28", | |
"trueBody": { | |
"id": 8184, | |
"nodeType": "Block", | |
"src": "4227:33:28", | |
"statements": [ | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"hexValue": "30", | |
"id": 8182, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "4248:1:28", | |
"subdenomination": null, | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"functionReturnParameters": 8172, | |
"id": 8183, | |
"nodeType": "Return", | |
"src": "4241:8:28" | |
} | |
] | |
} | |
} | |
] | |
}, | |
"documentation": "@notice Gets the remaining space for an order.\n @param order The order to check.\n @return The remaining space on the order. It returns 0 if \n the order is cancelled.", | |
"id": 8196, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "remainingSpace", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 8169, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8168, | |
"name": "order", | |
"nodeType": "VariableDeclaration", | |
"scope": 8196, | |
"src": "4052:27:28", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_memory_ptr", | |
"typeString": "struct LibOrder.Order" | |
}, | |
"typeName": { | |
"contractScope": null, | |
"id": 8167, | |
"name": "LibOrder.Order", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 9266, | |
"src": "4052:14:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_storage_ptr", | |
"typeString": "struct LibOrder.Order" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "4051:29:28" | |
}, | |
"returnParameters": { | |
"id": 8172, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8171, | |
"name": "", | |
"nodeType": "VariableDeclaration", | |
"scope": 8196, | |
"src": "4127:7:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 8170, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "4127:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "4126:9:28" | |
}, | |
"scope": 8215, | |
"src": "4028:317:28", | |
"stateMutability": "view", | |
"superFunction": 9137, | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 8213, | |
"nodeType": "Block", | |
"src": "4617:94:28", | |
"statements": [ | |
{ | |
"assignments": [ | |
8204 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 8204, | |
"name": "orderHash", | |
"nodeType": "VariableDeclaration", | |
"scope": 8213, | |
"src": "4627:17:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
}, | |
"typeName": { | |
"id": 8203, | |
"name": "bytes32", | |
"nodeType": "ElementaryTypeName", | |
"src": "4627:7:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"id": 8208, | |
"initialValue": { | |
"argumentTypes": null, | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"expression": { | |
"argumentTypes": null, | |
"id": 8205, | |
"name": "order", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8198, | |
"src": "4647:5:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_memory_ptr", | |
"typeString": "struct LibOrder.Order memory" | |
} | |
}, | |
"id": 8206, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "getOrderHash", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 9592, | |
"src": "4647:18:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_pure$_t_struct$_Order_$9266_memory_ptr_$returns$_t_bytes32_$bound_to$_t_struct$_Order_$9266_memory_ptr_$", | |
"typeString": "function (struct LibOrder.Order memory) pure returns (bytes32)" | |
} | |
}, | |
"id": 8207, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "4647:20:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "4627:40:28" | |
}, | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 8209, | |
"name": "cancelled", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7999, | |
"src": "4684:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", | |
"typeString": "mapping(bytes32 => bool)" | |
} | |
}, | |
"id": 8211, | |
"indexExpression": { | |
"argumentTypes": null, | |
"id": 8210, | |
"name": "orderHash", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 8204, | |
"src": "4694:9:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "4684:20:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"functionReturnParameters": 8202, | |
"id": 8212, | |
"nodeType": "Return", | |
"src": "4677:27:28" | |
} | |
] | |
}, | |
"documentation": "@notice Checks if the order is cancelled.\n @param order The order to check.\n @return true if the order is cancelled, false otherwise.", | |
"id": 8214, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "isOrderCancelled", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 8199, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8198, | |
"name": "order", | |
"nodeType": "VariableDeclaration", | |
"scope": 8214, | |
"src": "4533:27:28", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_memory_ptr", | |
"typeString": "struct LibOrder.Order" | |
}, | |
"typeName": { | |
"contractScope": null, | |
"id": 8197, | |
"name": "LibOrder.Order", | |
"nodeType": "UserDefinedTypeName", | |
"referencedDeclaration": 9266, | |
"src": "4533:14:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Order_$9266_storage_ptr", | |
"typeString": "struct LibOrder.Order" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "4532:29:28" | |
}, | |
"returnParameters": { | |
"id": 8202, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 8201, | |
"name": "", | |
"nodeType": "VariableDeclaration", | |
"scope": 8214, | |
"src": "4607:4:28", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"typeName": { | |
"id": 8200, | |
"name": "bool", | |
"nodeType": "ElementaryTypeName", | |
"src": "4607:4:28", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "4606:6:28" | |
}, | |
"scope": 8215, | |
"src": "4507:204:28", | |
"stateMutability": "view", | |
"superFunction": 9144, | |
"visibility": "public" | |
} | |
], | |
"scope": 8216, | |
"src": "460:4253:28" | |
} | |
], | |
"src": "0:4713:28" | |
}, | |
"compiler": { | |
"name": "solc", | |
"version": "0.5.11+commit.c082d0b4.Emscripten.clang" | |
}, | |
"networks": { | |
"1": { | |
"events": {}, | |
"links": {}, | |
"address": "0xC8dD12B487Ab5370327f76CA6aA15DF8586646a4", | |
"transactionHash": "0xf7590dee31e530a06f96eafaef5d76b7550a8e7032e4db911ebfa330c6e03b64" | |
} | |
}, | |
"schemaVersion": "3.0.14", | |
"updatedAt": "2019-10-22T21:51:31.593Z", | |
"devdoc": { | |
"author": "Julian Wilson <[email protected]>", | |
"methods": { | |
"cancel((bytes32,uint256,uint256,uint256,uint256,uint256,uint256,address,address,address,bool))": { | |
"params": { | |
"order": "The order to cancel." | |
} | |
}, | |
"fill((bytes32,uint256,uint256,uint256,uint256,uint256,uint256,address,address,address,bool),uint256)": { | |
"params": { | |
"amount": "The amount to fill it by.", | |
"order": "The order to fill." | |
}, | |
"return": "The new filled amount for this order." | |
}, | |
"getCancelled(bytes32)": { | |
"params": { | |
"orderHash": "The hash of the order to check." | |
}, | |
"return": "true if the order has been cancelled, false otherwise." | |
}, | |
"getFillHashSubmitted(bytes32)": { | |
"params": { | |
"fillHash": "The fill hash to check." | |
}, | |
"return": "true if the fill has been submitted, false otherwise." | |
}, | |
"getFilled(bytes32)": { | |
"params": { | |
"orderHash": "The hash of the order to check." | |
}, | |
"return": "The amount the order has been filled by." | |
}, | |
"isOrderCancelled((bytes32,uint256,uint256,uint256,uint256,uint256,uint256,address,address,address,bool))": { | |
"params": { | |
"order": "The order to check." | |
}, | |
"return": "true if the order is cancelled, false otherwise." | |
}, | |
"orderHasSpace((bytes32,uint256,uint256,uint256,uint256,uint256,uint256,address,address,address,bool),uint256)": { | |
"params": { | |
"order": "The order to examine.", | |
"takerAmount": "The amount to fill." | |
}, | |
"return": "true if there is enough space, false otherwise." | |
}, | |
"remainingSpace((bytes32,uint256,uint256,uint256,uint256,uint256,uint256,address,address,address,bool))": { | |
"params": { | |
"order": "The order to check." | |
}, | |
"return": "The remaining space on the order. It returns 0 if the order is cancelled." | |
}, | |
"setFillHashSubmitted(bytes32)": { | |
"params": { | |
"fillHash": "The hash to set as submitted." | |
} | |
} | |
}, | |
"title": "Fills" | |
}, | |
"userdoc": { | |
"methods": { | |
"cancel((bytes32,uint256,uint256,uint256,uint256,uint256,uint256,address,address,address,bool))": { | |
"notice": "Cancels an order." | |
}, | |
"fill((bytes32,uint256,uint256,uint256,uint256,uint256,uint256,address,address,address,bool),uint256)": { | |
"notice": "Fill an order by the given amount." | |
}, | |
"getCancelled(bytes32)": { | |
"notice": "Checks if an order has been cancelled." | |
}, | |
"getFillHashSubmitted(bytes32)": { | |
"notice": "Checks if a fill hash was submitted." | |
}, | |
"getFilled(bytes32)": { | |
"notice": "Gets the amount an order has been filled by." | |
}, | |
"isOrderCancelled((bytes32,uint256,uint256,uint256,uint256,uint256,uint256,address,address,address,bool))": { | |
"notice": "Checks if the order is cancelled." | |
}, | |
"orderHasSpace((bytes32,uint256,uint256,uint256,uint256,uint256,uint256,address,address,address,bool),uint256)": { | |
"notice": "Check if an order has sufficient space." | |
}, | |
"remainingSpace((bytes32,uint256,uint256,uint256,uint256,uint256,uint256,address,address,address,bool))": { | |
"notice": "Gets the remaining space for an order." | |
}, | |
"setFillHashSubmitted(bytes32)": { | |
"notice": "Sets a fill hash as submitted. It cannot be filled again." | |
} | |
}, | |
"notice": "Stores the \"fullness\" of each order, whose ID is its hash. " | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment