Files
openzeppelin-contracts/build/contracts/PullPaymentMock.json
2018-08-23 11:45:35 -03:00

618 lines
24 KiB
JSON

{
"contractName": "PullPaymentMock",
"abi": [
{
"constant": true,
"inputs": [],
"name": "totalPayments",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "withdrawPayments",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "address"
}
],
"name": "payments",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"payable": true,
"stateMutability": "payable",
"type": "constructor"
},
{
"constant": false,
"inputs": [
{
"name": "dest",
"type": "address"
},
{
"name": "amount",
"type": "uint256"
}
],
"name": "callSend",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x60806040526103b2806100136000396000f300608060405260043610610061576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680625b4487146100665780636103d70b14610091578063752c5628146100a8578063e2982c21146100f5575b600080fd5b34801561007257600080fd5b5061007b61014c565b6040518082815260200191505060405180910390f35b34801561009d57600080fd5b506100a6610152565b005b3480156100b457600080fd5b506100f3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610279565b005b34801561010157600080fd5b50610136600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610287565b6040518082815260200191505060405180910390f35b60015481565b6000803391506000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600081141515156101a957600080fd5b803073ffffffffffffffffffffffffffffffffffffffff1631101515156101cf57600080fd5b6101e48160015461029f90919063ffffffff16565b60018190555060008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610274573d6000803e3d6000fd5b505050565b61028382826102b8565b5050565b60006020528060005260406000206000915090505481565b60008282111515156102ad57fe5b818303905092915050565b610309816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461036a90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506103608160015461036a90919063ffffffff16565b6001819055505050565b6000818301905082811015151561037d57fe5b809050929150505600a165627a7a72305820e2a8e36df17b8615bad45df5353183f1b6fd6b883238b52b016d2e2aa83096a50029",
"deployedBytecode": "0x608060405260043610610061576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680625b4487146100665780636103d70b14610091578063752c5628146100a8578063e2982c21146100f5575b600080fd5b34801561007257600080fd5b5061007b61014c565b6040518082815260200191505060405180910390f35b34801561009d57600080fd5b506100a6610152565b005b3480156100b457600080fd5b506100f3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610279565b005b34801561010157600080fd5b50610136600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610287565b6040518082815260200191505060405180910390f35b60015481565b6000803391506000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600081141515156101a957600080fd5b803073ffffffffffffffffffffffffffffffffffffffff1631101515156101cf57600080fd5b6101e48160015461029f90919063ffffffff16565b60018190555060008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610274573d6000803e3d6000fd5b505050565b61028382826102b8565b5050565b60006020528060005260406000206000915090505481565b60008282111515156102ad57fe5b818303905092915050565b610309816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461036a90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506103608160015461036a90919063ffffffff16565b6001819055505050565b6000818301905082811015151561037d57fe5b809050929150505600a165627a7a72305820e2a8e36df17b8615bad45df5353183f1b6fd6b883238b52b016d2e2aa83096a50029",
"sourceMap": "98:230:19:-;;;;;;;;;",
"deployedSourceMap": "98:230:19:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;333:28:29;;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;;;;;;236:89:19;;8:9:-1;5:2;;;30:1;27;20:12;5:2;236:89:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;286:43:29;;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;236:89:19:-;297:23;307:4;313:6;297:9;:23::i;:::-;236:89;;:::o;286:43:29:-;;;;;;;;;;;;;;;;;:::o;836:110:6:-;894:7;921:1;916;:6;;909:14;;;;;;940:1;936;:5;929:12;;836:110;;;;:::o;912:159:29:-;993:26;1012:6;993:8;:14;1002:4;993:14;;;;;;;;;;;;;;;;:18;;:26;;;;:::i;:::-;976:8;:14;985:4;976:14;;;;;;;;;;;;;;;:43;;;;1041:25;1059:6;1041:13;;:17;;:25;;;;:::i;:::-;1025:13;:41;;;;912:159;;:::o;1008:123:6:-;1066:9;1091:1;1087;:5;1083:9;;1110:1;1105;:6;;1098:14;;;;;;1125:1;1118:8;;1008:123;;;;:::o",
"source": "pragma solidity ^0.4.21;\n\n\nimport \"../payment/PullPayment.sol\";\n\n\n// mock class using PullPayment\ncontract PullPaymentMock is PullPayment {\n\n function PullPaymentMock() public payable { }\n\n // test helper function to call asyncSend\n function callSend(address dest, uint256 amount) public {\n asyncSend(dest, amount);\n }\n\n}\n",
"sourcePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/mocks/PullPaymentMock.sol",
"ast": {
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/mocks/PullPaymentMock.sol",
"exportedSymbols": {
"PullPaymentMock": [
1051
]
},
"id": 1052,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1030,
"literals": [
"solidity",
"^",
"0.4",
".21"
],
"nodeType": "PragmaDirective",
"src": "0:24:19"
},
{
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/payment/PullPayment.sol",
"file": "../payment/PullPayment.sol",
"id": 1031,
"nodeType": "ImportDirective",
"scope": 1052,
"sourceUnit": 1913,
"src": "27:36:19",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1032,
"name": "PullPayment",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1912,
"src": "126:11:19",
"typeDescriptions": {
"typeIdentifier": "t_contract$_PullPayment_$1912",
"typeString": "contract PullPayment"
}
},
"id": 1033,
"nodeType": "InheritanceSpecifier",
"src": "126:11:19"
}
],
"contractDependencies": [
1912
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 1051,
"linearizedBaseContracts": [
1051,
1912
],
"name": "PullPaymentMock",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 1036,
"nodeType": "Block",
"src": "185:3:19",
"statements": []
},
"documentation": null,
"id": 1037,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "PullPaymentMock",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1034,
"nodeType": "ParameterList",
"parameters": [],
"src": "167:2:19"
},
"payable": true,
"returnParameters": {
"id": 1035,
"nodeType": "ParameterList",
"parameters": [],
"src": "185:0:19"
},
"scope": 1051,
"src": "143:45:19",
"stateMutability": "payable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1049,
"nodeType": "Block",
"src": "291:34:19",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1045,
"name": "dest",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1039,
"src": "307:4:19",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1046,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1041,
"src": "313:6:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1044,
"name": "asyncSend",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1911,
"src": "297:9:19",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 1047,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "297:23:19",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1048,
"nodeType": "ExpressionStatement",
"src": "297:23:19"
}
]
},
"documentation": null,
"id": 1050,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "callSend",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1042,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1039,
"name": "dest",
"nodeType": "VariableDeclaration",
"scope": 1050,
"src": "254:12:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1038,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "254:7:19",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1041,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 1050,
"src": "268:14:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1040,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "268:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "253:30:19"
},
"payable": false,
"returnParameters": {
"id": 1043,
"nodeType": "ParameterList",
"parameters": [],
"src": "291:0:19"
},
"scope": 1051,
"src": "236:89:19",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 1052,
"src": "98:230:19"
}
],
"src": "0:329:19"
},
"legacyAST": {
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/mocks/PullPaymentMock.sol",
"exportedSymbols": {
"PullPaymentMock": [
1051
]
},
"id": 1052,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1030,
"literals": [
"solidity",
"^",
"0.4",
".21"
],
"nodeType": "PragmaDirective",
"src": "0:24:19"
},
{
"absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/payment/PullPayment.sol",
"file": "../payment/PullPayment.sol",
"id": 1031,
"nodeType": "ImportDirective",
"scope": 1052,
"sourceUnit": 1913,
"src": "27:36:19",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1032,
"name": "PullPayment",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1912,
"src": "126:11:19",
"typeDescriptions": {
"typeIdentifier": "t_contract$_PullPayment_$1912",
"typeString": "contract PullPayment"
}
},
"id": 1033,
"nodeType": "InheritanceSpecifier",
"src": "126:11:19"
}
],
"contractDependencies": [
1912
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 1051,
"linearizedBaseContracts": [
1051,
1912
],
"name": "PullPaymentMock",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 1036,
"nodeType": "Block",
"src": "185:3:19",
"statements": []
},
"documentation": null,
"id": 1037,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "PullPaymentMock",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1034,
"nodeType": "ParameterList",
"parameters": [],
"src": "167:2:19"
},
"payable": true,
"returnParameters": {
"id": 1035,
"nodeType": "ParameterList",
"parameters": [],
"src": "185:0:19"
},
"scope": 1051,
"src": "143:45:19",
"stateMutability": "payable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1049,
"nodeType": "Block",
"src": "291:34:19",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1045,
"name": "dest",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1039,
"src": "307:4:19",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1046,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1041,
"src": "313:6:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1044,
"name": "asyncSend",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1911,
"src": "297:9:19",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 1047,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "297:23:19",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1048,
"nodeType": "ExpressionStatement",
"src": "297:23:19"
}
]
},
"documentation": null,
"id": 1050,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "callSend",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1042,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1039,
"name": "dest",
"nodeType": "VariableDeclaration",
"scope": 1050,
"src": "254:12:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1038,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "254:7:19",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1041,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 1050,
"src": "268:14:19",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1040,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "268:7:19",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "253:30:19"
},
"payable": false,
"returnParameters": {
"id": 1043,
"nodeType": "ParameterList",
"parameters": [],
"src": "291:0:19"
},
"scope": 1051,
"src": "236:89:19",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 1052,
"src": "98:230:19"
}
],
"src": "0:329:19"
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {},
"schemaVersion": "2.0.1",
"updatedAt": "2018-08-23T14:35:50.622Z"
}