UNPKG

@decent-bet/solido

Version:

Code first contract entity mapper for Solidity based blockchains like Ethereum, Vechain, Tron

836 lines 348 kB
{ "contractName": "Energy", "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "name": "_from", "type": "address" }, { "indexed": true, "name": "_to", "type": "address" }, { "indexed": false, "name": "_value", "type": "uint256" } ], "name": "Transfer", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "_owner", "type": "address" }, { "indexed": true, "name": "_spender", "type": "address" }, { "indexed": false, "name": "_value", "type": "uint256" } ], "name": "Approval", "type": "event" }, { "constant": true, "inputs": [], "name": "name", "outputs": [ { "name": "", "type": "string" } ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, "inputs": [], "name": "decimals", "outputs": [ { "name": "", "type": "uint8" } ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, "inputs": [], "name": "symbol", "outputs": [ { "name": "", "type": "string" } ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, "inputs": [], "name": "totalSupply", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "totalBurned", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "_owner", "type": "address" } ], "name": "balanceOf", "outputs": [ { "name": "balance", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "_to", "type": "address" }, { "name": "_amount", "type": "uint256" } ], "name": "transfer", "outputs": [ { "name": "success", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_from", "type": "address" }, { "name": "_to", "type": "address" }, { "name": "_amount", "type": "uint256" } ], "name": "move", "outputs": [ { "name": "success", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_from", "type": "address" }, { "name": "_to", "type": "address" }, { "name": "_amount", "type": "uint256" } ], "name": "transferFrom", "outputs": [ { "name": "success", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "name": "_owner", "type": "address" }, { "name": "_spender", "type": "address" } ], "name": "allowance", "outputs": [ { "name": "remaining", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "_spender", "type": "address" }, { "name": "_value", "type": "uint256" } ], "name": "approve", "outputs": [ { "name": "success", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x608060405234801561001057600080fd5b50610f40806100206000396000f3006080604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100b4578063095ea7b31461014457806318160ddd146101a957806323b872dd146101d4578063313ce5671461025957806370a082311461028a57806395d89b41146102e1578063a9059cbb14610371578063bb35783b146103d6578063d89135cd1461045b578063dd62ed3e14610486575b600080fd5b3480156100c057600080fd5b506100c96104fd565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101095780820151818401526020810190506100ee565b50505050905090810190601f1680156101365780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015057600080fd5b5061018f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061053a565b604051808215151515815260200191505060405180910390f35b3480156101b557600080fd5b506101be61062b565b6040518082815260200191505060405180910390f35b3480156101e057600080fd5b5061023f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106d1565b604051808215151515815260200191505060405180910390f35b34801561026557600080fd5b5061026e610865565b604051808260ff1660ff16815260200191505060405180910390f35b34801561029657600080fd5b506102cb600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061086e565b6040518082815260200191505060405180910390f35b3480156102ed57600080fd5b506102f661094d565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561037d57600080fd5b506103bc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061098a565b604051808215151515815260200191505060405180910390f35b3480156103e257600080fd5b50610441600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109a1565b604051808215151515815260200191505060405180910390f35b34801561046757600080fd5b50610470610b67565b6040518082815260200191505060405180910390f35b34801561049257600080fd5b506104e7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c0d565b6040518082815260200191505060405180910390f35b60606040805190810160405280600681526020017f566554686f720000000000000000000000000000000000000000000000000000815250905090565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60003073ffffffffffffffffffffffffffffffffffffffff1663592b389c6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561069157600080fd5b505af11580156106a5573d6000803e3d6000fd5b505050506040513d60208110156106bb57600080fd5b8101908080519060200190929190505050905090565b6000816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515156107c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f6275696c74696e3a20696e73756666696369656e7420616c6c6f77616e63650081525060200191505060405180910390fd5b816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555061085a848484610c93565b600190509392505050565b60006012905090565b60003073ffffffffffffffffffffffffffffffffffffffff1663ee660480836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561090b57600080fd5b505af115801561091f573d6000803e3d6000fd5b505050506040513d602081101561093557600080fd5b81019080805190602001909291905050509050919050565b60606040805190810160405280600481526020017f5654484f00000000000000000000000000000000000000000000000000000000815250905090565b6000610997338484610c93565b6001905092915050565b60003373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480610add57503373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1663059950e9866040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610a8a57600080fd5b505af1158015610a9e573d6000803e3d6000fd5b505050506040513d6020811015610ab457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16145b1515610b51576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f6275696c74696e3a2073656c66206f72206d617374657220726571756972656481525060200191505060405180910390fd5b610b5c848484610c93565b600190509392505050565b60003073ffffffffffffffffffffffffffffffffffffffff1663138d4d0c6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610bcd57600080fd5b505af1158015610be1573d6000803e3d6000fd5b505050506040513d6020811015610bf757600080fd5b8101908080519060200190929190505050905090565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000811115610eaa573073ffffffffffffffffffffffffffffffffffffffff166339ed08d584836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610d3f57600080fd5b505af1158015610d53573d6000803e3d6000fd5b505050506040513d6020811015610d6957600080fd5b81019080805190602001909291905050501515610dee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f6275696c74696e3a20696e73756666696369656e742062616c616e636500000081525060200191505060405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff16631cedfac183836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015610e9157600080fd5b505af1158015610ea5573d6000803e3d6000fd5b505050505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050505600a165627a7a723058202bac57dd8ddbc821186bcaf49a5051ae17bdd1a96cfef135794ed3bd90ff29480029", "deployedBytecode": "0x6080604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100b4578063095ea7b31461014457806318160ddd146101a957806323b872dd146101d4578063313ce5671461025957806370a082311461028a57806395d89b41146102e1578063a9059cbb14610371578063bb35783b146103d6578063d89135cd1461045b578063dd62ed3e14610486575b600080fd5b3480156100c057600080fd5b506100c96104fd565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101095780820151818401526020810190506100ee565b50505050905090810190601f1680156101365780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015057600080fd5b5061018f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061053a565b604051808215151515815260200191505060405180910390f35b3480156101b557600080fd5b506101be61062b565b6040518082815260200191505060405180910390f35b3480156101e057600080fd5b5061023f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106d1565b604051808215151515815260200191505060405180910390f35b34801561026557600080fd5b5061026e610865565b604051808260ff1660ff16815260200191505060405180910390f35b34801561029657600080fd5b506102cb600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061086e565b6040518082815260200191505060405180910390f35b3480156102ed57600080fd5b506102f661094d565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561037d57600080fd5b506103bc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061098a565b604051808215151515815260200191505060405180910390f35b3480156103e257600080fd5b50610441600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109a1565b604051808215151515815260200191505060405180910390f35b34801561046757600080fd5b50610470610b67565b6040518082815260200191505060405180910390f35b34801561049257600080fd5b506104e7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c0d565b6040518082815260200191505060405180910390f35b60606040805190810160405280600681526020017f566554686f720000000000000000000000000000000000000000000000000000815250905090565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60003073ffffffffffffffffffffffffffffffffffffffff1663592b389c6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561069157600080fd5b505af11580156106a5573d6000803e3d6000fd5b505050506040513d60208110156106bb57600080fd5b8101908080519060200190929190505050905090565b6000816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515156107c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f6275696c74696e3a20696e73756666696369656e7420616c6c6f77616e63650081525060200191505060405180910390fd5b816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555061085a848484610c93565b600190509392505050565b60006012905090565b60003073ffffffffffffffffffffffffffffffffffffffff1663ee660480836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561090b57600080fd5b505af115801561091f573d6000803e3d6000fd5b505050506040513d602081101561093557600080fd5b81019080805190602001909291905050509050919050565b60606040805190810160405280600481526020017f5654484f00000000000000000000000000000000000000000000000000000000815250905090565b6000610997338484610c93565b6001905092915050565b60003373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480610add57503373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1663059950e9866040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610a8a57600080fd5b505af1158015610a9e573d6000803e3d6000fd5b505050506040513d6020811015610ab457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16145b1515610b51576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f6275696c74696e3a2073656c66206f72206d617374657220726571756972656481525060200191505060405180910390fd5b610b5c848484610c93565b600190509392505050565b60003073ffffffffffffffffffffffffffffffffffffffff1663138d4d0c6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610bcd57600080fd5b505af1158015610be1573d6000803e3d6000fd5b505050506040513d6020811015610bf757600080fd5b8101908080519060200190929190505050905090565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000811115610eaa573073ffffffffffffffffffffffffffffffffffffffff166339ed08d584836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610d3f57600080fd5b505af1158015610d53573d6000803e3d6000fd5b505050506040513d6020811015610d6957600080fd5b81019080805190602001909291905050501515610dee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f6275696c74696e3a20696e73756666696369656e742062616c616e636500000081525060200191505060405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff16631cedfac183836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015610e9157600080fd5b505af1158015610ea5573d6000803e3d6000fd5b505050505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050505600a165627a7a723058202bac57dd8ddbc821186bcaf49a5051ae17bdd1a96cfef135794ed3bd90ff29480029", "sourceMap": "347:2395:1:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;347:2395:1;;;;;;;", "deployedSourceMap": "347:2395:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;441:76;;8:9:-1;5:2;;;30:1;27;20:12;5:2;441:76:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;441:76:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2158:208;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2158:208:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;684:115;;8:9:-1;5:2;;;30:1;27;20:12;5:2;684:115:1;;;;;;;;;;;;;;;;;;;;;;;1701:303;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1701:303:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;523:73;;8:9:-1;5:2;;;30:1;27;20:12;5:2;523:73:1;;;;;;;;;;;;;;;;;;;;;;;;;;;967:133;;8:9:-1;5:2;;;30:1;27;20:12;5:2;967:133:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;602:76;;8:9:-1;5:2;;;30:1;27;20:12;5:2;602:76:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;602:76:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1106:150;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1106:150:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1408:287;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1408:287:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;846:115;;8:9:-1;5:2;;;30:1;27;20:12;5:2;846:115:1;;;;;;;;;;;;;;;;;;;;;;;2010:142;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2010:142:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;441:76;477:6;495:15;;;;;;;;;;;;;;;;;;;;441:76;:::o;2158:208::-;2224:12;2279:6;2247:7;:19;2255:10;2247:19;;;;;;;;;;;;;;;:29;2267:8;2247:29;;;;;;;;;;;;;;;:38;;;;2321:8;2300:38;;2309:10;2300:38;;;2331:6;2300:38;;;;;;;;;;;;;;;;;;2355:4;2348:11;;2158:208;;;;:::o;684:115::-;727:7;766:4;753:37;;;:39;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;753:39:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;753:39:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;753:39:1;;;;;;;;;;;;;;;;746:46;;684:115;:::o;1701:303::-;1783:12;1845:7;1815;:14;1823:5;1815:14;;;;;;;;;;;;;;;:26;1830:10;1815:26;;;;;;;;;;;;;;;;:37;;1807:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1928:7;1898;:14;1906:5;1898:14;;;;;;;;;;;;;;;:26;1913:10;1898:26;;;;;;;;;;;;;;;;:37;;;;;;;;;;;1946:30;1956:5;1963:3;1968:7;1946:9;:30::i;:::-;1993:4;1986:11;;1701:303;;;;;:::o;523:73::-;563:5;587:2;580:9;;523:73;:::o;967:133::-;1022:15;1069:4;1056:29;;;1086:6;1056:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1056:37:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1056:37:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1056:37:1;;;;;;;;;;;;;;;;1049:44;;967:133;;;:::o;602:76::-;640:6;658:13;;;;;;;;;;;;;;;;;;;;602:76;:::o;1106:150::-;1169:12;1193:35;1203:10;1215:3;1220:7;1193:9;:35::i;:::-;1245:4;1238:11;;1106:150;;;;:::o;1408:287::-;1482:12;1523:10;1514:19;;:5;:19;;;:76;;;;1580:10;1537:53;;1550:4;1537:32;;;1570:5;1537:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1537:39:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1537:39:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1537:39:1;;;;;;;;;;;;;;;;:53;;;1514:76;1506:121;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1637:30;1647:5;1654:3;1659:7;1637:9;:30::i;:::-;1684:4;1677:11;;1408:287;;;;;:::o;846:115::-;889:7;928:4;915:37;;;:39;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;915:39:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;915:39:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;915:39:1;;;;;;;;;;;;;;;;908:46;;846:115;:::o;2010:142::-;2084:17;2120:7;:15;2128:6;2120:15;;;;;;;;;;;;;;;:25;2136:8;2120:25;;;;;;;;;;;;;;;;2113:32;;2010:142;;;;:::o;2372:368::-;2469:1;2459:7;:11;2455:235;;;2507:4;2494:29;;;2524:5;2531:7;2494:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2494:45:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2494:45:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2494:45:1;;;;;;;;;;;;;;;;2486:87;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2649:4;2636:29;;;2666:3;2671:7;2636:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2636:43:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2636:43:1;;;;2455:235;2720:3;2704:29;;2713:5;2704:29;;;2725:7;2704:29;;;;;;;;;;;;;;;;;;2372:368;;;:::o", "source": "// Copyright (c) 2018 The VeChainThor developers\n\n// Distributed under the GNU Lesser General Public License v3.0 software license, see the accompanying\n// file LICENSE or <https://www.gnu.org/licenses/lgpl-3.0.html>\n\npragma solidity 0.4.24;\nimport \"./token.sol\";\n\n/// @title Energy implements VIP180(ERC20) standard, to present VeThor sub-token.\ncontract Energy is _Token {\n mapping(address => mapping(address => uint256)) allowed;\n\n function name() public pure returns(string) {\n return \"VeThor\";\n }\n\n function decimals() public pure returns(uint8) {\n return 18;\n }\n\n function symbol() public pure returns(string) {\n return \"VTHO\";\n }\n\n function totalSupply() public view returns(uint256) {\n return EnergyNative(this).native_totalSupply();\n }\n\n // @return energy that total burned.\n function totalBurned() public view returns(uint256) {\n return EnergyNative(this).native_totalBurned();\n }\n\n function balanceOf(address _owner) public view returns(uint256 balance) {\n return EnergyNative(this).native_get(_owner);\n }\n\n function transfer(address _to, uint256 _amount) public returns(bool success) {\n _transfer(msg.sender, _to, _amount);\n return true;\n }\n\n /// @notice It's not VIP180(ERC20)'s standard method. It allows master of `_from` or `_from` itself to transfer `_amount` of energy to `_to`.\n function move(address _from, address _to, uint256 _amount) public returns(bool success) {\n require(_from == msg.sender || EnergyNative(this).native_master(_from) == msg.sender, \"builtin: self or master required\");\n _transfer(_from, _to, _amount);\n return true;\n }\n\n function transferFrom(address _from, address _to, uint256 _amount) public returns(bool success) {\n require(allowed[_from][msg.sender] >= _amount, \"builtin: insufficient allowance\");\n allowed[_from][msg.sender] -= _amount;\n\n _transfer(_from, _to, _amount);\n return true;\n }\n\n function allowance(address _owner, address _spender) public view returns(uint256 remaining) {\n return allowed[_owner][_spender];\n }\n\n function approve(address _spender, uint256 _value) public returns(bool success){\n allowed[msg.sender][_spender] = _value;\n emit Approval(msg.sender, _spender, _value);\n return true;\n }\n\n function _transfer(address _from, address _to, uint256 _amount) internal {\n if (_amount > 0) {\n require(EnergyNative(this).native_sub(_from, _amount), \"builtin: insufficient balance\");\n // believed that will never overflow\n EnergyNative(this).native_add(_to, _amount);\n }\n emit Transfer(_from, _to, _amount);\n }\n}\n\ncontract EnergyNative {\n function native_totalSupply() public view returns(uint256);\n function native_totalBurned() public view returns(uint256);\n\n function native_get(address addr) public view returns(uint256);\n function native_add(address addr, uint256 amount) public;\n function native_sub(address addr, uint256 amount) public returns(bool);\n\n function native_master(address addr) public view returns(address);\n}\n", "sourcePath": "/home/rogelio/Code/dbet/transferVtho/contracts/energy.sol", "ast": { "absolutePath": "/home/rogelio/Code/dbet/transferVtho/contracts/energy.sol", "exportedSymbols": { "Energy": [ 313 ], "EnergyNative": [ 354 ] }, "id": 355, "nodeType": "SourceUnit", "nodes": [ { "id": 58, "literals": [ "solidity", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "218:23:1" }, { "absolutePath": "/home/rogelio/Code/dbet/transferVtho/contracts/token.sol", "file": "./token.sol", "id": 59, "nodeType": "ImportDirective", "scope": 355, "sourceUnit": 424, "src": "242:21:1", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 60, "name": "_Token", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 423, "src": "366:6:1", "typeDescriptions": { "typeIdentifier": "t_contract$__Token_$423", "typeString": "contract _Token" } }, "id": 61, "nodeType": "InheritanceSpecifier", "src": "366:6:1" } ], "contractDependencies": [ 423 ], "contractKind": "contract", "documentation": "@title Energy implements VIP180(ERC20) standard, to present VeThor sub-token.", "fullyImplemented": true, "id": 313, "linearizedBaseContracts": [ 313, 423 ], "name": "Energy", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 67, "name": "allowed", "nodeType": "VariableDeclaration", "scope": 313, "src": "379:55:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" }, "typeName": { "id": 66, "keyType": { "id": 62, "name": "address", "nodeType": "ElementaryTypeName", "src": "387:7:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "379:47:1", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" }, "valueType": { "id": 65, "keyType": { "id": 63, "name": "address", "nodeType": "ElementaryTypeName", "src": "406:7:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "398:27:1", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 64, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "417:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } } }, "value": null, "visibility": "internal" }, { "body": { "id": 74, "nodeType": "Block", "src": "485:32:1", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "566554686f72", "id": 72, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "502:8:1", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_262a97b55e9eb8ce94ae32a3a5252a1b10d53d8c0207afcbee35a0dcdf83587e", "typeString": "literal_string \"VeThor\"" }, "value": "VeThor" }, "functionReturnParameters": 71, "id": 73, "nodeType": "Return", "src": "495:15:1" } ] }, "documentation": null, "id": 75, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "name", "nodeType": "FunctionDefinition", "parameters": { "id": 68, "nodeType": "ParameterList", "parameters": [], "src": "454:2:1" }, "payable": false, "returnParameters": { "id": 71, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 70, "name": "", "nodeType": "VariableDeclaration", "scope": 75, "src": "477:6:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 69, "name": "string", "nodeType": "ElementaryTypeName", "src": "477:6:1", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "476:8:1" }, "scope": 313, "src": "441:76:1", "stateMutability": "pure", "superFunction": null, "visibility": "public" }, { "body": { "id": 82, "nodeType": "Block", "src": "570:26:1", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "3138", "id": 80, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "587:2:1", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_18_by_1", "typeString": "int_const 18" }, "value": "18" }, "functionReturnParameters": 79, "id": 81, "nodeType": "Return", "src": "580:9:1" } ] }, "documentation": null, "id": 83, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "decimals", "nodeType": "FunctionDefinition", "parameters": { "id": 76, "nodeType": "ParameterList", "parameters": [], "src": "540:2:1" }, "payable": false, "returnParameters": { "id": 79, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 78, "name": "", "nodeType": "VariableDeclaration", "scope": 83, "src": "563:5:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 77, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "563:5:1", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": null, "visibility": "internal" } ], "src": "562:7:1" }, "scope": 313, "src": "523:73:1", "stateMutability": "pure", "superFunction": null, "visibility": "public" }, { "body": { "id": 90, "nodeType": "Block", "src": "648:30:1", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "5654484f", "id": 88, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "665:6:1", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_dcf6be205783fc4bb84d83de3c61b64855cb03a9da5444de5104bca180f4afa7", "typeString": "literal_string \"VTHO\"" }, "value": "VTHO" }, "functionReturnParameters": 87, "id": 89, "nodeType": "Return", "src": "658:13:1" } ] }, "documentation": null, "id": 91, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "symbol", "nodeType": "FunctionDefinition", "parameters": { "id": 84, "nodeType": "ParameterList", "parameters": [], "src": "617:2:1" }, "payable": false, "returnParameters": { "id": 87, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 86, "name": "", "nodeType": "VariableDeclaration", "scope": 91, "src": "640:6:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 85, "name": "string", "nodeType": "ElementaryTypeName", "src": "640:6:1", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "639:8:1" }, "scope": 313, "src": "602:76:1", "stateMutability": "pure", "superFunction": null, "visibility": "public" }, { "body": { "id": 102, "nodeType": "Block", "src": "736:63:1", "statements": [ { "expression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 97, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 455, "src": "766:4:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Energy_$313", "typeString": "contract Energy" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_Energy_$313", "typeString": "contract Energy" } ], "id": 96, "name": "EnergyNative", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 354, "src": "753:12:1", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_EnergyNative_$354_$", "typeString": "type(contract EnergyNative)" } }, "id": 98, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "753:18:1", "typeDescriptions": { "typeIdentifier": "t_contract$_EnergyNative_$354", "typeString": "contract EnergyNative" } }, "id": 99, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "native_totalSupply", "nodeType": "MemberAccess", "referencedDeclaration": 318, "src": "753:37:1", "typeDescriptions": { "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)" } }, "id": 100, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "753:39:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 95, "id": 101, "nodeType": "Return", "src": "746:46:1" } ] }, "documentation": null, "id": 103, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "totalSupply", "nodeType": "FunctionDefinition", "parameters": { "id": 92, "nodeType": "ParameterList", "parameters": [], "src": "704:2:1" }, "payable": false, "returnParameters": { "id": 95, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 94, "name": "", "nodeType": "VariableDeclaration", "scope": 103, "src": "727:7:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 93, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "727:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "726:9:1" }, "scope": 313, "src": "684:115:1", "stateMutability": "view", "superFunction": 361, "visibility": "public" }, { "body": { "id": 114, "nodeType": "Block", "src": "898:63:1", "statements": [ { "expression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 109, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 455, "src": "928:4:1", "typeDescriptions": { "typeIdentifier": "t_contract$_Energy_$313", "typeString": "contract Energy" } } ]