UNPKG

arc_dx

Version:

A platform for building DAOs

525 lines 19.2 kB
{ "contractName": "ExternalTokenLockerMock", "abi": [ { "constant": true, "inputs": [ { "name": "", "type": "address" } ], "name": "lockedTokenBalances", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "_amount", "type": "uint256" } ], "name": "lock", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x608060405234801561001057600080fd5b5060f18061001f6000396000f30060806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416638b525d0c8114604d578063dd46706414608a575b600080fd5b348015605857600080fd5b50607873ffffffffffffffffffffffffffffffffffffffff6004351660a1565b60408051918252519081900360200190f35b348015609557600080fd5b50609f60043560b3565b005b60006020819052908152604090205481565b336000908152602081905260409020555600a165627a7a7230582094572ba6dff56392b967f0cfe3337d17e1fa0e95285b8c6f672a1224a697f3ee0029", "deployedBytecode": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416638b525d0c8114604d578063dd46706414608a575b600080fd5b348015605857600080fd5b50607873ffffffffffffffffffffffffffffffffffffffff6004351660a1565b60408051918252519081900360200190f35b348015609557600080fd5b50609f60043560b3565b005b60006020819052908152604090205481565b336000908152602081905260409020555600a165627a7a7230582094572ba6dff56392b967f0cfe3337d17e1fa0e95285b8c6f672a1224a697f3ee0029", "sourceMap": "27:216:20:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;27:216:20;;;;;;;", "deployedSourceMap": "27:216:20:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;89:52;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;89:52:20;;;;;;;;;;;;;;;;;;;;;;;148:93;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;148:93:20;;;;;;;89:52;;;;;;;;;;;;;;:::o;148:93::-;213:10;193:19;:31;;;;;;;;;;:41;148:93::o", "source": "pragma solidity ^0.4.25;\n\n\ncontract ExternalTokenLockerMock {\n\n // user => amount\n mapping (address => uint) public lockedTokenBalances;\n\n function lock(uint _amount) public {\n lockedTokenBalances[msg.sender] = _amount;\n }\n}\n", "sourcePath": "/Users/oren/daostack/daostack2/daostack/contracts/test/ExternalTokenLockerMock.sol", "ast": { "absolutePath": "/Users/oren/daostack/daostack2/daostack/contracts/test/ExternalTokenLockerMock.sol", "exportedSymbols": { "ExternalTokenLockerMock": [ 6597 ] }, "id": 6598, "nodeType": "SourceUnit", "nodes": [ { "id": 6579, "literals": [ "solidity", "^", "0.4", ".25" ], "nodeType": "PragmaDirective", "src": "0:24:20" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 6597, "linearizedBaseContracts": [ 6597 ], "name": "ExternalTokenLockerMock", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 6583, "name": "lockedTokenBalances", "nodeType": "VariableDeclaration", "scope": 6597, "src": "89:52:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "typeName": { "id": 6582, "keyType": { "id": 6580, "name": "address", "nodeType": "ElementaryTypeName", "src": "98:7:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "89:25:20", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 6581, "name": "uint", "nodeType": "ElementaryTypeName", "src": "109:4:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "value": null, "visibility": "public" }, { "body": { "id": 6595, "nodeType": "Block", "src": "183:58:20", "statements": [ { "expression": { "argumentTypes": null, "id": 6593, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 6588, "name": "lockedTokenBalances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6583, "src": "193:19:20", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 6591, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 6589, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21549, "src": "213:3:20", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 6590, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "213:10:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "193:31:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 6592, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6585, "src": "227:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "193:41:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 6594, "nodeType": "ExpressionStatement", "src": "193:41:20" } ] }, "documentation": null, "id": 6596, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "lock", "nodeType": "FunctionDefinition", "parameters": { "id": 6586, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6585, "name": "_amount", "nodeType": "VariableDeclaration", "scope": 6596, "src": "162:12:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 6584, "name": "uint", "nodeType": "ElementaryTypeName", "src": "162:4:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "161:14:20" }, "payable": false, "returnParameters": { "id": 6587, "nodeType": "ParameterList", "parameters": [], "src": "183:0:20" }, "scope": 6597, "src": "148:93:20", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 6598, "src": "27:216:20" } ], "src": "0:244:20" }, "legacyAST": { "absolutePath": "/Users/oren/daostack/daostack2/daostack/contracts/test/ExternalTokenLockerMock.sol", "exportedSymbols": { "ExternalTokenLockerMock": [ 6597 ] }, "id": 6598, "nodeType": "SourceUnit", "nodes": [ { "id": 6579, "literals": [ "solidity", "^", "0.4", ".25" ], "nodeType": "PragmaDirective", "src": "0:24:20" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 6597, "linearizedBaseContracts": [ 6597 ], "name": "ExternalTokenLockerMock", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 6583, "name": "lockedTokenBalances", "nodeType": "VariableDeclaration", "scope": 6597, "src": "89:52:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "typeName": { "id": 6582, "keyType": { "id": 6580, "name": "address", "nodeType": "ElementaryTypeName", "src": "98:7:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "89:25:20", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 6581, "name": "uint", "nodeType": "ElementaryTypeName", "src": "109:4:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "value": null, "visibility": "public" }, { "body": { "id": 6595, "nodeType": "Block", "src": "183:58:20", "statements": [ { "expression": { "argumentTypes": null, "id": 6593, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 6588, "name": "lockedTokenBalances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6583, "src": "193:19:20", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 6591, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 6589, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21549, "src": "213:3:20", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 6590, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "213:10:20", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "193:31:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 6592, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6585, "src": "227:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "193:41:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 6594, "nodeType": "ExpressionStatement", "src": "193:41:20" } ] }, "documentation": null, "id": 6596, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "lock", "nodeType": "FunctionDefinition", "parameters": { "id": 6586, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6585, "name": "_amount", "nodeType": "VariableDeclaration", "scope": 6596, "src": "162:12:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 6584, "name": "uint", "nodeType": "ElementaryTypeName", "src": "162:4:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "161:14:20" }, "payable": false, "returnParameters": { "id": 6587, "nodeType": "ParameterList", "parameters": [], "src": "183:0:20" }, "scope": 6597, "src": "148:93:20", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 6598, "src": "27:216:20" } ], "src": "0:244:20" }, "compiler": { "name": "solc", "version": "0.4.25+commit.59dbf8f1.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.0.0-beta.1", "updatedAt": "2018-10-16T14:16:07.359Z" }