diff --git a/packages/hardhat/contracts/mocks/OwnableCelesteMock.sol b/packages/hardhat/contracts/mocks/OwnableCelesteMock.sol index e89f48b6..d6ac5a71 100644 --- a/packages/hardhat/contracts/mocks/OwnableCelesteMock.sol +++ b/packages/hardhat/contracts/mocks/OwnableCelesteMock.sol @@ -219,6 +219,7 @@ contract OwnableCeleste is IArbitrator { uint256 private constant DISPUTES_NOT_RULED = 0; uint256 private constant DISPUTES_RULING_CHALLENGER = 3; uint256 private constant DISPUTES_RULING_SUBMITTER = 4; + address private disputeManager; enum State { NOT_DISPUTED, @@ -248,6 +249,11 @@ contract OwnableCeleste is IArbitrator { owner = msg.sender; feeToken = _feeToken; feeAmount = _feeAmount; + disputeManager = address(new DisputeManager(address(this))); + } + + function getDisputeManager() external view returns (address) { + return disputeManager; } function setOwner(address _owner) public onlyOwner { @@ -349,3 +355,37 @@ contract OwnableCeleste is IArbitrator { return (address(this), feeToken, feeAmount); } } + +contract DisputeManager { + using SafeGovernERC20 for GovernERC20; + + OwnableCeleste celeste; + + constructor(address mockCelesteAddress) public { + celeste = OwnableCeleste(mockCelesteAddress); + } + + function getDisputeFees() external view returns (GovernERC20, uint256) { + (address celeste, GovernERC20 feeToken, uint256 feeAmount) = celeste + .getDisputeFees(); + return (feeToken, feeAmount); + } + + function getDispute(uint256 _disputeId) + external + view + returns ( + address subject, + uint8 possibleRulings, + OwnableCeleste.State state, + uint8 finalRuling, + uint256 lastRoundId, + uint64 createTermId + ) + { + (address subject, OwnableCeleste.State state) = celeste.disputes( + _disputeId + ); + return (subject, 0, state, 0, 0, 0); + } +} diff --git a/packages/hardhat/default-config.json b/packages/hardhat/default-config.json index 13a03b98..d1aa38cd 100644 --- a/packages/hardhat/default-config.json +++ b/packages/hardhat/default-config.json @@ -1,11 +1,11 @@ { "GovernQueueFactory": { "rinkeby": "0x3383032F06BB4Bc4c9DfE08c564cde467c2f725e", - "xdai": "TODO" + "xdai": "0x52abc1238254d878D1761cD83c3fbF4d61B2581b" }, "GovernFactory": { "rinkeby": "0x3ddc3e8bbf3f6987e4008a7d6f486dae4d0f120f", - "xdai": "TODO" + "xdai": "0x8De393cd9F84D7989A1164191a1f6CDd5D2a7F9B" }, "CreateQuestDeposit": { "rinkeby": { @@ -14,7 +14,7 @@ }, "xdai": { "token": "0x71850b7E9Ee3f13Ab46d67167341E4bDc905Eef9", - "amount": 0.01 + "amount": 0.1 } }, "ScheduleDeposit": { @@ -24,7 +24,7 @@ }, "xdai": { "token": "0x71850b7E9Ee3f13Ab46d67167341E4bDc905Eef9", - "amount": 0.01 + "amount": 0.1 } }, "ChallengeDeposit": { @@ -34,7 +34,7 @@ }, "xdai": { "token": "0x71850b7E9Ee3f13Ab46d67167341E4bDc905Eef9", - "amount": 0.01 + "amount": 0.1 } }, "ChallengeFee": { @@ -49,13 +49,13 @@ }, "RootOwner": { "rinkeby": "0x7375Ed576952BD6CeD060EeE2Db763130eA13bA0", - "xdai": "TODO" + "xdai": "0x7375Ed576952BD6CeD060EeE2Db763130eA13bA0" }, "ClaimDelay": { "rinkeby": 300, "xdai": 604800 }, "CelesteResolver": { - "xdai": "TODO" + "xdai": "0x44E4fCFed14E1285c9e0F6eae77D5fDd0F196f85" } } diff --git a/packages/hardhat/deploy/deploy-quest_factory.ts b/packages/hardhat/deploy/deploy-quest_factory.ts index 437d30fc..22b8a41e 100644 --- a/packages/hardhat/deploy/deploy-quest_factory.ts +++ b/packages/hardhat/deploy/deploy-quest_factory.ts @@ -22,7 +22,7 @@ export default async ( ? { token: args.createDepositToken, amount: args.createDepositAmount } : defaultConfig.CreateQuestDeposit[network.name]; const constructorArguments = [ - args.governAddress ?? govern, + args?.governAddress ?? govern, deposit.token, ethers.utils.parseEther(deposit.amount.toString()), owner, @@ -34,22 +34,24 @@ export default async ( }); await ethers.getContract("QuestFactory", deployResult.address); - try { - console.log("Verifying QuestFactory..."); - await new Promise((res, rej) => { - setTimeout( - () => - run("verify:verify", { - address: deployResult.address, - constructorArguments, - }) - .then(res) - .catch(rej), - 2000 - ); // Wait for contract to be deployed - }); - } catch (error) { - console.error("Failed when verifying the QuestFactory", error); + if (network.name === "rinkeby") { + try { + console.log("Verifying QuestFactory..."); + await new Promise((res, rej) => { + setTimeout( + () => + run("verify:verify", { + address: deployResult.address, + constructorArguments, + }) + .then(res) + .catch(rej), + 2000 + ); // Wait for contract to be deployed + }); + } catch (error) { + console.error("Failed when verifying the QuestFactory", error); + } } return deployResult; diff --git a/packages/hardhat/deployments/rinkeby/Celeste.json b/packages/hardhat/deployments/rinkeby/Celeste.json index 0ed76f7d..eddf0540 100644 --- a/packages/hardhat/deployments/rinkeby/Celeste.json +++ b/packages/hardhat/deployments/rinkeby/Celeste.json @@ -1 +1 @@ -{"address":"0xdCA81bde631EA9A85D12c57150427cAc350E3952","abi":[{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_disputeId","type":"uint256"},{"name":"_state","type":"uint8"}],"name":"decideDispute","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"disputes","outputs":[{"name":"subject","type":"address"},{"name":"state","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"feeToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"feeAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getDisputeFees","outputs":[{"name":"","type":"address"},{"name":"","type":"address"},{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_disputeId","type":"uint256"},{"name":"_submitter","type":"address"},{"name":"_evidence","type":"bytes"}],"name":"submitEvidence","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_disputeId","type":"uint256"}],"name":"closeEvidencePeriod","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_possibleRulings","type":"uint256"},{"name":"_metadata","type":"bytes"}],"name":"createDispute","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_disputeId","type":"uint256"}],"name":"rule","outputs":[{"name":"subject","type":"address"},{"name":"ruling","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"currentId","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_feeToken","type":"address"},{"name":"_feeAmount","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"}]} \ No newline at end of file +{"address":"0xe772723b98E58F4b6217DeB381AA164f2b5FB33c","abi":[{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_disputeId","type":"uint256"},{"name":"_state","type":"uint8"}],"name":"decideDispute","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"disputes","outputs":[{"name":"subject","type":"address"},{"name":"state","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"feeToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"feeAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getDisputeFees","outputs":[{"name":"","type":"address"},{"name":"","type":"address"},{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_disputeId","type":"uint256"},{"name":"_submitter","type":"address"},{"name":"_evidence","type":"bytes"}],"name":"submitEvidence","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_disputeId","type":"uint256"}],"name":"closeEvidencePeriod","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_possibleRulings","type":"uint256"},{"name":"_metadata","type":"bytes"}],"name":"createDispute","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_disputeId","type":"uint256"}],"name":"rule","outputs":[{"name":"subject","type":"address"},{"name":"ruling","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getDisputeManager","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"currentId","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_feeToken","type":"address"},{"name":"_feeAmount","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"}]} \ No newline at end of file diff --git a/packages/hardhat/deployments/rinkeby/OwnableCeleste.json b/packages/hardhat/deployments/rinkeby/OwnableCeleste.json index d0582239..cc23fe06 100644 --- a/packages/hardhat/deployments/rinkeby/OwnableCeleste.json +++ b/packages/hardhat/deployments/rinkeby/OwnableCeleste.json @@ -1,5 +1,5 @@ { - "address": "0xdCA81bde631EA9A85D12c57150427cAc350E3952", + "address": "0xe772723b98E58F4b6217DeB381AA164f2b5FB33c", "abi": [ { "constant": false, @@ -202,6 +202,20 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "getDisputeManager", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -232,19 +246,19 @@ "type": "constructor" } ], - "transactionHash": "0x01a91cceb0f4ed93c5cd49b5a5418b6fb610c95b54856fd66de896bb2161b898", + "transactionHash": "0x891f2e6c18a13fc5fed337591fa5ed9265fe612116a71f2f490e1b9ad0e5f429", "receipt": { "to": null, "from": "0x91B0d67D3F47A30FBEeB159E67209Ad6cb2cE22E", - "contractAddress": "0xdCA81bde631EA9A85D12c57150427cAc350E3952", + "contractAddress": "0xe772723b98E58F4b6217DeB381AA164f2b5FB33c", "transactionIndex": 0, - "gasUsed": "874961", + "gasUsed": "1166177", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xd775ec049a641eafef795671d7956820febc4a947d8377dbe1454a55d151a4ad", - "transactionHash": "0x01a91cceb0f4ed93c5cd49b5a5418b6fb610c95b54856fd66de896bb2161b898", + "blockHash": "0xce624bd609f0b691a4d2038457b69a33651837ebbd31e5fd4fed9c969c7f6336", + "transactionHash": "0x891f2e6c18a13fc5fed337591fa5ed9265fe612116a71f2f490e1b9ad0e5f429", "logs": [], - "blockNumber": 10676067, - "cumulativeGasUsed": "874961", + "blockNumber": 10764212, + "cumulativeGasUsed": "1166177", "status": 1, "byzantium": true }, @@ -252,10 +266,10 @@ "0x3050E20FAbE19f8576865811c9F28e85b96Fa4f9", "50000000000000000" ], - "solcInputHash": "a6944b2f61bcf83839b564892dd1b56e", - "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_disputeId\",\"type\":\"uint256\"},{\"name\":\"_state\",\"type\":\"uint8\"}],\"name\":\"decideDispute\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"name\":\"subject\",\"type\":\"address\"},{\"name\":\"state\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"feeAmount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getDisputeFees\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_disputeId\",\"type\":\"uint256\"},{\"name\":\"_submitter\",\"type\":\"address\"},{\"name\":\"_evidence\",\"type\":\"bytes\"}],\"name\":\"submitEvidence\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_disputeId\",\"type\":\"uint256\"}],\"name\":\"closeEvidencePeriod\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_possibleRulings\",\"type\":\"uint256\"},{\"name\":\"_metadata\",\"type\":\"bytes\"}],\"name\":\"createDispute\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_disputeId\",\"type\":\"uint256\"}],\"name\":\"rule\",\"outputs\":[{\"name\":\"subject\",\"type\":\"address\"},{\"name\":\"ruling\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentId\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_feeToken\",\"type\":\"address\"},{\"name\":\"_feeAmount\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{\"closeEvidencePeriod(uint256)\":{\"details\":\"Close the evidence period of a dispute\\r\",\"params\":{\"_disputeId\":\"Identification number of the dispute to close its evidence submitting period\\r\"}},\"createDispute(uint256,bytes)\":{\"details\":\"Create a dispute over the Arbitrable sender with a number of possible rulings\\r\",\"params\":{\"_metadata\":\"Optional metadata that can be used to provide additional information on the dispute to be created\\r\",\"_possibleRulings\":\"Number of possible rulings allowed for the dispute\\r\"},\"return\":\"Dispute identification number\\r\"},\"getDisputeFees()\":{\"details\":\"Tell the dispute fees information to create a dispute\\r\",\"return\":\"recipient Address where the corresponding dispute fees must be transferred to\\rfeeToken ERC20 token used for the fees\\rfeeAmount Total amount of fees that must be allowed to the recipient\\r\"},\"rule(uint256)\":{\"params\":{\"_disputeId\":\"Identification number of the dispute to be ruled\\r\"},\"return\":\"subject Arbitrable instance associated to the dispute\\rruling Ruling number computed for the given dispute\\r\"},\"submitEvidence(uint256,address,bytes)\":{\"details\":\"Submit evidence for a dispute\\r\",\"params\":{\"_disputeId\":\"Id of the dispute in the Protocol\\r\",\"_evidence\":\"Data submitted for the evidence related to the dispute\\r\",\"_submitter\":\"Address of the account submitting the evidence\\r\"}}}},\"userdoc\":{\"methods\":{\"rule(uint256)\":{\"notice\":\"Rule dispute #`_disputeId` if ready\\r\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/mocks/OwnableCelesteMock.sol\":\"OwnableCeleste\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"metadata\":{\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/mocks/OwnableCelesteMock.sol\":{\"content\":\"/**\\r\\n *Submitted for verification at Etherscan.io on 2022-01-07\\r\\n */\\r\\n\\r\\n// Brought from https://github.com/aragon/aragonOS/blob/v4.3.0/contracts/lib/token/ERC20.sol\\r\\n// Adapted to use pragma ^0.5.8 and satisfy our linter rules\\r\\n\\r\\npragma solidity ^0.5.8;\\r\\n\\r\\n/**\\r\\n * @title ERC20 interface\\r\\n * @dev see https://github.com/ethereum/EIPs/issues/20\\r\\n */\\r\\ncontract ERC20 {\\r\\n function totalSupply() public view returns (uint256);\\r\\n\\r\\n function balanceOf(address _who) public view returns (uint256);\\r\\n\\r\\n function allowance(address _owner, address _spender)\\r\\n public\\r\\n view\\r\\n returns (uint256);\\r\\n\\r\\n function transfer(address _to, uint256 _value) public returns (bool);\\r\\n\\r\\n function approve(address _spender, uint256 _value) public returns (bool);\\r\\n\\r\\n function transferFrom(\\r\\n address _from,\\r\\n address _to,\\r\\n uint256 _value\\r\\n ) public returns (bool);\\r\\n\\r\\n event Transfer(address indexed from, address indexed to, uint256 value);\\r\\n\\r\\n event Approval(\\r\\n address indexed owner,\\r\\n address indexed spender,\\r\\n uint256 value\\r\\n );\\r\\n}\\r\\n\\r\\n// File: contracts/arbitration/IArbitrator.sol\\r\\n\\r\\npragma solidity ^0.5.8;\\r\\n\\r\\ninterface IArbitrator {\\r\\n /**\\r\\n * @dev Create a dispute over the Arbitrable sender with a number of possible rulings\\r\\n * @param _possibleRulings Number of possible rulings allowed for the dispute\\r\\n * @param _metadata Optional metadata that can be used to provide additional information on the dispute to be created\\r\\n * @return Dispute identification number\\r\\n */\\r\\n function createDispute(uint256 _possibleRulings, bytes calldata _metadata)\\r\\n external\\r\\n returns (uint256);\\r\\n\\r\\n /**\\r\\n * @dev Submit evidence for a dispute\\r\\n * @param _disputeId Id of the dispute in the Protocol\\r\\n * @param _submitter Address of the account submitting the evidence\\r\\n * @param _evidence Data submitted for the evidence related to the dispute\\r\\n */\\r\\n function submitEvidence(\\r\\n uint256 _disputeId,\\r\\n address _submitter,\\r\\n bytes calldata _evidence\\r\\n ) external;\\r\\n\\r\\n /**\\r\\n * @dev Close the evidence period of a dispute\\r\\n * @param _disputeId Identification number of the dispute to close its evidence submitting period\\r\\n */\\r\\n function closeEvidencePeriod(uint256 _disputeId) external;\\r\\n\\r\\n /**\\r\\n * @notice Rule dispute #`_disputeId` if ready\\r\\n * @param _disputeId Identification number of the dispute to be ruled\\r\\n * @return subject Arbitrable instance associated to the dispute\\r\\n * @return ruling Ruling number computed for the given dispute\\r\\n */\\r\\n function rule(uint256 _disputeId)\\r\\n external\\r\\n returns (address subject, uint256 ruling);\\r\\n\\r\\n /**\\r\\n * @dev Tell the dispute fees information to create a dispute\\r\\n * @return recipient Address where the corresponding dispute fees must be transferred to\\r\\n * @return feeToken ERC20 token used for the fees\\r\\n * @return feeAmount Total amount of fees that must be allowed to the recipient\\r\\n */\\r\\n function getDisputeFees()\\r\\n external\\r\\n view\\r\\n returns (\\r\\n address recipient,\\r\\n ERC20 feeToken,\\r\\n uint256 feeAmount\\r\\n );\\r\\n}\\r\\n\\r\\n// File: contracts/lib/os/SafeERC20.sol\\r\\n\\r\\n// Brought from https://github.com/aragon/aragonOS/blob/v4.3.0/contracts/common/SafeERC20.sol\\r\\n// Adapted to use pragma ^0.5.8 and satisfy our linter rules\\r\\n\\r\\npragma solidity ^0.5.8;\\r\\n\\r\\nlibrary SafeERC20 {\\r\\n // Before 0.5, solidity has a mismatch between `address.transfer()` and `token.transfer()`:\\r\\n // https://github.com/ethereum/solidity/issues/3544\\r\\n bytes4 private constant TRANSFER_SELECTOR = 0xa9059cbb;\\r\\n\\r\\n /**\\r\\n * @dev Same as a standards-compliant ERC20.transfer() that never reverts (returns false).\\r\\n * Note that this makes an external call to the token.\\r\\n */\\r\\n function safeTransfer(\\r\\n ERC20 _token,\\r\\n address _to,\\r\\n uint256 _amount\\r\\n ) internal returns (bool) {\\r\\n bytes memory transferCallData = abi.encodeWithSelector(\\r\\n TRANSFER_SELECTOR,\\r\\n _to,\\r\\n _amount\\r\\n );\\r\\n return invokeAndCheckSuccess(address(_token), transferCallData);\\r\\n }\\r\\n\\r\\n /**\\r\\n * @dev Same as a standards-compliant ERC20.transferFrom() that never reverts (returns false).\\r\\n * Note that this makes an external call to the token.\\r\\n */\\r\\n function safeTransferFrom(\\r\\n ERC20 _token,\\r\\n address _from,\\r\\n address _to,\\r\\n uint256 _amount\\r\\n ) internal returns (bool) {\\r\\n bytes memory transferFromCallData = abi.encodeWithSelector(\\r\\n _token.transferFrom.selector,\\r\\n _from,\\r\\n _to,\\r\\n _amount\\r\\n );\\r\\n return invokeAndCheckSuccess(address(_token), transferFromCallData);\\r\\n }\\r\\n\\r\\n /**\\r\\n * @dev Same as a standards-compliant ERC20.approve() that never reverts (returns false).\\r\\n * Note that this makes an external call to the token.\\r\\n */\\r\\n function safeApprove(\\r\\n ERC20 _token,\\r\\n address _spender,\\r\\n uint256 _amount\\r\\n ) internal returns (bool) {\\r\\n bytes memory approveCallData = abi.encodeWithSelector(\\r\\n _token.approve.selector,\\r\\n _spender,\\r\\n _amount\\r\\n );\\r\\n return invokeAndCheckSuccess(address(_token), approveCallData);\\r\\n }\\r\\n\\r\\n function invokeAndCheckSuccess(address _addr, bytes memory _calldata)\\r\\n private\\r\\n returns (bool)\\r\\n {\\r\\n bool ret;\\r\\n assembly {\\r\\n let ptr := mload(0x40) // free memory pointer\\r\\n\\r\\n let success := call(\\r\\n gas, // forward all gas\\r\\n _addr, // address\\r\\n 0, // no value\\r\\n add(_calldata, 0x20), // calldata start\\r\\n mload(_calldata), // calldata length\\r\\n ptr, // write output over free memory\\r\\n 0x20 // uint256 return\\r\\n )\\r\\n\\r\\n if gt(success, 0) {\\r\\n // Check number of bytes returned from last function call\\r\\n switch returndatasize\\r\\n // No bytes returned: assume success\\r\\n case 0 {\\r\\n ret := 1\\r\\n }\\r\\n // 32 bytes returned: check if non-zero\\r\\n case 0x20 {\\r\\n // Only return success if returned data was true\\r\\n // Already have output in ptr\\r\\n ret := eq(mload(ptr), 1)\\r\\n }\\r\\n // Not sure what was returned: don't mark as success\\r\\n default {\\r\\n\\r\\n }\\r\\n }\\r\\n }\\r\\n return ret;\\r\\n }\\r\\n}\\r\\n\\r\\n// File: contracts/ownable-celeste/OwnableCeleste.sol\\r\\n\\r\\npragma solidity ^0.5.8;\\r\\n\\r\\ncontract OwnableCeleste is IArbitrator {\\r\\n using SafeERC20 for ERC20;\\r\\n\\r\\n // Note that Aragon Court treats the possible outcomes as arbitrary numbers, leaving the Arbitrable (us) to define how to understand them.\\r\\n // Some outcomes [0, 1, and 2] are reserved by Aragon Court: \\\"missing\\\", \\\"leaked\\\", and \\\"refused\\\", respectively.\\r\\n // This Arbitrable introduces the concept of the challenger/submitter (a binary outcome) as 3/4.\\r\\n // Note that Aragon Court emits the lowest outcome in the event of a tie, and so for us, we prefer the challenger.\\r\\n uint256 private constant DISPUTES_NOT_RULED = 0;\\r\\n uint256 private constant DISPUTES_RULING_CHALLENGER = 3;\\r\\n uint256 private constant DISPUTES_RULING_SUBMITTER = 4;\\r\\n\\r\\n enum State {\\r\\n NOT_DISPUTED,\\r\\n DISPUTED,\\r\\n DISPUTES_NOT_RULED,\\r\\n DISPUTES_RULING_CHALLENGER,\\r\\n DISPUTES_RULING_SUBMITTER\\r\\n }\\r\\n\\r\\n struct Dispute {\\r\\n address subject;\\r\\n State state;\\r\\n }\\r\\n\\r\\n ERC20 public feeToken;\\r\\n uint256 public feeAmount;\\r\\n uint256 public currentId;\\r\\n address public owner;\\r\\n mapping(uint256 => Dispute) public disputes;\\r\\n\\r\\n modifier onlyOwner() {\\r\\n require(msg.sender == owner, \\\"ERR:NOT_OWNER\\\");\\r\\n _;\\r\\n }\\r\\n\\r\\n constructor(ERC20 _feeToken, uint256 _feeAmount) public {\\r\\n owner = msg.sender;\\r\\n feeToken = _feeToken;\\r\\n feeAmount = _feeAmount;\\r\\n }\\r\\n\\r\\n function setOwner(address _owner) public onlyOwner {\\r\\n owner = _owner;\\r\\n }\\r\\n\\r\\n /**\\r\\n * @dev Create a dispute over the Arbitrable sender with a number of possible rulings\\r\\n * @param _possibleRulings Number of possible rulings allowed for the dispute\\r\\n * @param _metadata Optional metadata that can be used to provide additional information on the dispute to be created\\r\\n * @return Dispute identification number\\r\\n */\\r\\n function createDispute(uint256 _possibleRulings, bytes calldata _metadata)\\r\\n external\\r\\n returns (uint256)\\r\\n {\\r\\n uint256 disputeId = currentId;\\r\\n disputes[disputeId] = Dispute(msg.sender, State.DISPUTED);\\r\\n currentId++;\\r\\n\\r\\n require(\\r\\n feeToken.safeTransferFrom(msg.sender, address(this), feeAmount),\\r\\n \\\"ERR:DEPOSIT_FAILED\\\"\\r\\n );\\r\\n return disputeId;\\r\\n }\\r\\n\\r\\n function decideDispute(uint256 _disputeId, State _state)\\r\\n external\\r\\n onlyOwner\\r\\n {\\r\\n require(\\r\\n _state != State.NOT_DISPUTED && _state != State.DISPUTED,\\r\\n \\\"ERR:OUTCOME_NOT_ASSIGNABLE\\\"\\r\\n );\\r\\n\\r\\n Dispute storage dispute = disputes[_disputeId];\\r\\n require(dispute.state == State.DISPUTED, \\\"ERR:NOT_DISPUTED\\\");\\r\\n\\r\\n dispute.state = _state;\\r\\n }\\r\\n\\r\\n /**\\r\\n * @dev Submit evidence for a dispute\\r\\n * @param _disputeId Id of the dispute in the Protocol\\r\\n * @param _submitter Address of the account submitting the evidence\\r\\n * @param _evidence Data submitted for the evidence related to the dispute\\r\\n */\\r\\n function submitEvidence(\\r\\n uint256 _disputeId,\\r\\n address _submitter,\\r\\n bytes calldata _evidence\\r\\n ) external {}\\r\\n\\r\\n /**\\r\\n * @dev Close the evidence period of a dispute\\r\\n * @param _disputeId Identification number of the dispute to close its evidence submitting period\\r\\n */\\r\\n function closeEvidencePeriod(uint256 _disputeId) external {}\\r\\n\\r\\n /**\\r\\n * @notice Rule dispute #`_disputeId` if ready\\r\\n * @param _disputeId Identification number of the dispute to be ruled\\r\\n * @return subject Arbitrable instance associated to the dispute\\r\\n * @return ruling Ruling number computed for the given dispute\\r\\n */\\r\\n function rule(uint256 _disputeId)\\r\\n external\\r\\n returns (address subject, uint256 ruling)\\r\\n {\\r\\n Dispute storage dispute = disputes[_disputeId];\\r\\n\\r\\n if (dispute.state == State.DISPUTES_RULING_CHALLENGER) {\\r\\n return (dispute.subject, DISPUTES_RULING_CHALLENGER);\\r\\n } else if (dispute.state == State.DISPUTES_RULING_SUBMITTER) {\\r\\n return (dispute.subject, DISPUTES_RULING_SUBMITTER);\\r\\n } else if (dispute.state == State.DISPUTES_NOT_RULED) {\\r\\n return (dispute.subject, DISPUTES_NOT_RULED);\\r\\n } else {\\r\\n revert();\\r\\n }\\r\\n }\\r\\n\\r\\n /**\\r\\n * @dev Tell the dispute fees information to create a dispute\\r\\n * @return recipient Address where the corresponding dispute fees must be transferred to\\r\\n * @return feeToken ERC20 token used for the fees\\r\\n * @return feeAmount Total amount of fees that must be allowed to the recipient\\r\\n */\\r\\n function getDisputeFees()\\r\\n external\\r\\n view\\r\\n returns (\\r\\n address,\\r\\n ERC20,\\r\\n uint256\\r\\n )\\r\\n {\\r\\n return (address(this), feeToken, feeAmount);\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x511c5adc4e52585d2165d80216803525a96c17e1caa8603558658909cf24c445\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50604051604080610e898339810180604052604081101561003057600080fd5b81019080805190602001909291908051906020019092919050505033600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806001819055505050610da5806100e46000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80637cb57c64116100715780637cb57c64146102a75780637e9adccf1461034a5780638da5cb5b14610378578063c13517e1146103c2578063db18af6c14610459578063e00dd161146104ce576100b4565b806313af4035146100b95780631da213f2146100fd578063564a565d14610138578063647846a5146101bb57806369e15404146102055780637b751b9e14610223575b600080fd5b6100fb600480360360208110156100cf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104ec565b005b6101366004803603604081101561011357600080fd5b8101908080359060200190929190803560ff1690602001909291905050506105f3565b005b6101646004803603602081101561014e57600080fd5b8101908080359060200190929190505050610844565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018260048111156101a657fe5b60ff1681526020019250505060405180910390f35b6101c3610895565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61020d6108ba565b6040518082815260200191505060405180910390f35b61022b6108c0565b604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390f35b610348600480360360608110156102bd57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561030457600080fd5b82018360208201111561031657600080fd5b8035906020019184600183028401116401000000008311171561033857600080fd5b90919293919293905050506108f6565b005b6103766004803603602081101561036057600080fd5b81019080803590602001909291905050506108fc565b005b6103806108ff565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610443600480360360408110156103d857600080fd5b8101908080359060200190929190803590602001906401000000008111156103ff57600080fd5b82018360208201111561041157600080fd5b8035906020019184600183028401116401000000008311171561043357600080fd5b9091929391929390505050610925565b6040518082815260200191505060405180910390f35b6104856004803603602081101561046f57600080fd5b8101908080359060200190929190505050610ac9565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390f35b6104d6610c0f565b6040518082815260200191505060405180910390f35b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552523a4e4f545f4f574e45520000000000000000000000000000000000000081525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552523a4e4f545f4f574e45520000000000000000000000000000000000000081525060200191505060405180910390fd5b600060048111156106c357fe5b8160048111156106cf57fe5b141580156106f45750600160048111156106e557fe5b8160048111156106f157fe5b14155b610766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f4552523a4f5554434f4d455f4e4f545f41535349474e41424c4500000000000081525060200191505060405180910390fd5b60006004600084815260200190815260200160002090506001600481111561078a57fe5b8160000160149054906101000a900460ff1660048111156107a757fe5b1461081a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552523a4e4f545f44495350555445440000000000000000000000000000000081525060200191505060405180910390fd5b818160000160146101000a81548160ff0219169083600481111561083a57fe5b0217905550505050565b60046020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060000160149054906101000a900460ff16905082565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b6000806000306000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600154925092509250909192565b50505050565b50565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600254905060405180604001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020016001600481111561096157fe5b8152506004600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548160ff021916908360048111156109e257fe5b0217905550905050600260008154809291906001019190505550610a4c33306001546000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c15909392919063ffffffff16565b610abe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552523a4445504f5349545f4641494c4544000000000000000000000000000081525060200191505060405180910390fd5b809150509392505050565b600080600060046000858152602001908152602001600020905060036004811115610af057fe5b8160000160149054906101000a900460ff166004811115610b0d57fe5b1415610b44578060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660039250925050610c0a565b600480811115610b5057fe5b8160000160149054906101000a900460ff166004811115610b6d57fe5b1415610ba4578060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660049250925050610c0a565b60026004811115610bb157fe5b8160000160149054906101000a900460ff166004811115610bce57fe5b1415610c05578060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660009250925050610c0a565b600080fd5b915091565b60025481565b600060608573ffffffffffffffffffffffffffffffffffffffff166323b872dd905060e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050610d1c8682610d27565b915050949350505050565b6000806040516020818551602087016000895af16000811115610d6d573d60008114610d5a5760208114610d6357610d6b565b60019350610d6b565b600183511493505b505b5050809150509291505056fea165627a7a7230582024ba3bfca91557b0788050b8a32baa06b2ab282acae29c13e5e404d361b01bac0029", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80637cb57c64116100715780637cb57c64146102a75780637e9adccf1461034a5780638da5cb5b14610378578063c13517e1146103c2578063db18af6c14610459578063e00dd161146104ce576100b4565b806313af4035146100b95780631da213f2146100fd578063564a565d14610138578063647846a5146101bb57806369e15404146102055780637b751b9e14610223575b600080fd5b6100fb600480360360208110156100cf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104ec565b005b6101366004803603604081101561011357600080fd5b8101908080359060200190929190803560ff1690602001909291905050506105f3565b005b6101646004803603602081101561014e57600080fd5b8101908080359060200190929190505050610844565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018260048111156101a657fe5b60ff1681526020019250505060405180910390f35b6101c3610895565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61020d6108ba565b6040518082815260200191505060405180910390f35b61022b6108c0565b604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390f35b610348600480360360608110156102bd57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561030457600080fd5b82018360208201111561031657600080fd5b8035906020019184600183028401116401000000008311171561033857600080fd5b90919293919293905050506108f6565b005b6103766004803603602081101561036057600080fd5b81019080803590602001909291905050506108fc565b005b6103806108ff565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610443600480360360408110156103d857600080fd5b8101908080359060200190929190803590602001906401000000008111156103ff57600080fd5b82018360208201111561041157600080fd5b8035906020019184600183028401116401000000008311171561043357600080fd5b9091929391929390505050610925565b6040518082815260200191505060405180910390f35b6104856004803603602081101561046f57600080fd5b8101908080359060200190929190505050610ac9565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390f35b6104d6610c0f565b6040518082815260200191505060405180910390f35b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552523a4e4f545f4f574e45520000000000000000000000000000000000000081525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552523a4e4f545f4f574e45520000000000000000000000000000000000000081525060200191505060405180910390fd5b600060048111156106c357fe5b8160048111156106cf57fe5b141580156106f45750600160048111156106e557fe5b8160048111156106f157fe5b14155b610766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f4552523a4f5554434f4d455f4e4f545f41535349474e41424c4500000000000081525060200191505060405180910390fd5b60006004600084815260200190815260200160002090506001600481111561078a57fe5b8160000160149054906101000a900460ff1660048111156107a757fe5b1461081a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552523a4e4f545f44495350555445440000000000000000000000000000000081525060200191505060405180910390fd5b818160000160146101000a81548160ff0219169083600481111561083a57fe5b0217905550505050565b60046020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060000160149054906101000a900460ff16905082565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b6000806000306000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600154925092509250909192565b50505050565b50565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600254905060405180604001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020016001600481111561096157fe5b8152506004600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548160ff021916908360048111156109e257fe5b0217905550905050600260008154809291906001019190505550610a4c33306001546000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c15909392919063ffffffff16565b610abe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552523a4445504f5349545f4641494c4544000000000000000000000000000081525060200191505060405180910390fd5b809150509392505050565b600080600060046000858152602001908152602001600020905060036004811115610af057fe5b8160000160149054906101000a900460ff166004811115610b0d57fe5b1415610b44578060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660039250925050610c0a565b600480811115610b5057fe5b8160000160149054906101000a900460ff166004811115610b6d57fe5b1415610ba4578060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660049250925050610c0a565b60026004811115610bb157fe5b8160000160149054906101000a900460ff166004811115610bce57fe5b1415610c05578060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660009250925050610c0a565b600080fd5b915091565b60025481565b600060608573ffffffffffffffffffffffffffffffffffffffff166323b872dd905060e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050610d1c8682610d27565b915050949350505050565b6000806040516020818551602087016000895af16000811115610d6d573d60008114610d5a5760208114610d6357610d6b565b60019350610d6b565b600183511493505b505b5050809150509291505056fea165627a7a7230582024ba3bfca91557b0788050b8a32baa06b2ab282acae29c13e5e404d361b01bac0029", + "solcInputHash": "e2fc09f2f93bdc1aa037d1457edd9cbe", + "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_disputeId\",\"type\":\"uint256\"},{\"name\":\"_state\",\"type\":\"uint8\"}],\"name\":\"decideDispute\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"name\":\"subject\",\"type\":\"address\"},{\"name\":\"state\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"feeAmount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getDisputeFees\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_disputeId\",\"type\":\"uint256\"},{\"name\":\"_submitter\",\"type\":\"address\"},{\"name\":\"_evidence\",\"type\":\"bytes\"}],\"name\":\"submitEvidence\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_disputeId\",\"type\":\"uint256\"}],\"name\":\"closeEvidencePeriod\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_possibleRulings\",\"type\":\"uint256\"},{\"name\":\"_metadata\",\"type\":\"bytes\"}],\"name\":\"createDispute\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_disputeId\",\"type\":\"uint256\"}],\"name\":\"rule\",\"outputs\":[{\"name\":\"subject\",\"type\":\"address\"},{\"name\":\"ruling\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getDisputeManager\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentId\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_feeToken\",\"type\":\"address\"},{\"name\":\"_feeAmount\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{\"closeEvidencePeriod(uint256)\":{\"details\":\"Close the evidence period of a dispute\\r\",\"params\":{\"_disputeId\":\"Identification number of the dispute to close its evidence submitting period\\r\"}},\"createDispute(uint256,bytes)\":{\"details\":\"Create a dispute over the Arbitrable sender with a number of possible rulings\\r\",\"params\":{\"_metadata\":\"Optional metadata that can be used to provide additional information on the dispute to be created\\r\",\"_possibleRulings\":\"Number of possible rulings allowed for the dispute\\r\"},\"return\":\"Dispute identification number\\r\"},\"getDisputeFees()\":{\"details\":\"Tell the dispute fees information to create a dispute\\r\",\"return\":\"recipient Address where the corresponding dispute fees must be transferred to\\rfeeToken ERC20 token used for the fees\\rfeeAmount Total amount of fees that must be allowed to the recipient\\r\"},\"rule(uint256)\":{\"params\":{\"_disputeId\":\"Identification number of the dispute to be ruled\\r\"},\"return\":\"subject Arbitrable instance associated to the dispute\\rruling Ruling number computed for the given dispute\\r\"},\"submitEvidence(uint256,address,bytes)\":{\"details\":\"Submit evidence for a dispute\\r\",\"params\":{\"_disputeId\":\"Id of the dispute in the Protocol\\r\",\"_evidence\":\"Data submitted for the evidence related to the dispute\\r\",\"_submitter\":\"Address of the account submitting the evidence\\r\"}}}},\"userdoc\":{\"methods\":{\"rule(uint256)\":{\"notice\":\"Rule dispute #`_disputeId` if ready\\r\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/mocks/OwnableCelesteMock.sol\":\"OwnableCeleste\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"metadata\":{\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/mocks/OwnableCelesteMock.sol\":{\"content\":\"/**\\r\\n *Submitted for verification at Etherscan.io on 2022-01-07\\r\\n */\\r\\n\\r\\n// Brought from https://github.com/aragon/aragonOS/blob/v4.3.0/contracts/lib/token/ERC20.sol\\r\\n// Adapted to use pragma ^0.5.8 and satisfy our linter rules\\r\\n\\r\\npragma solidity ^0.5.8;\\r\\n\\r\\n/**\\r\\n * @title ERC20 interface\\r\\n * @dev see https://github.com/ethereum/EIPs/issues/20\\r\\n */\\r\\ncontract GovernERC20 {\\r\\n function totalSupply() public view returns (uint256);\\r\\n\\r\\n function balanceOf(address _who) public view returns (uint256);\\r\\n\\r\\n function allowance(address _owner, address _spender)\\r\\n public\\r\\n view\\r\\n returns (uint256);\\r\\n\\r\\n function transfer(address _to, uint256 _value) public returns (bool);\\r\\n\\r\\n function approve(address _spender, uint256 _value) public returns (bool);\\r\\n\\r\\n function transferFrom(\\r\\n address _from,\\r\\n address _to,\\r\\n uint256 _value\\r\\n ) public returns (bool);\\r\\n\\r\\n event Transfer(address indexed from, address indexed to, uint256 value);\\r\\n\\r\\n event Approval(\\r\\n address indexed owner,\\r\\n address indexed spender,\\r\\n uint256 value\\r\\n );\\r\\n}\\r\\n\\r\\n// File: contracts/arbitration/IArbitrator.sol\\r\\n\\r\\npragma solidity ^0.5.8;\\r\\n\\r\\ninterface IArbitrator {\\r\\n /**\\r\\n * @dev Create a dispute over the Arbitrable sender with a number of possible rulings\\r\\n * @param _possibleRulings Number of possible rulings allowed for the dispute\\r\\n * @param _metadata Optional metadata that can be used to provide additional information on the dispute to be created\\r\\n * @return Dispute identification number\\r\\n */\\r\\n function createDispute(uint256 _possibleRulings, bytes calldata _metadata)\\r\\n external\\r\\n returns (uint256);\\r\\n\\r\\n /**\\r\\n * @dev Submit evidence for a dispute\\r\\n * @param _disputeId Id of the dispute in the Protocol\\r\\n * @param _submitter Address of the account submitting the evidence\\r\\n * @param _evidence Data submitted for the evidence related to the dispute\\r\\n */\\r\\n function submitEvidence(\\r\\n uint256 _disputeId,\\r\\n address _submitter,\\r\\n bytes calldata _evidence\\r\\n ) external;\\r\\n\\r\\n /**\\r\\n * @dev Close the evidence period of a dispute\\r\\n * @param _disputeId Identification number of the dispute to close its evidence submitting period\\r\\n */\\r\\n function closeEvidencePeriod(uint256 _disputeId) external;\\r\\n\\r\\n /**\\r\\n * @notice Rule dispute #`_disputeId` if ready\\r\\n * @param _disputeId Identification number of the dispute to be ruled\\r\\n * @return subject Arbitrable instance associated to the dispute\\r\\n * @return ruling Ruling number computed for the given dispute\\r\\n */\\r\\n function rule(uint256 _disputeId)\\r\\n external\\r\\n returns (address subject, uint256 ruling);\\r\\n\\r\\n /**\\r\\n * @dev Tell the dispute fees information to create a dispute\\r\\n * @return recipient Address where the corresponding dispute fees must be transferred to\\r\\n * @return feeToken ERC20 token used for the fees\\r\\n * @return feeAmount Total amount of fees that must be allowed to the recipient\\r\\n */\\r\\n function getDisputeFees()\\r\\n external\\r\\n view\\r\\n returns (\\r\\n address recipient,\\r\\n GovernERC20 feeToken,\\r\\n uint256 feeAmount\\r\\n );\\r\\n}\\r\\n\\r\\n// File: contracts/lib/os/SafeERC20.sol\\r\\n\\r\\n// Brought from https://github.com/aragon/aragonOS/blob/v4.3.0/contracts/common/SafeERC20.sol\\r\\n// Adapted to use pragma ^0.5.8 and satisfy our linter rules\\r\\n\\r\\npragma solidity ^0.5.8;\\r\\n\\r\\nlibrary SafeGovernERC20 {\\r\\n // Before 0.5, solidity has a mismatch between `address.transfer()` and `token.transfer()`:\\r\\n // https://github.com/ethereum/solidity/issues/3544\\r\\n bytes4 private constant TRANSFER_SELECTOR = 0xa9059cbb;\\r\\n\\r\\n /**\\r\\n * @dev Same as a standards-compliant ERC20.transfer() that never reverts (returns false).\\r\\n * Note that this makes an external call to the token.\\r\\n */\\r\\n function safeTransfer(\\r\\n GovernERC20 _token,\\r\\n address _to,\\r\\n uint256 _amount\\r\\n ) internal returns (bool) {\\r\\n bytes memory transferCallData = abi.encodeWithSelector(\\r\\n TRANSFER_SELECTOR,\\r\\n _to,\\r\\n _amount\\r\\n );\\r\\n return invokeAndCheckSuccess(address(_token), transferCallData);\\r\\n }\\r\\n\\r\\n /**\\r\\n * @dev Same as a standards-compliant ERC20.transferFrom() that never reverts (returns false).\\r\\n * Note that this makes an external call to the token.\\r\\n */\\r\\n function safeTransferFrom(\\r\\n GovernERC20 _token,\\r\\n address _from,\\r\\n address _to,\\r\\n uint256 _amount\\r\\n ) internal returns (bool) {\\r\\n bytes memory transferFromCallData = abi.encodeWithSelector(\\r\\n _token.transferFrom.selector,\\r\\n _from,\\r\\n _to,\\r\\n _amount\\r\\n );\\r\\n return invokeAndCheckSuccess(address(_token), transferFromCallData);\\r\\n }\\r\\n\\r\\n /**\\r\\n * @dev Same as a standards-compliant ERC20.approve() that never reverts (returns false).\\r\\n * Note that this makes an external call to the token.\\r\\n */\\r\\n function safeApprove(\\r\\n GovernERC20 _token,\\r\\n address _spender,\\r\\n uint256 _amount\\r\\n ) internal returns (bool) {\\r\\n bytes memory approveCallData = abi.encodeWithSelector(\\r\\n _token.approve.selector,\\r\\n _spender,\\r\\n _amount\\r\\n );\\r\\n return invokeAndCheckSuccess(address(_token), approveCallData);\\r\\n }\\r\\n\\r\\n function invokeAndCheckSuccess(address _addr, bytes memory _calldata)\\r\\n private\\r\\n returns (bool)\\r\\n {\\r\\n bool ret;\\r\\n assembly {\\r\\n let ptr := mload(0x40) // free memory pointer\\r\\n\\r\\n let success := call(\\r\\n gas, // forward all gas\\r\\n _addr, // address\\r\\n 0, // no value\\r\\n add(_calldata, 0x20), // calldata start\\r\\n mload(_calldata), // calldata length\\r\\n ptr, // write output over free memory\\r\\n 0x20 // uint256 return\\r\\n )\\r\\n\\r\\n if gt(success, 0) {\\r\\n // Check number of bytes returned from last function call\\r\\n switch returndatasize\\r\\n // No bytes returned: assume success\\r\\n case 0 {\\r\\n ret := 1\\r\\n }\\r\\n // 32 bytes returned: check if non-zero\\r\\n case 0x20 {\\r\\n // Only return success if returned data was true\\r\\n // Already have output in ptr\\r\\n ret := eq(mload(ptr), 1)\\r\\n }\\r\\n // Not sure what was returned: don't mark as success\\r\\n default {\\r\\n\\r\\n }\\r\\n }\\r\\n }\\r\\n return ret;\\r\\n }\\r\\n}\\r\\n\\r\\n// File: contracts/ownable-celeste/OwnableCeleste.sol\\r\\n\\r\\npragma solidity ^0.5.8;\\r\\n\\r\\ncontract OwnableCeleste is IArbitrator {\\r\\n using SafeGovernERC20 for GovernERC20;\\r\\n\\r\\n // Note that Aragon Court treats the possible outcomes as arbitrary numbers, leaving the Arbitrable (us) to define how to understand them.\\r\\n // Some outcomes [0, 1, and 2] are reserved by Aragon Court: \\\"missing\\\", \\\"leaked\\\", and \\\"refused\\\", respectively.\\r\\n // This Arbitrable introduces the concept of the challenger/submitter (a binary outcome) as 3/4.\\r\\n // Note that Aragon Court emits the lowest outcome in the event of a tie, and so for us, we prefer the challenger.\\r\\n uint256 private constant DISPUTES_NOT_RULED = 0;\\r\\n uint256 private constant DISPUTES_RULING_CHALLENGER = 3;\\r\\n uint256 private constant DISPUTES_RULING_SUBMITTER = 4;\\r\\n address private disputeManager;\\r\\n\\r\\n enum State {\\r\\n NOT_DISPUTED,\\r\\n DISPUTED,\\r\\n DISPUTES_NOT_RULED,\\r\\n DISPUTES_RULING_CHALLENGER,\\r\\n DISPUTES_RULING_SUBMITTER\\r\\n }\\r\\n\\r\\n struct Dispute {\\r\\n address subject;\\r\\n State state;\\r\\n }\\r\\n\\r\\n GovernERC20 public feeToken;\\r\\n uint256 public feeAmount;\\r\\n uint256 public currentId;\\r\\n address public owner;\\r\\n mapping(uint256 => Dispute) public disputes;\\r\\n\\r\\n modifier onlyOwner() {\\r\\n require(msg.sender == owner, \\\"ERR:NOT_OWNER\\\");\\r\\n _;\\r\\n }\\r\\n\\r\\n constructor(GovernERC20 _feeToken, uint256 _feeAmount) public {\\r\\n owner = msg.sender;\\r\\n feeToken = _feeToken;\\r\\n feeAmount = _feeAmount;\\r\\n disputeManager = address(new DisputeManager(address(this)));\\r\\n }\\r\\n\\r\\n function getDisputeManager() external view returns (address) {\\r\\n return disputeManager;\\r\\n }\\r\\n\\r\\n function setOwner(address _owner) public onlyOwner {\\r\\n owner = _owner;\\r\\n }\\r\\n\\r\\n /**\\r\\n * @dev Create a dispute over the Arbitrable sender with a number of possible rulings\\r\\n * @param _possibleRulings Number of possible rulings allowed for the dispute\\r\\n * @param _metadata Optional metadata that can be used to provide additional information on the dispute to be created\\r\\n * @return Dispute identification number\\r\\n */\\r\\n function createDispute(uint256 _possibleRulings, bytes calldata _metadata)\\r\\n external\\r\\n returns (uint256)\\r\\n {\\r\\n uint256 disputeId = currentId;\\r\\n disputes[disputeId] = Dispute(msg.sender, State.DISPUTED);\\r\\n currentId++;\\r\\n\\r\\n require(\\r\\n feeToken.safeTransferFrom(msg.sender, address(this), feeAmount),\\r\\n \\\"ERR:DEPOSIT_FAILED\\\"\\r\\n );\\r\\n return disputeId;\\r\\n }\\r\\n\\r\\n function decideDispute(uint256 _disputeId, State _state)\\r\\n external\\r\\n onlyOwner\\r\\n {\\r\\n require(\\r\\n _state != State.NOT_DISPUTED && _state != State.DISPUTED,\\r\\n \\\"ERR:OUTCOME_NOT_ASSIGNABLE\\\"\\r\\n );\\r\\n\\r\\n Dispute storage dispute = disputes[_disputeId];\\r\\n require(dispute.state == State.DISPUTED, \\\"ERR:NOT_DISPUTED\\\");\\r\\n\\r\\n dispute.state = _state;\\r\\n }\\r\\n\\r\\n /**\\r\\n * @dev Submit evidence for a dispute\\r\\n * @param _disputeId Id of the dispute in the Protocol\\r\\n * @param _submitter Address of the account submitting the evidence\\r\\n * @param _evidence Data submitted for the evidence related to the dispute\\r\\n */\\r\\n function submitEvidence(\\r\\n uint256 _disputeId,\\r\\n address _submitter,\\r\\n bytes calldata _evidence\\r\\n ) external {}\\r\\n\\r\\n /**\\r\\n * @dev Close the evidence period of a dispute\\r\\n * @param _disputeId Identification number of the dispute to close its evidence submitting period\\r\\n */\\r\\n function closeEvidencePeriod(uint256 _disputeId) external {}\\r\\n\\r\\n /**\\r\\n * @notice Rule dispute #`_disputeId` if ready\\r\\n * @param _disputeId Identification number of the dispute to be ruled\\r\\n * @return subject Arbitrable instance associated to the dispute\\r\\n * @return ruling Ruling number computed for the given dispute\\r\\n */\\r\\n function rule(uint256 _disputeId)\\r\\n external\\r\\n returns (address subject, uint256 ruling)\\r\\n {\\r\\n Dispute storage dispute = disputes[_disputeId];\\r\\n\\r\\n if (dispute.state == State.DISPUTES_RULING_CHALLENGER) {\\r\\n return (dispute.subject, DISPUTES_RULING_CHALLENGER);\\r\\n } else if (dispute.state == State.DISPUTES_RULING_SUBMITTER) {\\r\\n return (dispute.subject, DISPUTES_RULING_SUBMITTER);\\r\\n } else if (dispute.state == State.DISPUTES_NOT_RULED) {\\r\\n return (dispute.subject, DISPUTES_NOT_RULED);\\r\\n } else {\\r\\n revert();\\r\\n }\\r\\n }\\r\\n\\r\\n /**\\r\\n * @dev Tell the dispute fees information to create a dispute\\r\\n * @return recipient Address where the corresponding dispute fees must be transferred to\\r\\n * @return feeToken ERC20 token used for the fees\\r\\n * @return feeAmount Total amount of fees that must be allowed to the recipient\\r\\n */\\r\\n function getDisputeFees()\\r\\n external\\r\\n view\\r\\n returns (\\r\\n address,\\r\\n GovernERC20,\\r\\n uint256\\r\\n )\\r\\n {\\r\\n return (address(this), feeToken, feeAmount);\\r\\n }\\r\\n}\\r\\n\\r\\ncontract DisputeManager {\\r\\n using SafeGovernERC20 for GovernERC20;\\r\\n\\r\\n OwnableCeleste celeste;\\r\\n\\r\\n constructor(address mockCelesteAddress) public {\\r\\n celeste = OwnableCeleste(mockCelesteAddress);\\r\\n }\\r\\n\\r\\n function getDisputeFees() external view returns (GovernERC20, uint256) {\\r\\n (address celeste, GovernERC20 feeToken, uint256 feeAmount) = celeste\\r\\n .getDisputeFees();\\r\\n return (feeToken, feeAmount);\\r\\n }\\r\\n\\r\\n function getDispute(uint256 _disputeId)\\r\\n external\\r\\n view\\r\\n returns (\\r\\n address subject,\\r\\n uint8 possibleRulings,\\r\\n OwnableCeleste.State state,\\r\\n uint8 finalRuling,\\r\\n uint256 lastRoundId,\\r\\n uint64 createTermId\\r\\n )\\r\\n {\\r\\n (address subject, OwnableCeleste.State state) = celeste.disputes(\\r\\n _disputeId\\r\\n );\\r\\n return (subject, 0, state, 0, 0, 0);\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x36c16a7c7759ec434374979c79afa21d5dcbdaa3f415dbd4b3f9036756f18a99\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516040806113978339810180604052604081101561003057600080fd5b81019080805190602001909291908051906020019092919050505033600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600281905550306040516100e19061017a565b808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050604051809103906000f080158015610133573d6000803e3d6000fd5b506000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050610187565b6103cb80610fcc83390190565b610e36806101966000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80637cb57c641161008c578063c13517e111610066578063c13517e1146103dd578063db18af6c14610474578063db9bee46146104e9578063e00dd16114610533576100cf565b80637cb57c64146102c25780637e9adccf146103655780638da5cb5b14610393576100cf565b806313af4035146100d45780631da213f214610118578063564a565d14610153578063647846a5146101d657806369e15404146102205780637b751b9e1461023e575b600080fd5b610116600480360360208110156100ea57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610551565b005b6101516004803603604081101561012e57600080fd5b8101908080359060200190929190803560ff169060200190929190505050610658565b005b61017f6004803603602081101561016957600080fd5b81019080803590602001909291905050506108a9565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018260048111156101c157fe5b60ff1681526020019250505060405180910390f35b6101de6108fa565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610228610920565b6040518082815260200191505060405180910390f35b610246610926565b604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390f35b610363600480360360608110156102d857600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561031f57600080fd5b82018360208201111561033157600080fd5b8035906020019184600183028401116401000000008311171561035357600080fd5b909192939192939050505061095d565b005b6103916004803603602081101561037b57600080fd5b8101908080359060200190929190505050610963565b005b61039b610966565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61045e600480360360408110156103f357600080fd5b81019080803590602001909291908035906020019064010000000081111561041a57600080fd5b82018360208201111561042c57600080fd5b8035906020019184600183028401116401000000008311171561044e57600080fd5b909192939192939050505061098c565b6040518082815260200191505060405180910390f35b6104a06004803603602081101561048a57600080fd5b8101908080359060200190929190505050610b31565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390f35b6104f1610c77565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61053b610ca0565b6040518082815260200191505060405180910390f35b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610614576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552523a4e4f545f4f574e45520000000000000000000000000000000000000081525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461071b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552523a4e4f545f4f574e45520000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600481111561072857fe5b81600481111561073457fe5b1415801561075957506001600481111561074a57fe5b81600481111561075657fe5b14155b6107cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f4552523a4f5554434f4d455f4e4f545f41535349474e41424c4500000000000081525060200191505060405180910390fd5b6000600560008481526020019081526020016000209050600160048111156107ef57fe5b8160000160149054906101000a900460ff16600481111561080c57fe5b1461087f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552523a4e4f545f44495350555445440000000000000000000000000000000081525060200191505060405180910390fd5b818160000160146101000a81548160ff0219169083600481111561089f57fe5b0217905550505050565b60056020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060000160149054906101000a900460ff16905082565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60025481565b600080600030600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600254925092509250909192565b50505050565b50565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600354905060405180604001604052803373ffffffffffffffffffffffffffffffffffffffff168152602001600160048111156109c857fe5b8152506005600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548160ff02191690836004811115610a4957fe5b0217905550905050600360008154809291906001019190505550610ab43330600254600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ca6909392919063ffffffff16565b610b26576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552523a4445504f5349545f4641494c4544000000000000000000000000000081525060200191505060405180910390fd5b809150509392505050565b600080600060056000858152602001908152602001600020905060036004811115610b5857fe5b8160000160149054906101000a900460ff166004811115610b7557fe5b1415610bac578060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660039250925050610c72565b600480811115610bb857fe5b8160000160149054906101000a900460ff166004811115610bd557fe5b1415610c0c578060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660049250925050610c72565b60026004811115610c1957fe5b8160000160149054906101000a900460ff166004811115610c3657fe5b1415610c6d578060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660009250925050610c72565b600080fd5b915091565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60035481565b600060608573ffffffffffffffffffffffffffffffffffffffff166323b872dd905060e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050610dad8682610db8565b915050949350505050565b6000806040516020818551602087016000895af16000811115610dfe573d60008114610deb5760208114610df457610dfc565b60019350610dfc565b600183511493505b505b5050809150509291505056fea165627a7a72305820f2d223fcb3efcfc8d91b9122ffd4a2fa3bbdd3351cccee0c9b8eb3fd973ecf8f0029608060405234801561001057600080fd5b506040516020806103cb8339810180604052602081101561003057600080fd5b8101908080519060200190929190505050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061033a806100916000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80637b751b9e1461003b578063e3a96cbd1461008c575b600080fd5b61004361014b565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390f35b6100b8600480360360208110156100a257600080fd5b810190808035906020019092919050505061021c565b604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018660ff1660ff16815260200185600481111561010657fe5b60ff1681526020018460ff1660ff1681526020018381526020018267ffffffffffffffff1667ffffffffffffffff168152602001965050505050505060405180910390f35b60008060008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637b751b9e6040518163ffffffff1660e01b815260040160606040518083038186803b1580156101ba57600080fd5b505afa1580156101ce573d6000803e3d6000fd5b505050506040513d60608110156101e457600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050509250925092508181945094505050509091565b6000806000806000806000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663564a565d8a6040518263ffffffff1660e01b815260040180828152602001915050604080518083038186803b15801561029957600080fd5b505afa1580156102ad573d6000803e3d6000fd5b505050506040513d60408110156102c357600080fd5b8101908080519060200190929190805190602001909291905050509150915081600082600080600084945082925081915080905097509750975097509750975050509193955091939556fea165627a7a72305820565a683f33015a30b0ddaff15ba6311e738bf29ed720ecf89f34641d3b42d5120029", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80637cb57c641161008c578063c13517e111610066578063c13517e1146103dd578063db18af6c14610474578063db9bee46146104e9578063e00dd16114610533576100cf565b80637cb57c64146102c25780637e9adccf146103655780638da5cb5b14610393576100cf565b806313af4035146100d45780631da213f214610118578063564a565d14610153578063647846a5146101d657806369e15404146102205780637b751b9e1461023e575b600080fd5b610116600480360360208110156100ea57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610551565b005b6101516004803603604081101561012e57600080fd5b8101908080359060200190929190803560ff169060200190929190505050610658565b005b61017f6004803603602081101561016957600080fd5b81019080803590602001909291905050506108a9565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018260048111156101c157fe5b60ff1681526020019250505060405180910390f35b6101de6108fa565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610228610920565b6040518082815260200191505060405180910390f35b610246610926565b604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390f35b610363600480360360608110156102d857600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561031f57600080fd5b82018360208201111561033157600080fd5b8035906020019184600183028401116401000000008311171561035357600080fd5b909192939192939050505061095d565b005b6103916004803603602081101561037b57600080fd5b8101908080359060200190929190505050610963565b005b61039b610966565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61045e600480360360408110156103f357600080fd5b81019080803590602001909291908035906020019064010000000081111561041a57600080fd5b82018360208201111561042c57600080fd5b8035906020019184600183028401116401000000008311171561044e57600080fd5b909192939192939050505061098c565b6040518082815260200191505060405180910390f35b6104a06004803603602081101561048a57600080fd5b8101908080359060200190929190505050610b31565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390f35b6104f1610c77565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61053b610ca0565b6040518082815260200191505060405180910390f35b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610614576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552523a4e4f545f4f574e45520000000000000000000000000000000000000081525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461071b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552523a4e4f545f4f574e45520000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600481111561072857fe5b81600481111561073457fe5b1415801561075957506001600481111561074a57fe5b81600481111561075657fe5b14155b6107cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f4552523a4f5554434f4d455f4e4f545f41535349474e41424c4500000000000081525060200191505060405180910390fd5b6000600560008481526020019081526020016000209050600160048111156107ef57fe5b8160000160149054906101000a900460ff16600481111561080c57fe5b1461087f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552523a4e4f545f44495350555445440000000000000000000000000000000081525060200191505060405180910390fd5b818160000160146101000a81548160ff0219169083600481111561089f57fe5b0217905550505050565b60056020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060000160149054906101000a900460ff16905082565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60025481565b600080600030600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600254925092509250909192565b50505050565b50565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600354905060405180604001604052803373ffffffffffffffffffffffffffffffffffffffff168152602001600160048111156109c857fe5b8152506005600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548160ff02191690836004811115610a4957fe5b0217905550905050600360008154809291906001019190505550610ab43330600254600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ca6909392919063ffffffff16565b610b26576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552523a4445504f5349545f4641494c4544000000000000000000000000000081525060200191505060405180910390fd5b809150509392505050565b600080600060056000858152602001908152602001600020905060036004811115610b5857fe5b8160000160149054906101000a900460ff166004811115610b7557fe5b1415610bac578060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660039250925050610c72565b600480811115610bb857fe5b8160000160149054906101000a900460ff166004811115610bd557fe5b1415610c0c578060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660049250925050610c72565b60026004811115610c1957fe5b8160000160149054906101000a900460ff166004811115610c3657fe5b1415610c6d578060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660009250925050610c72565b600080fd5b915091565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60035481565b600060608573ffffffffffffffffffffffffffffffffffffffff166323b872dd905060e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050610dad8682610db8565b915050949350505050565b6000806040516020818551602087016000895af16000811115610dfe573d60008114610deb5760208114610df457610dfc565b60019350610dfc565b600183511493505b505b5050809150509291505056fea165627a7a72305820f2d223fcb3efcfc8d91b9122ffd4a2fa3bbdd3351cccee0c9b8eb3fd973ecf8f0029", "devdoc": { "methods": { "closeEvidencePeriod(uint256)": { diff --git a/packages/hardhat/deployments/rinkeby/Quest.json b/packages/hardhat/deployments/rinkeby/Quest.json index 328c2690..a70e822c 100644 --- a/packages/hardhat/deployments/rinkeby/Quest.json +++ b/packages/hardhat/deployments/rinkeby/Quest.json @@ -1,5 +1,5 @@ { - "address": "0xDeC387AdBF6a33837A239aCD4fA194a3C17eB5c4", + "address": "0x64aAd113a833AD737ab4901189cc2a1819Fe257B", "abi": [ { "inputs": [ @@ -264,19 +264,19 @@ "type": "function" } ], - "transactionHash": "0xcfc3f76632120a051b3160ec801f0e6de1c2b779e4186ad57dc85b2f5ea63f6b", + "transactionHash": "0xf1df5754a42687fc193638dceaf05fa09e4f72ad7e420e2429b986529b02796d", "receipt": { "to": null, "from": "0x91B0d67D3F47A30FBEeB159E67209Ad6cb2cE22E", - "contractAddress": "0xDeC387AdBF6a33837A239aCD4fA194a3C17eB5c4", - "transactionIndex": 44, + "contractAddress": "0x64aAd113a833AD737ab4901189cc2a1819Fe257B", + "transactionIndex": 0, "gasUsed": "1227190", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xed6eb237f48e1e282f94a8a8a6d6516622c069015b7b43eeb686b342ba0249d5", - "transactionHash": "0xcfc3f76632120a051b3160ec801f0e6de1c2b779e4186ad57dc85b2f5ea63f6b", + "blockHash": "0x4b23e25c18ba9579cf8aff6d900d9a6431203a214ec26c19455fda0f5b1cf276", + "transactionHash": "0xf1df5754a42687fc193638dceaf05fa09e4f72ad7e420e2429b986529b02796d", "logs": [], - "blockNumber": 10661174, - "cumulativeGasUsed": "6821173", + "blockNumber": 10784500, + "cumulativeGasUsed": "1227190", "status": 1, "byzantium": true }, @@ -291,10 +291,10 @@ "100000000000000000", "0xdf456B614fE9FF1C7c0B380330Da29C96d40FB02" ], - "solcInputHash": "f8bffd6aed615eac4146c28c6e33f4f9", - "metadata": "{\"compiler\":{\"version\":\"0.8.1+commit.df193b15\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_questTitle\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"_questDetailsRef\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_rewardToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_expireTime\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_aragonGovernAddress\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"_fundsRecoveryAddress\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"_depositToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_depositAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_questCreator\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"evidence\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"player\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"QuestClaimed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"aragonGovernAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_evidence\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"_player\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_claimAll\",\"type\":\"bool\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claims\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"evidence\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"player\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"expireTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fundsRecoveryAddress\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isDepositReleased\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"questCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"questDetailsRef\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"questTitle\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recoverFundsAndDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardToken\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Quest.sol\":\"Quest\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":20000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x24e0364e503a9bbde94c715d26573a76f14cd2a202d45f96f52134ab806b67b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0x61437cb513a887a1bbad006e7b1c8b414478427d33de47c5600af3c748f108da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) {\\n // Return data is optional\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc3d946432c0ddbb1f846a0d3985be71299df331b91d06732152117f62f0be2b5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x51b758a8815ecc9596c66c37d56b1d33883a444631a3f916b9fe65cb863ef7c4\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa2f576be637946f767aa56601c26d717f48a0aff44f82e46f13807eea1009a21\",\"license\":\"MIT\"},\"contracts/Quest.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\r\\npragma solidity ^0.8.1;\\r\\n\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\r\\nimport \\\"./libraries/Deposit.sol\\\";\\r\\nimport \\\"./libraries/Models.sol\\\";\\r\\nimport \\\"./QuestFactory.sol\\\";\\r\\n\\r\\ncontract Quest {\\r\\n using SafeMath for uint256;\\r\\n using SafeERC20 for IERC20;\\r\\n using DepositLib for Models.Deposit;\\r\\n\\r\\n address public questCreator;\\r\\n string public questTitle;\\r\\n bytes public questDetailsRef;\\r\\n IERC20 public rewardToken;\\r\\n uint256 public expireTime;\\r\\n address public aragonGovernAddress;\\r\\n address payable public fundsRecoveryAddress;\\r\\n Models.Claim[] public claims;\\r\\n Models.Deposit public deposit;\\r\\n bool public isDepositReleased;\\r\\n\\r\\n event QuestClaimed(bytes evidence, address player, uint256 amount);\\r\\n\\r\\n constructor(\\r\\n string memory _questTitle,\\r\\n bytes memory _questDetailsRef,\\r\\n IERC20 _rewardToken,\\r\\n uint256 _expireTime,\\r\\n address _aragonGovernAddress,\\r\\n address payable _fundsRecoveryAddress,\\r\\n IERC20 _depositToken,\\r\\n uint256 _depositAmount,\\r\\n address _questCreator\\r\\n ) {\\r\\n questTitle = _questTitle;\\r\\n questDetailsRef = _questDetailsRef;\\r\\n rewardToken = _rewardToken;\\r\\n expireTime = _expireTime;\\r\\n aragonGovernAddress = _aragonGovernAddress;\\r\\n fundsRecoveryAddress = _fundsRecoveryAddress;\\r\\n questCreator = _questCreator;\\r\\n deposit = Models.Deposit(_depositToken, _depositAmount);\\r\\n isDepositReleased = false;\\r\\n }\\r\\n\\r\\n /*\\r\\n * Release deposit to creator and send unused funds to fundsRecoveryAddress.\\r\\n * requires quests to have expired\\r\\n */\\r\\n function recoverFundsAndDeposit() external {\\r\\n require(block.timestamp > expireTime, \\\"ERROR: Not expired\\\");\\r\\n\\r\\n // Restore deposit if not already released\\r\\n if (!isDepositReleased) {\\r\\n deposit.releaseTo(questCreator);\\r\\n isDepositReleased = true;\\r\\n }\\r\\n\\r\\n rewardToken.safeTransfer(\\r\\n fundsRecoveryAddress,\\r\\n rewardToken.balanceOf(address(this))\\r\\n );\\r\\n }\\r\\n\\r\\n /*\\r\\n * Claim a quest reward.\\r\\n * @param _evidence Evidence of the claim.\\r\\n * @param _player Player address.\\r\\n * @param _amount Amount of the reward.\\r\\n * requires sender to be aragonGovernAddress\\r\\n * requires evidence to not be empty\\r\\n * requires claim amount to not exceed available deposit when same token\\r\\n * emit QuestClaimed\\r\\n */\\r\\n function claim(\\r\\n bytes memory _evidence,\\r\\n address _player,\\r\\n uint256 _amount,\\r\\n bool _claimAll\\r\\n ) external {\\r\\n require(msg.sender == aragonGovernAddress, \\\"ERROR: Sender not govern\\\");\\r\\n require(_evidence.length != 0, \\\"ERROR: No evidence\\\");\\r\\n uint256 balance = rewardToken.balanceOf(address(this));\\r\\n\\r\\n if (_claimAll) {\\r\\n // Claim all but let deposit if they are same token\\r\\n if (address(rewardToken) == address(deposit.token)) {\\r\\n (, uint256 result) = balance.trySub(deposit.amount);\\r\\n _amount = result;\\r\\n } else {\\r\\n _amount = balance;\\r\\n }\\r\\n }\\r\\n\\r\\n if (address(rewardToken) == address(deposit.token)) {\\r\\n (, uint256 result) = balance.trySub(_amount);\\r\\n require(\\r\\n result >= deposit.amount,\\r\\n \\\"ERROR: Should not exceed allowed bounty\\\"\\r\\n );\\r\\n }\\r\\n\\r\\n if (_amount > 0) {\\r\\n rewardToken.safeTransfer(_player, _amount);\\r\\n }\\r\\n\\r\\n claims.push(Models.Claim(_evidence, _player, _amount));\\r\\n\\r\\n emit QuestClaimed(_evidence, _player, _amount);\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x716b3fb1a3217a932100c374c16545fafc7782556fe33866a0a75257202d7d16\",\"license\":\"GPL-3.0\"},\"contracts/QuestFactory.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\r\\npragma solidity ^0.8.1;\\r\\n\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\r\\nimport \\\"./libraries/Deposit.sol\\\";\\r\\nimport \\\"./libraries/Models.sol\\\";\\r\\nimport \\\"./Quest.sol\\\";\\r\\n\\r\\ncontract QuestFactory is Ownable {\\r\\n using DepositLib for Models.Deposit;\\r\\n\\r\\n address public aragonGovernAddress;\\r\\n Models.Deposit public deposit;\\r\\n\\r\\n event QuestCreated(\\r\\n address questAddress,\\r\\n string questTitle,\\r\\n bytes questDetailsRef,\\r\\n address rewardTokenAddress,\\r\\n uint256 expireTime,\\r\\n address fundsRecoveryAddress,\\r\\n address depositToken,\\r\\n uint256 depositAmount,\\r\\n address creator\\r\\n );\\r\\n\\r\\n event DepositChanged(uint256 timestamp, address token, uint256 amount);\\r\\n\\r\\n constructor(\\r\\n address _aragonGovernAddress,\\r\\n IERC20 _depositToken,\\r\\n uint256 _depositAmount\\r\\n ) {\\r\\n aragonGovernAddress = _aragonGovernAddress;\\r\\n setDeposit(_depositToken, _depositAmount);\\r\\n }\\r\\n\\r\\n /*\\r\\n * @dev Set the deposit token and amount.\\r\\n * @param _depositToken The deposit token.\\r\\n * @param _depositAmount The deposit amount.\\r\\n * emit DepositChanged\\r\\n */\\r\\n function setDeposit(IERC20 token, uint256 amount) public onlyOwner {\\r\\n deposit = Models.Deposit(token, amount);\\r\\n emit DepositChanged(block.timestamp, address(token), amount);\\r\\n }\\r\\n\\r\\n /*\\r\\n * Collect deposit, deploy a new Quest with given info contract\\r\\n * and transfer deposit to new Quest.\\r\\n * @param _title Quest title.\\r\\n * @param _details Quest details.\\r\\n * @param _rewardTokenAddress Reward token address.\\r\\n * @param _expireTime Expire time.\\r\\n * @param _fundsRecoveryAddress Funds recovery address.\\r\\n * requires deposit allowance\\r\\n * returns Quest address.\\r\\n * emits QuestCreated\\r\\n */\\r\\n function createQuest(\\r\\n string memory _questTitle,\\r\\n bytes memory _questDetailsRef,\\r\\n IERC20 _rewardToken,\\r\\n uint256 _expireTime,\\r\\n address payable _fundsRecoveryAddress\\r\\n ) external returns (address) {\\r\\n Quest quest = new Quest(\\r\\n _questTitle,\\r\\n _questDetailsRef,\\r\\n _rewardToken,\\r\\n _expireTime,\\r\\n aragonGovernAddress,\\r\\n _fundsRecoveryAddress,\\r\\n deposit.token,\\r\\n deposit.amount,\\r\\n msg.sender\\r\\n );\\r\\n\\r\\n // Collect deposit from quest creator and send it to quest\\r\\n deposit.collectFrom(msg.sender, address(quest));\\r\\n\\r\\n emit QuestCreated(\\r\\n address(quest),\\r\\n _questTitle,\\r\\n _questDetailsRef,\\r\\n address(_rewardToken),\\r\\n _expireTime,\\r\\n _fundsRecoveryAddress,\\r\\n address(deposit.token),\\r\\n deposit.amount,\\r\\n msg.sender\\r\\n );\\r\\n\\r\\n return address(quest);\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0xa1eec15772f386236354750c76f9201b55984ef9296be30f83342d19e60b8279\",\"license\":\"GPL-3.0\"},\"contracts/libraries/Deposit.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\r\\n\\r\\npragma solidity ^0.8.1;\\r\\n\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\r\\nimport \\\"./Models.sol\\\";\\r\\n\\r\\nlibrary DepositLib {\\r\\n using SafeERC20 for IERC20;\\r\\n\\r\\n /*\\r\\n * Collect deposit from signer and send it to _to address.\\r\\n * @param _token The deposit token.\\r\\n * @param _amount The deposit amount.\\r\\n * @param _to The address where the deposit should be transfered.\\r\\n */\\r\\n function collectFrom(\\r\\n Models.Deposit memory _collateral,\\r\\n address _from,\\r\\n address _to\\r\\n ) internal {\\r\\n collectFrom(_collateral, _from);\\r\\n releaseTo(_collateral, _to);\\r\\n }\\r\\n\\r\\n /*\\r\\n * Collect deposit from signer\\r\\n * @param _token The deposit token.\\r\\n * @param _amount The deposit amount.\\r\\n */\\r\\n function collectFrom(Models.Deposit memory _collateral, address _from)\\r\\n internal\\r\\n {\\r\\n if (_collateral.amount > 0) {\\r\\n // Verify allowance\\r\\n uint256 allowance = _collateral.token.allowance(\\r\\n _from,\\r\\n address(this)\\r\\n );\\r\\n require(\\r\\n allowance >= _collateral.amount,\\r\\n \\\"ERROR : Deposit bad allowance\\\"\\r\\n );\\r\\n\\r\\n _collateral.token.safeTransferFrom(\\r\\n _from,\\r\\n address(this),\\r\\n _collateral.amount\\r\\n );\\r\\n }\\r\\n }\\r\\n\\r\\n function releaseTo(Models.Deposit memory _collateral, address _to)\\r\\n internal\\r\\n {\\r\\n if (_collateral.amount > 0) {\\r\\n _collateral.token.safeTransfer(_to, _collateral.amount);\\r\\n }\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x00419d7de8fe1cf0e8c06555f8c2929dede75db585aa6c9e8c7a2ff8c91f5051\",\"license\":\"GPL-3.0\"},\"contracts/libraries/Models.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\r\\npragma solidity ^0.8.1;\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\r\\n\\r\\nlibrary Models {\\r\\n struct Deposit {\\r\\n IERC20 token;\\r\\n uint256 amount;\\r\\n }\\r\\n struct Claim {\\r\\n bytes evidence;\\r\\n address player;\\r\\n uint256 amount;\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0xe986229d7b557584748437b549743509e0fe5e41fc02b2d468dbae860612be26\",\"license\":\"GPL-3.0\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b50604051620015813803806200158183398101604081905262000034916200027d565b8851620000499060019060208c0190620000ed565b5087516200005f9060029060208b0190620000ed565b50600380546001600160a01b03199081166001600160a01b03998a161790915560049690965560058054871695881695909517909455600680548616938716939093179092556000805485169386169390931790925560408051808201909152919093168082526020909101839052600880549092161790556009555050600a805460ff19169055620003bf565b828054620000fb906200036c565b90600052602060002090601f0160209004810192826200011f57600085556200016a565b82601f106200013a57805160ff19168380011785556200016a565b828001600101855582156200016a579182015b828111156200016a5782518255916020019190600101906200014d565b50620001789291506200017c565b5090565b5b808211156200017857600081556001016200017d565b60006001600160401b0380841115620001b057620001b0620003a9565b604051601f8501601f19908116603f01168101908282118183101715620001db57620001db620003a9565b81604052809350858152868686011115620001f557600080fd5b600092505b858310156200021a578285015160208483010152602083019250620001fa565b858311156200022d576000602087830101525b5050509392505050565b80516001600160a01b03811681146200024f57600080fd5b919050565b600082601f83011262000265578081fd5b620002768383516020850162000193565b9392505050565b60008060008060008060008060006101208a8c0312156200029c578485fd5b89516001600160401b0380821115620002b3578687fd5b818c0191508c601f830112620002c7578687fd5b620002d88d83516020850162000193565b9a5060208c0151915080821115620002ee578687fd5b50620002fd8c828d0162000254565b9850506200030e60408b0162000237565b965060608a015195506200032560808b0162000237565b94506200033560a08b0162000237565b93506200034560c08b0162000237565b925060e08a015191506200035d6101008b0162000237565b90509295985092959850929598565b6002810460018216806200038157607f821691505b60208210811415620003a357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6111b280620003cf6000396000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c8063b0a87ac111610081578063e0c234231161005b578063e0c2342314610186578063f294cf381461019b578063f7c618c1146101a3576100d4565b8063b0a87ac114610155578063b434151c1461015d578063d0e30db014610170576100d4565b80637ceae310116100b25780637ceae31014610116578063990cc4891461011e578063a888c2cd14610133576100d4565b8063310a1ee3146100d9578063579ca2c9146100f75780636c3a4cce14610101575b600080fd5b6100e16101ab565b6040516100ee91906110af565b60405180910390f35b6100ff6101b1565b005b610109610338565b6040516100ee9190610e1c565b610109610354565b610126610370565b6040516100ee9190610e63565b610146610141366004610d86565b610379565b6040516100ee93929190610e81565b610109610452565b6100ff61016b366004610c91565b61046e565b6101786107a2565b6040516100ee929190610e3d565b61018e6107c4565b6040516100ee9190610e6e565b61018e610852565b61010961085f565b60045481565b60045442116101f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610f76565b60405180910390fd5b600a5460ff16610267576000546040805180820190915260085473ffffffffffffffffffffffffffffffffffffffff9081168252600954602083015261023b921661087b565b600a80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b6006546003546040517f70a082310000000000000000000000000000000000000000000000000000000081526103369273ffffffffffffffffffffffffffffffffffffffff9081169216906370a08231906102c6903090600401610e1c565b60206040518083038186803b1580156102de57600080fd5b505afa1580156102f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103169190610d9e565b60035473ffffffffffffffffffffffffffffffffffffffff1691906108b4565b565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b600a5460ff1681565b6007818154811061038957600080fd5b90600052602060002090600302016000915090508060000180546103ac906110e8565b80601f01602080910402602001604051908101604052809291908181526020018280546103d8906110e8565b80156104255780601f106103fa57610100808354040283529160200191610425565b820191906000526020600020905b81548152906001019060200180831161040857829003601f168201915b505050506001830154600290930154919273ffffffffffffffffffffffffffffffffffffffff1691905083565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60055473ffffffffffffffffffffffffffffffffffffffff1633146104bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610fad565b83516104f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec9061101b565b6003546040517f70a0823100000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319061054e903090600401610e1c565b60206040518083038186803b15801561056657600080fd5b505afa15801561057a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059e9190610d9e565b905081156105eb5760085460035473ffffffffffffffffffffffffffffffffffffffff908116911614156105e7576009546000906105dd90839061095a565b94506105eb915050565b8092505b60085460035473ffffffffffffffffffffffffffffffffffffffff9081169116141561066157600061061d828561095a565b91505060086001015481101561065f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610ebc565b505b821561068b5760035461068b9073ffffffffffffffffffffffffffffffffffffffff1685856108b4565b6040805160608101825286815273ffffffffffffffffffffffffffffffffffffffff86166020808301919091529181018590526007805460018101825560009190915281518051929360039092027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68801926107099284920190610bad565b5060208201516001820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055604091820151600290910155517fa1c3b325aa2c115e4b244062eba2515bc5585ae5b41556be8fef399ae9fde11b9061079390879087908790610e81565b60405180910390a15050505050565b60085460095473ffffffffffffffffffffffffffffffffffffffff9091169082565b600280546107d1906110e8565b80601f01602080910402602001604051908101604052809291908181526020018280546107fd906110e8565b801561084a5780601f1061081f5761010080835404028352916020019161084a565b820191906000526020600020905b81548152906001019060200180831161082d57829003601f168201915b505050505081565b600180546107d1906110e8565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b6020820151156108b057602082015182516108b09173ffffffffffffffffffffffffffffffffffffffff9091169083906108b4565b5050565b6109558363a9059cbb60e01b84846040516024016108d3929190610e3d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610980565b505050565b6000808383111561097057506000905080610979565b50600190508183035b9250929050565b60006109e2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610a369092919063ffffffff16565b8051909150156109555780806020019051810190610a009190610c75565b610955576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90611052565b6060610a458484600085610a4f565b90505b9392505050565b606082471015610a8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610f19565b610a9485610b50565b610aca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610fe4565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610af39190610e00565b60006040518083038185875af1925050503d8060008114610b30576040519150601f19603f3d011682016040523d82523d6000602084013e610b35565b606091505b5091509150610b45828286610b5a565b979650505050505050565b803b15155b919050565b60608315610b69575081610a48565b825115610b795782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec9190610e6e565b828054610bb9906110e8565b90600052602060002090601f016020900481019282610bdb5760008555610c21565b82601f10610bf457805160ff1916838001178555610c21565b82800160010185558215610c21579182015b82811115610c21578251825591602001919060010190610c06565b50610c2d929150610c31565b5090565b5b80821115610c2d5760008155600101610c32565b803573ffffffffffffffffffffffffffffffffffffffff81168114610b5557600080fd5b8035610b558161116b565b600060208284031215610c86578081fd5b8151610a488161116b565b60008060008060808587031215610ca6578283fd5b843567ffffffffffffffff80821115610cbd578485fd5b818701915087601f830112610cd0578485fd5b813581811115610ce257610ce261113c565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610d2857610d2861113c565b816040528281528a6020848701011115610d40578788fd5b8260208601602083013787602084830101528098505050505050610d6660208601610c46565b925060408501359150610d7b60608601610c6a565b905092959194509250565b600060208284031215610d97578081fd5b5035919050565b600060208284031215610daf578081fd5b5051919050565b60008151808452610dce8160208601602086016110b8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251610e128184602087016110b8565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b600060208252610a486020830184610db6565b600060608252610e946060830186610db6565b73ffffffffffffffffffffffffffffffffffffffff9490941660208301525060400152919050565b60208082526027908201527f4552524f523a2053686f756c64206e6f742065786365656420616c6c6f77656460408201527f20626f756e747900000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b60208082526012908201527f4552524f523a204e6f7420657870697265640000000000000000000000000000604082015260600190565b60208082526018908201527f4552524f523a2053656e646572206e6f7420676f7665726e0000000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526012908201527f4552524f523a204e6f2065766964656e63650000000000000000000000000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b90815260200190565b60005b838110156110d35781810151838201526020016110bb565b838111156110e2576000848401525b50505050565b6002810460018216806110fc57607f821691505b60208210811415611136577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b801515811461117957600080fd5b5056fea264697066735822122038fcc5d59dbc4686e5d50c12aae2ea763a617d85c1a39ef711f3862ce9500b3a64736f6c63430008010033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100d45760003560e01c8063b0a87ac111610081578063e0c234231161005b578063e0c2342314610186578063f294cf381461019b578063f7c618c1146101a3576100d4565b8063b0a87ac114610155578063b434151c1461015d578063d0e30db014610170576100d4565b80637ceae310116100b25780637ceae31014610116578063990cc4891461011e578063a888c2cd14610133576100d4565b8063310a1ee3146100d9578063579ca2c9146100f75780636c3a4cce14610101575b600080fd5b6100e16101ab565b6040516100ee91906110af565b60405180910390f35b6100ff6101b1565b005b610109610338565b6040516100ee9190610e1c565b610109610354565b610126610370565b6040516100ee9190610e63565b610146610141366004610d86565b610379565b6040516100ee93929190610e81565b610109610452565b6100ff61016b366004610c91565b61046e565b6101786107a2565b6040516100ee929190610e3d565b61018e6107c4565b6040516100ee9190610e6e565b61018e610852565b61010961085f565b60045481565b60045442116101f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610f76565b60405180910390fd5b600a5460ff16610267576000546040805180820190915260085473ffffffffffffffffffffffffffffffffffffffff9081168252600954602083015261023b921661087b565b600a80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b6006546003546040517f70a082310000000000000000000000000000000000000000000000000000000081526103369273ffffffffffffffffffffffffffffffffffffffff9081169216906370a08231906102c6903090600401610e1c565b60206040518083038186803b1580156102de57600080fd5b505afa1580156102f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103169190610d9e565b60035473ffffffffffffffffffffffffffffffffffffffff1691906108b4565b565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b600a5460ff1681565b6007818154811061038957600080fd5b90600052602060002090600302016000915090508060000180546103ac906110e8565b80601f01602080910402602001604051908101604052809291908181526020018280546103d8906110e8565b80156104255780601f106103fa57610100808354040283529160200191610425565b820191906000526020600020905b81548152906001019060200180831161040857829003601f168201915b505050506001830154600290930154919273ffffffffffffffffffffffffffffffffffffffff1691905083565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60055473ffffffffffffffffffffffffffffffffffffffff1633146104bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610fad565b83516104f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec9061101b565b6003546040517f70a0823100000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319061054e903090600401610e1c565b60206040518083038186803b15801561056657600080fd5b505afa15801561057a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059e9190610d9e565b905081156105eb5760085460035473ffffffffffffffffffffffffffffffffffffffff908116911614156105e7576009546000906105dd90839061095a565b94506105eb915050565b8092505b60085460035473ffffffffffffffffffffffffffffffffffffffff9081169116141561066157600061061d828561095a565b91505060086001015481101561065f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610ebc565b505b821561068b5760035461068b9073ffffffffffffffffffffffffffffffffffffffff1685856108b4565b6040805160608101825286815273ffffffffffffffffffffffffffffffffffffffff86166020808301919091529181018590526007805460018101825560009190915281518051929360039092027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68801926107099284920190610bad565b5060208201516001820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055604091820151600290910155517fa1c3b325aa2c115e4b244062eba2515bc5585ae5b41556be8fef399ae9fde11b9061079390879087908790610e81565b60405180910390a15050505050565b60085460095473ffffffffffffffffffffffffffffffffffffffff9091169082565b600280546107d1906110e8565b80601f01602080910402602001604051908101604052809291908181526020018280546107fd906110e8565b801561084a5780601f1061081f5761010080835404028352916020019161084a565b820191906000526020600020905b81548152906001019060200180831161082d57829003601f168201915b505050505081565b600180546107d1906110e8565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b6020820151156108b057602082015182516108b09173ffffffffffffffffffffffffffffffffffffffff9091169083906108b4565b5050565b6109558363a9059cbb60e01b84846040516024016108d3929190610e3d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610980565b505050565b6000808383111561097057506000905080610979565b50600190508183035b9250929050565b60006109e2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610a369092919063ffffffff16565b8051909150156109555780806020019051810190610a009190610c75565b610955576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90611052565b6060610a458484600085610a4f565b90505b9392505050565b606082471015610a8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610f19565b610a9485610b50565b610aca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610fe4565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610af39190610e00565b60006040518083038185875af1925050503d8060008114610b30576040519150601f19603f3d011682016040523d82523d6000602084013e610b35565b606091505b5091509150610b45828286610b5a565b979650505050505050565b803b15155b919050565b60608315610b69575081610a48565b825115610b795782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec9190610e6e565b828054610bb9906110e8565b90600052602060002090601f016020900481019282610bdb5760008555610c21565b82601f10610bf457805160ff1916838001178555610c21565b82800160010185558215610c21579182015b82811115610c21578251825591602001919060010190610c06565b50610c2d929150610c31565b5090565b5b80821115610c2d5760008155600101610c32565b803573ffffffffffffffffffffffffffffffffffffffff81168114610b5557600080fd5b8035610b558161116b565b600060208284031215610c86578081fd5b8151610a488161116b565b60008060008060808587031215610ca6578283fd5b843567ffffffffffffffff80821115610cbd578485fd5b818701915087601f830112610cd0578485fd5b813581811115610ce257610ce261113c565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610d2857610d2861113c565b816040528281528a6020848701011115610d40578788fd5b8260208601602083013787602084830101528098505050505050610d6660208601610c46565b925060408501359150610d7b60608601610c6a565b905092959194509250565b600060208284031215610d97578081fd5b5035919050565b600060208284031215610daf578081fd5b5051919050565b60008151808452610dce8160208601602086016110b8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251610e128184602087016110b8565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b600060208252610a486020830184610db6565b600060608252610e946060830186610db6565b73ffffffffffffffffffffffffffffffffffffffff9490941660208301525060400152919050565b60208082526027908201527f4552524f523a2053686f756c64206e6f742065786365656420616c6c6f77656460408201527f20626f756e747900000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b60208082526012908201527f4552524f523a204e6f7420657870697265640000000000000000000000000000604082015260600190565b60208082526018908201527f4552524f523a2053656e646572206e6f7420676f7665726e0000000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526012908201527f4552524f523a204e6f2065766964656e63650000000000000000000000000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b90815260200190565b60005b838110156110d35781810151838201526020016110bb565b838111156110e2576000848401525b50505050565b6002810460018216806110fc57607f821691505b60208210811415611136577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b801515811461117957600080fd5b5056fea264697066735822122038fcc5d59dbc4686e5d50c12aae2ea763a617d85c1a39ef711f3862ce9500b3a64736f6c63430008010033", + "solcInputHash": "55762042aa62f69cb5859e68ffbc45e6", + "metadata": "{\"compiler\":{\"version\":\"0.8.1+commit.df193b15\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_questTitle\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"_questDetailsRef\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_rewardToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_expireTime\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_aragonGovernAddress\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"_fundsRecoveryAddress\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"_depositToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_depositAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_questCreator\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"evidence\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"player\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"QuestClaimed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"aragonGovernAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_evidence\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"_player\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_claimAll\",\"type\":\"bool\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claims\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"evidence\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"player\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"expireTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fundsRecoveryAddress\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isDepositReleased\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"questCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"questDetailsRef\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"questTitle\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recoverFundsAndDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardToken\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Quest.sol\":\"Quest\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":20000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x24e0364e503a9bbde94c715d26573a76f14cd2a202d45f96f52134ab806b67b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0x61437cb513a887a1bbad006e7b1c8b414478427d33de47c5600af3c748f108da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) {\\n // Return data is optional\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc3d946432c0ddbb1f846a0d3985be71299df331b91d06732152117f62f0be2b5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x51b758a8815ecc9596c66c37d56b1d33883a444631a3f916b9fe65cb863ef7c4\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa2f576be637946f767aa56601c26d717f48a0aff44f82e46f13807eea1009a21\",\"license\":\"MIT\"},\"contracts/Quest.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\r\\npragma solidity ^0.8.1;\\r\\n\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\r\\nimport \\\"./libraries/Deposit.sol\\\";\\r\\nimport \\\"./libraries/Models.sol\\\";\\r\\nimport \\\"./QuestFactory.sol\\\";\\r\\n\\r\\ncontract Quest {\\r\\n using SafeMath for uint256;\\r\\n using SafeERC20 for IERC20;\\r\\n using DepositLib for Models.Deposit;\\r\\n\\r\\n address public questCreator;\\r\\n string public questTitle;\\r\\n bytes public questDetailsRef;\\r\\n IERC20 public rewardToken;\\r\\n uint256 public expireTime;\\r\\n address public aragonGovernAddress;\\r\\n address payable public fundsRecoveryAddress;\\r\\n Models.Claim[] public claims;\\r\\n Models.Deposit public deposit;\\r\\n bool public isDepositReleased;\\r\\n\\r\\n event QuestClaimed(bytes evidence, address player, uint256 amount);\\r\\n\\r\\n constructor(\\r\\n string memory _questTitle,\\r\\n bytes memory _questDetailsRef,\\r\\n IERC20 _rewardToken,\\r\\n uint256 _expireTime,\\r\\n address _aragonGovernAddress,\\r\\n address payable _fundsRecoveryAddress,\\r\\n IERC20 _depositToken,\\r\\n uint256 _depositAmount,\\r\\n address _questCreator\\r\\n ) {\\r\\n questTitle = _questTitle;\\r\\n questDetailsRef = _questDetailsRef;\\r\\n rewardToken = _rewardToken;\\r\\n expireTime = _expireTime;\\r\\n aragonGovernAddress = _aragonGovernAddress;\\r\\n fundsRecoveryAddress = _fundsRecoveryAddress;\\r\\n questCreator = _questCreator;\\r\\n deposit = Models.Deposit(_depositToken, _depositAmount);\\r\\n isDepositReleased = false;\\r\\n }\\r\\n\\r\\n /*\\r\\n * Release deposit to creator and send unused funds to fundsRecoveryAddress.\\r\\n * requires quests to have expired\\r\\n */\\r\\n function recoverFundsAndDeposit() external {\\r\\n require(block.timestamp > expireTime, \\\"ERROR: Not expired\\\");\\r\\n\\r\\n // Restore deposit if not already released\\r\\n if (!isDepositReleased) {\\r\\n deposit.releaseTo(questCreator);\\r\\n isDepositReleased = true;\\r\\n }\\r\\n\\r\\n rewardToken.safeTransfer(\\r\\n fundsRecoveryAddress,\\r\\n rewardToken.balanceOf(address(this))\\r\\n );\\r\\n }\\r\\n\\r\\n /*\\r\\n * Claim a quest reward.\\r\\n * @param _evidence Evidence of the claim.\\r\\n * @param _player Player address.\\r\\n * @param _amount Amount of the reward.\\r\\n * requires sender to be aragonGovernAddress\\r\\n * requires evidence to not be empty\\r\\n * requires claim amount to not exceed available deposit when same token\\r\\n * emit QuestClaimed\\r\\n */\\r\\n function claim(\\r\\n bytes memory _evidence,\\r\\n address _player,\\r\\n uint256 _amount,\\r\\n bool _claimAll\\r\\n ) external {\\r\\n require(msg.sender == aragonGovernAddress, \\\"ERROR: Sender not govern\\\");\\r\\n require(_evidence.length != 0, \\\"ERROR: No evidence\\\");\\r\\n uint256 balance = rewardToken.balanceOf(address(this));\\r\\n\\r\\n if (_claimAll) {\\r\\n // Claim all but let deposit if they are same token\\r\\n if (address(rewardToken) == address(deposit.token)) {\\r\\n (, uint256 result) = balance.trySub(deposit.amount);\\r\\n _amount = result;\\r\\n } else {\\r\\n _amount = balance;\\r\\n }\\r\\n }\\r\\n\\r\\n if (address(rewardToken) == address(deposit.token)) {\\r\\n (, uint256 result) = balance.trySub(_amount);\\r\\n require(\\r\\n result >= deposit.amount,\\r\\n \\\"ERROR: Should not exceed allowed bounty\\\"\\r\\n );\\r\\n }\\r\\n\\r\\n if (_amount > 0) {\\r\\n rewardToken.safeTransfer(_player, _amount);\\r\\n }\\r\\n\\r\\n claims.push(Models.Claim(_evidence, _player, _amount));\\r\\n\\r\\n emit QuestClaimed(_evidence, _player, _amount);\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x716b3fb1a3217a932100c374c16545fafc7782556fe33866a0a75257202d7d16\",\"license\":\"GPL-3.0\"},\"contracts/QuestFactory.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\r\\npragma solidity ^0.8.1;\\r\\n\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\r\\nimport \\\"./libraries/Deposit.sol\\\";\\r\\nimport \\\"./libraries/Models.sol\\\";\\r\\nimport \\\"./Quest.sol\\\";\\r\\n\\r\\ncontract QuestFactory is Ownable {\\r\\n using DepositLib for Models.Deposit;\\r\\n\\r\\n address public aragonGovernAddress;\\r\\n Models.Deposit public deposit;\\r\\n\\r\\n event QuestCreated(\\r\\n address questAddress,\\r\\n string questTitle,\\r\\n bytes questDetailsRef,\\r\\n address rewardTokenAddress,\\r\\n uint256 expireTime,\\r\\n address fundsRecoveryAddress,\\r\\n address depositToken,\\r\\n uint256 depositAmount,\\r\\n address creator\\r\\n );\\r\\n\\r\\n event DepositChanged(uint256 timestamp, address token, uint256 amount);\\r\\n\\r\\n constructor(\\r\\n address _aragonGovernAddress,\\r\\n IERC20 _depositToken,\\r\\n uint256 _depositAmount,\\r\\n address _initialOwner\\r\\n ) {\\r\\n aragonGovernAddress = _aragonGovernAddress;\\r\\n setDeposit(_depositToken, _depositAmount);\\r\\n if (_initialOwner != msg.sender) {\\r\\n transferOwnership(_initialOwner);\\r\\n }\\r\\n }\\r\\n\\r\\n /*\\r\\n * @dev Set the deposit token and amount.\\r\\n * @param _depositToken The deposit token.\\r\\n * @param _depositAmount The deposit amount.\\r\\n * emit DepositChanged\\r\\n */\\r\\n function setDeposit(IERC20 token, uint256 amount) public onlyOwner {\\r\\n deposit = Models.Deposit(token, amount);\\r\\n emit DepositChanged(block.timestamp, address(token), amount);\\r\\n }\\r\\n\\r\\n /*\\r\\n * Collect deposit, deploy a new Quest with given info contract\\r\\n * and transfer deposit to new Quest.\\r\\n * @param _title Quest title.\\r\\n * @param _details Quest details.\\r\\n * @param _rewardTokenAddress Reward token address.\\r\\n * @param _expireTime Expire time.\\r\\n * @param _fundsRecoveryAddress Funds recovery address.\\r\\n * requires deposit allowance\\r\\n * returns Quest address.\\r\\n * emits QuestCreated\\r\\n */\\r\\n function createQuest(\\r\\n string memory _questTitle,\\r\\n bytes memory _questDetailsRef,\\r\\n IERC20 _rewardToken,\\r\\n uint256 _expireTime,\\r\\n address payable _fundsRecoveryAddress\\r\\n ) external returns (address) {\\r\\n Quest quest = new Quest(\\r\\n _questTitle,\\r\\n _questDetailsRef,\\r\\n _rewardToken,\\r\\n _expireTime,\\r\\n aragonGovernAddress,\\r\\n _fundsRecoveryAddress,\\r\\n deposit.token,\\r\\n deposit.amount,\\r\\n msg.sender\\r\\n );\\r\\n\\r\\n // Collect deposit from quest creator and send it to quest\\r\\n deposit.collectFrom(msg.sender, address(quest));\\r\\n\\r\\n emit QuestCreated(\\r\\n address(quest),\\r\\n _questTitle,\\r\\n _questDetailsRef,\\r\\n address(_rewardToken),\\r\\n _expireTime,\\r\\n _fundsRecoveryAddress,\\r\\n address(deposit.token),\\r\\n deposit.amount,\\r\\n msg.sender\\r\\n );\\r\\n\\r\\n return address(quest);\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x05a05ddc2bf42d75c2379cd539cdac2702a3a2cfafad5b159e76909bc28d608a\",\"license\":\"GPL-3.0\"},\"contracts/libraries/Deposit.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\r\\n\\r\\npragma solidity ^0.8.1;\\r\\n\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\r\\nimport \\\"./Models.sol\\\";\\r\\n\\r\\nlibrary DepositLib {\\r\\n using SafeERC20 for IERC20;\\r\\n\\r\\n /*\\r\\n * Collect deposit from signer and send it to _to address.\\r\\n * @param _token The deposit token.\\r\\n * @param _amount The deposit amount.\\r\\n * @param _to The address where the deposit should be transfered.\\r\\n */\\r\\n function collectFrom(\\r\\n Models.Deposit memory _collateral,\\r\\n address _from,\\r\\n address _to\\r\\n ) internal {\\r\\n collectFrom(_collateral, _from);\\r\\n releaseTo(_collateral, _to);\\r\\n }\\r\\n\\r\\n /*\\r\\n * Collect deposit from signer\\r\\n * @param _token The deposit token.\\r\\n * @param _amount The deposit amount.\\r\\n */\\r\\n function collectFrom(Models.Deposit memory _collateral, address _from)\\r\\n internal\\r\\n {\\r\\n if (_collateral.amount > 0) {\\r\\n // Verify allowance\\r\\n uint256 allowance = _collateral.token.allowance(\\r\\n _from,\\r\\n address(this)\\r\\n );\\r\\n require(\\r\\n allowance >= _collateral.amount,\\r\\n \\\"ERROR : Deposit bad allowance\\\"\\r\\n );\\r\\n\\r\\n _collateral.token.safeTransferFrom(\\r\\n _from,\\r\\n address(this),\\r\\n _collateral.amount\\r\\n );\\r\\n }\\r\\n }\\r\\n\\r\\n function releaseTo(Models.Deposit memory _collateral, address _to)\\r\\n internal\\r\\n {\\r\\n if (_collateral.amount > 0) {\\r\\n _collateral.token.safeTransfer(_to, _collateral.amount);\\r\\n }\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x00419d7de8fe1cf0e8c06555f8c2929dede75db585aa6c9e8c7a2ff8c91f5051\",\"license\":\"GPL-3.0\"},\"contracts/libraries/Models.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\r\\npragma solidity ^0.8.1;\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\r\\n\\r\\nlibrary Models {\\r\\n struct Deposit {\\r\\n IERC20 token;\\r\\n uint256 amount;\\r\\n }\\r\\n struct Claim {\\r\\n bytes evidence;\\r\\n address player;\\r\\n uint256 amount;\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0xe986229d7b557584748437b549743509e0fe5e41fc02b2d468dbae860612be26\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620015813803806200158183398101604081905262000034916200027d565b8851620000499060019060208c0190620000ed565b5087516200005f9060029060208b0190620000ed565b50600380546001600160a01b03199081166001600160a01b03998a161790915560049690965560058054871695881695909517909455600680548616938716939093179092556000805485169386169390931790925560408051808201909152919093168082526020909101839052600880549092161790556009555050600a805460ff19169055620003bf565b828054620000fb906200036c565b90600052602060002090601f0160209004810192826200011f57600085556200016a565b82601f106200013a57805160ff19168380011785556200016a565b828001600101855582156200016a579182015b828111156200016a5782518255916020019190600101906200014d565b50620001789291506200017c565b5090565b5b808211156200017857600081556001016200017d565b60006001600160401b0380841115620001b057620001b0620003a9565b604051601f8501601f19908116603f01168101908282118183101715620001db57620001db620003a9565b81604052809350858152868686011115620001f557600080fd5b600092505b858310156200021a578285015160208483010152602083019250620001fa565b858311156200022d576000602087830101525b5050509392505050565b80516001600160a01b03811681146200024f57600080fd5b919050565b600082601f83011262000265578081fd5b620002768383516020850162000193565b9392505050565b60008060008060008060008060006101208a8c0312156200029c578485fd5b89516001600160401b0380821115620002b3578687fd5b818c0191508c601f830112620002c7578687fd5b620002d88d83516020850162000193565b9a5060208c0151915080821115620002ee578687fd5b50620002fd8c828d0162000254565b9850506200030e60408b0162000237565b965060608a015195506200032560808b0162000237565b94506200033560a08b0162000237565b93506200034560c08b0162000237565b925060e08a015191506200035d6101008b0162000237565b90509295985092959850929598565b6002810460018216806200038157607f821691505b60208210811415620003a357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6111b280620003cf6000396000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c8063b0a87ac111610081578063e0c234231161005b578063e0c2342314610186578063f294cf381461019b578063f7c618c1146101a3576100d4565b8063b0a87ac114610155578063b434151c1461015d578063d0e30db014610170576100d4565b80637ceae310116100b25780637ceae31014610116578063990cc4891461011e578063a888c2cd14610133576100d4565b8063310a1ee3146100d9578063579ca2c9146100f75780636c3a4cce14610101575b600080fd5b6100e16101ab565b6040516100ee91906110af565b60405180910390f35b6100ff6101b1565b005b610109610338565b6040516100ee9190610e1c565b610109610354565b610126610370565b6040516100ee9190610e63565b610146610141366004610d86565b610379565b6040516100ee93929190610e81565b610109610452565b6100ff61016b366004610c91565b61046e565b6101786107a2565b6040516100ee929190610e3d565b61018e6107c4565b6040516100ee9190610e6e565b61018e610852565b61010961085f565b60045481565b60045442116101f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610f76565b60405180910390fd5b600a5460ff16610267576000546040805180820190915260085473ffffffffffffffffffffffffffffffffffffffff9081168252600954602083015261023b921661087b565b600a80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b6006546003546040517f70a082310000000000000000000000000000000000000000000000000000000081526103369273ffffffffffffffffffffffffffffffffffffffff9081169216906370a08231906102c6903090600401610e1c565b60206040518083038186803b1580156102de57600080fd5b505afa1580156102f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103169190610d9e565b60035473ffffffffffffffffffffffffffffffffffffffff1691906108b4565b565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b600a5460ff1681565b6007818154811061038957600080fd5b90600052602060002090600302016000915090508060000180546103ac906110e8565b80601f01602080910402602001604051908101604052809291908181526020018280546103d8906110e8565b80156104255780601f106103fa57610100808354040283529160200191610425565b820191906000526020600020905b81548152906001019060200180831161040857829003601f168201915b505050506001830154600290930154919273ffffffffffffffffffffffffffffffffffffffff1691905083565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60055473ffffffffffffffffffffffffffffffffffffffff1633146104bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610fad565b83516104f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec9061101b565b6003546040517f70a0823100000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319061054e903090600401610e1c565b60206040518083038186803b15801561056657600080fd5b505afa15801561057a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059e9190610d9e565b905081156105eb5760085460035473ffffffffffffffffffffffffffffffffffffffff908116911614156105e7576009546000906105dd90839061095a565b94506105eb915050565b8092505b60085460035473ffffffffffffffffffffffffffffffffffffffff9081169116141561066157600061061d828561095a565b91505060086001015481101561065f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610ebc565b505b821561068b5760035461068b9073ffffffffffffffffffffffffffffffffffffffff1685856108b4565b6040805160608101825286815273ffffffffffffffffffffffffffffffffffffffff86166020808301919091529181018590526007805460018101825560009190915281518051929360039092027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68801926107099284920190610bad565b5060208201516001820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055604091820151600290910155517fa1c3b325aa2c115e4b244062eba2515bc5585ae5b41556be8fef399ae9fde11b9061079390879087908790610e81565b60405180910390a15050505050565b60085460095473ffffffffffffffffffffffffffffffffffffffff9091169082565b600280546107d1906110e8565b80601f01602080910402602001604051908101604052809291908181526020018280546107fd906110e8565b801561084a5780601f1061081f5761010080835404028352916020019161084a565b820191906000526020600020905b81548152906001019060200180831161082d57829003601f168201915b505050505081565b600180546107d1906110e8565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b6020820151156108b057602082015182516108b09173ffffffffffffffffffffffffffffffffffffffff9091169083906108b4565b5050565b6109558363a9059cbb60e01b84846040516024016108d3929190610e3d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610980565b505050565b6000808383111561097057506000905080610979565b50600190508183035b9250929050565b60006109e2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610a369092919063ffffffff16565b8051909150156109555780806020019051810190610a009190610c75565b610955576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90611052565b6060610a458484600085610a4f565b90505b9392505050565b606082471015610a8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610f19565b610a9485610b50565b610aca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610fe4565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610af39190610e00565b60006040518083038185875af1925050503d8060008114610b30576040519150601f19603f3d011682016040523d82523d6000602084013e610b35565b606091505b5091509150610b45828286610b5a565b979650505050505050565b803b15155b919050565b60608315610b69575081610a48565b825115610b795782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec9190610e6e565b828054610bb9906110e8565b90600052602060002090601f016020900481019282610bdb5760008555610c21565b82601f10610bf457805160ff1916838001178555610c21565b82800160010185558215610c21579182015b82811115610c21578251825591602001919060010190610c06565b50610c2d929150610c31565b5090565b5b80821115610c2d5760008155600101610c32565b803573ffffffffffffffffffffffffffffffffffffffff81168114610b5557600080fd5b8035610b558161116b565b600060208284031215610c86578081fd5b8151610a488161116b565b60008060008060808587031215610ca6578283fd5b843567ffffffffffffffff80821115610cbd578485fd5b818701915087601f830112610cd0578485fd5b813581811115610ce257610ce261113c565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610d2857610d2861113c565b816040528281528a6020848701011115610d40578788fd5b8260208601602083013787602084830101528098505050505050610d6660208601610c46565b925060408501359150610d7b60608601610c6a565b905092959194509250565b600060208284031215610d97578081fd5b5035919050565b600060208284031215610daf578081fd5b5051919050565b60008151808452610dce8160208601602086016110b8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251610e128184602087016110b8565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b600060208252610a486020830184610db6565b600060608252610e946060830186610db6565b73ffffffffffffffffffffffffffffffffffffffff9490941660208301525060400152919050565b60208082526027908201527f4552524f523a2053686f756c64206e6f742065786365656420616c6c6f77656460408201527f20626f756e747900000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b60208082526012908201527f4552524f523a204e6f7420657870697265640000000000000000000000000000604082015260600190565b60208082526018908201527f4552524f523a2053656e646572206e6f7420676f7665726e0000000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526012908201527f4552524f523a204e6f2065766964656e63650000000000000000000000000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b90815260200190565b60005b838110156110d35781810151838201526020016110bb565b838111156110e2576000848401525b50505050565b6002810460018216806110fc57607f821691505b60208210811415611136577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b801515811461117957600080fd5b5056fea2646970667358221220ed56507b634ebeaae309509ea680f90e736b7873ed34daf4d911bd38dce7becb64736f6c63430008010033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100d45760003560e01c8063b0a87ac111610081578063e0c234231161005b578063e0c2342314610186578063f294cf381461019b578063f7c618c1146101a3576100d4565b8063b0a87ac114610155578063b434151c1461015d578063d0e30db014610170576100d4565b80637ceae310116100b25780637ceae31014610116578063990cc4891461011e578063a888c2cd14610133576100d4565b8063310a1ee3146100d9578063579ca2c9146100f75780636c3a4cce14610101575b600080fd5b6100e16101ab565b6040516100ee91906110af565b60405180910390f35b6100ff6101b1565b005b610109610338565b6040516100ee9190610e1c565b610109610354565b610126610370565b6040516100ee9190610e63565b610146610141366004610d86565b610379565b6040516100ee93929190610e81565b610109610452565b6100ff61016b366004610c91565b61046e565b6101786107a2565b6040516100ee929190610e3d565b61018e6107c4565b6040516100ee9190610e6e565b61018e610852565b61010961085f565b60045481565b60045442116101f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610f76565b60405180910390fd5b600a5460ff16610267576000546040805180820190915260085473ffffffffffffffffffffffffffffffffffffffff9081168252600954602083015261023b921661087b565b600a80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b6006546003546040517f70a082310000000000000000000000000000000000000000000000000000000081526103369273ffffffffffffffffffffffffffffffffffffffff9081169216906370a08231906102c6903090600401610e1c565b60206040518083038186803b1580156102de57600080fd5b505afa1580156102f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103169190610d9e565b60035473ffffffffffffffffffffffffffffffffffffffff1691906108b4565b565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b600a5460ff1681565b6007818154811061038957600080fd5b90600052602060002090600302016000915090508060000180546103ac906110e8565b80601f01602080910402602001604051908101604052809291908181526020018280546103d8906110e8565b80156104255780601f106103fa57610100808354040283529160200191610425565b820191906000526020600020905b81548152906001019060200180831161040857829003601f168201915b505050506001830154600290930154919273ffffffffffffffffffffffffffffffffffffffff1691905083565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60055473ffffffffffffffffffffffffffffffffffffffff1633146104bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610fad565b83516104f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec9061101b565b6003546040517f70a0823100000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319061054e903090600401610e1c565b60206040518083038186803b15801561056657600080fd5b505afa15801561057a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059e9190610d9e565b905081156105eb5760085460035473ffffffffffffffffffffffffffffffffffffffff908116911614156105e7576009546000906105dd90839061095a565b94506105eb915050565b8092505b60085460035473ffffffffffffffffffffffffffffffffffffffff9081169116141561066157600061061d828561095a565b91505060086001015481101561065f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610ebc565b505b821561068b5760035461068b9073ffffffffffffffffffffffffffffffffffffffff1685856108b4565b6040805160608101825286815273ffffffffffffffffffffffffffffffffffffffff86166020808301919091529181018590526007805460018101825560009190915281518051929360039092027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68801926107099284920190610bad565b5060208201516001820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055604091820151600290910155517fa1c3b325aa2c115e4b244062eba2515bc5585ae5b41556be8fef399ae9fde11b9061079390879087908790610e81565b60405180910390a15050505050565b60085460095473ffffffffffffffffffffffffffffffffffffffff9091169082565b600280546107d1906110e8565b80601f01602080910402602001604051908101604052809291908181526020018280546107fd906110e8565b801561084a5780601f1061081f5761010080835404028352916020019161084a565b820191906000526020600020905b81548152906001019060200180831161082d57829003601f168201915b505050505081565b600180546107d1906110e8565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b6020820151156108b057602082015182516108b09173ffffffffffffffffffffffffffffffffffffffff9091169083906108b4565b5050565b6109558363a9059cbb60e01b84846040516024016108d3929190610e3d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610980565b505050565b6000808383111561097057506000905080610979565b50600190508183035b9250929050565b60006109e2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610a369092919063ffffffff16565b8051909150156109555780806020019051810190610a009190610c75565b610955576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90611052565b6060610a458484600085610a4f565b90505b9392505050565b606082471015610a8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610f19565b610a9485610b50565b610aca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610fe4565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610af39190610e00565b60006040518083038185875af1925050503d8060008114610b30576040519150601f19603f3d011682016040523d82523d6000602084013e610b35565b606091505b5091509150610b45828286610b5a565b979650505050505050565b803b15155b919050565b60608315610b69575081610a48565b825115610b795782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec9190610e6e565b828054610bb9906110e8565b90600052602060002090601f016020900481019282610bdb5760008555610c21565b82601f10610bf457805160ff1916838001178555610c21565b82800160010185558215610c21579182015b82811115610c21578251825591602001919060010190610c06565b50610c2d929150610c31565b5090565b5b80821115610c2d5760008155600101610c32565b803573ffffffffffffffffffffffffffffffffffffffff81168114610b5557600080fd5b8035610b558161116b565b600060208284031215610c86578081fd5b8151610a488161116b565b60008060008060808587031215610ca6578283fd5b843567ffffffffffffffff80821115610cbd578485fd5b818701915087601f830112610cd0578485fd5b813581811115610ce257610ce261113c565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610d2857610d2861113c565b816040528281528a6020848701011115610d40578788fd5b8260208601602083013787602084830101528098505050505050610d6660208601610c46565b925060408501359150610d7b60608601610c6a565b905092959194509250565b600060208284031215610d97578081fd5b5035919050565b600060208284031215610daf578081fd5b5051919050565b60008151808452610dce8160208601602086016110b8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251610e128184602087016110b8565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b600060208252610a486020830184610db6565b600060608252610e946060830186610db6565b73ffffffffffffffffffffffffffffffffffffffff9490941660208301525060400152919050565b60208082526027908201527f4552524f523a2053686f756c64206e6f742065786365656420616c6c6f77656460408201527f20626f756e747900000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b60208082526012908201527f4552524f523a204e6f7420657870697265640000000000000000000000000000604082015260600190565b60208082526018908201527f4552524f523a2053656e646572206e6f7420676f7665726e0000000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526012908201527f4552524f523a204e6f2065766964656e63650000000000000000000000000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b90815260200190565b60005b838110156110d35781810151838201526020016110bb565b838111156110e2576000848401525b50505050565b6002810460018216806110fc57607f821691505b60208210811415611136577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b801515811461117957600080fd5b5056fea2646970667358221220ed56507b634ebeaae309509ea680f90e736b7873ed34daf4d911bd38dce7becb64736f6c63430008010033", "devdoc": { "kind": "dev", "methods": {}, @@ -369,7 +369,7 @@ "label": "claims", "offset": 0, "slot": "7", - "type": "t_array(t_struct(Claim)2184_storage)dyn_storage" + "type": "t_array(t_struct(Claim)2196_storage)dyn_storage" }, { "astId": 1649, @@ -377,7 +377,7 @@ "label": "deposit", "offset": 0, "slot": "8", - "type": "t_struct(Deposit)2177_storage" + "type": "t_struct(Deposit)2189_storage" }, { "astId": 1651, @@ -399,8 +399,8 @@ "label": "address payable", "numberOfBytes": "20" }, - "t_array(t_struct(Claim)2184_storage)dyn_storage": { - "base": "t_struct(Claim)2184_storage", + "t_array(t_struct(Claim)2196_storage)dyn_storage": { + "base": "t_struct(Claim)2196_storage", "encoding": "dynamic_array", "label": "struct Models.Claim[]", "numberOfBytes": "32" @@ -425,12 +425,12 @@ "label": "string", "numberOfBytes": "32" }, - "t_struct(Claim)2184_storage": { + "t_struct(Claim)2196_storage": { "encoding": "inplace", "label": "struct Models.Claim", "members": [ { - "astId": 2179, + "astId": 2191, "contract": "contracts/Quest.sol:Quest", "label": "evidence", "offset": 0, @@ -438,7 +438,7 @@ "type": "t_bytes_storage" }, { - "astId": 2181, + "astId": 2193, "contract": "contracts/Quest.sol:Quest", "label": "player", "offset": 0, @@ -446,7 +446,7 @@ "type": "t_address" }, { - "astId": 2183, + "astId": 2195, "contract": "contracts/Quest.sol:Quest", "label": "amount", "offset": 0, @@ -456,12 +456,12 @@ ], "numberOfBytes": "96" }, - "t_struct(Deposit)2177_storage": { + "t_struct(Deposit)2189_storage": { "encoding": "inplace", "label": "struct Models.Deposit", "members": [ { - "astId": 2174, + "astId": 2186, "contract": "contracts/Quest.sol:Quest", "label": "token", "offset": 0, @@ -469,7 +469,7 @@ "type": "t_contract(IERC20)728" }, { - "astId": 2176, + "astId": 2188, "contract": "contracts/Quest.sol:Quest", "label": "amount", "offset": 0, diff --git a/packages/hardhat/deployments/rinkeby/solcInputs/044e188cba8b22f5f0aeccf79c92fee5.json b/packages/hardhat/deployments/rinkeby/solcInputs/044e188cba8b22f5f0aeccf79c92fee5.json new file mode 100644 index 00000000..232559a8 --- /dev/null +++ b/packages/hardhat/deployments/rinkeby/solcInputs/044e188cba8b22f5f0aeccf79c92fee5.json @@ -0,0 +1,35 @@ +{ + "language": "Solidity", + "sources": { + "contracts/mocks/OwnableCelesteMock.sol": { + "content": "/**\r\n *Submitted for verification at Etherscan.io on 2022-01-07\r\n */\r\n\r\n// Brought from https://github.com/aragon/aragonOS/blob/v4.3.0/contracts/lib/token/ERC20.sol\r\n// Adapted to use pragma ^0.5.8 and satisfy our linter rules\r\n\r\npragma solidity ^0.5.8;\r\n\r\n/**\r\n * @title ERC20 interface\r\n * @dev see https://github.com/ethereum/EIPs/issues/20\r\n */\r\ncontract GovernERC20 {\r\n function totalSupply() public view returns (uint256);\r\n\r\n function balanceOf(address _who) public view returns (uint256);\r\n\r\n function allowance(address _owner, address _spender)\r\n public\r\n view\r\n returns (uint256);\r\n\r\n function transfer(address _to, uint256 _value) public returns (bool);\r\n\r\n function approve(address _spender, uint256 _value) public returns (bool);\r\n\r\n function transferFrom(\r\n address _from,\r\n address _to,\r\n uint256 _value\r\n ) public returns (bool);\r\n\r\n event Transfer(address indexed from, address indexed to, uint256 value);\r\n\r\n event Approval(\r\n address indexed owner,\r\n address indexed spender,\r\n uint256 value\r\n );\r\n}\r\n\r\n// File: contracts/arbitration/IArbitrator.sol\r\n\r\npragma solidity ^0.5.8;\r\n\r\ninterface IArbitrator {\r\n /**\r\n * @dev Create a dispute over the Arbitrable sender with a number of possible rulings\r\n * @param _possibleRulings Number of possible rulings allowed for the dispute\r\n * @param _metadata Optional metadata that can be used to provide additional information on the dispute to be created\r\n * @return Dispute identification number\r\n */\r\n function createDispute(uint256 _possibleRulings, bytes calldata _metadata)\r\n external\r\n returns (uint256);\r\n\r\n /**\r\n * @dev Submit evidence for a dispute\r\n * @param _disputeId Id of the dispute in the Protocol\r\n * @param _submitter Address of the account submitting the evidence\r\n * @param _evidence Data submitted for the evidence related to the dispute\r\n */\r\n function submitEvidence(\r\n uint256 _disputeId,\r\n address _submitter,\r\n bytes calldata _evidence\r\n ) external;\r\n\r\n /**\r\n * @dev Close the evidence period of a dispute\r\n * @param _disputeId Identification number of the dispute to close its evidence submitting period\r\n */\r\n function closeEvidencePeriod(uint256 _disputeId) external;\r\n\r\n /**\r\n * @notice Rule dispute #`_disputeId` if ready\r\n * @param _disputeId Identification number of the dispute to be ruled\r\n * @return subject Arbitrable instance associated to the dispute\r\n * @return ruling Ruling number computed for the given dispute\r\n */\r\n function rule(uint256 _disputeId)\r\n external\r\n returns (address subject, uint256 ruling);\r\n\r\n /**\r\n * @dev Tell the dispute fees information to create a dispute\r\n * @return recipient Address where the corresponding dispute fees must be transferred to\r\n * @return feeToken ERC20 token used for the fees\r\n * @return feeAmount Total amount of fees that must be allowed to the recipient\r\n */\r\n function getDisputeFees()\r\n external\r\n view\r\n returns (\r\n address recipient,\r\n GovernERC20 feeToken,\r\n uint256 feeAmount\r\n );\r\n}\r\n\r\n// File: contracts/lib/os/SafeERC20.sol\r\n\r\n// Brought from https://github.com/aragon/aragonOS/blob/v4.3.0/contracts/common/SafeERC20.sol\r\n// Adapted to use pragma ^0.5.8 and satisfy our linter rules\r\n\r\npragma solidity ^0.5.8;\r\n\r\nlibrary SafeGovernERC20 {\r\n // Before 0.5, solidity has a mismatch between `address.transfer()` and `token.transfer()`:\r\n // https://github.com/ethereum/solidity/issues/3544\r\n bytes4 private constant TRANSFER_SELECTOR = 0xa9059cbb;\r\n\r\n /**\r\n * @dev Same as a standards-compliant ERC20.transfer() that never reverts (returns false).\r\n * Note that this makes an external call to the token.\r\n */\r\n function safeTransfer(\r\n GovernERC20 _token,\r\n address _to,\r\n uint256 _amount\r\n ) internal returns (bool) {\r\n bytes memory transferCallData = abi.encodeWithSelector(\r\n TRANSFER_SELECTOR,\r\n _to,\r\n _amount\r\n );\r\n return invokeAndCheckSuccess(address(_token), transferCallData);\r\n }\r\n\r\n /**\r\n * @dev Same as a standards-compliant ERC20.transferFrom() that never reverts (returns false).\r\n * Note that this makes an external call to the token.\r\n */\r\n function safeTransferFrom(\r\n GovernERC20 _token,\r\n address _from,\r\n address _to,\r\n uint256 _amount\r\n ) internal returns (bool) {\r\n bytes memory transferFromCallData = abi.encodeWithSelector(\r\n _token.transferFrom.selector,\r\n _from,\r\n _to,\r\n _amount\r\n );\r\n return invokeAndCheckSuccess(address(_token), transferFromCallData);\r\n }\r\n\r\n /**\r\n * @dev Same as a standards-compliant ERC20.approve() that never reverts (returns false).\r\n * Note that this makes an external call to the token.\r\n */\r\n function safeApprove(\r\n GovernERC20 _token,\r\n address _spender,\r\n uint256 _amount\r\n ) internal returns (bool) {\r\n bytes memory approveCallData = abi.encodeWithSelector(\r\n _token.approve.selector,\r\n _spender,\r\n _amount\r\n );\r\n return invokeAndCheckSuccess(address(_token), approveCallData);\r\n }\r\n\r\n function invokeAndCheckSuccess(address _addr, bytes memory _calldata)\r\n private\r\n returns (bool)\r\n {\r\n bool ret;\r\n assembly {\r\n let ptr := mload(0x40) // free memory pointer\r\n\r\n let success := call(\r\n gas, // forward all gas\r\n _addr, // address\r\n 0, // no value\r\n add(_calldata, 0x20), // calldata start\r\n mload(_calldata), // calldata length\r\n ptr, // write output over free memory\r\n 0x20 // uint256 return\r\n )\r\n\r\n if gt(success, 0) {\r\n // Check number of bytes returned from last function call\r\n switch returndatasize\r\n // No bytes returned: assume success\r\n case 0 {\r\n ret := 1\r\n }\r\n // 32 bytes returned: check if non-zero\r\n case 0x20 {\r\n // Only return success if returned data was true\r\n // Already have output in ptr\r\n ret := eq(mload(ptr), 1)\r\n }\r\n // Not sure what was returned: don't mark as success\r\n default {\r\n\r\n }\r\n }\r\n }\r\n return ret;\r\n }\r\n}\r\n\r\n// File: contracts/ownable-celeste/OwnableCeleste.sol\r\n\r\npragma solidity ^0.5.8;\r\n\r\ncontract OwnableCeleste is IArbitrator {\r\n using SafeGovernERC20 for GovernERC20;\r\n\r\n // Note that Aragon Court treats the possible outcomes as arbitrary numbers, leaving the Arbitrable (us) to define how to understand them.\r\n // Some outcomes [0, 1, and 2] are reserved by Aragon Court: \"missing\", \"leaked\", and \"refused\", respectively.\r\n // This Arbitrable introduces the concept of the challenger/submitter (a binary outcome) as 3/4.\r\n // Note that Aragon Court emits the lowest outcome in the event of a tie, and so for us, we prefer the challenger.\r\n uint256 private constant DISPUTES_NOT_RULED = 0;\r\n uint256 private constant DISPUTES_RULING_CHALLENGER = 3;\r\n uint256 private constant DISPUTES_RULING_SUBMITTER = 4;\r\n\r\n enum State {\r\n NOT_DISPUTED,\r\n DISPUTED,\r\n DISPUTES_NOT_RULED,\r\n DISPUTES_RULING_CHALLENGER,\r\n DISPUTES_RULING_SUBMITTER\r\n }\r\n\r\n struct Dispute {\r\n address subject;\r\n State state;\r\n }\r\n\r\n GovernERC20 public feeToken;\r\n uint256 public feeAmount;\r\n uint256 public currentId;\r\n address public owner;\r\n mapping(uint256 => Dispute) public disputes;\r\n\r\n modifier onlyOwner() {\r\n require(msg.sender == owner, \"ERR:NOT_OWNER\");\r\n _;\r\n }\r\n\r\n constructor(GovernERC20 _feeToken, uint256 _feeAmount) public {\r\n owner = msg.sender;\r\n feeToken = _feeToken;\r\n feeAmount = _feeAmount;\r\n }\r\n\r\n function setOwner(address _owner) public onlyOwner {\r\n owner = _owner;\r\n }\r\n\r\n /**\r\n * @dev Create a dispute over the Arbitrable sender with a number of possible rulings\r\n * @param _possibleRulings Number of possible rulings allowed for the dispute\r\n * @param _metadata Optional metadata that can be used to provide additional information on the dispute to be created\r\n * @return Dispute identification number\r\n */\r\n function createDispute(uint256 _possibleRulings, bytes calldata _metadata)\r\n external\r\n returns (uint256)\r\n {\r\n uint256 disputeId = currentId;\r\n disputes[disputeId] = Dispute(msg.sender, State.DISPUTED);\r\n currentId++;\r\n\r\n require(\r\n feeToken.safeTransferFrom(msg.sender, address(this), feeAmount),\r\n \"ERR:DEPOSIT_FAILED\"\r\n );\r\n return disputeId;\r\n }\r\n\r\n function decideDispute(uint256 _disputeId, State _state)\r\n external\r\n onlyOwner\r\n {\r\n require(\r\n _state != State.NOT_DISPUTED && _state != State.DISPUTED,\r\n \"ERR:OUTCOME_NOT_ASSIGNABLE\"\r\n );\r\n\r\n Dispute storage dispute = disputes[_disputeId];\r\n require(dispute.state == State.DISPUTED, \"ERR:NOT_DISPUTED\");\r\n\r\n dispute.state = _state;\r\n }\r\n\r\n /**\r\n * @dev Submit evidence for a dispute\r\n * @param _disputeId Id of the dispute in the Protocol\r\n * @param _submitter Address of the account submitting the evidence\r\n * @param _evidence Data submitted for the evidence related to the dispute\r\n */\r\n function submitEvidence(\r\n uint256 _disputeId,\r\n address _submitter,\r\n bytes calldata _evidence\r\n ) external {}\r\n\r\n /**\r\n * @dev Close the evidence period of a dispute\r\n * @param _disputeId Identification number of the dispute to close its evidence submitting period\r\n */\r\n function closeEvidencePeriod(uint256 _disputeId) external {}\r\n\r\n /**\r\n * @notice Rule dispute #`_disputeId` if ready\r\n * @param _disputeId Identification number of the dispute to be ruled\r\n * @return subject Arbitrable instance associated to the dispute\r\n * @return ruling Ruling number computed for the given dispute\r\n */\r\n function rule(uint256 _disputeId)\r\n external\r\n returns (address subject, uint256 ruling)\r\n {\r\n Dispute storage dispute = disputes[_disputeId];\r\n\r\n if (dispute.state == State.DISPUTES_RULING_CHALLENGER) {\r\n return (dispute.subject, DISPUTES_RULING_CHALLENGER);\r\n } else if (dispute.state == State.DISPUTES_RULING_SUBMITTER) {\r\n return (dispute.subject, DISPUTES_RULING_SUBMITTER);\r\n } else if (dispute.state == State.DISPUTES_NOT_RULED) {\r\n return (dispute.subject, DISPUTES_NOT_RULED);\r\n } else {\r\n revert();\r\n }\r\n }\r\n\r\n /**\r\n * @dev Tell the dispute fees information to create a dispute\r\n * @return recipient Address where the corresponding dispute fees must be transferred to\r\n * @return feeToken ERC20 token used for the fees\r\n * @return feeAmount Total amount of fees that must be allowed to the recipient\r\n */\r\n function getDisputeFees()\r\n external\r\n view\r\n returns (\r\n address,\r\n GovernERC20,\r\n uint256\r\n )\r\n {\r\n return (address(this), feeToken, feeAmount);\r\n }\r\n}\r\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/packages/hardhat/deployments/rinkeby/solcInputs/52e40fdf2587c460925fa519b999822a.json b/packages/hardhat/deployments/rinkeby/solcInputs/52e40fdf2587c460925fa519b999822a.json new file mode 100644 index 00000000..5ac22871 --- /dev/null +++ b/packages/hardhat/deployments/rinkeby/solcInputs/52e40fdf2587c460925fa519b999822a.json @@ -0,0 +1,35 @@ +{ + "language": "Solidity", + "sources": { + "contracts/mocks/OwnableCelesteMock.sol": { + "content": "/**\r\n *Submitted for verification at Etherscan.io on 2022-01-07\r\n */\r\n\r\n// Brought from https://github.com/aragon/aragonOS/blob/v4.3.0/contracts/lib/token/ERC20.sol\r\n// Adapted to use pragma ^0.5.8 and satisfy our linter rules\r\n\r\npragma solidity ^0.5.8;\r\n\r\n/**\r\n * @title ERC20 interface\r\n * @dev see https://github.com/ethereum/EIPs/issues/20\r\n */\r\ncontract GovernERC20 {\r\n function totalSupply() public view returns (uint256);\r\n\r\n function balanceOf(address _who) public view returns (uint256);\r\n\r\n function allowance(address _owner, address _spender)\r\n public\r\n view\r\n returns (uint256);\r\n\r\n function transfer(address _to, uint256 _value) public returns (bool);\r\n\r\n function approve(address _spender, uint256 _value) public returns (bool);\r\n\r\n function transferFrom(\r\n address _from,\r\n address _to,\r\n uint256 _value\r\n ) public returns (bool);\r\n\r\n event Transfer(address indexed from, address indexed to, uint256 value);\r\n\r\n event Approval(\r\n address indexed owner,\r\n address indexed spender,\r\n uint256 value\r\n );\r\n}\r\n\r\n// File: contracts/arbitration/IArbitrator.sol\r\n\r\npragma solidity ^0.5.8;\r\n\r\ninterface IArbitrator {\r\n /**\r\n * @dev Create a dispute over the Arbitrable sender with a number of possible rulings\r\n * @param _possibleRulings Number of possible rulings allowed for the dispute\r\n * @param _metadata Optional metadata that can be used to provide additional information on the dispute to be created\r\n * @return Dispute identification number\r\n */\r\n function createDispute(uint256 _possibleRulings, bytes calldata _metadata)\r\n external\r\n returns (uint256);\r\n\r\n /**\r\n * @dev Submit evidence for a dispute\r\n * @param _disputeId Id of the dispute in the Protocol\r\n * @param _submitter Address of the account submitting the evidence\r\n * @param _evidence Data submitted for the evidence related to the dispute\r\n */\r\n function submitEvidence(\r\n uint256 _disputeId,\r\n address _submitter,\r\n bytes calldata _evidence\r\n ) external;\r\n\r\n /**\r\n * @dev Close the evidence period of a dispute\r\n * @param _disputeId Identification number of the dispute to close its evidence submitting period\r\n */\r\n function closeEvidencePeriod(uint256 _disputeId) external;\r\n\r\n /**\r\n * @notice Rule dispute #`_disputeId` if ready\r\n * @param _disputeId Identification number of the dispute to be ruled\r\n * @return subject Arbitrable instance associated to the dispute\r\n * @return ruling Ruling number computed for the given dispute\r\n */\r\n function rule(uint256 _disputeId)\r\n external\r\n returns (address subject, uint256 ruling);\r\n\r\n /**\r\n * @dev Tell the dispute fees information to create a dispute\r\n * @return recipient Address where the corresponding dispute fees must be transferred to\r\n * @return feeToken ERC20 token used for the fees\r\n * @return feeAmount Total amount of fees that must be allowed to the recipient\r\n */\r\n function getDisputeFees()\r\n external\r\n view\r\n returns (\r\n address recipient,\r\n GovernERC20 feeToken,\r\n uint256 feeAmount\r\n );\r\n}\r\n\r\n// File: contracts/lib/os/SafeERC20.sol\r\n\r\n// Brought from https://github.com/aragon/aragonOS/blob/v4.3.0/contracts/common/SafeERC20.sol\r\n// Adapted to use pragma ^0.5.8 and satisfy our linter rules\r\n\r\npragma solidity ^0.5.8;\r\n\r\nlibrary SafeGovernERC20 {\r\n // Before 0.5, solidity has a mismatch between `address.transfer()` and `token.transfer()`:\r\n // https://github.com/ethereum/solidity/issues/3544\r\n bytes4 private constant TRANSFER_SELECTOR = 0xa9059cbb;\r\n\r\n /**\r\n * @dev Same as a standards-compliant ERC20.transfer() that never reverts (returns false).\r\n * Note that this makes an external call to the token.\r\n */\r\n function safeTransfer(\r\n GovernERC20 _token,\r\n address _to,\r\n uint256 _amount\r\n ) internal returns (bool) {\r\n bytes memory transferCallData = abi.encodeWithSelector(\r\n TRANSFER_SELECTOR,\r\n _to,\r\n _amount\r\n );\r\n return invokeAndCheckSuccess(address(_token), transferCallData);\r\n }\r\n\r\n /**\r\n * @dev Same as a standards-compliant ERC20.transferFrom() that never reverts (returns false).\r\n * Note that this makes an external call to the token.\r\n */\r\n function safeTransferFrom(\r\n GovernERC20 _token,\r\n address _from,\r\n address _to,\r\n uint256 _amount\r\n ) internal returns (bool) {\r\n bytes memory transferFromCallData = abi.encodeWithSelector(\r\n _token.transferFrom.selector,\r\n _from,\r\n _to,\r\n _amount\r\n );\r\n return invokeAndCheckSuccess(address(_token), transferFromCallData);\r\n }\r\n\r\n /**\r\n * @dev Same as a standards-compliant ERC20.approve() that never reverts (returns false).\r\n * Note that this makes an external call to the token.\r\n */\r\n function safeApprove(\r\n GovernERC20 _token,\r\n address _spender,\r\n uint256 _amount\r\n ) internal returns (bool) {\r\n bytes memory approveCallData = abi.encodeWithSelector(\r\n _token.approve.selector,\r\n _spender,\r\n _amount\r\n );\r\n return invokeAndCheckSuccess(address(_token), approveCallData);\r\n }\r\n\r\n function invokeAndCheckSuccess(address _addr, bytes memory _calldata)\r\n private\r\n returns (bool)\r\n {\r\n bool ret;\r\n assembly {\r\n let ptr := mload(0x40) // free memory pointer\r\n\r\n let success := call(\r\n gas, // forward all gas\r\n _addr, // address\r\n 0, // no value\r\n add(_calldata, 0x20), // calldata start\r\n mload(_calldata), // calldata length\r\n ptr, // write output over free memory\r\n 0x20 // uint256 return\r\n )\r\n\r\n if gt(success, 0) {\r\n // Check number of bytes returned from last function call\r\n switch returndatasize\r\n // No bytes returned: assume success\r\n case 0 {\r\n ret := 1\r\n }\r\n // 32 bytes returned: check if non-zero\r\n case 0x20 {\r\n // Only return success if returned data was true\r\n // Already have output in ptr\r\n ret := eq(mload(ptr), 1)\r\n }\r\n // Not sure what was returned: don't mark as success\r\n default {\r\n\r\n }\r\n }\r\n }\r\n return ret;\r\n }\r\n}\r\n\r\n// File: contracts/ownable-celeste/OwnableCeleste.sol\r\n\r\npragma solidity ^0.5.8;\r\n\r\ncontract OwnableCeleste is IArbitrator {\r\n using SafeGovernERC20 for GovernERC20;\r\n\r\n // Note that Aragon Court treats the possible outcomes as arbitrary numbers, leaving the Arbitrable (us) to define how to understand them.\r\n // Some outcomes [0, 1, and 2] are reserved by Aragon Court: \"missing\", \"leaked\", and \"refused\", respectively.\r\n // This Arbitrable introduces the concept of the challenger/submitter (a binary outcome) as 3/4.\r\n // Note that Aragon Court emits the lowest outcome in the event of a tie, and so for us, we prefer the challenger.\r\n uint256 private constant DISPUTES_NOT_RULED = 0;\r\n uint256 private constant DISPUTES_RULING_CHALLENGER = 3;\r\n uint256 private constant DISPUTES_RULING_SUBMITTER = 4;\r\n\r\n enum State {\r\n NOT_DISPUTED,\r\n DISPUTED,\r\n DISPUTES_NOT_RULED,\r\n DISPUTES_RULING_CHALLENGER,\r\n DISPUTES_RULING_SUBMITTER\r\n }\r\n\r\n struct Dispute {\r\n address subject;\r\n State state;\r\n }\r\n\r\n GovernERC20 public feeToken;\r\n uint256 public feeAmount;\r\n uint256 public currentId;\r\n address public owner;\r\n mapping(uint256 => Dispute) public disputes;\r\n address disputeManager;\r\n\r\n modifier onlyOwner() {\r\n require(msg.sender == owner, \"ERR:NOT_OWNER\");\r\n _;\r\n }\r\n\r\n constructor(GovernERC20 _feeToken, uint256 _feeAmount) public {\r\n owner = msg.sender;\r\n feeToken = _feeToken;\r\n feeAmount = _feeAmount;\r\n disputeManager = address(new DisputeManager(address(this)));\r\n }\r\n\r\n function setOwner(address _owner) public onlyOwner {\r\n owner = _owner;\r\n }\r\n\r\n /**\r\n * @dev Create a dispute over the Arbitrable sender with a number of possible rulings\r\n * @param _possibleRulings Number of possible rulings allowed for the dispute\r\n * @param _metadata Optional metadata that can be used to provide additional information on the dispute to be created\r\n * @return Dispute identification number\r\n */\r\n function createDispute(uint256 _possibleRulings, bytes calldata _metadata)\r\n external\r\n returns (uint256)\r\n {\r\n uint256 disputeId = currentId;\r\n disputes[disputeId] = Dispute(msg.sender, State.DISPUTED);\r\n currentId++;\r\n\r\n require(\r\n feeToken.safeTransferFrom(msg.sender, address(this), feeAmount),\r\n \"ERR:DEPOSIT_FAILED\"\r\n );\r\n return disputeId;\r\n }\r\n\r\n function decideDispute(uint256 _disputeId, State _state)\r\n external\r\n onlyOwner\r\n {\r\n require(\r\n _state != State.NOT_DISPUTED && _state != State.DISPUTED,\r\n \"ERR:OUTCOME_NOT_ASSIGNABLE\"\r\n );\r\n\r\n Dispute storage dispute = disputes[_disputeId];\r\n require(dispute.state == State.DISPUTED, \"ERR:NOT_DISPUTED\");\r\n\r\n dispute.state = _state;\r\n }\r\n\r\n /**\r\n * @dev Submit evidence for a dispute\r\n * @param _disputeId Id of the dispute in the Protocol\r\n * @param _submitter Address of the account submitting the evidence\r\n * @param _evidence Data submitted for the evidence related to the dispute\r\n */\r\n function submitEvidence(\r\n uint256 _disputeId,\r\n address _submitter,\r\n bytes calldata _evidence\r\n ) external {}\r\n\r\n /**\r\n * @dev Close the evidence period of a dispute\r\n * @param _disputeId Identification number of the dispute to close its evidence submitting period\r\n */\r\n function closeEvidencePeriod(uint256 _disputeId) external {}\r\n\r\n /**\r\n * @notice Rule dispute #`_disputeId` if ready\r\n * @param _disputeId Identification number of the dispute to be ruled\r\n * @return subject Arbitrable instance associated to the dispute\r\n * @return ruling Ruling number computed for the given dispute\r\n */\r\n function rule(uint256 _disputeId)\r\n external\r\n returns (address subject, uint256 ruling)\r\n {\r\n Dispute storage dispute = disputes[_disputeId];\r\n\r\n if (dispute.state == State.DISPUTES_RULING_CHALLENGER) {\r\n return (dispute.subject, DISPUTES_RULING_CHALLENGER);\r\n } else if (dispute.state == State.DISPUTES_RULING_SUBMITTER) {\r\n return (dispute.subject, DISPUTES_RULING_SUBMITTER);\r\n } else if (dispute.state == State.DISPUTES_NOT_RULED) {\r\n return (dispute.subject, DISPUTES_NOT_RULED);\r\n } else {\r\n revert();\r\n }\r\n }\r\n\r\n /**\r\n * @dev Tell the dispute fees information to create a dispute\r\n * @return recipient Address where the corresponding dispute fees must be transferred to\r\n * @return feeToken ERC20 token used for the fees\r\n * @return feeAmount Total amount of fees that must be allowed to the recipient\r\n */\r\n function getDisputeFees()\r\n external\r\n view\r\n returns (\r\n address,\r\n GovernERC20,\r\n uint256\r\n )\r\n {\r\n return (address(this), feeToken, feeAmount);\r\n }\r\n}\r\n\r\ncontract DisputeManager {\r\n using SafeGovernERC20 for GovernERC20;\r\n\r\n OwnableCeleste celeste;\r\n\r\n constructor(address mockCelesteAddress) public {\r\n celeste = OwnableCeleste(mockCelesteAddress);\r\n }\r\n\r\n function getDisputeFees() external view returns (GovernERC20, uint256) {\r\n (address celeste, GovernERC20 feeToken, uint256 feeAmount) = celeste\r\n .getDisputeFees();\r\n return (feeToken, feeAmount);\r\n }\r\n\r\n function getDispute(uint256 _disputeId)\r\n external\r\n view\r\n returns (\r\n address subject,\r\n uint8 possibleRulings,\r\n OwnableCeleste.State state,\r\n uint8 finalRuling,\r\n uint256 lastRoundId,\r\n uint64 createTermId\r\n )\r\n {\r\n (address subject, OwnableCeleste.State state) = celeste.disputes(\r\n _disputeId\r\n );\r\n return (subject, 0, state, 0, 0, 0);\r\n }\r\n}\r\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/packages/hardhat/deployments/rinkeby/solcInputs/c3f2afeb451f4539dc32f09e1b433c35.json b/packages/hardhat/deployments/rinkeby/solcInputs/c3f2afeb451f4539dc32f09e1b433c35.json new file mode 100644 index 00000000..12ac3e41 --- /dev/null +++ b/packages/hardhat/deployments/rinkeby/solcInputs/c3f2afeb451f4539dc32f09e1b433c35.json @@ -0,0 +1,35 @@ +{ + "language": "Solidity", + "sources": { + "contracts/mocks/OwnableCelesteMock.sol": { + "content": "/**\r\n *Submitted for verification at Etherscan.io on 2022-01-07\r\n */\r\n\r\n// Brought from https://github.com/aragon/aragonOS/blob/v4.3.0/contracts/lib/token/ERC20.sol\r\n// Adapted to use pragma ^0.5.8 and satisfy our linter rules\r\n\r\npragma solidity ^0.5.8;\r\n\r\n/**\r\n * @title ERC20 interface\r\n * @dev see https://github.com/ethereum/EIPs/issues/20\r\n */\r\ncontract GovernERC20 {\r\n function totalSupply() public view returns (uint256);\r\n\r\n function balanceOf(address _who) public view returns (uint256);\r\n\r\n function allowance(address _owner, address _spender)\r\n public\r\n view\r\n returns (uint256);\r\n\r\n function transfer(address _to, uint256 _value) public returns (bool);\r\n\r\n function approve(address _spender, uint256 _value) public returns (bool);\r\n\r\n function transferFrom(\r\n address _from,\r\n address _to,\r\n uint256 _value\r\n ) public returns (bool);\r\n\r\n event Transfer(address indexed from, address indexed to, uint256 value);\r\n\r\n event Approval(\r\n address indexed owner,\r\n address indexed spender,\r\n uint256 value\r\n );\r\n}\r\n\r\n// File: contracts/arbitration/IArbitrator.sol\r\n\r\npragma solidity ^0.5.8;\r\n\r\ninterface IArbitrator {\r\n /**\r\n * @dev Create a dispute over the Arbitrable sender with a number of possible rulings\r\n * @param _possibleRulings Number of possible rulings allowed for the dispute\r\n * @param _metadata Optional metadata that can be used to provide additional information on the dispute to be created\r\n * @return Dispute identification number\r\n */\r\n function createDispute(uint256 _possibleRulings, bytes calldata _metadata)\r\n external\r\n returns (uint256);\r\n\r\n /**\r\n * @dev Submit evidence for a dispute\r\n * @param _disputeId Id of the dispute in the Protocol\r\n * @param _submitter Address of the account submitting the evidence\r\n * @param _evidence Data submitted for the evidence related to the dispute\r\n */\r\n function submitEvidence(\r\n uint256 _disputeId,\r\n address _submitter,\r\n bytes calldata _evidence\r\n ) external;\r\n\r\n /**\r\n * @dev Close the evidence period of a dispute\r\n * @param _disputeId Identification number of the dispute to close its evidence submitting period\r\n */\r\n function closeEvidencePeriod(uint256 _disputeId) external;\r\n\r\n /**\r\n * @notice Rule dispute #`_disputeId` if ready\r\n * @param _disputeId Identification number of the dispute to be ruled\r\n * @return subject Arbitrable instance associated to the dispute\r\n * @return ruling Ruling number computed for the given dispute\r\n */\r\n function rule(uint256 _disputeId)\r\n external\r\n returns (address subject, uint256 ruling);\r\n\r\n /**\r\n * @dev Tell the dispute fees information to create a dispute\r\n * @return recipient Address where the corresponding dispute fees must be transferred to\r\n * @return feeToken ERC20 token used for the fees\r\n * @return feeAmount Total amount of fees that must be allowed to the recipient\r\n */\r\n function getDisputeFees()\r\n external\r\n view\r\n returns (\r\n address recipient,\r\n GovernERC20 feeToken,\r\n uint256 feeAmount\r\n );\r\n}\r\n\r\n// File: contracts/lib/os/SafeERC20.sol\r\n\r\n// Brought from https://github.com/aragon/aragonOS/blob/v4.3.0/contracts/common/SafeERC20.sol\r\n// Adapted to use pragma ^0.5.8 and satisfy our linter rules\r\n\r\npragma solidity ^0.5.8;\r\n\r\nlibrary SafeGovernERC20 {\r\n // Before 0.5, solidity has a mismatch between `address.transfer()` and `token.transfer()`:\r\n // https://github.com/ethereum/solidity/issues/3544\r\n bytes4 private constant TRANSFER_SELECTOR = 0xa9059cbb;\r\n\r\n /**\r\n * @dev Same as a standards-compliant ERC20.transfer() that never reverts (returns false).\r\n * Note that this makes an external call to the token.\r\n */\r\n function safeTransfer(\r\n GovernERC20 _token,\r\n address _to,\r\n uint256 _amount\r\n ) internal returns (bool) {\r\n bytes memory transferCallData = abi.encodeWithSelector(\r\n TRANSFER_SELECTOR,\r\n _to,\r\n _amount\r\n );\r\n return invokeAndCheckSuccess(address(_token), transferCallData);\r\n }\r\n\r\n /**\r\n * @dev Same as a standards-compliant ERC20.transferFrom() that never reverts (returns false).\r\n * Note that this makes an external call to the token.\r\n */\r\n function safeTransferFrom(\r\n GovernERC20 _token,\r\n address _from,\r\n address _to,\r\n uint256 _amount\r\n ) internal returns (bool) {\r\n bytes memory transferFromCallData = abi.encodeWithSelector(\r\n _token.transferFrom.selector,\r\n _from,\r\n _to,\r\n _amount\r\n );\r\n return invokeAndCheckSuccess(address(_token), transferFromCallData);\r\n }\r\n\r\n /**\r\n * @dev Same as a standards-compliant ERC20.approve() that never reverts (returns false).\r\n * Note that this makes an external call to the token.\r\n */\r\n function safeApprove(\r\n GovernERC20 _token,\r\n address _spender,\r\n uint256 _amount\r\n ) internal returns (bool) {\r\n bytes memory approveCallData = abi.encodeWithSelector(\r\n _token.approve.selector,\r\n _spender,\r\n _amount\r\n );\r\n return invokeAndCheckSuccess(address(_token), approveCallData);\r\n }\r\n\r\n function invokeAndCheckSuccess(address _addr, bytes memory _calldata)\r\n private\r\n returns (bool)\r\n {\r\n bool ret;\r\n assembly {\r\n let ptr := mload(0x40) // free memory pointer\r\n\r\n let success := call(\r\n gas, // forward all gas\r\n _addr, // address\r\n 0, // no value\r\n add(_calldata, 0x20), // calldata start\r\n mload(_calldata), // calldata length\r\n ptr, // write output over free memory\r\n 0x20 // uint256 return\r\n )\r\n\r\n if gt(success, 0) {\r\n // Check number of bytes returned from last function call\r\n switch returndatasize\r\n // No bytes returned: assume success\r\n case 0 {\r\n ret := 1\r\n }\r\n // 32 bytes returned: check if non-zero\r\n case 0x20 {\r\n // Only return success if returned data was true\r\n // Already have output in ptr\r\n ret := eq(mload(ptr), 1)\r\n }\r\n // Not sure what was returned: don't mark as success\r\n default {\r\n\r\n }\r\n }\r\n }\r\n return ret;\r\n }\r\n}\r\n\r\n// File: contracts/ownable-celeste/OwnableCeleste.sol\r\n\r\npragma solidity ^0.5.8;\r\n\r\ncontract OwnableCeleste is IArbitrator {\r\n using SafeGovernERC20 for GovernERC20;\r\n\r\n // Note that Aragon Court treats the possible outcomes as arbitrary numbers, leaving the Arbitrable (us) to define how to understand them.\r\n // Some outcomes [0, 1, and 2] are reserved by Aragon Court: \"missing\", \"leaked\", and \"refused\", respectively.\r\n // This Arbitrable introduces the concept of the challenger/submitter (a binary outcome) as 3/4.\r\n // Note that Aragon Court emits the lowest outcome in the event of a tie, and so for us, we prefer the challenger.\r\n uint256 private constant DISPUTES_NOT_RULED = 0;\r\n uint256 private constant DISPUTES_RULING_CHALLENGER = 3;\r\n uint256 private constant DISPUTES_RULING_SUBMITTER = 4;\r\n\r\n enum State {\r\n NOT_DISPUTED,\r\n DISPUTED,\r\n DISPUTES_NOT_RULED,\r\n DISPUTES_RULING_CHALLENGER,\r\n DISPUTES_RULING_SUBMITTER\r\n }\r\n\r\n struct Dispute {\r\n address subject;\r\n State state;\r\n }\r\n\r\n GovernERC20 public feeToken;\r\n uint256 public feeAmount;\r\n uint256 public currentId;\r\n address public owner;\r\n mapping(uint256 => Dispute) public disputes;\r\n address disputeManager;\r\n\r\n modifier onlyOwner() {\r\n require(msg.sender == owner, \"ERR:NOT_OWNER\");\r\n _;\r\n }\r\n\r\n constructor(GovernERC20 _feeToken, uint256 _feeAmount) public {\r\n owner = msg.sender;\r\n feeToken = _feeToken;\r\n feeAmount = _feeAmount;\r\n disputeManager = address(new DisputeManager(address(this)));\r\n }\r\n\r\n function setOwner(address _owner) public onlyOwner {\r\n owner = _owner;\r\n }\r\n\r\n /**\r\n * @dev Create a dispute over the Arbitrable sender with a number of possible rulings\r\n * @param _possibleRulings Number of possible rulings allowed for the dispute\r\n * @param _metadata Optional metadata that can be used to provide additional information on the dispute to be created\r\n * @return Dispute identification number\r\n */\r\n function createDispute(uint256 _possibleRulings, bytes calldata _metadata)\r\n external\r\n returns (uint256)\r\n {\r\n uint256 disputeId = currentId;\r\n disputes[disputeId] = Dispute(msg.sender, State.DISPUTED);\r\n currentId++;\r\n\r\n require(\r\n feeToken.safeTransferFrom(msg.sender, address(this), feeAmount),\r\n \"ERR:DEPOSIT_FAILED\"\r\n );\r\n return disputeId;\r\n }\r\n\r\n function decideDispute(uint256 _disputeId, State _state)\r\n external\r\n onlyOwner\r\n {\r\n require(\r\n _state != State.NOT_DISPUTED && _state != State.DISPUTED,\r\n \"ERR:OUTCOME_NOT_ASSIGNABLE\"\r\n );\r\n\r\n Dispute storage dispute = disputes[_disputeId];\r\n require(dispute.state == State.DISPUTED, \"ERR:NOT_DISPUTED\");\r\n\r\n dispute.state = _state;\r\n }\r\n\r\n /**\r\n * @dev Submit evidence for a dispute\r\n * @param _disputeId Id of the dispute in the Protocol\r\n * @param _submitter Address of the account submitting the evidence\r\n * @param _evidence Data submitted for the evidence related to the dispute\r\n */\r\n function submitEvidence(\r\n uint256 _disputeId,\r\n address _submitter,\r\n bytes calldata _evidence\r\n ) external {}\r\n\r\n /**\r\n * @dev Close the evidence period of a dispute\r\n * @param _disputeId Identification number of the dispute to close its evidence submitting period\r\n */\r\n function closeEvidencePeriod(uint256 _disputeId) external {}\r\n\r\n /**\r\n * @notice Rule dispute #`_disputeId` if ready\r\n * @param _disputeId Identification number of the dispute to be ruled\r\n * @return subject Arbitrable instance associated to the dispute\r\n * @return ruling Ruling number computed for the given dispute\r\n */\r\n function rule(uint256 _disputeId)\r\n external\r\n returns (address subject, uint256 ruling)\r\n {\r\n Dispute storage dispute = disputes[_disputeId];\r\n\r\n if (dispute.state == State.DISPUTES_RULING_CHALLENGER) {\r\n return (dispute.subject, DISPUTES_RULING_CHALLENGER);\r\n } else if (dispute.state == State.DISPUTES_RULING_SUBMITTER) {\r\n return (dispute.subject, DISPUTES_RULING_SUBMITTER);\r\n } else if (dispute.state == State.DISPUTES_NOT_RULED) {\r\n return (dispute.subject, DISPUTES_NOT_RULED);\r\n } else {\r\n revert();\r\n }\r\n }\r\n\r\n /**\r\n * @dev Tell the dispute fees information to create a dispute\r\n * @return recipient Address where the corresponding dispute fees must be transferred to\r\n * @return feeToken ERC20 token used for the fees\r\n * @return feeAmount Total amount of fees that must be allowed to the recipient\r\n */\r\n function getDisputeFees()\r\n external\r\n view\r\n returns (\r\n address,\r\n GovernERC20,\r\n uint256\r\n )\r\n {\r\n return (address(this), feeToken, feeAmount);\r\n }\r\n}\r\n\r\ncontract DisputeManager {\r\n using SafeGovernERC20 for GovernERC20;\r\n\r\n OwnableCeleste celeste;\r\n\r\n uint256 private constant DISPUTES_NOT_RULED = 0;\r\n uint256 private constant DISPUTES_RULING_CHALLENGER = 3;\r\n uint256 private constant DISPUTES_RULING_SUBMITTER = 4;\r\n\r\n enum State {\r\n NOT_DISPUTED,\r\n DISPUTED,\r\n DISPUTES_NOT_RULED,\r\n DISPUTES_RULING_CHALLENGER,\r\n DISPUTES_RULING_SUBMITTER\r\n }\r\n\r\n constructor(address mockCelesteAddress) public {\r\n celeste = OwnableCeleste(mockCelesteAddress);\r\n }\r\n\r\n function getDisputeFees() external view returns (GovernERC20, uint256) {\r\n (address celeste, GovernERC20 feeToken, uint256 feeAmount) = celeste\r\n .getDisputeFees();\r\n return (feeToken, feeAmount);\r\n }\r\n\r\n function getDispute(uint256 _disputeId)\r\n external\r\n view\r\n returns (\r\n address subject,\r\n uint8 possibleRulings,\r\n OwnableCeleste.State state,\r\n uint8 finalRuling,\r\n uint256 lastRoundId,\r\n uint64 createTermId\r\n )\r\n {\r\n (address subject, OwnableCeleste.State state) = celeste.disputes(\r\n _disputeId\r\n );\r\n return (subject, 0, state, 0, 0, 0);\r\n }\r\n}\r\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/packages/hardhat/deployments/rinkeby/solcInputs/e2fc09f2f93bdc1aa037d1457edd9cbe.json b/packages/hardhat/deployments/rinkeby/solcInputs/e2fc09f2f93bdc1aa037d1457edd9cbe.json new file mode 100644 index 00000000..5583a1af --- /dev/null +++ b/packages/hardhat/deployments/rinkeby/solcInputs/e2fc09f2f93bdc1aa037d1457edd9cbe.json @@ -0,0 +1,35 @@ +{ + "language": "Solidity", + "sources": { + "contracts/mocks/OwnableCelesteMock.sol": { + "content": "/**\r\n *Submitted for verification at Etherscan.io on 2022-01-07\r\n */\r\n\r\n// Brought from https://github.com/aragon/aragonOS/blob/v4.3.0/contracts/lib/token/ERC20.sol\r\n// Adapted to use pragma ^0.5.8 and satisfy our linter rules\r\n\r\npragma solidity ^0.5.8;\r\n\r\n/**\r\n * @title ERC20 interface\r\n * @dev see https://github.com/ethereum/EIPs/issues/20\r\n */\r\ncontract GovernERC20 {\r\n function totalSupply() public view returns (uint256);\r\n\r\n function balanceOf(address _who) public view returns (uint256);\r\n\r\n function allowance(address _owner, address _spender)\r\n public\r\n view\r\n returns (uint256);\r\n\r\n function transfer(address _to, uint256 _value) public returns (bool);\r\n\r\n function approve(address _spender, uint256 _value) public returns (bool);\r\n\r\n function transferFrom(\r\n address _from,\r\n address _to,\r\n uint256 _value\r\n ) public returns (bool);\r\n\r\n event Transfer(address indexed from, address indexed to, uint256 value);\r\n\r\n event Approval(\r\n address indexed owner,\r\n address indexed spender,\r\n uint256 value\r\n );\r\n}\r\n\r\n// File: contracts/arbitration/IArbitrator.sol\r\n\r\npragma solidity ^0.5.8;\r\n\r\ninterface IArbitrator {\r\n /**\r\n * @dev Create a dispute over the Arbitrable sender with a number of possible rulings\r\n * @param _possibleRulings Number of possible rulings allowed for the dispute\r\n * @param _metadata Optional metadata that can be used to provide additional information on the dispute to be created\r\n * @return Dispute identification number\r\n */\r\n function createDispute(uint256 _possibleRulings, bytes calldata _metadata)\r\n external\r\n returns (uint256);\r\n\r\n /**\r\n * @dev Submit evidence for a dispute\r\n * @param _disputeId Id of the dispute in the Protocol\r\n * @param _submitter Address of the account submitting the evidence\r\n * @param _evidence Data submitted for the evidence related to the dispute\r\n */\r\n function submitEvidence(\r\n uint256 _disputeId,\r\n address _submitter,\r\n bytes calldata _evidence\r\n ) external;\r\n\r\n /**\r\n * @dev Close the evidence period of a dispute\r\n * @param _disputeId Identification number of the dispute to close its evidence submitting period\r\n */\r\n function closeEvidencePeriod(uint256 _disputeId) external;\r\n\r\n /**\r\n * @notice Rule dispute #`_disputeId` if ready\r\n * @param _disputeId Identification number of the dispute to be ruled\r\n * @return subject Arbitrable instance associated to the dispute\r\n * @return ruling Ruling number computed for the given dispute\r\n */\r\n function rule(uint256 _disputeId)\r\n external\r\n returns (address subject, uint256 ruling);\r\n\r\n /**\r\n * @dev Tell the dispute fees information to create a dispute\r\n * @return recipient Address where the corresponding dispute fees must be transferred to\r\n * @return feeToken ERC20 token used for the fees\r\n * @return feeAmount Total amount of fees that must be allowed to the recipient\r\n */\r\n function getDisputeFees()\r\n external\r\n view\r\n returns (\r\n address recipient,\r\n GovernERC20 feeToken,\r\n uint256 feeAmount\r\n );\r\n}\r\n\r\n// File: contracts/lib/os/SafeERC20.sol\r\n\r\n// Brought from https://github.com/aragon/aragonOS/blob/v4.3.0/contracts/common/SafeERC20.sol\r\n// Adapted to use pragma ^0.5.8 and satisfy our linter rules\r\n\r\npragma solidity ^0.5.8;\r\n\r\nlibrary SafeGovernERC20 {\r\n // Before 0.5, solidity has a mismatch between `address.transfer()` and `token.transfer()`:\r\n // https://github.com/ethereum/solidity/issues/3544\r\n bytes4 private constant TRANSFER_SELECTOR = 0xa9059cbb;\r\n\r\n /**\r\n * @dev Same as a standards-compliant ERC20.transfer() that never reverts (returns false).\r\n * Note that this makes an external call to the token.\r\n */\r\n function safeTransfer(\r\n GovernERC20 _token,\r\n address _to,\r\n uint256 _amount\r\n ) internal returns (bool) {\r\n bytes memory transferCallData = abi.encodeWithSelector(\r\n TRANSFER_SELECTOR,\r\n _to,\r\n _amount\r\n );\r\n return invokeAndCheckSuccess(address(_token), transferCallData);\r\n }\r\n\r\n /**\r\n * @dev Same as a standards-compliant ERC20.transferFrom() that never reverts (returns false).\r\n * Note that this makes an external call to the token.\r\n */\r\n function safeTransferFrom(\r\n GovernERC20 _token,\r\n address _from,\r\n address _to,\r\n uint256 _amount\r\n ) internal returns (bool) {\r\n bytes memory transferFromCallData = abi.encodeWithSelector(\r\n _token.transferFrom.selector,\r\n _from,\r\n _to,\r\n _amount\r\n );\r\n return invokeAndCheckSuccess(address(_token), transferFromCallData);\r\n }\r\n\r\n /**\r\n * @dev Same as a standards-compliant ERC20.approve() that never reverts (returns false).\r\n * Note that this makes an external call to the token.\r\n */\r\n function safeApprove(\r\n GovernERC20 _token,\r\n address _spender,\r\n uint256 _amount\r\n ) internal returns (bool) {\r\n bytes memory approveCallData = abi.encodeWithSelector(\r\n _token.approve.selector,\r\n _spender,\r\n _amount\r\n );\r\n return invokeAndCheckSuccess(address(_token), approveCallData);\r\n }\r\n\r\n function invokeAndCheckSuccess(address _addr, bytes memory _calldata)\r\n private\r\n returns (bool)\r\n {\r\n bool ret;\r\n assembly {\r\n let ptr := mload(0x40) // free memory pointer\r\n\r\n let success := call(\r\n gas, // forward all gas\r\n _addr, // address\r\n 0, // no value\r\n add(_calldata, 0x20), // calldata start\r\n mload(_calldata), // calldata length\r\n ptr, // write output over free memory\r\n 0x20 // uint256 return\r\n )\r\n\r\n if gt(success, 0) {\r\n // Check number of bytes returned from last function call\r\n switch returndatasize\r\n // No bytes returned: assume success\r\n case 0 {\r\n ret := 1\r\n }\r\n // 32 bytes returned: check if non-zero\r\n case 0x20 {\r\n // Only return success if returned data was true\r\n // Already have output in ptr\r\n ret := eq(mload(ptr), 1)\r\n }\r\n // Not sure what was returned: don't mark as success\r\n default {\r\n\r\n }\r\n }\r\n }\r\n return ret;\r\n }\r\n}\r\n\r\n// File: contracts/ownable-celeste/OwnableCeleste.sol\r\n\r\npragma solidity ^0.5.8;\r\n\r\ncontract OwnableCeleste is IArbitrator {\r\n using SafeGovernERC20 for GovernERC20;\r\n\r\n // Note that Aragon Court treats the possible outcomes as arbitrary numbers, leaving the Arbitrable (us) to define how to understand them.\r\n // Some outcomes [0, 1, and 2] are reserved by Aragon Court: \"missing\", \"leaked\", and \"refused\", respectively.\r\n // This Arbitrable introduces the concept of the challenger/submitter (a binary outcome) as 3/4.\r\n // Note that Aragon Court emits the lowest outcome in the event of a tie, and so for us, we prefer the challenger.\r\n uint256 private constant DISPUTES_NOT_RULED = 0;\r\n uint256 private constant DISPUTES_RULING_CHALLENGER = 3;\r\n uint256 private constant DISPUTES_RULING_SUBMITTER = 4;\r\n address private disputeManager;\r\n\r\n enum State {\r\n NOT_DISPUTED,\r\n DISPUTED,\r\n DISPUTES_NOT_RULED,\r\n DISPUTES_RULING_CHALLENGER,\r\n DISPUTES_RULING_SUBMITTER\r\n }\r\n\r\n struct Dispute {\r\n address subject;\r\n State state;\r\n }\r\n\r\n GovernERC20 public feeToken;\r\n uint256 public feeAmount;\r\n uint256 public currentId;\r\n address public owner;\r\n mapping(uint256 => Dispute) public disputes;\r\n\r\n modifier onlyOwner() {\r\n require(msg.sender == owner, \"ERR:NOT_OWNER\");\r\n _;\r\n }\r\n\r\n constructor(GovernERC20 _feeToken, uint256 _feeAmount) public {\r\n owner = msg.sender;\r\n feeToken = _feeToken;\r\n feeAmount = _feeAmount;\r\n disputeManager = address(new DisputeManager(address(this)));\r\n }\r\n\r\n function getDisputeManager() external view returns (address) {\r\n return disputeManager;\r\n }\r\n\r\n function setOwner(address _owner) public onlyOwner {\r\n owner = _owner;\r\n }\r\n\r\n /**\r\n * @dev Create a dispute over the Arbitrable sender with a number of possible rulings\r\n * @param _possibleRulings Number of possible rulings allowed for the dispute\r\n * @param _metadata Optional metadata that can be used to provide additional information on the dispute to be created\r\n * @return Dispute identification number\r\n */\r\n function createDispute(uint256 _possibleRulings, bytes calldata _metadata)\r\n external\r\n returns (uint256)\r\n {\r\n uint256 disputeId = currentId;\r\n disputes[disputeId] = Dispute(msg.sender, State.DISPUTED);\r\n currentId++;\r\n\r\n require(\r\n feeToken.safeTransferFrom(msg.sender, address(this), feeAmount),\r\n \"ERR:DEPOSIT_FAILED\"\r\n );\r\n return disputeId;\r\n }\r\n\r\n function decideDispute(uint256 _disputeId, State _state)\r\n external\r\n onlyOwner\r\n {\r\n require(\r\n _state != State.NOT_DISPUTED && _state != State.DISPUTED,\r\n \"ERR:OUTCOME_NOT_ASSIGNABLE\"\r\n );\r\n\r\n Dispute storage dispute = disputes[_disputeId];\r\n require(dispute.state == State.DISPUTED, \"ERR:NOT_DISPUTED\");\r\n\r\n dispute.state = _state;\r\n }\r\n\r\n /**\r\n * @dev Submit evidence for a dispute\r\n * @param _disputeId Id of the dispute in the Protocol\r\n * @param _submitter Address of the account submitting the evidence\r\n * @param _evidence Data submitted for the evidence related to the dispute\r\n */\r\n function submitEvidence(\r\n uint256 _disputeId,\r\n address _submitter,\r\n bytes calldata _evidence\r\n ) external {}\r\n\r\n /**\r\n * @dev Close the evidence period of a dispute\r\n * @param _disputeId Identification number of the dispute to close its evidence submitting period\r\n */\r\n function closeEvidencePeriod(uint256 _disputeId) external {}\r\n\r\n /**\r\n * @notice Rule dispute #`_disputeId` if ready\r\n * @param _disputeId Identification number of the dispute to be ruled\r\n * @return subject Arbitrable instance associated to the dispute\r\n * @return ruling Ruling number computed for the given dispute\r\n */\r\n function rule(uint256 _disputeId)\r\n external\r\n returns (address subject, uint256 ruling)\r\n {\r\n Dispute storage dispute = disputes[_disputeId];\r\n\r\n if (dispute.state == State.DISPUTES_RULING_CHALLENGER) {\r\n return (dispute.subject, DISPUTES_RULING_CHALLENGER);\r\n } else if (dispute.state == State.DISPUTES_RULING_SUBMITTER) {\r\n return (dispute.subject, DISPUTES_RULING_SUBMITTER);\r\n } else if (dispute.state == State.DISPUTES_NOT_RULED) {\r\n return (dispute.subject, DISPUTES_NOT_RULED);\r\n } else {\r\n revert();\r\n }\r\n }\r\n\r\n /**\r\n * @dev Tell the dispute fees information to create a dispute\r\n * @return recipient Address where the corresponding dispute fees must be transferred to\r\n * @return feeToken ERC20 token used for the fees\r\n * @return feeAmount Total amount of fees that must be allowed to the recipient\r\n */\r\n function getDisputeFees()\r\n external\r\n view\r\n returns (\r\n address,\r\n GovernERC20,\r\n uint256\r\n )\r\n {\r\n return (address(this), feeToken, feeAmount);\r\n }\r\n}\r\n\r\ncontract DisputeManager {\r\n using SafeGovernERC20 for GovernERC20;\r\n\r\n OwnableCeleste celeste;\r\n\r\n constructor(address mockCelesteAddress) public {\r\n celeste = OwnableCeleste(mockCelesteAddress);\r\n }\r\n\r\n function getDisputeFees() external view returns (GovernERC20, uint256) {\r\n (address celeste, GovernERC20 feeToken, uint256 feeAmount) = celeste\r\n .getDisputeFees();\r\n return (feeToken, feeAmount);\r\n }\r\n\r\n function getDispute(uint256 _disputeId)\r\n external\r\n view\r\n returns (\r\n address subject,\r\n uint8 possibleRulings,\r\n OwnableCeleste.State state,\r\n uint8 finalRuling,\r\n uint256 lastRoundId,\r\n uint64 createTermId\r\n )\r\n {\r\n (address subject, OwnableCeleste.State state) = celeste.disputes(\r\n _disputeId\r\n );\r\n return (subject, 0, state, 0, 0, 0);\r\n }\r\n}\r\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/packages/hardhat/deployments/xdai/.chainId b/packages/hardhat/deployments/xdai/.chainId new file mode 100644 index 00000000..105d7d9a --- /dev/null +++ b/packages/hardhat/deployments/xdai/.chainId @@ -0,0 +1 @@ +100 \ No newline at end of file diff --git a/packages/hardhat/deployments/xdai/Govern.json b/packages/hardhat/deployments/xdai/Govern.json index b311557b..c16e1146 100644 --- a/packages/hardhat/deployments/xdai/Govern.json +++ b/packages/hardhat/deployments/xdai/Govern.json @@ -1 +1 @@ -{ "address": "" } +{"address":"0xC6b74c1416eA7D76d4E4808c990F6fb91954Ff1C","abi":[{"inputs":[{"internalType":"address","name":"_initialExecutor","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"string","name":"_reference","type":"string"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ETHDeposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"actor","type":"address"},{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"indexed":false,"internalType":"struct ERC3000Data.Action[]","name":"actions","type":"tuple[]"},{"indexed":false,"internalType":"bytes32","name":"memo","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"failureMap","type":"bytes32"},{"indexed":false,"internalType":"bytes[]","name":"execResults","type":"bytes[]"}],"name":"Executed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"role","type":"bytes4"},{"indexed":true,"internalType":"address","name":"actor","type":"address"}],"name":"Frozen","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"role","type":"bytes4"},{"indexed":true,"internalType":"address","name":"actor","type":"address"},{"indexed":true,"internalType":"address","name":"who","type":"address"},{"indexed":false,"internalType":"contract IACLOracle","name":"oracle","type":"address"}],"name":"Granted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"key","type":"string"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"sig","type":"bytes4"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"ReceivedCallback","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes4","name":"sig","type":"bytes4"},{"indexed":false,"internalType":"bytes4","name":"magicNumber","type":"bytes4"}],"name":"RegisteredCallback","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"RegisteredStandard","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"role","type":"bytes4"},{"indexed":true,"internalType":"address","name":"actor","type":"address"},{"indexed":true,"internalType":"address","name":"who","type":"address"}],"name":"Revoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"string","name":"_reference","type":"string"}],"name":"Withdrawn","type":"event"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[],"name":"ROOT_ROLE","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"enum ACLData.BulkOp","name":"op","type":"uint8"},{"internalType":"bytes4","name":"role","type":"bytes4"},{"internalType":"address","name":"who","type":"address"}],"internalType":"struct ACLData.BulkItem[]","name":"items","type":"tuple[]"}],"name":"bulk","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"string","name":"_reference","type":"string"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ERC3000Data.Action[]","name":"actions","type":"tuple[]"},{"internalType":"bytes32","name":"allowFailuresMap","type":"bytes32"},{"internalType":"bytes32","name":"memo","type":"bytes32"}],"name":"exec","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"bytes[]","name":"","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_role","type":"bytes4"}],"name":"freeze","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_role","type":"bytes4"},{"internalType":"address","name":"_who","type":"address"}],"name":"grant","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_role","type":"bytes4"},{"internalType":"address","name":"_who","type":"address"},{"internalType":"contract IACLOracle","name":"_oracle","type":"address"}],"name":"grantWithOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"initBlocks","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_initialExecutor","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_role","type":"bytes4"}],"name":"isFrozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"isValidSignature","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"},{"internalType":"bytes4","name":"_callbackSig","type":"bytes4"},{"internalType":"bytes4","name":"_magicNumber","type":"bytes4"}],"name":"registerStandardAndCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_role","type":"bytes4"},{"internalType":"address","name":"_who","type":"address"}],"name":"revoke","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"","type":"bytes4"},{"internalType":"address","name":"","type":"address"}],"name":"roles","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ERC1271","name":"_signatureValidator","type":"address"}],"name":"setSignatureValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"string","name":"_reference","type":"string"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]} \ No newline at end of file diff --git a/packages/hardhat/deployments/xdai/GovernQueue.json b/packages/hardhat/deployments/xdai/GovernQueue.json index cc37b384..05bbbe5c 100644 --- a/packages/hardhat/deployments/xdai/GovernQueue.json +++ b/packages/hardhat/deployments/xdai/GovernQueue.json @@ -1,3 +1 @@ -{ - "address": "" -} +{"address":"0x9db80BE02a3Fd047B1b7F37D75C47F7CE7036D00","abi":[{"inputs":[{"internalType":"address","name":"_aclRoot","type":"address"},{"components":[{"internalType":"uint256","name":"executionDelay","type":"uint256"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ERC3000Data.Collateral","name":"scheduleDeposit","type":"tuple"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ERC3000Data.Collateral","name":"challengeDeposit","type":"tuple"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"bytes","name":"rules","type":"bytes"},{"internalType":"uint256","name":"maxCalldataSize","type":"uint256"}],"internalType":"struct ERC3000Data.Config","name":"_initialConfig","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"containerHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"actor","type":"address"},{"indexed":false,"internalType":"bytes","name":"reason","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"resolverId","type":"uint256"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"indexed":false,"internalType":"struct ERC3000Data.Collateral","name":"collateral","type":"tuple"}],"name":"Challenged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"configHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"actor","type":"address"},{"components":[{"internalType":"uint256","name":"executionDelay","type":"uint256"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ERC3000Data.Collateral","name":"scheduleDeposit","type":"tuple"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ERC3000Data.Collateral","name":"challengeDeposit","type":"tuple"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"bytes","name":"rules","type":"bytes"},{"internalType":"uint256","name":"maxCalldataSize","type":"uint256"}],"indexed":false,"internalType":"struct ERC3000Data.Config","name":"config","type":"tuple"}],"name":"Configured","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"containerHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"actor","type":"address"}],"name":"Executed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"role","type":"bytes4"},{"indexed":true,"internalType":"address","name":"actor","type":"address"}],"name":"Frozen","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"role","type":"bytes4"},{"indexed":true,"internalType":"address","name":"actor","type":"address"},{"indexed":true,"internalType":"address","name":"who","type":"address"},{"indexed":false,"internalType":"contract IACLOracle","name":"oracle","type":"address"}],"name":"Granted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"key","type":"string"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"sig","type":"bytes4"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"ReceivedCallback","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes4","name":"sig","type":"bytes4"},{"indexed":false,"internalType":"bytes4","name":"magicNumber","type":"bytes4"}],"name":"RegisteredCallback","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"RegisteredStandard","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"containerHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"actor","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"Resolved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"role","type":"bytes4"},{"indexed":true,"internalType":"address","name":"actor","type":"address"},{"indexed":true,"internalType":"address","name":"who","type":"address"}],"name":"Revoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IArbitrator","name":"arbitrator","type":"address"},{"indexed":true,"internalType":"uint256","name":"disputeId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ruling","type":"uint256"}],"name":"Ruled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"containerHash","type":"bytes32"},{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"executionTime","type":"uint256"},{"internalType":"address","name":"submitter","type":"address"},{"internalType":"contract IERC3000Executor","name":"executor","type":"address"},{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ERC3000Data.Action[]","name":"actions","type":"tuple[]"},{"internalType":"bytes32","name":"allowFailuresMap","type":"bytes32"},{"internalType":"bytes","name":"proof","type":"bytes"}],"indexed":false,"internalType":"struct ERC3000Data.Payload","name":"payload","type":"tuple"}],"name":"Scheduled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"containerHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"actor","type":"address"},{"indexed":false,"internalType":"bytes","name":"reason","type":"bytes"}],"name":"Vetoed","type":"event"},{"inputs":[],"name":"ROOT_ROLE","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"enum ACLData.BulkOp","name":"op","type":"uint8"},{"internalType":"bytes4","name":"role","type":"bytes4"},{"internalType":"address","name":"who","type":"address"}],"internalType":"struct ACLData.BulkItem[]","name":"items","type":"tuple[]"}],"name":"bulk","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"executionTime","type":"uint256"},{"internalType":"address","name":"submitter","type":"address"},{"internalType":"contract IERC3000Executor","name":"executor","type":"address"},{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ERC3000Data.Action[]","name":"actions","type":"tuple[]"},{"internalType":"bytes32","name":"allowFailuresMap","type":"bytes32"},{"internalType":"bytes","name":"proof","type":"bytes"}],"internalType":"struct ERC3000Data.Payload","name":"payload","type":"tuple"},{"components":[{"internalType":"uint256","name":"executionDelay","type":"uint256"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ERC3000Data.Collateral","name":"scheduleDeposit","type":"tuple"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ERC3000Data.Collateral","name":"challengeDeposit","type":"tuple"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"bytes","name":"rules","type":"bytes"},{"internalType":"uint256","name":"maxCalldataSize","type":"uint256"}],"internalType":"struct ERC3000Data.Config","name":"config","type":"tuple"}],"internalType":"struct ERC3000Data.Container","name":"_container","type":"tuple"},{"internalType":"bytes","name":"_reason","type":"bytes"}],"name":"challenge","outputs":[{"internalType":"uint256","name":"disputeId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"challengerCache","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"configHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"executionDelay","type":"uint256"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ERC3000Data.Collateral","name":"scheduleDeposit","type":"tuple"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ERC3000Data.Collateral","name":"challengeDeposit","type":"tuple"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"bytes","name":"rules","type":"bytes"},{"internalType":"uint256","name":"maxCalldataSize","type":"uint256"}],"internalType":"struct ERC3000Data.Config","name":"_config","type":"tuple"}],"name":"configure","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"contract IArbitrator","name":"","type":"address"}],"name":"disputeItemCache","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"executionTime","type":"uint256"},{"internalType":"address","name":"submitter","type":"address"},{"internalType":"contract IERC3000Executor","name":"executor","type":"address"},{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ERC3000Data.Action[]","name":"actions","type":"tuple[]"},{"internalType":"bytes32","name":"allowFailuresMap","type":"bytes32"},{"internalType":"bytes","name":"proof","type":"bytes"}],"internalType":"struct ERC3000Data.Payload","name":"payload","type":"tuple"},{"components":[{"internalType":"uint256","name":"executionDelay","type":"uint256"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ERC3000Data.Collateral","name":"scheduleDeposit","type":"tuple"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ERC3000Data.Collateral","name":"challengeDeposit","type":"tuple"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"bytes","name":"rules","type":"bytes"},{"internalType":"uint256","name":"maxCalldataSize","type":"uint256"}],"internalType":"struct ERC3000Data.Config","name":"config","type":"tuple"}],"internalType":"struct ERC3000Data.Container","name":"_container","type":"tuple"}],"name":"execute","outputs":[{"internalType":"bytes32","name":"failureMap","type":"bytes32"},{"internalType":"bytes[]","name":"","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_role","type":"bytes4"}],"name":"freeze","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_role","type":"bytes4"},{"internalType":"address","name":"_who","type":"address"}],"name":"grant","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_role","type":"bytes4"},{"internalType":"address","name":"_who","type":"address"},{"internalType":"contract IACLOracle","name":"_oracle","type":"address"}],"name":"grantWithOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"initBlocks","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_aclRoot","type":"address"},{"components":[{"internalType":"uint256","name":"executionDelay","type":"uint256"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ERC3000Data.Collateral","name":"scheduleDeposit","type":"tuple"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ERC3000Data.Collateral","name":"challengeDeposit","type":"tuple"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"bytes","name":"rules","type":"bytes"},{"internalType":"uint256","name":"maxCalldataSize","type":"uint256"}],"internalType":"struct ERC3000Data.Config","name":"_initialConfig","type":"tuple"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_role","type":"bytes4"}],"name":"isFrozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"queue","outputs":[{"internalType":"enum GovernQueueStateLib.State","name":"state","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"executionTime","type":"uint256"},{"internalType":"address","name":"submitter","type":"address"},{"internalType":"contract IERC3000Executor","name":"executor","type":"address"},{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ERC3000Data.Action[]","name":"actions","type":"tuple[]"},{"internalType":"bytes32","name":"allowFailuresMap","type":"bytes32"},{"internalType":"bytes","name":"proof","type":"bytes"}],"internalType":"struct ERC3000Data.Payload","name":"payload","type":"tuple"},{"components":[{"internalType":"uint256","name":"executionDelay","type":"uint256"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ERC3000Data.Collateral","name":"scheduleDeposit","type":"tuple"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ERC3000Data.Collateral","name":"challengeDeposit","type":"tuple"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"bytes","name":"rules","type":"bytes"},{"internalType":"uint256","name":"maxCalldataSize","type":"uint256"}],"internalType":"struct ERC3000Data.Config","name":"config","type":"tuple"}],"internalType":"struct ERC3000Data.Container","name":"_container","type":"tuple"},{"internalType":"uint256","name":"_disputeId","type":"uint256"}],"name":"resolve","outputs":[{"internalType":"bytes32","name":"failureMap","type":"bytes32"},{"internalType":"bytes[]","name":"","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_role","type":"bytes4"},{"internalType":"address","name":"_who","type":"address"}],"name":"revoke","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"","type":"bytes4"},{"internalType":"address","name":"","type":"address"}],"name":"roles","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"executionTime","type":"uint256"},{"internalType":"address","name":"submitter","type":"address"},{"internalType":"contract IERC3000Executor","name":"executor","type":"address"},{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ERC3000Data.Action[]","name":"actions","type":"tuple[]"},{"internalType":"bytes32","name":"allowFailuresMap","type":"bytes32"},{"internalType":"bytes","name":"proof","type":"bytes"}],"internalType":"struct ERC3000Data.Payload","name":"payload","type":"tuple"},{"components":[{"internalType":"uint256","name":"executionDelay","type":"uint256"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ERC3000Data.Collateral","name":"scheduleDeposit","type":"tuple"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ERC3000Data.Collateral","name":"challengeDeposit","type":"tuple"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"bytes","name":"rules","type":"bytes"},{"internalType":"uint256","name":"maxCalldataSize","type":"uint256"}],"internalType":"struct ERC3000Data.Config","name":"config","type":"tuple"}],"internalType":"struct ERC3000Data.Container","name":"_container","type":"tuple"}],"name":"schedule","outputs":[{"internalType":"bytes32","name":"containerHash","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"executionTime","type":"uint256"},{"internalType":"address","name":"submitter","type":"address"},{"internalType":"contract IERC3000Executor","name":"executor","type":"address"},{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ERC3000Data.Action[]","name":"actions","type":"tuple[]"},{"internalType":"bytes32","name":"allowFailuresMap","type":"bytes32"},{"internalType":"bytes","name":"proof","type":"bytes"}],"internalType":"struct ERC3000Data.Payload","name":"payload","type":"tuple"},{"components":[{"internalType":"uint256","name":"executionDelay","type":"uint256"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ERC3000Data.Collateral","name":"scheduleDeposit","type":"tuple"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ERC3000Data.Collateral","name":"challengeDeposit","type":"tuple"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"bytes","name":"rules","type":"bytes"},{"internalType":"uint256","name":"maxCalldataSize","type":"uint256"}],"internalType":"struct ERC3000Data.Config","name":"config","type":"tuple"}],"internalType":"struct ERC3000Data.Container","name":"_container","type":"tuple"},{"internalType":"bytes","name":"_reason","type":"bytes"}],"name":"veto","outputs":[],"stateMutability":"nonpayable","type":"function"}]} \ No newline at end of file diff --git a/packages/hardhat/deployments/xdai/Quest.json b/packages/hardhat/deployments/xdai/Quest.json new file mode 100644 index 00000000..5039a380 --- /dev/null +++ b/packages/hardhat/deployments/xdai/Quest.json @@ -0,0 +1,489 @@ +{ + "address": "0x351a9ED0C54bb2aFE7Ad1AAB5Ce8732248C99f00", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_questTitle", + "type": "string" + }, + { + "internalType": "bytes", + "name": "_questDetailsRef", + "type": "bytes" + }, + { + "internalType": "contract IERC20", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_expireTime", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_aragonGovernAddress", + "type": "address" + }, + { + "internalType": "address payable", + "name": "_fundsRecoveryAddress", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "_depositToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_depositAmount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_questCreator", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "evidence", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "address", + "name": "player", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "QuestClaimed", + "type": "event" + }, + { + "inputs": [], + "name": "aragonGovernAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_evidence", + "type": "bytes" + }, + { + "internalType": "address", + "name": "_player", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_claimAll", + "type": "bool" + } + ], + "name": "claim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "claims", + "outputs": [ + { + "internalType": "bytes", + "name": "evidence", + "type": "bytes" + }, + { + "internalType": "address", + "name": "player", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "expireTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fundsRecoveryAddress", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isDepositReleased", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "questCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "questDetailsRef", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "questTitle", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "recoverFundsAndDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rewardToken", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x78cce24649142a50bd5b1a70bfe0b0070d98ca0948ace5ac22b7fb8594b6e95c", + "receipt": { + "to": null, + "from": "0x91B0d67D3F47A30FBEeB159E67209Ad6cb2cE22E", + "contractAddress": "0x351a9ED0C54bb2aFE7Ad1AAB5Ce8732248C99f00", + "transactionIndex": 9, + "gasUsed": "1227190", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x9e041b256944e4d3cd87f656e3dc2105b285ffbd8e11999d5749f60a80022840", + "transactionHash": "0x78cce24649142a50bd5b1a70bfe0b0070d98ca0948ace5ac22b7fb8594b6e95c", + "logs": [], + "blockNumber": 22415111, + "cumulativeGasUsed": "2367783", + "status": 1, + "byzantium": true + }, + "args": [ + "ASDF", + "0x00", + "0xdf456B614fE9FF1C7c0B380330Da29C96d40FB02", + 0, + "0x6e7c3BC98bee14302AA2A98B4c5C86b13eB4b6Cd", + "0xdf456B614fE9FF1C7c0B380330Da29C96d40FB02", + "0x6e7c3BC98bee14302AA2A98B4c5C86b13eB4b6Cd", + "100000000000000000", + "0xdf456B614fE9FF1C7c0B380330Da29C96d40FB02" + ], + "solcInputHash": "55762042aa62f69cb5859e68ffbc45e6", + "metadata": "{\"compiler\":{\"version\":\"0.8.1+commit.df193b15\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_questTitle\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"_questDetailsRef\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_rewardToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_expireTime\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_aragonGovernAddress\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"_fundsRecoveryAddress\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"_depositToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_depositAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_questCreator\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"evidence\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"player\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"QuestClaimed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"aragonGovernAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_evidence\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"_player\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_claimAll\",\"type\":\"bool\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claims\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"evidence\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"player\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"expireTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fundsRecoveryAddress\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isDepositReleased\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"questCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"questDetailsRef\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"questTitle\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recoverFundsAndDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardToken\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Quest.sol\":\"Quest\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":20000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x24e0364e503a9bbde94c715d26573a76f14cd2a202d45f96f52134ab806b67b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0x61437cb513a887a1bbad006e7b1c8b414478427d33de47c5600af3c748f108da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) {\\n // Return data is optional\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc3d946432c0ddbb1f846a0d3985be71299df331b91d06732152117f62f0be2b5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x51b758a8815ecc9596c66c37d56b1d33883a444631a3f916b9fe65cb863ef7c4\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa2f576be637946f767aa56601c26d717f48a0aff44f82e46f13807eea1009a21\",\"license\":\"MIT\"},\"contracts/Quest.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\r\\npragma solidity ^0.8.1;\\r\\n\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\r\\nimport \\\"./libraries/Deposit.sol\\\";\\r\\nimport \\\"./libraries/Models.sol\\\";\\r\\nimport \\\"./QuestFactory.sol\\\";\\r\\n\\r\\ncontract Quest {\\r\\n using SafeMath for uint256;\\r\\n using SafeERC20 for IERC20;\\r\\n using DepositLib for Models.Deposit;\\r\\n\\r\\n address public questCreator;\\r\\n string public questTitle;\\r\\n bytes public questDetailsRef;\\r\\n IERC20 public rewardToken;\\r\\n uint256 public expireTime;\\r\\n address public aragonGovernAddress;\\r\\n address payable public fundsRecoveryAddress;\\r\\n Models.Claim[] public claims;\\r\\n Models.Deposit public deposit;\\r\\n bool public isDepositReleased;\\r\\n\\r\\n event QuestClaimed(bytes evidence, address player, uint256 amount);\\r\\n\\r\\n constructor(\\r\\n string memory _questTitle,\\r\\n bytes memory _questDetailsRef,\\r\\n IERC20 _rewardToken,\\r\\n uint256 _expireTime,\\r\\n address _aragonGovernAddress,\\r\\n address payable _fundsRecoveryAddress,\\r\\n IERC20 _depositToken,\\r\\n uint256 _depositAmount,\\r\\n address _questCreator\\r\\n ) {\\r\\n questTitle = _questTitle;\\r\\n questDetailsRef = _questDetailsRef;\\r\\n rewardToken = _rewardToken;\\r\\n expireTime = _expireTime;\\r\\n aragonGovernAddress = _aragonGovernAddress;\\r\\n fundsRecoveryAddress = _fundsRecoveryAddress;\\r\\n questCreator = _questCreator;\\r\\n deposit = Models.Deposit(_depositToken, _depositAmount);\\r\\n isDepositReleased = false;\\r\\n }\\r\\n\\r\\n /*\\r\\n * Release deposit to creator and send unused funds to fundsRecoveryAddress.\\r\\n * requires quests to have expired\\r\\n */\\r\\n function recoverFundsAndDeposit() external {\\r\\n require(block.timestamp > expireTime, \\\"ERROR: Not expired\\\");\\r\\n\\r\\n // Restore deposit if not already released\\r\\n if (!isDepositReleased) {\\r\\n deposit.releaseTo(questCreator);\\r\\n isDepositReleased = true;\\r\\n }\\r\\n\\r\\n rewardToken.safeTransfer(\\r\\n fundsRecoveryAddress,\\r\\n rewardToken.balanceOf(address(this))\\r\\n );\\r\\n }\\r\\n\\r\\n /*\\r\\n * Claim a quest reward.\\r\\n * @param _evidence Evidence of the claim.\\r\\n * @param _player Player address.\\r\\n * @param _amount Amount of the reward.\\r\\n * requires sender to be aragonGovernAddress\\r\\n * requires evidence to not be empty\\r\\n * requires claim amount to not exceed available deposit when same token\\r\\n * emit QuestClaimed\\r\\n */\\r\\n function claim(\\r\\n bytes memory _evidence,\\r\\n address _player,\\r\\n uint256 _amount,\\r\\n bool _claimAll\\r\\n ) external {\\r\\n require(msg.sender == aragonGovernAddress, \\\"ERROR: Sender not govern\\\");\\r\\n require(_evidence.length != 0, \\\"ERROR: No evidence\\\");\\r\\n uint256 balance = rewardToken.balanceOf(address(this));\\r\\n\\r\\n if (_claimAll) {\\r\\n // Claim all but let deposit if they are same token\\r\\n if (address(rewardToken) == address(deposit.token)) {\\r\\n (, uint256 result) = balance.trySub(deposit.amount);\\r\\n _amount = result;\\r\\n } else {\\r\\n _amount = balance;\\r\\n }\\r\\n }\\r\\n\\r\\n if (address(rewardToken) == address(deposit.token)) {\\r\\n (, uint256 result) = balance.trySub(_amount);\\r\\n require(\\r\\n result >= deposit.amount,\\r\\n \\\"ERROR: Should not exceed allowed bounty\\\"\\r\\n );\\r\\n }\\r\\n\\r\\n if (_amount > 0) {\\r\\n rewardToken.safeTransfer(_player, _amount);\\r\\n }\\r\\n\\r\\n claims.push(Models.Claim(_evidence, _player, _amount));\\r\\n\\r\\n emit QuestClaimed(_evidence, _player, _amount);\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x716b3fb1a3217a932100c374c16545fafc7782556fe33866a0a75257202d7d16\",\"license\":\"GPL-3.0\"},\"contracts/QuestFactory.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\r\\npragma solidity ^0.8.1;\\r\\n\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\r\\nimport \\\"./libraries/Deposit.sol\\\";\\r\\nimport \\\"./libraries/Models.sol\\\";\\r\\nimport \\\"./Quest.sol\\\";\\r\\n\\r\\ncontract QuestFactory is Ownable {\\r\\n using DepositLib for Models.Deposit;\\r\\n\\r\\n address public aragonGovernAddress;\\r\\n Models.Deposit public deposit;\\r\\n\\r\\n event QuestCreated(\\r\\n address questAddress,\\r\\n string questTitle,\\r\\n bytes questDetailsRef,\\r\\n address rewardTokenAddress,\\r\\n uint256 expireTime,\\r\\n address fundsRecoveryAddress,\\r\\n address depositToken,\\r\\n uint256 depositAmount,\\r\\n address creator\\r\\n );\\r\\n\\r\\n event DepositChanged(uint256 timestamp, address token, uint256 amount);\\r\\n\\r\\n constructor(\\r\\n address _aragonGovernAddress,\\r\\n IERC20 _depositToken,\\r\\n uint256 _depositAmount,\\r\\n address _initialOwner\\r\\n ) {\\r\\n aragonGovernAddress = _aragonGovernAddress;\\r\\n setDeposit(_depositToken, _depositAmount);\\r\\n if (_initialOwner != msg.sender) {\\r\\n transferOwnership(_initialOwner);\\r\\n }\\r\\n }\\r\\n\\r\\n /*\\r\\n * @dev Set the deposit token and amount.\\r\\n * @param _depositToken The deposit token.\\r\\n * @param _depositAmount The deposit amount.\\r\\n * emit DepositChanged\\r\\n */\\r\\n function setDeposit(IERC20 token, uint256 amount) public onlyOwner {\\r\\n deposit = Models.Deposit(token, amount);\\r\\n emit DepositChanged(block.timestamp, address(token), amount);\\r\\n }\\r\\n\\r\\n /*\\r\\n * Collect deposit, deploy a new Quest with given info contract\\r\\n * and transfer deposit to new Quest.\\r\\n * @param _title Quest title.\\r\\n * @param _details Quest details.\\r\\n * @param _rewardTokenAddress Reward token address.\\r\\n * @param _expireTime Expire time.\\r\\n * @param _fundsRecoveryAddress Funds recovery address.\\r\\n * requires deposit allowance\\r\\n * returns Quest address.\\r\\n * emits QuestCreated\\r\\n */\\r\\n function createQuest(\\r\\n string memory _questTitle,\\r\\n bytes memory _questDetailsRef,\\r\\n IERC20 _rewardToken,\\r\\n uint256 _expireTime,\\r\\n address payable _fundsRecoveryAddress\\r\\n ) external returns (address) {\\r\\n Quest quest = new Quest(\\r\\n _questTitle,\\r\\n _questDetailsRef,\\r\\n _rewardToken,\\r\\n _expireTime,\\r\\n aragonGovernAddress,\\r\\n _fundsRecoveryAddress,\\r\\n deposit.token,\\r\\n deposit.amount,\\r\\n msg.sender\\r\\n );\\r\\n\\r\\n // Collect deposit from quest creator and send it to quest\\r\\n deposit.collectFrom(msg.sender, address(quest));\\r\\n\\r\\n emit QuestCreated(\\r\\n address(quest),\\r\\n _questTitle,\\r\\n _questDetailsRef,\\r\\n address(_rewardToken),\\r\\n _expireTime,\\r\\n _fundsRecoveryAddress,\\r\\n address(deposit.token),\\r\\n deposit.amount,\\r\\n msg.sender\\r\\n );\\r\\n\\r\\n return address(quest);\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x05a05ddc2bf42d75c2379cd539cdac2702a3a2cfafad5b159e76909bc28d608a\",\"license\":\"GPL-3.0\"},\"contracts/libraries/Deposit.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\r\\n\\r\\npragma solidity ^0.8.1;\\r\\n\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\r\\nimport \\\"./Models.sol\\\";\\r\\n\\r\\nlibrary DepositLib {\\r\\n using SafeERC20 for IERC20;\\r\\n\\r\\n /*\\r\\n * Collect deposit from signer and send it to _to address.\\r\\n * @param _token The deposit token.\\r\\n * @param _amount The deposit amount.\\r\\n * @param _to The address where the deposit should be transfered.\\r\\n */\\r\\n function collectFrom(\\r\\n Models.Deposit memory _collateral,\\r\\n address _from,\\r\\n address _to\\r\\n ) internal {\\r\\n collectFrom(_collateral, _from);\\r\\n releaseTo(_collateral, _to);\\r\\n }\\r\\n\\r\\n /*\\r\\n * Collect deposit from signer\\r\\n * @param _token The deposit token.\\r\\n * @param _amount The deposit amount.\\r\\n */\\r\\n function collectFrom(Models.Deposit memory _collateral, address _from)\\r\\n internal\\r\\n {\\r\\n if (_collateral.amount > 0) {\\r\\n // Verify allowance\\r\\n uint256 allowance = _collateral.token.allowance(\\r\\n _from,\\r\\n address(this)\\r\\n );\\r\\n require(\\r\\n allowance >= _collateral.amount,\\r\\n \\\"ERROR : Deposit bad allowance\\\"\\r\\n );\\r\\n\\r\\n _collateral.token.safeTransferFrom(\\r\\n _from,\\r\\n address(this),\\r\\n _collateral.amount\\r\\n );\\r\\n }\\r\\n }\\r\\n\\r\\n function releaseTo(Models.Deposit memory _collateral, address _to)\\r\\n internal\\r\\n {\\r\\n if (_collateral.amount > 0) {\\r\\n _collateral.token.safeTransfer(_to, _collateral.amount);\\r\\n }\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x00419d7de8fe1cf0e8c06555f8c2929dede75db585aa6c9e8c7a2ff8c91f5051\",\"license\":\"GPL-3.0\"},\"contracts/libraries/Models.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\r\\npragma solidity ^0.8.1;\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\r\\n\\r\\nlibrary Models {\\r\\n struct Deposit {\\r\\n IERC20 token;\\r\\n uint256 amount;\\r\\n }\\r\\n struct Claim {\\r\\n bytes evidence;\\r\\n address player;\\r\\n uint256 amount;\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0xe986229d7b557584748437b549743509e0fe5e41fc02b2d468dbae860612be26\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620015813803806200158183398101604081905262000034916200027d565b8851620000499060019060208c0190620000ed565b5087516200005f9060029060208b0190620000ed565b50600380546001600160a01b03199081166001600160a01b03998a161790915560049690965560058054871695881695909517909455600680548616938716939093179092556000805485169386169390931790925560408051808201909152919093168082526020909101839052600880549092161790556009555050600a805460ff19169055620003bf565b828054620000fb906200036c565b90600052602060002090601f0160209004810192826200011f57600085556200016a565b82601f106200013a57805160ff19168380011785556200016a565b828001600101855582156200016a579182015b828111156200016a5782518255916020019190600101906200014d565b50620001789291506200017c565b5090565b5b808211156200017857600081556001016200017d565b60006001600160401b0380841115620001b057620001b0620003a9565b604051601f8501601f19908116603f01168101908282118183101715620001db57620001db620003a9565b81604052809350858152868686011115620001f557600080fd5b600092505b858310156200021a578285015160208483010152602083019250620001fa565b858311156200022d576000602087830101525b5050509392505050565b80516001600160a01b03811681146200024f57600080fd5b919050565b600082601f83011262000265578081fd5b620002768383516020850162000193565b9392505050565b60008060008060008060008060006101208a8c0312156200029c578485fd5b89516001600160401b0380821115620002b3578687fd5b818c0191508c601f830112620002c7578687fd5b620002d88d83516020850162000193565b9a5060208c0151915080821115620002ee578687fd5b50620002fd8c828d0162000254565b9850506200030e60408b0162000237565b965060608a015195506200032560808b0162000237565b94506200033560a08b0162000237565b93506200034560c08b0162000237565b925060e08a015191506200035d6101008b0162000237565b90509295985092959850929598565b6002810460018216806200038157607f821691505b60208210811415620003a357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6111b280620003cf6000396000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c8063b0a87ac111610081578063e0c234231161005b578063e0c2342314610186578063f294cf381461019b578063f7c618c1146101a3576100d4565b8063b0a87ac114610155578063b434151c1461015d578063d0e30db014610170576100d4565b80637ceae310116100b25780637ceae31014610116578063990cc4891461011e578063a888c2cd14610133576100d4565b8063310a1ee3146100d9578063579ca2c9146100f75780636c3a4cce14610101575b600080fd5b6100e16101ab565b6040516100ee91906110af565b60405180910390f35b6100ff6101b1565b005b610109610338565b6040516100ee9190610e1c565b610109610354565b610126610370565b6040516100ee9190610e63565b610146610141366004610d86565b610379565b6040516100ee93929190610e81565b610109610452565b6100ff61016b366004610c91565b61046e565b6101786107a2565b6040516100ee929190610e3d565b61018e6107c4565b6040516100ee9190610e6e565b61018e610852565b61010961085f565b60045481565b60045442116101f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610f76565b60405180910390fd5b600a5460ff16610267576000546040805180820190915260085473ffffffffffffffffffffffffffffffffffffffff9081168252600954602083015261023b921661087b565b600a80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b6006546003546040517f70a082310000000000000000000000000000000000000000000000000000000081526103369273ffffffffffffffffffffffffffffffffffffffff9081169216906370a08231906102c6903090600401610e1c565b60206040518083038186803b1580156102de57600080fd5b505afa1580156102f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103169190610d9e565b60035473ffffffffffffffffffffffffffffffffffffffff1691906108b4565b565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b600a5460ff1681565b6007818154811061038957600080fd5b90600052602060002090600302016000915090508060000180546103ac906110e8565b80601f01602080910402602001604051908101604052809291908181526020018280546103d8906110e8565b80156104255780601f106103fa57610100808354040283529160200191610425565b820191906000526020600020905b81548152906001019060200180831161040857829003601f168201915b505050506001830154600290930154919273ffffffffffffffffffffffffffffffffffffffff1691905083565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60055473ffffffffffffffffffffffffffffffffffffffff1633146104bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610fad565b83516104f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec9061101b565b6003546040517f70a0823100000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319061054e903090600401610e1c565b60206040518083038186803b15801561056657600080fd5b505afa15801561057a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059e9190610d9e565b905081156105eb5760085460035473ffffffffffffffffffffffffffffffffffffffff908116911614156105e7576009546000906105dd90839061095a565b94506105eb915050565b8092505b60085460035473ffffffffffffffffffffffffffffffffffffffff9081169116141561066157600061061d828561095a565b91505060086001015481101561065f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610ebc565b505b821561068b5760035461068b9073ffffffffffffffffffffffffffffffffffffffff1685856108b4565b6040805160608101825286815273ffffffffffffffffffffffffffffffffffffffff86166020808301919091529181018590526007805460018101825560009190915281518051929360039092027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68801926107099284920190610bad565b5060208201516001820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055604091820151600290910155517fa1c3b325aa2c115e4b244062eba2515bc5585ae5b41556be8fef399ae9fde11b9061079390879087908790610e81565b60405180910390a15050505050565b60085460095473ffffffffffffffffffffffffffffffffffffffff9091169082565b600280546107d1906110e8565b80601f01602080910402602001604051908101604052809291908181526020018280546107fd906110e8565b801561084a5780601f1061081f5761010080835404028352916020019161084a565b820191906000526020600020905b81548152906001019060200180831161082d57829003601f168201915b505050505081565b600180546107d1906110e8565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b6020820151156108b057602082015182516108b09173ffffffffffffffffffffffffffffffffffffffff9091169083906108b4565b5050565b6109558363a9059cbb60e01b84846040516024016108d3929190610e3d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610980565b505050565b6000808383111561097057506000905080610979565b50600190508183035b9250929050565b60006109e2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610a369092919063ffffffff16565b8051909150156109555780806020019051810190610a009190610c75565b610955576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90611052565b6060610a458484600085610a4f565b90505b9392505050565b606082471015610a8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610f19565b610a9485610b50565b610aca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610fe4565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610af39190610e00565b60006040518083038185875af1925050503d8060008114610b30576040519150601f19603f3d011682016040523d82523d6000602084013e610b35565b606091505b5091509150610b45828286610b5a565b979650505050505050565b803b15155b919050565b60608315610b69575081610a48565b825115610b795782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec9190610e6e565b828054610bb9906110e8565b90600052602060002090601f016020900481019282610bdb5760008555610c21565b82601f10610bf457805160ff1916838001178555610c21565b82800160010185558215610c21579182015b82811115610c21578251825591602001919060010190610c06565b50610c2d929150610c31565b5090565b5b80821115610c2d5760008155600101610c32565b803573ffffffffffffffffffffffffffffffffffffffff81168114610b5557600080fd5b8035610b558161116b565b600060208284031215610c86578081fd5b8151610a488161116b565b60008060008060808587031215610ca6578283fd5b843567ffffffffffffffff80821115610cbd578485fd5b818701915087601f830112610cd0578485fd5b813581811115610ce257610ce261113c565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610d2857610d2861113c565b816040528281528a6020848701011115610d40578788fd5b8260208601602083013787602084830101528098505050505050610d6660208601610c46565b925060408501359150610d7b60608601610c6a565b905092959194509250565b600060208284031215610d97578081fd5b5035919050565b600060208284031215610daf578081fd5b5051919050565b60008151808452610dce8160208601602086016110b8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251610e128184602087016110b8565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b600060208252610a486020830184610db6565b600060608252610e946060830186610db6565b73ffffffffffffffffffffffffffffffffffffffff9490941660208301525060400152919050565b60208082526027908201527f4552524f523a2053686f756c64206e6f742065786365656420616c6c6f77656460408201527f20626f756e747900000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b60208082526012908201527f4552524f523a204e6f7420657870697265640000000000000000000000000000604082015260600190565b60208082526018908201527f4552524f523a2053656e646572206e6f7420676f7665726e0000000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526012908201527f4552524f523a204e6f2065766964656e63650000000000000000000000000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b90815260200190565b60005b838110156110d35781810151838201526020016110bb565b838111156110e2576000848401525b50505050565b6002810460018216806110fc57607f821691505b60208210811415611136577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b801515811461117957600080fd5b5056fea2646970667358221220ed56507b634ebeaae309509ea680f90e736b7873ed34daf4d911bd38dce7becb64736f6c63430008010033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100d45760003560e01c8063b0a87ac111610081578063e0c234231161005b578063e0c2342314610186578063f294cf381461019b578063f7c618c1146101a3576100d4565b8063b0a87ac114610155578063b434151c1461015d578063d0e30db014610170576100d4565b80637ceae310116100b25780637ceae31014610116578063990cc4891461011e578063a888c2cd14610133576100d4565b8063310a1ee3146100d9578063579ca2c9146100f75780636c3a4cce14610101575b600080fd5b6100e16101ab565b6040516100ee91906110af565b60405180910390f35b6100ff6101b1565b005b610109610338565b6040516100ee9190610e1c565b610109610354565b610126610370565b6040516100ee9190610e63565b610146610141366004610d86565b610379565b6040516100ee93929190610e81565b610109610452565b6100ff61016b366004610c91565b61046e565b6101786107a2565b6040516100ee929190610e3d565b61018e6107c4565b6040516100ee9190610e6e565b61018e610852565b61010961085f565b60045481565b60045442116101f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610f76565b60405180910390fd5b600a5460ff16610267576000546040805180820190915260085473ffffffffffffffffffffffffffffffffffffffff9081168252600954602083015261023b921661087b565b600a80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b6006546003546040517f70a082310000000000000000000000000000000000000000000000000000000081526103369273ffffffffffffffffffffffffffffffffffffffff9081169216906370a08231906102c6903090600401610e1c565b60206040518083038186803b1580156102de57600080fd5b505afa1580156102f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103169190610d9e565b60035473ffffffffffffffffffffffffffffffffffffffff1691906108b4565b565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b600a5460ff1681565b6007818154811061038957600080fd5b90600052602060002090600302016000915090508060000180546103ac906110e8565b80601f01602080910402602001604051908101604052809291908181526020018280546103d8906110e8565b80156104255780601f106103fa57610100808354040283529160200191610425565b820191906000526020600020905b81548152906001019060200180831161040857829003601f168201915b505050506001830154600290930154919273ffffffffffffffffffffffffffffffffffffffff1691905083565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60055473ffffffffffffffffffffffffffffffffffffffff1633146104bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610fad565b83516104f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec9061101b565b6003546040517f70a0823100000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319061054e903090600401610e1c565b60206040518083038186803b15801561056657600080fd5b505afa15801561057a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059e9190610d9e565b905081156105eb5760085460035473ffffffffffffffffffffffffffffffffffffffff908116911614156105e7576009546000906105dd90839061095a565b94506105eb915050565b8092505b60085460035473ffffffffffffffffffffffffffffffffffffffff9081169116141561066157600061061d828561095a565b91505060086001015481101561065f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610ebc565b505b821561068b5760035461068b9073ffffffffffffffffffffffffffffffffffffffff1685856108b4565b6040805160608101825286815273ffffffffffffffffffffffffffffffffffffffff86166020808301919091529181018590526007805460018101825560009190915281518051929360039092027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68801926107099284920190610bad565b5060208201516001820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055604091820151600290910155517fa1c3b325aa2c115e4b244062eba2515bc5585ae5b41556be8fef399ae9fde11b9061079390879087908790610e81565b60405180910390a15050505050565b60085460095473ffffffffffffffffffffffffffffffffffffffff9091169082565b600280546107d1906110e8565b80601f01602080910402602001604051908101604052809291908181526020018280546107fd906110e8565b801561084a5780601f1061081f5761010080835404028352916020019161084a565b820191906000526020600020905b81548152906001019060200180831161082d57829003601f168201915b505050505081565b600180546107d1906110e8565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b6020820151156108b057602082015182516108b09173ffffffffffffffffffffffffffffffffffffffff9091169083906108b4565b5050565b6109558363a9059cbb60e01b84846040516024016108d3929190610e3d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610980565b505050565b6000808383111561097057506000905080610979565b50600190508183035b9250929050565b60006109e2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610a369092919063ffffffff16565b8051909150156109555780806020019051810190610a009190610c75565b610955576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90611052565b6060610a458484600085610a4f565b90505b9392505050565b606082471015610a8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610f19565b610a9485610b50565b610aca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610fe4565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610af39190610e00565b60006040518083038185875af1925050503d8060008114610b30576040519150601f19603f3d011682016040523d82523d6000602084013e610b35565b606091505b5091509150610b45828286610b5a565b979650505050505050565b803b15155b919050565b60608315610b69575081610a48565b825115610b795782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec9190610e6e565b828054610bb9906110e8565b90600052602060002090601f016020900481019282610bdb5760008555610c21565b82601f10610bf457805160ff1916838001178555610c21565b82800160010185558215610c21579182015b82811115610c21578251825591602001919060010190610c06565b50610c2d929150610c31565b5090565b5b80821115610c2d5760008155600101610c32565b803573ffffffffffffffffffffffffffffffffffffffff81168114610b5557600080fd5b8035610b558161116b565b600060208284031215610c86578081fd5b8151610a488161116b565b60008060008060808587031215610ca6578283fd5b843567ffffffffffffffff80821115610cbd578485fd5b818701915087601f830112610cd0578485fd5b813581811115610ce257610ce261113c565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610d2857610d2861113c565b816040528281528a6020848701011115610d40578788fd5b8260208601602083013787602084830101528098505050505050610d6660208601610c46565b925060408501359150610d7b60608601610c6a565b905092959194509250565b600060208284031215610d97578081fd5b5035919050565b600060208284031215610daf578081fd5b5051919050565b60008151808452610dce8160208601602086016110b8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251610e128184602087016110b8565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b600060208252610a486020830184610db6565b600060608252610e946060830186610db6565b73ffffffffffffffffffffffffffffffffffffffff9490941660208301525060400152919050565b60208082526027908201527f4552524f523a2053686f756c64206e6f742065786365656420616c6c6f77656460408201527f20626f756e747900000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b60208082526012908201527f4552524f523a204e6f7420657870697265640000000000000000000000000000604082015260600190565b60208082526018908201527f4552524f523a2053656e646572206e6f7420676f7665726e0000000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526012908201527f4552524f523a204e6f2065766964656e63650000000000000000000000000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b90815260200190565b60005b838110156110d35781810151838201526020016110bb565b838111156110e2576000848401525b50505050565b6002810460018216806110fc57607f821691505b60208210811415611136577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b801515811461117957600080fd5b5056fea2646970667358221220ed56507b634ebeaae309509ea680f90e736b7873ed34daf4d911bd38dce7becb64736f6c63430008010033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1629, + "contract": "contracts/Quest.sol:Quest", + "label": "questCreator", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 1631, + "contract": "contracts/Quest.sol:Quest", + "label": "questTitle", + "offset": 0, + "slot": "1", + "type": "t_string_storage" + }, + { + "astId": 1633, + "contract": "contracts/Quest.sol:Quest", + "label": "questDetailsRef", + "offset": 0, + "slot": "2", + "type": "t_bytes_storage" + }, + { + "astId": 1636, + "contract": "contracts/Quest.sol:Quest", + "label": "rewardToken", + "offset": 0, + "slot": "3", + "type": "t_contract(IERC20)728" + }, + { + "astId": 1638, + "contract": "contracts/Quest.sol:Quest", + "label": "expireTime", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 1640, + "contract": "contracts/Quest.sol:Quest", + "label": "aragonGovernAddress", + "offset": 0, + "slot": "5", + "type": "t_address" + }, + { + "astId": 1642, + "contract": "contracts/Quest.sol:Quest", + "label": "fundsRecoveryAddress", + "offset": 0, + "slot": "6", + "type": "t_address_payable" + }, + { + "astId": 1646, + "contract": "contracts/Quest.sol:Quest", + "label": "claims", + "offset": 0, + "slot": "7", + "type": "t_array(t_struct(Claim)2196_storage)dyn_storage" + }, + { + "astId": 1649, + "contract": "contracts/Quest.sol:Quest", + "label": "deposit", + "offset": 0, + "slot": "8", + "type": "t_struct(Deposit)2189_storage" + }, + { + "astId": 1651, + "contract": "contracts/Quest.sol:Quest", + "label": "isDepositReleased", + "offset": 0, + "slot": "10", + "type": "t_bool" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_address_payable": { + "encoding": "inplace", + "label": "address payable", + "numberOfBytes": "20" + }, + "t_array(t_struct(Claim)2196_storage)dyn_storage": { + "base": "t_struct(Claim)2196_storage", + "encoding": "dynamic_array", + "label": "struct Models.Claim[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes_storage": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_contract(IERC20)728": { + "encoding": "inplace", + "label": "contract IERC20", + "numberOfBytes": "20" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Claim)2196_storage": { + "encoding": "inplace", + "label": "struct Models.Claim", + "members": [ + { + "astId": 2191, + "contract": "contracts/Quest.sol:Quest", + "label": "evidence", + "offset": 0, + "slot": "0", + "type": "t_bytes_storage" + }, + { + "astId": 2193, + "contract": "contracts/Quest.sol:Quest", + "label": "player", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 2195, + "contract": "contracts/Quest.sol:Quest", + "label": "amount", + "offset": 0, + "slot": "2", + "type": "t_uint256" + } + ], + "numberOfBytes": "96" + }, + "t_struct(Deposit)2189_storage": { + "encoding": "inplace", + "label": "struct Models.Deposit", + "members": [ + { + "astId": 2186, + "contract": "contracts/Quest.sol:Quest", + "label": "token", + "offset": 0, + "slot": "0", + "type": "t_contract(IERC20)728" + }, + { + "astId": 2188, + "contract": "contracts/Quest.sol:Quest", + "label": "amount", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/packages/hardhat/deployments/xdai/QuestFactory.json b/packages/hardhat/deployments/xdai/QuestFactory.json new file mode 100644 index 00000000..961d3840 --- /dev/null +++ b/packages/hardhat/deployments/xdai/QuestFactory.json @@ -0,0 +1,412 @@ +{ + "address": "0x4a3127598257B5A0404b858E134Cf5e1c3cAe137", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_aragonGovernAddress", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "_depositToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_depositAmount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_initialOwner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "DepositChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "questAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "questTitle", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "questDetailsRef", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "address", + "name": "rewardTokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "expireTime", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "fundsRecoveryAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "depositToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "depositAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "creator", + "type": "address" + } + ], + "name": "QuestCreated", + "type": "event" + }, + { + "inputs": [], + "name": "aragonGovernAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_questTitle", + "type": "string" + }, + { + "internalType": "bytes", + "name": "_questDetailsRef", + "type": "bytes" + }, + { + "internalType": "contract IERC20", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_expireTime", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_fundsRecoveryAddress", + "type": "address" + } + ], + "name": "createQuest", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "setDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x3ed7486490b75dbe2ef15e93bfcb7698213dde991ddcebe7ab5fd3b674599d4d", + "receipt": { + "to": null, + "from": "0x91B0d67D3F47A30FBEeB159E67209Ad6cb2cE22E", + "contractAddress": "0x4a3127598257B5A0404b858E134Cf5e1c3cAe137", + "transactionIndex": 5, + "gasUsed": "2274326", + "logsBloom": "0x00000000000000000000000000000100000000000000000000800000004000002000000000000000000000000000000000000000000000000080000000000000000000000000000000040000000000000001000000000000000000000020000000000000020000000000000000000800000000000000000400000000000000400040000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000008000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x22f1706183a25f5b31c2bbcb3408c01f7951ec9bd3c484a5222ab385dfda30cf", + "transactionHash": "0x3ed7486490b75dbe2ef15e93bfcb7698213dde991ddcebe7ab5fd3b674599d4d", + "logs": [ + { + "transactionIndex": 5, + "blockNumber": 22446141, + "transactionHash": "0x3ed7486490b75dbe2ef15e93bfcb7698213dde991ddcebe7ab5fd3b674599d4d", + "address": "0x4a3127598257B5A0404b858E134Cf5e1c3cAe137", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000091b0d67d3f47a30fbeeb159e67209ad6cb2ce22e" + ], + "data": "0x", + "logIndex": 19, + "blockHash": "0x22f1706183a25f5b31c2bbcb3408c01f7951ec9bd3c484a5222ab385dfda30cf" + }, + { + "transactionIndex": 5, + "blockNumber": 22446141, + "transactionHash": "0x3ed7486490b75dbe2ef15e93bfcb7698213dde991ddcebe7ab5fd3b674599d4d", + "address": "0x4a3127598257B5A0404b858E134Cf5e1c3cAe137", + "topics": [ + "0x556f88907cfe81bbd1433b2c2ba3860920f0b50b218c55ca0a060558e7ca4199" + ], + "data": "0x000000000000000000000000000000000000000000000000000000006297d50800000000000000000000000071850b7e9ee3f13ab46d67167341e4bdc905eef9000000000000000000000000000000000000000000000000016345785d8a0000", + "logIndex": 20, + "blockHash": "0x22f1706183a25f5b31c2bbcb3408c01f7951ec9bd3c484a5222ab385dfda30cf" + }, + { + "transactionIndex": 5, + "blockNumber": 22446141, + "transactionHash": "0x3ed7486490b75dbe2ef15e93bfcb7698213dde991ddcebe7ab5fd3b674599d4d", + "address": "0x4a3127598257B5A0404b858E134Cf5e1c3cAe137", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x00000000000000000000000091b0d67d3f47a30fbeeb159e67209ad6cb2ce22e", + "0x0000000000000000000000007375ed576952bd6ced060eee2db763130ea13ba0" + ], + "data": "0x", + "logIndex": 21, + "blockHash": "0x22f1706183a25f5b31c2bbcb3408c01f7951ec9bd3c484a5222ab385dfda30cf" + } + ], + "blockNumber": 22446141, + "cumulativeGasUsed": "2907003", + "status": 1, + "byzantium": true + }, + "args": [ + "0xC6b74c1416eA7D76d4E4808c990F6fb91954Ff1C", + "0x71850b7E9Ee3f13Ab46d67167341E4bDc905Eef9", + "100000000000000000", + "0x7375Ed576952BD6CeD060EeE2Db763130eA13bA0" + ], + "solcInputHash": "55762042aa62f69cb5859e68ffbc45e6", + "metadata": "{\"compiler\":{\"version\":\"0.8.1+commit.df193b15\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_aragonGovernAddress\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"_depositToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_depositAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_initialOwner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"DepositChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"questAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"questTitle\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"questDetailsRef\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"rewardTokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expireTime\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"fundsRecoveryAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"depositToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"depositAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"name\":\"QuestCreated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"aragonGovernAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_questTitle\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"_questDetailsRef\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_rewardToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_expireTime\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_fundsRecoveryAddress\",\"type\":\"address\"}],\"name\":\"createQuest\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"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.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/QuestFactory.sol\":\"QuestFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":20000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x24e0364e503a9bbde94c715d26573a76f14cd2a202d45f96f52134ab806b67b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0x61437cb513a887a1bbad006e7b1c8b414478427d33de47c5600af3c748f108da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) {\\n // Return data is optional\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc3d946432c0ddbb1f846a0d3985be71299df331b91d06732152117f62f0be2b5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x51b758a8815ecc9596c66c37d56b1d33883a444631a3f916b9fe65cb863ef7c4\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa2f576be637946f767aa56601c26d717f48a0aff44f82e46f13807eea1009a21\",\"license\":\"MIT\"},\"contracts/Quest.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\r\\npragma solidity ^0.8.1;\\r\\n\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\r\\nimport \\\"./libraries/Deposit.sol\\\";\\r\\nimport \\\"./libraries/Models.sol\\\";\\r\\nimport \\\"./QuestFactory.sol\\\";\\r\\n\\r\\ncontract Quest {\\r\\n using SafeMath for uint256;\\r\\n using SafeERC20 for IERC20;\\r\\n using DepositLib for Models.Deposit;\\r\\n\\r\\n address public questCreator;\\r\\n string public questTitle;\\r\\n bytes public questDetailsRef;\\r\\n IERC20 public rewardToken;\\r\\n uint256 public expireTime;\\r\\n address public aragonGovernAddress;\\r\\n address payable public fundsRecoveryAddress;\\r\\n Models.Claim[] public claims;\\r\\n Models.Deposit public deposit;\\r\\n bool public isDepositReleased;\\r\\n\\r\\n event QuestClaimed(bytes evidence, address player, uint256 amount);\\r\\n\\r\\n constructor(\\r\\n string memory _questTitle,\\r\\n bytes memory _questDetailsRef,\\r\\n IERC20 _rewardToken,\\r\\n uint256 _expireTime,\\r\\n address _aragonGovernAddress,\\r\\n address payable _fundsRecoveryAddress,\\r\\n IERC20 _depositToken,\\r\\n uint256 _depositAmount,\\r\\n address _questCreator\\r\\n ) {\\r\\n questTitle = _questTitle;\\r\\n questDetailsRef = _questDetailsRef;\\r\\n rewardToken = _rewardToken;\\r\\n expireTime = _expireTime;\\r\\n aragonGovernAddress = _aragonGovernAddress;\\r\\n fundsRecoveryAddress = _fundsRecoveryAddress;\\r\\n questCreator = _questCreator;\\r\\n deposit = Models.Deposit(_depositToken, _depositAmount);\\r\\n isDepositReleased = false;\\r\\n }\\r\\n\\r\\n /*\\r\\n * Release deposit to creator and send unused funds to fundsRecoveryAddress.\\r\\n * requires quests to have expired\\r\\n */\\r\\n function recoverFundsAndDeposit() external {\\r\\n require(block.timestamp > expireTime, \\\"ERROR: Not expired\\\");\\r\\n\\r\\n // Restore deposit if not already released\\r\\n if (!isDepositReleased) {\\r\\n deposit.releaseTo(questCreator);\\r\\n isDepositReleased = true;\\r\\n }\\r\\n\\r\\n rewardToken.safeTransfer(\\r\\n fundsRecoveryAddress,\\r\\n rewardToken.balanceOf(address(this))\\r\\n );\\r\\n }\\r\\n\\r\\n /*\\r\\n * Claim a quest reward.\\r\\n * @param _evidence Evidence of the claim.\\r\\n * @param _player Player address.\\r\\n * @param _amount Amount of the reward.\\r\\n * requires sender to be aragonGovernAddress\\r\\n * requires evidence to not be empty\\r\\n * requires claim amount to not exceed available deposit when same token\\r\\n * emit QuestClaimed\\r\\n */\\r\\n function claim(\\r\\n bytes memory _evidence,\\r\\n address _player,\\r\\n uint256 _amount,\\r\\n bool _claimAll\\r\\n ) external {\\r\\n require(msg.sender == aragonGovernAddress, \\\"ERROR: Sender not govern\\\");\\r\\n require(_evidence.length != 0, \\\"ERROR: No evidence\\\");\\r\\n uint256 balance = rewardToken.balanceOf(address(this));\\r\\n\\r\\n if (_claimAll) {\\r\\n // Claim all but let deposit if they are same token\\r\\n if (address(rewardToken) == address(deposit.token)) {\\r\\n (, uint256 result) = balance.trySub(deposit.amount);\\r\\n _amount = result;\\r\\n } else {\\r\\n _amount = balance;\\r\\n }\\r\\n }\\r\\n\\r\\n if (address(rewardToken) == address(deposit.token)) {\\r\\n (, uint256 result) = balance.trySub(_amount);\\r\\n require(\\r\\n result >= deposit.amount,\\r\\n \\\"ERROR: Should not exceed allowed bounty\\\"\\r\\n );\\r\\n }\\r\\n\\r\\n if (_amount > 0) {\\r\\n rewardToken.safeTransfer(_player, _amount);\\r\\n }\\r\\n\\r\\n claims.push(Models.Claim(_evidence, _player, _amount));\\r\\n\\r\\n emit QuestClaimed(_evidence, _player, _amount);\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x716b3fb1a3217a932100c374c16545fafc7782556fe33866a0a75257202d7d16\",\"license\":\"GPL-3.0\"},\"contracts/QuestFactory.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\r\\npragma solidity ^0.8.1;\\r\\n\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\r\\nimport \\\"./libraries/Deposit.sol\\\";\\r\\nimport \\\"./libraries/Models.sol\\\";\\r\\nimport \\\"./Quest.sol\\\";\\r\\n\\r\\ncontract QuestFactory is Ownable {\\r\\n using DepositLib for Models.Deposit;\\r\\n\\r\\n address public aragonGovernAddress;\\r\\n Models.Deposit public deposit;\\r\\n\\r\\n event QuestCreated(\\r\\n address questAddress,\\r\\n string questTitle,\\r\\n bytes questDetailsRef,\\r\\n address rewardTokenAddress,\\r\\n uint256 expireTime,\\r\\n address fundsRecoveryAddress,\\r\\n address depositToken,\\r\\n uint256 depositAmount,\\r\\n address creator\\r\\n );\\r\\n\\r\\n event DepositChanged(uint256 timestamp, address token, uint256 amount);\\r\\n\\r\\n constructor(\\r\\n address _aragonGovernAddress,\\r\\n IERC20 _depositToken,\\r\\n uint256 _depositAmount,\\r\\n address _initialOwner\\r\\n ) {\\r\\n aragonGovernAddress = _aragonGovernAddress;\\r\\n setDeposit(_depositToken, _depositAmount);\\r\\n if (_initialOwner != msg.sender) {\\r\\n transferOwnership(_initialOwner);\\r\\n }\\r\\n }\\r\\n\\r\\n /*\\r\\n * @dev Set the deposit token and amount.\\r\\n * @param _depositToken The deposit token.\\r\\n * @param _depositAmount The deposit amount.\\r\\n * emit DepositChanged\\r\\n */\\r\\n function setDeposit(IERC20 token, uint256 amount) public onlyOwner {\\r\\n deposit = Models.Deposit(token, amount);\\r\\n emit DepositChanged(block.timestamp, address(token), amount);\\r\\n }\\r\\n\\r\\n /*\\r\\n * Collect deposit, deploy a new Quest with given info contract\\r\\n * and transfer deposit to new Quest.\\r\\n * @param _title Quest title.\\r\\n * @param _details Quest details.\\r\\n * @param _rewardTokenAddress Reward token address.\\r\\n * @param _expireTime Expire time.\\r\\n * @param _fundsRecoveryAddress Funds recovery address.\\r\\n * requires deposit allowance\\r\\n * returns Quest address.\\r\\n * emits QuestCreated\\r\\n */\\r\\n function createQuest(\\r\\n string memory _questTitle,\\r\\n bytes memory _questDetailsRef,\\r\\n IERC20 _rewardToken,\\r\\n uint256 _expireTime,\\r\\n address payable _fundsRecoveryAddress\\r\\n ) external returns (address) {\\r\\n Quest quest = new Quest(\\r\\n _questTitle,\\r\\n _questDetailsRef,\\r\\n _rewardToken,\\r\\n _expireTime,\\r\\n aragonGovernAddress,\\r\\n _fundsRecoveryAddress,\\r\\n deposit.token,\\r\\n deposit.amount,\\r\\n msg.sender\\r\\n );\\r\\n\\r\\n // Collect deposit from quest creator and send it to quest\\r\\n deposit.collectFrom(msg.sender, address(quest));\\r\\n\\r\\n emit QuestCreated(\\r\\n address(quest),\\r\\n _questTitle,\\r\\n _questDetailsRef,\\r\\n address(_rewardToken),\\r\\n _expireTime,\\r\\n _fundsRecoveryAddress,\\r\\n address(deposit.token),\\r\\n deposit.amount,\\r\\n msg.sender\\r\\n );\\r\\n\\r\\n return address(quest);\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x05a05ddc2bf42d75c2379cd539cdac2702a3a2cfafad5b159e76909bc28d608a\",\"license\":\"GPL-3.0\"},\"contracts/libraries/Deposit.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\r\\n\\r\\npragma solidity ^0.8.1;\\r\\n\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\r\\nimport \\\"./Models.sol\\\";\\r\\n\\r\\nlibrary DepositLib {\\r\\n using SafeERC20 for IERC20;\\r\\n\\r\\n /*\\r\\n * Collect deposit from signer and send it to _to address.\\r\\n * @param _token The deposit token.\\r\\n * @param _amount The deposit amount.\\r\\n * @param _to The address where the deposit should be transfered.\\r\\n */\\r\\n function collectFrom(\\r\\n Models.Deposit memory _collateral,\\r\\n address _from,\\r\\n address _to\\r\\n ) internal {\\r\\n collectFrom(_collateral, _from);\\r\\n releaseTo(_collateral, _to);\\r\\n }\\r\\n\\r\\n /*\\r\\n * Collect deposit from signer\\r\\n * @param _token The deposit token.\\r\\n * @param _amount The deposit amount.\\r\\n */\\r\\n function collectFrom(Models.Deposit memory _collateral, address _from)\\r\\n internal\\r\\n {\\r\\n if (_collateral.amount > 0) {\\r\\n // Verify allowance\\r\\n uint256 allowance = _collateral.token.allowance(\\r\\n _from,\\r\\n address(this)\\r\\n );\\r\\n require(\\r\\n allowance >= _collateral.amount,\\r\\n \\\"ERROR : Deposit bad allowance\\\"\\r\\n );\\r\\n\\r\\n _collateral.token.safeTransferFrom(\\r\\n _from,\\r\\n address(this),\\r\\n _collateral.amount\\r\\n );\\r\\n }\\r\\n }\\r\\n\\r\\n function releaseTo(Models.Deposit memory _collateral, address _to)\\r\\n internal\\r\\n {\\r\\n if (_collateral.amount > 0) {\\r\\n _collateral.token.safeTransfer(_to, _collateral.amount);\\r\\n }\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x00419d7de8fe1cf0e8c06555f8c2929dede75db585aa6c9e8c7a2ff8c91f5051\",\"license\":\"GPL-3.0\"},\"contracts/libraries/Models.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\r\\npragma solidity ^0.8.1;\\r\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\r\\n\\r\\nlibrary Models {\\r\\n struct Deposit {\\r\\n IERC20 token;\\r\\n uint256 amount;\\r\\n }\\r\\n struct Claim {\\r\\n bytes evidence;\\r\\n address player;\\r\\n uint256 amount;\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0xe986229d7b557584748437b549743509e0fe5e41fc02b2d468dbae860612be26\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620029cb380380620029cb83398101604081905262000034916200023a565b620000486200004262000095565b62000099565b600180546001600160a01b0319166001600160a01b0386161790556200006f8383620000e9565b6001600160a01b03811633146200008b576200008b81620001ae565b5050505062000345565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b620000f362000095565b6001600160a01b0316620001066200022b565b6001600160a01b031614620001385760405162461bcd60e51b81526004016200012f90620002db565b60405180910390fd5b6040805180820182526001600160a01b0384168082526020909101839052600280546001600160a01b03191690911790556003829055517f556f88907cfe81bbd1433b2c2ba3860920f0b50b218c55ca0a060558e7ca419990620001a29042908590859062000310565b60405180910390a15050565b620001b862000095565b6001600160a01b0316620001cb6200022b565b6001600160a01b031614620001f45760405162461bcd60e51b81526004016200012f90620002db565b6001600160a01b0381166200021d5760405162461bcd60e51b81526004016200012f9062000295565b620002288162000099565b50565b6000546001600160a01b031690565b6000806000806080858703121562000250578384fd5b84516200025d816200032f565b602086015190945062000270816200032f565b6040860151606087015191945092506200028a816200032f565b939692955090935050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b9283526001600160a01b03919091166020830152604082015260600190565b6001600160a01b03811681146200022857600080fd5b61267680620003556000396000f3fe60806040523480156200001157600080fd5b5060043610620000885760003560e01c8063b0a87ac11162000063578063b0a87ac114620000d2578063c6b21b0214620000dc578063d0e30db014620000f3578063f2fde38b146200010d5762000088565b8063715018a6146200008d5780638da5cb5b1462000099578063abec0a0314620000bb575b600080fd5b6200009762000124565b005b620000a3620001b5565b604051620000b2919062000ca0565b60405180910390f35b620000a3620000cc36600462000b5b565b620001d1565b620000a3620002f5565b62000097620000ed36600462000b2d565b62000311565b620000fd62000426565b604051620000b292919062000d9a565b620000976200011e36600462000aec565b62000448565b6200012e62000520565b73ffffffffffffffffffffffffffffffffffffffff166200014e620001b5565b73ffffffffffffffffffffffffffffffffffffffff1614620001a7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e9062000f12565b60405180910390fd5b620001b3600062000524565b565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60015460025460035460405160009384938a938a938a938a9373ffffffffffffffffffffffffffffffffffffffff918216938b9392909116913390620002179062000a36565b6200022b9998979695949392919062000dd5565b604051809103906000f08015801562000248573d6000803e3d6000fd5b506040805180820190915260025473ffffffffffffffffffffffffffffffffffffffff16815260035460208201529091506200028690338362000599565b6002546003546040517f4cf18b7944786d158010105e0d058cfa9ca46ad789d42eb9b6fa9490be2a44f792620002e39285928c928c928c928c928c9273ffffffffffffffffffffffffffffffffffffffff90911691339062000d19565b60405180910390a19695505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b6200031b62000520565b73ffffffffffffffffffffffffffffffffffffffff166200033b620001b5565b73ffffffffffffffffffffffffffffffffffffffff16146200038b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e9062000f12565b60408051808201825273ffffffffffffffffffffffffffffffffffffffff84168082526020909101839052600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001690911790556003829055517f556f88907cfe81bbd1433b2c2ba3860920f0b50b218c55ca0a060558e7ca4199906200041a9042908590859062001012565b60405180910390a15050565b60025460035473ffffffffffffffffffffffffffffffffffffffff9091169082565b6200045262000520565b73ffffffffffffffffffffffffffffffffffffffff1662000472620001b5565b73ffffffffffffffffffffffffffffffffffffffff1614620004c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e9062000f12565b73ffffffffffffffffffffffffffffffffffffffff811662000512576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e9062000e58565b6200051d8162000524565b50565b3390565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b620005a58383620005b6565b620005b18382620006e5565b505050565b602082015115620006e15781516040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff169063dd62ed3e906200061b908590309060040162000cc1565b60206040518083038186803b1580156200063457600080fd5b505afa15801562000649573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200066f919062000c1d565b90508260200151811015620006b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e9062000f47565b60208301518351620005b19173ffffffffffffffffffffffffffffffffffffffff90911690849030906200071d565b5050565b602082015115620006e15760208201518251620006e19173ffffffffffffffffffffffffffffffffffffffff909116908390620007ca565b620007c4846323b872dd60e01b858585604051602401620007419392919062000ce8565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152620007ec565b50505050565b620005b18363a9059cbb60e01b84846040516024016200074192919062000d9a565b600062000850826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16620008aa9092919063ffffffff16565b805190915015620005b1578080602001905181019062000871919062000b0b565b620005b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e9062000fb5565b6060620008bb8484600085620008c5565b90505b9392505050565b60608247101562000904576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e9062000eb5565b6200090f85620009d4565b62000948576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e9062000f7e565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405162000973919062000c82565b60006040518083038185875af1925050503d8060008114620009b2576040519150601f19603f3d011682016040523d82523d6000602084013e620009b7565b606091505b5091509150620009c9828286620009de565b979650505050505050565b803b15155b919050565b60608315620009ef575081620008be565b82511562000a005782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e919062000dc0565b61158180620010c083390190565b600067ffffffffffffffff8084111562000a625762000a626200106d565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171562000aab5762000aab6200106d565b8160405280935085815286868601111562000ac557600080fd5b858560208301376000602087830101525050509392505050565b8035620009d9816200109c565b60006020828403121562000afe578081fd5b8135620008be816200109c565b60006020828403121562000b1d578081fd5b81518015158114620008be578182fd5b6000806040838503121562000b40578081fd5b823562000b4d816200109c565b946020939093013593505050565b600080600080600060a0868803121562000b73578081fd5b853567ffffffffffffffff8082111562000b8b578283fd5b818801915088601f83011262000b9f578283fd5b62000bb08983356020850162000a44565b9650602088013591508082111562000bc6578283fd5b508601601f8101881362000bd8578182fd5b62000be98882356020840162000a44565b94505062000bfa6040870162000adf565b92506060860135915062000c116080870162000adf565b90509295509295909350565b60006020828403121562000c2f578081fd5b5051919050565b6000815180845262000c508160208601602086016200103e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000825162000c968184602087016200103e565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b600061012073ffffffffffffffffffffffffffffffffffffffff808d16845281602085015262000d4c8285018d62000c36565b9150838203604085015262000d62828c62000c36565b99811660608501526080840198909852505093851660a085015291841660c084015260e0830152909116610100909101529392505050565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b600060208252620008be602083018462000c36565b600061012080835262000deb8184018d62000c36565b9050828103602084015262000e01818c62000c36565b73ffffffffffffffffffffffffffffffffffffffff9a8b16604085015260608401999099525050948716608086015292861660a085015290851660c084015260e08301529092166101009092019190915292915050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601d908201527f4552524f52203a204465706f7369742062616420616c6c6f77616e6365000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b92835273ffffffffffffffffffffffffffffffffffffffff919091166020830152604082015260600190565b60005b838110156200105b57818101518382015260200162001041565b83811115620007c45750506000910152565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff811681146200051d57600080fdfe60806040523480156200001157600080fd5b50604051620015813803806200158183398101604081905262000034916200027d565b8851620000499060019060208c0190620000ed565b5087516200005f9060029060208b0190620000ed565b50600380546001600160a01b03199081166001600160a01b03998a161790915560049690965560058054871695881695909517909455600680548616938716939093179092556000805485169386169390931790925560408051808201909152919093168082526020909101839052600880549092161790556009555050600a805460ff19169055620003bf565b828054620000fb906200036c565b90600052602060002090601f0160209004810192826200011f57600085556200016a565b82601f106200013a57805160ff19168380011785556200016a565b828001600101855582156200016a579182015b828111156200016a5782518255916020019190600101906200014d565b50620001789291506200017c565b5090565b5b808211156200017857600081556001016200017d565b60006001600160401b0380841115620001b057620001b0620003a9565b604051601f8501601f19908116603f01168101908282118183101715620001db57620001db620003a9565b81604052809350858152868686011115620001f557600080fd5b600092505b858310156200021a578285015160208483010152602083019250620001fa565b858311156200022d576000602087830101525b5050509392505050565b80516001600160a01b03811681146200024f57600080fd5b919050565b600082601f83011262000265578081fd5b620002768383516020850162000193565b9392505050565b60008060008060008060008060006101208a8c0312156200029c578485fd5b89516001600160401b0380821115620002b3578687fd5b818c0191508c601f830112620002c7578687fd5b620002d88d83516020850162000193565b9a5060208c0151915080821115620002ee578687fd5b50620002fd8c828d0162000254565b9850506200030e60408b0162000237565b965060608a015195506200032560808b0162000237565b94506200033560a08b0162000237565b93506200034560c08b0162000237565b925060e08a015191506200035d6101008b0162000237565b90509295985092959850929598565b6002810460018216806200038157607f821691505b60208210811415620003a357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6111b280620003cf6000396000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c8063b0a87ac111610081578063e0c234231161005b578063e0c2342314610186578063f294cf381461019b578063f7c618c1146101a3576100d4565b8063b0a87ac114610155578063b434151c1461015d578063d0e30db014610170576100d4565b80637ceae310116100b25780637ceae31014610116578063990cc4891461011e578063a888c2cd14610133576100d4565b8063310a1ee3146100d9578063579ca2c9146100f75780636c3a4cce14610101575b600080fd5b6100e16101ab565b6040516100ee91906110af565b60405180910390f35b6100ff6101b1565b005b610109610338565b6040516100ee9190610e1c565b610109610354565b610126610370565b6040516100ee9190610e63565b610146610141366004610d86565b610379565b6040516100ee93929190610e81565b610109610452565b6100ff61016b366004610c91565b61046e565b6101786107a2565b6040516100ee929190610e3d565b61018e6107c4565b6040516100ee9190610e6e565b61018e610852565b61010961085f565b60045481565b60045442116101f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610f76565b60405180910390fd5b600a5460ff16610267576000546040805180820190915260085473ffffffffffffffffffffffffffffffffffffffff9081168252600954602083015261023b921661087b565b600a80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b6006546003546040517f70a082310000000000000000000000000000000000000000000000000000000081526103369273ffffffffffffffffffffffffffffffffffffffff9081169216906370a08231906102c6903090600401610e1c565b60206040518083038186803b1580156102de57600080fd5b505afa1580156102f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103169190610d9e565b60035473ffffffffffffffffffffffffffffffffffffffff1691906108b4565b565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b600a5460ff1681565b6007818154811061038957600080fd5b90600052602060002090600302016000915090508060000180546103ac906110e8565b80601f01602080910402602001604051908101604052809291908181526020018280546103d8906110e8565b80156104255780601f106103fa57610100808354040283529160200191610425565b820191906000526020600020905b81548152906001019060200180831161040857829003601f168201915b505050506001830154600290930154919273ffffffffffffffffffffffffffffffffffffffff1691905083565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60055473ffffffffffffffffffffffffffffffffffffffff1633146104bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610fad565b83516104f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec9061101b565b6003546040517f70a0823100000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319061054e903090600401610e1c565b60206040518083038186803b15801561056657600080fd5b505afa15801561057a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059e9190610d9e565b905081156105eb5760085460035473ffffffffffffffffffffffffffffffffffffffff908116911614156105e7576009546000906105dd90839061095a565b94506105eb915050565b8092505b60085460035473ffffffffffffffffffffffffffffffffffffffff9081169116141561066157600061061d828561095a565b91505060086001015481101561065f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610ebc565b505b821561068b5760035461068b9073ffffffffffffffffffffffffffffffffffffffff1685856108b4565b6040805160608101825286815273ffffffffffffffffffffffffffffffffffffffff86166020808301919091529181018590526007805460018101825560009190915281518051929360039092027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68801926107099284920190610bad565b5060208201516001820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055604091820151600290910155517fa1c3b325aa2c115e4b244062eba2515bc5585ae5b41556be8fef399ae9fde11b9061079390879087908790610e81565b60405180910390a15050505050565b60085460095473ffffffffffffffffffffffffffffffffffffffff9091169082565b600280546107d1906110e8565b80601f01602080910402602001604051908101604052809291908181526020018280546107fd906110e8565b801561084a5780601f1061081f5761010080835404028352916020019161084a565b820191906000526020600020905b81548152906001019060200180831161082d57829003601f168201915b505050505081565b600180546107d1906110e8565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b6020820151156108b057602082015182516108b09173ffffffffffffffffffffffffffffffffffffffff9091169083906108b4565b5050565b6109558363a9059cbb60e01b84846040516024016108d3929190610e3d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610980565b505050565b6000808383111561097057506000905080610979565b50600190508183035b9250929050565b60006109e2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610a369092919063ffffffff16565b8051909150156109555780806020019051810190610a009190610c75565b610955576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90611052565b6060610a458484600085610a4f565b90505b9392505050565b606082471015610a8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610f19565b610a9485610b50565b610aca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610fe4565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610af39190610e00565b60006040518083038185875af1925050503d8060008114610b30576040519150601f19603f3d011682016040523d82523d6000602084013e610b35565b606091505b5091509150610b45828286610b5a565b979650505050505050565b803b15155b919050565b60608315610b69575081610a48565b825115610b795782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec9190610e6e565b828054610bb9906110e8565b90600052602060002090601f016020900481019282610bdb5760008555610c21565b82601f10610bf457805160ff1916838001178555610c21565b82800160010185558215610c21579182015b82811115610c21578251825591602001919060010190610c06565b50610c2d929150610c31565b5090565b5b80821115610c2d5760008155600101610c32565b803573ffffffffffffffffffffffffffffffffffffffff81168114610b5557600080fd5b8035610b558161116b565b600060208284031215610c86578081fd5b8151610a488161116b565b60008060008060808587031215610ca6578283fd5b843567ffffffffffffffff80821115610cbd578485fd5b818701915087601f830112610cd0578485fd5b813581811115610ce257610ce261113c565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610d2857610d2861113c565b816040528281528a6020848701011115610d40578788fd5b8260208601602083013787602084830101528098505050505050610d6660208601610c46565b925060408501359150610d7b60608601610c6a565b905092959194509250565b600060208284031215610d97578081fd5b5035919050565b600060208284031215610daf578081fd5b5051919050565b60008151808452610dce8160208601602086016110b8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251610e128184602087016110b8565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b600060208252610a486020830184610db6565b600060608252610e946060830186610db6565b73ffffffffffffffffffffffffffffffffffffffff9490941660208301525060400152919050565b60208082526027908201527f4552524f523a2053686f756c64206e6f742065786365656420616c6c6f77656460408201527f20626f756e747900000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b60208082526012908201527f4552524f523a204e6f7420657870697265640000000000000000000000000000604082015260600190565b60208082526018908201527f4552524f523a2053656e646572206e6f7420676f7665726e0000000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526012908201527f4552524f523a204e6f2065766964656e63650000000000000000000000000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b90815260200190565b60005b838110156110d35781810151838201526020016110bb565b838111156110e2576000848401525b50505050565b6002810460018216806110fc57607f821691505b60208210811415611136577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b801515811461117957600080fd5b5056fea2646970667358221220ed56507b634ebeaae309509ea680f90e736b7873ed34daf4d911bd38dce7becb64736f6c63430008010033a26469706673582212203b76689e14505056015d3b5e2ef896271124d6f9f50c1f051e2f0c3975176c7964736f6c63430008010033", + "deployedBytecode": "0x60806040523480156200001157600080fd5b5060043610620000885760003560e01c8063b0a87ac11162000063578063b0a87ac114620000d2578063c6b21b0214620000dc578063d0e30db014620000f3578063f2fde38b146200010d5762000088565b8063715018a6146200008d5780638da5cb5b1462000099578063abec0a0314620000bb575b600080fd5b6200009762000124565b005b620000a3620001b5565b604051620000b2919062000ca0565b60405180910390f35b620000a3620000cc36600462000b5b565b620001d1565b620000a3620002f5565b62000097620000ed36600462000b2d565b62000311565b620000fd62000426565b604051620000b292919062000d9a565b620000976200011e36600462000aec565b62000448565b6200012e62000520565b73ffffffffffffffffffffffffffffffffffffffff166200014e620001b5565b73ffffffffffffffffffffffffffffffffffffffff1614620001a7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e9062000f12565b60405180910390fd5b620001b3600062000524565b565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60015460025460035460405160009384938a938a938a938a9373ffffffffffffffffffffffffffffffffffffffff918216938b9392909116913390620002179062000a36565b6200022b9998979695949392919062000dd5565b604051809103906000f08015801562000248573d6000803e3d6000fd5b506040805180820190915260025473ffffffffffffffffffffffffffffffffffffffff16815260035460208201529091506200028690338362000599565b6002546003546040517f4cf18b7944786d158010105e0d058cfa9ca46ad789d42eb9b6fa9490be2a44f792620002e39285928c928c928c928c928c9273ffffffffffffffffffffffffffffffffffffffff90911691339062000d19565b60405180910390a19695505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b6200031b62000520565b73ffffffffffffffffffffffffffffffffffffffff166200033b620001b5565b73ffffffffffffffffffffffffffffffffffffffff16146200038b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e9062000f12565b60408051808201825273ffffffffffffffffffffffffffffffffffffffff84168082526020909101839052600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001690911790556003829055517f556f88907cfe81bbd1433b2c2ba3860920f0b50b218c55ca0a060558e7ca4199906200041a9042908590859062001012565b60405180910390a15050565b60025460035473ffffffffffffffffffffffffffffffffffffffff9091169082565b6200045262000520565b73ffffffffffffffffffffffffffffffffffffffff1662000472620001b5565b73ffffffffffffffffffffffffffffffffffffffff1614620004c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e9062000f12565b73ffffffffffffffffffffffffffffffffffffffff811662000512576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e9062000e58565b6200051d8162000524565b50565b3390565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b620005a58383620005b6565b620005b18382620006e5565b505050565b602082015115620006e15781516040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff169063dd62ed3e906200061b908590309060040162000cc1565b60206040518083038186803b1580156200063457600080fd5b505afa15801562000649573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200066f919062000c1d565b90508260200151811015620006b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e9062000f47565b60208301518351620005b19173ffffffffffffffffffffffffffffffffffffffff90911690849030906200071d565b5050565b602082015115620006e15760208201518251620006e19173ffffffffffffffffffffffffffffffffffffffff909116908390620007ca565b620007c4846323b872dd60e01b858585604051602401620007419392919062000ce8565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152620007ec565b50505050565b620005b18363a9059cbb60e01b84846040516024016200074192919062000d9a565b600062000850826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16620008aa9092919063ffffffff16565b805190915015620005b1578080602001905181019062000871919062000b0b565b620005b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e9062000fb5565b6060620008bb8484600085620008c5565b90505b9392505050565b60608247101562000904576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e9062000eb5565b6200090f85620009d4565b62000948576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e9062000f7e565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405162000973919062000c82565b60006040518083038185875af1925050503d8060008114620009b2576040519150601f19603f3d011682016040523d82523d6000602084013e620009b7565b606091505b5091509150620009c9828286620009de565b979650505050505050565b803b15155b919050565b60608315620009ef575081620008be565b82511562000a005782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e919062000dc0565b61158180620010c083390190565b600067ffffffffffffffff8084111562000a625762000a626200106d565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171562000aab5762000aab6200106d565b8160405280935085815286868601111562000ac557600080fd5b858560208301376000602087830101525050509392505050565b8035620009d9816200109c565b60006020828403121562000afe578081fd5b8135620008be816200109c565b60006020828403121562000b1d578081fd5b81518015158114620008be578182fd5b6000806040838503121562000b40578081fd5b823562000b4d816200109c565b946020939093013593505050565b600080600080600060a0868803121562000b73578081fd5b853567ffffffffffffffff8082111562000b8b578283fd5b818801915088601f83011262000b9f578283fd5b62000bb08983356020850162000a44565b9650602088013591508082111562000bc6578283fd5b508601601f8101881362000bd8578182fd5b62000be98882356020840162000a44565b94505062000bfa6040870162000adf565b92506060860135915062000c116080870162000adf565b90509295509295909350565b60006020828403121562000c2f578081fd5b5051919050565b6000815180845262000c508160208601602086016200103e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000825162000c968184602087016200103e565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b600061012073ffffffffffffffffffffffffffffffffffffffff808d16845281602085015262000d4c8285018d62000c36565b9150838203604085015262000d62828c62000c36565b99811660608501526080840198909852505093851660a085015291841660c084015260e0830152909116610100909101529392505050565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b600060208252620008be602083018462000c36565b600061012080835262000deb8184018d62000c36565b9050828103602084015262000e01818c62000c36565b73ffffffffffffffffffffffffffffffffffffffff9a8b16604085015260608401999099525050948716608086015292861660a085015290851660c084015260e08301529092166101009092019190915292915050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601d908201527f4552524f52203a204465706f7369742062616420616c6c6f77616e6365000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b92835273ffffffffffffffffffffffffffffffffffffffff919091166020830152604082015260600190565b60005b838110156200105b57818101518382015260200162001041565b83811115620007c45750506000910152565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff811681146200051d57600080fdfe60806040523480156200001157600080fd5b50604051620015813803806200158183398101604081905262000034916200027d565b8851620000499060019060208c0190620000ed565b5087516200005f9060029060208b0190620000ed565b50600380546001600160a01b03199081166001600160a01b03998a161790915560049690965560058054871695881695909517909455600680548616938716939093179092556000805485169386169390931790925560408051808201909152919093168082526020909101839052600880549092161790556009555050600a805460ff19169055620003bf565b828054620000fb906200036c565b90600052602060002090601f0160209004810192826200011f57600085556200016a565b82601f106200013a57805160ff19168380011785556200016a565b828001600101855582156200016a579182015b828111156200016a5782518255916020019190600101906200014d565b50620001789291506200017c565b5090565b5b808211156200017857600081556001016200017d565b60006001600160401b0380841115620001b057620001b0620003a9565b604051601f8501601f19908116603f01168101908282118183101715620001db57620001db620003a9565b81604052809350858152868686011115620001f557600080fd5b600092505b858310156200021a578285015160208483010152602083019250620001fa565b858311156200022d576000602087830101525b5050509392505050565b80516001600160a01b03811681146200024f57600080fd5b919050565b600082601f83011262000265578081fd5b620002768383516020850162000193565b9392505050565b60008060008060008060008060006101208a8c0312156200029c578485fd5b89516001600160401b0380821115620002b3578687fd5b818c0191508c601f830112620002c7578687fd5b620002d88d83516020850162000193565b9a5060208c0151915080821115620002ee578687fd5b50620002fd8c828d0162000254565b9850506200030e60408b0162000237565b965060608a015195506200032560808b0162000237565b94506200033560a08b0162000237565b93506200034560c08b0162000237565b925060e08a015191506200035d6101008b0162000237565b90509295985092959850929598565b6002810460018216806200038157607f821691505b60208210811415620003a357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6111b280620003cf6000396000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c8063b0a87ac111610081578063e0c234231161005b578063e0c2342314610186578063f294cf381461019b578063f7c618c1146101a3576100d4565b8063b0a87ac114610155578063b434151c1461015d578063d0e30db014610170576100d4565b80637ceae310116100b25780637ceae31014610116578063990cc4891461011e578063a888c2cd14610133576100d4565b8063310a1ee3146100d9578063579ca2c9146100f75780636c3a4cce14610101575b600080fd5b6100e16101ab565b6040516100ee91906110af565b60405180910390f35b6100ff6101b1565b005b610109610338565b6040516100ee9190610e1c565b610109610354565b610126610370565b6040516100ee9190610e63565b610146610141366004610d86565b610379565b6040516100ee93929190610e81565b610109610452565b6100ff61016b366004610c91565b61046e565b6101786107a2565b6040516100ee929190610e3d565b61018e6107c4565b6040516100ee9190610e6e565b61018e610852565b61010961085f565b60045481565b60045442116101f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610f76565b60405180910390fd5b600a5460ff16610267576000546040805180820190915260085473ffffffffffffffffffffffffffffffffffffffff9081168252600954602083015261023b921661087b565b600a80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b6006546003546040517f70a082310000000000000000000000000000000000000000000000000000000081526103369273ffffffffffffffffffffffffffffffffffffffff9081169216906370a08231906102c6903090600401610e1c565b60206040518083038186803b1580156102de57600080fd5b505afa1580156102f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103169190610d9e565b60035473ffffffffffffffffffffffffffffffffffffffff1691906108b4565b565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b600a5460ff1681565b6007818154811061038957600080fd5b90600052602060002090600302016000915090508060000180546103ac906110e8565b80601f01602080910402602001604051908101604052809291908181526020018280546103d8906110e8565b80156104255780601f106103fa57610100808354040283529160200191610425565b820191906000526020600020905b81548152906001019060200180831161040857829003601f168201915b505050506001830154600290930154919273ffffffffffffffffffffffffffffffffffffffff1691905083565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60055473ffffffffffffffffffffffffffffffffffffffff1633146104bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610fad565b83516104f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec9061101b565b6003546040517f70a0823100000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319061054e903090600401610e1c565b60206040518083038186803b15801561056657600080fd5b505afa15801561057a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059e9190610d9e565b905081156105eb5760085460035473ffffffffffffffffffffffffffffffffffffffff908116911614156105e7576009546000906105dd90839061095a565b94506105eb915050565b8092505b60085460035473ffffffffffffffffffffffffffffffffffffffff9081169116141561066157600061061d828561095a565b91505060086001015481101561065f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610ebc565b505b821561068b5760035461068b9073ffffffffffffffffffffffffffffffffffffffff1685856108b4565b6040805160608101825286815273ffffffffffffffffffffffffffffffffffffffff86166020808301919091529181018590526007805460018101825560009190915281518051929360039092027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68801926107099284920190610bad565b5060208201516001820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055604091820151600290910155517fa1c3b325aa2c115e4b244062eba2515bc5585ae5b41556be8fef399ae9fde11b9061079390879087908790610e81565b60405180910390a15050505050565b60085460095473ffffffffffffffffffffffffffffffffffffffff9091169082565b600280546107d1906110e8565b80601f01602080910402602001604051908101604052809291908181526020018280546107fd906110e8565b801561084a5780601f1061081f5761010080835404028352916020019161084a565b820191906000526020600020905b81548152906001019060200180831161082d57829003601f168201915b505050505081565b600180546107d1906110e8565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b6020820151156108b057602082015182516108b09173ffffffffffffffffffffffffffffffffffffffff9091169083906108b4565b5050565b6109558363a9059cbb60e01b84846040516024016108d3929190610e3d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610980565b505050565b6000808383111561097057506000905080610979565b50600190508183035b9250929050565b60006109e2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610a369092919063ffffffff16565b8051909150156109555780806020019051810190610a009190610c75565b610955576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90611052565b6060610a458484600085610a4f565b90505b9392505050565b606082471015610a8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610f19565b610a9485610b50565b610aca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610fe4565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610af39190610e00565b60006040518083038185875af1925050503d8060008114610b30576040519150601f19603f3d011682016040523d82523d6000602084013e610b35565b606091505b5091509150610b45828286610b5a565b979650505050505050565b803b15155b919050565b60608315610b69575081610a48565b825115610b795782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec9190610e6e565b828054610bb9906110e8565b90600052602060002090601f016020900481019282610bdb5760008555610c21565b82601f10610bf457805160ff1916838001178555610c21565b82800160010185558215610c21579182015b82811115610c21578251825591602001919060010190610c06565b50610c2d929150610c31565b5090565b5b80821115610c2d5760008155600101610c32565b803573ffffffffffffffffffffffffffffffffffffffff81168114610b5557600080fd5b8035610b558161116b565b600060208284031215610c86578081fd5b8151610a488161116b565b60008060008060808587031215610ca6578283fd5b843567ffffffffffffffff80821115610cbd578485fd5b818701915087601f830112610cd0578485fd5b813581811115610ce257610ce261113c565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610d2857610d2861113c565b816040528281528a6020848701011115610d40578788fd5b8260208601602083013787602084830101528098505050505050610d6660208601610c46565b925060408501359150610d7b60608601610c6a565b905092959194509250565b600060208284031215610d97578081fd5b5035919050565b600060208284031215610daf578081fd5b5051919050565b60008151808452610dce8160208601602086016110b8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251610e128184602087016110b8565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b600060208252610a486020830184610db6565b600060608252610e946060830186610db6565b73ffffffffffffffffffffffffffffffffffffffff9490941660208301525060400152919050565b60208082526027908201527f4552524f523a2053686f756c64206e6f742065786365656420616c6c6f77656460408201527f20626f756e747900000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b60208082526012908201527f4552524f523a204e6f7420657870697265640000000000000000000000000000604082015260600190565b60208082526018908201527f4552524f523a2053656e646572206e6f7420676f7665726e0000000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526012908201527f4552524f523a204e6f2065766964656e63650000000000000000000000000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b90815260200190565b60005b838110156110d35781810151838201526020016110bb565b838111156110e2576000848401525b50505050565b6002810460018216806110fc57607f821691505b60208210811415611136577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b801515811461117957600080fd5b5056fea2646970667358221220ed56507b634ebeaae309509ea680f90e736b7873ed34daf4d911bd38dce7becb64736f6c63430008010033a26469706673582212203b76689e14505056015d3b5e2ef896271124d6f9f50c1f051e2f0c3975176c7964736f6c63430008010033", + "devdoc": { + "kind": "dev", + "methods": { + "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." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 7, + "contract": "contracts/QuestFactory.sol:QuestFactory", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 1905, + "contract": "contracts/QuestFactory.sol:QuestFactory", + "label": "aragonGovernAddress", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 1908, + "contract": "contracts/QuestFactory.sol:QuestFactory", + "label": "deposit", + "offset": 0, + "slot": "2", + "type": "t_struct(Deposit)2189_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_contract(IERC20)728": { + "encoding": "inplace", + "label": "contract IERC20", + "numberOfBytes": "20" + }, + "t_struct(Deposit)2189_storage": { + "encoding": "inplace", + "label": "struct Models.Deposit", + "members": [ + { + "astId": 2186, + "contract": "contracts/QuestFactory.sol:QuestFactory", + "label": "token", + "offset": 0, + "slot": "0", + "type": "t_contract(IERC20)728" + }, + { + "astId": 2188, + "contract": "contracts/QuestFactory.sol:QuestFactory", + "label": "amount", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/packages/hardhat/deployments/xdai/solcInputs/55762042aa62f69cb5859e68ffbc45e6.json b/packages/hardhat/deployments/xdai/solcInputs/55762042aa62f69cb5859e68ffbc45e6.json new file mode 100644 index 00000000..7c024eaa --- /dev/null +++ b/packages/hardhat/deployments/xdai/solcInputs/55762042aa62f69cb5859e68ffbc45e6.json @@ -0,0 +1,71 @@ +{ + "language": "Solidity", + "sources": { + "contracts/libraries/Deposit.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\r\n\r\npragma solidity ^0.8.1;\r\n\r\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\r\nimport \"./Models.sol\";\r\n\r\nlibrary DepositLib {\r\n using SafeERC20 for IERC20;\r\n\r\n /*\r\n * Collect deposit from signer and send it to _to address.\r\n * @param _token The deposit token.\r\n * @param _amount The deposit amount.\r\n * @param _to The address where the deposit should be transfered.\r\n */\r\n function collectFrom(\r\n Models.Deposit memory _collateral,\r\n address _from,\r\n address _to\r\n ) internal {\r\n collectFrom(_collateral, _from);\r\n releaseTo(_collateral, _to);\r\n }\r\n\r\n /*\r\n * Collect deposit from signer\r\n * @param _token The deposit token.\r\n * @param _amount The deposit amount.\r\n */\r\n function collectFrom(Models.Deposit memory _collateral, address _from)\r\n internal\r\n {\r\n if (_collateral.amount > 0) {\r\n // Verify allowance\r\n uint256 allowance = _collateral.token.allowance(\r\n _from,\r\n address(this)\r\n );\r\n require(\r\n allowance >= _collateral.amount,\r\n \"ERROR : Deposit bad allowance\"\r\n );\r\n\r\n _collateral.token.safeTransferFrom(\r\n _from,\r\n address(this),\r\n _collateral.amount\r\n );\r\n }\r\n }\r\n\r\n function releaseTo(Models.Deposit memory _collateral, address _to)\r\n internal\r\n {\r\n if (_collateral.amount > 0) {\r\n _collateral.token.safeTransfer(_to, _collateral.amount);\r\n }\r\n }\r\n}\r\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n function safeTransfer(\n IERC20 token,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n uint256 newAllowance = token.allowance(address(this), spender) + value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n uint256 newAllowance = oldAllowance - value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n if (returndata.length > 0) {\n // Return data is optional\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n" + }, + "contracts/libraries/Models.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\r\npragma solidity ^0.8.1;\r\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\n\r\nlibrary Models {\r\n struct Deposit {\r\n IERC20 token;\r\n uint256 amount;\r\n }\r\n struct Claim {\r\n bytes evidence;\r\n address player;\r\n uint256 amount;\r\n }\r\n}\r\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(account)\n }\n return size > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n" + }, + "contracts/QuestFactory.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\r\npragma solidity ^0.8.1;\r\n\r\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\r\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport \"./libraries/Deposit.sol\";\r\nimport \"./libraries/Models.sol\";\r\nimport \"./Quest.sol\";\r\n\r\ncontract QuestFactory is Ownable {\r\n using DepositLib for Models.Deposit;\r\n\r\n address public aragonGovernAddress;\r\n Models.Deposit public deposit;\r\n\r\n event QuestCreated(\r\n address questAddress,\r\n string questTitle,\r\n bytes questDetailsRef,\r\n address rewardTokenAddress,\r\n uint256 expireTime,\r\n address fundsRecoveryAddress,\r\n address depositToken,\r\n uint256 depositAmount,\r\n address creator\r\n );\r\n\r\n event DepositChanged(uint256 timestamp, address token, uint256 amount);\r\n\r\n constructor(\r\n address _aragonGovernAddress,\r\n IERC20 _depositToken,\r\n uint256 _depositAmount,\r\n address _initialOwner\r\n ) {\r\n aragonGovernAddress = _aragonGovernAddress;\r\n setDeposit(_depositToken, _depositAmount);\r\n if (_initialOwner != msg.sender) {\r\n transferOwnership(_initialOwner);\r\n }\r\n }\r\n\r\n /*\r\n * @dev Set the deposit token and amount.\r\n * @param _depositToken The deposit token.\r\n * @param _depositAmount The deposit amount.\r\n * emit DepositChanged\r\n */\r\n function setDeposit(IERC20 token, uint256 amount) public onlyOwner {\r\n deposit = Models.Deposit(token, amount);\r\n emit DepositChanged(block.timestamp, address(token), amount);\r\n }\r\n\r\n /*\r\n * Collect deposit, deploy a new Quest with given info contract\r\n * and transfer deposit to new Quest.\r\n * @param _title Quest title.\r\n * @param _details Quest details.\r\n * @param _rewardTokenAddress Reward token address.\r\n * @param _expireTime Expire time.\r\n * @param _fundsRecoveryAddress Funds recovery address.\r\n * requires deposit allowance\r\n * returns Quest address.\r\n * emits QuestCreated\r\n */\r\n function createQuest(\r\n string memory _questTitle,\r\n bytes memory _questDetailsRef,\r\n IERC20 _rewardToken,\r\n uint256 _expireTime,\r\n address payable _fundsRecoveryAddress\r\n ) external returns (address) {\r\n Quest quest = new Quest(\r\n _questTitle,\r\n _questDetailsRef,\r\n _rewardToken,\r\n _expireTime,\r\n aragonGovernAddress,\r\n _fundsRecoveryAddress,\r\n deposit.token,\r\n deposit.amount,\r\n msg.sender\r\n );\r\n\r\n // Collect deposit from quest creator and send it to quest\r\n deposit.collectFrom(msg.sender, address(quest));\r\n\r\n emit QuestCreated(\r\n address(quest),\r\n _questTitle,\r\n _questDetailsRef,\r\n address(_rewardToken),\r\n _expireTime,\r\n _fundsRecoveryAddress,\r\n address(deposit.token),\r\n deposit.amount,\r\n msg.sender\r\n );\r\n\r\n return address(quest);\r\n }\r\n}\r\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "contracts/Quest.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\r\npragma solidity ^0.8.1;\r\n\r\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\r\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\";\r\nimport \"./libraries/Deposit.sol\";\r\nimport \"./libraries/Models.sol\";\r\nimport \"./QuestFactory.sol\";\r\n\r\ncontract Quest {\r\n using SafeMath for uint256;\r\n using SafeERC20 for IERC20;\r\n using DepositLib for Models.Deposit;\r\n\r\n address public questCreator;\r\n string public questTitle;\r\n bytes public questDetailsRef;\r\n IERC20 public rewardToken;\r\n uint256 public expireTime;\r\n address public aragonGovernAddress;\r\n address payable public fundsRecoveryAddress;\r\n Models.Claim[] public claims;\r\n Models.Deposit public deposit;\r\n bool public isDepositReleased;\r\n\r\n event QuestClaimed(bytes evidence, address player, uint256 amount);\r\n\r\n constructor(\r\n string memory _questTitle,\r\n bytes memory _questDetailsRef,\r\n IERC20 _rewardToken,\r\n uint256 _expireTime,\r\n address _aragonGovernAddress,\r\n address payable _fundsRecoveryAddress,\r\n IERC20 _depositToken,\r\n uint256 _depositAmount,\r\n address _questCreator\r\n ) {\r\n questTitle = _questTitle;\r\n questDetailsRef = _questDetailsRef;\r\n rewardToken = _rewardToken;\r\n expireTime = _expireTime;\r\n aragonGovernAddress = _aragonGovernAddress;\r\n fundsRecoveryAddress = _fundsRecoveryAddress;\r\n questCreator = _questCreator;\r\n deposit = Models.Deposit(_depositToken, _depositAmount);\r\n isDepositReleased = false;\r\n }\r\n\r\n /*\r\n * Release deposit to creator and send unused funds to fundsRecoveryAddress.\r\n * requires quests to have expired\r\n */\r\n function recoverFundsAndDeposit() external {\r\n require(block.timestamp > expireTime, \"ERROR: Not expired\");\r\n\r\n // Restore deposit if not already released\r\n if (!isDepositReleased) {\r\n deposit.releaseTo(questCreator);\r\n isDepositReleased = true;\r\n }\r\n\r\n rewardToken.safeTransfer(\r\n fundsRecoveryAddress,\r\n rewardToken.balanceOf(address(this))\r\n );\r\n }\r\n\r\n /*\r\n * Claim a quest reward.\r\n * @param _evidence Evidence of the claim.\r\n * @param _player Player address.\r\n * @param _amount Amount of the reward.\r\n * requires sender to be aragonGovernAddress\r\n * requires evidence to not be empty\r\n * requires claim amount to not exceed available deposit when same token\r\n * emit QuestClaimed\r\n */\r\n function claim(\r\n bytes memory _evidence,\r\n address _player,\r\n uint256 _amount,\r\n bool _claimAll\r\n ) external {\r\n require(msg.sender == aragonGovernAddress, \"ERROR: Sender not govern\");\r\n require(_evidence.length != 0, \"ERROR: No evidence\");\r\n uint256 balance = rewardToken.balanceOf(address(this));\r\n\r\n if (_claimAll) {\r\n // Claim all but let deposit if they are same token\r\n if (address(rewardToken) == address(deposit.token)) {\r\n (, uint256 result) = balance.trySub(deposit.amount);\r\n _amount = result;\r\n } else {\r\n _amount = balance;\r\n }\r\n }\r\n\r\n if (address(rewardToken) == address(deposit.token)) {\r\n (, uint256 result) = balance.trySub(_amount);\r\n require(\r\n result >= deposit.amount,\r\n \"ERROR: Should not exceed allowed bounty\"\r\n );\r\n }\r\n\r\n if (_amount > 0) {\r\n rewardToken.safeTransfer(_player, _amount);\r\n }\r\n\r\n claims.push(Models.Claim(_evidence, _player, _amount));\r\n\r\n emit QuestClaimed(_evidence, _player, _amount);\r\n }\r\n}\r\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SafeMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)\n\npragma solidity ^0.8.0;\n\n// CAUTION\n// This version of SafeMath should only be used with Solidity 0.8 or later,\n// because it relies on the compiler's built in overflow checks.\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations.\n *\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\n * now has built in overflow checking.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n *\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n return a + b;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return a - b;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n *\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n return a * b;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator.\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return a / b;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * reverting when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return a % b;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {trySub}.\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n unchecked {\n require(b <= a, errorMessage);\n return a - b;\n }\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n unchecked {\n require(b > 0, errorMessage);\n return a / b;\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * reverting with custom message when dividing by zero.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryMod}.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n unchecked {\n require(b > 0, errorMessage);\n return a % b;\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\n * overridden;\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * Requirements:\n *\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n uint256 currentAllowance = _allowances[_msgSender()][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n uint256 senderBalance = _balances[sender];\n require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n\n _afterTokenTransfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n _balances[account] += amount;\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _totalSupply -= amount;\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" + }, + "contracts/mocks/TokenMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\r\npragma solidity ^0.8.0;\r\n\r\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\n\r\n// Example class - a mock class using delivering from ERC20\r\ncontract TokenMock is ERC20 {\r\n constructor(string memory name, string memory symbol)\r\n payable\r\n ERC20(name, symbol)\r\n {}\r\n\r\n function mint(address owner, uint256 initialBalance) external {\r\n _mint(owner, initialBalance);\r\n }\r\n}\r\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 20000 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/packages/hardhat/hardhat.config.ts b/packages/hardhat/hardhat.config.ts index 28b46029..a9037a92 100644 --- a/packages/hardhat/hardhat.config.ts +++ b/packages/hardhat/hardhat.config.ts @@ -615,7 +615,15 @@ task("generateGovernQueueConfig:gnosis") ) .setAction(async (taskArgs) => { const config = generateQueueConfig(taskArgs); - console.log("Config tupple : ", JSON.stringify(Object.values(config))); + const tupple = [ + config.executionDelay, + [config.scheduleDeposit.token, config.scheduleDeposit.amount], + [config.challengeDeposit.token, config.challengeDeposit.amount], + config.resolver, + config.rules, + config.maxCalldataSize, + ]; + console.log("Config tupple : ", JSON.stringify(tupple)); }); task("generateGovernQueueConfig:rinkeby") @@ -668,14 +676,8 @@ task("generateGovernQueueConfig:rinkeby") const config = generateQueueConfig(taskArgs); const tupple = [ config.executionDelay, - [ - config.scheduleDeposit.token, - config.scheduleDeposit.amount.toHexString(), - ], - [ - config.challengeDeposit.token, - config.challengeDeposit.amount.toHexString(), - ], + [config.scheduleDeposit.token, config.scheduleDeposit.amount], + [config.challengeDeposit.token, config.challengeDeposit.amount], config.resolver, config.rules, config.maxCalldataSize, @@ -866,6 +868,113 @@ task("newQuestFactory:rinkeby") ); }); +async function deployAll( + args: { + ownerAddress: string; + governQueueFactoryAddress: string; + governFactoryAddress: string; + resolver: string; + executionDelay: number; + scheduleDepositToken: string; + scheduleDepositAmount: number; + challengeDepositToken: string; + challengeDepositAmount: number; + createDepositToken: string; + createDepositAmount: number; + }, + { run, network }: any +) { + let networkId = network.name.toLowerCase(); + if (networkId === "xdai") { + networkId = "gnosis"; + } + const governQueueAddress = await run(`newGovernQueue:${networkId}`, { + aclRoot: args.ownerAddress, + governQueueFactoryAddress: args.governQueueFactoryAddress, + resolver: args.resolver, + executionDelay: args.executionDelay, + scheduleDepositToken: args.scheduleDepositToken, + scheduleDepositAmount: args.scheduleDepositAmount, + challengeDepositToken: args.challengeDepositToken, + challengeDepositAmount: args.challengeDepositAmount, + }); + const governAddress = await run(`newGovern:${networkId}`, { + initialExecutorAddress: governQueueAddress, + governFactoryAddress: args.governFactoryAddress, + }); + await run(`newQuestFactory:${networkId}`, { + governAddress, + initialOwner: args.ownerAddress, + createDepositToken: args.createDepositToken, + createDepositAmount: args.createDepositAmount, + }); +} + +task("deployAll:gnosis") + .setDescription( + "Deploy all the needed Govern and Quest contracts and export them to frontend" + ) + .addOptionalParam( + "ownerAddress", + "Address that will be granted Root ACL role and owner for QuestFactory", + defaultConfig.RootOwner.xdai + ) + .addOptionalParam( + "governQueueFactoryAddress", + "Address of the govern queue factory", + defaultConfig.GovernQueueFactory.xdai + ) + .addOptionalParam( + "governFactoryAddress", + "Address of the govern factory", + defaultConfig.GovernFactory.xdai + ) + .addOptionalParam( + "resolver", + "Address of Celeste(IArbitrator)", + defaultConfig.CelesteResolver.xdai + ) + .addOptionalParam( + "executionDelay", + "Execution delay for claims in seconds (default is 5 min)", + defaultConfig.ClaimDelay.xdai, + types.int + ) + .addOptionalParam( + "scheduleDepositToken", + "Address of the schedule deposit token", + defaultConfig.ScheduleDeposit.xdai.token + ) + .addOptionalParam( + "scheduleDepositAmount", + "Amount of the schedule deposit token", + defaultConfig.ScheduleDeposit.xdai.amount, + types.float + ) + .addOptionalParam( + "challengeDepositToken", + "Address of the challenge deposit token", + defaultConfig.ChallengeDeposit.xdai.token + ) + .addOptionalParam( + "challengeDepositAmount", + "Amount of the challenge deposit token", + defaultConfig.ChallengeDeposit.xdai.amount, + types.float + ) + .addOptionalParam( + "createQuestDepositToken", + "Address of the create quest deposit token", + defaultConfig.CreateQuestDeposit.xdai.token + ) + .addOptionalParam( + "createQuestDepositAmount", + "Amount of the create quest deposit token", + defaultConfig.CreateQuestDeposit.xdai.amount, + types.float + ) + .setAction(deployAll); + task("deployAll:rinkeby") .setDescription( "Deploy all the needed Govern and Quest contracts and export them to frontend" @@ -885,7 +994,11 @@ task("deployAll:rinkeby") "Address of the govern factory", defaultConfig.GovernFactory.rinkeby ) - .addOptionalParam("resolver", "Address of Celeste(IArbitrator)") + .addOptionalParam( + "resolver", + "Address of Celeste(IArbitrator)", + CelesteMock.address + ) .addOptionalParam( "executionDelay", "Execution delay for claims in seconds (default is 5 min)", @@ -925,45 +1038,7 @@ task("deployAll:rinkeby") defaultConfig.CreateQuestDeposit.rinkeby.amount, types.float ) - .setAction( - async ( - args: { - ownerAddress: string; - governQueueFactoryAddress: string; - governFactoryAddress: string; - resolver: string; - executionDelay: number; - scheduleDepositToken: string; - scheduleDepositAmount: number; - challengeDepositToken: string; - challengeDepositAmount: number; - createDepositToken: string; - createDepositAmount: number; - }, - { run } - ) => { - const governQueueAddress = await run("newGovernQueue:rinkeby", { - aclRoot: args.ownerAddress, - governQueueFactoryAddress: args.governQueueFactoryAddress, - resolver: args.resolver, - executionDelay: args.executionDelay, - scheduleDepositToken: args.scheduleDepositToken, - scheduleDepositAmount: args.scheduleDepositAmount, - challengeDepositToken: args.challengeDepositToken, - challengeDepositAmount: args.challengeDepositAmount, - }); - const governAddress = await run("newGovern:rinkeby", { - initialExecutorAddress: governQueueAddress, - governFactoryAddress: args.governFactoryAddress, - }); - await run("newQuestFactory:rinkeby", { - governAddress, - initialOwner: args.ownerAddress, - createDepositToken: args.createDepositToken, - createDepositAmount: args.createDepositAmount, - }); - } - ); + .setAction(deployAll); task("sig") .addOptionalParam( @@ -1048,4 +1123,32 @@ task("deployCeleste:rinkeby") } ); +task( + "verify-quests-contracts", + "Verify contracts with etherscan api" +).setAction(async (_args, { run, network }) => { + const questFactoryDeploy = require(`./deployments/${network.name.toLowerCase()}/QuestFactory.json`); + const questDeploy = require(`./deployments/${network.name.toLowerCase()}/Quest.json`); + console.log("Quest", { + address: questDeploy.address, + constructorArguments: questDeploy.args, + }); + try { + await run("verify:verify", { + address: questFactoryDeploy.address, + constructorArguments: questFactoryDeploy.args, + }); + } catch (error) { + console.error("Failed when verifying QuestFactory contract", error); + } + try { + await run("verify:verify", { + address: questDeploy.address, + constructorArguments: questDeploy.args, + }); + } catch (error) { + console.error("Failed when verifying Quest contract", error); + } +}); + module.exports = hardhatConfig; diff --git a/packages/hardhat/package.json b/packages/hardhat/package.json index f7b24c68..a6e13b54 100644 --- a/packages/hardhat/package.json +++ b/packages/hardhat/package.json @@ -68,6 +68,6 @@ "send": "hardhat send", "generate": "hardhat generate", "account": "hardhat account", - "etherscan-verify": "dotenv -- cross-var hardhat etherscan-verify --network rinkeby --api-key %ETHERSCAN_API_KEY%" + "verify:rinkeby": "hardhat verify-quests-contracts --network rinkeby" } } diff --git a/packages/hardhat/scripts/deploy-govern_queue.ts b/packages/hardhat/scripts/deploy-govern_queue.ts index f104b78e..6f9d62e0 100644 --- a/packages/hardhat/scripts/deploy-govern_queue.ts +++ b/packages/hardhat/scripts/deploy-govern_queue.ts @@ -19,11 +19,15 @@ export function generateQueueConfig(args: { executionDelay: args.executionDelay, scheduleDeposit: { token: args.scheduleDepositToken, - amount: ethers.utils.parseEther(args.scheduleDepositAmount.toString()), + amount: ethers.utils + .parseEther(args.scheduleDepositAmount.toString()) + .toString(), }, challengeDeposit: { token: args.challengeDepositToken, - amount: ethers.utils.parseEther(args.challengeDepositAmount.toString()), + amount: ethers.utils + .parseEther(args.challengeDepositAmount.toString()) + .toString(), }, resolver: args.resolver, rules: args.rules, diff --git a/packages/hardhat/typechain/DisputeManager.d.ts b/packages/hardhat/typechain/DisputeManager.d.ts new file mode 100644 index 00000000..6153bcfd --- /dev/null +++ b/packages/hardhat/typechain/DisputeManager.d.ts @@ -0,0 +1,194 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, +} from "ethers"; +import { + Contract, + ContractTransaction, + CallOverrides, +} from "@ethersproject/contracts"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; + +interface DisputeManagerInterface extends ethers.utils.Interface { + functions: { + "getDisputeFees()": FunctionFragment; + "getDispute(uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "getDisputeFees", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getDispute", + values: [BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "getDisputeFees", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getDispute", data: BytesLike): Result; + + events: {}; +} + +export class DisputeManager extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): this; + once(event: EventFilter | string, listener: Listener): this; + addListener(eventName: EventFilter | string, listener: Listener): this; + removeAllListeners(eventName: EventFilter | string): this; + removeListener(eventName: any, listener: Listener): this; + + interface: DisputeManagerInterface; + + functions: { + getDisputeFees(overrides?: CallOverrides): Promise<[string, BigNumber]>; + + "getDisputeFees()"(overrides?: CallOverrides): Promise<[string, BigNumber]>; + + getDispute( + _disputeId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string, number, number, number, BigNumber, BigNumber] & { + subject: string; + possibleRulings: number; + state: number; + finalRuling: number; + lastRoundId: BigNumber; + createTermId: BigNumber; + } + >; + + "getDispute(uint256)"( + _disputeId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string, number, number, number, BigNumber, BigNumber] & { + subject: string; + possibleRulings: number; + state: number; + finalRuling: number; + lastRoundId: BigNumber; + createTermId: BigNumber; + } + >; + }; + + getDisputeFees(overrides?: CallOverrides): Promise<[string, BigNumber]>; + + "getDisputeFees()"(overrides?: CallOverrides): Promise<[string, BigNumber]>; + + getDispute( + _disputeId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string, number, number, number, BigNumber, BigNumber] & { + subject: string; + possibleRulings: number; + state: number; + finalRuling: number; + lastRoundId: BigNumber; + createTermId: BigNumber; + } + >; + + "getDispute(uint256)"( + _disputeId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string, number, number, number, BigNumber, BigNumber] & { + subject: string; + possibleRulings: number; + state: number; + finalRuling: number; + lastRoundId: BigNumber; + createTermId: BigNumber; + } + >; + + callStatic: { + getDisputeFees(overrides?: CallOverrides): Promise<[string, BigNumber]>; + + "getDisputeFees()"(overrides?: CallOverrides): Promise<[string, BigNumber]>; + + getDispute( + _disputeId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string, number, number, number, BigNumber, BigNumber] & { + subject: string; + possibleRulings: number; + state: number; + finalRuling: number; + lastRoundId: BigNumber; + createTermId: BigNumber; + } + >; + + "getDispute(uint256)"( + _disputeId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string, number, number, number, BigNumber, BigNumber] & { + subject: string; + possibleRulings: number; + state: number; + finalRuling: number; + lastRoundId: BigNumber; + createTermId: BigNumber; + } + >; + }; + + filters: {}; + + estimateGas: { + getDisputeFees(overrides?: CallOverrides): Promise; + + "getDisputeFees()"(overrides?: CallOverrides): Promise; + + getDispute( + _disputeId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getDispute(uint256)"( + _disputeId: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + getDisputeFees(overrides?: CallOverrides): Promise; + + "getDisputeFees()"( + overrides?: CallOverrides + ): Promise; + + getDispute( + _disputeId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getDispute(uint256)"( + _disputeId: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/packages/hardhat/typechain/OwnableCeleste.d.ts b/packages/hardhat/typechain/OwnableCeleste.d.ts index ede52ca5..ce9cb364 100644 --- a/packages/hardhat/typechain/OwnableCeleste.d.ts +++ b/packages/hardhat/typechain/OwnableCeleste.d.ts @@ -33,6 +33,7 @@ interface OwnableCelesteInterface extends ethers.utils.Interface { "owner()": FunctionFragment; "createDispute(uint256,bytes)": FunctionFragment; "rule(uint256)": FunctionFragment; + "getDisputeManager()": FunctionFragment; "currentId()": FunctionFragment; }; @@ -65,6 +66,10 @@ interface OwnableCelesteInterface extends ethers.utils.Interface { values: [BigNumberish, BytesLike] ): string; encodeFunctionData(functionFragment: "rule", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "getDisputeManager", + values?: undefined + ): string; encodeFunctionData(functionFragment: "currentId", values?: undefined): string; decodeFunctionResult(functionFragment: "setOwner", data: BytesLike): Result; @@ -93,6 +98,10 @@ interface OwnableCelesteInterface extends ethers.utils.Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "rule", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getDisputeManager", + data: BytesLike + ): Result; decodeFunctionResult(functionFragment: "currentId", data: BytesLike): Result; events: {}; @@ -210,6 +219,10 @@ export class OwnableCeleste extends Contract { overrides?: Overrides ): Promise; + getDisputeManager(overrides?: CallOverrides): Promise<[string]>; + + "getDisputeManager()"(overrides?: CallOverrides): Promise<[string]>; + currentId(overrides?: CallOverrides): Promise<[BigNumber]>; "currentId()"(overrides?: CallOverrides): Promise<[BigNumber]>; @@ -310,6 +323,10 @@ export class OwnableCeleste extends Contract { overrides?: Overrides ): Promise; + getDisputeManager(overrides?: CallOverrides): Promise; + + "getDisputeManager()"(overrides?: CallOverrides): Promise; + currentId(overrides?: CallOverrides): Promise; "currentId()"(overrides?: CallOverrides): Promise; @@ -410,6 +427,10 @@ export class OwnableCeleste extends Contract { overrides?: CallOverrides ): Promise<[string, BigNumber] & { subject: string; ruling: BigNumber }>; + getDisputeManager(overrides?: CallOverrides): Promise; + + "getDisputeManager()"(overrides?: CallOverrides): Promise; + currentId(overrides?: CallOverrides): Promise; "currentId()"(overrides?: CallOverrides): Promise; @@ -503,6 +524,10 @@ export class OwnableCeleste extends Contract { overrides?: Overrides ): Promise; + getDisputeManager(overrides?: CallOverrides): Promise; + + "getDisputeManager()"(overrides?: CallOverrides): Promise; + currentId(overrides?: CallOverrides): Promise; "currentId()"(overrides?: CallOverrides): Promise; @@ -605,6 +630,12 @@ export class OwnableCeleste extends Contract { overrides?: Overrides ): Promise; + getDisputeManager(overrides?: CallOverrides): Promise; + + "getDisputeManager()"( + overrides?: CallOverrides + ): Promise; + currentId(overrides?: CallOverrides): Promise; "currentId()"(overrides?: CallOverrides): Promise; diff --git a/packages/hardhat/typechain/Quest.d.ts b/packages/hardhat/typechain/Quest.d.ts index 1410f1f6..852f073b 100644 --- a/packages/hardhat/typechain/Quest.d.ts +++ b/packages/hardhat/typechain/Quest.d.ts @@ -23,7 +23,6 @@ import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; interface QuestInterface extends ethers.utils.Interface { functions: { "aragonGovernAddress()": FunctionFragment; - "c_0xa706fae5(bytes32)": FunctionFragment; "claim(bytes,address,uint256,bool)": FunctionFragment; "claims(uint256)": FunctionFragment; "deposit()": FunctionFragment; @@ -41,10 +40,6 @@ interface QuestInterface extends ethers.utils.Interface { functionFragment: "aragonGovernAddress", values?: undefined ): string; - encodeFunctionData( - functionFragment: "c_0xa706fae5", - values: [BytesLike] - ): string; encodeFunctionData( functionFragment: "claim", values: [BytesLike, string, BigNumberish, boolean] @@ -91,10 +86,6 @@ interface QuestInterface extends ethers.utils.Interface { functionFragment: "aragonGovernAddress", data: BytesLike ): Result; - decodeFunctionResult( - functionFragment: "c_0xa706fae5", - data: BytesLike - ): Result; decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result; decodeFunctionResult(functionFragment: "claims", data: BytesLike): Result; decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result; @@ -150,16 +141,6 @@ export class Quest extends Contract { "aragonGovernAddress()"(overrides?: CallOverrides): Promise<[string]>; - c_0xa706fae5( - c__0xa706fae5: BytesLike, - overrides?: CallOverrides - ): Promise<[void]>; - - "c_0xa706fae5(bytes32)"( - c__0xa706fae5: BytesLike, - overrides?: CallOverrides - ): Promise<[void]>; - claim( _evidence: BytesLike, _player: string, @@ -245,16 +226,6 @@ export class Quest extends Contract { "aragonGovernAddress()"(overrides?: CallOverrides): Promise; - c_0xa706fae5( - c__0xa706fae5: BytesLike, - overrides?: CallOverrides - ): Promise; - - "c_0xa706fae5(bytes32)"( - c__0xa706fae5: BytesLike, - overrides?: CallOverrides - ): Promise; - claim( _evidence: BytesLike, _player: string, @@ -340,16 +311,6 @@ export class Quest extends Contract { "aragonGovernAddress()"(overrides?: CallOverrides): Promise; - c_0xa706fae5( - c__0xa706fae5: BytesLike, - overrides?: CallOverrides - ): Promise; - - "c_0xa706fae5(bytes32)"( - c__0xa706fae5: BytesLike, - overrides?: CallOverrides - ): Promise; - claim( _evidence: BytesLike, _player: string, @@ -438,16 +399,6 @@ export class Quest extends Contract { "aragonGovernAddress()"(overrides?: CallOverrides): Promise; - c_0xa706fae5( - c__0xa706fae5: BytesLike, - overrides?: CallOverrides - ): Promise; - - "c_0xa706fae5(bytes32)"( - c__0xa706fae5: BytesLike, - overrides?: CallOverrides - ): Promise; - claim( _evidence: BytesLike, _player: string, @@ -517,16 +468,6 @@ export class Quest extends Contract { overrides?: CallOverrides ): Promise; - c_0xa706fae5( - c__0xa706fae5: BytesLike, - overrides?: CallOverrides - ): Promise; - - "c_0xa706fae5(bytes32)"( - c__0xa706fae5: BytesLike, - overrides?: CallOverrides - ): Promise; - claim( _evidence: BytesLike, _player: string, diff --git a/packages/hardhat/typechain/QuestFactory.d.ts b/packages/hardhat/typechain/QuestFactory.d.ts index e5bf555d..d5967857 100644 --- a/packages/hardhat/typechain/QuestFactory.d.ts +++ b/packages/hardhat/typechain/QuestFactory.d.ts @@ -23,7 +23,6 @@ import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; interface QuestFactoryInterface extends ethers.utils.Interface { functions: { "aragonGovernAddress()": FunctionFragment; - "c_0x8b2f0f3a(bytes32)": FunctionFragment; "createQuest(string,bytes,address,uint256,address)": FunctionFragment; "deposit()": FunctionFragment; "owner()": FunctionFragment; @@ -36,10 +35,6 @@ interface QuestFactoryInterface extends ethers.utils.Interface { functionFragment: "aragonGovernAddress", values?: undefined ): string; - encodeFunctionData( - functionFragment: "c_0x8b2f0f3a", - values: [BytesLike] - ): string; encodeFunctionData( functionFragment: "createQuest", values: [string, BytesLike, string, BigNumberish, string] @@ -63,10 +58,6 @@ interface QuestFactoryInterface extends ethers.utils.Interface { functionFragment: "aragonGovernAddress", data: BytesLike ): Result; - decodeFunctionResult( - functionFragment: "c_0x8b2f0f3a", - data: BytesLike - ): Result; decodeFunctionResult( functionFragment: "createQuest", data: BytesLike @@ -112,16 +103,6 @@ export class QuestFactory extends Contract { "aragonGovernAddress()"(overrides?: CallOverrides): Promise<[string]>; - c_0x8b2f0f3a( - c__0x8b2f0f3a: BytesLike, - overrides?: CallOverrides - ): Promise<[void]>; - - "c_0x8b2f0f3a(bytes32)"( - c__0x8b2f0f3a: BytesLike, - overrides?: CallOverrides - ): Promise<[void]>; - createQuest( _questTitle: string, _questDetailsRef: BytesLike, @@ -183,16 +164,6 @@ export class QuestFactory extends Contract { "aragonGovernAddress()"(overrides?: CallOverrides): Promise; - c_0x8b2f0f3a( - c__0x8b2f0f3a: BytesLike, - overrides?: CallOverrides - ): Promise; - - "c_0x8b2f0f3a(bytes32)"( - c__0x8b2f0f3a: BytesLike, - overrides?: CallOverrides - ): Promise; - createQuest( _questTitle: string, _questDetailsRef: BytesLike, @@ -254,16 +225,6 @@ export class QuestFactory extends Contract { "aragonGovernAddress()"(overrides?: CallOverrides): Promise; - c_0x8b2f0f3a( - c__0x8b2f0f3a: BytesLike, - overrides?: CallOverrides - ): Promise; - - "c_0x8b2f0f3a(bytes32)"( - c__0x8b2f0f3a: BytesLike, - overrides?: CallOverrides - ): Promise; - createQuest( _questTitle: string, _questDetailsRef: BytesLike, @@ -347,16 +308,6 @@ export class QuestFactory extends Contract { "aragonGovernAddress()"(overrides?: CallOverrides): Promise; - c_0x8b2f0f3a( - c__0x8b2f0f3a: BytesLike, - overrides?: CallOverrides - ): Promise; - - "c_0x8b2f0f3a(bytes32)"( - c__0x8b2f0f3a: BytesLike, - overrides?: CallOverrides - ): Promise; - createQuest( _questTitle: string, _questDetailsRef: BytesLike, @@ -419,16 +370,6 @@ export class QuestFactory extends Contract { overrides?: CallOverrides ): Promise; - c_0x8b2f0f3a( - c__0x8b2f0f3a: BytesLike, - overrides?: CallOverrides - ): Promise; - - "c_0x8b2f0f3a(bytes32)"( - c__0x8b2f0f3a: BytesLike, - overrides?: CallOverrides - ): Promise; - createQuest( _questTitle: string, _questDetailsRef: BytesLike, diff --git a/packages/hardhat/typechain/factories/DisputeManager__factory.ts b/packages/hardhat/typechain/factories/DisputeManager__factory.ts new file mode 100644 index 00000000..40466584 --- /dev/null +++ b/packages/hardhat/typechain/factories/DisputeManager__factory.ts @@ -0,0 +1,117 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import { Contract, ContractFactory, Overrides } from "@ethersproject/contracts"; + +import type { DisputeManager } from "../DisputeManager"; + +export class DisputeManager__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + mockCelesteAddress: string, + overrides?: Overrides + ): Promise { + return super.deploy( + mockCelesteAddress, + overrides || {} + ) as Promise; + } + getDeployTransaction( + mockCelesteAddress: string, + overrides?: Overrides + ): TransactionRequest { + return super.getDeployTransaction(mockCelesteAddress, overrides || {}); + } + attach(address: string): DisputeManager { + return super.attach(address) as DisputeManager; + } + connect(signer: Signer): DisputeManager__factory { + return super.connect(signer) as DisputeManager__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): DisputeManager { + return new Contract(address, _abi, signerOrProvider) as DisputeManager; + } +} + +const _abi = [ + { + constant: true, + inputs: [], + name: "getDisputeFees", + outputs: [ + { + name: "", + type: "address", + }, + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "_disputeId", + type: "uint256", + }, + ], + name: "getDispute", + outputs: [ + { + name: "subject", + type: "address", + }, + { + name: "possibleRulings", + type: "uint8", + }, + { + name: "state", + type: "uint8", + }, + { + name: "finalRuling", + type: "uint8", + }, + { + name: "lastRoundId", + type: "uint256", + }, + { + name: "createTermId", + type: "uint64", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + name: "mockCelesteAddress", + type: "address", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b506040516020806103cb8339810180604052602081101561003057600080fd5b8101908080519060200190929190505050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061033a806100916000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80637b751b9e1461003b578063e3a96cbd1461008c575b600080fd5b61004361014b565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390f35b6100b8600480360360208110156100a257600080fd5b810190808035906020019092919050505061021c565b604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018660ff1660ff16815260200185600481111561010657fe5b60ff1681526020018460ff1660ff1681526020018381526020018267ffffffffffffffff1667ffffffffffffffff168152602001965050505050505060405180910390f35b60008060008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637b751b9e6040518163ffffffff1660e01b815260040160606040518083038186803b1580156101ba57600080fd5b505afa1580156101ce573d6000803e3d6000fd5b505050506040513d60608110156101e457600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050509250925092508181945094505050509091565b6000806000806000806000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663564a565d8a6040518263ffffffff1660e01b815260040180828152602001915050604080518083038186803b15801561029957600080fd5b505afa1580156102ad573d6000803e3d6000fd5b505050506040513d60408110156102c357600080fd5b8101908080519060200190929190805190602001909291905050509150915081600082600080600084945082925081915080905097509750975097509750975050509193955091939556fea165627a7a72305820565a683f33015a30b0ddaff15ba6311e738bf29ed720ecf89f34641d3b42d5120029"; diff --git a/packages/hardhat/typechain/factories/ERC20__factory.ts b/packages/hardhat/typechain/factories/ERC20__factory.ts index 5fd8455a..e84eaf14 100644 --- a/packages/hardhat/typechain/factories/ERC20__factory.ts +++ b/packages/hardhat/typechain/factories/ERC20__factory.ts @@ -328,4 +328,4 @@ const _abi = [ ]; const _bytecode = - "0x60806040523480156200001157600080fd5b506040516200173b3803806200173b833981810160405281019062000037919062000193565b81600390805190602001906200004f92919062000071565b5080600490805190602001906200006892919062000071565b50505062000376565b8280546200007f906200029b565b90600052602060002090601f016020900481019282620000a35760008555620000ef565b82601f10620000be57805160ff1916838001178555620000ef565b82800160010185558215620000ef579182015b82811115620000ee578251825591602001919060010190620000d1565b5b509050620000fe919062000102565b5090565b5b808211156200011d57600081600090555060010162000103565b5090565b60006200013862000132846200022f565b62000206565b9050828152602081018484840111156200015157600080fd5b6200015e84828562000265565b509392505050565b600082601f8301126200017857600080fd5b81516200018a84826020860162000121565b91505092915050565b60008060408385031215620001a757600080fd5b600083015167ffffffffffffffff811115620001c257600080fd5b620001d08582860162000166565b925050602083015167ffffffffffffffff811115620001ee57600080fd5b620001fc8582860162000166565b9150509250929050565b60006200021262000225565b9050620002208282620002d1565b919050565b6000604051905090565b600067ffffffffffffffff8211156200024d576200024c62000336565b5b620002588262000365565b9050602081019050919050565b60005b838110156200028557808201518184015260208101905062000268565b8381111562000295576000848401525b50505050565b60006002820490506001821680620002b457607f821691505b60208210811415620002cb57620002ca62000307565b5b50919050565b620002dc8262000365565b810181811067ffffffffffffffff82111715620002fe57620002fd62000336565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b6113b580620003866000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80633950935111610081578063a457c2d71161005b578063a457c2d714610206578063a9059cbb14610236578063dd62ed3e14610266576100c9565b8063395093511461018857806370a08231146101b857806395d89b41146101e8576100c9565b806318160ddd116100b257806318160ddd1461011c57806323b872dd1461013a578063313ce5671461016a576100c9565b806306fdde03146100ce578063095ea7b3146100ec575b600080fd5b6100d6610296565b6040516100e39190610e55565b60405180910390f35b61010660048036038101906101019190610ca3565b610328565b6040516101139190610e3a565b60405180910390f35b610124610346565b6040516101319190610f57565b60405180910390f35b610154600480360381019061014f9190610c54565b610350565b6040516101619190610e3a565b60405180910390f35b610172610448565b60405161017f9190610f72565b60405180910390f35b6101a2600480360381019061019d9190610ca3565b610451565b6040516101af9190610e3a565b60405180910390f35b6101d260048036038101906101cd9190610bef565b6104fd565b6040516101df9190610f57565b60405180910390f35b6101f0610545565b6040516101fd9190610e55565b60405180910390f35b610220600480360381019061021b9190610ca3565b6105d7565b60405161022d9190610e3a565b60405180910390f35b610250600480360381019061024b9190610ca3565b6106c2565b60405161025d9190610e3a565b60405180910390f35b610280600480360381019061027b9190610c18565b6106e0565b60405161028d9190610f57565b60405180910390f35b6060600380546102a590611087565b80601f01602080910402602001604051908101604052809291908181526020018280546102d190611087565b801561031e5780601f106102f35761010080835404028352916020019161031e565b820191906000526020600020905b81548152906001019060200180831161030157829003601f168201915b5050505050905090565b600061033c610335610767565b848461076f565b6001905092915050565b6000600254905090565b600061035d84848461093a565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006103a8610767565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610428576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041f90610ed7565b60405180910390fd5b61043c85610434610767565b85840361076f565b60019150509392505050565b60006012905090565b60006104f361045e610767565b84846001600061046c610767565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546104ee9190610fa9565b61076f565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60606004805461055490611087565b80601f016020809104026020016040519081016040528092919081815260200182805461058090611087565b80156105cd5780601f106105a2576101008083540402835291602001916105cd565b820191906000526020600020905b8154815290600101906020018083116105b057829003601f168201915b5050505050905090565b600080600160006105e6610767565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156106a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161069a90610f37565b60405180910390fd5b6106b76106ae610767565b8585840361076f565b600191505092915050565b60006106d66106cf610767565b848461093a565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156107df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107d690610f17565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561084f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084690610e97565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161092d9190610f57565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109a190610ef7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1190610e77565b60405180910390fd5b610a25838383610bbb565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610aab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa290610eb7565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b3e9190610fa9565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610ba29190610f57565b60405180910390a3610bb5848484610bc0565b50505050565b505050565b505050565b600081359050610bd481611351565b92915050565b600081359050610be981611368565b92915050565b600060208284031215610c0157600080fd5b6000610c0f84828501610bc5565b91505092915050565b60008060408385031215610c2b57600080fd5b6000610c3985828601610bc5565b9250506020610c4a85828601610bc5565b9150509250929050565b600080600060608486031215610c6957600080fd5b6000610c7786828701610bc5565b9350506020610c8886828701610bc5565b9250506040610c9986828701610bda565b9150509250925092565b60008060408385031215610cb657600080fd5b6000610cc485828601610bc5565b9250506020610cd585828601610bda565b9150509250929050565b610ce881611011565b82525050565b6000610cf982610f8d565b610d038185610f98565b9350610d13818560208601611054565b610d1c81611117565b840191505092915050565b6000610d34602383610f98565b9150610d3f82611128565b604082019050919050565b6000610d57602283610f98565b9150610d6282611177565b604082019050919050565b6000610d7a602683610f98565b9150610d85826111c6565b604082019050919050565b6000610d9d602883610f98565b9150610da882611215565b604082019050919050565b6000610dc0602583610f98565b9150610dcb82611264565b604082019050919050565b6000610de3602483610f98565b9150610dee826112b3565b604082019050919050565b6000610e06602583610f98565b9150610e1182611302565b604082019050919050565b610e258161103d565b82525050565b610e3481611047565b82525050565b6000602082019050610e4f6000830184610cdf565b92915050565b60006020820190508181036000830152610e6f8184610cee565b905092915050565b60006020820190508181036000830152610e9081610d27565b9050919050565b60006020820190508181036000830152610eb081610d4a565b9050919050565b60006020820190508181036000830152610ed081610d6d565b9050919050565b60006020820190508181036000830152610ef081610d90565b9050919050565b60006020820190508181036000830152610f1081610db3565b9050919050565b60006020820190508181036000830152610f3081610dd6565b9050919050565b60006020820190508181036000830152610f5081610df9565b9050919050565b6000602082019050610f6c6000830184610e1c565b92915050565b6000602082019050610f876000830184610e2b565b92915050565b600081519050919050565b600082825260208201905092915050565b6000610fb48261103d565b9150610fbf8361103d565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610ff457610ff36110b9565b5b828201905092915050565b600061100a8261101d565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015611072578082015181840152602081019050611057565b83811115611081576000848401525b50505050565b6000600282049050600182168061109f57607f821691505b602082108114156110b3576110b26110e8565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b61135a81610fff565b811461136557600080fd5b50565b6113718161103d565b811461137c57600080fd5b5056fea264697066735822122040c697df55bf25454bf3837d2e3209bcc47662ee58549aaeb50f40318a2d53c064736f6c63430008010033"; + "0x60806040523480156200001157600080fd5b5060405162000ef538038062000ef58339810160408190526200003491620001c1565b81516200004990600390602085019062000068565b5080516200005f90600490602084019062000068565b5050506200027b565b828054620000769062000228565b90600052602060002090601f0160209004810192826200009a5760008555620000e5565b82601f10620000b557805160ff1916838001178555620000e5565b82800160010185558215620000e5579182015b82811115620000e5578251825591602001919060010190620000c8565b50620000f3929150620000f7565b5090565b5b80821115620000f35760008155600101620000f8565b600082601f8301126200011f578081fd5b81516001600160401b03808211156200013c576200013c62000265565b604051601f8301601f19908116603f0116810190828211818310171562000167576200016762000265565b8160405283815260209250868385880101111562000183578485fd5b8491505b83821015620001a6578582018301518183018401529082019062000187565b83821115620001b757848385830101525b9695505050505050565b60008060408385031215620001d4578182fd5b82516001600160401b0380821115620001eb578384fd5b620001f9868387016200010e565b935060208501519150808211156200020f578283fd5b506200021e858286016200010e565b9150509250929050565b6002810460018216806200023d57607f821691505b602082108114156200025f57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b610c6a806200028b6000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80633950935111610081578063a457c2d71161005b578063a457c2d714610177578063a9059cbb1461018a578063dd62ed3e1461019d576100c9565b8063395093511461014957806370a082311461015c57806395d89b411461016f576100c9565b806318160ddd116100b257806318160ddd1461010c57806323b872dd14610121578063313ce56714610134576100c9565b806306fdde03146100ce578063095ea7b3146100ec575b600080fd5b6100d66101b0565b6040516100e39190610890565b60405180910390f35b6100ff6100fa36600461085c565b610242565b6040516100e39190610885565b61011461025f565b6040516100e39190610b8c565b6100ff61012f366004610821565b610265565b61013c61033f565b6040516100e39190610b95565b6100ff61015736600461085c565b610344565b61011461016a3660046107ce565b6103a5565b6100d66103d1565b6100ff61018536600461085c565b6103e0565b6100ff61019836600461085c565b610480565b6101146101ab3660046107ef565b610494565b6060600380546101bf90610be0565b80601f01602080910402602001604051908101604052809291908181526020018280546101eb90610be0565b80156102385780601f1061020d57610100808354040283529160200191610238565b820191906000526020600020905b81548152906001019060200180831161021b57829003601f168201915b5050505050905090565b600061025661024f6104cc565b84846104d0565b50600192915050565b60025490565b60006102728484846105df565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600160205260408120816102a06104cc565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610320576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161031790610a18565b60405180910390fd5b6103348561032c6104cc565b8584036104d0565b506001949350505050565b601290565b60006102566103516104cc565b84846001600061035f6104cc565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918b16815292529020546103a09190610ba3565b6104d0565b73ffffffffffffffffffffffffffffffffffffffff81166000908152602081905260409020545b919050565b6060600480546101bf90610be0565b600080600160006103ef6104cc565b73ffffffffffffffffffffffffffffffffffffffff90811682526020808301939093526040918201600090812091881681529252902054905082811015610462576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161031790610b2f565b61047661046d6104cc565b858584036104d0565b5060019392505050565b600061025661048d6104cc565b84846105df565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b3390565b73ffffffffffffffffffffffffffffffffffffffff831661051d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161031790610ad2565b73ffffffffffffffffffffffffffffffffffffffff821661056a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103179061095e565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906105d2908590610b8c565b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff831661062c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161031790610a75565b73ffffffffffffffffffffffffffffffffffffffff8216610679576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161031790610901565b6106848383836107a5565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260208190526040902054818110156106e4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610317906109bb565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260208190526040808220858503905591851681529081208054849290610728908490610ba3565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161078c9190610b8c565b60405180910390a361079f8484846107a5565b50505050565b505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146103cc57600080fd5b6000602082840312156107df578081fd5b6107e8826107aa565b9392505050565b60008060408385031215610801578081fd5b61080a836107aa565b9150610818602084016107aa565b90509250929050565b600080600060608486031215610835578081fd5b61083e846107aa565b925061084c602085016107aa565b9150604084013590509250925092565b6000806040838503121561086e578182fd5b610877836107aa565b946020939093013593505050565b901515815260200190565b6000602080835283518082850152825b818110156108bc578581018301518582016040015282016108a0565b818111156108cd5783604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201527f6573730000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560408201527f7373000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260408201527f616c616e63650000000000000000000000000000000000000000000000000000606082015260800190565b60208082526028908201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160408201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460408201527f6472657373000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460408201527f7265737300000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760408201527f207a65726f000000000000000000000000000000000000000000000000000000606082015260800190565b90815260200190565b60ff91909116815260200190565b60008219821115610bdb577f4e487b710000000000000000000000000000000000000000000000000000000081526011600452602481fd5b500190565b600281046001821680610bf457607f821691505b60208210811415610c2e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b5091905056fea26469706673582212203fad0c9ae97dfff72799d04060584bb2c05e52e06a2ba90a3f5ff123d21a5af764736f6c63430008010033"; diff --git a/packages/hardhat/typechain/factories/OwnableCeleste__factory.ts b/packages/hardhat/typechain/factories/OwnableCeleste__factory.ts index b1e57a1e..85832fd0 100644 --- a/packages/hardhat/typechain/factories/OwnableCeleste__factory.ts +++ b/packages/hardhat/typechain/factories/OwnableCeleste__factory.ts @@ -247,6 +247,20 @@ const _abi = [ stateMutability: "nonpayable", type: "function", }, + { + constant: true, + inputs: [], + name: "getDisputeManager", + outputs: [ + { + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, { constant: true, inputs: [], @@ -279,4 +293,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b50604051604080610e898339810180604052604081101561003057600080fd5b81019080805190602001909291908051906020019092919050505033600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806001819055505050610da5806100e46000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80637cb57c64116100715780637cb57c64146102a75780637e9adccf1461034a5780638da5cb5b14610378578063c13517e1146103c2578063db18af6c14610459578063e00dd161146104ce576100b4565b806313af4035146100b95780631da213f2146100fd578063564a565d14610138578063647846a5146101bb57806369e15404146102055780637b751b9e14610223575b600080fd5b6100fb600480360360208110156100cf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104ec565b005b6101366004803603604081101561011357600080fd5b8101908080359060200190929190803560ff1690602001909291905050506105f3565b005b6101646004803603602081101561014e57600080fd5b8101908080359060200190929190505050610844565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018260048111156101a657fe5b60ff1681526020019250505060405180910390f35b6101c3610895565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61020d6108ba565b6040518082815260200191505060405180910390f35b61022b6108c0565b604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390f35b610348600480360360608110156102bd57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561030457600080fd5b82018360208201111561031657600080fd5b8035906020019184600183028401116401000000008311171561033857600080fd5b90919293919293905050506108f6565b005b6103766004803603602081101561036057600080fd5b81019080803590602001909291905050506108fc565b005b6103806108ff565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610443600480360360408110156103d857600080fd5b8101908080359060200190929190803590602001906401000000008111156103ff57600080fd5b82018360208201111561041157600080fd5b8035906020019184600183028401116401000000008311171561043357600080fd5b9091929391929390505050610925565b6040518082815260200191505060405180910390f35b6104856004803603602081101561046f57600080fd5b8101908080359060200190929190505050610ac9565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390f35b6104d6610c0f565b6040518082815260200191505060405180910390f35b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552523a4e4f545f4f574e45520000000000000000000000000000000000000081525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552523a4e4f545f4f574e45520000000000000000000000000000000000000081525060200191505060405180910390fd5b600060048111156106c357fe5b8160048111156106cf57fe5b141580156106f45750600160048111156106e557fe5b8160048111156106f157fe5b14155b610766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f4552523a4f5554434f4d455f4e4f545f41535349474e41424c4500000000000081525060200191505060405180910390fd5b60006004600084815260200190815260200160002090506001600481111561078a57fe5b8160000160149054906101000a900460ff1660048111156107a757fe5b1461081a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552523a4e4f545f44495350555445440000000000000000000000000000000081525060200191505060405180910390fd5b818160000160146101000a81548160ff0219169083600481111561083a57fe5b0217905550505050565b60046020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060000160149054906101000a900460ff16905082565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b6000806000306000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600154925092509250909192565b50505050565b50565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600254905060405180604001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020016001600481111561096157fe5b8152506004600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548160ff021916908360048111156109e257fe5b0217905550905050600260008154809291906001019190505550610a4c33306001546000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c15909392919063ffffffff16565b610abe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552523a4445504f5349545f4641494c4544000000000000000000000000000081525060200191505060405180910390fd5b809150509392505050565b600080600060046000858152602001908152602001600020905060036004811115610af057fe5b8160000160149054906101000a900460ff166004811115610b0d57fe5b1415610b44578060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660039250925050610c0a565b600480811115610b5057fe5b8160000160149054906101000a900460ff166004811115610b6d57fe5b1415610ba4578060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660049250925050610c0a565b60026004811115610bb157fe5b8160000160149054906101000a900460ff166004811115610bce57fe5b1415610c05578060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660009250925050610c0a565b600080fd5b915091565b60025481565b600060608573ffffffffffffffffffffffffffffffffffffffff166323b872dd905060e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050610d1c8682610d27565b915050949350505050565b6000806040516020818551602087016000895af16000811115610d6d573d60008114610d5a5760208114610d6357610d6b565b60019350610d6b565b600183511493505b505b5050809150509291505056fea165627a7a72305820c3adff7af65fe72997ebabdfc67a4d0bac2679c9a48ba22cf8d542e3202c7ac80029"; + "0x608060405234801561001057600080fd5b506040516040806113978339810180604052604081101561003057600080fd5b81019080805190602001909291908051906020019092919050505033600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600281905550306040516100e19061017a565b808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050604051809103906000f080158015610133573d6000803e3d6000fd5b506000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050610187565b6103cb80610fcc83390190565b610e36806101966000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80637cb57c641161008c578063c13517e111610066578063c13517e1146103dd578063db18af6c14610474578063db9bee46146104e9578063e00dd16114610533576100cf565b80637cb57c64146102c25780637e9adccf146103655780638da5cb5b14610393576100cf565b806313af4035146100d45780631da213f214610118578063564a565d14610153578063647846a5146101d657806369e15404146102205780637b751b9e1461023e575b600080fd5b610116600480360360208110156100ea57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610551565b005b6101516004803603604081101561012e57600080fd5b8101908080359060200190929190803560ff169060200190929190505050610658565b005b61017f6004803603602081101561016957600080fd5b81019080803590602001909291905050506108a9565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018260048111156101c157fe5b60ff1681526020019250505060405180910390f35b6101de6108fa565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610228610920565b6040518082815260200191505060405180910390f35b610246610926565b604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390f35b610363600480360360608110156102d857600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561031f57600080fd5b82018360208201111561033157600080fd5b8035906020019184600183028401116401000000008311171561035357600080fd5b909192939192939050505061095d565b005b6103916004803603602081101561037b57600080fd5b8101908080359060200190929190505050610963565b005b61039b610966565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61045e600480360360408110156103f357600080fd5b81019080803590602001909291908035906020019064010000000081111561041a57600080fd5b82018360208201111561042c57600080fd5b8035906020019184600183028401116401000000008311171561044e57600080fd5b909192939192939050505061098c565b6040518082815260200191505060405180910390f35b6104a06004803603602081101561048a57600080fd5b8101908080359060200190929190505050610b31565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390f35b6104f1610c77565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61053b610ca0565b6040518082815260200191505060405180910390f35b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610614576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552523a4e4f545f4f574e45520000000000000000000000000000000000000081525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461071b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552523a4e4f545f4f574e45520000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600481111561072857fe5b81600481111561073457fe5b1415801561075957506001600481111561074a57fe5b81600481111561075657fe5b14155b6107cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f4552523a4f5554434f4d455f4e4f545f41535349474e41424c4500000000000081525060200191505060405180910390fd5b6000600560008481526020019081526020016000209050600160048111156107ef57fe5b8160000160149054906101000a900460ff16600481111561080c57fe5b1461087f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552523a4e4f545f44495350555445440000000000000000000000000000000081525060200191505060405180910390fd5b818160000160146101000a81548160ff0219169083600481111561089f57fe5b0217905550505050565b60056020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060000160149054906101000a900460ff16905082565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60025481565b600080600030600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600254925092509250909192565b50505050565b50565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600354905060405180604001604052803373ffffffffffffffffffffffffffffffffffffffff168152602001600160048111156109c857fe5b8152506005600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548160ff02191690836004811115610a4957fe5b0217905550905050600360008154809291906001019190505550610ab43330600254600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ca6909392919063ffffffff16565b610b26576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552523a4445504f5349545f4641494c4544000000000000000000000000000081525060200191505060405180910390fd5b809150509392505050565b600080600060056000858152602001908152602001600020905060036004811115610b5857fe5b8160000160149054906101000a900460ff166004811115610b7557fe5b1415610bac578060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660039250925050610c72565b600480811115610bb857fe5b8160000160149054906101000a900460ff166004811115610bd557fe5b1415610c0c578060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660049250925050610c72565b60026004811115610c1957fe5b8160000160149054906101000a900460ff166004811115610c3657fe5b1415610c6d578060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660009250925050610c72565b600080fd5b915091565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60035481565b600060608573ffffffffffffffffffffffffffffffffffffffff166323b872dd905060e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050610dad8682610db8565b915050949350505050565b6000806040516020818551602087016000895af16000811115610dfe573d60008114610deb5760208114610df457610dfc565b60019350610dfc565b600183511493505b505b5050809150509291505056fea165627a7a72305820f2d223fcb3efcfc8d91b9122ffd4a2fa3bbdd3351cccee0c9b8eb3fd973ecf8f0029608060405234801561001057600080fd5b506040516020806103cb8339810180604052602081101561003057600080fd5b8101908080519060200190929190505050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061033a806100916000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80637b751b9e1461003b578063e3a96cbd1461008c575b600080fd5b61004361014b565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390f35b6100b8600480360360208110156100a257600080fd5b810190808035906020019092919050505061021c565b604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018660ff1660ff16815260200185600481111561010657fe5b60ff1681526020018460ff1660ff1681526020018381526020018267ffffffffffffffff1667ffffffffffffffff168152602001965050505050505060405180910390f35b60008060008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637b751b9e6040518163ffffffff1660e01b815260040160606040518083038186803b1580156101ba57600080fd5b505afa1580156101ce573d6000803e3d6000fd5b505050506040513d60608110156101e457600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050509250925092508181945094505050509091565b6000806000806000806000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663564a565d8a6040518263ffffffff1660e01b815260040180828152602001915050604080518083038186803b15801561029957600080fd5b505afa1580156102ad573d6000803e3d6000fd5b505050506040513d60408110156102c357600080fd5b8101908080519060200190929190805190602001909291905050509150915081600082600080600084945082925081915080905097509750975097509750975050509193955091939556fea165627a7a72305820565a683f33015a30b0ddaff15ba6311e738bf29ed720ecf89f34641d3b42d5120029"; diff --git a/packages/hardhat/typechain/factories/QuestFactory__factory.ts b/packages/hardhat/typechain/factories/QuestFactory__factory.ts index 435c5107..106b46fc 100644 --- a/packages/hardhat/typechain/factories/QuestFactory__factory.ts +++ b/packages/hardhat/typechain/factories/QuestFactory__factory.ts @@ -202,19 +202,6 @@ const _abi = [ stateMutability: "view", type: "function", }, - { - inputs: [ - { - internalType: "bytes32", - name: "c__0x8b2f0f3a", - type: "bytes32", - }, - ], - name: "c_0x8b2f0f3a", - outputs: [], - stateMutability: "pure", - type: "function", - }, { inputs: [ { @@ -326,4 +313,4 @@ const _abi = [ ]; const _bytecode = - "0x60806040523480156200001157600080fd5b5060405162005db238038062005db28339818101604052810190620000379190620007e4565b620000576200004b6200033c60201b60201c565b6200034460201b60201c565b6200008b7f7f532a9670581e8916da2ac758bfff74d188f6e9767fd4e334c2db008b44b86760001b6200040860201b60201c565b620000bf7fe5933bfcca3eada9874fbfb22e8ba9b249c45f07e37a8f047ac321bb23c47bb860001b6200040860201b60201c565b620000f37f12620e6df7798ff6086be477c7165237631a15b7b2c0089e36affe46456fa6c160001b6200040860201b60201c565b83600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620001687fb7db0f9e3fb7011e0c91772b4e5caa797c60fed3e3282b303dacf3d8ff059a0f60001b6200040860201b60201c565b6200019c7fb5763049532e25143a3e1c6717217842d38a93e5bce580683632d6da2b41865760001b6200040860201b60201c565b620001ae83836200040b60201b60201c565b620001e27fad88b78c53279d7bd4e9c91cf52645159d5b8729943dccec9577ff9e28b644ba60001b6200040860201b60201c565b620002167ff29563ec0e48f38521d3c7dd04a096e720b423a953bcba57f0ef9addd63a94d560001b6200040860201b60201c565b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614620002fd576200027e7fc53af6d43af95fcdfe0e756d21c67d531f09ef204935e0c26c6dc8a88f50674060001b6200040860201b60201c565b620002b27f140c219025b6ddb69cc3869a93263f46bcfe6bcb1f60af832ad096a365ecea2260001b6200040860201b60201c565b620002e67f4b2e6ed73fb62a865d8264b335bef8d35261537a659f6e76f2aa35f24743607760001b6200040860201b60201c565b620002f7816200066060201b60201c565b62000332565b620003317fa213971264d4fa29b8241b679d5881e9910a51ac18ad12728e977d79765fded260001b6200040860201b60201c565b5b5050505062000a6a565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b50565b6200041b6200033c60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff16620004416200077660201b60201c565b73ffffffffffffffffffffffffffffffffffffffff16146200049a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200049190620008e2565b60405180910390fd5b620004ce7f39ecc9c368e991d661499d9405625b38c8bb4a772584b057e0127164f2e3164f60001b6200040860201b60201c565b620005027f23a1c73237c2cd8a44f19541ea13cd55c303584a4397cb124ae038a655962edd60001b6200040860201b60201c565b620005367f401e5d2240e90607251ba5e118f2e25e4e6d2301e2e25a4f85d8299d49d7adcc60001b6200040860201b60201c565b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff16815260200182815250600260008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155905050620005eb7f402489eac071b0425e5b63d69cc8fc718b6877996bb01d803054816fb4cbda8e60001b6200040860201b60201c565b6200061f7fb0fcd73603acaeb1343a80193eb98319928dbf4b4afbd3d96786bd0416c613f960001b6200040860201b60201c565b7f556f88907cfe81bbd1433b2c2ba3860920f0b50b218c55ca0a060558e7ca4199428383604051620006549392919062000904565b60405180910390a15050565b620006706200033c60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff16620006966200077660201b60201c565b73ffffffffffffffffffffffffffffffffffffffff1614620006ef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620006e690620008e2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141562000762576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200075990620008c0565b60405180910390fd5b62000773816200034460201b60201c565b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600081519050620007b08162000a1c565b92915050565b600081519050620007c78162000a36565b92915050565b600081519050620007de8162000a50565b92915050565b60008060008060808587031215620007fb57600080fd5b60006200080b878288016200079f565b94505060206200081e87828801620007b6565b93505060406200083187828801620007cd565b925050606062000844878288016200079f565b91505092959194509250565b6200085b8162000952565b82525050565b60006200087060268362000941565b91506200087d82620009a4565b604082019050919050565b60006200089760208362000941565b9150620008a482620009f3565b602082019050919050565b620008ba816200099a565b82525050565b60006020820190508181036000830152620008db8162000861565b9050919050565b60006020820190508181036000830152620008fd8162000888565b9050919050565b60006060820190506200091b6000830186620008af565b6200092a602083018562000850565b620009396040830184620008af565b949350505050565b600082825260208201905092915050565b60006200095f826200097a565b9050919050565b6000620009738262000952565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b62000a278162000952565b811462000a3357600080fd5b50565b62000a418162000966565b811462000a4d57600080fd5b50565b62000a5b816200099a565b811462000a6757600080fd5b50565b6153388062000a7a6000396000f3fe60806040523480156200001157600080fd5b5060043610620000945760003560e01c8063c6b21b021162000063578063c6b21b02146200011f578063d0e30db0146200013f578063f2fde38b1462000162578063fef97a7f14620001825762000094565b8063715018a614620000995780638da5cb5b14620000a5578063abec0a0314620000c7578063b0a87ac114620000fd575b600080fd5b620000a3620001a2565b005b620000af62000233565b604051620000be9190620018f8565b60405180910390f35b620000e56004803603810190620000df919062001607565b6200025c565b604051620000f49190620018f8565b60405180910390f35b6200010762000598565b604051620001169190620018f8565b60405180910390f35b6200013d6004803603810190620001379190620015c6565b620005be565b005b62000149620007e9565b6040516200015992919062001a59565b60405180910390f35b6200018060048036038101906200017a919062001542565b6200081b565b005b620001a060048036038101906200019a91906200159a565b6200091f565b005b620001ac62000922565b73ffffffffffffffffffffffffffffffffffffffff16620001cc62000233565b73ffffffffffffffffffffffffffffffffffffffff161462000225576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200021c9062001b9b565b60405180910390fd5b6200023160006200092a565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60006200028c7f7e1fdbb01b117ee4c194c402a2db443c0fcd69b8fc5b3adc5e00b628c4d90f8860001b6200091f565b620002ba7f3519b72e7a97f861896324efaf7f4ebab5c2c327ef43b34904953a900828377660001b6200091f565b620002e87fc97dc16ef82c0057efe799f6e3ff20dd81dd8e6bb8fedad9b538844028f5e28f60001b6200091f565b600086868686600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1687600260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260010154336040516200034d90620013af565b620003619998979695949392919062001aaa565b604051809103906000f0801580156200037e573d6000803e3d6000fd5b509050620003af7fe4d64f3d8f61afc5a3205c8a3252e607017b6538d4a90a62549bfdb381d45a1960001b6200091f565b620003dd7f236377c3c96ef21bf1494328362a978ae04e3676423db266ae788f2cb68bb3b760001b6200091f565b62000460338260026040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481525050620009ee9092919063ffffffff16565b6200048e7fb9674dc895e493de90c7407349ebf455ef6c4ede0085ea0ad6486a593737bd3d60001b6200091f565b620004bc7fb17f5645e02bef1a0f822ac721521db96d94ab7c4ac0f9cbfc4cf9065a0d2a3060001b6200091f565b7f4cf18b7944786d158010105e0d058cfa9ca46ad789d42eb9b6fa9490be2a44f7818888888888600260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166002600101543360405162000527999897969594939291906200197f565b60405180910390a16200055d7fabe7ae02d6943979889a32bf95b69de31186eb411d22cb997ed5ab8a93bfac0e60001b6200091f565b6200058b7f15bb9ef7a8d637599a7e0c126245dfc02620da97f012522e681b8b5c3f47aacb60001b6200091f565b8091505095945050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b620005c862000922565b73ffffffffffffffffffffffffffffffffffffffff16620005e862000233565b73ffffffffffffffffffffffffffffffffffffffff161462000641576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620006389062001b9b565b60405180910390fd5b6200066f7f39ecc9c368e991d661499d9405625b38c8bb4a772584b057e0127164f2e3164f60001b6200091f565b6200069d7f23a1c73237c2cd8a44f19541ea13cd55c303584a4397cb124ae038a655962edd60001b6200091f565b620006cb7f401e5d2240e90607251ba5e118f2e25e4e6d2301e2e25a4f85d8299d49d7adcc60001b6200091f565b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff16815260200182815250600260008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101559050506200077a7f402489eac071b0425e5b63d69cc8fc718b6877996bb01d803054816fb4cbda8e60001b6200091f565b620007a87fb0fcd73603acaeb1343a80193eb98319928dbf4b4afbd3d96786bd0416c613f960001b6200091f565b7f556f88907cfe81bbd1433b2c2ba3860920f0b50b218c55ca0a060558e7ca4199428383604051620007dd9392919062001c23565b60405180910390a15050565b60028060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b6200082562000922565b73ffffffffffffffffffffffffffffffffffffffff166200084562000233565b73ffffffffffffffffffffffffffffffffffffffff16146200089e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620008959062001b9b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141562000911576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620009089062001b57565b60405180910390fd5b6200091c816200092a565b50565b50565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b62000a1c7f16671849961cdf573950853cb953a8701fbe703bee1e2bbc9468e0bc8b8b737260001b62000af1565b62000a4a7f0e4d6b39994d62f9d20fcc90dfceaa488a40d39269179e7604585f84e3e18c5160001b62000af1565b62000a787fbe9cf9e44b204b99344e6012c39de8f74184ef466980ba3a8785d9b6e03af06760001b62000af1565b62000a84838362000af4565b62000ab27fc5f85c53aed7274edb3161bd41f1002e68f02d531e2a603be18ed333567fb13760001b62000af1565b62000ae07f12ac2459d87b891fbcfefb839f886d59e8cec3d89bd10df04466b4e508c7c22a60001b62000af1565b62000aec838262000e7e565b505050565b50565b62000b227f1f655f9f6626bab57021cd51d4c68d228562d483bb2fd01513d5c32efbca596460001b62000af1565b62000b507f0dcca1fbc70a47cd5028c5d08da0cf034ed7943ffe2b69f130177fd59f42272060001b62000af1565b62000b7e7ff826b5da39629faf18f036578f151fe3575ae5c0785aea007ac2fbf54aee1c9060001b62000af1565b60008260200151111562000e4b5762000bba7f148473c1e4c2aad806d88d431fa0ca0fe56f07181541765ea7625d02e38e0a0060001b62000af1565b62000be87f487a138e8b9bbc3e7ce990568d53f102df5a4cb55713470859da63fca0aaf51660001b62000af1565b62000c167ff158a1a956f691c89d3d46ffe28fd1bdcfbe5c01b09224141111d3a5c909558660001b62000af1565b6000826000015173ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e83306040518363ffffffff1660e01b815260040162000c5992919062001915565b60206040518083038186803b15801562000c7257600080fd5b505afa15801562000c87573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000cad9190620016bb565b905062000cdd7fc8b30d2e1ef911a465a7873a35d88200a18e6ebae1dc12ae29191aba4bbbb18060001b62000af1565b62000d0b7f4b358bfba15809de5c9752a5fa555fef1f7c1a2fcb668b1102b34b10730ca57f60001b62000af1565b62000d397f3b9f43ff4929dc50f73d507f1d5dccf24f8929da8f0d294160e5879535f3944d60001b62000af1565b826020015181101562000d83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000d7a9062001bbd565b60405180910390fd5b62000db17f39f2733d14d08b44d5d1eb7ec40374e932068fd57aa8133aa9a3de684644c36a60001b62000af1565b62000ddf7f365f2c73ef485e487a7abf5c204c4c784f49c2f27ad127721c03cdff96ed30a160001b62000af1565b62000e0d7f0fd9812708c3945b07b8558c9a4c29234ac07b0a4993558b193c05e5c84b63f760001b62000af1565b62000e4482308560200151866000015173ffffffffffffffffffffffffffffffffffffffff166200100e909392919063ffffffff16565b5062000e7a565b62000e797f31f05d9223e29b66dab051b814b312f7c8d82903574ab8541fada4eb250d7a6560001b62000af1565b5b5050565b62000eac7fad6ff6ed18a8612a50cd22ad8ab2cbae7ca0611ad4f274ddf2b122328614049e60001b62000af1565b62000eda7f194e6abad055bfdfc1e09aec2ea3bdc4ca250944d508422a3c27648969290f3d60001b62000af1565b62000f087fb005c4e3b01539733712e06ec57fb429b4e9a99ee89a798ba39cdad1dd9d5b7460001b62000af1565b60008260200151111562000fdb5762000f447f4d9784bcfe9f57c2b914e4ad47b6290ff0847e3078574e2702ae472ea369fb4b60001b62000af1565b62000f727ffffbf807b5d5f122e3f5bf4c0a00579ed895116574c01f160721fd2ee9b8d12a60001b62000af1565b62000fa07f5ec56248c8f9762c2613dd7bd0c15a3c214c0929e69ae98235328064c8d62c7560001b62000af1565b62000fd5818360200151846000015173ffffffffffffffffffffffffffffffffffffffff166200109b9092919063ffffffff16565b6200100a565b620010097fef253902dc323643b9d8d4457b0c805bc1be97f81d968e7e3fadd33e1325de4e60001b62000af1565b5b5050565b62001095846323b872dd60e01b858585604051602401620010329392919062001942565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505062001125565b50505050565b620011208363a9059cbb60e01b8484604051602401620010bd92919062001a2c565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505062001125565b505050565b600062001189826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16620011f49092919063ffffffff16565b9050600081511115620011ef5780806020019051810190620011ac91906200156e565b620011ee576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620011e59062001c01565b60405180910390fd5b5b505050565b60606200120584846000856200120e565b90509392505050565b60608247101562001256576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200124d9062001b79565b60405180910390fd5b620012618562001330565b620012a3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200129a9062001bdf565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051620012ce9190620018df565b60006040518083038185875af1925050503d80600081146200130d576040519150601f19603f3d011682016040523d82523d6000602084013e62001312565b606091505b50915091506200132482828662001343565b92505050949350505050565b600080823b905060008111915050919050565b606083156200135557829050620013a8565b600083511115620013695782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200139f919062001a86565b60405180910390fd5b9392505050565b61322b80620020d883390190565b6000620013d4620013ce8462001c89565b62001c60565b905082815260208101848484011115620013ed57600080fd5b620013fa84828562001e18565b509392505050565b600062001419620014138462001cbf565b62001c60565b9050828152602081018484840111156200143257600080fd5b6200143f84828562001e18565b509392505050565b60008135905062001458816200203b565b92915050565b6000813590506200146f8162002055565b92915050565b60008151905062001486816200206f565b92915050565b6000813590506200149d8162002089565b92915050565b600082601f830112620014b557600080fd5b8135620014c7848260208601620013bd565b91505092915050565b600081359050620014e181620020a3565b92915050565b600082601f830112620014f957600080fd5b81356200150b84826020860162001402565b91505092915050565b6000813590506200152581620020bd565b92915050565b6000815190506200153c81620020bd565b92915050565b6000602082840312156200155557600080fd5b6000620015658482850162001447565b91505092915050565b6000602082840312156200158157600080fd5b6000620015918482850162001475565b91505092915050565b600060208284031215620015ad57600080fd5b6000620015bd848285016200148c565b91505092915050565b60008060408385031215620015da57600080fd5b6000620015ea85828601620014d0565b9250506020620015fd8582860162001514565b9150509250929050565b600080600080600060a086880312156200162057600080fd5b600086013567ffffffffffffffff8111156200163b57600080fd5b6200164988828901620014e7565b955050602086013567ffffffffffffffff8111156200166757600080fd5b6200167588828901620014a3565b94505060406200168888828901620014d0565b93505060606200169b8882890162001514565b9250506080620016ae888289016200145e565b9150509295509295909350565b600060208284031215620016ce57600080fd5b6000620016de848285016200152b565b91505092915050565b620016f28162001db4565b82525050565b620017038162001d4c565b82525050565b620017148162001d38565b82525050565b6000620017278262001cf5565b62001733818562001d0b565b93506200174581856020860162001e27565b620017508162001ec2565b840191505092915050565b6000620017688262001cf5565b62001774818562001d1c565b93506200178681856020860162001e27565b80840191505092915050565b6200179d8162001dc8565b82525050565b6000620017b08262001d00565b620017bc818562001d27565b9350620017ce81856020860162001e27565b620017d98162001ec2565b840191505092915050565b6000620017f360268362001d27565b9150620018008262001ed3565b604082019050919050565b60006200181a60268362001d27565b9150620018278262001f22565b604082019050919050565b60006200184160208362001d27565b91506200184e8262001f71565b602082019050919050565b600062001868601d8362001d27565b9150620018758262001f9a565b602082019050919050565b60006200188f601d8362001d27565b91506200189c8262001fc3565b602082019050919050565b6000620018b6602a8362001d27565b9150620018c38262001fec565b604082019050919050565b620018d98162001daa565b82525050565b6000620018ed82846200175b565b915081905092915050565b60006020820190506200190f600083018462001709565b92915050565b60006040820190506200192c600083018562001709565b6200193b602083018462001709565b9392505050565b600060608201905062001959600083018662001709565b62001968602083018562001709565b620019776040830184620018ce565b949350505050565b60006101208201905062001997600083018c62001709565b8181036020830152620019ab818b620017a3565b90508181036040830152620019c1818a6200171a565b9050620019d2606083018962001709565b620019e16080830188620018ce565b620019f060a0830187620016e7565b620019ff60c083018662001709565b62001a0e60e0830185620018ce565b62001a1e61010083018462001709565b9a9950505050505050505050565b600060408201905062001a43600083018562001709565b62001a526020830184620018ce565b9392505050565b600060408201905062001a70600083018562001792565b62001a7f6020830184620018ce565b9392505050565b6000602082019050818103600083015262001aa28184620017a3565b905092915050565b600061012082019050818103600083015262001ac7818c620017a3565b9050818103602083015262001add818b6200171a565b905062001aee604083018a62001792565b62001afd6060830189620018ce565b62001b0c608083018862001709565b62001b1b60a0830187620016f8565b62001b2a60c083018662001792565b62001b3960e0830185620018ce565b62001b4961010083018462001709565b9a9950505050505050505050565b6000602082019050818103600083015262001b7281620017e4565b9050919050565b6000602082019050818103600083015262001b94816200180b565b9050919050565b6000602082019050818103600083015262001bb68162001832565b9050919050565b6000602082019050818103600083015262001bd88162001859565b9050919050565b6000602082019050818103600083015262001bfa8162001880565b9050919050565b6000602082019050818103600083015262001c1c81620018a7565b9050919050565b600060608201905062001c3a6000830186620018ce565b62001c49602083018562001709565b62001c586040830184620018ce565b949350505050565b600062001c6c62001c7f565b905062001c7a828262001e5d565b919050565b6000604051905090565b600067ffffffffffffffff82111562001ca75762001ca662001e93565b5b62001cb28262001ec2565b9050602081019050919050565b600067ffffffffffffffff82111562001cdd5762001cdc62001e93565b5b62001ce88262001ec2565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600062001d458262001d8a565b9050919050565b600062001d598262001d8a565b9050919050565b60008115159050919050565b6000819050919050565b600062001d838262001d38565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600062001dc18262001df0565b9050919050565b600062001dd58262001ddc565b9050919050565b600062001de98262001d8a565b9050919050565b600062001dfd8262001e04565b9050919050565b600062001e118262001d8a565b9050919050565b82818337600083830152505050565b60005b8381101562001e4757808201518184015260208101905062001e2a565b8381111562001e57576000848401525b50505050565b62001e688262001ec2565b810181811067ffffffffffffffff8211171562001e8a5762001e8962001e93565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f4552524f52203a204465706f7369742062616420616c6c6f77616e6365000000600082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b620020468162001d38565b81146200205257600080fd5b50565b620020608162001d4c565b81146200206c57600080fd5b50565b6200207a8162001d60565b81146200208657600080fd5b50565b620020948162001d6c565b8114620020a057600080fd5b50565b620020ae8162001d76565b8114620020ba57600080fd5b50565b620020c88162001daa565b8114620020d457600080fd5b5056fe60806040523480156200001157600080fd5b506040516200322b3803806200322b83398181016040528101906200003791906200087e565b6200006b7fab13ea676f0821d71af17c1d8fbe461c2ce6ac1e5e313087018423ae8ca9b5d860001b620005fa60201b60201c565b6200009f7f76fc8e25ccdbce9ceb0936d7a29d8f9709dad3153582baae503f7f227b139aa660001b620005fa60201b60201c565b620000d37f9defca7217765f4f6cdde82e0160df545b7671bf4b589da81f024ca0700ecd5960001b620005fa60201b60201c565b8860019080519060200190620000eb929190620005fd565b50620001207f5ae447bca623b0b36cfdbfb363e2080fc270ae79a6117a80195fe8f8435afd9c60001b620005fa60201b60201c565b620001547f8b6604b64c6abe30e850e07323e52c582c731464944589d0ba4d2b40888def0060001b620005fa60201b60201c565b87600290805190602001906200016c9291906200068e565b50620001a17fe7bfc2b33488c5f87773d07aadeb489ffebfd466623c5ed239edbe3490a0570f60001b620005fa60201b60201c565b620001d57fee877786bf9bdbb1501396b598e50d2a537f5756ab5ea6924ea0b8229059a15560001b620005fa60201b60201c565b86600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506200024a7fce67f81e2c8c3846ea20b15c80daac313309f2055167349e128a07d02af9f30f60001b620005fa60201b60201c565b6200027e7f9acc6707f8133e155ec1b5741911342fd301f9c5bc52c28d24cccfa8f8615f6860001b620005fa60201b60201c565b85600481905550620002b97f4d44d8db5ed36200a824d318b97d3b5a7106944e1205e5e75500012c80eb520760001b620005fa60201b60201c565b620002ed7f8f09ea385cd5707baf6eb133766d025cf6c3e69b3ae2f8b3f29288ac9bb3b6fd60001b620005fa60201b60201c565b84600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620003627fd6d450868c1e9ea4e034f183f16ee0ebf2a88ded7dc2c39dbd3160a80b4f671b60001b620005fa60201b60201c565b620003967fbc5a26f7a0c37065e9bde8dda378104e2fb3dd81d6fc62832f023e31c36e6f9f60001b620005fa60201b60201c565b83600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506200040b7fd6a5bf5af3b299e6cb275bc3ebccdf65762ee0d72b588cf46740b9792d6a776460001b620005fa60201b60201c565b6200043f7f07f2e9b6df8be5e7a02cbb19870731ead16a510e75257a11663ca009fc31fd0460001b620005fa60201b60201c565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620004b37fa789516d2e752511f32d286c683b72ee73be46bde0ee065cd3869e71d6b1032360001b620005fa60201b60201c565b620004e77f70754cad7754e55980cad2f08530752c3079e7f5f3bfcbedeb0299d3f70af81b60001b620005fa60201b60201c565b60405180604001604052808473ffffffffffffffffffffffffffffffffffffffff16815260200183815250600860008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101559050506200059c7f38e8c7eb6b7e31294c6891525ebaa3718f4f1640463a6d56e7760b185da63a0b60001b620005fa60201b60201c565b620005d07f1e02935f2287515ddaf5f36d464505c3d011d35526c81aa574c7f8d86559065360001b620005fa60201b60201c565b6000600a60006101000a81548160ff02191690831515021790555050505050505050505062000bfd565b50565b8280546200060b9062000aba565b90600052602060002090601f0160209004810192826200062f57600085556200067b565b82601f106200064a57805160ff19168380011785556200067b565b828001600101855582156200067b579182015b828111156200067a5782518255916020019190600101906200065d565b5b5090506200068a91906200071f565b5090565b8280546200069c9062000aba565b90600052602060002090601f016020900481019282620006c057600085556200070c565b82601f10620006db57805160ff19168380011785556200070c565b828001600101855582156200070c579182015b828111156200070b578251825591602001919060010190620006ee565b5b5090506200071b91906200071f565b5090565b5b808211156200073a57600081600090555060010162000720565b5090565b6000620007556200074f84620009b2565b62000989565b9050828152602081018484840111156200076e57600080fd5b6200077b84828562000a84565b509392505050565b60006200079a6200079484620009e8565b62000989565b905082815260208101848484011115620007b357600080fd5b620007c084828562000a84565b509392505050565b600081519050620007d98162000b95565b92915050565b600081519050620007f08162000baf565b92915050565b600082601f8301126200080857600080fd5b81516200081a8482602086016200073e565b91505092915050565b600081519050620008348162000bc9565b92915050565b600082601f8301126200084c57600080fd5b81516200085e84826020860162000783565b91505092915050565b600081519050620008788162000be3565b92915050565b60008060008060008060008060006101208a8c0312156200089e57600080fd5b60008a015167ffffffffffffffff811115620008b957600080fd5b620008c78c828d016200083a565b99505060208a015167ffffffffffffffff811115620008e557600080fd5b620008f38c828d01620007f6565b9850506040620009068c828d0162000823565b9750506060620009198c828d0162000867565b96505060806200092c8c828d01620007c8565b95505060a06200093f8c828d01620007df565b94505060c0620009528c828d0162000823565b93505060e0620009658c828d0162000867565b925050610100620009798c828d01620007c8565b9150509295985092959850929598565b600062000995620009a8565b9050620009a3828262000af0565b919050565b6000604051905090565b600067ffffffffffffffff821115620009d057620009cf62000b55565b5b620009db8262000b84565b9050602081019050919050565b600067ffffffffffffffff82111562000a065762000a0562000b55565b5b62000a118262000b84565b9050602081019050919050565b600062000a2b8262000a5a565b9050919050565b600062000a3f8262000a5a565b9050919050565b600062000a538262000a1e565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b8381101562000aa457808201518184015260208101905062000a87565b8381111562000ab4576000848401525b50505050565b6000600282049050600182168062000ad357607f821691505b6020821081141562000aea5762000ae962000b26565b5b50919050565b62000afb8262000b84565b810181811067ffffffffffffffff8211171562000b1d5762000b1c62000b55565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b62000ba08162000a1e565b811462000bac57600080fd5b50565b62000bba8162000a32565b811462000bc657600080fd5b50565b62000bd48162000a46565b811462000be057600080fd5b50565b62000bee8162000a7a565b811462000bfa57600080fd5b50565b61261e8062000c0d6000396000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c8063a888c2cd1161008c578063d0e30db011610066578063d0e30db0146101ee578063e0c234231461020d578063f294cf381461022b578063f7c618c114610249576100df565b8063a888c2cd14610182578063b0a87ac1146101b4578063b434151c146101d2576100df565b80637ceae310116100bd5780637ceae3101461012a578063820ecc8214610148578063990cc48914610164576100df565b8063310a1ee3146100e4578063579ca2c9146101025780636c3a4cce1461010c575b600080fd5b6100ec610267565b6040516100f991906121ab565b60405180910390f35b61010a61026d565b005b610114610734565b6040516101219190611f8b565b60405180910390f35b610132610758565b60405161013f9190611fa6565b60405180910390f35b610162600480360381019061015d9190611c9b565b61077e565b005b61016c610781565b6040516101799190611fea565b60405180910390f35b61019c60048036038101906101979190611d3f565b610794565b6040516101ab93929190612027565b60405180910390f35b6101bc610876565b6040516101c99190611f8b565b60405180910390f35b6101ec60048036038101906101e79190611cc4565b61089c565b005b6101f66114d9565b604051610204929190612080565b60405180910390f35b61021561150b565b6040516102229190612005565b60405180910390f35b610233611599565b60405161024091906120a9565b60405180910390f35b610251611627565b60405161025e9190612065565b60405180910390f35b60045481565b6102997f6ae288ce15b57012df4180921230a66c6fabf9251498094ddb737814b606492960001b61077e565b6102c57fe12cd4c358085c076adc3a55b3583a9f13632a95eeda55c45f35bb24b033d40960001b61077e565b6102f17ff5bc8073fa98bb53ea23b8fe8cc8a90caf418dd92ebb76dbaf7bac6e97c316a960001b61077e565b61031d7f6d7dc127e1c0fbf8d47d8d5ed9fb197b29cfaeaa299c7c1a8668f7075d9136b060001b61077e565b6004544211610361576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103589061210b565b60405180910390fd5b61038d7feb5d0c70be4da3c01a18c2e638096bbce6e8d26dcf12b9ba4b7055127f0e2d5b60001b61077e565b6103b97fa5b54ed0718ab188497ff05d40ae32ac07c27a178db799b73df646e2ca0a625060001b61077e565b6103e57fc5343fdccb51459d2a1aff8a1ef33c1584a57a93458094865371a3ac2555e3e660001b61077e565b600a60009054906101000a900460ff16610594576104257fad3cd13224d9cfc702a9e728dda202057ed8c24534c892be3e074232eb75341360001b61077e565b6104517fc14384c42bd8940c9f7e11624283e30e0c2bfd637612250d42ef5691ef9b12b160001b61077e565b61047d7f4ebe3cc5fc2b728c226d22882da1fed0d45a26c682d9389a99f34bc7d58b214460001b61077e565b61051c60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660086040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160018201548152505061164d90919063ffffffff16565b6105487f5d2bf30bc630b60308c456e1c004c39185d000d3e0313fa1f24842b69c48c0ff60001b61077e565b6105747fa9ca1c6b3bf13ca244b083046998d4ef80e1a94d4b0cba437bca78ccf373284c60001b61077e565b6001600a60006101000a81548160ff0219169083151502179055506105c1565b6105c07f8c15a93409a621f6d2c18a82632d36142963a3260d5a027f3b26177a7d476efe60001b61077e565b5b6105ed7f77207cafb28d677329643b17934ac37e48db0cecce1276a6c6cf927a125e992760001b61077e565b6106197fce38176d699b8edbc84d2e97fdc54d329ab4c4085cd117c7382ed1e28b2c424260001b61077e565b610732600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161069a9190611f8b565b60206040518083038186803b1580156106b257600080fd5b505afa1580156106c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ea9190611d68565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117cb9092919063ffffffff16565b565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b50565b600a60009054906101000a900460ff1681565b600781815481106107a457600080fd5b90600052602060002090600302016000915090508060000180546107c790612329565b80601f01602080910402602001604051908101604052809291908181526020018280546107f390612329565b80156108405780601f1061081557610100808354040283529160200191610840565b820191906000526020600020905b81548152906001019060200180831161082357829003601f168201915b5050505050908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154905083565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6108c87f2c698c8ce278c71f18ae3bd516b11be9a9d33ce879182574eac31ac91eca63d060001b61077e565b6108f47f9f0cda30889f34a1ed4807cc2f8b6905e5feeee7d6fba012be050bd5ed4f06ea60001b61077e565b6109207fda1269147cd9d9e114ecfb252ed39917375c54e6d6b568701c56a6bea9cf464860001b61077e565b61094c7f6cbf3091910351086b812af7841180f4b97e770ebfe4839dc336b507cbf1a42b60001b61077e565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d39061212b565b60405180910390fd5b610a087f73cca811d761c29af457eccf1c9aa5bfe061bb9960b9ca3158b983c24283e09860001b61077e565b610a347fe39c6a0dbc2ee7eb59172617d5f6bd8b878ddf680dd6d22d65c31dfbc304877760001b61077e565b610a607f56b80045539484424ecf4f2353a0da9b98739aadf318a876723f0c018674adf560001b61077e565b610a8c7f182d292c9f2c939a4254c9c51e7af7fb5c62c2e544b2f700f9e0b611de4e21b760001b61077e565b600084511415610ad1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac89061216b565b60405180910390fd5b610afd7fbc5e38c2be95d51faffac02cda016974083da4a67dbdf745fbaa261ef66cde1460001b61077e565b610b297f3470ba4bf30d6edace69a86778bb8dd6d63f4ce83355590d90718dab6a43b51360001b61077e565b610b557fae3727fc8bfac5ef886581bedcedb2b68b02f0f4fe4d36ab4fc22f797ef4b74060001b61077e565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610bb29190611f8b565b60206040518083038186803b158015610bca57600080fd5b505afa158015610bde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c029190611d68565b9050610c307f8ae155061e7362c3c56f8cd71d6a46da8a552b08a911c99c1ebe49ee239f2c0160001b61077e565b610c5c7f7c434a47e737dd5f2b87825476f9f48f43ca267fb436aa4f6022b0d81ecbda3a60001b61077e565b8115610ef057610c8e7f31f8da8f759dcfe19a3cd50b5d7e4d7262a84bb8a09ad9d6dbe549b95bca1d8460001b61077e565b610cba7f437aa959f57ee6ce7eef9b05ea244caa5d89e0f7e35127e9a7321fc63896e09760001b61077e565b610ce67ff9301a88416a29a288ed31f83438bc2420a0062d1f311b7a0fd0564d8f97984560001b61077e565b600860000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610e6357610d8d7f196d9ebea3d6775fa9d9d7d93ad1face6ac44e528270ef793bc793c3d544b44960001b61077e565b610db97f7515bd3d3d84c9dcef39e22af918c4a4fd43e268a0f4668656e354e65355e06660001b61077e565b610de57f5de9000ae3616e178ae8dbd362d496c3ab405f34a53e42850f39b03bb66c654f60001b61077e565b6000610dff6008600101548361185190919063ffffffff16565b915050610e2e7fc51c70c47a611b66b0f468563dce8322446d98b658c1b449c2ec865489ee42be60001b61077e565b610e5a7f4f3005130d8c3f8cbc54ed1fd041cf238dca8403ca594fd5b9f260e5c9511e2360001b61077e565b80935050610eeb565b610e8f7f549534cfc70f01698b8f3ae6b9dfb964e043f41b99bd30c421a83fa1509a809f60001b61077e565b610ebb7fa25d6d5bd2b416d5d2fe5a88e2638b90c6bb460e6e02f26d483cfa819baeab2660001b61077e565b610ee77f3c897f4bfd2c48135b27b4ee5a5947e4ab2312c329f6eed21ef9950f0fe859f760001b61077e565b8092505b610f1d565b610f1c7f4632f0b1d13c62637a848560d8a4511fcd29785439493d1afdb48a748f40320460001b61077e565b5b610f497f28783b41d7e06379e1ecb0fc29a6a54701ecdc0af6adc747f91fb34eea5b527e60001b61077e565b610f757f615c2fdfd674db1d569bbc167c09aa507c3e73f5944f037cbb84c953a840ee1e60001b61077e565b600860000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561118a5761101c7ff8995c615168c070214c654f5962dcdc125633912de9b4a5083c81bb7fb26d6860001b61077e565b6110487ffdc4f717aeaf828c21b866d0380dcc5287a8d21914c9ae5124578c776e72a7e860001b61077e565b6110747ff48f8cd66457160f0f53ce581f38f864961dfa40cbc999397b9ca3a46d26e7f560001b61077e565b6000611089848361185190919063ffffffff16565b9150506110b87f3f905d294e0596f2ee34d04efc3f7f6237759fa78a9c06c9b3085535bda8a6e060001b61077e565b6110e47fa5695fbfed31319f657f4c35d2360cd5eb52d11f835d86ccf869eca91f11458d60001b61077e565b6111107f2f38ddb2aa9a81ba6ac02e7d23b5e110ea37c96c079e25144bc4570a74ec1e6b60001b61077e565b600860010154811015611158576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161114f906120cb565b60405180910390fd5b6111847f197816855084fcbab23248bcf7e485ac60fb6dde1c9afcecc76d850b3d9e0b3060001b61077e565b506111b7565b6111b67f4579670adc439593f68c9c48480dd30314e984a654eb2bffd4ec28e8c5f524f960001b61077e565b5b6111e37fc646a8f7a5d490bdb765e8293afb48b8d7cc748aa82740b307eab26eb071392c60001b61077e565b61120f7f8d2e7efa19f2a0608ad66d95c027390c6834d425029b394d627e72527eeddc8960001b61077e565b60008311156112ee576112447f056344b54ee8af5916b9c7fa6fa4479978681426fc9509c0227b3e016acb07ed60001b61077e565b6112707f25d646c1cb39b5ab6349a914b7730eb7cb0a5a987ae641e38e714e05cd340bc660001b61077e565b61129c7f89d433fee3a9fa0554e97d0869a1652cb4e3a8f5c404d0bfafc8d40972fcc4f860001b61077e565b6112e98484600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117cb9092919063ffffffff16565b61131b565b61131a7f83f27e9781509e4ffe1e85fe9d8c1e9f12c9b2a2b84c75169bdea0a5271c101760001b61077e565b5b6113477fd2228b120c24e1324028727fb30294ff1a20430905f4b952ab2ad5dcb1d4e90460001b61077e565b6113737f36b8de7056125c6658cae885ee851e0aa1f99f556e937c666800be95a70731ab60001b61077e565b600760405180606001604052808781526020018673ffffffffffffffffffffffffffffffffffffffff16815260200185815250908060018154018082558091505060019003906000526020600020906003020160009091909190915060008201518160000190805190602001906113eb929190611ae9565b5060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160020155505061146b7f12427906e70767b2c03c0fdd7d1b67e5da5e1cf01d5fe242efb5fccfe81cabcd60001b61077e565b6114977f846a93c5004d1e7b5a534afee173576657fb5851b87446313caf36b605869ae460001b61077e565b7fa1c3b325aa2c115e4b244062eba2515bc5585ae5b41556be8fef399ae9fde11b8585856040516114ca93929190612027565b60405180910390a15050505050565b60088060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b6002805461151890612329565b80601f016020809104026020016040519081016040528092919081815260200182805461154490612329565b80156115915780601f1061156657610100808354040283529160200191611591565b820191906000526020600020905b81548152906001019060200180831161157457829003601f168201915b505050505081565b600180546115a690612329565b80601f01602080910402602001604051908101604052809291908181526020018280546115d290612329565b801561161f5780601f106115f45761010080835404028352916020019161161f565b820191906000526020600020905b81548152906001019060200180831161160257829003601f168201915b505050505081565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6116797fad6ff6ed18a8612a50cd22ad8ab2cbae7ca0611ad4f274ddf2b122328614049e60001b611879565b6116a57f194e6abad055bfdfc1e09aec2ea3bdc4ca250944d508422a3c27648969290f3d60001b611879565b6116d17fb005c4e3b01539733712e06ec57fb429b4e9a99ee89a798ba39cdad1dd9d5b7460001b611879565b60008260200151111561179a5761170a7f4d9784bcfe9f57c2b914e4ad47b6290ff0847e3078574e2702ae472ea369fb4b60001b611879565b6117367ffffbf807b5d5f122e3f5bf4c0a00579ed895116574c01f160721fd2ee9b8d12a60001b611879565b6117627f5ec56248c8f9762c2613dd7bd0c15a3c214c0929e69ae98235328064c8d62c7560001b611879565b611795818360200151846000015173ffffffffffffffffffffffffffffffffffffffff166117cb9092919063ffffffff16565b6117c7565b6117c67fef253902dc323643b9d8d4457b0c805bc1be97f81d968e7e3fadd33e1325de4e60001b611879565b5b5050565b61184c8363a9059cbb60e01b84846040516024016117ea929190611fc1565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061187c565b505050565b600080838311156118685760008091509150611872565b6001838503915091505b9250929050565b50565b60006118de826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166119439092919063ffffffff16565b905060008151111561193e57808060200190518101906118fe9190611c72565b61193d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119349061218b565b60405180910390fd5b5b505050565b6060611952848460008561195b565b90509392505050565b6060824710156119a0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611997906120eb565b60405180910390fd5b6119a985611a6f565b6119e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119df9061214b565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611a119190611f74565b60006040518083038185875af1925050503d8060008114611a4e576040519150601f19603f3d011682016040523d82523d6000602084013e611a53565b606091505b5091509150611a63828286611a82565b92505050949350505050565b600080823b905060008111915050919050565b60608315611a9257829050611ae2565b600083511115611aa55782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ad991906120a9565b60405180910390fd5b9392505050565b828054611af590612329565b90600052602060002090601f016020900481019282611b175760008555611b5e565b82601f10611b3057805160ff1916838001178555611b5e565b82800160010185558215611b5e579182015b82811115611b5d578251825591602001919060010190611b42565b5b509050611b6b9190611b6f565b5090565b5b80821115611b88576000816000905550600101611b70565b5090565b6000611b9f611b9a846121eb565b6121c6565b905082815260208101848484011115611bb757600080fd5b611bc28482856122e7565b509392505050565b600081359050611bd98161258c565b92915050565b600081359050611bee816125a3565b92915050565b600081519050611c03816125a3565b92915050565b600081359050611c18816125ba565b92915050565b600082601f830112611c2f57600080fd5b8135611c3f848260208601611b8c565b91505092915050565b600081359050611c57816125d1565b92915050565b600081519050611c6c816125d1565b92915050565b600060208284031215611c8457600080fd5b6000611c9284828501611bf4565b91505092915050565b600060208284031215611cad57600080fd5b6000611cbb84828501611c09565b91505092915050565b60008060008060808587031215611cda57600080fd5b600085013567ffffffffffffffff811115611cf457600080fd5b611d0087828801611c1e565b9450506020611d1187828801611bca565b9350506040611d2287828801611c48565b9250506060611d3387828801611bdf565b91505092959194509250565b600060208284031215611d5157600080fd5b6000611d5f84828501611c48565b91505092915050565b600060208284031215611d7a57600080fd5b6000611d8884828501611c5d565b91505092915050565b611d9a81612271565b82525050565b611da98161225f565b82525050565b611db881612283565b82525050565b6000611dc98261221c565b611dd38185612232565b9350611de38185602086016122f6565b611dec816123ea565b840191505092915050565b6000611e028261221c565b611e0c8185612243565b9350611e1c8185602086016122f6565b80840191505092915050565b611e31816122c3565b82525050565b6000611e4282612227565b611e4c818561224e565b9350611e5c8185602086016122f6565b611e65816123ea565b840191505092915050565b6000611e7d60278361224e565b9150611e88826123fb565b604082019050919050565b6000611ea060268361224e565b9150611eab8261244a565b604082019050919050565b6000611ec360128361224e565b9150611ece82612499565b602082019050919050565b6000611ee660188361224e565b9150611ef1826124c2565b602082019050919050565b6000611f09601d8361224e565b9150611f14826124eb565b602082019050919050565b6000611f2c60128361224e565b9150611f3782612514565b602082019050919050565b6000611f4f602a8361224e565b9150611f5a8261253d565b604082019050919050565b611f6e816122b9565b82525050565b6000611f808284611df7565b915081905092915050565b6000602082019050611fa06000830184611da0565b92915050565b6000602082019050611fbb6000830184611d91565b92915050565b6000604082019050611fd66000830185611da0565b611fe36020830184611f65565b9392505050565b6000602082019050611fff6000830184611daf565b92915050565b6000602082019050818103600083015261201f8184611dbe565b905092915050565b600060608201905081810360008301526120418186611dbe565b90506120506020830185611da0565b61205d6040830184611f65565b949350505050565b600060208201905061207a6000830184611e28565b92915050565b60006040820190506120956000830185611e28565b6120a26020830184611f65565b9392505050565b600060208201905081810360008301526120c38184611e37565b905092915050565b600060208201905081810360008301526120e481611e70565b9050919050565b6000602082019050818103600083015261210481611e93565b9050919050565b6000602082019050818103600083015261212481611eb6565b9050919050565b6000602082019050818103600083015261214481611ed9565b9050919050565b6000602082019050818103600083015261216481611efc565b9050919050565b6000602082019050818103600083015261218481611f1f565b9050919050565b600060208201905081810360008301526121a481611f42565b9050919050565b60006020820190506121c06000830184611f65565b92915050565b60006121d06121e1565b90506121dc828261235b565b919050565b6000604051905090565b600067ffffffffffffffff821115612206576122056123bb565b5b61220f826123ea565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600061226a82612299565b9050919050565b600061227c82612299565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006122ce826122d5565b9050919050565b60006122e082612299565b9050919050565b82818337600083830152505050565b60005b838110156123145780820151818401526020810190506122f9565b83811115612323576000848401525b50505050565b6000600282049050600182168061234157607f821691505b602082108114156123555761235461238c565b5b50919050565b612364826123ea565b810181811067ffffffffffffffff82111715612383576123826123bb565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f4552524f523a2053686f756c64206e6f742065786365656420616c6c6f77656460008201527f20626f756e747900000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f4552524f523a204e6f7420657870697265640000000000000000000000000000600082015250565b7f4552524f523a2053656e646572206e6f7420676f7665726e0000000000000000600082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f4552524f523a204e6f2065766964656e63650000000000000000000000000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b6125958161225f565b81146125a057600080fd5b50565b6125ac81612283565b81146125b757600080fd5b50565b6125c38161228f565b81146125ce57600080fd5b50565b6125da816122b9565b81146125e557600080fd5b5056fea2646970667358221220db29e98d747884a086204fc0a3c4447691d13569d15c9681642ca7c6e1d4e60564736f6c63430008010033a26469706673582212200c47a77f7ba23404a44c606e8163969a842b97e83383a5c07eb874fb8e063f7664736f6c63430008010033"; + "0x60806040523480156200001157600080fd5b50604051620029cb380380620029cb83398101604081905262000034916200023a565b620000486200004262000095565b62000099565b600180546001600160a01b0319166001600160a01b0386161790556200006f8383620000e9565b6001600160a01b03811633146200008b576200008b81620001ae565b5050505062000345565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b620000f362000095565b6001600160a01b0316620001066200022b565b6001600160a01b031614620001385760405162461bcd60e51b81526004016200012f90620002db565b60405180910390fd5b6040805180820182526001600160a01b0384168082526020909101839052600280546001600160a01b03191690911790556003829055517f556f88907cfe81bbd1433b2c2ba3860920f0b50b218c55ca0a060558e7ca419990620001a29042908590859062000310565b60405180910390a15050565b620001b862000095565b6001600160a01b0316620001cb6200022b565b6001600160a01b031614620001f45760405162461bcd60e51b81526004016200012f90620002db565b6001600160a01b0381166200021d5760405162461bcd60e51b81526004016200012f9062000295565b620002288162000099565b50565b6000546001600160a01b031690565b6000806000806080858703121562000250578384fd5b84516200025d816200032f565b602086015190945062000270816200032f565b6040860151606087015191945092506200028a816200032f565b939692955090935050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b9283526001600160a01b03919091166020830152604082015260600190565b6001600160a01b03811681146200022857600080fd5b61267680620003556000396000f3fe60806040523480156200001157600080fd5b5060043610620000885760003560e01c8063b0a87ac11162000063578063b0a87ac114620000d2578063c6b21b0214620000dc578063d0e30db014620000f3578063f2fde38b146200010d5762000088565b8063715018a6146200008d5780638da5cb5b1462000099578063abec0a0314620000bb575b600080fd5b6200009762000124565b005b620000a3620001b5565b604051620000b2919062000ca0565b60405180910390f35b620000a3620000cc36600462000b5b565b620001d1565b620000a3620002f5565b62000097620000ed36600462000b2d565b62000311565b620000fd62000426565b604051620000b292919062000d9a565b620000976200011e36600462000aec565b62000448565b6200012e62000520565b73ffffffffffffffffffffffffffffffffffffffff166200014e620001b5565b73ffffffffffffffffffffffffffffffffffffffff1614620001a7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e9062000f12565b60405180910390fd5b620001b3600062000524565b565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60015460025460035460405160009384938a938a938a938a9373ffffffffffffffffffffffffffffffffffffffff918216938b9392909116913390620002179062000a36565b6200022b9998979695949392919062000dd5565b604051809103906000f08015801562000248573d6000803e3d6000fd5b506040805180820190915260025473ffffffffffffffffffffffffffffffffffffffff16815260035460208201529091506200028690338362000599565b6002546003546040517f4cf18b7944786d158010105e0d058cfa9ca46ad789d42eb9b6fa9490be2a44f792620002e39285928c928c928c928c928c9273ffffffffffffffffffffffffffffffffffffffff90911691339062000d19565b60405180910390a19695505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b6200031b62000520565b73ffffffffffffffffffffffffffffffffffffffff166200033b620001b5565b73ffffffffffffffffffffffffffffffffffffffff16146200038b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e9062000f12565b60408051808201825273ffffffffffffffffffffffffffffffffffffffff84168082526020909101839052600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001690911790556003829055517f556f88907cfe81bbd1433b2c2ba3860920f0b50b218c55ca0a060558e7ca4199906200041a9042908590859062001012565b60405180910390a15050565b60025460035473ffffffffffffffffffffffffffffffffffffffff9091169082565b6200045262000520565b73ffffffffffffffffffffffffffffffffffffffff1662000472620001b5565b73ffffffffffffffffffffffffffffffffffffffff1614620004c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e9062000f12565b73ffffffffffffffffffffffffffffffffffffffff811662000512576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e9062000e58565b6200051d8162000524565b50565b3390565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b620005a58383620005b6565b620005b18382620006e5565b505050565b602082015115620006e15781516040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff169063dd62ed3e906200061b908590309060040162000cc1565b60206040518083038186803b1580156200063457600080fd5b505afa15801562000649573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200066f919062000c1d565b90508260200151811015620006b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e9062000f47565b60208301518351620005b19173ffffffffffffffffffffffffffffffffffffffff90911690849030906200071d565b5050565b602082015115620006e15760208201518251620006e19173ffffffffffffffffffffffffffffffffffffffff909116908390620007ca565b620007c4846323b872dd60e01b858585604051602401620007419392919062000ce8565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152620007ec565b50505050565b620005b18363a9059cbb60e01b84846040516024016200074192919062000d9a565b600062000850826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16620008aa9092919063ffffffff16565b805190915015620005b1578080602001905181019062000871919062000b0b565b620005b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e9062000fb5565b6060620008bb8484600085620008c5565b90505b9392505050565b60608247101562000904576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e9062000eb5565b6200090f85620009d4565b62000948576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e9062000f7e565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405162000973919062000c82565b60006040518083038185875af1925050503d8060008114620009b2576040519150601f19603f3d011682016040523d82523d6000602084013e620009b7565b606091505b5091509150620009c9828286620009de565b979650505050505050565b803b15155b919050565b60608315620009ef575081620008be565b82511562000a005782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019e919062000dc0565b61158180620010c083390190565b600067ffffffffffffffff8084111562000a625762000a626200106d565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171562000aab5762000aab6200106d565b8160405280935085815286868601111562000ac557600080fd5b858560208301376000602087830101525050509392505050565b8035620009d9816200109c565b60006020828403121562000afe578081fd5b8135620008be816200109c565b60006020828403121562000b1d578081fd5b81518015158114620008be578182fd5b6000806040838503121562000b40578081fd5b823562000b4d816200109c565b946020939093013593505050565b600080600080600060a0868803121562000b73578081fd5b853567ffffffffffffffff8082111562000b8b578283fd5b818801915088601f83011262000b9f578283fd5b62000bb08983356020850162000a44565b9650602088013591508082111562000bc6578283fd5b508601601f8101881362000bd8578182fd5b62000be98882356020840162000a44565b94505062000bfa6040870162000adf565b92506060860135915062000c116080870162000adf565b90509295509295909350565b60006020828403121562000c2f578081fd5b5051919050565b6000815180845262000c508160208601602086016200103e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000825162000c968184602087016200103e565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b600061012073ffffffffffffffffffffffffffffffffffffffff808d16845281602085015262000d4c8285018d62000c36565b9150838203604085015262000d62828c62000c36565b99811660608501526080840198909852505093851660a085015291841660c084015260e0830152909116610100909101529392505050565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b600060208252620008be602083018462000c36565b600061012080835262000deb8184018d62000c36565b9050828103602084015262000e01818c62000c36565b73ffffffffffffffffffffffffffffffffffffffff9a8b16604085015260608401999099525050948716608086015292861660a085015290851660c084015260e08301529092166101009092019190915292915050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601d908201527f4552524f52203a204465706f7369742062616420616c6c6f77616e6365000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b92835273ffffffffffffffffffffffffffffffffffffffff919091166020830152604082015260600190565b60005b838110156200105b57818101518382015260200162001041565b83811115620007c45750506000910152565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff811681146200051d57600080fdfe60806040523480156200001157600080fd5b50604051620015813803806200158183398101604081905262000034916200027d565b8851620000499060019060208c0190620000ed565b5087516200005f9060029060208b0190620000ed565b50600380546001600160a01b03199081166001600160a01b03998a161790915560049690965560058054871695881695909517909455600680548616938716939093179092556000805485169386169390931790925560408051808201909152919093168082526020909101839052600880549092161790556009555050600a805460ff19169055620003bf565b828054620000fb906200036c565b90600052602060002090601f0160209004810192826200011f57600085556200016a565b82601f106200013a57805160ff19168380011785556200016a565b828001600101855582156200016a579182015b828111156200016a5782518255916020019190600101906200014d565b50620001789291506200017c565b5090565b5b808211156200017857600081556001016200017d565b60006001600160401b0380841115620001b057620001b0620003a9565b604051601f8501601f19908116603f01168101908282118183101715620001db57620001db620003a9565b81604052809350858152868686011115620001f557600080fd5b600092505b858310156200021a578285015160208483010152602083019250620001fa565b858311156200022d576000602087830101525b5050509392505050565b80516001600160a01b03811681146200024f57600080fd5b919050565b600082601f83011262000265578081fd5b620002768383516020850162000193565b9392505050565b60008060008060008060008060006101208a8c0312156200029c578485fd5b89516001600160401b0380821115620002b3578687fd5b818c0191508c601f830112620002c7578687fd5b620002d88d83516020850162000193565b9a5060208c0151915080821115620002ee578687fd5b50620002fd8c828d0162000254565b9850506200030e60408b0162000237565b965060608a015195506200032560808b0162000237565b94506200033560a08b0162000237565b93506200034560c08b0162000237565b925060e08a015191506200035d6101008b0162000237565b90509295985092959850929598565b6002810460018216806200038157607f821691505b60208210811415620003a357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6111b280620003cf6000396000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c8063b0a87ac111610081578063e0c234231161005b578063e0c2342314610186578063f294cf381461019b578063f7c618c1146101a3576100d4565b8063b0a87ac114610155578063b434151c1461015d578063d0e30db014610170576100d4565b80637ceae310116100b25780637ceae31014610116578063990cc4891461011e578063a888c2cd14610133576100d4565b8063310a1ee3146100d9578063579ca2c9146100f75780636c3a4cce14610101575b600080fd5b6100e16101ab565b6040516100ee91906110af565b60405180910390f35b6100ff6101b1565b005b610109610338565b6040516100ee9190610e1c565b610109610354565b610126610370565b6040516100ee9190610e63565b610146610141366004610d86565b610379565b6040516100ee93929190610e81565b610109610452565b6100ff61016b366004610c91565b61046e565b6101786107a2565b6040516100ee929190610e3d565b61018e6107c4565b6040516100ee9190610e6e565b61018e610852565b61010961085f565b60045481565b60045442116101f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610f76565b60405180910390fd5b600a5460ff16610267576000546040805180820190915260085473ffffffffffffffffffffffffffffffffffffffff9081168252600954602083015261023b921661087b565b600a80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b6006546003546040517f70a082310000000000000000000000000000000000000000000000000000000081526103369273ffffffffffffffffffffffffffffffffffffffff9081169216906370a08231906102c6903090600401610e1c565b60206040518083038186803b1580156102de57600080fd5b505afa1580156102f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103169190610d9e565b60035473ffffffffffffffffffffffffffffffffffffffff1691906108b4565b565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b600a5460ff1681565b6007818154811061038957600080fd5b90600052602060002090600302016000915090508060000180546103ac906110e8565b80601f01602080910402602001604051908101604052809291908181526020018280546103d8906110e8565b80156104255780601f106103fa57610100808354040283529160200191610425565b820191906000526020600020905b81548152906001019060200180831161040857829003601f168201915b505050506001830154600290930154919273ffffffffffffffffffffffffffffffffffffffff1691905083565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60055473ffffffffffffffffffffffffffffffffffffffff1633146104bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610fad565b83516104f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec9061101b565b6003546040517f70a0823100000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319061054e903090600401610e1c565b60206040518083038186803b15801561056657600080fd5b505afa15801561057a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059e9190610d9e565b905081156105eb5760085460035473ffffffffffffffffffffffffffffffffffffffff908116911614156105e7576009546000906105dd90839061095a565b94506105eb915050565b8092505b60085460035473ffffffffffffffffffffffffffffffffffffffff9081169116141561066157600061061d828561095a565b91505060086001015481101561065f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610ebc565b505b821561068b5760035461068b9073ffffffffffffffffffffffffffffffffffffffff1685856108b4565b6040805160608101825286815273ffffffffffffffffffffffffffffffffffffffff86166020808301919091529181018590526007805460018101825560009190915281518051929360039092027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68801926107099284920190610bad565b5060208201516001820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055604091820151600290910155517fa1c3b325aa2c115e4b244062eba2515bc5585ae5b41556be8fef399ae9fde11b9061079390879087908790610e81565b60405180910390a15050505050565b60085460095473ffffffffffffffffffffffffffffffffffffffff9091169082565b600280546107d1906110e8565b80601f01602080910402602001604051908101604052809291908181526020018280546107fd906110e8565b801561084a5780601f1061081f5761010080835404028352916020019161084a565b820191906000526020600020905b81548152906001019060200180831161082d57829003601f168201915b505050505081565b600180546107d1906110e8565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b6020820151156108b057602082015182516108b09173ffffffffffffffffffffffffffffffffffffffff9091169083906108b4565b5050565b6109558363a9059cbb60e01b84846040516024016108d3929190610e3d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610980565b505050565b6000808383111561097057506000905080610979565b50600190508183035b9250929050565b60006109e2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610a369092919063ffffffff16565b8051909150156109555780806020019051810190610a009190610c75565b610955576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90611052565b6060610a458484600085610a4f565b90505b9392505050565b606082471015610a8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610f19565b610a9485610b50565b610aca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610fe4565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610af39190610e00565b60006040518083038185875af1925050503d8060008114610b30576040519150601f19603f3d011682016040523d82523d6000602084013e610b35565b606091505b5091509150610b45828286610b5a565b979650505050505050565b803b15155b919050565b60608315610b69575081610a48565b825115610b795782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec9190610e6e565b828054610bb9906110e8565b90600052602060002090601f016020900481019282610bdb5760008555610c21565b82601f10610bf457805160ff1916838001178555610c21565b82800160010185558215610c21579182015b82811115610c21578251825591602001919060010190610c06565b50610c2d929150610c31565b5090565b5b80821115610c2d5760008155600101610c32565b803573ffffffffffffffffffffffffffffffffffffffff81168114610b5557600080fd5b8035610b558161116b565b600060208284031215610c86578081fd5b8151610a488161116b565b60008060008060808587031215610ca6578283fd5b843567ffffffffffffffff80821115610cbd578485fd5b818701915087601f830112610cd0578485fd5b813581811115610ce257610ce261113c565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610d2857610d2861113c565b816040528281528a6020848701011115610d40578788fd5b8260208601602083013787602084830101528098505050505050610d6660208601610c46565b925060408501359150610d7b60608601610c6a565b905092959194509250565b600060208284031215610d97578081fd5b5035919050565b600060208284031215610daf578081fd5b5051919050565b60008151808452610dce8160208601602086016110b8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251610e128184602087016110b8565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b600060208252610a486020830184610db6565b600060608252610e946060830186610db6565b73ffffffffffffffffffffffffffffffffffffffff9490941660208301525060400152919050565b60208082526027908201527f4552524f523a2053686f756c64206e6f742065786365656420616c6c6f77656460408201527f20626f756e747900000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b60208082526012908201527f4552524f523a204e6f7420657870697265640000000000000000000000000000604082015260600190565b60208082526018908201527f4552524f523a2053656e646572206e6f7420676f7665726e0000000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526012908201527f4552524f523a204e6f2065766964656e63650000000000000000000000000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b90815260200190565b60005b838110156110d35781810151838201526020016110bb565b838111156110e2576000848401525b50505050565b6002810460018216806110fc57607f821691505b60208210811415611136577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b801515811461117957600080fd5b5056fea2646970667358221220ed56507b634ebeaae309509ea680f90e736b7873ed34daf4d911bd38dce7becb64736f6c63430008010033a26469706673582212203b76689e14505056015d3b5e2ef896271124d6f9f50c1f051e2f0c3975176c7964736f6c63430008010033"; diff --git a/packages/hardhat/typechain/factories/Quest__factory.ts b/packages/hardhat/typechain/factories/Quest__factory.ts index 45aeb2d3..71bc7ec2 100644 --- a/packages/hardhat/typechain/factories/Quest__factory.ts +++ b/packages/hardhat/typechain/factories/Quest__factory.ts @@ -164,19 +164,6 @@ const _abi = [ stateMutability: "view", type: "function", }, - { - inputs: [ - { - internalType: "bytes32", - name: "c__0xa706fae5", - type: "bytes32", - }, - ], - name: "c_0xa706fae5", - outputs: [], - stateMutability: "pure", - type: "function", - }, { inputs: [ { @@ -353,4 +340,4 @@ const _abi = [ ]; const _bytecode = - "0x60806040523480156200001157600080fd5b506040516200322b3803806200322b83398181016040528101906200003791906200087e565b6200006b7fab13ea676f0821d71af17c1d8fbe461c2ce6ac1e5e313087018423ae8ca9b5d860001b620005fa60201b60201c565b6200009f7f76fc8e25ccdbce9ceb0936d7a29d8f9709dad3153582baae503f7f227b139aa660001b620005fa60201b60201c565b620000d37f9defca7217765f4f6cdde82e0160df545b7671bf4b589da81f024ca0700ecd5960001b620005fa60201b60201c565b8860019080519060200190620000eb929190620005fd565b50620001207f5ae447bca623b0b36cfdbfb363e2080fc270ae79a6117a80195fe8f8435afd9c60001b620005fa60201b60201c565b620001547f8b6604b64c6abe30e850e07323e52c582c731464944589d0ba4d2b40888def0060001b620005fa60201b60201c565b87600290805190602001906200016c9291906200068e565b50620001a17fe7bfc2b33488c5f87773d07aadeb489ffebfd466623c5ed239edbe3490a0570f60001b620005fa60201b60201c565b620001d57fee877786bf9bdbb1501396b598e50d2a537f5756ab5ea6924ea0b8229059a15560001b620005fa60201b60201c565b86600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506200024a7fce67f81e2c8c3846ea20b15c80daac313309f2055167349e128a07d02af9f30f60001b620005fa60201b60201c565b6200027e7f9acc6707f8133e155ec1b5741911342fd301f9c5bc52c28d24cccfa8f8615f6860001b620005fa60201b60201c565b85600481905550620002b97f4d44d8db5ed36200a824d318b97d3b5a7106944e1205e5e75500012c80eb520760001b620005fa60201b60201c565b620002ed7f8f09ea385cd5707baf6eb133766d025cf6c3e69b3ae2f8b3f29288ac9bb3b6fd60001b620005fa60201b60201c565b84600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620003627fd6d450868c1e9ea4e034f183f16ee0ebf2a88ded7dc2c39dbd3160a80b4f671b60001b620005fa60201b60201c565b620003967fbc5a26f7a0c37065e9bde8dda378104e2fb3dd81d6fc62832f023e31c36e6f9f60001b620005fa60201b60201c565b83600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506200040b7fd6a5bf5af3b299e6cb275bc3ebccdf65762ee0d72b588cf46740b9792d6a776460001b620005fa60201b60201c565b6200043f7f07f2e9b6df8be5e7a02cbb19870731ead16a510e75257a11663ca009fc31fd0460001b620005fa60201b60201c565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620004b37fa789516d2e752511f32d286c683b72ee73be46bde0ee065cd3869e71d6b1032360001b620005fa60201b60201c565b620004e77f70754cad7754e55980cad2f08530752c3079e7f5f3bfcbedeb0299d3f70af81b60001b620005fa60201b60201c565b60405180604001604052808473ffffffffffffffffffffffffffffffffffffffff16815260200183815250600860008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101559050506200059c7f38e8c7eb6b7e31294c6891525ebaa3718f4f1640463a6d56e7760b185da63a0b60001b620005fa60201b60201c565b620005d07f1e02935f2287515ddaf5f36d464505c3d011d35526c81aa574c7f8d86559065360001b620005fa60201b60201c565b6000600a60006101000a81548160ff02191690831515021790555050505050505050505062000bfd565b50565b8280546200060b9062000aba565b90600052602060002090601f0160209004810192826200062f57600085556200067b565b82601f106200064a57805160ff19168380011785556200067b565b828001600101855582156200067b579182015b828111156200067a5782518255916020019190600101906200065d565b5b5090506200068a91906200071f565b5090565b8280546200069c9062000aba565b90600052602060002090601f016020900481019282620006c057600085556200070c565b82601f10620006db57805160ff19168380011785556200070c565b828001600101855582156200070c579182015b828111156200070b578251825591602001919060010190620006ee565b5b5090506200071b91906200071f565b5090565b5b808211156200073a57600081600090555060010162000720565b5090565b6000620007556200074f84620009b2565b62000989565b9050828152602081018484840111156200076e57600080fd5b6200077b84828562000a84565b509392505050565b60006200079a6200079484620009e8565b62000989565b905082815260208101848484011115620007b357600080fd5b620007c084828562000a84565b509392505050565b600081519050620007d98162000b95565b92915050565b600081519050620007f08162000baf565b92915050565b600082601f8301126200080857600080fd5b81516200081a8482602086016200073e565b91505092915050565b600081519050620008348162000bc9565b92915050565b600082601f8301126200084c57600080fd5b81516200085e84826020860162000783565b91505092915050565b600081519050620008788162000be3565b92915050565b60008060008060008060008060006101208a8c0312156200089e57600080fd5b60008a015167ffffffffffffffff811115620008b957600080fd5b620008c78c828d016200083a565b99505060208a015167ffffffffffffffff811115620008e557600080fd5b620008f38c828d01620007f6565b9850506040620009068c828d0162000823565b9750506060620009198c828d0162000867565b96505060806200092c8c828d01620007c8565b95505060a06200093f8c828d01620007df565b94505060c0620009528c828d0162000823565b93505060e0620009658c828d0162000867565b925050610100620009798c828d01620007c8565b9150509295985092959850929598565b600062000995620009a8565b9050620009a3828262000af0565b919050565b6000604051905090565b600067ffffffffffffffff821115620009d057620009cf62000b55565b5b620009db8262000b84565b9050602081019050919050565b600067ffffffffffffffff82111562000a065762000a0562000b55565b5b62000a118262000b84565b9050602081019050919050565b600062000a2b8262000a5a565b9050919050565b600062000a3f8262000a5a565b9050919050565b600062000a538262000a1e565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b8381101562000aa457808201518184015260208101905062000a87565b8381111562000ab4576000848401525b50505050565b6000600282049050600182168062000ad357607f821691505b6020821081141562000aea5762000ae962000b26565b5b50919050565b62000afb8262000b84565b810181811067ffffffffffffffff8211171562000b1d5762000b1c62000b55565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b62000ba08162000a1e565b811462000bac57600080fd5b50565b62000bba8162000a32565b811462000bc657600080fd5b50565b62000bd48162000a46565b811462000be057600080fd5b50565b62000bee8162000a7a565b811462000bfa57600080fd5b50565b61261e8062000c0d6000396000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c8063a888c2cd1161008c578063d0e30db011610066578063d0e30db0146101ee578063e0c234231461020d578063f294cf381461022b578063f7c618c114610249576100df565b8063a888c2cd14610182578063b0a87ac1146101b4578063b434151c146101d2576100df565b80637ceae310116100bd5780637ceae3101461012a578063820ecc8214610148578063990cc48914610164576100df565b8063310a1ee3146100e4578063579ca2c9146101025780636c3a4cce1461010c575b600080fd5b6100ec610267565b6040516100f991906121ab565b60405180910390f35b61010a61026d565b005b610114610734565b6040516101219190611f8b565b60405180910390f35b610132610758565b60405161013f9190611fa6565b60405180910390f35b610162600480360381019061015d9190611c9b565b61077e565b005b61016c610781565b6040516101799190611fea565b60405180910390f35b61019c60048036038101906101979190611d3f565b610794565b6040516101ab93929190612027565b60405180910390f35b6101bc610876565b6040516101c99190611f8b565b60405180910390f35b6101ec60048036038101906101e79190611cc4565b61089c565b005b6101f66114d9565b604051610204929190612080565b60405180910390f35b61021561150b565b6040516102229190612005565b60405180910390f35b610233611599565b60405161024091906120a9565b60405180910390f35b610251611627565b60405161025e9190612065565b60405180910390f35b60045481565b6102997f6ae288ce15b57012df4180921230a66c6fabf9251498094ddb737814b606492960001b61077e565b6102c57fe12cd4c358085c076adc3a55b3583a9f13632a95eeda55c45f35bb24b033d40960001b61077e565b6102f17ff5bc8073fa98bb53ea23b8fe8cc8a90caf418dd92ebb76dbaf7bac6e97c316a960001b61077e565b61031d7f6d7dc127e1c0fbf8d47d8d5ed9fb197b29cfaeaa299c7c1a8668f7075d9136b060001b61077e565b6004544211610361576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103589061210b565b60405180910390fd5b61038d7feb5d0c70be4da3c01a18c2e638096bbce6e8d26dcf12b9ba4b7055127f0e2d5b60001b61077e565b6103b97fa5b54ed0718ab188497ff05d40ae32ac07c27a178db799b73df646e2ca0a625060001b61077e565b6103e57fc5343fdccb51459d2a1aff8a1ef33c1584a57a93458094865371a3ac2555e3e660001b61077e565b600a60009054906101000a900460ff16610594576104257fad3cd13224d9cfc702a9e728dda202057ed8c24534c892be3e074232eb75341360001b61077e565b6104517fc14384c42bd8940c9f7e11624283e30e0c2bfd637612250d42ef5691ef9b12b160001b61077e565b61047d7f4ebe3cc5fc2b728c226d22882da1fed0d45a26c682d9389a99f34bc7d58b214460001b61077e565b61051c60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660086040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160018201548152505061164d90919063ffffffff16565b6105487f5d2bf30bc630b60308c456e1c004c39185d000d3e0313fa1f24842b69c48c0ff60001b61077e565b6105747fa9ca1c6b3bf13ca244b083046998d4ef80e1a94d4b0cba437bca78ccf373284c60001b61077e565b6001600a60006101000a81548160ff0219169083151502179055506105c1565b6105c07f8c15a93409a621f6d2c18a82632d36142963a3260d5a027f3b26177a7d476efe60001b61077e565b5b6105ed7f77207cafb28d677329643b17934ac37e48db0cecce1276a6c6cf927a125e992760001b61077e565b6106197fce38176d699b8edbc84d2e97fdc54d329ab4c4085cd117c7382ed1e28b2c424260001b61077e565b610732600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161069a9190611f8b565b60206040518083038186803b1580156106b257600080fd5b505afa1580156106c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ea9190611d68565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117cb9092919063ffffffff16565b565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b50565b600a60009054906101000a900460ff1681565b600781815481106107a457600080fd5b90600052602060002090600302016000915090508060000180546107c790612329565b80601f01602080910402602001604051908101604052809291908181526020018280546107f390612329565b80156108405780601f1061081557610100808354040283529160200191610840565b820191906000526020600020905b81548152906001019060200180831161082357829003601f168201915b5050505050908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154905083565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6108c87f2c698c8ce278c71f18ae3bd516b11be9a9d33ce879182574eac31ac91eca63d060001b61077e565b6108f47f9f0cda30889f34a1ed4807cc2f8b6905e5feeee7d6fba012be050bd5ed4f06ea60001b61077e565b6109207fda1269147cd9d9e114ecfb252ed39917375c54e6d6b568701c56a6bea9cf464860001b61077e565b61094c7f6cbf3091910351086b812af7841180f4b97e770ebfe4839dc336b507cbf1a42b60001b61077e565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d39061212b565b60405180910390fd5b610a087f73cca811d761c29af457eccf1c9aa5bfe061bb9960b9ca3158b983c24283e09860001b61077e565b610a347fe39c6a0dbc2ee7eb59172617d5f6bd8b878ddf680dd6d22d65c31dfbc304877760001b61077e565b610a607f56b80045539484424ecf4f2353a0da9b98739aadf318a876723f0c018674adf560001b61077e565b610a8c7f182d292c9f2c939a4254c9c51e7af7fb5c62c2e544b2f700f9e0b611de4e21b760001b61077e565b600084511415610ad1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac89061216b565b60405180910390fd5b610afd7fbc5e38c2be95d51faffac02cda016974083da4a67dbdf745fbaa261ef66cde1460001b61077e565b610b297f3470ba4bf30d6edace69a86778bb8dd6d63f4ce83355590d90718dab6a43b51360001b61077e565b610b557fae3727fc8bfac5ef886581bedcedb2b68b02f0f4fe4d36ab4fc22f797ef4b74060001b61077e565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610bb29190611f8b565b60206040518083038186803b158015610bca57600080fd5b505afa158015610bde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c029190611d68565b9050610c307f8ae155061e7362c3c56f8cd71d6a46da8a552b08a911c99c1ebe49ee239f2c0160001b61077e565b610c5c7f7c434a47e737dd5f2b87825476f9f48f43ca267fb436aa4f6022b0d81ecbda3a60001b61077e565b8115610ef057610c8e7f31f8da8f759dcfe19a3cd50b5d7e4d7262a84bb8a09ad9d6dbe549b95bca1d8460001b61077e565b610cba7f437aa959f57ee6ce7eef9b05ea244caa5d89e0f7e35127e9a7321fc63896e09760001b61077e565b610ce67ff9301a88416a29a288ed31f83438bc2420a0062d1f311b7a0fd0564d8f97984560001b61077e565b600860000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610e6357610d8d7f196d9ebea3d6775fa9d9d7d93ad1face6ac44e528270ef793bc793c3d544b44960001b61077e565b610db97f7515bd3d3d84c9dcef39e22af918c4a4fd43e268a0f4668656e354e65355e06660001b61077e565b610de57f5de9000ae3616e178ae8dbd362d496c3ab405f34a53e42850f39b03bb66c654f60001b61077e565b6000610dff6008600101548361185190919063ffffffff16565b915050610e2e7fc51c70c47a611b66b0f468563dce8322446d98b658c1b449c2ec865489ee42be60001b61077e565b610e5a7f4f3005130d8c3f8cbc54ed1fd041cf238dca8403ca594fd5b9f260e5c9511e2360001b61077e565b80935050610eeb565b610e8f7f549534cfc70f01698b8f3ae6b9dfb964e043f41b99bd30c421a83fa1509a809f60001b61077e565b610ebb7fa25d6d5bd2b416d5d2fe5a88e2638b90c6bb460e6e02f26d483cfa819baeab2660001b61077e565b610ee77f3c897f4bfd2c48135b27b4ee5a5947e4ab2312c329f6eed21ef9950f0fe859f760001b61077e565b8092505b610f1d565b610f1c7f4632f0b1d13c62637a848560d8a4511fcd29785439493d1afdb48a748f40320460001b61077e565b5b610f497f28783b41d7e06379e1ecb0fc29a6a54701ecdc0af6adc747f91fb34eea5b527e60001b61077e565b610f757f615c2fdfd674db1d569bbc167c09aa507c3e73f5944f037cbb84c953a840ee1e60001b61077e565b600860000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561118a5761101c7ff8995c615168c070214c654f5962dcdc125633912de9b4a5083c81bb7fb26d6860001b61077e565b6110487ffdc4f717aeaf828c21b866d0380dcc5287a8d21914c9ae5124578c776e72a7e860001b61077e565b6110747ff48f8cd66457160f0f53ce581f38f864961dfa40cbc999397b9ca3a46d26e7f560001b61077e565b6000611089848361185190919063ffffffff16565b9150506110b87f3f905d294e0596f2ee34d04efc3f7f6237759fa78a9c06c9b3085535bda8a6e060001b61077e565b6110e47fa5695fbfed31319f657f4c35d2360cd5eb52d11f835d86ccf869eca91f11458d60001b61077e565b6111107f2f38ddb2aa9a81ba6ac02e7d23b5e110ea37c96c079e25144bc4570a74ec1e6b60001b61077e565b600860010154811015611158576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161114f906120cb565b60405180910390fd5b6111847f197816855084fcbab23248bcf7e485ac60fb6dde1c9afcecc76d850b3d9e0b3060001b61077e565b506111b7565b6111b67f4579670adc439593f68c9c48480dd30314e984a654eb2bffd4ec28e8c5f524f960001b61077e565b5b6111e37fc646a8f7a5d490bdb765e8293afb48b8d7cc748aa82740b307eab26eb071392c60001b61077e565b61120f7f8d2e7efa19f2a0608ad66d95c027390c6834d425029b394d627e72527eeddc8960001b61077e565b60008311156112ee576112447f056344b54ee8af5916b9c7fa6fa4479978681426fc9509c0227b3e016acb07ed60001b61077e565b6112707f25d646c1cb39b5ab6349a914b7730eb7cb0a5a987ae641e38e714e05cd340bc660001b61077e565b61129c7f89d433fee3a9fa0554e97d0869a1652cb4e3a8f5c404d0bfafc8d40972fcc4f860001b61077e565b6112e98484600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117cb9092919063ffffffff16565b61131b565b61131a7f83f27e9781509e4ffe1e85fe9d8c1e9f12c9b2a2b84c75169bdea0a5271c101760001b61077e565b5b6113477fd2228b120c24e1324028727fb30294ff1a20430905f4b952ab2ad5dcb1d4e90460001b61077e565b6113737f36b8de7056125c6658cae885ee851e0aa1f99f556e937c666800be95a70731ab60001b61077e565b600760405180606001604052808781526020018673ffffffffffffffffffffffffffffffffffffffff16815260200185815250908060018154018082558091505060019003906000526020600020906003020160009091909190915060008201518160000190805190602001906113eb929190611ae9565b5060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160020155505061146b7f12427906e70767b2c03c0fdd7d1b67e5da5e1cf01d5fe242efb5fccfe81cabcd60001b61077e565b6114977f846a93c5004d1e7b5a534afee173576657fb5851b87446313caf36b605869ae460001b61077e565b7fa1c3b325aa2c115e4b244062eba2515bc5585ae5b41556be8fef399ae9fde11b8585856040516114ca93929190612027565b60405180910390a15050505050565b60088060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b6002805461151890612329565b80601f016020809104026020016040519081016040528092919081815260200182805461154490612329565b80156115915780601f1061156657610100808354040283529160200191611591565b820191906000526020600020905b81548152906001019060200180831161157457829003601f168201915b505050505081565b600180546115a690612329565b80601f01602080910402602001604051908101604052809291908181526020018280546115d290612329565b801561161f5780601f106115f45761010080835404028352916020019161161f565b820191906000526020600020905b81548152906001019060200180831161160257829003601f168201915b505050505081565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6116797fad6ff6ed18a8612a50cd22ad8ab2cbae7ca0611ad4f274ddf2b122328614049e60001b611879565b6116a57f194e6abad055bfdfc1e09aec2ea3bdc4ca250944d508422a3c27648969290f3d60001b611879565b6116d17fb005c4e3b01539733712e06ec57fb429b4e9a99ee89a798ba39cdad1dd9d5b7460001b611879565b60008260200151111561179a5761170a7f4d9784bcfe9f57c2b914e4ad47b6290ff0847e3078574e2702ae472ea369fb4b60001b611879565b6117367ffffbf807b5d5f122e3f5bf4c0a00579ed895116574c01f160721fd2ee9b8d12a60001b611879565b6117627f5ec56248c8f9762c2613dd7bd0c15a3c214c0929e69ae98235328064c8d62c7560001b611879565b611795818360200151846000015173ffffffffffffffffffffffffffffffffffffffff166117cb9092919063ffffffff16565b6117c7565b6117c67fef253902dc323643b9d8d4457b0c805bc1be97f81d968e7e3fadd33e1325de4e60001b611879565b5b5050565b61184c8363a9059cbb60e01b84846040516024016117ea929190611fc1565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061187c565b505050565b600080838311156118685760008091509150611872565b6001838503915091505b9250929050565b50565b60006118de826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166119439092919063ffffffff16565b905060008151111561193e57808060200190518101906118fe9190611c72565b61193d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119349061218b565b60405180910390fd5b5b505050565b6060611952848460008561195b565b90509392505050565b6060824710156119a0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611997906120eb565b60405180910390fd5b6119a985611a6f565b6119e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119df9061214b565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611a119190611f74565b60006040518083038185875af1925050503d8060008114611a4e576040519150601f19603f3d011682016040523d82523d6000602084013e611a53565b606091505b5091509150611a63828286611a82565b92505050949350505050565b600080823b905060008111915050919050565b60608315611a9257829050611ae2565b600083511115611aa55782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ad991906120a9565b60405180910390fd5b9392505050565b828054611af590612329565b90600052602060002090601f016020900481019282611b175760008555611b5e565b82601f10611b3057805160ff1916838001178555611b5e565b82800160010185558215611b5e579182015b82811115611b5d578251825591602001919060010190611b42565b5b509050611b6b9190611b6f565b5090565b5b80821115611b88576000816000905550600101611b70565b5090565b6000611b9f611b9a846121eb565b6121c6565b905082815260208101848484011115611bb757600080fd5b611bc28482856122e7565b509392505050565b600081359050611bd98161258c565b92915050565b600081359050611bee816125a3565b92915050565b600081519050611c03816125a3565b92915050565b600081359050611c18816125ba565b92915050565b600082601f830112611c2f57600080fd5b8135611c3f848260208601611b8c565b91505092915050565b600081359050611c57816125d1565b92915050565b600081519050611c6c816125d1565b92915050565b600060208284031215611c8457600080fd5b6000611c9284828501611bf4565b91505092915050565b600060208284031215611cad57600080fd5b6000611cbb84828501611c09565b91505092915050565b60008060008060808587031215611cda57600080fd5b600085013567ffffffffffffffff811115611cf457600080fd5b611d0087828801611c1e565b9450506020611d1187828801611bca565b9350506040611d2287828801611c48565b9250506060611d3387828801611bdf565b91505092959194509250565b600060208284031215611d5157600080fd5b6000611d5f84828501611c48565b91505092915050565b600060208284031215611d7a57600080fd5b6000611d8884828501611c5d565b91505092915050565b611d9a81612271565b82525050565b611da98161225f565b82525050565b611db881612283565b82525050565b6000611dc98261221c565b611dd38185612232565b9350611de38185602086016122f6565b611dec816123ea565b840191505092915050565b6000611e028261221c565b611e0c8185612243565b9350611e1c8185602086016122f6565b80840191505092915050565b611e31816122c3565b82525050565b6000611e4282612227565b611e4c818561224e565b9350611e5c8185602086016122f6565b611e65816123ea565b840191505092915050565b6000611e7d60278361224e565b9150611e88826123fb565b604082019050919050565b6000611ea060268361224e565b9150611eab8261244a565b604082019050919050565b6000611ec360128361224e565b9150611ece82612499565b602082019050919050565b6000611ee660188361224e565b9150611ef1826124c2565b602082019050919050565b6000611f09601d8361224e565b9150611f14826124eb565b602082019050919050565b6000611f2c60128361224e565b9150611f3782612514565b602082019050919050565b6000611f4f602a8361224e565b9150611f5a8261253d565b604082019050919050565b611f6e816122b9565b82525050565b6000611f808284611df7565b915081905092915050565b6000602082019050611fa06000830184611da0565b92915050565b6000602082019050611fbb6000830184611d91565b92915050565b6000604082019050611fd66000830185611da0565b611fe36020830184611f65565b9392505050565b6000602082019050611fff6000830184611daf565b92915050565b6000602082019050818103600083015261201f8184611dbe565b905092915050565b600060608201905081810360008301526120418186611dbe565b90506120506020830185611da0565b61205d6040830184611f65565b949350505050565b600060208201905061207a6000830184611e28565b92915050565b60006040820190506120956000830185611e28565b6120a26020830184611f65565b9392505050565b600060208201905081810360008301526120c38184611e37565b905092915050565b600060208201905081810360008301526120e481611e70565b9050919050565b6000602082019050818103600083015261210481611e93565b9050919050565b6000602082019050818103600083015261212481611eb6565b9050919050565b6000602082019050818103600083015261214481611ed9565b9050919050565b6000602082019050818103600083015261216481611efc565b9050919050565b6000602082019050818103600083015261218481611f1f565b9050919050565b600060208201905081810360008301526121a481611f42565b9050919050565b60006020820190506121c06000830184611f65565b92915050565b60006121d06121e1565b90506121dc828261235b565b919050565b6000604051905090565b600067ffffffffffffffff821115612206576122056123bb565b5b61220f826123ea565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600061226a82612299565b9050919050565b600061227c82612299565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006122ce826122d5565b9050919050565b60006122e082612299565b9050919050565b82818337600083830152505050565b60005b838110156123145780820151818401526020810190506122f9565b83811115612323576000848401525b50505050565b6000600282049050600182168061234157607f821691505b602082108114156123555761235461238c565b5b50919050565b612364826123ea565b810181811067ffffffffffffffff82111715612383576123826123bb565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f4552524f523a2053686f756c64206e6f742065786365656420616c6c6f77656460008201527f20626f756e747900000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f4552524f523a204e6f7420657870697265640000000000000000000000000000600082015250565b7f4552524f523a2053656e646572206e6f7420676f7665726e0000000000000000600082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f4552524f523a204e6f2065766964656e63650000000000000000000000000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b6125958161225f565b81146125a057600080fd5b50565b6125ac81612283565b81146125b757600080fd5b50565b6125c38161228f565b81146125ce57600080fd5b50565b6125da816122b9565b81146125e557600080fd5b5056fea2646970667358221220db29e98d747884a086204fc0a3c4447691d13569d15c9681642ca7c6e1d4e60564736f6c63430008010033"; + "0x60806040523480156200001157600080fd5b50604051620015813803806200158183398101604081905262000034916200027d565b8851620000499060019060208c0190620000ed565b5087516200005f9060029060208b0190620000ed565b50600380546001600160a01b03199081166001600160a01b03998a161790915560049690965560058054871695881695909517909455600680548616938716939093179092556000805485169386169390931790925560408051808201909152919093168082526020909101839052600880549092161790556009555050600a805460ff19169055620003bf565b828054620000fb906200036c565b90600052602060002090601f0160209004810192826200011f57600085556200016a565b82601f106200013a57805160ff19168380011785556200016a565b828001600101855582156200016a579182015b828111156200016a5782518255916020019190600101906200014d565b50620001789291506200017c565b5090565b5b808211156200017857600081556001016200017d565b60006001600160401b0380841115620001b057620001b0620003a9565b604051601f8501601f19908116603f01168101908282118183101715620001db57620001db620003a9565b81604052809350858152868686011115620001f557600080fd5b600092505b858310156200021a578285015160208483010152602083019250620001fa565b858311156200022d576000602087830101525b5050509392505050565b80516001600160a01b03811681146200024f57600080fd5b919050565b600082601f83011262000265578081fd5b620002768383516020850162000193565b9392505050565b60008060008060008060008060006101208a8c0312156200029c578485fd5b89516001600160401b0380821115620002b3578687fd5b818c0191508c601f830112620002c7578687fd5b620002d88d83516020850162000193565b9a5060208c0151915080821115620002ee578687fd5b50620002fd8c828d0162000254565b9850506200030e60408b0162000237565b965060608a015195506200032560808b0162000237565b94506200033560a08b0162000237565b93506200034560c08b0162000237565b925060e08a015191506200035d6101008b0162000237565b90509295985092959850929598565b6002810460018216806200038157607f821691505b60208210811415620003a357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6111b280620003cf6000396000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c8063b0a87ac111610081578063e0c234231161005b578063e0c2342314610186578063f294cf381461019b578063f7c618c1146101a3576100d4565b8063b0a87ac114610155578063b434151c1461015d578063d0e30db014610170576100d4565b80637ceae310116100b25780637ceae31014610116578063990cc4891461011e578063a888c2cd14610133576100d4565b8063310a1ee3146100d9578063579ca2c9146100f75780636c3a4cce14610101575b600080fd5b6100e16101ab565b6040516100ee91906110af565b60405180910390f35b6100ff6101b1565b005b610109610338565b6040516100ee9190610e1c565b610109610354565b610126610370565b6040516100ee9190610e63565b610146610141366004610d86565b610379565b6040516100ee93929190610e81565b610109610452565b6100ff61016b366004610c91565b61046e565b6101786107a2565b6040516100ee929190610e3d565b61018e6107c4565b6040516100ee9190610e6e565b61018e610852565b61010961085f565b60045481565b60045442116101f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610f76565b60405180910390fd5b600a5460ff16610267576000546040805180820190915260085473ffffffffffffffffffffffffffffffffffffffff9081168252600954602083015261023b921661087b565b600a80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b6006546003546040517f70a082310000000000000000000000000000000000000000000000000000000081526103369273ffffffffffffffffffffffffffffffffffffffff9081169216906370a08231906102c6903090600401610e1c565b60206040518083038186803b1580156102de57600080fd5b505afa1580156102f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103169190610d9e565b60035473ffffffffffffffffffffffffffffffffffffffff1691906108b4565b565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b600a5460ff1681565b6007818154811061038957600080fd5b90600052602060002090600302016000915090508060000180546103ac906110e8565b80601f01602080910402602001604051908101604052809291908181526020018280546103d8906110e8565b80156104255780601f106103fa57610100808354040283529160200191610425565b820191906000526020600020905b81548152906001019060200180831161040857829003601f168201915b505050506001830154600290930154919273ffffffffffffffffffffffffffffffffffffffff1691905083565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60055473ffffffffffffffffffffffffffffffffffffffff1633146104bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610fad565b83516104f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec9061101b565b6003546040517f70a0823100000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff16906370a082319061054e903090600401610e1c565b60206040518083038186803b15801561056657600080fd5b505afa15801561057a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059e9190610d9e565b905081156105eb5760085460035473ffffffffffffffffffffffffffffffffffffffff908116911614156105e7576009546000906105dd90839061095a565b94506105eb915050565b8092505b60085460035473ffffffffffffffffffffffffffffffffffffffff9081169116141561066157600061061d828561095a565b91505060086001015481101561065f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610ebc565b505b821561068b5760035461068b9073ffffffffffffffffffffffffffffffffffffffff1685856108b4565b6040805160608101825286815273ffffffffffffffffffffffffffffffffffffffff86166020808301919091529181018590526007805460018101825560009190915281518051929360039092027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68801926107099284920190610bad565b5060208201516001820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055604091820151600290910155517fa1c3b325aa2c115e4b244062eba2515bc5585ae5b41556be8fef399ae9fde11b9061079390879087908790610e81565b60405180910390a15050505050565b60085460095473ffffffffffffffffffffffffffffffffffffffff9091169082565b600280546107d1906110e8565b80601f01602080910402602001604051908101604052809291908181526020018280546107fd906110e8565b801561084a5780601f1061081f5761010080835404028352916020019161084a565b820191906000526020600020905b81548152906001019060200180831161082d57829003601f168201915b505050505081565b600180546107d1906110e8565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b6020820151156108b057602082015182516108b09173ffffffffffffffffffffffffffffffffffffffff9091169083906108b4565b5050565b6109558363a9059cbb60e01b84846040516024016108d3929190610e3d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610980565b505050565b6000808383111561097057506000905080610979565b50600190508183035b9250929050565b60006109e2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610a369092919063ffffffff16565b8051909150156109555780806020019051810190610a009190610c75565b610955576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90611052565b6060610a458484600085610a4f565b90505b9392505050565b606082471015610a8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610f19565b610a9485610b50565b610aca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec90610fe4565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610af39190610e00565b60006040518083038185875af1925050503d8060008114610b30576040519150601f19603f3d011682016040523d82523d6000602084013e610b35565b606091505b5091509150610b45828286610b5a565b979650505050505050565b803b15155b919050565b60608315610b69575081610a48565b825115610b795782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ec9190610e6e565b828054610bb9906110e8565b90600052602060002090601f016020900481019282610bdb5760008555610c21565b82601f10610bf457805160ff1916838001178555610c21565b82800160010185558215610c21579182015b82811115610c21578251825591602001919060010190610c06565b50610c2d929150610c31565b5090565b5b80821115610c2d5760008155600101610c32565b803573ffffffffffffffffffffffffffffffffffffffff81168114610b5557600080fd5b8035610b558161116b565b600060208284031215610c86578081fd5b8151610a488161116b565b60008060008060808587031215610ca6578283fd5b843567ffffffffffffffff80821115610cbd578485fd5b818701915087601f830112610cd0578485fd5b813581811115610ce257610ce261113c565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610d2857610d2861113c565b816040528281528a6020848701011115610d40578788fd5b8260208601602083013787602084830101528098505050505050610d6660208601610c46565b925060408501359150610d7b60608601610c6a565b905092959194509250565b600060208284031215610d97578081fd5b5035919050565b600060208284031215610daf578081fd5b5051919050565b60008151808452610dce8160208601602086016110b8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251610e128184602087016110b8565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b600060208252610a486020830184610db6565b600060608252610e946060830186610db6565b73ffffffffffffffffffffffffffffffffffffffff9490941660208301525060400152919050565b60208082526027908201527f4552524f523a2053686f756c64206e6f742065786365656420616c6c6f77656460408201527f20626f756e747900000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b60208082526012908201527f4552524f523a204e6f7420657870697265640000000000000000000000000000604082015260600190565b60208082526018908201527f4552524f523a2053656e646572206e6f7420676f7665726e0000000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526012908201527f4552524f523a204e6f2065766964656e63650000000000000000000000000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b90815260200190565b60005b838110156110d35781810151838201526020016110bb565b838111156110e2576000848401525b50505050565b6002810460018216806110fc57607f821691505b60208210811415611136577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b801515811461117957600080fd5b5056fea2646970667358221220ed56507b634ebeaae309509ea680f90e736b7873ed34daf4d911bd38dce7becb64736f6c63430008010033"; diff --git a/packages/hardhat/typechain/factories/TokenMock__factory.ts b/packages/hardhat/typechain/factories/TokenMock__factory.ts index 2d993373..f7ad3f5c 100644 --- a/packages/hardhat/typechain/factories/TokenMock__factory.ts +++ b/packages/hardhat/typechain/factories/TokenMock__factory.ts @@ -353,4 +353,4 @@ const _abi = [ ]; const _bytecode = - "0x60806040526040516200193238038062001932833981810160405281019062000029919062000189565b818181600390805190602001906200004392919062000067565b5080600490805190602001906200005c92919062000067565b50505050506200036c565b828054620000759062000291565b90600052602060002090601f016020900481019282620000995760008555620000e5565b82601f10620000b457805160ff1916838001178555620000e5565b82800160010185558215620000e5579182015b82811115620000e4578251825591602001919060010190620000c7565b5b509050620000f49190620000f8565b5090565b5b8082111562000113576000816000905550600101620000f9565b5090565b60006200012e620001288462000225565b620001fc565b9050828152602081018484840111156200014757600080fd5b620001548482856200025b565b509392505050565b600082601f8301126200016e57600080fd5b81516200018084826020860162000117565b91505092915050565b600080604083850312156200019d57600080fd5b600083015167ffffffffffffffff811115620001b857600080fd5b620001c6858286016200015c565b925050602083015167ffffffffffffffff811115620001e457600080fd5b620001f2858286016200015c565b9150509250929050565b6000620002086200021b565b9050620002168282620002c7565b919050565b6000604051905090565b600067ffffffffffffffff8211156200024357620002426200032c565b5b6200024e826200035b565b9050602081019050919050565b60005b838110156200027b5780820151818401526020810190506200025e565b838111156200028b576000848401525b50505050565b60006002820490506001821680620002aa57607f821691505b60208210811415620002c157620002c0620002fd565b5b50919050565b620002d2826200035b565b810181811067ffffffffffffffff82111715620002f457620002f36200032c565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b6115b6806200037c6000396000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c806340c10f1911610081578063a457c2d71161005b578063a457c2d71461022d578063a9059cbb1461025d578063dd62ed3e1461028d576100d4565b806340c10f19146101c357806370a08231146101df57806395d89b411461020f576100d4565b806323b872dd116100b257806323b872dd14610145578063313ce567146101755780633950935114610193576100d4565b806306fdde03146100d9578063095ea7b3146100f757806318160ddd14610127575b600080fd5b6100e16102bd565b6040516100ee919061100d565b60405180910390f35b610111600480360381019061010c9190610e38565b61034f565b60405161011e9190610ff2565b60405180910390f35b61012f61036d565b60405161013c919061112f565b60405180910390f35b61015f600480360381019061015a9190610de9565b610377565b60405161016c9190610ff2565b60405180910390f35b61017d61046f565b60405161018a919061114a565b60405180910390f35b6101ad60048036038101906101a89190610e38565b610478565b6040516101ba9190610ff2565b60405180910390f35b6101dd60048036038101906101d89190610e38565b610524565b005b6101f960048036038101906101f49190610d84565b610532565b604051610206919061112f565b60405180910390f35b61021761057a565b604051610224919061100d565b60405180910390f35b61024760048036038101906102429190610e38565b61060c565b6040516102549190610ff2565b60405180910390f35b61027760048036038101906102729190610e38565b6106f7565b6040516102849190610ff2565b60405180910390f35b6102a760048036038101906102a29190610dad565b610715565b6040516102b4919061112f565b60405180910390f35b6060600380546102cc9061125f565b80601f01602080910402602001604051908101604052809291908181526020018280546102f89061125f565b80156103455780601f1061031a57610100808354040283529160200191610345565b820191906000526020600020905b81548152906001019060200180831161032857829003601f168201915b5050505050905090565b600061036361035c61079c565b84846107a4565b6001905092915050565b6000600254905090565b600061038484848461096f565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006103cf61079c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508281101561044f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104469061108f565b60405180910390fd5b6104638561045b61079c565b8584036107a4565b60019150509392505050565b60006012905090565b600061051a61048561079c565b84846001600061049361079c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546105159190611181565b6107a4565b6001905092915050565b61052e8282610bf0565b5050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546105899061125f565b80601f01602080910402602001604051908101604052809291908181526020018280546105b59061125f565b80156106025780601f106105d757610100808354040283529160200191610602565b820191906000526020600020905b8154815290600101906020018083116105e557829003601f168201915b5050505050905090565b6000806001600061061b61079c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156106d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106cf906110ef565b60405180910390fd5b6106ec6106e361079c565b858584036107a4565b600191505092915050565b600061070b61070461079c565b848461096f565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610814576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161080b906110cf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161087b9061104f565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610962919061112f565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d6906110af565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a469061102f565b60405180910390fd5b610a5a838383610d50565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610ae0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad79061106f565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b739190611181565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610bd7919061112f565b60405180910390a3610bea848484610d55565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610c60576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c579061110f565b60405180910390fd5b610c6c60008383610d50565b8060026000828254610c7e9190611181565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610cd39190611181565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d38919061112f565b60405180910390a3610d4c60008383610d55565b5050565b505050565b505050565b600081359050610d6981611552565b92915050565b600081359050610d7e81611569565b92915050565b600060208284031215610d9657600080fd5b6000610da484828501610d5a565b91505092915050565b60008060408385031215610dc057600080fd5b6000610dce85828601610d5a565b9250506020610ddf85828601610d5a565b9150509250929050565b600080600060608486031215610dfe57600080fd5b6000610e0c86828701610d5a565b9350506020610e1d86828701610d5a565b9250506040610e2e86828701610d6f565b9150509250925092565b60008060408385031215610e4b57600080fd5b6000610e5985828601610d5a565b9250506020610e6a85828601610d6f565b9150509250929050565b610e7d816111e9565b82525050565b6000610e8e82611165565b610e988185611170565b9350610ea881856020860161122c565b610eb1816112ef565b840191505092915050565b6000610ec9602383611170565b9150610ed482611300565b604082019050919050565b6000610eec602283611170565b9150610ef78261134f565b604082019050919050565b6000610f0f602683611170565b9150610f1a8261139e565b604082019050919050565b6000610f32602883611170565b9150610f3d826113ed565b604082019050919050565b6000610f55602583611170565b9150610f608261143c565b604082019050919050565b6000610f78602483611170565b9150610f838261148b565b604082019050919050565b6000610f9b602583611170565b9150610fa6826114da565b604082019050919050565b6000610fbe601f83611170565b9150610fc982611529565b602082019050919050565b610fdd81611215565b82525050565b610fec8161121f565b82525050565b60006020820190506110076000830184610e74565b92915050565b600060208201905081810360008301526110278184610e83565b905092915050565b6000602082019050818103600083015261104881610ebc565b9050919050565b6000602082019050818103600083015261106881610edf565b9050919050565b6000602082019050818103600083015261108881610f02565b9050919050565b600060208201905081810360008301526110a881610f25565b9050919050565b600060208201905081810360008301526110c881610f48565b9050919050565b600060208201905081810360008301526110e881610f6b565b9050919050565b6000602082019050818103600083015261110881610f8e565b9050919050565b6000602082019050818103600083015261112881610fb1565b9050919050565b60006020820190506111446000830184610fd4565b92915050565b600060208201905061115f6000830184610fe3565b92915050565b600081519050919050565b600082825260208201905092915050565b600061118c82611215565b915061119783611215565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156111cc576111cb611291565b5b828201905092915050565b60006111e2826111f5565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b8381101561124a57808201518184015260208101905061122f565b83811115611259576000848401525b50505050565b6000600282049050600182168061127757607f821691505b6020821081141561128b5761128a6112c0565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b61155b816111d7565b811461156657600080fd5b50565b61157281611215565b811461157d57600080fd5b5056fea2646970667358221220d8655be14e87b03a3858a000cc8c993dba0a3ee7f012db5fbefecd3e826a730664736f6c63430008010033"; + "0x608060405260405162001057380380620010578339810160408190526200002691620001b9565b8151829082906200003f90600390602085019062000060565b5080516200005590600490602084019062000060565b505050505062000273565b8280546200006e9062000220565b90600052602060002090601f016020900481019282620000925760008555620000dd565b82601f10620000ad57805160ff1916838001178555620000dd565b82800160010185558215620000dd579182015b82811115620000dd578251825591602001919060010190620000c0565b50620000eb929150620000ef565b5090565b5b80821115620000eb5760008155600101620000f0565b600082601f83011262000117578081fd5b81516001600160401b03808211156200013457620001346200025d565b604051601f8301601f19908116603f011681019082821181831017156200015f576200015f6200025d565b816040528381526020925086838588010111156200017b578485fd5b8491505b838210156200019e57858201830151818301840152908201906200017f565b83821115620001af57848385830101525b9695505050505050565b60008060408385031215620001cc578182fd5b82516001600160401b0380821115620001e3578384fd5b620001f18683870162000106565b9350602085015191508082111562000207578283fd5b50620002168582860162000106565b9150509250929050565b6002810460018216806200023557607f821691505b602082108114156200025757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b610dd480620002836000396000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c806340c10f1911610081578063a457c2d71161005b578063a457c2d714610197578063a9059cbb146101aa578063dd62ed3e146101bd576100d4565b806340c10f191461016757806370a082311461017c57806395d89b411461018f576100d4565b806323b872dd116100b257806323b872dd1461012c578063313ce5671461013f5780633950935114610154576100d4565b806306fdde03146100d9578063095ea7b3146100f757806318160ddd14610117575b600080fd5b6100e16101d0565b6040516100ee91906109c3565b60405180910390f35b61010a61010536600461098f565b610262565b6040516100ee91906109b8565b61011f61027f565b6040516100ee9190610cf6565b61010a61013a366004610954565b610285565b61014761035f565b6040516100ee9190610cff565b61010a61016236600461098f565b610364565b61017a61017536600461098f565b6103c5565b005b61011f61018a366004610901565b6103d3565b6100e16103ff565b61010a6101a536600461098f565b61040e565b61010a6101b836600461098f565b6104ae565b61011f6101cb366004610922565b6104c2565b6060600380546101df90610d4a565b80601f016020809104026020016040519081016040528092919081815260200182805461020b90610d4a565b80156102585780601f1061022d57610100808354040283529160200191610258565b820191906000526020600020905b81548152906001019060200180831161023b57829003601f168201915b5050505050905090565b600061027661026f6104fa565b84846104fe565b50600192915050565b60025490565b600061029284848461060d565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600160205260408120816102c06104fa565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610340576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033790610b4b565b60405180910390fd5b6103548561034c6104fa565b8584036104fe565b506001949350505050565b601290565b60006102766103716104fa565b84846001600061037f6104fa565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918b16815292529020546103c09190610d0d565b6104fe565b6103cf82826107d3565b5050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152602081905260409020545b919050565b6060600480546101df90610d4a565b6000806001600061041d6104fa565b73ffffffffffffffffffffffffffffffffffffffff90811682526020808301939093526040918201600090812091881681529252902054905082811015610490576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033790610c62565b6104a461049b6104fa565b858584036104fe565b5060019392505050565b60006102766104bb6104fa565b848461060d565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b3390565b73ffffffffffffffffffffffffffffffffffffffff831661054b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033790610c05565b73ffffffffffffffffffffffffffffffffffffffff8216610598576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033790610a91565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610600908590610cf6565b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff831661065a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033790610ba8565b73ffffffffffffffffffffffffffffffffffffffff82166106a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033790610a34565b6106b28383836108d8565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610712576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033790610aee565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260208190526040808220858503905591851681529081208054849290610756908490610d0d565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516107ba9190610cf6565b60405180910390a36107cd8484846108d8565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8216610820576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033790610cbf565b61082c600083836108d8565b806002600082825461083e9190610d0d565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604081208054839290610878908490610d0d565b909155505060405173ffffffffffffffffffffffffffffffffffffffff8316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906108c8908590610cf6565b60405180910390a36103cf600083835b505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146103fa57600080fd5b600060208284031215610912578081fd5b61091b826108dd565b9392505050565b60008060408385031215610934578081fd5b61093d836108dd565b915061094b602084016108dd565b90509250929050565b600080600060608486031215610968578081fd5b610971846108dd565b925061097f602085016108dd565b9150604084013590509250925092565b600080604083850312156109a1578182fd5b6109aa836108dd565b946020939093013593505050565b901515815260200190565b6000602080835283518082850152825b818110156109ef578581018301518582016040015282016109d3565b81811115610a005783604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201527f6573730000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560408201527f7373000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260408201527f616c616e63650000000000000000000000000000000000000000000000000000606082015260800190565b60208082526028908201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160408201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460408201527f6472657373000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460408201527f7265737300000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760408201527f207a65726f000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b90815260200190565b60ff91909116815260200190565b60008219821115610d45577f4e487b710000000000000000000000000000000000000000000000000000000081526011600452602481fd5b500190565b600281046001821680610d5e57607f821691505b60208210811415610d98577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b5091905056fea26469706673582212208b5b1e0c6a7eb4b397db3913b40a3a1522935fde4c9697a1de8895a23bf775c664736f6c63430008010033"; diff --git a/packages/hardhat/typechain/index.ts b/packages/hardhat/typechain/index.ts index 08f377a3..336c5a29 100644 --- a/packages/hardhat/typechain/index.ts +++ b/packages/hardhat/typechain/index.ts @@ -5,8 +5,7 @@ export type { Ownable } from "./Ownable"; export type { ERC20 } from "./ERC20"; export type { IERC20Metadata } from "./IERC20Metadata"; export type { IERC20 } from "./IERC20"; -export type { DepositLib } from "./DepositLib"; -export type { Models } from "./Models"; +export type { DisputeManager } from "./DisputeManager"; export type { GovernERC20 } from "./GovernERC20"; export type { IArbitrator } from "./IArbitrator"; export type { OwnableCeleste } from "./OwnableCeleste"; @@ -18,8 +17,7 @@ export { Ownable__factory } from "./factories/Ownable__factory"; export { ERC20__factory } from "./factories/ERC20__factory"; export { IERC20Metadata__factory } from "./factories/IERC20Metadata__factory"; export { IERC20__factory } from "./factories/IERC20__factory"; -export { DepositLib__factory } from "./factories/DepositLib__factory"; -export { Models__factory } from "./factories/Models__factory"; +export { DisputeManager__factory } from "./factories/DisputeManager__factory"; export { GovernERC20__factory } from "./factories/GovernERC20__factory"; export { IArbitrator__factory } from "./factories/IArbitrator__factory"; export { OwnableCeleste__factory } from "./factories/OwnableCeleste__factory"; diff --git a/packages/react-app/package.json b/packages/react-app/package.json index 46b448cd..b914a708 100644 --- a/packages/react-app/package.json +++ b/packages/react-app/package.json @@ -123,13 +123,13 @@ }, "scripts": { "start": "cross-env HTTPS=true npm run sync-assets && react-app-rewired start", - "start:local": "cross-env REACT_APP_CHAIN_ID=1337 yarn start", + "start:local": "cross-env REACT_APP_DEFAULT_CHAIN_ID=1337 yarn start", "start:rinkeby": "cross-env REACT_APP_CHAIN_ID=4 yarn start", - "start:rinkeby-staging": "cross-env REACT_APP_CHAIN_ID=4 REACT_APP_STAGING=true yarn start", - "start:xdai": "cross-env REACT_APP_CHAIN_ID=100 yarn start", + "start:rinkeby-staging": "cross-env REACT_APP_DEFAULT_CHAIN_ID=4 REACT_APP_STAGING=true yarn start", + "start:gnosis": "cross-env REACT_APP_DEFAULT_CHAIN_ID=100 yarn start", "build": "npm run sync-assets && react-app-rewired build", - "build:xdai": "cross-env REACT_APP_CHAIN=100 && yarn build", - "build:rinkeby": "cross-env REACT_APP_APP_NAME=conviction-beta REACT_APP_CHAIN_ID=4 yarn build", + "build:gnosis": "cross-env REACT_APP_DEFAULT_CHAIN_ID=100 && yarn build", + "build:rinkeby": "cross-env REACT_APP_DEFAULT_CHAIN_ID=4 yarn build", "lint": "eslint src --no-error-on-unmatched-pattern --ext js,jsx,ts,tsx", "lint-fix": "eslint --fix src --no-error-on-unmatched-pattern", "format": "prettier --write \"src/**/*.+(js|jsx|json|css|md)\"", diff --git a/packages/react-app/src/components/account/account-module.tsx b/packages/react-app/src/components/account/account-module.tsx index 581bf942..bba972e4 100644 --- a/packages/react-app/src/components/account/account-module.tsx +++ b/packages/react-app/src/components/account/account-module.tsx @@ -1,9 +1,11 @@ +/* eslint-disable no-nested-ternary */ /* eslint-disable jsx-a11y/no-noninteractive-tabindex */ /* eslint-disable no-shadow */ import { Button, GU, IconConnect, springs } from '@1hive/1hive-ui'; import { noop } from 'lodash-es'; import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { animated, Transition } from 'react-spring/renderprops'; +import { GUpx } from 'src/utils/style.util'; import styled from 'styled-components'; import { useWallet } from '../../contexts/wallet.context'; import { getUseWalletProviders, isConnected } from '../../utils/web3.utils'; @@ -11,7 +13,6 @@ import HeaderPopover from '../header/header-popover'; import AccountButton from './account-button'; import AccountScreenConnected from './screen-connected'; import AccountModuleConnectingScreen from './screen-connecting'; -import AccountModuleErrorScreen from './screen-error'; import ScreenProviders from './screen-providers'; const AccountWrapperStyled = styled.div` @@ -19,6 +20,7 @@ const AccountWrapperStyled = styled.div` align-items: center; justify-content: space-around; outline: 0; + margin-right: ${GUpx(2)}; `; const AnimatedDivStyled = styled(animated.div)` @@ -96,7 +98,7 @@ function AccountModule({ compact = false }: Props) { // Always show the “connecting…” screen, even if there are no delay useEffect(() => { - if (wallet.activationError) { + if (wallet.isWrongNetwork) { setActivatingDelayed(undefined); } @@ -112,16 +114,12 @@ function AccountModule({ compact = false }: Props) { return () => { clearTimeout(timer); }; - }, [activatingId, wallet.activationError]); + }, [activatingId, wallet.isWrongNetwork]); const previousScreenIndex = useRef(-1); const { screenIndex, direction } = useMemo(() => { const screenId = (() => { - if (wallet.activationError) { - setButtonLabel(wallet.activationError.name); - return 'error'; - } if (activatingDelayed) { setButtonLabel('Connecting...'); return 'connecting'; @@ -138,7 +136,7 @@ function AccountModule({ compact = false }: Props) { previousScreenIndex.current = screenIndex; return { direction, screenIndex }; - }, [walletAddress, wallet.activationError, activatingDelayed]); + }, [walletAddress, activatingDelayed]); const screen = SCREENS[screenIndex]; const screenId = screen.id; @@ -162,7 +160,13 @@ function AccountModule({ compact = false }: Props) { return ( - {screen.id === 'connected' ? ( + {wallet.isWrongNetwork ? ( +