@gnosis.pm/dex-contracts
Version:
Contracts for dFusion multi-token batch auction exchange
491 lines • 210 kB
JSON
{
"contractName": "SolutionSubmitter",
"abi": [
{
"constant": false,
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "gasPriceThreshold",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "isOwner",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "gasToken",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "exchange",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"name": "exchange_",
"type": "address"
},
{
"name": "gasToken_",
"type": "address"
},
{
"name": "gasPriceThreshold_",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"constant": false,
"inputs": [
{
"name": "gasToken_",
"type": "address"
}
],
"name": "setGasToken",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "gasPriceThreshold_",
"type": "uint256"
}
],
"name": "setGasPriceThreshold",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "target",
"type": "address"
},
{
"name": "data",
"type": "bytes"
}
],
"name": "execute",
"outputs": [
{
"name": "",
"type": "bool"
},
{
"name": "",
"type": "bytes"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "batchId",
"type": "uint32"
},
{
"name": "claimedObjectiveValue",
"type": "uint256"
},
{
"name": "owners",
"type": "address[]"
},
{
"name": "orderIds",
"type": "uint16[]"
},
{
"name": "buyVolumes",
"type": "uint128[]"
},
{
"name": "prices",
"type": "uint128[]"
},
{
"name": "tokenIdsForPrice",
"type": "uint16[]"
}
],
"name": "submitSolution",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.5.10+commit.5a6ea5b1\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"target\",\"type\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"execute\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"},{\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"gasToken_\",\"type\":\"address\"}],\"name\":\"setGasToken\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"batchId\",\"type\":\"uint32\"},{\"name\":\"claimedObjectiveValue\",\"type\":\"uint256\"},{\"name\":\"owners\",\"type\":\"address[]\"},{\"name\":\"orderIds\",\"type\":\"uint16[]\"},{\"name\":\"buyVolumes\",\"type\":\"uint128[]\"},{\"name\":\"prices\",\"type\":\"uint128[]\"},{\"name\":\"tokenIdsForPrice\",\"type\":\"uint16[]\"}],\"name\":\"submitSolution\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"gasPriceThreshold_\",\"type\":\"uint256\"}],\"name\":\"setGasPriceThreshold\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"gasPriceThreshold\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"gasToken\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"exchange\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"exchange_\",\"type\":\"address\"},{\"name\":\"gasToken_\",\"type\":\"address\"},{\"name\":\"gasPriceThreshold_\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"execute(address,bytes)\":{\"details\":\"Allow the owner to execute arbitrary code (e.g. transfer out solution fee rewards from BatchExchange)\"},\"isOwner()\":{\"details\":\"Returns true if the caller is the current owner.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"submitSolution(uint32,uint256,address[],uint16[],uint128[],uint128[],uint16[])\":{\"details\":\"Wrapper around actual solution submission that uses gas tokens for discounts\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"SolutionSubmitter - A simple wrapper contract allowing to submit settlements to the BatchExchange contract while saving gas via the GST2 or CHI GasToken\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/felixleupold/Gnosis/dex-contracts/contracts/SolutionSubmitter.sol\":\"SolutionSubmitter\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/felixleupold/Gnosis/dex-contracts/contracts/BatchExchange.sol\":{\"keccak256\":\"0x86ee38a100f345aa50cf92c1acfe46068b4f18ecd39437117292f15574002f69\",\"urls\":[\"bzzr://f368b30c2ffe351b79494cbb883cb4cce413036d86e5f0b355fd72f9c06b64ab\",\"dweb:/ipfs/QmaGRaBKLWJXxYG6JmAcTNSqWUnY1uneBFUVtNrkfyLbXk\"]},\"/Users/felixleupold/Gnosis/dex-contracts/contracts/EpochTokenLocker.sol\":{\"keccak256\":\"0x6a0e16a44b858c3af0e4e0113af93bf23160f175f36c524f9e753085d8de9978\",\"urls\":[\"bzzr://d6178f1d3533ed733e7eba91d12ce1597711e5b74ad1a4492aed9dc28a8d5c97\",\"dweb:/ipfs/QmeVeD8xeZUfwRi4BCBhrBWCHUDF3tdzwwYDgSNr5T4xPo\"]},\"/Users/felixleupold/Gnosis/dex-contracts/contracts/SolutionSubmitter.sol\":{\"keccak256\":\"0x3cbfadaa94c34e04a369e69be8fc3d5b65e089220ed50eb42c921e8ad48c4d5e\",\"urls\":[\"bzzr://99f30c426f7a5967415f4dab9287acc4ef0e0f637f49d4b392d3b7709d54348b\",\"dweb:/ipfs/QmNiaWpFS3e8K2EXovMU5iiE3D3U9UaNLfH3rVkxAPMozw\"]},\"/Users/felixleupold/Gnosis/dex-contracts/contracts/libraries/TokenConservation.sol\":{\"keccak256\":\"0x674557850e56ef6a716bb1dc528479e290238c592d0764bc7144cc1e811cedea\",\"urls\":[\"bzzr://f6a943472678132ef59cf3b2f131daf28952c1b72cd0e28bda46050dd577a29b\",\"dweb:/ipfs/QmbQsAgu7Fd6i84A98DxXemSnW3UkgccXxNnZLKvtuzHdE\"]},\"@gnosis.pm/owl-token/contracts/5/TokenOWL.sol\":{\"keccak256\":\"0x79dd31b4211c98b57c6c4b85c4902a786c0a1f2549b0481496a322955880c6e4\",\"urls\":[\"bzzr://9004a7707bca62b408542476343c3bd6ca17be5509a3f17e7495ff011495d3c6\",\"dweb:/ipfs/QmNaoSa5P6Py6ZhuqXZeeW6eyG8Hx7FYJFygXPNVBeXSJV\"]},\"@gnosis.pm/solidity-data-structures/contracts/libraries/IdToAddressBiMap.sol\":{\"keccak256\":\"0xde850dc49a037a4acbd792d295afed2222f2d6cd3780240317db2d1ca8ccebc0\",\"urls\":[\"bzzr://900a7be0f54054d59ccb3225f788d77dbf44ea22e6b8d7bd7d295f079c8932f0\",\"dweb:/ipfs/QmNQTeooqchHdMjQfRUmCjwyTUg5PJ4z6he3ym5YUsm8Lm\"]},\"@gnosis.pm/solidity-data-structures/contracts/libraries/IterableAppendOnlySet.sol\":{\"keccak256\":\"0x1447fbecc010c778476e135325a5c8fec70d02d71f736fae8cfccd85ae481241\",\"urls\":[\"bzzr://eea3ac90e8b9e299179c21134dfbf8be2d5ae1276816f2f95f63b836e11e285e\",\"dweb:/ipfs/QmZMn8wVzmr49CXjaix5BMWSNybkDv6BeSQpAFr3btaxuu\"]},\"@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol\":{\"keccak256\":\"0xdec5028208406e811c449a04e2932f7efeae629388cb6124550b8b048a645556\",\"urls\":[\"bzzr://f3d13a708f543b3ce72745cab321e6daf25d935fd12ba55a4152f1113eb6d5e4\",\"dweb:/ipfs/QmRPMmVo88kdtvo2Yo9xDJrQkpYSUENwK1xSEhZnHhViZ7\"]},\"@gnosis.pm/util-contracts/contracts/Math.sol\":{\"keccak256\":\"0x857768cd0d460e33778dcde29e997b539640bbf37ea23832213b2e5039147ea5\",\"urls\":[\"bzzr://628f7e63a0d6a092aad389b70cc55d6d9c10cd9753f3644d5ea9dc75a3314a8e\",\"dweb:/ipfs/QmP4NxUFWoJjGi8NoZgmzre3MHfRXLtDniwLojH5TVc9LD\"]},\"@gnosis.pm/util-contracts/contracts/Proxy.sol\":{\"keccak256\":\"0x2ff8795110cceafcab1010f157a4dd33e46378bb88fbdc3c313a6f0d62e3444f\",\"urls\":[\"bzzr://66d77feaf648ca17dd620f3e27463b4b6e6031fec7ccd64dfffc4c30bd57b467\",\"dweb:/ipfs/QmQTKFQxUoP37Up8JPeWh47Ta46qAMtWTZ7VnQrGypR67i\"]},\"@gnosis.pm/util-contracts/contracts/Token.sol\":{\"keccak256\":\"0x364778f634c900ed83553e17ef1284bd33fa68a738e668f664b4a0fa675bb586\",\"urls\":[\"bzzr://cb31caaf3364dbf5d688adb10de074284845b142c26d23a47b09ee510dd4a432\",\"dweb:/ipfs/QmVE5i2jcg6aCSjY8asvUwPbrZWtpLyA4uWukQXBbFvqpc\"]},\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x90a3995645af7562d84b9d69363ffa5ae7217714ab61e951bf7bc450f40e4061\",\"urls\":[\"bzzr://51482c01bddf23793bddee43b60ab9578a62948a4f2082def24ea792a553b055\",\"dweb:/ipfs/QmNPrJ4MWKUAWzKXpUqeyKRUfosaoANZAqXgvepdrCwZAG\"]},\"@openzeppelin/contracts/drafts/SignedSafeMath.sol\":{\"keccak256\":\"0xf1587a6daea33c93e85fff4e205967183de459159aafcb01b7397fb7ec1f9f77\",\"urls\":[\"bzzr://3fa5ad67118819b61448882baec9ca9964dde65630f574ab3c38841110082923\",\"dweb:/ipfs/QmTaR64X6RsWzXvVGxPCaAoW7ZZ8Fhiii4ddRo7QpQGBrx\"]},\"@openzeppelin/contracts/math/Math.sol\":{\"keccak256\":\"0x4b5aa451e4e8801478708f94b118a7821c0500d676255eaf89fc78c14856ce4e\",\"urls\":[\"bzzr://200d5728b32858918810d8d7a8db1406ee9b157ad5026f050e6d864a696b9080\",\"dweb:/ipfs/QmS6tW81u8E4tvzVfVuqEuMCkdwAozQ6pKJPRBR4JEVmQp\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x640b6dee7a4b830bdfd52b5031a07fc2b12209f5b2e29e5d364a7d37f69d8076\",\"urls\":[\"bzzr://292843005e754e752644f767477ec5ad7a1ffc91ddb18c38b8079c62f3993cad\",\"dweb:/ipfs/QmbZaJyXdpsYGykVhHH9qpVGQg9DGCxE2QufbCUy3daTgq\"]},\"@openzeppelin/contracts/ownership/Ownable.sol\":{\"keccak256\":\"0x6fb9d7889769d7cc161225f9ef7a90e468ba9788b253816f8d8b6894d3472c24\",\"urls\":[\"bzzr://ab46c9368bc3abdded5eb85858304518c8a0291060ab42087075d759dbf3925f\",\"dweb:/ipfs/Qmb7TChG6DsEDX7LooJ4vmxot19f7VXX8S1zUGPeJTWbwZ\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xe5bb0f57cff3e299f360052ba50f1ea0fff046df2be070b6943e0e3c3fdad8a9\",\"urls\":[\"bzzr://cf2d583b8dce38d0617fdcd65f2fd9f126fe17b7f683b5a515ea9d2762d8b062\",\"dweb:/ipfs/QmQMvwEcPhoRXzbXyrdoeRtvLoifUW9Qh7Luho7bmUPRkc\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0x6f2c9955d65c522b80f4b8792f076512d2df947d2112cbc4d98a4781ed42ede2\",\"urls\":[\"bzzr://d2ff5aadcb697bc27ca3b0f6c40b4998e8cf0a1bd0f761d1df6d5981777841ae\",\"dweb:/ipfs/QmTDkFzKnrpiV1UKnSoiZAHPuguWzokrr4pFbSPvyaSo56\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x1a8e5072509c5ea7365eb1d48030b9be865140c8fb779968da0a459a0e174a11\",\"urls\":[\"bzzr://4e1d23731da27602b8c552e54fb9976dadf8cf46a8f90a3c8c1b85fe044618b9\",\"dweb:/ipfs/Qmebp4nzPja645c9yXSdJkGq96oU3am3LUnG2K3R7XxyKf\"]},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"keccak256\":\"0xb7353a57c9e371c85983df8997caf9bb6fa60c3744b34b2bfcf4faa52d06eaec\",\"urls\":[\"bzzr://ca1f1bd047ccacf8ea1b40270c12baab9f1bf9359bbd1cc305e3209e5a812eaa\",\"dweb:/ipfs/QmPaVZM2QRb5JQ5HSRUzrUt6VsknmZE5c4MqH6wuFyxYoA\"]},\"solidity-bytes-utils/contracts/BytesLib.sol\":{\"keccak256\":\"0xd6de53e5467708105d5f6ea98c56882dba0023a6d634cdb3bd03d89ac0d75ae2\",\"urls\":[\"bzzr://5f09be217da67a20ed8f1d3913782ed1ed0c73b03b4216c53ba1ca16585c1a86\",\"dweb:/ipfs/QmVQHbSiWSrFLXaRriAMkYnoNeHJaoqSACdjqoNX7HxJGQ\"]}},\"version\":1}",
"bytecode": "0x60806040523480156200001157600080fd5b506040516200100538038062001005833981810160405260608110156200003757600080fd5b508051602082015160409092015190919060006200005d6001600160e01b03620000ea16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b0319166001600160a01b038516179055620000cd82620000ee565b620000e1816001600160e01b036200017e16565b50505062000220565b3390565b620001016001600160e01b03620001f116565b6200015c57604080517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201819052602482015260008051602062000fe5833981519152604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b620001916001600160e01b03620001f116565b620001ec57604080517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201819052602482015260008051602062000fe5833981519152604482015290519081900360640190fd5b600355565b600080546001600160a01b0316620002116001600160e01b03620000ea16565b6001600160a01b031614905090565b610db580620002306000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063892a51c511610071578063892a51c5146104c95780638da5cb5b146104d15780638f32d59b146104f5578063c91d59fe14610511578063d2f7265a14610519578063f2fde38b14610521576100a9565b80631cff79cd146100ae5780631e9f8aad146101af5780632e4c83bd146101d757806340af6ad4146104a4578063715018a6146104c1575b600080fd5b61012c600480360360408110156100c457600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156100ee57600080fd5b82018360208201111561010057600080fd5b803590602001918460018302840111600160201b8311171561012157600080fd5b509092509050610547565b604051808315151515815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561017357818101518382015260200161015b565b50505050905090810190601f1680156101a05780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b6101d5600480360360208110156101c557600080fd5b50356001600160a01b0316610600565b005b610492600480360360e08110156101ed57600080fd5b63ffffffff82351691602081013591810190606081016040820135600160201b81111561021957600080fd5b82018360208201111561022b57600080fd5b803590602001918460208302840111600160201b8311171561024c57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561029b57600080fd5b8201836020820111156102ad57600080fd5b803590602001918460208302840111600160201b831117156102ce57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561031d57600080fd5b82018360208201111561032f57600080fd5b803590602001918460208302840111600160201b8311171561035057600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561039f57600080fd5b8201836020820111156103b157600080fd5b803590602001918460208302840111600160201b831117156103d257600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561042157600080fd5b82018360208201111561043357600080fd5b803590602001918460208302840111600160201b8311171561045457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610669945050505050565b60408051918252519081900360200190f35b6101d5600480360360208110156104ba57600080fd5b5035610b0f565b6101d5610b5b565b610492610bec565b6104d9610bf2565b604080516001600160a01b039092168252519081900360200190f35b6104fd610c01565b604080519115158252519081900360200190f35b6104d9610c25565b6104d9610c34565b6101d56004803603602081101561053757600080fd5b50356001600160a01b0316610c43565b60006060610553610c01565b610592576040805162461bcd60e51b81526020600482018190526024820152600080516020610d61833981519152604482015290519081900360640190fd5b846001600160a01b03168484604051808383808284376040519201945060009350909150508083038183865af19150503d80600081146105ee576040519150601f19603f3d011682016040523d82523d6000602084013e6105f3565b606091505b5091509150935093915050565b610608610c01565b610647576040805162461bcd60e51b81526020600482018190526024820152600080516020610d61833981519152604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60006003543a106109085760005a9050600160009054906101000a90046001600160a01b03166001600160a01b0316632e4c83bd8a8a8a8a8a8a8a6040518863ffffffff1660e01b8152600401808863ffffffff1663ffffffff168152602001878152602001806020018060200180602001806020018060200186810386528b818151815260200191508051906020019060200280838360005b8381101561071b578181015183820152602001610703565b5050505090500186810385528a818151815260200191508051906020019060200280838360005b8381101561075a578181015183820152602001610742565b50505050905001868103845289818151815260200191508051906020019060200280838360005b83811015610799578181015183820152602001610781565b50505050905001868103835288818151815260200191508051906020019060200280838360005b838110156107d85781810151838201526020016107c0565b50505050905001868103825287818151815260200191508051906020019060200280838360005b838110156108175781810151838201526020016107ff565b505050509050019c50505050505050505050505050602060405180830381600087803b15801561084657600080fd5b505af115801561085a573d6000803e3d6000fd5b505050506040513d602081101561087057600080fd5b505191506000601036025a600254908403919091016152080191506001600160a01b0316636366b93661bb8083046040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b1580156108d457600080fd5b505af11580156108e8573d6000803e3d6000fd5b505050506040513d60208110156108fe57600080fd5b50610b0492505050565b600160009054906101000a90046001600160a01b03166001600160a01b0316632e4c83bd898989898989896040518863ffffffff1660e01b8152600401808863ffffffff1663ffffffff168152602001878152602001806020018060200180602001806020018060200186810386528b818151815260200191508051906020019060200280838360005b838110156109aa578181015183820152602001610992565b5050505090500186810385528a818151815260200191508051906020019060200280838360005b838110156109e95781810151838201526020016109d1565b50505050905001868103845289818151815260200191508051906020019060200280838360005b83811015610a28578181015183820152602001610a10565b50505050905001868103835288818151815260200191508051906020019060200280838360005b83811015610a67578181015183820152602001610a4f565b50505050905001868103825287818151815260200191508051906020019060200280838360005b83811015610aa6578181015183820152602001610a8e565b505050509050019c50505050505050505050505050602060405180830381600087803b158015610ad557600080fd5b505af1158015610ae9573d6000803e3d6000fd5b505050506040513d6020811015610aff57600080fd5b505190505b979650505050505050565b610b17610c01565b610b56576040805162461bcd60e51b81526020600482018190526024820152600080516020610d61833981519152604482015290519081900360640190fd5b600355565b610b63610c01565b610ba2576040805162461bcd60e51b81526020600482018190526024820152600080516020610d61833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60035481565b6000546001600160a01b031690565b600080546001600160a01b0316610c16610c96565b6001600160a01b031614905090565b6002546001600160a01b031681565b6001546001600160a01b031681565b610c4b610c01565b610c8a576040805162461bcd60e51b81526020600482018190526024820152600080516020610d61833981519152604482015290519081900360640190fd5b610c9381610c9a565b50565b3390565b6001600160a01b038116610cdf5760405162461bcd60e51b8152600401808060200182810382526026815260200180610d3b6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b039290921691909117905556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a265627a7a72305820bf6cfb529d0047328ef6af5f1894e859176a48ce2d399f65c3197aa0bcc6fe1464736f6c634300050a00324f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c8063892a51c511610071578063892a51c5146104c95780638da5cb5b146104d15780638f32d59b146104f5578063c91d59fe14610511578063d2f7265a14610519578063f2fde38b14610521576100a9565b80631cff79cd146100ae5780631e9f8aad146101af5780632e4c83bd146101d757806340af6ad4146104a4578063715018a6146104c1575b600080fd5b61012c600480360360408110156100c457600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156100ee57600080fd5b82018360208201111561010057600080fd5b803590602001918460018302840111600160201b8311171561012157600080fd5b509092509050610547565b604051808315151515815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561017357818101518382015260200161015b565b50505050905090810190601f1680156101a05780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b6101d5600480360360208110156101c557600080fd5b50356001600160a01b0316610600565b005b610492600480360360e08110156101ed57600080fd5b63ffffffff82351691602081013591810190606081016040820135600160201b81111561021957600080fd5b82018360208201111561022b57600080fd5b803590602001918460208302840111600160201b8311171561024c57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561029b57600080fd5b8201836020820111156102ad57600080fd5b803590602001918460208302840111600160201b831117156102ce57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561031d57600080fd5b82018360208201111561032f57600080fd5b803590602001918460208302840111600160201b8311171561035057600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561039f57600080fd5b8201836020820111156103b157600080fd5b803590602001918460208302840111600160201b831117156103d257600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561042157600080fd5b82018360208201111561043357600080fd5b803590602001918460208302840111600160201b8311171561045457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610669945050505050565b60408051918252519081900360200190f35b6101d5600480360360208110156104ba57600080fd5b5035610b0f565b6101d5610b5b565b610492610bec565b6104d9610bf2565b604080516001600160a01b039092168252519081900360200190f35b6104fd610c01565b604080519115158252519081900360200190f35b6104d9610c25565b6104d9610c34565b6101d56004803603602081101561053757600080fd5b50356001600160a01b0316610c43565b60006060610553610c01565b610592576040805162461bcd60e51b81526020600482018190526024820152600080516020610d61833981519152604482015290519081900360640190fd5b846001600160a01b03168484604051808383808284376040519201945060009350909150508083038183865af19150503d80600081146105ee576040519150601f19603f3d011682016040523d82523d6000602084013e6105f3565b606091505b5091509150935093915050565b610608610c01565b610647576040805162461bcd60e51b81526020600482018190526024820152600080516020610d61833981519152604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60006003543a106109085760005a9050600160009054906101000a90046001600160a01b03166001600160a01b0316632e4c83bd8a8a8a8a8a8a8a6040518863ffffffff1660e01b8152600401808863ffffffff1663ffffffff168152602001878152602001806020018060200180602001806020018060200186810386528b818151815260200191508051906020019060200280838360005b8381101561071b578181015183820152602001610703565b5050505090500186810385528a818151815260200191508051906020019060200280838360005b8381101561075a578181015183820152602001610742565b50505050905001868103845289818151815260200191508051906020019060200280838360005b83811015610799578181015183820152602001610781565b50505050905001868103835288818151815260200191508051906020019060200280838360005b838110156107d85781810151838201526020016107c0565b50505050905001868103825287818151815260200191508051906020019060200280838360005b838110156108175781810151838201526020016107ff565b505050509050019c50505050505050505050505050602060405180830381600087803b15801561084657600080fd5b505af115801561085a573d6000803e3d6000fd5b505050506040513d602081101561087057600080fd5b505191506000601036025a600254908403919091016152080191506001600160a01b0316636366b93661bb8083046040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b1580156108d457600080fd5b505af11580156108e8573d6000803e3d6000fd5b505050506040513d60208110156108fe57600080fd5b50610b0492505050565b600160009054906101000a90046001600160a01b03166001600160a01b0316632e4c83bd898989898989896040518863ffffffff1660e01b8152600401808863ffffffff1663ffffffff168152602001878152602001806020018060200180602001806020018060200186810386528b818151815260200191508051906020019060200280838360005b838110156109aa578181015183820152602001610992565b5050505090500186810385528a818151815260200191508051906020019060200280838360005b838110156109e95781810151838201526020016109d1565b50505050905001868103845289818151815260200191508051906020019060200280838360005b83811015610a28578181015183820152602001610a10565b50505050905001868103835288818151815260200191508051906020019060200280838360005b83811015610a67578181015183820152602001610a4f565b50505050905001868103825287818151815260200191508051906020019060200280838360005b83811015610aa6578181015183820152602001610a8e565b505050509050019c50505050505050505050505050602060405180830381600087803b158015610ad557600080fd5b505af1158015610ae9573d6000803e3d6000fd5b505050506040513d6020811015610aff57600080fd5b505190505b979650505050505050565b610b17610c01565b610b56576040805162461bcd60e51b81526020600482018190526024820152600080516020610d61833981519152604482015290519081900360640190fd5b600355565b610b63610c01565b610ba2576040805162461bcd60e51b81526020600482018190526024820152600080516020610d61833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60035481565b6000546001600160a01b031690565b600080546001600160a01b0316610c16610c96565b6001600160a01b031614905090565b6002546001600160a01b031681565b6001546001600160a01b031681565b610c4b610c01565b610c8a576040805162461bcd60e51b81526020600482018190526024820152600080516020610d61833981519152604482015290519081900360640190fd5b610c9381610c9a565b50565b3390565b6001600160a01b038116610cdf5760405162461bcd60e51b8152600401808060200182810382526026815260200180610d3b6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b039290921691909117905556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a265627a7a72305820bf6cfb529d0047328ef6af5f1894e859176a48ce2d399f65c3197aa0bcc6fe1464736f6c634300050a0032",
"sourceMap": "378:2490:5:-;;;526:241;8:9:-1;5:2;;;30:1;27;20:12;5:2;526:241:5;;;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;526:241:5;;;;;;;;;;;;;;698:17:25;718:12;-1:-1:-1;;;;;718:10:25;:12;:::i;:::-;740:6;:18;;-1:-1:-1;;;;;;740:18:25;-1:-1:-1;;;;;740:18:25;;;;;;;773:43;;740:18;;-1:-1:-1;740:18:25;773:43;;740:6;;773:43;-1:-1:-1;658:8:5;:20;;-1:-1:-1;;;;;;658:20:5;-1:-1:-1;;;;;658:20:5;;;;;688:22;700:9;688:11;:22::i;:::-;720:40;741:18;-1:-1:-1;;;;;720:20:5;:40;:::i;:::-;526:241;;;378:2490;;788:96:19;867:10;788:96;:::o;773:95:5:-;1103:9:25;-1:-1:-1;;;;;1103:7:25;:9;:::i;:::-;1095:54;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1095:54:25;;;;;;;;;;;;;;;841:8:5;:20;;-1:-1:-1;;;;;;841:20:5;-1:-1:-1;;;;;841:20:5;;;;;;;;;;773:95::o;874:130::-;1103:9:25;-1:-1:-1;;;;;1103:7:25;:9;:::i;:::-;1095:54;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1095:54:25;;;;;;;;;;;;;;;959:17:5;:38;874:130::o;1250:92:25:-;1290:4;1329:6;;-1:-1:-1;;;;;1329:6:25;1313:12;-1:-1:-1;;;;;1313:10:25;:12;:::i;:::-;-1:-1:-1;;;;;1313:22:25;;1306:29;;1250:92;:::o;378:2490:5:-;;;;;;;",
"deployedSourceMap": "378:2490:5:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;378:2490:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1140:207;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;1140:207:5;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;1140:207:5;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1140:207:5;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;1140:207:5;;-1:-1:-1;1140:207:5;-1:-1:-1;1140:207:5;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1140:207:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;773:95;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;773:95:5;-1:-1:-1;;;;;773:95:5;;:::i;:::-;;1458:446;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;1458:446:5;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;1458:446:5;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1458:446:5;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;-1:-1;;;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;1458:446:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;1458:446:5;;;;;;;;-1:-1:-1;1458:446:5;;-1:-1:-1;;;;;5:28;;2:2;;;46:1;43;36:12;2:2;1458:446:5;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1458:446:5;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;-1:-1;;;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;1458:446:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;1458:446:5;;;;;;;;-1:-1:-1;1458:446:5;;-1:-1:-1;;;;;5:28;;2:2;;;46:1;43;36:12;2:2;1458:446:5;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1458:446:5;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;-1:-1;;;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;1458:446:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;1458:446:5;;;;;;;;-1:-1:-1;1458:446:5;;-1:-1:-1;;;;;5:28;;2:2;;;46:1;43;36:12;2:2;1458:446:5;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1458:446:5;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;-1:-1;;;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;1458:446:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;1458:446:5;;;;;;;;-1:-1:-1;1458:446:5;;-1:-1:-1;;;;;5:28;;2:2;;;46:1;43;36:12;2:2;1458:446:5;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1458:446:5;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;-1:-1;;;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;1458:446:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;1458:446:5;;-1:-1:-1;1458:446:5;;-1:-1:-1;;;;;1458:446:5:i;:::-;;;;;;;;;;;;;;;;874:130;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;874:130:5;;:::i;1684:137:25:-;;;:::i;487:32:5:-;;;:::i;899:77:25:-;;;:::i;:::-;;;;-1:-1:-1;;;;;899:77:25;;;;;;;;;;;;;;1250:92;;;:::i;:::-;;;;;;;;;;;;;;;;;;457:24:5;;;:::i;422:29::-;;;:::i;1970:107:25:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1970:107:25;-1:-1:-1;;;;;1970:107:25;;:::i;1140:207:5:-;1222:4;1228:12;1103:9:25;:7;:9::i;:::-;1095:54;;;;;-1:-1:-1;;;1095:54:25;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1095:54:25;;;;;;;;;;;;;;;1323:6:5;-1:-1:-1;;;;;1323:11:5;1335:4;;1323:17;;;;;30:3:-1;22:6;14;1:33;1323:17:5;;45:16:-1;;;-1:-1;1323:17:5;;-1:-1:-1;1323:17:5;;-1:-1:-1;;1323:17:5;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;1316:24:5;;;;1140:207;;;;;;:::o;773:95::-;1103:9:25;:7;:9::i;:::-;1095:54;;;;;-1:-1:-1;;;1095:54:25;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1095:54:25;;;;;;;;;;;;;;;841:8:5;:20;;-1:-1:-1;;;;;;841:20:5;-1:-1:-1;;;;;841:20:5;;;;;;;;;;773:95::o;1458:446::-;1760:7;2190:17;;2175:11;:32;2171:689;;2223:16;2242:9;2223:28;;1786:8;;;;;;;;;-1:-1:-1;;;;;1786:8:5;-1:-1:-1;;;;;1786:23:5;;1810:7;1819:21;1842:6;1850:8;1860:10;1872:6;1880:16;1786:111;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1786:111:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1786:111:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1786:111:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1786:111:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1786:111:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1786:111:5;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1786:111:5;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1786:111:5;;-1:-1:-1;2280:16:5;2331:2;2336:8;2331:20;2318:9;2780:8;;2299:28;;;:53;;;;:5;:53;;-1:-1:-1;;;;;;2780:8:5;:17;2811:5;2299:53;2798:18;2780:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2780:37:5;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2780:37:5;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2171:689:5;;-1:-1:-1;;;2171:689:5;;1786:8;;;;;;;;;-1:-1:-1;;;;;1786:8:5;-1:-1:-1;;;;;1786:23:5;;1810:7;1819:21;1842:6;1850:8;1860:10;1872:6;1880:16;1786:111;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1786:111:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1786:111:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1786:111:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1786:111:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1786:111:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1786:111:5;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1786:111:5;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1786:111:5;;-1:-1:-1;2848:1:5;1458:446;;;;;;;;;:::o;874:130::-;1103:9:25;:7;:9::i;:::-;1095:54;;;;;-1:-1:-1;;;1095:54:25;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1095:54:25;;;;;;;;;;;;;;;959:17:5;:38;874:130::o;1684:137:25:-;1103:9;:7;:9::i;:::-;1095:54;;;;;-1:-1:-1;;;1095:54:25;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1095:54:25;;;;;;;;;;;;;;;1782:1;1766:6;;1745:40;;-1:-1:-1;;;;;1766:6:25;;;;1745:40;;1782:1;;1745:40;1812:1;1795:19;;-1:-1:-1;;;;;;1795:19:25;;;1684:137::o;487:32:5:-;;;;:::o;899:77:25:-;937:7;963:6;-1:-1:-1;;;;;963:6:25;899:77;:::o;1250:92::-;1290:4;1329:6;;-1:-1:-1;;;;;1329:6:25;1313:12;:10;:12::i;:::-;-1:-1:-1;;;;;1313:22:25;;1306:29;;1250:92;:::o;457:24:5:-;;;-1:-1:-1;;;;;457:24:5;;:::o;422:29::-;;;-1:-1:-1;;;;;422:29:5;;:::o;1970:107:25:-;1103:9;:7;:9::i;:::-;1095:54;;;;;-1:-1:-1;;;1095:54:25;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1095:54:25;;;;;;;;;;;;;;;2042:28;2061:8;2042:18;:28::i;:::-;1970:107;:::o;788:96:19:-;867:10;788:96;:::o;2178:225:25:-;-1:-1:-1;;;;;2251:22:25;;2243:73;;;;-1:-1:-1;;;2243:73:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2352:6;;;2331:38;;-1:-1:-1;;;;;2331:38:25;;;;2352:6;;;2331:38;;;2379:6;:17;;-1:-1:-1;;;;;;2379:17:25;-1:-1:-1;;;;;2379:17:25;;;;;;;;;;2178:225::o",
"source": "pragma solidity ^0.5.0;\n\nimport \"./BatchExchange.sol\";\nimport \"@openzeppelin/contracts/ownership/Ownable.sol\";\n\ninterface GasToken {\n function freeUpTo(uint256 value) external returns (uint256 freed);\n}\n\n/** @title SolutionSubmitter - A simple wrapper contract allowing to submit settlements\n * to the BatchExchange contract while saving gas via the GST2 or CHI GasToken\n */\ncontract SolutionSubmitter is Ownable {\n BatchExchange public exchange;\n GasToken public gasToken;\n uint256 public gasPriceThreshold;\n\n constructor(\n BatchExchange exchange_,\n GasToken gasToken_,\n uint256 gasPriceThreshold_\n ) public {\n exchange = exchange_;\n setGasToken(gasToken_);\n setGasPriceThreshold(gasPriceThreshold_);\n }\n\n function setGasToken(GasToken gasToken_) public onlyOwner {\n gasToken = gasToken_;\n }\n\n function setGasPriceThreshold(uint256 gasPriceThreshold_) public onlyOwner {\n gasPriceThreshold = gasPriceThreshold_;\n }\n\n /**\n * @dev Allow the owner to execute arbitrary code (e.g. transfer out solution fee rewards from BatchExchange)\n */\n function execute(address target, bytes calldata data) external onlyOwner returns (bool, bytes memory) {\n // solium-disable-next-line security/no-low-level-calls\n return target.call(data);\n }\n\n /**\n * @dev Wrapper around actual solution submission that uses gas tokens for discounts\n */\n function submitSolution(\n uint32 batchId,\n uint256 claimedObjectiveValue,\n address[] memory owners,\n uint16[] memory orderIds,\n uint128[] memory buyVolumes,\n uint128[] memory prices,\n uint16[] memory tokenIdsForPrice\n ) public gasDiscounted returns (uint256) {\n return exchange.submitSolution(batchId, claimedObjectiveValue, owners, orderIds, buyVolumes, prices, tokenIdsForPrice);\n }\n\n /**\n * @dev Modifier to invoke original method and freeing up to half the maximum gas refund in gas tokens.\n * Logic adjusted from https://1inch-exchange.medium.com/1inch-introduces-chi-gastoken-d0bd5bb0f92b\n */\n modifier gasDiscounted {\n if (tx.gasprice >= gasPriceThreshold) {\n uint256 gasStart = gasleft();\n _;\n uint256 gasSpent = 21000 + gasStart - gasleft() + (16 * msg.data.length);\n // The refund is 24k per token and since we can refund up to half of the total gas spent,\n // we should free one gas token for every 48k gas spent. This doesn't account for the cost\n // of freeUpTo itself and this slightly underestimating the amout of tokens to burn. This is\n // fine as we cannot account for other refunds coming from the solution submission intself.\n gasToken.freeUpTo((gasSpent) / 48000);\n } else {\n _;\n }\n }\n}\n",
"sourcePath": "/Users/felixleupold/Gnosis/dex-contracts/contracts/SolutionSubmitter.sol",
"ast": {
"absolutePath": "/Users/felixleupold/Gnosis/dex-contracts/contracts/SolutionSubmitter.sol",
"exportedSymbols": {
"GasToken": [
4257
],
"SolutionSubmitter": [
4411
]
},
"id": 4412,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4247,
"literals": [
"solidity",
"^",
"0.5",
".0"
],
"nodeType": "PragmaDirective",
"src": "0:23:5"
},
{
"absolutePath": "/Users/felixleupold/Gnosis/dex-contracts/contracts/BatchExchange.sol",
"file": "./BatchExchange.sol",
"id": 4248,
"nodeType": "ImportDirective",
"scope": 4412,
"sourceUnit": 2227,
"src": "25:29:5",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "@openzeppelin/contracts/ownership/Ownable.sol",
"file": "@openzeppelin/contracts/ownership/Ownable.sol",
"id": 4249,
"nodeType": "ImportDirective",
"scope": 4412,
"sourceUnit": 8842,
"src": "55:55:5",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "interface",
"documentation": null,
"fullyImplemented": false,
"id": 4257,
"linearizedBaseContracts": [
4257
],
"name": "GasToken",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": null,
"documentation": null,
"id": 4256,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "freeUpTo",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4252,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4251,
"name": "value",
"nodeType": "VariableDeclaration",
"scope": 4256,
"src": "155:13:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4250,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "155:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "154:15:5"
},
"returnParameters": {
"id": 4255,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4254,
"name": "freed",
"nodeType": "VariableDeclaration",
"scope": 4256,
"src": "188:13:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4253,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "188:7:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "187:15:5"
},
"scope": 4257,
"src": "137:66:5",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
}
],
"scope": 4412,
"src": "112:93:5"
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 4258,
"name": "Ownable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 8841,
"src": "408:7:5",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Ownable_$8841",
"typeString": "contract Ownable"
}
},
"id": 4259,
"nodeType": "InheritanceSpecifier",
"src": "408:7:5"
}
],
"contractDependencies": [
8105,
8841
],
"contractKind": "contract",
"documentation": "@title SolutionSubmitter - A simple wrapper contract allowing to submit settlements\nto the BatchExchange contract while saving gas via the GST2 or CHI GasToken",
"fullyImplemented": true,
"id": 4411,
"linearizedBaseContracts": [
4411,
8841,
8105
],
"name": "SolutionSubmitter",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 4261,
"name": "exchange",
"nodeType": "VariableDeclaration",
"scope": 4411,
"src": "422:29:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_BatchExchange_$2226",
"typeString": "contract BatchExchange"
},
"typeName": {
"contractScope": null,
"id": 4260,
"name": "BatchExchange",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2226,
"src": "422:13:5",
"typeDescriptions": {
"typeIdentifier": "t_contract$_BatchExchange_$2226",
"typeString": "contract BatchExchange"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 4263,
"name": "gasToken",
"nodeType": "VariableDeclaration",
"scope": 4411,
"src": "457:24:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_GasToken_$4257",
"typeString": "contract GasToken"
},
"typeName": {
"contractScope": null,
"id": 4262,
"name": "GasToken",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4257,
"src": "457:8:5",
"typeDescriptions": {
"typeIdentifier": "t_contract$_GasToken_$4257",
"typeString": "contract GasToken"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 4265,
"name": "gasPriceThreshold",
"nodeType": "VariableDeclaration",
"scope": 4411,
"src": "487:32:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4264,
"name": "uin