diff --git a/packages/hardhat/abi/contracts/Externals/OwnableCelesteMock.json b/packages/hardhat/abi/contracts/Externals/OwnableCelesteMock.json deleted file mode 100644 index cf0e82b5..00000000 --- a/packages/hardhat/abi/contracts/Externals/OwnableCelesteMock.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "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" - } - ], - "bytecode": "608060405234801561001057600080fd5b50604051604080610b3c8339810180604052604081101561003057600080fd5b508051602090910151600380546001600160a01b03199081163317909155600080546001600160a01b039094169390911692909217909155600155610ac28061007a6000396000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c80637cb57c6411610081578063c13517e11161005b578063c13517e1146102d3578063db18af6c1461034a578063e00dd16114610397576100d4565b80637cb57c641461021c5780637e9adccf146102ae5780638da5cb5b146102cb576100d4565b8063647846a5116100b2578063647846a51461019257806369e15404146101c35780637b751b9e146101dd576100d4565b806313af4035146100d95780631da213f21461010e578063564a565d14610134575b600080fd5b61010c600480360360208110156100ef57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661039f565b005b61010c6004803603604081101561012457600080fd5b508035906020013560ff1661046c565b6101516004803603602081101561014a57600080fd5b503561067d565b60405173ffffffffffffffffffffffffffffffffffffffff831681526020810182600481111561017d57fe5b60ff1681526020019250505060405180910390f35b61019a6106c2565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101cb6106de565b60408051918252519081900360200190f35b6101e56106e4565b6040805173ffffffffffffffffffffffffffffffffffffffff94851681529290931660208301528183015290519081900360600190f35b61010c6004803603606081101561023257600080fd5b81359173ffffffffffffffffffffffffffffffffffffffff6020820135169181019060608101604082013564010000000081111561026f57600080fd5b82018360208201111561028157600080fd5b803590602001918460018302840111640100000000831117156102a357600080fd5b509092509050610706565b61010c600480360360208110156102c457600080fd5b503561070c565b61019a61070f565b6101cb600480360360408110156102e957600080fd5b8135919081019060408101602082013564010000000081111561030b57600080fd5b82018360208201111561031d57600080fd5b8035906020019184600183028401116401000000008311171561033f57600080fd5b50909250905061072b565b6103676004803603602081101561036057600080fd5b503561089d565b6040805173ffffffffffffffffffffffffffffffffffffffff909316835260208301919091528051918290030190f35b6101cb6109a4565b60035473ffffffffffffffffffffffffffffffffffffffff16331461042557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4552523a4e4f545f4f574e455200000000000000000000000000000000000000604482015290519081900360640190fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60035473ffffffffffffffffffffffffffffffffffffffff1633146104f257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4552523a4e4f545f4f574e455200000000000000000000000000000000000000604482015290519081900360640190fd5b600081600481111561050057fe5b1415801561051a5750600181600481111561051757fe5b14155b61058557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4552523a4f5554434f4d455f4e4f545f41535349474e41424c45000000000000604482015290519081900360640190fd5b60008281526004602052604090206001815474010000000000000000000000000000000000000000900460ff1660048111156105bd57fe5b1461062957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4552523a4e4f545f444953505554454400000000000000000000000000000000604482015290519081900360640190fd5b8054829082907fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000083600481111561067357fe5b0217905550505050565b60046020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff81169074010000000000000000000000000000000000000000900460ff1682565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b600054600154309173ffffffffffffffffffffffffffffffffffffffff169192565b50505050565b50565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b600254604080518082019091523381526000919060208101600190526000828152600460208181526040909220835181547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90911617808255928401519092909183917fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690740100000000000000000000000000000000000000009084908111156107e957fe5b0217905550506002805460019081019091555460005461082a925073ffffffffffffffffffffffffffffffffffffffff16903390309063ffffffff6109aa16565b61089557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4552523a4445504f5349545f4641494c45440000000000000000000000000000604482015290519081900360640190fd5b949350505050565b600081815260046020526040812081906003815474010000000000000000000000000000000000000000900460ff1660048111156108d757fe5b14156108ff575473ffffffffffffffffffffffffffffffffffffffff1691506003905061099f565b6004815474010000000000000000000000000000000000000000900460ff16600481111561092957fe5b1415610951575473ffffffffffffffffffffffffffffffffffffffff1691506004905061099f565b6002815474010000000000000000000000000000000000000000900460ff16600481111561097b57fe5b14156100d4575473ffffffffffffffffffffffffffffffffffffffff169150600090505b915091565b60025481565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052600090610a418682610a4b565b9695505050505050565b6000806040516020818551602087016000895af18015610a8c573d8015610a795760208114610a8257610a8a565b60019350610a8a565b600183511493505b505b509094935050505056fea165627a7a72305820eb46537c59c54975546b99405e9e814628d1eb2de172383621b3e7af82b32d7700290000000000000000000000006e7c3bc98bee14302aa2a98b4c5c86b13eb4b6cd00000000000000000000000000000000000000000000000006f05b59d3b20000" -} diff --git a/packages/hardhat/contracts/mocks/OwnableCelesteMock.sol b/packages/hardhat/contracts/mocks/OwnableCelesteMock.sol new file mode 100644 index 00000000..59a11b77 --- /dev/null +++ b/packages/hardhat/contracts/mocks/OwnableCelesteMock.sol @@ -0,0 +1,351 @@ +/** + *Submitted for verification at Etherscan.io on 2022-01-07 + */ + +// Brought from https://github.com/aragon/aragonOS/blob/v4.3.0/contracts/lib/token/ERC20.sol +// Adapted to use pragma ^0.5.8 and satisfy our linter rules + +pragma solidity ^0.5.8; + +/** + * @title ERC20 interface + * @dev see https://github.com/ethereum/EIPs/issues/20 + */ +contract ERC20 { + function totalSupply() public view returns (uint256); + + function balanceOf(address _who) public view returns (uint256); + + function allowance(address _owner, address _spender) + public + view + returns (uint256); + + function transfer(address _to, uint256 _value) public returns (bool); + + function approve(address _spender, uint256 _value) public returns (bool); + + function transferFrom( + address _from, + address _to, + uint256 _value + ) public returns (bool); + + event Transfer(address indexed from, address indexed to, uint256 value); + + event Approval( + address indexed owner, + address indexed spender, + uint256 value + ); +} + +// File: contracts/arbitration/IArbitrator.sol + +pragma solidity ^0.5.8; + +interface IArbitrator { + /** + * @dev Create a dispute over the Arbitrable sender with a number of possible rulings + * @param _possibleRulings Number of possible rulings allowed for the dispute + * @param _metadata Optional metadata that can be used to provide additional information on the dispute to be created + * @return Dispute identification number + */ + function createDispute(uint256 _possibleRulings, bytes calldata _metadata) + external + returns (uint256); + + /** + * @dev Submit evidence for a dispute + * @param _disputeId Id of the dispute in the Protocol + * @param _submitter Address of the account submitting the evidence + * @param _evidence Data submitted for the evidence related to the dispute + */ + function submitEvidence( + uint256 _disputeId, + address _submitter, + bytes calldata _evidence + ) external; + + /** + * @dev Close the evidence period of a dispute + * @param _disputeId Identification number of the dispute to close its evidence submitting period + */ + function closeEvidencePeriod(uint256 _disputeId) external; + + /** + * @notice Rule dispute #`_disputeId` if ready + * @param _disputeId Identification number of the dispute to be ruled + * @return subject Arbitrable instance associated to the dispute + * @return ruling Ruling number computed for the given dispute + */ + function rule(uint256 _disputeId) + external + returns (address subject, uint256 ruling); + + /** + * @dev Tell the dispute fees information to create a dispute + * @return recipient Address where the corresponding dispute fees must be transferred to + * @return feeToken ERC20 token used for the fees + * @return feeAmount Total amount of fees that must be allowed to the recipient + */ + function getDisputeFees() + external + view + returns ( + address recipient, + ERC20 feeToken, + uint256 feeAmount + ); +} + +// File: contracts/lib/os/SafeERC20.sol + +// Brought from https://github.com/aragon/aragonOS/blob/v4.3.0/contracts/common/SafeERC20.sol +// Adapted to use pragma ^0.5.8 and satisfy our linter rules + +pragma solidity ^0.5.8; + +library SafeERC20 { + // Before 0.5, solidity has a mismatch between `address.transfer()` and `token.transfer()`: + // https://github.com/ethereum/solidity/issues/3544 + bytes4 private constant TRANSFER_SELECTOR = 0xa9059cbb; + + /** + * @dev Same as a standards-compliant ERC20.transfer() that never reverts (returns false). + * Note that this makes an external call to the token. + */ + function safeTransfer( + ERC20 _token, + address _to, + uint256 _amount + ) internal returns (bool) { + bytes memory transferCallData = abi.encodeWithSelector( + TRANSFER_SELECTOR, + _to, + _amount + ); + return invokeAndCheckSuccess(address(_token), transferCallData); + } + + /** + * @dev Same as a standards-compliant ERC20.transferFrom() that never reverts (returns false). + * Note that this makes an external call to the token. + */ + function safeTransferFrom( + ERC20 _token, + address _from, + address _to, + uint256 _amount + ) internal returns (bool) { + bytes memory transferFromCallData = abi.encodeWithSelector( + _token.transferFrom.selector, + _from, + _to, + _amount + ); + return invokeAndCheckSuccess(address(_token), transferFromCallData); + } + + /** + * @dev Same as a standards-compliant ERC20.approve() that never reverts (returns false). + * Note that this makes an external call to the token. + */ + function safeApprove( + ERC20 _token, + address _spender, + uint256 _amount + ) internal returns (bool) { + bytes memory approveCallData = abi.encodeWithSelector( + _token.approve.selector, + _spender, + _amount + ); + return invokeAndCheckSuccess(address(_token), approveCallData); + } + + function invokeAndCheckSuccess(address _addr, bytes memory _calldata) + private + returns (bool) + { + bool ret; + assembly { + let ptr := mload(0x40) // free memory pointer + + let success := call( + gas, // forward all gas + _addr, // address + 0, // no value + add(_calldata, 0x20), // calldata start + mload(_calldata), // calldata length + ptr, // write output over free memory + 0x20 // uint256 return + ) + + if gt(success, 0) { + // Check number of bytes returned from last function call + switch returndatasize + // No bytes returned: assume success + case 0 { + ret := 1 + } + // 32 bytes returned: check if non-zero + case 0x20 { + // Only return success if returned data was true + // Already have output in ptr + ret := eq(mload(ptr), 1) + } + // Not sure what was returned: don't mark as success + default { + + } + } + } + return ret; + } +} + +// File: contracts/ownable-celeste/OwnableCeleste.sol + +pragma solidity ^0.5.8; + +contract OwnableCeleste is IArbitrator { + using SafeERC20 for ERC20; + + // Note that Aragon Court treats the possible outcomes as arbitrary numbers, leaving the Arbitrable (us) to define how to understand them. + // Some outcomes [0, 1, and 2] are reserved by Aragon Court: "missing", "leaked", and "refused", respectively. + // This Arbitrable introduces the concept of the challenger/submitter (a binary outcome) as 3/4. + // Note that Aragon Court emits the lowest outcome in the event of a tie, and so for us, we prefer the challenger. + uint256 private constant DISPUTES_NOT_RULED = 0; + uint256 private constant DISPUTES_RULING_CHALLENGER = 3; + uint256 private constant DISPUTES_RULING_SUBMITTER = 4; + + enum State { + NOT_DISPUTED, + DISPUTED, + DISPUTES_NOT_RULED, + DISPUTES_RULING_CHALLENGER, + DISPUTES_RULING_SUBMITTER + } + + struct Dispute { + address subject; + State state; + } + + ERC20 public feeToken; + uint256 public feeAmount; + uint256 public currentId; + address public owner; + mapping(uint256 => Dispute) public disputes; + + modifier onlyOwner() { + require(msg.sender == owner, "ERR:NOT_OWNER"); + _; + } + + constructor(ERC20 _feeToken, uint256 _feeAmount) public { + owner = msg.sender; + feeToken = _feeToken; + feeAmount = _feeAmount; + } + + function setOwner(address _owner) public onlyOwner { + owner = _owner; + } + + /** + * @dev Create a dispute over the Arbitrable sender with a number of possible rulings + * @param _possibleRulings Number of possible rulings allowed for the dispute + * @param _metadata Optional metadata that can be used to provide additional information on the dispute to be created + * @return Dispute identification number + */ + function createDispute(uint256 _possibleRulings, bytes calldata _metadata) + external + returns (uint256) + { + uint256 disputeId = currentId; + disputes[disputeId] = Dispute(msg.sender, State.DISPUTED); + currentId++; + + require( + feeToken.safeTransferFrom(msg.sender, address(this), feeAmount), + "ERR:DEPOSIT_FAILED" + ); + return disputeId; + } + + function decideDispute(uint256 _disputeId, State _state) + external + onlyOwner + { + require( + _state != State.NOT_DISPUTED && _state != State.DISPUTED, + "ERR:OUTCOME_NOT_ASSIGNABLE" + ); + + Dispute storage dispute = disputes[_disputeId]; + require(dispute.state == State.DISPUTED, "ERR:NOT_DISPUTED"); + + dispute.state = _state; + } + + /** + * @dev Submit evidence for a dispute + * @param _disputeId Id of the dispute in the Protocol + * @param _submitter Address of the account submitting the evidence + * @param _evidence Data submitted for the evidence related to the dispute + */ + function submitEvidence( + uint256 _disputeId, + address _submitter, + bytes calldata _evidence + ) external {} + + /** + * @dev Close the evidence period of a dispute + * @param _disputeId Identification number of the dispute to close its evidence submitting period + */ + function closeEvidencePeriod(uint256 _disputeId) external {} + + /** + * @notice Rule dispute #`_disputeId` if ready + * @param _disputeId Identification number of the dispute to be ruled + * @return subject Arbitrable instance associated to the dispute + * @return ruling Ruling number computed for the given dispute + */ + function rule(uint256 _disputeId) + external + returns (address subject, uint256 ruling) + { + Dispute storage dispute = disputes[_disputeId]; + + if (dispute.state == State.DISPUTES_RULING_CHALLENGER) { + return (dispute.subject, DISPUTES_RULING_CHALLENGER); + } else if (dispute.state == State.DISPUTES_RULING_SUBMITTER) { + return (dispute.subject, DISPUTES_RULING_SUBMITTER); + } else if (dispute.state == State.DISPUTES_NOT_RULED) { + return (dispute.subject, DISPUTES_NOT_RULED); + } else { + revert(); + } + } + + /** + * @dev Tell the dispute fees information to create a dispute + * @return recipient Address where the corresponding dispute fees must be transferred to + * @return feeToken ERC20 token used for the fees + * @return feeAmount Total amount of fees that must be allowed to the recipient + */ + function getDisputeFees() + external + view + returns ( + address, + ERC20, + uint256 + ) + { + return (address(this), feeToken, feeAmount); + } +} diff --git a/packages/hardhat/deploy/deploy-quest_factory.ts b/packages/hardhat/deploy/deploy-quest_factory.ts index 889f39b0..437d30fc 100644 --- a/packages/hardhat/deploy/deploy-quest_factory.ts +++ b/packages/hardhat/deploy/deploy-quest_factory.ts @@ -36,14 +36,18 @@ export default async ( try { console.log("Verifying QuestFactory..."); - setTimeout( - async () => - await run("verify:verify", { - address: deployResult.address, - constructorArguments, - }), - 2000 - ); // Wait for contract to be deployed + 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); } diff --git a/packages/hardhat/deployments/rinkeby/Celeste.json b/packages/hardhat/deployments/rinkeby/Celeste.json index 56bbdff7..0ed76f7d 100644 --- a/packages/hardhat/deployments/rinkeby/Celeste.json +++ b/packages/hardhat/deployments/rinkeby/Celeste.json @@ -1 +1 @@ -{"address":"0x35bf1cF67b798Cbab26F92dac152f3aCAb64680B","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":"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 diff --git a/packages/hardhat/deployments/rinkeby/OwnableCeleste.json b/packages/hardhat/deployments/rinkeby/OwnableCeleste.json index 0fb1a5f2..d0582239 100644 --- a/packages/hardhat/deployments/rinkeby/OwnableCeleste.json +++ b/packages/hardhat/deployments/rinkeby/OwnableCeleste.json @@ -1,5 +1,5 @@ { - "address": "0x35bf1cF67b798Cbab26F92dac152f3aCAb64680B", + "address": "0xdCA81bde631EA9A85D12c57150427cAc350E3952", "abi": [ { "constant": false, @@ -232,19 +232,19 @@ "type": "constructor" } ], - "transactionHash": "0xa8c92c4a708653bdbd9870b5a0838df2c01c02b5e4384b68fcda38bd53acdf28", + "transactionHash": "0x01a91cceb0f4ed93c5cd49b5a5418b6fb610c95b54856fd66de896bb2161b898", "receipt": { "to": null, "from": "0x91B0d67D3F47A30FBEeB159E67209Ad6cb2cE22E", - "contractAddress": "0x35bf1cF67b798Cbab26F92dac152f3aCAb64680B", + "contractAddress": "0xdCA81bde631EA9A85D12c57150427cAc350E3952", "transactionIndex": 0, - "gasUsed": "712133", + "gasUsed": "874961", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x766d3619f18266f394b53655ecfbaa402c91ebdae4a9cd3423594b4c63cf568f", - "transactionHash": "0xa8c92c4a708653bdbd9870b5a0838df2c01c02b5e4384b68fcda38bd53acdf28", + "blockHash": "0xd775ec049a641eafef795671d7956820febc4a947d8377dbe1454a55d151a4ad", + "transactionHash": "0x01a91cceb0f4ed93c5cd49b5a5418b6fb610c95b54856fd66de896bb2161b898", "logs": [], - "blockNumber": 10675880, - "cumulativeGasUsed": "712133", + "blockNumber": 10676067, + "cumulativeGasUsed": "874961", "status": 1, "byzantium": true }, @@ -252,5 +252,51 @@ "0x3050E20FAbE19f8576865811c9F28e85b96Fa4f9", "50000000000000000" ], - "bytecode": "608060405234801561001057600080fd5b50604051604080610b3c8339810180604052604081101561003057600080fd5b508051602090910151600380546001600160a01b03199081163317909155600080546001600160a01b039094169390911692909217909155600155610ac28061007a6000396000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c80637cb57c6411610081578063c13517e11161005b578063c13517e1146102d3578063db18af6c1461034a578063e00dd16114610397576100d4565b80637cb57c641461021c5780637e9adccf146102ae5780638da5cb5b146102cb576100d4565b8063647846a5116100b2578063647846a51461019257806369e15404146101c35780637b751b9e146101dd576100d4565b806313af4035146100d95780631da213f21461010e578063564a565d14610134575b600080fd5b61010c600480360360208110156100ef57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661039f565b005b61010c6004803603604081101561012457600080fd5b508035906020013560ff1661046c565b6101516004803603602081101561014a57600080fd5b503561067d565b60405173ffffffffffffffffffffffffffffffffffffffff831681526020810182600481111561017d57fe5b60ff1681526020019250505060405180910390f35b61019a6106c2565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101cb6106de565b60408051918252519081900360200190f35b6101e56106e4565b6040805173ffffffffffffffffffffffffffffffffffffffff94851681529290931660208301528183015290519081900360600190f35b61010c6004803603606081101561023257600080fd5b81359173ffffffffffffffffffffffffffffffffffffffff6020820135169181019060608101604082013564010000000081111561026f57600080fd5b82018360208201111561028157600080fd5b803590602001918460018302840111640100000000831117156102a357600080fd5b509092509050610706565b61010c600480360360208110156102c457600080fd5b503561070c565b61019a61070f565b6101cb600480360360408110156102e957600080fd5b8135919081019060408101602082013564010000000081111561030b57600080fd5b82018360208201111561031d57600080fd5b8035906020019184600183028401116401000000008311171561033f57600080fd5b50909250905061072b565b6103676004803603602081101561036057600080fd5b503561089d565b6040805173ffffffffffffffffffffffffffffffffffffffff909316835260208301919091528051918290030190f35b6101cb6109a4565b60035473ffffffffffffffffffffffffffffffffffffffff16331461042557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4552523a4e4f545f4f574e455200000000000000000000000000000000000000604482015290519081900360640190fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60035473ffffffffffffffffffffffffffffffffffffffff1633146104f257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4552523a4e4f545f4f574e455200000000000000000000000000000000000000604482015290519081900360640190fd5b600081600481111561050057fe5b1415801561051a5750600181600481111561051757fe5b14155b61058557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4552523a4f5554434f4d455f4e4f545f41535349474e41424c45000000000000604482015290519081900360640190fd5b60008281526004602052604090206001815474010000000000000000000000000000000000000000900460ff1660048111156105bd57fe5b1461062957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4552523a4e4f545f444953505554454400000000000000000000000000000000604482015290519081900360640190fd5b8054829082907fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000083600481111561067357fe5b0217905550505050565b60046020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff81169074010000000000000000000000000000000000000000900460ff1682565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b600054600154309173ffffffffffffffffffffffffffffffffffffffff169192565b50505050565b50565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b600254604080518082019091523381526000919060208101600190526000828152600460208181526040909220835181547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90911617808255928401519092909183917fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690740100000000000000000000000000000000000000009084908111156107e957fe5b0217905550506002805460019081019091555460005461082a925073ffffffffffffffffffffffffffffffffffffffff16903390309063ffffffff6109aa16565b61089557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4552523a4445504f5349545f4641494c45440000000000000000000000000000604482015290519081900360640190fd5b949350505050565b600081815260046020526040812081906003815474010000000000000000000000000000000000000000900460ff1660048111156108d757fe5b14156108ff575473ffffffffffffffffffffffffffffffffffffffff1691506003905061099f565b6004815474010000000000000000000000000000000000000000900460ff16600481111561092957fe5b1415610951575473ffffffffffffffffffffffffffffffffffffffff1691506004905061099f565b6002815474010000000000000000000000000000000000000000900460ff16600481111561097b57fe5b14156100d4575473ffffffffffffffffffffffffffffffffffffffff169150600090505b915091565b60025481565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052600090610a418682610a4b565b9695505050505050565b6000806040516020818551602087016000895af18015610a8c573d8015610a795760208114610a8257610a8a565b60019350610a8a565b600183511493505b505b509094935050505056fea165627a7a72305820eb46537c59c54975546b99405e9e814628d1eb2de172383621b3e7af82b32d7700290000000000000000000000006e7c3bc98bee14302aa2a98b4c5c86b13eb4b6cd00000000000000000000000000000000000000000000000006f05b59d3b20000" + "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", + "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" + } + } + } } \ No newline at end of file diff --git a/packages/hardhat/deployments/rinkeby/solcInputs/a6944b2f61bcf83839b564892dd1b56e.json b/packages/hardhat/deployments/rinkeby/solcInputs/a6944b2f61bcf83839b564892dd1b56e.json new file mode 100644 index 00000000..98354dd5 --- /dev/null +++ b/packages/hardhat/deployments/rinkeby/solcInputs/a6944b2f61bcf83839b564892dd1b56e.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 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" + } + }, + "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/hardhat.config.ts b/packages/hardhat/hardhat.config.ts index c8857813..04ba76dd 100644 --- a/packages/hardhat/hardhat.config.ts +++ b/packages/hardhat/hardhat.config.ts @@ -24,7 +24,6 @@ import governGnosis from "./deployments/xdai/Govern.json"; import defaultConfig from "./default-config.json"; import exportContractResult from "./scripts/export-contract-result"; import GovernQueueAbi from "./abi/contracts/Externals/GovernQueue.json"; -import OwnableCelesteMock from "./abi/contracts/Externals/OwnableCelesteMock.json"; dotenvConfig({ path: resolve(__dirname, "../../local.env") }); @@ -210,13 +209,20 @@ const hardhatConfig: HardhatUserConfig = { }, }, solidity: { - version: "0.8.1", - settings: { - optimizer: { - enabled: true, - runs: 20000, + compilers: [ + { + version: "0.5.8", }, - }, + { + version: "0.8.1", + settings: { + optimizer: { + enabled: true, + runs: 20000, + }, + }, + }, + ], }, ovm: { solcVersion: "0.7.6", @@ -1006,18 +1012,15 @@ task("deployCeleste:rinkeby") types.float ) .setAction( - async (args, { deployments, ethers, getNamedAccounts, network }) => { + async (args, { deployments, ethers, getNamedAccounts, network, run }) => { const { deployer, owner } = await getNamedAccounts(); + const constructorArguments = [ + args.feeToken, + ethers.utils.parseEther(args.feeAmount.toString()), + ]; const result = await deployments.deploy("OwnableCeleste", { from: deployer, - args: [ - args.feeToken, - ethers.utils.parseEther(args.feeAmount.toString()), - ], - contract: { - abi: OwnableCelesteMock.abi, - bytecode: OwnableCelesteMock.bytecode, - }, + args: constructorArguments, gasLimit: 10000000, }); console.log("Deployed Celeste (" + network.name + "):", result.address); @@ -1025,6 +1028,22 @@ task("deployCeleste:rinkeby") await contract.setOwner(owner, { from: deployer, gasLimit: 500000 }); console.log("Ownership transfered to: ", owner); exportContractResult(network, "Celeste", result); + + try { + console.log("Verifying OwnableCeleste..."); + await new Promise((res, rej) => { + setTimeout( + () => + run("verify:verify", { + address: result.address, + constructorArguments, + }).then, + 2000 + ); // Wait for contract to be deployed + }); + } catch (error) { + console.error("Failed when verifying OwnableCeleste contract", error); + } } ); diff --git a/packages/hardhat/typechain/ERC20.d.ts b/packages/hardhat/typechain/ERC20.d.ts index e77151f0..baa270de 100644 --- a/packages/hardhat/typechain/ERC20.d.ts +++ b/packages/hardhat/typechain/ERC20.d.ts @@ -22,83 +22,56 @@ import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; interface ERC20Interface extends ethers.utils.Interface { functions: { - "allowance(address,address)": FunctionFragment; "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "symbol()": FunctionFragment; "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; "transferFrom(address,address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "allowance(address,address)": FunctionFragment; }; - encodeFunctionData( - functionFragment: "allowance", - values: [string, string] - ): string; encodeFunctionData( functionFragment: "approve", values: [string, BigNumberish] ): string; - encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData( - functionFragment: "decreaseAllowance", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "increaseAllowance", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData( functionFragment: "totalSupply", values?: undefined ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; encodeFunctionData( functionFragment: "transfer", values: [string, BigNumberish] ): string; encodeFunctionData( - functionFragment: "transferFrom", - values: [string, string, BigNumberish] + functionFragment: "allowance", + values: [string, string] ): string; - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "decreaseAllowance", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "increaseAllowance", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; decodeFunctionResult( functionFragment: "totalSupply", data: BytesLike ): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; decodeFunctionResult( functionFragment: "transferFrom", data: BytesLike ): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; events: { - "Approval(address,address,uint256)": EventFragment; "Transfer(address,address,uint256)": EventFragment; + "Approval(address,address,uint256)": EventFragment; }; - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; } export class ERC20 extends Contract { @@ -115,508 +88,328 @@ export class ERC20 extends Contract { interface: ERC20Interface; functions: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - "allowance(address,address)"( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - approve( - spender: string, - amount: BigNumberish, + _spender: string, + _value: BigNumberish, overrides?: Overrides ): Promise; "approve(address,uint256)"( - spender: string, - amount: BigNumberish, + _spender: string, + _value: BigNumberish, overrides?: Overrides ): Promise; - balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - "balanceOf(address)"( - account: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - "decimals()"(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides - ): Promise; + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - "decreaseAllowance(address,uint256)"( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides - ): Promise; + "totalSupply()"(overrides?: CallOverrides): Promise<[BigNumber]>; - increaseAllowance( - spender: string, - addedValue: BigNumberish, + transferFrom( + _from: string, + _to: string, + _value: BigNumberish, overrides?: Overrides ): Promise; - "increaseAllowance(address,uint256)"( - spender: string, - addedValue: BigNumberish, + "transferFrom(address,address,uint256)"( + _from: string, + _to: string, + _value: BigNumberish, overrides?: Overrides ): Promise; - name(overrides?: CallOverrides): Promise<[string]>; - - "name()"(overrides?: CallOverrides): Promise<[string]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; + balanceOf(_who: string, overrides?: CallOverrides): Promise<[BigNumber]>; - "symbol()"(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - "totalSupply()"(overrides?: CallOverrides): Promise<[BigNumber]>; + "balanceOf(address)"( + _who: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; transfer( - recipient: string, - amount: BigNumberish, + _to: string, + _value: BigNumberish, overrides?: Overrides ): Promise; "transfer(address,uint256)"( - recipient: string, - amount: BigNumberish, + _to: string, + _value: BigNumberish, overrides?: Overrides ): Promise; - transferFrom( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: Overrides - ): Promise; + allowance( + _owner: string, + _spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; - "transferFrom(address,address,uint256)"( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: Overrides - ): Promise; + "allowance(address,address)"( + _owner: string, + _spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; }; - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - "allowance(address,address)"( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - approve( - spender: string, - amount: BigNumberish, + _spender: string, + _value: BigNumberish, overrides?: Overrides ): Promise; "approve(address,uint256)"( - spender: string, - amount: BigNumberish, + _spender: string, + _value: BigNumberish, overrides?: Overrides ): Promise; - balanceOf(account: string, overrides?: CallOverrides): Promise; - - "balanceOf(address)"( - account: string, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - "decimals()"(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides - ): Promise; + totalSupply(overrides?: CallOverrides): Promise; - "decreaseAllowance(address,uint256)"( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides - ): Promise; + "totalSupply()"(overrides?: CallOverrides): Promise; - increaseAllowance( - spender: string, - addedValue: BigNumberish, + transferFrom( + _from: string, + _to: string, + _value: BigNumberish, overrides?: Overrides ): Promise; - "increaseAllowance(address,uint256)"( - spender: string, - addedValue: BigNumberish, + "transferFrom(address,address,uint256)"( + _from: string, + _to: string, + _value: BigNumberish, overrides?: Overrides ): Promise; - name(overrides?: CallOverrides): Promise; - - "name()"(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; + balanceOf(_who: string, overrides?: CallOverrides): Promise; - "symbol()"(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - "totalSupply()"(overrides?: CallOverrides): Promise; + "balanceOf(address)"( + _who: string, + overrides?: CallOverrides + ): Promise; transfer( - recipient: string, - amount: BigNumberish, + _to: string, + _value: BigNumberish, overrides?: Overrides ): Promise; "transfer(address,uint256)"( - recipient: string, - amount: BigNumberish, + _to: string, + _value: BigNumberish, overrides?: Overrides ): Promise; - transferFrom( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: Overrides - ): Promise; + allowance( + _owner: string, + _spender: string, + overrides?: CallOverrides + ): Promise; - "transferFrom(address,address,uint256)"( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: Overrides - ): Promise; + "allowance(address,address)"( + _owner: string, + _spender: string, + overrides?: CallOverrides + ): Promise; callStatic: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - "allowance(address,address)"( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - approve( - spender: string, - amount: BigNumberish, + _spender: string, + _value: BigNumberish, overrides?: CallOverrides ): Promise; "approve(address,uint256)"( - spender: string, - amount: BigNumberish, + _spender: string, + _value: BigNumberish, overrides?: CallOverrides ): Promise; - balanceOf(account: string, overrides?: CallOverrides): Promise; - - "balanceOf(address)"( - account: string, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; - "decimals()"(overrides?: CallOverrides): Promise; + "totalSupply()"(overrides?: CallOverrides): Promise; - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, + transferFrom( + _from: string, + _to: string, + _value: BigNumberish, overrides?: CallOverrides ): Promise; - "decreaseAllowance(address,uint256)"( - spender: string, - subtractedValue: BigNumberish, + "transferFrom(address,address,uint256)"( + _from: string, + _to: string, + _value: BigNumberish, overrides?: CallOverrides ): Promise; - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: CallOverrides - ): Promise; + balanceOf(_who: string, overrides?: CallOverrides): Promise; - "increaseAllowance(address,uint256)"( - spender: string, - addedValue: BigNumberish, + "balanceOf(address)"( + _who: string, overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - "name()"(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - "symbol()"(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - "totalSupply()"(overrides?: CallOverrides): Promise; + ): Promise; transfer( - recipient: string, - amount: BigNumberish, + _to: string, + _value: BigNumberish, overrides?: CallOverrides ): Promise; "transfer(address,uint256)"( - recipient: string, - amount: BigNumberish, + _to: string, + _value: BigNumberish, overrides?: CallOverrides ): Promise; - transferFrom( - sender: string, - recipient: string, - amount: BigNumberish, + allowance( + _owner: string, + _spender: string, overrides?: CallOverrides - ): Promise; + ): Promise; - "transferFrom(address,address,uint256)"( - sender: string, - recipient: string, - amount: BigNumberish, + "allowance(address,address)"( + _owner: string, + _spender: string, overrides?: CallOverrides - ): Promise; + ): Promise; }; filters: { + Transfer(from: string | null, to: string | null, value: null): EventFilter; + Approval( owner: string | null, spender: string | null, value: null ): EventFilter; - - Transfer(from: string | null, to: string | null, value: null): EventFilter; }; estimateGas: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - "allowance(address,address)"( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - approve( - spender: string, - amount: BigNumberish, + _spender: string, + _value: BigNumberish, overrides?: Overrides ): Promise; "approve(address,uint256)"( - spender: string, - amount: BigNumberish, + _spender: string, + _value: BigNumberish, overrides?: Overrides ): Promise; - balanceOf(account: string, overrides?: CallOverrides): Promise; - - "balanceOf(address)"( - account: string, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; - "decimals()"(overrides?: CallOverrides): Promise; + "totalSupply()"(overrides?: CallOverrides): Promise; - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, + transferFrom( + _from: string, + _to: string, + _value: BigNumberish, overrides?: Overrides ): Promise; - "decreaseAllowance(address,uint256)"( - spender: string, - subtractedValue: BigNumberish, + "transferFrom(address,address,uint256)"( + _from: string, + _to: string, + _value: BigNumberish, overrides?: Overrides ): Promise; - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides - ): Promise; + balanceOf(_who: string, overrides?: CallOverrides): Promise; - "increaseAllowance(address,uint256)"( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides + "balanceOf(address)"( + _who: string, + overrides?: CallOverrides ): Promise; - name(overrides?: CallOverrides): Promise; - - "name()"(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - "symbol()"(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - "totalSupply()"(overrides?: CallOverrides): Promise; - transfer( - recipient: string, - amount: BigNumberish, + _to: string, + _value: BigNumberish, overrides?: Overrides ): Promise; "transfer(address,uint256)"( - recipient: string, - amount: BigNumberish, - overrides?: Overrides - ): Promise; - - transferFrom( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: Overrides - ): Promise; - - "transferFrom(address,address,uint256)"( - sender: string, - recipient: string, - amount: BigNumberish, + _to: string, + _value: BigNumberish, overrides?: Overrides ): Promise; - }; - populateTransaction: { allowance( - owner: string, - spender: string, + _owner: string, + _spender: string, overrides?: CallOverrides - ): Promise; + ): Promise; "allowance(address,address)"( - owner: string, - spender: string, + _owner: string, + _spender: string, overrides?: CallOverrides - ): Promise; + ): Promise; + }; + populateTransaction: { approve( - spender: string, - amount: BigNumberish, + _spender: string, + _value: BigNumberish, overrides?: Overrides ): Promise; "approve(address,uint256)"( - spender: string, - amount: BigNumberish, + _spender: string, + _value: BigNumberish, overrides?: Overrides ): Promise; - balanceOf( - account: string, - overrides?: CallOverrides - ): Promise; - - "balanceOf(address)"( - account: string, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; - "decimals()"(overrides?: CallOverrides): Promise; + "totalSupply()"(overrides?: CallOverrides): Promise; - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, + transferFrom( + _from: string, + _to: string, + _value: BigNumberish, overrides?: Overrides ): Promise; - "decreaseAllowance(address,uint256)"( - spender: string, - subtractedValue: BigNumberish, + "transferFrom(address,address,uint256)"( + _from: string, + _to: string, + _value: BigNumberish, overrides?: Overrides ): Promise; - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides + balanceOf( + _who: string, + overrides?: CallOverrides ): Promise; - "increaseAllowance(address,uint256)"( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides + "balanceOf(address)"( + _who: string, + overrides?: CallOverrides ): Promise; - name(overrides?: CallOverrides): Promise; - - "name()"(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - "symbol()"(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - "totalSupply()"(overrides?: CallOverrides): Promise; - transfer( - recipient: string, - amount: BigNumberish, + _to: string, + _value: BigNumberish, overrides?: Overrides ): Promise; "transfer(address,uint256)"( - recipient: string, - amount: BigNumberish, + _to: string, + _value: BigNumberish, overrides?: Overrides ): Promise; - transferFrom( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: Overrides + allowance( + _owner: string, + _spender: string, + overrides?: CallOverrides ): Promise; - "transferFrom(address,address,uint256)"( - sender: string, - recipient: string, - amount: BigNumberish, - overrides?: Overrides + "allowance(address,address)"( + _owner: string, + _spender: string, + overrides?: CallOverrides ): Promise; }; } diff --git a/packages/hardhat/typechain/IArbitrator.d.ts b/packages/hardhat/typechain/IArbitrator.d.ts new file mode 100644 index 00000000..120a60f0 --- /dev/null +++ b/packages/hardhat/typechain/IArbitrator.d.ts @@ -0,0 +1,390 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, +} from "ethers"; +import { + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "@ethersproject/contracts"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; + +interface IArbitratorInterface extends ethers.utils.Interface { + functions: { + "getDisputeFees()": FunctionFragment; + "submitEvidence(uint256,address,bytes)": FunctionFragment; + "closeEvidencePeriod(uint256)": FunctionFragment; + "createDispute(uint256,bytes)": FunctionFragment; + "rule(uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "getDisputeFees", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "submitEvidence", + values: [BigNumberish, string, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "closeEvidencePeriod", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "createDispute", + values: [BigNumberish, BytesLike] + ): string; + encodeFunctionData(functionFragment: "rule", values: [BigNumberish]): string; + + decodeFunctionResult( + functionFragment: "getDisputeFees", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "submitEvidence", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "closeEvidencePeriod", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "createDispute", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "rule", data: BytesLike): Result; + + events: {}; +} + +export class IArbitrator 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: IArbitratorInterface; + + functions: { + getDisputeFees( + overrides?: CallOverrides + ): Promise< + [string, string, BigNumber] & { + recipient: string; + feeToken: string; + feeAmount: BigNumber; + } + >; + + "getDisputeFees()"( + overrides?: CallOverrides + ): Promise< + [string, string, BigNumber] & { + recipient: string; + feeToken: string; + feeAmount: BigNumber; + } + >; + + submitEvidence( + _disputeId: BigNumberish, + _submitter: string, + _evidence: BytesLike, + overrides?: Overrides + ): Promise; + + "submitEvidence(uint256,address,bytes)"( + _disputeId: BigNumberish, + _submitter: string, + _evidence: BytesLike, + overrides?: Overrides + ): Promise; + + closeEvidencePeriod( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + "closeEvidencePeriod(uint256)"( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + createDispute( + _possibleRulings: BigNumberish, + _metadata: BytesLike, + overrides?: Overrides + ): Promise; + + "createDispute(uint256,bytes)"( + _possibleRulings: BigNumberish, + _metadata: BytesLike, + overrides?: Overrides + ): Promise; + + rule( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + "rule(uint256)"( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + }; + + getDisputeFees( + overrides?: CallOverrides + ): Promise< + [string, string, BigNumber] & { + recipient: string; + feeToken: string; + feeAmount: BigNumber; + } + >; + + "getDisputeFees()"( + overrides?: CallOverrides + ): Promise< + [string, string, BigNumber] & { + recipient: string; + feeToken: string; + feeAmount: BigNumber; + } + >; + + submitEvidence( + _disputeId: BigNumberish, + _submitter: string, + _evidence: BytesLike, + overrides?: Overrides + ): Promise; + + "submitEvidence(uint256,address,bytes)"( + _disputeId: BigNumberish, + _submitter: string, + _evidence: BytesLike, + overrides?: Overrides + ): Promise; + + closeEvidencePeriod( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + "closeEvidencePeriod(uint256)"( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + createDispute( + _possibleRulings: BigNumberish, + _metadata: BytesLike, + overrides?: Overrides + ): Promise; + + "createDispute(uint256,bytes)"( + _possibleRulings: BigNumberish, + _metadata: BytesLike, + overrides?: Overrides + ): Promise; + + rule( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + "rule(uint256)"( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + callStatic: { + getDisputeFees( + overrides?: CallOverrides + ): Promise< + [string, string, BigNumber] & { + recipient: string; + feeToken: string; + feeAmount: BigNumber; + } + >; + + "getDisputeFees()"( + overrides?: CallOverrides + ): Promise< + [string, string, BigNumber] & { + recipient: string; + feeToken: string; + feeAmount: BigNumber; + } + >; + + submitEvidence( + _disputeId: BigNumberish, + _submitter: string, + _evidence: BytesLike, + overrides?: CallOverrides + ): Promise; + + "submitEvidence(uint256,address,bytes)"( + _disputeId: BigNumberish, + _submitter: string, + _evidence: BytesLike, + overrides?: CallOverrides + ): Promise; + + closeEvidencePeriod( + _disputeId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "closeEvidencePeriod(uint256)"( + _disputeId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + createDispute( + _possibleRulings: BigNumberish, + _metadata: BytesLike, + overrides?: CallOverrides + ): Promise; + + "createDispute(uint256,bytes)"( + _possibleRulings: BigNumberish, + _metadata: BytesLike, + overrides?: CallOverrides + ): Promise; + + rule( + _disputeId: BigNumberish, + overrides?: CallOverrides + ): Promise<[string, BigNumber] & { subject: string; ruling: BigNumber }>; + + "rule(uint256)"( + _disputeId: BigNumberish, + overrides?: CallOverrides + ): Promise<[string, BigNumber] & { subject: string; ruling: BigNumber }>; + }; + + filters: {}; + + estimateGas: { + getDisputeFees(overrides?: CallOverrides): Promise; + + "getDisputeFees()"(overrides?: CallOverrides): Promise; + + submitEvidence( + _disputeId: BigNumberish, + _submitter: string, + _evidence: BytesLike, + overrides?: Overrides + ): Promise; + + "submitEvidence(uint256,address,bytes)"( + _disputeId: BigNumberish, + _submitter: string, + _evidence: BytesLike, + overrides?: Overrides + ): Promise; + + closeEvidencePeriod( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + "closeEvidencePeriod(uint256)"( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + createDispute( + _possibleRulings: BigNumberish, + _metadata: BytesLike, + overrides?: Overrides + ): Promise; + + "createDispute(uint256,bytes)"( + _possibleRulings: BigNumberish, + _metadata: BytesLike, + overrides?: Overrides + ): Promise; + + rule(_disputeId: BigNumberish, overrides?: Overrides): Promise; + + "rule(uint256)"( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + }; + + populateTransaction: { + getDisputeFees(overrides?: CallOverrides): Promise; + + "getDisputeFees()"( + overrides?: CallOverrides + ): Promise; + + submitEvidence( + _disputeId: BigNumberish, + _submitter: string, + _evidence: BytesLike, + overrides?: Overrides + ): Promise; + + "submitEvidence(uint256,address,bytes)"( + _disputeId: BigNumberish, + _submitter: string, + _evidence: BytesLike, + overrides?: Overrides + ): Promise; + + closeEvidencePeriod( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + "closeEvidencePeriod(uint256)"( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + createDispute( + _possibleRulings: BigNumberish, + _metadata: BytesLike, + overrides?: Overrides + ): Promise; + + "createDispute(uint256,bytes)"( + _possibleRulings: BigNumberish, + _metadata: BytesLike, + overrides?: Overrides + ): Promise; + + rule( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + "rule(uint256)"( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + }; +} diff --git a/packages/hardhat/typechain/OwnableCeleste.d.ts b/packages/hardhat/typechain/OwnableCeleste.d.ts new file mode 100644 index 00000000..ede52ca5 --- /dev/null +++ b/packages/hardhat/typechain/OwnableCeleste.d.ts @@ -0,0 +1,612 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, +} from "ethers"; +import { + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "@ethersproject/contracts"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; + +interface OwnableCelesteInterface extends ethers.utils.Interface { + functions: { + "setOwner(address)": FunctionFragment; + "decideDispute(uint256,uint8)": FunctionFragment; + "disputes(uint256)": FunctionFragment; + "feeToken()": FunctionFragment; + "feeAmount()": FunctionFragment; + "getDisputeFees()": FunctionFragment; + "submitEvidence(uint256,address,bytes)": FunctionFragment; + "closeEvidencePeriod(uint256)": FunctionFragment; + "owner()": FunctionFragment; + "createDispute(uint256,bytes)": FunctionFragment; + "rule(uint256)": FunctionFragment; + "currentId()": FunctionFragment; + }; + + encodeFunctionData(functionFragment: "setOwner", values: [string]): string; + encodeFunctionData( + functionFragment: "decideDispute", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "disputes", + values: [BigNumberish] + ): string; + encodeFunctionData(functionFragment: "feeToken", values?: undefined): string; + encodeFunctionData(functionFragment: "feeAmount", values?: undefined): string; + encodeFunctionData( + functionFragment: "getDisputeFees", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "submitEvidence", + values: [BigNumberish, string, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "closeEvidencePeriod", + values: [BigNumberish] + ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "createDispute", + values: [BigNumberish, BytesLike] + ): string; + encodeFunctionData(functionFragment: "rule", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "currentId", values?: undefined): string; + + decodeFunctionResult(functionFragment: "setOwner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "decideDispute", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "disputes", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "feeToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "feeAmount", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getDisputeFees", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "submitEvidence", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "closeEvidencePeriod", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "createDispute", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "rule", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "currentId", data: BytesLike): Result; + + events: {}; +} + +export class OwnableCeleste 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: OwnableCelesteInterface; + + functions: { + setOwner( + _owner: string, + overrides?: Overrides + ): Promise; + + "setOwner(address)"( + _owner: string, + overrides?: Overrides + ): Promise; + + decideDispute( + _disputeId: BigNumberish, + _state: BigNumberish, + overrides?: Overrides + ): Promise; + + "decideDispute(uint256,uint8)"( + _disputeId: BigNumberish, + _state: BigNumberish, + overrides?: Overrides + ): Promise; + + disputes( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise<[string, number] & { subject: string; state: number }>; + + "disputes(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise<[string, number] & { subject: string; state: number }>; + + feeToken(overrides?: CallOverrides): Promise<[string]>; + + "feeToken()"(overrides?: CallOverrides): Promise<[string]>; + + feeAmount(overrides?: CallOverrides): Promise<[BigNumber]>; + + "feeAmount()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + getDisputeFees( + overrides?: CallOverrides + ): Promise<[string, string, BigNumber]>; + + "getDisputeFees()"( + overrides?: CallOverrides + ): Promise<[string, string, BigNumber]>; + + submitEvidence( + _disputeId: BigNumberish, + _submitter: string, + _evidence: BytesLike, + overrides?: Overrides + ): Promise; + + "submitEvidence(uint256,address,bytes)"( + _disputeId: BigNumberish, + _submitter: string, + _evidence: BytesLike, + overrides?: Overrides + ): Promise; + + closeEvidencePeriod( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + "closeEvidencePeriod(uint256)"( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + owner(overrides?: CallOverrides): Promise<[string]>; + + "owner()"(overrides?: CallOverrides): Promise<[string]>; + + createDispute( + _possibleRulings: BigNumberish, + _metadata: BytesLike, + overrides?: Overrides + ): Promise; + + "createDispute(uint256,bytes)"( + _possibleRulings: BigNumberish, + _metadata: BytesLike, + overrides?: Overrides + ): Promise; + + rule( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + "rule(uint256)"( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + currentId(overrides?: CallOverrides): Promise<[BigNumber]>; + + "currentId()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + setOwner(_owner: string, overrides?: Overrides): Promise; + + "setOwner(address)"( + _owner: string, + overrides?: Overrides + ): Promise; + + decideDispute( + _disputeId: BigNumberish, + _state: BigNumberish, + overrides?: Overrides + ): Promise; + + "decideDispute(uint256,uint8)"( + _disputeId: BigNumberish, + _state: BigNumberish, + overrides?: Overrides + ): Promise; + + disputes( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise<[string, number] & { subject: string; state: number }>; + + "disputes(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise<[string, number] & { subject: string; state: number }>; + + feeToken(overrides?: CallOverrides): Promise; + + "feeToken()"(overrides?: CallOverrides): Promise; + + feeAmount(overrides?: CallOverrides): Promise; + + "feeAmount()"(overrides?: CallOverrides): Promise; + + getDisputeFees( + overrides?: CallOverrides + ): Promise<[string, string, BigNumber]>; + + "getDisputeFees()"( + overrides?: CallOverrides + ): Promise<[string, string, BigNumber]>; + + submitEvidence( + _disputeId: BigNumberish, + _submitter: string, + _evidence: BytesLike, + overrides?: Overrides + ): Promise; + + "submitEvidence(uint256,address,bytes)"( + _disputeId: BigNumberish, + _submitter: string, + _evidence: BytesLike, + overrides?: Overrides + ): Promise; + + closeEvidencePeriod( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + "closeEvidencePeriod(uint256)"( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + createDispute( + _possibleRulings: BigNumberish, + _metadata: BytesLike, + overrides?: Overrides + ): Promise; + + "createDispute(uint256,bytes)"( + _possibleRulings: BigNumberish, + _metadata: BytesLike, + overrides?: Overrides + ): Promise; + + rule( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + "rule(uint256)"( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + currentId(overrides?: CallOverrides): Promise; + + "currentId()"(overrides?: CallOverrides): Promise; + + callStatic: { + setOwner(_owner: string, overrides?: CallOverrides): Promise; + + "setOwner(address)"( + _owner: string, + overrides?: CallOverrides + ): Promise; + + decideDispute( + _disputeId: BigNumberish, + _state: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "decideDispute(uint256,uint8)"( + _disputeId: BigNumberish, + _state: BigNumberish, + overrides?: CallOverrides + ): Promise; + + disputes( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise<[string, number] & { subject: string; state: number }>; + + "disputes(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise<[string, number] & { subject: string; state: number }>; + + feeToken(overrides?: CallOverrides): Promise; + + "feeToken()"(overrides?: CallOverrides): Promise; + + feeAmount(overrides?: CallOverrides): Promise; + + "feeAmount()"(overrides?: CallOverrides): Promise; + + getDisputeFees( + overrides?: CallOverrides + ): Promise<[string, string, BigNumber]>; + + "getDisputeFees()"( + overrides?: CallOverrides + ): Promise<[string, string, BigNumber]>; + + submitEvidence( + _disputeId: BigNumberish, + _submitter: string, + _evidence: BytesLike, + overrides?: CallOverrides + ): Promise; + + "submitEvidence(uint256,address,bytes)"( + _disputeId: BigNumberish, + _submitter: string, + _evidence: BytesLike, + overrides?: CallOverrides + ): Promise; + + closeEvidencePeriod( + _disputeId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "closeEvidencePeriod(uint256)"( + _disputeId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + createDispute( + _possibleRulings: BigNumberish, + _metadata: BytesLike, + overrides?: CallOverrides + ): Promise; + + "createDispute(uint256,bytes)"( + _possibleRulings: BigNumberish, + _metadata: BytesLike, + overrides?: CallOverrides + ): Promise; + + rule( + _disputeId: BigNumberish, + overrides?: CallOverrides + ): Promise<[string, BigNumber] & { subject: string; ruling: BigNumber }>; + + "rule(uint256)"( + _disputeId: BigNumberish, + overrides?: CallOverrides + ): Promise<[string, BigNumber] & { subject: string; ruling: BigNumber }>; + + currentId(overrides?: CallOverrides): Promise; + + "currentId()"(overrides?: CallOverrides): Promise; + }; + + filters: {}; + + estimateGas: { + setOwner(_owner: string, overrides?: Overrides): Promise; + + "setOwner(address)"( + _owner: string, + overrides?: Overrides + ): Promise; + + decideDispute( + _disputeId: BigNumberish, + _state: BigNumberish, + overrides?: Overrides + ): Promise; + + "decideDispute(uint256,uint8)"( + _disputeId: BigNumberish, + _state: BigNumberish, + overrides?: Overrides + ): Promise; + + disputes(arg0: BigNumberish, overrides?: CallOverrides): Promise; + + "disputes(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + feeToken(overrides?: CallOverrides): Promise; + + "feeToken()"(overrides?: CallOverrides): Promise; + + feeAmount(overrides?: CallOverrides): Promise; + + "feeAmount()"(overrides?: CallOverrides): Promise; + + getDisputeFees(overrides?: CallOverrides): Promise; + + "getDisputeFees()"(overrides?: CallOverrides): Promise; + + submitEvidence( + _disputeId: BigNumberish, + _submitter: string, + _evidence: BytesLike, + overrides?: Overrides + ): Promise; + + "submitEvidence(uint256,address,bytes)"( + _disputeId: BigNumberish, + _submitter: string, + _evidence: BytesLike, + overrides?: Overrides + ): Promise; + + closeEvidencePeriod( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + "closeEvidencePeriod(uint256)"( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + createDispute( + _possibleRulings: BigNumberish, + _metadata: BytesLike, + overrides?: Overrides + ): Promise; + + "createDispute(uint256,bytes)"( + _possibleRulings: BigNumberish, + _metadata: BytesLike, + overrides?: Overrides + ): Promise; + + rule(_disputeId: BigNumberish, overrides?: Overrides): Promise; + + "rule(uint256)"( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + currentId(overrides?: CallOverrides): Promise; + + "currentId()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + setOwner( + _owner: string, + overrides?: Overrides + ): Promise; + + "setOwner(address)"( + _owner: string, + overrides?: Overrides + ): Promise; + + decideDispute( + _disputeId: BigNumberish, + _state: BigNumberish, + overrides?: Overrides + ): Promise; + + "decideDispute(uint256,uint8)"( + _disputeId: BigNumberish, + _state: BigNumberish, + overrides?: Overrides + ): Promise; + + disputes( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "disputes(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + feeToken(overrides?: CallOverrides): Promise; + + "feeToken()"(overrides?: CallOverrides): Promise; + + feeAmount(overrides?: CallOverrides): Promise; + + "feeAmount()"(overrides?: CallOverrides): Promise; + + getDisputeFees(overrides?: CallOverrides): Promise; + + "getDisputeFees()"( + overrides?: CallOverrides + ): Promise; + + submitEvidence( + _disputeId: BigNumberish, + _submitter: string, + _evidence: BytesLike, + overrides?: Overrides + ): Promise; + + "submitEvidence(uint256,address,bytes)"( + _disputeId: BigNumberish, + _submitter: string, + _evidence: BytesLike, + overrides?: Overrides + ): Promise; + + closeEvidencePeriod( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + "closeEvidencePeriod(uint256)"( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + createDispute( + _possibleRulings: BigNumberish, + _metadata: BytesLike, + overrides?: Overrides + ): Promise; + + "createDispute(uint256,bytes)"( + _possibleRulings: BigNumberish, + _metadata: BytesLike, + overrides?: Overrides + ): Promise; + + rule( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + "rule(uint256)"( + _disputeId: BigNumberish, + overrides?: Overrides + ): Promise; + + currentId(overrides?: CallOverrides): Promise; + + "currentId()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/hardhat/typechain/factories/ERC20__factory.ts b/packages/hardhat/typechain/factories/ERC20__factory.ts index e84eaf14..20a83917 100644 --- a/packages/hardhat/typechain/factories/ERC20__factory.ts +++ b/packages/hardhat/typechain/factories/ERC20__factory.ts @@ -2,37 +2,12 @@ /* tslint:disable */ /* eslint-disable */ -import { Signer } from "ethers"; -import { Provider, TransactionRequest } from "@ethersproject/providers"; -import { Contract, ContractFactory, Overrides } from "@ethersproject/contracts"; +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; import type { ERC20 } from "../ERC20"; -export class ERC20__factory extends ContractFactory { - constructor(signer?: Signer) { - super(_abi, _bytecode, signer); - } - - deploy( - name_: string, - symbol_: string, - overrides?: Overrides - ): Promise { - return super.deploy(name_, symbol_, overrides || {}) as Promise; - } - getDeployTransaction( - name_: string, - symbol_: string, - overrides?: Overrides - ): TransactionRequest { - return super.getDeployTransaction(name_, symbol_, overrides || {}); - } - attach(address: string): ERC20 { - return super.attach(address) as ERC20; - } - connect(signer: Signer): ERC20__factory { - return super.connect(signer) as ERC20__factory; - } +export class ERC20__factory { static connect(address: string, signerOrProvider: Signer | Provider): ERC20 { return new Contract(address, _abi, signerOrProvider) as ERC20; } @@ -40,292 +15,176 @@ export class ERC20__factory extends ContractFactory { const _abi = [ { + constant: false, inputs: [ { - internalType: "string", - name: "name_", - type: "string", - }, - { - internalType: "string", - name: "symbol_", - type: "string", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", + name: "_spender", type: "address", }, { - indexed: false, - internalType: "uint256", - name: "value", + name: "_value", type: "uint256", }, ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, + name: "approve", + outputs: [ { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", + name: "", + type: "bool", }, ], - name: "Transfer", - type: "event", + payable: false, + stateMutability: "nonpayable", + type: "function", }, { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", + constant: true, + inputs: [], + name: "totalSupply", outputs: [ { - internalType: "uint256", name: "", type: "uint256", }, ], + payable: false, stateMutability: "view", type: "function", }, { + constant: false, inputs: [ { - internalType: "address", - name: "spender", + name: "_from", type: "address", }, { - internalType: "uint256", - name: "amount", + name: "_to", + type: "address", + }, + { + name: "_value", type: "uint256", }, ], - name: "approve", + name: "transferFrom", outputs: [ { - internalType: "bool", name: "", type: "bool", }, ], + payable: false, stateMutability: "nonpayable", type: "function", }, { + constant: true, inputs: [ { - internalType: "address", - name: "account", + name: "_who", type: "address", }, ], name: "balanceOf", outputs: [ { - internalType: "uint256", name: "", type: "uint256", }, ], + payable: false, stateMutability: "view", type: "function", }, { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { + constant: false, inputs: [ { - internalType: "address", - name: "spender", + name: "_to", type: "address", }, { - internalType: "uint256", - name: "subtractedValue", + name: "_value", type: "uint256", }, ], - name: "decreaseAllowance", + name: "transfer", outputs: [ { - internalType: "bool", name: "", type: "bool", }, ], + payable: false, stateMutability: "nonpayable", type: "function", }, { + constant: true, inputs: [ { - internalType: "address", - name: "spender", + name: "_owner", type: "address", }, { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", + name: "_spender", + type: "address", }, ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", + name: "allowance", outputs: [ { - internalType: "uint256", name: "", type: "uint256", }, ], + payable: false, stateMutability: "view", type: "function", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "recipient", + indexed: true, + name: "from", type: "address", }, { - internalType: "uint256", - name: "amount", - type: "uint256", + indexed: true, + name: "to", + type: "address", }, - ], - name: "transfer", - outputs: [ { - internalType: "bool", - name: "", - type: "bool", + indexed: false, + name: "value", + type: "uint256", }, ], - stateMutability: "nonpayable", - type: "function", + name: "Transfer", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "address", - name: "sender", + indexed: true, + name: "owner", type: "address", }, { - internalType: "address", - name: "recipient", + indexed: true, + name: "spender", type: "address", }, { - internalType: "uint256", - name: "amount", + indexed: false, + name: "value", type: "uint256", }, ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", + name: "Approval", + type: "event", }, ]; - -const _bytecode = - "0x60806040523480156200001157600080fd5b5060405162000ef538038062000ef58339810160408190526200003491620001c1565b81516200004990600390602085019062000068565b5080516200005f90600490602084019062000068565b5050506200027b565b828054620000769062000228565b90600052602060002090601f0160209004810192826200009a5760008555620000e5565b82601f10620000b557805160ff1916838001178555620000e5565b82800160010185558215620000e5579182015b82811115620000e5578251825591602001919060010190620000c8565b50620000f3929150620000f7565b5090565b5b80821115620000f35760008155600101620000f8565b600082601f8301126200011f578081fd5b81516001600160401b03808211156200013c576200013c62000265565b604051601f8301601f19908116603f0116810190828211818310171562000167576200016762000265565b8160405283815260209250868385880101111562000183578485fd5b8491505b83821015620001a6578582018301518183018401529082019062000187565b83821115620001b757848385830101525b9695505050505050565b60008060408385031215620001d4578182fd5b82516001600160401b0380821115620001eb578384fd5b620001f9868387016200010e565b935060208501519150808211156200020f578283fd5b506200021e858286016200010e565b9150509250929050565b6002810460018216806200023d57607f821691505b602082108114156200025f57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b610c6a806200028b6000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80633950935111610081578063a457c2d71161005b578063a457c2d714610177578063a9059cbb1461018a578063dd62ed3e1461019d576100c9565b8063395093511461014957806370a082311461015c57806395d89b411461016f576100c9565b806318160ddd116100b257806318160ddd1461010c57806323b872dd14610121578063313ce56714610134576100c9565b806306fdde03146100ce578063095ea7b3146100ec575b600080fd5b6100d66101b0565b6040516100e39190610890565b60405180910390f35b6100ff6100fa36600461085c565b610242565b6040516100e39190610885565b61011461025f565b6040516100e39190610b8c565b6100ff61012f366004610821565b610265565b61013c61033f565b6040516100e39190610b95565b6100ff61015736600461085c565b610344565b61011461016a3660046107ce565b6103a5565b6100d66103d1565b6100ff61018536600461085c565b6103e0565b6100ff61019836600461085c565b610480565b6101146101ab3660046107ef565b610494565b6060600380546101bf90610be0565b80601f01602080910402602001604051908101604052809291908181526020018280546101eb90610be0565b80156102385780601f1061020d57610100808354040283529160200191610238565b820191906000526020600020905b81548152906001019060200180831161021b57829003601f168201915b5050505050905090565b600061025661024f6104cc565b84846104d0565b50600192915050565b60025490565b60006102728484846105df565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600160205260408120816102a06104cc565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610320576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161031790610a18565b60405180910390fd5b6103348561032c6104cc565b8584036104d0565b506001949350505050565b601290565b60006102566103516104cc565b84846001600061035f6104cc565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918b16815292529020546103a09190610ba3565b6104d0565b73ffffffffffffffffffffffffffffffffffffffff81166000908152602081905260409020545b919050565b6060600480546101bf90610be0565b600080600160006103ef6104cc565b73ffffffffffffffffffffffffffffffffffffffff90811682526020808301939093526040918201600090812091881681529252902054905082811015610462576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161031790610b2f565b61047661046d6104cc565b858584036104d0565b5060019392505050565b600061025661048d6104cc565b84846105df565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b3390565b73ffffffffffffffffffffffffffffffffffffffff831661051d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161031790610ad2565b73ffffffffffffffffffffffffffffffffffffffff821661056a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103179061095e565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906105d2908590610b8c565b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff831661062c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161031790610a75565b73ffffffffffffffffffffffffffffffffffffffff8216610679576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161031790610901565b6106848383836107a5565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260208190526040902054818110156106e4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610317906109bb565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260208190526040808220858503905591851681529081208054849290610728908490610ba3565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161078c9190610b8c565b60405180910390a361079f8484846107a5565b50505050565b505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146103cc57600080fd5b6000602082840312156107df578081fd5b6107e8826107aa565b9392505050565b60008060408385031215610801578081fd5b61080a836107aa565b9150610818602084016107aa565b90509250929050565b600080600060608486031215610835578081fd5b61083e846107aa565b925061084c602085016107aa565b9150604084013590509250925092565b6000806040838503121561086e578182fd5b610877836107aa565b946020939093013593505050565b901515815260200190565b6000602080835283518082850152825b818110156108bc578581018301518582016040015282016108a0565b818111156108cd5783604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201527f6573730000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560408201527f7373000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260408201527f616c616e63650000000000000000000000000000000000000000000000000000606082015260800190565b60208082526028908201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160408201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460408201527f6472657373000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460408201527f7265737300000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760408201527f207a65726f000000000000000000000000000000000000000000000000000000606082015260800190565b90815260200190565b60ff91909116815260200190565b60008219821115610bdb577f4e487b710000000000000000000000000000000000000000000000000000000081526011600452602481fd5b500190565b600281046001821680610bf457607f821691505b60208210811415610c2e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b5091905056fea26469706673582212203fad0c9ae97dfff72799d04060584bb2c05e52e06a2ba90a3f5ff123d21a5af764736f6c63430008010033"; diff --git a/packages/hardhat/typechain/factories/IArbitrator__factory.ts b/packages/hardhat/typechain/factories/IArbitrator__factory.ts new file mode 100644 index 00000000..4d2c3041 --- /dev/null +++ b/packages/hardhat/typechain/factories/IArbitrator__factory.ts @@ -0,0 +1,124 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { IArbitrator } from "../IArbitrator"; + +export class IArbitrator__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IArbitrator { + return new Contract(address, _abi, signerOrProvider) as IArbitrator; + } +} + +const _abi = [ + { + constant: true, + inputs: [], + name: "getDisputeFees", + outputs: [ + { + name: "recipient", + type: "address", + }, + { + name: "feeToken", + type: "address", + }, + { + name: "feeAmount", + 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: 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", + }, +]; diff --git a/packages/hardhat/typechain/factories/OwnableCeleste__factory.ts b/packages/hardhat/typechain/factories/OwnableCeleste__factory.ts new file mode 100644 index 00000000..57dd4e66 --- /dev/null +++ b/packages/hardhat/typechain/factories/OwnableCeleste__factory.ts @@ -0,0 +1,282 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, BigNumberish } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import { Contract, ContractFactory, Overrides } from "@ethersproject/contracts"; + +import type { OwnableCeleste } from "../OwnableCeleste"; + +export class OwnableCeleste__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + _feeToken: string, + _feeAmount: BigNumberish, + overrides?: Overrides + ): Promise { + return super.deploy( + _feeToken, + _feeAmount, + overrides || {} + ) as Promise; + } + getDeployTransaction( + _feeToken: string, + _feeAmount: BigNumberish, + overrides?: Overrides + ): TransactionRequest { + return super.getDeployTransaction(_feeToken, _feeAmount, overrides || {}); + } + attach(address: string): OwnableCeleste { + return super.attach(address) as OwnableCeleste; + } + connect(signer: Signer): OwnableCeleste__factory { + return super.connect(signer) as OwnableCeleste__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): OwnableCeleste { + return new Contract(address, _abi, signerOrProvider) as OwnableCeleste; + } +} + +const _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", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b50604051604080610e898339810180604052604081101561003057600080fd5b81019080805190602001909291908051906020019092919050505033600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806001819055505050610da5806100e46000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80637cb57c64116100715780637cb57c64146102a75780637e9adccf1461034a5780638da5cb5b14610378578063c13517e1146103c2578063db18af6c14610459578063e00dd161146104ce576100b4565b806313af4035146100b95780631da213f2146100fd578063564a565d14610138578063647846a5146101bb57806369e15404146102055780637b751b9e14610223575b600080fd5b6100fb600480360360208110156100cf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104ec565b005b6101366004803603604081101561011357600080fd5b8101908080359060200190929190803560ff1690602001909291905050506105f3565b005b6101646004803603602081101561014e57600080fd5b8101908080359060200190929190505050610844565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018260048111156101a657fe5b60ff1681526020019250505060405180910390f35b6101c3610895565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61020d6108ba565b6040518082815260200191505060405180910390f35b61022b6108c0565b604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390f35b610348600480360360608110156102bd57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561030457600080fd5b82018360208201111561031657600080fd5b8035906020019184600183028401116401000000008311171561033857600080fd5b90919293919293905050506108f6565b005b6103766004803603602081101561036057600080fd5b81019080803590602001909291905050506108fc565b005b6103806108ff565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610443600480360360408110156103d857600080fd5b8101908080359060200190929190803590602001906401000000008111156103ff57600080fd5b82018360208201111561041157600080fd5b8035906020019184600183028401116401000000008311171561043357600080fd5b9091929391929390505050610925565b6040518082815260200191505060405180910390f35b6104856004803603602081101561046f57600080fd5b8101908080359060200190929190505050610ac9565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390f35b6104d6610c0f565b6040518082815260200191505060405180910390f35b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552523a4e4f545f4f574e45520000000000000000000000000000000000000081525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552523a4e4f545f4f574e45520000000000000000000000000000000000000081525060200191505060405180910390fd5b600060048111156106c357fe5b8160048111156106cf57fe5b141580156106f45750600160048111156106e557fe5b8160048111156106f157fe5b14155b610766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f4552523a4f5554434f4d455f4e4f545f41535349474e41424c4500000000000081525060200191505060405180910390fd5b60006004600084815260200190815260200160002090506001600481111561078a57fe5b8160000160149054906101000a900460ff1660048111156107a757fe5b1461081a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552523a4e4f545f44495350555445440000000000000000000000000000000081525060200191505060405180910390fd5b818160000160146101000a81548160ff0219169083600481111561083a57fe5b0217905550505050565b60046020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060000160149054906101000a900460ff16905082565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b6000806000306000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600154925092509250909192565b50505050565b50565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600254905060405180604001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020016001600481111561096157fe5b8152506004600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548160ff021916908360048111156109e257fe5b0217905550905050600260008154809291906001019190505550610a4c33306001546000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c15909392919063ffffffff16565b610abe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552523a4445504f5349545f4641494c4544000000000000000000000000000081525060200191505060405180910390fd5b809150509392505050565b600080600060046000858152602001908152602001600020905060036004811115610af057fe5b8160000160149054906101000a900460ff166004811115610b0d57fe5b1415610b44578060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660039250925050610c0a565b600480811115610b5057fe5b8160000160149054906101000a900460ff166004811115610b6d57fe5b1415610ba4578060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660049250925050610c0a565b60026004811115610bb157fe5b8160000160149054906101000a900460ff166004811115610bce57fe5b1415610c05578060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660009250925050610c0a565b600080fd5b915091565b60025481565b600060608573ffffffffffffffffffffffffffffffffffffffff166323b872dd905060e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050610d1c8682610d27565b915050949350505050565b6000806040516020818551602087016000895af16000811115610d6d573d60008114610d5a5760208114610d6357610d6b565b60019350610d6b565b600183511493505b505b5050809150509291505056fea165627a7a7230582024ba3bfca91557b0788050b8a32baa06b2ab282acae29c13e5e404d361b01bac0029"; diff --git a/packages/hardhat/typechain/index.ts b/packages/hardhat/typechain/index.ts index b8585574..cfe3ee92 100644 --- a/packages/hardhat/typechain/index.ts +++ b/packages/hardhat/typechain/index.ts @@ -5,6 +5,9 @@ export type { Ownable } from "./Ownable"; export type { ERC20 } from "./ERC20"; export type { IERC20Metadata } from "./IERC20Metadata"; export type { IERC20 } from "./IERC20"; +export type { ERC20 } from "./ERC20"; +export type { IArbitrator } from "./IArbitrator"; +export type { OwnableCeleste } from "./OwnableCeleste"; export type { TokenMock } from "./TokenMock"; export type { Quest } from "./Quest"; export type { QuestFactory } from "./QuestFactory"; @@ -13,6 +16,9 @@ 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 { ERC20__factory } from "./factories/ERC20__factory"; +export { IArbitrator__factory } from "./factories/IArbitrator__factory"; +export { OwnableCeleste__factory } from "./factories/OwnableCeleste__factory"; export { TokenMock__factory } from "./factories/TokenMock__factory"; export { Quest__factory } from "./factories/Quest__factory"; export { QuestFactory__factory } from "./factories/QuestFactory__factory"; diff --git a/packages/react-app/src/contracts/hardhat_contracts.json b/packages/react-app/src/contracts/hardhat_contracts.json index 81a3ff9a..5aba82da 100644 --- a/packages/react-app/src/contracts/hardhat_contracts.json +++ b/packages/react-app/src/contracts/hardhat_contracts.json @@ -3177,7 +3177,7 @@ ] }, "Celeste": { - "address": "0x35bf1cF67b798Cbab26F92dac152f3aCAb64680B", + "address": "0xdCA81bde631EA9A85D12c57150427cAc350E3952", "abi": [ { "constant": false, @@ -3410,19 +3410,19 @@ "type": "constructor" } ], - "transactionHash": "0xa8c92c4a708653bdbd9870b5a0838df2c01c02b5e4384b68fcda38bd53acdf28", + "transactionHash": "0x01a91cceb0f4ed93c5cd49b5a5418b6fb610c95b54856fd66de896bb2161b898", "receipt": { "to": null, "from": "0x91B0d67D3F47A30FBEeB159E67209Ad6cb2cE22E", - "contractAddress": "0x35bf1cF67b798Cbab26F92dac152f3aCAb64680B", + "contractAddress": "0xdCA81bde631EA9A85D12c57150427cAc350E3952", "transactionIndex": 0, - "gasUsed": "712133", + "gasUsed": "874961", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x766d3619f18266f394b53655ecfbaa402c91ebdae4a9cd3423594b4c63cf568f", - "transactionHash": "0xa8c92c4a708653bdbd9870b5a0838df2c01c02b5e4384b68fcda38bd53acdf28", + "blockHash": "0xd775ec049a641eafef795671d7956820febc4a947d8377dbe1454a55d151a4ad", + "transactionHash": "0x01a91cceb0f4ed93c5cd49b5a5418b6fb610c95b54856fd66de896bb2161b898", "logs": [], - "blockNumber": 10675880, - "cumulativeGasUsed": "712133", + "blockNumber": 10676067, + "cumulativeGasUsed": "874961", "status": 1, "byzantium": true }, @@ -3430,7 +3430,53 @@ "0x3050E20FAbE19f8576865811c9F28e85b96Fa4f9", "50000000000000000" ], - "bytecode": "608060405234801561001057600080fd5b50604051604080610b3c8339810180604052604081101561003057600080fd5b508051602090910151600380546001600160a01b03199081163317909155600080546001600160a01b039094169390911692909217909155600155610ac28061007a6000396000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c80637cb57c6411610081578063c13517e11161005b578063c13517e1146102d3578063db18af6c1461034a578063e00dd16114610397576100d4565b80637cb57c641461021c5780637e9adccf146102ae5780638da5cb5b146102cb576100d4565b8063647846a5116100b2578063647846a51461019257806369e15404146101c35780637b751b9e146101dd576100d4565b806313af4035146100d95780631da213f21461010e578063564a565d14610134575b600080fd5b61010c600480360360208110156100ef57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661039f565b005b61010c6004803603604081101561012457600080fd5b508035906020013560ff1661046c565b6101516004803603602081101561014a57600080fd5b503561067d565b60405173ffffffffffffffffffffffffffffffffffffffff831681526020810182600481111561017d57fe5b60ff1681526020019250505060405180910390f35b61019a6106c2565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101cb6106de565b60408051918252519081900360200190f35b6101e56106e4565b6040805173ffffffffffffffffffffffffffffffffffffffff94851681529290931660208301528183015290519081900360600190f35b61010c6004803603606081101561023257600080fd5b81359173ffffffffffffffffffffffffffffffffffffffff6020820135169181019060608101604082013564010000000081111561026f57600080fd5b82018360208201111561028157600080fd5b803590602001918460018302840111640100000000831117156102a357600080fd5b509092509050610706565b61010c600480360360208110156102c457600080fd5b503561070c565b61019a61070f565b6101cb600480360360408110156102e957600080fd5b8135919081019060408101602082013564010000000081111561030b57600080fd5b82018360208201111561031d57600080fd5b8035906020019184600183028401116401000000008311171561033f57600080fd5b50909250905061072b565b6103676004803603602081101561036057600080fd5b503561089d565b6040805173ffffffffffffffffffffffffffffffffffffffff909316835260208301919091528051918290030190f35b6101cb6109a4565b60035473ffffffffffffffffffffffffffffffffffffffff16331461042557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4552523a4e4f545f4f574e455200000000000000000000000000000000000000604482015290519081900360640190fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60035473ffffffffffffffffffffffffffffffffffffffff1633146104f257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4552523a4e4f545f4f574e455200000000000000000000000000000000000000604482015290519081900360640190fd5b600081600481111561050057fe5b1415801561051a5750600181600481111561051757fe5b14155b61058557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4552523a4f5554434f4d455f4e4f545f41535349474e41424c45000000000000604482015290519081900360640190fd5b60008281526004602052604090206001815474010000000000000000000000000000000000000000900460ff1660048111156105bd57fe5b1461062957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4552523a4e4f545f444953505554454400000000000000000000000000000000604482015290519081900360640190fd5b8054829082907fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000083600481111561067357fe5b0217905550505050565b60046020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff81169074010000000000000000000000000000000000000000900460ff1682565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b600054600154309173ffffffffffffffffffffffffffffffffffffffff169192565b50505050565b50565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b600254604080518082019091523381526000919060208101600190526000828152600460208181526040909220835181547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90911617808255928401519092909183917fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690740100000000000000000000000000000000000000009084908111156107e957fe5b0217905550506002805460019081019091555460005461082a925073ffffffffffffffffffffffffffffffffffffffff16903390309063ffffffff6109aa16565b61089557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4552523a4445504f5349545f4641494c45440000000000000000000000000000604482015290519081900360640190fd5b949350505050565b600081815260046020526040812081906003815474010000000000000000000000000000000000000000900460ff1660048111156108d757fe5b14156108ff575473ffffffffffffffffffffffffffffffffffffffff1691506003905061099f565b6004815474010000000000000000000000000000000000000000900460ff16600481111561092957fe5b1415610951575473ffffffffffffffffffffffffffffffffffffffff1691506004905061099f565b6002815474010000000000000000000000000000000000000000900460ff16600481111561097b57fe5b14156100d4575473ffffffffffffffffffffffffffffffffffffffff169150600090505b915091565b60025481565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052600090610a418682610a4b565b9695505050505050565b6000806040516020818551602087016000895af18015610a8c573d8015610a795760208114610a8257610a8a565b60019350610a8a565b600183511493505b505b509094935050505056fea165627a7a72305820eb46537c59c54975546b99405e9e814628d1eb2de172383621b3e7af82b32d7700290000000000000000000000006e7c3bc98bee14302aa2a98b4c5c86b13eb4b6cd00000000000000000000000000000000000000000000000006f05b59d3b20000", + "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", + "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" + } + } + }, "newlyDeployed": false } } diff --git a/packages/react-app/src/services/quest.service.ts b/packages/react-app/src/services/quest.service.ts index 2f48127e..d6897ccd 100644 --- a/packages/react-app/src/services/quest.service.ts +++ b/packages/react-app/src/services/quest.service.ts @@ -608,9 +608,10 @@ export async function fetchChallengeFee(): Promise { const celesteContract = getCelesteContract(); if (!celesteContract) return null; const [, feeToken, feeAmount] = await celesteContract.getDisputeFees(); + const token = await getTokenInfo(feeToken); + if (!token) return null; return toTokenAmountModel({ - ...TOKENS.Honey, - token: feeToken, + ...token, amount: feeAmount, }); }