Last active
October 24, 2019 21:48
-
-
Save anegg0/443212134c76d019e41a72bfbd899126 to your computer and use it in GitHub Desktop.
Json representation of a subcurrency smart contract
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"contractName": "Coin", | |
"abi": [ | |
{ | |
"constant": true, | |
"inputs": [], | |
"name": "minter", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"payable": false, | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"constant": true, | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"name": "balances", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"payable": false, | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"constant": false, | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "receiver", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "amount", | |
"type": "uint256" | |
} | |
], | |
"name": "mint", | |
"outputs": [], | |
"payable": false, | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"constant": false, | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "receiver", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "amount", | |
"type": "uint256" | |
} | |
], | |
"name": "send", | |
"outputs": [], | |
"payable": false, | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"payable": false, | |
"stateMutability": "nonpayable", | |
"type": "constructor" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "address", | |
"name": "from", | |
"type": "address" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "address", | |
"name": "to", | |
"type": "address" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "amount", | |
"type": "uint256" | |
} | |
], | |
"name": "Sent", | |
"type": "event" | |
} | |
], | |
"metadata": "{\"compiler\":{\"version\":\"0.5.11+commit.c082d0b4\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"minter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"send\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Sent\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/anegg0/Dev/web3js/contracts/SubCurrency.sol\":\"Coin\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/anegg0/Dev/web3js/contracts/SubCurrency.sol\":{\"keccak256\":\"0xf9725a0f0d5ac3eec2c630abb33ab697e8ee7af9e4783f690e2deb98f521eb89\",\"urls\":[\"bzz-raw://bfb774270051fe5725f3ef484cf9b2a449b28df64d80a2ed52b95dfc48b2f468\",\"dweb:/ipfs/QmWnuBRZrp9PBwgwub9vAQpQxtC8i7nwzD1iG1B8ueNsni\"]}},\"version\":1}", | |
"bytecode": "608060405234801561001057600080fd5b50600080546001600160a01b03191633179055610288806100326000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c8063075461721461005157806327e235e31461007557806340c10f19146100ad578063d0679d34146100db575b600080fd5b610059610107565b604080516001600160a01b039092168252519081900360200190f35b61009b6004803603602081101561008b57600080fd5b50356001600160a01b0316610116565b60408051918252519081900360200190f35b6100d9600480360360408110156100c357600080fd5b506001600160a01b038135169060200135610128565b005b6100d9600480360360408110156100f157600080fd5b506001600160a01b038135169060200135610186565b6000546001600160a01b031681565b60016020526000908152604090205481565b6000546001600160a01b0316331461013f57600080fd5b789f4f2726179a224501d762422c946590d91000000000000000811061016457600080fd5b6001600160a01b03909116600090815260016020526040902080549091019055565b336000908152600160205260409020548111156101e2576040805162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103130b630b731b29760591b604482015290519081900360640190fd5b336000818152600160209081526040808320805486900390556001600160a01b03861680845292819020805486019055805193845290830191909152818101839052517f3990db2d31862302a685e8086b5755072a6e2b5b780af1ee81ece35ee3cd33459181900360600190a1505056fea265627a7a72315820dc604392647827e376fdf183b0129bf89188db5296acdbc23293aae646dd98b464736f6c634300050b0032", | |
"deployedBytecode": "608060405234801561001057600080fd5b506004361061004c5760003560e01c8063075461721461005157806327e235e31461007557806340c10f19146100ad578063d0679d34146100db575b600080fd5b610059610107565b604080516001600160a01b039092168252519081900360200190f35b61009b6004803603602081101561008b57600080fd5b50356001600160a01b0316610116565b60408051918252519081900360200190f35b6100d9600480360360408110156100c357600080fd5b506001600160a01b038135169060200135610128565b005b6100d9600480360360408110156100f157600080fd5b506001600160a01b038135169060200135610186565b6000546001600160a01b031681565b60016020526000908152604090205481565b6000546001600160a01b0316331461013f57600080fd5b789f4f2726179a224501d762422c946590d91000000000000000811061016457600080fd5b6001600160a01b03909116600090815260016020526040902080549091019055565b336000908152600160205260409020548111156101e2576040805162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103130b630b731b29760591b604482015290519081900360640190fd5b336000818152600160209081526040808320805486900390556001600160a01b03861680845292819020805486019055805193845290830191909152818101839052517f3990db2d31862302a685e8086b5755072a6e2b5b780af1ee81ece35ee3cd33459181900360600190a1505056fea265627a7a72315820dc604392647827e376fdf183b0129bf89188db5296acdbc23293aae646dd98b464736f6c634300050b0032", | |
"sourceMap": "33:1078:0:-;;;424:57;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;455:6:0;:19;;-1:-1:-1;;;;;;455:19:0;464:10;455:19;;;33:1078;;;;;;", | |
"deployedSourceMap": "33:1078:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;33:1078:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;136:21;;;:::i;:::-;;;;-1:-1:-1;;;;;136:21:0;;;;;;;;;;;;;;163:41;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;163:41:0;-1:-1:-1;;;;;163:41:0;;:::i;:::-;;;;;;;;;;;;;;;;597:168;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;597:168:0;;;;;;;;:::i;:::-;;849:260;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;849:260:0;;;;;;;;:::i;136:21::-;;;-1:-1:-1;;;;;136:21:0;;:::o;163:41::-;;;;;;;;;;;;;:::o;597:168::-;681:6;;-1:-1:-1;;;;;681:6:0;667:10;:20;659:29;;;;;;715:4;706:6;:13;698:22;;;;;;-1:-1:-1;;;;;730:18:0;;;;;;;:8;:18;;;;;:28;;;;;;;597:168::o;849:260::-;938:10;929:20;;;;:8;:20;;;;;;919:30;;;911:64;;;;;-1:-1:-1;;;911:64:0;;;;;;;;;;;;-1:-1:-1;;;911:64:0;;;;;;;;;;;;;;;994:10;985:20;;;;:8;:20;;;;;;;;:30;;;;;;;-1:-1:-1;;;;;1025:18:0;;;;;;;;;:28;;;;;;1068:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;849:260;;:::o", | |
"sourcePath": "/home/anegg0/Dev/web3js/contracts/SubCurrency.sol", | |
"compiler": { | |
"name": "solc", | |
"version": "0.5.11+commit.c082d0b4" | |
}, | |
"ast": { | |
"absolutePath": "/home/anegg0/Dev/web3js/contracts/SubCurrency.sol", | |
"exportedSymbols": { | |
"Coin": [ | |
90 | |
] | |
}, | |
"id": 91, | |
"nodeType": "SourceUnit", | |
"nodes": [ | |
{ | |
"id": 1, | |
"literals": [ | |
"solidity", | |
">=", | |
"0.5", | |
".0", | |
"<", | |
"0.7", | |
".0" | |
], | |
"nodeType": "PragmaDirective", | |
"src": "0:31:0" | |
}, | |
{ | |
"baseContracts": [], | |
"contractDependencies": [], | |
"contractKind": "contract", | |
"documentation": null, | |
"fullyImplemented": true, | |
"id": 90, | |
"linearizedBaseContracts": [ | |
90 | |
], | |
"name": "Coin", | |
"nodeType": "ContractDefinition", | |
"nodes": [ | |
{ | |
"constant": false, | |
"id": 3, | |
"name": "minter", | |
"nodeType": "VariableDeclaration", | |
"scope": 90, | |
"src": "136:21:0", | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 2, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "136:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"value": null, | |
"visibility": "public" | |
}, | |
{ | |
"constant": false, | |
"id": 7, | |
"name": "balances", | |
"nodeType": "VariableDeclaration", | |
"scope": 90, | |
"src": "163:41:0", | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", | |
"typeString": "mapping(address => uint256)" | |
}, | |
"typeName": { | |
"id": 6, | |
"keyType": { | |
"id": 4, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "172:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"nodeType": "Mapping", | |
"src": "163:25:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", | |
"typeString": "mapping(address => uint256)" | |
}, | |
"valueType": { | |
"id": 5, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "183:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
}, | |
"value": null, | |
"visibility": "public" | |
}, | |
{ | |
"anonymous": false, | |
"documentation": null, | |
"id": 15, | |
"name": "Sent", | |
"nodeType": "EventDefinition", | |
"parameters": { | |
"id": 14, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 9, | |
"indexed": false, | |
"name": "from", | |
"nodeType": "VariableDeclaration", | |
"scope": 15, | |
"src": "307:12:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 8, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "307:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 11, | |
"indexed": false, | |
"name": "to", | |
"nodeType": "VariableDeclaration", | |
"scope": 15, | |
"src": "321:10:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 10, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "321:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 13, | |
"indexed": false, | |
"name": "amount", | |
"nodeType": "VariableDeclaration", | |
"scope": 15, | |
"src": "333:11:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 12, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "333:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "306:39:0" | |
}, | |
"src": "296:50:0" | |
}, | |
{ | |
"body": { | |
"id": 23, | |
"nodeType": "Block", | |
"src": "445:36:0", | |
"statements": [ | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"id": 21, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"argumentTypes": null, | |
"id": 18, | |
"name": "minter", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 3, | |
"src": "455:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"argumentTypes": null, | |
"expression": { | |
"argumentTypes": null, | |
"id": 19, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 105, | |
"src": "464:3:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 20, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": null, | |
"src": "464:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address_payable", | |
"typeString": "address payable" | |
} | |
}, | |
"src": "455:19:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"id": 22, | |
"nodeType": "ExpressionStatement", | |
"src": "455:19:0" | |
} | |
] | |
}, | |
"documentation": null, | |
"id": 24, | |
"implemented": true, | |
"kind": "constructor", | |
"modifiers": [], | |
"name": "", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 16, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "435:2:0" | |
}, | |
"returnParameters": { | |
"id": 17, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "445:0:0" | |
}, | |
"scope": 90, | |
"src": "424:57:0", | |
"stateMutability": "nonpayable", | |
"superFunction": null, | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 50, | |
"nodeType": "Block", | |
"src": "649:116:0", | |
"statements": [ | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"arguments": [ | |
{ | |
"argumentTypes": null, | |
"commonType": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"id": 35, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"argumentTypes": null, | |
"expression": { | |
"argumentTypes": null, | |
"id": 32, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 105, | |
"src": "667:3:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 33, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": null, | |
"src": "667:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address_payable", | |
"typeString": "address payable" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "==", | |
"rightExpression": { | |
"argumentTypes": null, | |
"id": 34, | |
"name": "minter", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 3, | |
"src": "681:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"src": "667:20:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
], | |
"id": 31, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
108, | |
109 | |
], | |
"referencedDeclaration": 108, | |
"src": "659:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", | |
"typeString": "function (bool) pure" | |
} | |
}, | |
"id": 36, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "659:29:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 37, | |
"nodeType": "ExpressionStatement", | |
"src": "659:29:0" | |
}, | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"arguments": [ | |
{ | |
"argumentTypes": null, | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 41, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"argumentTypes": null, | |
"id": 39, | |
"name": "amount", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 28, | |
"src": "706:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "<", | |
"rightExpression": { | |
"argumentTypes": null, | |
"hexValue": "31653630", | |
"id": 40, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "715:4:0", | |
"subdenomination": null, | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_1000000000000000000000000000000000000000000000000000000000000_by_1", | |
"typeString": "int_const 1000...(53 digits omitted)...0000" | |
}, | |
"value": "1e60" | |
}, | |
"src": "706:13:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
], | |
"id": 38, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
108, | |
109 | |
], | |
"referencedDeclaration": 108, | |
"src": "698:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", | |
"typeString": "function (bool) pure" | |
} | |
}, | |
"id": 42, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "698:22:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 43, | |
"nodeType": "ExpressionStatement", | |
"src": "698:22:0" | |
}, | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"id": 48, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 44, | |
"name": "balances", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7, | |
"src": "730:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", | |
"typeString": "mapping(address => uint256)" | |
} | |
}, | |
"id": 46, | |
"indexExpression": { | |
"argumentTypes": null, | |
"id": 45, | |
"name": "receiver", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 26, | |
"src": "739:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "730:18:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "+=", | |
"rightHandSide": { | |
"argumentTypes": null, | |
"id": 47, | |
"name": "amount", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 28, | |
"src": "752:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "730:28:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 49, | |
"nodeType": "ExpressionStatement", | |
"src": "730:28:0" | |
} | |
] | |
}, | |
"documentation": null, | |
"id": 51, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "mint", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 29, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 26, | |
"name": "receiver", | |
"nodeType": "VariableDeclaration", | |
"scope": 51, | |
"src": "611:16:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 25, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "611:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 28, | |
"name": "amount", | |
"nodeType": "VariableDeclaration", | |
"scope": 51, | |
"src": "629:11:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 27, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "629:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "610:31:0" | |
}, | |
"returnParameters": { | |
"id": 30, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "649:0:0" | |
}, | |
"scope": 90, | |
"src": "597:168:0", | |
"stateMutability": "nonpayable", | |
"superFunction": null, | |
"visibility": "public" | |
}, | |
{ | |
"body": { | |
"id": 88, | |
"nodeType": "Block", | |
"src": "901:208:0", | |
"statements": [ | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"arguments": [ | |
{ | |
"argumentTypes": null, | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 64, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"argumentTypes": null, | |
"id": 59, | |
"name": "amount", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 55, | |
"src": "919:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "<=", | |
"rightExpression": { | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 60, | |
"name": "balances", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7, | |
"src": "929:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", | |
"typeString": "mapping(address => uint256)" | |
} | |
}, | |
"id": 63, | |
"indexExpression": { | |
"argumentTypes": null, | |
"expression": { | |
"argumentTypes": null, | |
"id": 61, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 105, | |
"src": "938:3:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 62, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": null, | |
"src": "938:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address_payable", | |
"typeString": "address payable" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "929:20:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "919:30:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"argumentTypes": null, | |
"hexValue": "496e73756666696369656e742062616c616e63652e", | |
"id": 65, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "951:23:0", | |
"subdenomination": null, | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_7572e40391d07d4b91d51e72cb8caa5f33f56b2b616c219ac11e2b95b18edce9", | |
"typeString": "literal_string \"Insufficient balance.\"" | |
}, | |
"value": "Insufficient balance." | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_7572e40391d07d4b91d51e72cb8caa5f33f56b2b616c219ac11e2b95b18edce9", | |
"typeString": "literal_string \"Insufficient balance.\"" | |
} | |
], | |
"id": 58, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
108, | |
109 | |
], | |
"referencedDeclaration": 109, | |
"src": "911:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 66, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "911:64:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 67, | |
"nodeType": "ExpressionStatement", | |
"src": "911:64:0" | |
}, | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"id": 73, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 68, | |
"name": "balances", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7, | |
"src": "985:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", | |
"typeString": "mapping(address => uint256)" | |
} | |
}, | |
"id": 71, | |
"indexExpression": { | |
"argumentTypes": null, | |
"expression": { | |
"argumentTypes": null, | |
"id": 69, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 105, | |
"src": "994:3:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 70, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": null, | |
"src": "994:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address_payable", | |
"typeString": "address payable" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "985:20:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "-=", | |
"rightHandSide": { | |
"argumentTypes": null, | |
"id": 72, | |
"name": "amount", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 55, | |
"src": "1009:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "985:30:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 74, | |
"nodeType": "ExpressionStatement", | |
"src": "985:30:0" | |
}, | |
{ | |
"expression": { | |
"argumentTypes": null, | |
"id": 79, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"argumentTypes": null, | |
"baseExpression": { | |
"argumentTypes": null, | |
"id": 75, | |
"name": "balances", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 7, | |
"src": "1025:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", | |
"typeString": "mapping(address => uint256)" | |
} | |
}, | |
"id": 77, | |
"indexExpression": { | |
"argumentTypes": null, | |
"id": 76, | |
"name": "receiver", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 53, | |
"src": "1034:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "1025:18:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "+=", | |
"rightHandSide": { | |
"argumentTypes": null, | |
"id": 78, | |
"name": "amount", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 55, | |
"src": "1047:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "1025:28:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 80, | |
"nodeType": "ExpressionStatement", | |
"src": "1025:28:0" | |
}, | |
{ | |
"eventCall": { | |
"argumentTypes": null, | |
"arguments": [ | |
{ | |
"argumentTypes": null, | |
"expression": { | |
"argumentTypes": null, | |
"id": 82, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 105, | |
"src": "1073:3:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 83, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": null, | |
"src": "1073:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address_payable", | |
"typeString": "address payable" | |
} | |
}, | |
{ | |
"argumentTypes": null, | |
"id": 84, | |
"name": "receiver", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 53, | |
"src": "1085:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"argumentTypes": null, | |
"id": 85, | |
"name": "amount", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 55, | |
"src": "1095:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address_payable", | |
"typeString": "address payable" | |
}, | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 81, | |
"name": "Sent", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 15, | |
"src": "1068:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", | |
"typeString": "function (address,address,uint256)" | |
} | |
}, | |
"id": 86, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "1068:34:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 87, | |
"nodeType": "EmitStatement", | |
"src": "1063:39:0" | |
} | |
] | |
}, | |
"documentation": null, | |
"id": 89, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "send", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 56, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 53, | |
"name": "receiver", | |
"nodeType": "VariableDeclaration", | |
"scope": 89, | |
"src": "863:16:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 52, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "863:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 55, | |
"name": "amount", | |
"nodeType": "VariableDeclaration", | |
"scope": 89, | |
"src": "881:11:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 54, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "881:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"value": null, | |
"visibility": "internal" | |
} | |
], | |
"src": "862:31:0" | |
}, | |
"returnParameters": { | |
"id": 57, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "901:0:0" | |
}, | |
"scope": 90, | |
"src": "849:260:0", | |
"stateMutability": "nonpayable", | |
"superFunction": null, | |
"visibility": "public" | |
} | |
], | |
"scope": 91, | |
"src": "33:1078:0" | |
} | |
], | |
"src": "0:1111:0" | |
}, | |
"functionHashes": { | |
"balances(address)": "27e235e3", | |
"mint(address,uint256)": "40c10f19", | |
"minter()": "07546172", | |
"send(address,uint256)": "d0679d34" | |
}, | |
"gasEstimates": { | |
"creation": { | |
"codeDepositCost": "129600", | |
"executionCost": "20412", | |
"totalCost": "150012" | |
}, | |
"external": { | |
"balances(address)": "524", | |
"mint(address,uint256)": "20812", | |
"minter()": "415", | |
"send(address,uint256)": "42760" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment