@realitio/realitio-contracts
Version:
Collection of smart contracts for the Realitio fact verification platform
1,433 lines (1,432 loc) • 92.2 kB
JSON
{
"contractName": "RegisteredWalletArbitrator",
"abi": [
{
"constant": true,
"inputs": [],
"name": "realitycheck",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "fee",
"type": "uint256"
}
],
"name": "setDisputeFee",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "metadata",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "question_id",
"type": "bytes32"
},
{
"name": "fee",
"type": "uint256"
}
],
"name": "setCustomDisputeFee",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "fee",
"type": "uint256"
}
],
"name": "setQuestionFee",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "addr",
"type": "address"
}
],
"name": "withdraw",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "foreignProxy",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "addr",
"type": "address"
}
],
"name": "setRealitio",
"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": "_token",
"type": "address"
},
{
"name": "addr",
"type": "address"
}
],
"name": "withdrawERC20",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "foreignChainId",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "bytes32"
}
],
"name": "arbitration_bounties",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "question_id",
"type": "bytes32"
}
],
"name": "getDisputeFee",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "question_id",
"type": "bytes32"
},
{
"name": "max_previous",
"type": "uint256"
}
],
"name": "requestArbitration",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": true,
"stateMutability": "payable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "realitio",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "question_id",
"type": "bytes32"
},
{
"name": "answer",
"type": "bytes32"
},
{
"name": "payee_if_wrong",
"type": "address"
},
{
"name": "last_history_hash",
"type": "bytes32"
},
{
"name": "last_answer_or_commitment_id",
"type": "bytes32"
},
{
"name": "last_answerer",
"type": "address"
}
],
"name": "assignWinnerAndSubmitAnswerByArbitrator",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_metadata",
"type": "string"
}
],
"name": "setMetaData",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "question_id",
"type": "bytes32"
}
],
"name": "cancelArbitration",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "question_id",
"type": "bytes32"
},
{
"name": "answer",
"type": "bytes32"
},
{
"name": "answerer",
"type": "address"
}
],
"name": "submitAnswerByArbitrator",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"payable": true,
"stateMutability": "payable",
"type": "fallback"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "question_id",
"type": "bytes32"
},
{
"indexed": false,
"name": "fee_paid",
"type": "uint256"
},
{
"indexed": false,
"name": "requester",
"type": "address"
},
{
"indexed": false,
"name": "remaining",
"type": "uint256"
}
],
"name": "LogRequestArbitration",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "realitio",
"type": "address"
}
],
"name": "LogSetRealitio",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "fee",
"type": "uint256"
}
],
"name": "LogSetQuestionFee",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "fee",
"type": "uint256"
}
],
"name": "LogSetDisputeFee",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "question_id",
"type": "bytes32"
},
{
"indexed": false,
"name": "fee",
"type": "uint256"
}
],
"name": "LogSetCustomDisputeFee",
"type": "event"
},
{
"constant": false,
"inputs": [],
"name": "callWithdraw",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_token",
"type": "address"
}
],
"name": "withdrawToRegisteredWalletERC20",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "withdrawToRegisteredWallet",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "addr",
"type": "address"
}
],
"name": "updateRegisteredWallet",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"sourceMap": "",
"deployedSourceMap": "",
"source": "pragma solidity ^0.4.25;\n\nimport './Arbitrator.sol';\nimport './IERC20.sol';\n\n/*\nThis contract extends the standard Arbitrator contract to make it possible to make routine fund withdrawals to an address pre-registered by the owner without actually being the owner.\n\nWe do this to facilitate controlling Arbitrator contracts using multisig wallets, which should require multiple sign-offs to allow validation and fee-settings tasks, but users should be able to withdraw their own share of the funds without anyone else's permission. This can be done in combination with our SplitterWallet contract.\n*/\n\ncontract RegisteredWalletArbitrator is Arbitrator {\n\n address registered_wallet;\n\n /// @notice Withdraw any accumulated question fees from the specified address into this contract\n /// @dev Funds can then be liberated from this contract with our withdraw() function\n /// @dev Usually the arbitrator calls this, but if someone else does that's OK too\n function callWithdraw() \n public {\n realitio.withdraw(); \n }\n\n /// @notice Withdraw money from the arbitrator contract to our registered wallet\n function withdrawToRegisteredWalletERC20(IERC20 _token)\n external {\n require(registered_wallet != 0x0, \"No wallet is registered\");\n uint256 bal = _token.balanceOf(address(this));\n _token.transfer(registered_wallet, bal);\n }\n\n /// @notice Withdraw money from the arbitrator contract to our registered wallet\n function withdrawToRegisteredWallet()\n external {\n require(registered_wallet != 0x0, \"No wallet is registered\");\n registered_wallet.transfer(address(this).balance);\n }\n\n /// @notice Change the address of our registered wallet\n /// @param addr The address of the new wallet\n /// @dev Set to 0x0 to not use the registered wallet\n function updateRegisteredWallet(address addr) \n onlyOwner\n external {\n registered_wallet= addr;\n }\n\n}\n",
"sourcePath": "/home/ed/working/realitio-contracts/truffle/contracts/RegisteredWalletArbitrator.sol",
"ast": {
"absolutePath": "/home/ed/working/realitio-contracts/truffle/contracts/RegisteredWalletArbitrator.sol",
"exportedSymbols": {
"RegisteredWalletArbitrator": [
9380
]
},
"id": 9381,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 9303,
"literals": [
"solidity",
"^",
"0.4",
".25"
],
"nodeType": "PragmaDirective",
"src": "0:24:18"
},
{
"absolutePath": "/home/ed/working/realitio-contracts/truffle/contracts/Arbitrator.sol",
"file": "./Arbitrator.sol",
"id": 9304,
"nodeType": "ImportDirective",
"scope": 9381,
"sourceUnit": 391,
"src": "26:26:18",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/ed/working/realitio-contracts/truffle/contracts/IERC20.sol",
"file": "./IERC20.sol",
"id": 9305,
"nodeType": "ImportDirective",
"scope": 9381,
"sourceUnit": 1353,
"src": "53:22:18",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 9306,
"name": "Arbitrator",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 390,
"src": "640:10:18",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Arbitrator_$390",
"typeString": "contract Arbitrator"
}
},
"id": 9307,
"nodeType": "InheritanceSpecifier",
"src": "640:10:18"
}
],
"contractDependencies": [
390,
1365,
1270,
2748
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": false,
"id": 9380,
"linearizedBaseContracts": [
9380,
390,
1270,
2748,
1365
],
"name": "RegisteredWalletArbitrator",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 9309,
"name": "registered_wallet",
"nodeType": "VariableDeclaration",
"scope": 9380,
"src": "658:25:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 9308,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "658:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"body": {
"id": 9317,
"nodeType": "Block",
"src": "1003:37:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 9312,
"name": "realitio",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 11,
"src": "1013:8:18",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IRealitio_$1710",
"typeString": "contract IRealitio"
}
},
"id": 9314,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "withdraw",
"nodeType": "MemberAccess",
"referencedDeclaration": 1444,
"src": "1013:17:18",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$__$returns$__$",
"typeString": "function () external"
}
},
"id": 9315,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1013:19:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 9316,
"nodeType": "ExpressionStatement",
"src": "1013:19:18"
}
]
},
"documentation": "@notice Withdraw any accumulated question fees from the specified address into this contract\n @dev Funds can then be liberated from this contract with our withdraw() function\n @dev Usually the arbitrator calls this, but if someone else does that's OK too",
"id": 9318,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "callWithdraw",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 9310,
"nodeType": "ParameterList",
"parameters": [],
"src": "988:2:18"
},
"payable": false,
"returnParameters": {
"id": 9311,
"nodeType": "ParameterList",
"parameters": [],
"src": "1003:0:18"
},
"scope": 9380,
"src": "967:73:18",
"stateMutability": "nonpayable",
"superFunction": 377,
"visibility": "public"
},
{
"body": {
"id": 9346,
"nodeType": "Block",
"src": "1200:181:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 9326,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 9324,
"name": "registered_wallet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9309,
"src": "1218:17:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "307830",
"id": 9325,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1239:3:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0x0"
},
"src": "1218:24:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4e6f2077616c6c65742069732072656769737465726564",
"id": 9327,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1244:25:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_52303f69f2ddb51b51e18405a362fe1c5b551cded2fae79654e117352942dc4e",
"typeString": "literal_string \"No wallet is registered\""
},
"value": "No wallet is registered"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_52303f69f2ddb51b51e18405a362fe1c5b551cded2fae79654e117352942dc4e",
"typeString": "literal_string \"No wallet is registered\""
}
],
"id": 9323,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9706,
9707
],
"referencedDeclaration": 9707,
"src": "1210:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 9328,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1210:60:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 9329,
"nodeType": "ExpressionStatement",
"src": "1210:60:18"
},
{
"assignments": [
9331
],
"declarations": [
{
"constant": false,
"id": 9331,
"name": "bal",
"nodeType": "VariableDeclaration",
"scope": 9347,
"src": "1280:11:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 9330,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1280:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 9338,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 9335,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9756,
"src": "1319:4:18",
"typeDescriptions": {
"typeIdentifier": "t_contract$_RegisteredWalletArbitrator_$9380",
"typeString": "contract RegisteredWalletArbitrator"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_RegisteredWalletArbitrator_$9380",
"typeString": "contract RegisteredWalletArbitrator"
}
],
"id": 9334,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1311:7:18",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 9336,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1311:13:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"id": 9332,
"name": "_token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9320,
"src": "1294:6:18",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$1352",
"typeString": "contract IERC20"
}
},
"id": 9333,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "balanceOf",
"nodeType": "MemberAccess",
"referencedDeclaration": 1297,
"src": "1294:16:18",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
"typeString": "function (address) view external returns (uint256)"
}
},
"id": 9337,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1294:31:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1280:45:18"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 9342,
"name": "registered_wallet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9309,
"src": "1351:17:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 9343,
"name": "bal",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9331,
"src": "1370:3:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 9339,
"name": "_token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9320,
"src": "1335:6:18",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$1352",
"typeString": "contract IERC20"
}
},
"id": 9341,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "transfer",
"nodeType": "MemberAccess",
"referencedDeclaration": 1315,
"src": "1335:15:18",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (address,uint256) external returns (bool)"
}
},
"id": 9344,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1335:39:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 9345,
"nodeType": "ExpressionStatement",
"src": "1335:39:18"
}
]
},
"documentation": "@notice Withdraw money from the arbitrator contract to our registered wallet",
"id": 9347,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "withdrawToRegisteredWalletERC20",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 9321,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 9320,
"name": "_token",
"nodeType": "VariableDeclaration",
"scope": 9347,
"src": "1172:13:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$1352",
"typeString": "contract IERC20"
},
"typeName": {
"contractScope": null,
"id": 9319,
"name": "IERC20",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1352,
"src": "1172:6:18",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$1352",
"typeString": "contract IERC20"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1171:15:18"
},
"payable": false,
"returnParameters": {
"id": 9322,
"nodeType": "ParameterList",
"parameters": [],
"src": "1200:0:18"
},
"scope": 9380,
"src": "1131:250:18",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 9366,
"nodeType": "Block",
"src": "1523:136:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 9353,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 9351,
"name": "registered_wallet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9309,
"src": "1541:17:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "307830",
"id": 9352,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1562:3:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0x0"
},
"src": "1541:24:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4e6f2077616c6c65742069732072656769737465726564",
"id": 9354,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1567:25:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_52303f69f2ddb51b51e18405a362fe1c5b551cded2fae79654e117352942dc4e",
"typeString": "literal_string \"No wallet is registered\""
},
"value": "No wallet is registered"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_52303f69f2ddb51b51e18405a362fe1c5b551cded2fae79654e117352942dc4e",
"typeString": "literal_string \"No wallet is registered\""
}
],
"id": 9350,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9706,
9707
],
"referencedDeclaration": 9707,
"src": "1533:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 9355,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1533:60:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 9356,
"nodeType": "ExpressionStatement",
"src": "1533:60:18"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 9361,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9756,
"src": "1638:4:18",
"typeDescriptions": {
"typeIdentifier": "t_contract$_RegisteredWalletArbitrator_$9380",
"typeString": "contract RegisteredWalletArbitrator"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_RegisteredWalletArbitrator_$9380",
"typeString": "contract RegisteredWalletArbitrator"
}
],
"id": 9360,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1630:7:18",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 9362,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1630:13:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 9363,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1630:21:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 9357,
"name": "registered_wallet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9309,
"src": "1603:17:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 9359,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "transfer",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1603:26:18",
"typeDescriptions": {
"typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 9364,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1603:49:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 9365,
"nodeType": "ExpressionStatement",
"src": "1603:49:18"
}
]
},
"documentation": "@notice Withdraw money from the arbitrator contract to our registered wallet",
"id": 9367,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "withdrawToRegisteredWallet",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 9348,
"nodeType": "ParameterList",
"parameters": [],
"src": "1507:2:18"
},
"payable": false,
"returnParameters": {
"id": 9349,
"nodeType": "ParameterList",
"parameters": [],
"src": "1523:0:18"
},
"scope": 9380,
"src": "1472:187:18",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 9378,
"nodeType": "Block",
"src": "1910:40:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 9376,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 9374,
"name": "registered_wallet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9309,
"src": "1920:17:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 9375,
"name": "addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9369,
"src": "1939:4:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1920:23:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 9377,
"nodeType": "ExpressionStatement",
"src": "1920:23:18"
}
]
},
"documentation": "@notice Change the address of our registered wallet\n @param addr The address of the new wallet\n @dev Set to 0x0 to not use the registered wallet",
"id": 9379,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 9372,
"modifierName": {
"argumentTypes": null,
"id": 9371,
"name": "onlyOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2735,
"src": "1887:9:18",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "1887:9:18"
}