2354 lines
96 KiB
JSON
2354 lines
96 KiB
JSON
{
|
|
"contractName": "PullPayment",
|
|
"abi": [
|
|
{
|
|
"constant": true,
|
|
"inputs": [],
|
|
"name": "totalPayments",
|
|
"outputs": [
|
|
{
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"inputs": [
|
|
{
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "payments",
|
|
"outputs": [
|
|
{
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"inputs": [],
|
|
"name": "withdrawPayments",
|
|
"outputs": [],
|
|
"payable": false,
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"bytecode": "0x608060405234801561001057600080fd5b5061027e806100206000396000f300608060405260043610610056576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680625b44871461005b5780636103d70b14610086578063e2982c211461009d575b600080fd5b34801561006757600080fd5b506100706100f4565b6040518082815260200191505060405180910390f35b34801561009257600080fd5b5061009b6100fa565b005b3480156100a957600080fd5b506100de600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610221565b6040518082815260200191505060405180910390f35b60015481565b6000803391506000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811415151561015157600080fd5b803073ffffffffffffffffffffffffffffffffffffffff16311015151561017757600080fd5b61018c8160015461023990919063ffffffff16565b60018190555060008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561021c573d6000803e3d6000fd5b505050565b60006020528060005260406000206000915090505481565b600082821115151561024757fe5b8183039050929150505600a165627a7a72305820c4847038e2b436c13153e168fee89b06e2c7e6a89182c90c4fd3418dfd4b41ac0029",
|
|
"deployedBytecode": "0x608060405260043610610056576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680625b44871461005b5780636103d70b14610086578063e2982c211461009d575b600080fd5b34801561006757600080fd5b506100706100f4565b6040518082815260200191505060405180910390f35b34801561009257600080fd5b5061009b6100fa565b005b3480156100a957600080fd5b506100de600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610221565b6040518082815260200191505060405180910390f35b60015481565b6000803391506000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811415151561015157600080fd5b803073ffffffffffffffffffffffffffffffffffffffff16311015151561017757600080fd5b61018c8160015461023990919063ffffffff16565b60018190555060008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561021c573d6000803e3d6000fd5b505050565b60006020528060005260406000206000915090505481565b600082821115151561024757fe5b8183039050929150505600a165627a7a72305820c4847038e2b436c13153e168fee89b06e2c7e6a89182c90c4fd3418dfd4b41ac0029",
|
|
"sourceMap": "230:843:29:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;230:843:29;;;;;;;",
|
|
"deployedSourceMap": "230:843:29:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;333:28;;8:9:-1;5:2;;;30:1;27;20:12;5:2;333:28:29;;;;;;;;;;;;;;;;;;;;;;;433:290;;8:9:-1;5:2;;;30:1;27;20:12;5:2;433:290:29;;;;;;286:43;;8:9:-1;5:2;;;30:1;27;20:12;5:2;286:43:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;333:28;;;;:::o;433:290::-;474:13;506:15;490:10;474:26;;524:8;:15;533:5;524:15;;;;;;;;;;;;;;;;506:33;;565:1;554:7;:12;;546:21;;;;;;;;606:7;589:4;581:21;;;:32;;573:41;;;;;;;;637:26;655:7;637:13;;:17;;:26;;;;:::i;:::-;621:13;:42;;;;687:1;669:8;:15;678:5;669:15;;;;;;;;;;;;;;;:19;;;;695:5;:14;;:23;710:7;695:23;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;695:23:29;433:290;;:::o;286:43::-;;;;;;;;;;;;;;;;;:::o;836:110:6:-;894:7;921:1;916;:6;;909:14;;;;;;940:1;936;:5;929:12;;836:110;;;;:::o",
|
|
"source": "pragma solidity ^0.4.21;\n\n\nimport \"../math/SafeMath.sol\";\n\n\n/**\n * @title PullPayment\n * @dev Base contract supporting async send for pull payments. Inherit from this\n * contract and use asyncSend instead of send or transfer.\n */\ncontract PullPayment {\n using SafeMath for uint256;\n\n mapping(address => uint256) public payments;\n uint256 public totalPayments;\n\n /**\n * @dev Withdraw accumulated balance, called by payee.\n */\n function withdrawPayments() public {\n address payee = msg.sender;\n uint256 payment = payments[payee];\n\n require(payment != 0);\n require(address(this).balance >= payment);\n\n totalPayments = totalPayments.sub(payment);\n payments[payee] = 0;\n\n payee.transfer(payment);\n }\n\n /**\n * @dev Called by the payer to store the sent amount as credit to be pulled.\n * @param dest The destination address of the funds.\n * @param amount The amount to transfer.\n */\n function asyncSend(address dest, uint256 amount) internal {\n payments[dest] = payments[dest].add(amount);\n totalPayments = totalPayments.add(amount);\n }\n}\n",
|
|
"sourcePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/payment/PullPayment.sol",
|
|
"ast": {
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/payment/PullPayment.sol",
|
|
"exportedSymbols": {
|
|
"PullPayment": [
|
|
1912
|
|
]
|
|
},
|
|
"id": 1913,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1826,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.4",
|
|
".21"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:24:29"
|
|
},
|
|
{
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/math/SafeMath.sol",
|
|
"file": "../math/SafeMath.sol",
|
|
"id": 1827,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 1913,
|
|
"sourceUnit": 537,
|
|
"src": "27:30:29",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": "@title PullPayment\n@dev Base contract supporting async send for pull payments. Inherit from this\ncontract and use asyncSend instead of send or transfer.",
|
|
"fullyImplemented": true,
|
|
"id": 1912,
|
|
"linearizedBaseContracts": [
|
|
1912
|
|
],
|
|
"name": "PullPayment",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"id": 1830,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 1828,
|
|
"name": "SafeMath",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 536,
|
|
"src": "261:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeMath_$536",
|
|
"typeString": "library SafeMath"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "255:27:29",
|
|
"typeName": {
|
|
"id": 1829,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "274:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1834,
|
|
"name": "payments",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1912,
|
|
"src": "286:43:29",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
},
|
|
"typeName": {
|
|
"id": 1833,
|
|
"keyType": {
|
|
"id": 1831,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "294:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "286:27:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
},
|
|
"valueType": {
|
|
"id": 1832,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "305:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1836,
|
|
"name": "totalPayments",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1912,
|
|
"src": "333:28:29",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1835,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "333:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1884,
|
|
"nodeType": "Block",
|
|
"src": "468:255:29",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
1840
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1840,
|
|
"name": "payee",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1885,
|
|
"src": "474:13:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1839,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "474:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1843,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1841,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4784,
|
|
"src": "490:3:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 1842,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "490:10:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "474:26:29"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1845
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1845,
|
|
"name": "payment",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1885,
|
|
"src": "506:15:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1844,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "506:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1849,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1846,
|
|
"name": "payments",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1834,
|
|
"src": "524:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 1848,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1847,
|
|
"name": "payee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1840,
|
|
"src": "533:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "524:15:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "506:33:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1853,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1851,
|
|
"name": "payment",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1845,
|
|
"src": "554:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 1852,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "565:1:29",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "554:12:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 1850,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4787,
|
|
4788
|
|
],
|
|
"referencedDeclaration": 4787,
|
|
"src": "546:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 1854,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "546:21:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1855,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "546:21:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1862,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1858,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4871,
|
|
"src": "589:4:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_PullPayment_$1912",
|
|
"typeString": "contract PullPayment"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_PullPayment_$1912",
|
|
"typeString": "contract PullPayment"
|
|
}
|
|
],
|
|
"id": 1857,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "581:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": "address"
|
|
},
|
|
"id": 1859,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "581:13:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 1860,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "balance",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "581:21:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1861,
|
|
"name": "payment",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1845,
|
|
"src": "606:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "581:32:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 1856,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4787,
|
|
4788
|
|
],
|
|
"referencedDeclaration": 4787,
|
|
"src": "573:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 1863,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "573:41:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1864,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "573:41:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1870,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 1865,
|
|
"name": "totalPayments",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1836,
|
|
"src": "621:13:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1868,
|
|
"name": "payment",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1845,
|
|
"src": "655:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1866,
|
|
"name": "totalPayments",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1836,
|
|
"src": "637:13:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1867,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 511,
|
|
"src": "637:17:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1869,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "637:26:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "621:42:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1871,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "621:42:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1876,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1872,
|
|
"name": "payments",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1834,
|
|
"src": "669:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 1874,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1873,
|
|
"name": "payee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1840,
|
|
"src": "678:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "669:15:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 1875,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "687:1:29",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "669:19:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1877,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "669:19:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1881,
|
|
"name": "payment",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1845,
|
|
"src": "710:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1878,
|
|
"name": "payee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1840,
|
|
"src": "695:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 1880,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "transfer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "695:14:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256)"
|
|
}
|
|
},
|
|
"id": 1882,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "695:23:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1883,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "695:23:29"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Withdraw accumulated balance, called by payee.",
|
|
"id": 1885,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [],
|
|
"name": "withdrawPayments",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1837,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "458:2:29"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1838,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "468:0:29"
|
|
},
|
|
"scope": 1912,
|
|
"src": "433:290:29",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1910,
|
|
"nodeType": "Block",
|
|
"src": "970:101:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1901,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1892,
|
|
"name": "payments",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1834,
|
|
"src": "976:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 1894,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1893,
|
|
"name": "dest",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1887,
|
|
"src": "985:4:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "976:14:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1899,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1889,
|
|
"src": "1012:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1895,
|
|
"name": "payments",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1834,
|
|
"src": "993:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 1897,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1896,
|
|
"name": "dest",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1887,
|
|
"src": "1002:4:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "993:14:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1898,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 535,
|
|
"src": "993:18:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1900,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "993:26:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "976:43:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1902,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "976:43:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1908,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 1903,
|
|
"name": "totalPayments",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1836,
|
|
"src": "1025:13:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1906,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1889,
|
|
"src": "1059:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1904,
|
|
"name": "totalPayments",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1836,
|
|
"src": "1041:13:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1905,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 535,
|
|
"src": "1041:17:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1907,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1041:25:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1025:41:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1909,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1025:41:29"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Called by the payer to store the sent amount as credit to be pulled.\n@param dest The destination address of the funds.\n@param amount The amount to transfer.",
|
|
"id": 1911,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [],
|
|
"name": "asyncSend",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1890,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1887,
|
|
"name": "dest",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1911,
|
|
"src": "931:12:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1886,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "931:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1889,
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1911,
|
|
"src": "945:14:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1888,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "945:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "930:30:29"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1891,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "970:0:29"
|
|
},
|
|
"scope": 1912,
|
|
"src": "912:159:29",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 1913,
|
|
"src": "230:843:29"
|
|
}
|
|
],
|
|
"src": "0:1074:29"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/payment/PullPayment.sol",
|
|
"exportedSymbols": {
|
|
"PullPayment": [
|
|
1912
|
|
]
|
|
},
|
|
"id": 1913,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1826,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.4",
|
|
".21"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:24:29"
|
|
},
|
|
{
|
|
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/math/SafeMath.sol",
|
|
"file": "../math/SafeMath.sol",
|
|
"id": 1827,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 1913,
|
|
"sourceUnit": 537,
|
|
"src": "27:30:29",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": "@title PullPayment\n@dev Base contract supporting async send for pull payments. Inherit from this\ncontract and use asyncSend instead of send or transfer.",
|
|
"fullyImplemented": true,
|
|
"id": 1912,
|
|
"linearizedBaseContracts": [
|
|
1912
|
|
],
|
|
"name": "PullPayment",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"id": 1830,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 1828,
|
|
"name": "SafeMath",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 536,
|
|
"src": "261:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeMath_$536",
|
|
"typeString": "library SafeMath"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "255:27:29",
|
|
"typeName": {
|
|
"id": 1829,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "274:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1834,
|
|
"name": "payments",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1912,
|
|
"src": "286:43:29",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
},
|
|
"typeName": {
|
|
"id": 1833,
|
|
"keyType": {
|
|
"id": 1831,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "294:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "286:27:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
},
|
|
"valueType": {
|
|
"id": 1832,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "305:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1836,
|
|
"name": "totalPayments",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1912,
|
|
"src": "333:28:29",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1835,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "333:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1884,
|
|
"nodeType": "Block",
|
|
"src": "468:255:29",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
1840
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1840,
|
|
"name": "payee",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1885,
|
|
"src": "474:13:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1839,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "474:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1843,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1841,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4784,
|
|
"src": "490:3:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 1842,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "490:10:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "474:26:29"
|
|
},
|
|
{
|
|
"assignments": [
|
|
1845
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1845,
|
|
"name": "payment",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1885,
|
|
"src": "506:15:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1844,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "506:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1849,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1846,
|
|
"name": "payments",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1834,
|
|
"src": "524:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 1848,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1847,
|
|
"name": "payee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1840,
|
|
"src": "533:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "524:15:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "506:33:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1853,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1851,
|
|
"name": "payment",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1845,
|
|
"src": "554:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 1852,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "565:1:29",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "554:12:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 1850,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4787,
|
|
4788
|
|
],
|
|
"referencedDeclaration": 4787,
|
|
"src": "546:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 1854,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "546:21:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1855,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "546:21:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1862,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1858,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4871,
|
|
"src": "589:4:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_PullPayment_$1912",
|
|
"typeString": "contract PullPayment"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_PullPayment_$1912",
|
|
"typeString": "contract PullPayment"
|
|
}
|
|
],
|
|
"id": 1857,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "581:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": "address"
|
|
},
|
|
"id": 1859,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "581:13:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 1860,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "balance",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "581:21:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1861,
|
|
"name": "payment",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1845,
|
|
"src": "606:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "581:32:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 1856,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4787,
|
|
4788
|
|
],
|
|
"referencedDeclaration": 4787,
|
|
"src": "573:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 1863,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "573:41:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1864,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "573:41:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1870,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 1865,
|
|
"name": "totalPayments",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1836,
|
|
"src": "621:13:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1868,
|
|
"name": "payment",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1845,
|
|
"src": "655:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1866,
|
|
"name": "totalPayments",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1836,
|
|
"src": "637:13:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1867,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sub",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 511,
|
|
"src": "637:17:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1869,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "637:26:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "621:42:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1871,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "621:42:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1876,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1872,
|
|
"name": "payments",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1834,
|
|
"src": "669:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 1874,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1873,
|
|
"name": "payee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1840,
|
|
"src": "678:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "669:15:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 1875,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "687:1:29",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "669:19:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1877,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "669:19:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1881,
|
|
"name": "payment",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1845,
|
|
"src": "710:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1878,
|
|
"name": "payee",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1840,
|
|
"src": "695:5:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 1880,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "transfer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "695:14:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$",
|
|
"typeString": "function (uint256)"
|
|
}
|
|
},
|
|
"id": 1882,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "695:23:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1883,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "695:23:29"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Withdraw accumulated balance, called by payee.",
|
|
"id": 1885,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [],
|
|
"name": "withdrawPayments",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1837,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "458:2:29"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1838,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "468:0:29"
|
|
},
|
|
"scope": 1912,
|
|
"src": "433:290:29",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1910,
|
|
"nodeType": "Block",
|
|
"src": "970:101:29",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1901,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1892,
|
|
"name": "payments",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1834,
|
|
"src": "976:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 1894,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1893,
|
|
"name": "dest",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1887,
|
|
"src": "985:4:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"nodeType": "IndexAccess",
|
|
"src": "976:14:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1899,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1889,
|
|
"src": "1012:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1895,
|
|
"name": "payments",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1834,
|
|
"src": "993:8:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
|
|
"typeString": "mapping(address => uint256)"
|
|
}
|
|
},
|
|
"id": 1897,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1896,
|
|
"name": "dest",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1887,
|
|
"src": "1002:4:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "993:14:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1898,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 535,
|
|
"src": "993:18:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1900,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "993:26:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "976:43:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1902,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "976:43:29"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1908,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 1903,
|
|
"name": "totalPayments",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1836,
|
|
"src": "1025:13:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1906,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1889,
|
|
"src": "1059:6:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1904,
|
|
"name": "totalPayments",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1836,
|
|
"src": "1041:13:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1905,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "add",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 535,
|
|
"src": "1041:17:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
|
|
"typeString": "function (uint256,uint256) pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1907,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1041:25:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1025:41:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1909,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1025:41:29"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Called by the payer to store the sent amount as credit to be pulled.\n@param dest The destination address of the funds.\n@param amount The amount to transfer.",
|
|
"id": 1911,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [],
|
|
"name": "asyncSend",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1890,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1887,
|
|
"name": "dest",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1911,
|
|
"src": "931:12:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1886,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "931:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1889,
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1911,
|
|
"src": "945:14:29",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1888,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "945:7:29",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "930:30:29"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1891,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "970:0:29"
|
|
},
|
|
"scope": 1912,
|
|
"src": "912:159:29",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 1913,
|
|
"src": "230:843:29"
|
|
}
|
|
],
|
|
"src": "0:1074:29"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "2.0.1",
|
|
"updatedAt": "2018-08-23T14:35:50.633Z"
|
|
} |