cic-stack/apps/cic-eth/tests/testdata/bancor/ERC20Token.json

7601 lines
324 KiB
JSON
Raw Normal View History

2021-02-01 18:12:51 +01:00
{
"contractName": "ERC20Token",
"abi": [
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
},
{
"internalType": "string",
"name": "_symbol",
"type": "string"
},
{
"internalType": "uint8",
"name": "_decimals",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "_totalSupply",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "_owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "_spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "_from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "_to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function",
"constant": true
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function",
"constant": true
},
{
"inputs": [],
"name": "decimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function",
"constant": true
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function",
"constant": true
},
{
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function",
"constant": true
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function",
"constant": true
},
{
"inputs": [
{
"internalType": "address",
"name": "_to",
"type": "address"
},
{
"internalType": "uint256",
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_from",
"type": "address"
},
{
"internalType": "address",
"name": "_to",
"type": "address"
},
{
"internalType": "uint256",
"name": "_value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "_value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"_decimals\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_totalSupply\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"ERC20 Standard Token implementation\",\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"triggered when a wallet allows another wallet to transfer tokens from on its behalf\",\"params\":{\"_owner\":\"wallet that approves the allowance\",\"_spender\":\"wallet that receives the allowance\",\"_value\":\"allowance amount\"}},\"Transfer(address,address,uint256)\":{\"details\":\"triggered when tokens are transferred between wallets\",\"params\":{\"_from\":\"source address\",\"_to\":\"target address\",\"_value\":\"transfer amount\"}}},\"kind\":\"dev\",\"methods\":{\"approve(address,uint256)\":{\"details\":\"allows another account/contract to transfers tokens on behalf of the cal
"bytecode": "0x608060405234801561001057600080fd5b50604051610a6a380380610a6a8339818101604052608081101561003357600080fd5b810190808051604051939291908464010000000082111561005357600080fd5b90830190602082018581111561006857600080fd5b825164010000000081118282018810171561008257600080fd5b82525081516020918201929091019080838360005b838110156100af578181015183820152602001610097565b50505050905090810190601f1680156100dc5780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156100ff57600080fd5b90830190602082018581111561011457600080fd5b825164010000000081118282018810171561012e57600080fd5b82525081516020918201929091019080838360005b8381101561015b578181015183820152602001610143565b50505050905090810190601f1680156101885780820380516001836020036101000a031916815260200191505b5060409081526020820151910151855191935091506101e1576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4e414d4560801b604482015290519081900360640190fd5b600083511161022c576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d4d6535093d360721b604482015290519081900360640190fd5b835161023f906000906020870190610286565b508251610253906001906020860190610286565b506002805460ff191660ff9390931692909217909155600381905533600090815260046020526040902055506103199050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106102c757805160ff19168380011785556102f4565b828001600101855582156102f4579182015b828111156102f45782518255916020019190600101906102d9565b50610300929150610304565b5090565b5b808211156103005760008155600101610305565b610742806103286000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce567146101a557806370a08231146101c357806395d89b41146101e9578063a9059cbb146101f1578063dd62ed3e1461021d57610093565b806306fdde0314610098578063095ea7b31461011557806318160ddd1461015557806323b872dd1461016f575b600080fd5b6100a061024b565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100da5781810151838201526020016100c2565b50505050905090810190601f1680156101075780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101416004803603604081101561012b57600080fd5b506001600160a01b0381351690602001356102d9565b604080519115158252519081900360200190f35b61015d6103c1565b60408051918252519081900360200190f35b6101416004803603606081101561018557600080fd5b506001600160a01b038135811691602081013590911690604001356103c7565b6101ad6104d8565b6040805160ff9092168252519081900360200190f35b61015d600480360360208110156101d957600080fd5b50356001600160a01b03166104e1565b6100a06104f3565b6101416004803603604081101561020757600080fd5b506001600160a01b03813516906020013561054d565b61015d6004803603604081101561023357600080fd5b506001600160a01b03813581169160200135166105fe565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102d15780601f106102a6576101008083540402835291602001916102d1565b820191906000526020600020905b8154815290600101906020018083116102b457829003601f168201915b505050505081565b6000826102e58161061b565b82158061031357503360009081526005602090815260408083206001600160a01b0388168452909152902054155b610359576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b3360008181526005602090815260408083206001600160a01b03891680855290835292819020879055805187815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60035481565b6000836103d38161061b565b836103dd8161061b565b6001600160a01b038616600090815260056020908152604080832033845290915290205461040b908561066f565b6001600160a01b038716600081815260056020908152604080832033845282528083209490945591815260049091522054610446908561066f565b6001600160a01b03808816600090815260046020526040808220939093559087168152205461047590856106bc565b6001600160a01b0380871660008181526004602090815260409182902094909455805188815290519193928a16927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce567146101a557806370a08231146101c357806395d89b41146101e9578063a9059cbb146101f1578063dd62ed3e1461021d57610093565b806306fdde0314610098578063095ea7b31461011557806318160ddd1461015557806323b872dd1461016f575b600080fd5b6100a061024b565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100da5781810151838201526020016100c2565b50505050905090810190601f1680156101075780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101416004803603604081101561012b57600080fd5b506001600160a01b0381351690602001356102d9565b604080519115158252519081900360200190f35b61015d6103c1565b60408051918252519081900360200190f35b6101416004803603606081101561018557600080fd5b506001600160a01b038135811691602081013590911690604001356103c7565b6101ad6104d8565b6040805160ff9092168252519081900360200190f35b61015d600480360360208110156101d957600080fd5b50356001600160a01b03166104e1565b6100a06104f3565b6101416004803603604081101561020757600080fd5b506001600160a01b03813516906020013561054d565b61015d6004803603604081101561023357600080fd5b506001600160a01b03813581169160200135166105fe565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102d15780601f106102a6576101008083540402835291602001916102d1565b820191906000526020600020905b8154815290600101906020018083116102b457829003601f168201915b505050505081565b6000826102e58161061b565b82158061031357503360009081526005602090815260408083206001600160a01b0388168452909152902054155b610359576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b3360008181526005602090815260408083206001600160a01b03891680855290835292819020879055805187815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60035481565b6000836103d38161061b565b836103dd8161061b565b6001600160a01b038616600090815260056020908152604080832033845290915290205461040b908561066f565b6001600160a01b038716600081815260056020908152604080832033845282528083209490945591815260049091522054610446908561066f565b6001600160a01b03808816600090815260046020526040808220939093559087168152205461047590856106bc565b6001600160a01b0380871660008181526004602090815260409182902094909455805188815290519193928a16927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a350600195945050505050565b60025460ff1681565b60046020526000908152604090205481565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102d15780601f106102a6576101008083540402835291602001916102d1565b6000826105598161061b565b33600090815260046020526040902054610573908461066f565b33600090815260046020526040808220929092556001600160a01b0386168152205461059f90846106bc565b6001600160a01b0385166000818152600460209081526040918290209390935580518681529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35060019392505050565b600560209081526000928352604080842090915290825290205481565b6001600160a01b03811661066c576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6000818310156106b6576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b600082820183811015610705576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b939250505056fea264697066735822122050025f32ef5957f1bca195d1ac8abbb20fa23e1ab2cae628b4abe327e7790d8b64736f6c634300060c0033",
"immutableReferences": {},
"sourceMap": "241:4565:48:-:0;;;1577:434;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1577:434:48;;;;;;;;;;-1:-1:-1;1577:434:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1577:434:48;;;;;;;;;;-1:-1:-1;1577:434:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1577:434:48;;;;;;;;;;;1725:19;;1577:434;;-1:-1:-1;1577:434:48;-1:-1:-1;1717:52:48;;;;;-1:-1:-1;;;1717:52:48;;;;;;;;;;;;-1:-1:-1;;;1717:52:48;;;;;;;;;;;;;;;1812:1;1794:7;1788:21;:25;1780:56;;;;;-1:-1:-1;;;1780:56:48;;;;;;;;;;;;-1:-1:-1;;;1780:56:48;;;;;;;;;;;;;;;1849:12;;;;:4;;:12;;;;;:::i;:::-;-1:-1:-1;1872:16:48;;;;:6;;:16;;;;;:::i;:::-;-1:-1:-1;1899:8:48;:20;;-1:-1:-1;;1899:20:48;;;;;;;;;;;;;1930:11;:26;;;1977:10;-1:-1:-1;1967:21:48;;;:9;:21;;;;;:36;-1:-1:-1;241:4565:48;;-1:-1:-1;241:4565:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;241:4565:48;;;-1:-1:-1;241:4565:48;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "241:4565:48:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;327:27;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4284:519;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4284:519:48;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;434:35;;;:::i;:::-;;;;;;;;;;;;;;;;3099:470;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3099:470:48;;;;;;;;;;;;;;;;;:::i;397:30::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;476:54;;;;;;;;;;;;;;;;-1:-1:-1;476:54:48;-1:-1:-1;;;;;476:54:48;;:::i;361:29::-;;;:::i;2343:355::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2343:355:48;;;;;;;;:::i;537:75::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;537:75:48;;;;;;;;;;:::i;327:27::-;;;;;;;;;;;;;;;-1:-1:-1;;327:27:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;4284:519::-;4436:4;4408:8;594:23:65;608:8;594:13;:23::i;:::-;4592:11:48;;;:51:::1;;-1:-1:-1::0;4617:10:48::1;4607:21;::::0;;;:9:::1;:21;::::0;;;;;;;-1:-1:-1;;;;;4607:31:48;::::1;::::0;;;;;;;;:36;4592:51:::1;4584:82;;;::::0;;-1:-1:-1;;;4584:82:48;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;4584:82:48;;;;;;;;;;;;;::::1;;4689:10;4679:21;::::0;;;:9:::1;:21;::::0;;;;;;;-1:-1:-1;;;;;4679:31:48;::::1;::::0;;;;;;;;;;:40;;;4735:38;;;;;;;4679:31;;4689:10;4735:38:::1;::::0;;;;;;;;;::::1;-1:-1:-1::0;4791:4:48::1;::::0;4284:519;-1:-1:-1;;;4284:519:48:o;434:35::-;;;;:::o;3099:470::-;3290:4;3238:5;594:23:65;608:8;594:13;:23::i;:::-;3267:3:48::1;594:23:65;608:8;594:13;:23::i;:::-;-1:-1:-1::0;;;;;3343:16:48;::::2;;::::0;;;:9:::2;:16;::::0;;;;;;;3360:10:::2;3343:28:::0;;;;;;;;:40:::2;::::0;3376:6;3343:32:::2;:40::i;:::-;-1:-1:-1::0;;;;;3312:16:48;::::2;;::::0;;;:9:::2;:16;::::0;;;;;;;3329:10:::2;3312:28:::0;;;;;;;:71;;;;3413:16;;;:9:::2;:16:::0;;;;;:28:::2;::::0;3434:6;3413:20:::2;:28::i;:::-;-1:-1:-1::0;;;;;3394:16:48;;::::2;;::::0;;;:9:::2;:16;::::0;;;;;:47;;;;3469:14;;::::2;::::0;;;;:26:::2;::::0;3488:6;3469:18:::2;:26::i;:::-;-1:-1:-1::0;;;;;3452:14:48;;::::2;;::::0;;;:9:::2;:14;::::0;;;;;;;;:43;;;;3511:28;;;;;;;3452:14;;3511:28;;::::2;::::0;::::2;::::0;;;;;;;::::2;-1:-1:-1::0;3557:4:48::2;::::0;3099:470;-1:-1:-1;;;;;3099:470:48:o;397:30::-;;;;;;:::o;476:54::-;;;;;;;;;;;;;:::o;361:29::-;;;;;;;;;;;;;;;-1:-1:-1;;361:29:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2343:355;2486:4;2463:3;594:23:65;608:8;594:13;:23::i;:::-;2542:10:48::1;2532:21;::::0;;;:9:::1;:21;::::0;;;;;:33:::1;::::0;2558:6;2532:25:::1;:33::i;:::-;2518:10;2508:21;::::0;;;:9:::1;:21;::::0;;;;;:57;;;;-1:-1:-1;;;;;2593:14:48;::::1;::::0;;;;:26:::1;::::0;2612:6;2593:18:::1;:26::i;:::-;-1:-1:-1::0;;;;;2576:14:48;::::1;;::::0;;;:9:::1;:14;::::0;;;;;;;;:43;;;;2635:33;;;;;;;2576:14;;2644:10:::1;::::0;2635:33:::1;::::0;;;;;;;;::::1;-1:-1:-1::0;2686:4:48::1;::::0;2343:355;-1:-1:-1;;;2343:355:48:o;537:75::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;692:128:65:-;-1:-1:-1;;;;;766:22:65;;758:54;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;;;;692:128;:::o;778:147:61:-;838:7;872:2;866;:8;;858:34;;;;;-1:-1:-1;;;858:34:61;;;;;;;;;;;;-1:-1:-1;;;858:34:61;;;;;;;;;;;;;;;-1:-1:-1;910:7:61;;;778:147::o;386:169::-;446:7;478;;;504;;;;496:32;;;;;-1:-1:-1;;;496:32:61;;;;;;;;;;;;-1:-1:-1;;;496:32:61;;;;;;;;;;;;;;;546:1;386:169;-1:-1:-1;;;386:169:61:o",
"source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./interfaces/IERC20Token.sol\";\r\nimport \"../utility/Utils.sol\";\r\nimport \"../utility/SafeMath.sol\";\r\n\r\n/**\r\n * @dev ERC20 Standard Token implementation\r\n*/\r\ncontract ERC20Token is IERC20Token, Utils {\r\n using SafeMath for uint256;\r\n\r\n\r\n string public override name;\r\n string public override symbol;\r\n uint8 public override decimals;\r\n uint256 public override totalSupply;\r\n mapping (address => uint256) public override balanceOf;\r\n mapping (address => mapping (address => uint256)) public override allowance;\r\n\r\n /**\r\n * @dev triggered when tokens are transferred between wallets\r\n *\r\n * @param _from source address\r\n * @param _to target address\r\n * @param _value transfer amount\r\n */\r\n event Transfer(address indexed _from, address indexed _to, uint256 _value);\r\n\r\n /**\r\n * @dev triggered when a wallet allows another wallet to transfer tokens from on its behalf\r\n *\r\n * @param _owner wallet that approves the allowance\r\n * @param _spender wallet that receives the allowance\r\n * @param _value allowance amount\r\n */\r\n event Approval(address indexed _owner, address indexed _spender, uint256 _value);\r\n\r\n /**\r\n * @dev initializes a new ERC20Token instance\r\n *\r\n * @param _name token name\r\n * @param _symbol token symbol\r\n * @param _decimals decimal points, for display purposes\r\n * @param _totalSupply total supply of token units\r\n */\r\n constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _totalSupply) public {\r\n // validate input\r\n require(bytes(_name).length > 0, \"ERR_INVALID_NAME\");\r\n require(bytes(_symbol).length > 0, \"ERR_INVALID_SYMBOL\");\r\n\r\n name = _name;\r\n symbol = _symbol;\r\n decimals = _decimals;\r\n totalSupply = _totalSupply;\r\n balanceOf[msg.sender] = _totalSupply;\r\n }\r\n\r\n /**\r\n * @dev transfers tokens to a given address\r\n * throws on any error rather then return a false flag to minimize user errors\r\n *\r\n * @param _to target address\r\n * @param _value transfer amount\r\n *\r\n * @return true if the transfer was successful, false if it wasn't\r\n */\r\n function transfer(address _to, uint256 _value)\r\n public\r\n virtual\r\n override\r\n validAddress(_to)\r\n returns (bool)\r\n {\r\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value);\r\n balanceOf[_to] = balanceOf[_to].add(_value);\r\n emit Transfer(msg.sender, _to, _value);\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev transfers tokens to a given address on behalf of another address\r\n * throws on any error rather then return a false flag to minimize user errors\r\n *\r\n * @param _from source address\r\n * @param _to target address\r\n * @param _value transfer amount\r\n *\r\n * @return true if the transfer was successful, false if it wasn't\r\n */\r\n function transferFrom(address _from, address _to, uint256 _value)\r\n public\r\n virtual\r\n override\r\n validAddress(_from)\r\n validAddress(_to)\r\n returns (bool)\r\n {\r\n allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value);\r\n balanceOf[_from] = balanceOf[_from].sub(_value);\r\n balanceOf[_to] = balanceOf[_to].add(_value);\r\n emit Transfer(_from, _to, _value);\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev allows another account/contract to transfers tokens on behalf of the caller\r\n * throws on any error rather then return a false flag to minimize user errors\r\n *\r\n * also, to minimize the risk of the approve/transferFrom attack vector\r\n *
"sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/ERC20Token.sol",
"ast": {
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/ERC20Token.sol",
"exportedSymbols": {
"ERC20Token": [
20617
]
},
"id": 20618,
"license": "SEE LICENSE IN LICENSE",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 20341,
"literals": [
"solidity",
"0.6",
".12"
],
"nodeType": "PragmaDirective",
"src": "52:23:48"
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol",
"file": "./interfaces/IERC20Token.sol",
"id": 20342,
"nodeType": "ImportDirective",
"scope": 20618,
"sourceUnit": 21463,
"src": "77:38:48",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol",
"file": "../utility/Utils.sol",
"id": 20343,
"nodeType": "ImportDirective",
"scope": 20618,
"sourceUnit": 22997,
"src": "117:30:48",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol",
"file": "../utility/SafeMath.sol",
"id": 20344,
"nodeType": "ImportDirective",
"scope": 20618,
"sourceUnit": 22690,
"src": "149:33:48",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 20346,
"name": "IERC20Token",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21462,
"src": "264:11:48",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21462",
"typeString": "contract IERC20Token"
}
},
"id": 20347,
"nodeType": "InheritanceSpecifier",
"src": "264:11:48"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 20348,
"name": "Utils",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 22996,
"src": "277:5:48",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Utils_$22996",
"typeString": "contract Utils"
}
},
"id": 20349,
"nodeType": "InheritanceSpecifier",
"src": "277:5:48"
}
],
"contractDependencies": [
21462,
22996
],
"contractKind": "contract",
"documentation": {
"id": 20345,
"nodeType": "StructuredDocumentation",
"src": "186:53:48",
"text": " @dev ERC20 Standard Token implementation"
},
"fullyImplemented": true,
"id": 20617,
"linearizedBaseContracts": [
20617,
22996,
21462
],
"name": "ERC20Token",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 20352,
"libraryName": {
"contractScope": null,
"id": 20350,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 22689,
"src": "296:8:48",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$22689",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "290:27:48",
"typeName": {
"id": 20351,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "309:7:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"baseFunctions": [
21401
],
"constant": false,
"functionSelector": "06fdde03",
"id": 20355,
"mutability": "mutable",
"name": "name",
"nodeType": "VariableDeclaration",
"overrides": {
"id": 20354,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "341:8:48"
},
"scope": 20617,
"src": "327:27:48",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string"
},
"typeName": {
"id": 20353,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "327:6:48",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "public"
},
{
"baseFunctions": [
21406
],
"constant": false,
"functionSelector": "95d89b41",
"id": 20358,
"mutability": "mutable",
"name": "symbol",
"nodeType": "VariableDeclaration",
"overrides": {
"id": 20357,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "375:8:48"
},
"scope": 20617,
"src": "361:29:48",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string"
},
"typeName": {
"id": 20356,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "361:6:48",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "public"
},
{
"baseFunctions": [
21411
],
"constant": false,
"functionSelector": "313ce567",
"id": 20361,
"mutability": "mutable",
"name": "decimals",
"nodeType": "VariableDeclaration",
"overrides": {
"id": 20360,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "410:8:48"
},
"scope": 20617,
"src": "397:30:48",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 20359,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "397:5:48",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "public"
},
{
"baseFunctions": [
21416
],
"constant": false,
"functionSelector": "18160ddd",
"id": 20364,
"mutability": "mutable",
"name": "totalSupply",
"nodeType": "VariableDeclaration",
"overrides": {
"id": 20363,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "449:8:48"
},
"scope": 20617,
"src": "434:35:48",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 20362,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "434:7:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"baseFunctions": [
21423
],
"constant": false,
"functionSelector": "70a08231",
"id": 20369,
"mutability": "mutable",
"name": "balanceOf",
"nodeType": "VariableDeclaration",
"overrides": {
"id": 20368,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "512:8:48"
},
"scope": 20617,
"src": "476:54:48",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"typeName": {
"id": 20367,
"keyType": {
"id": 20365,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "485:7:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "476:28:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 20366,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "496:7:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "public"
},
{
"baseFunctions": [
21432
],
"constant": false,
"functionSelector": "dd62ed3e",
"id": 20376,
"mutability": "mutable",
"name": "allowance",
"nodeType": "VariableDeclaration",
"overrides": {
"id": 20375,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "594:8:48"
},
"scope": 20617,
"src": "537:75:48",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
},
"typeName": {
"id": 20374,
"keyType": {
"id": 20370,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "546:7:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "537:49:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
},
"valueType": {
"id": 20373,
"keyType": {
"id": 20371,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "566:7:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "557:28:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 20372,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "577:7:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
}
},
"value": null,
"visibility": "public"
},
{
"anonymous": false,
"documentation": {
"id": 20377,
"nodeType": "StructuredDocumentation",
"src": "621:209:48",
"text": " @dev triggered when tokens are transferred between wallets\n @param _from source address\n @param _to target address\n @param _value transfer amount"
},
"id": 20385,
"name": "Transfer",
"nodeType": "EventDefinition",
"parameters": {
"id": 20384,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20379,
"indexed": true,
"mutability": "mutable",
"name": "_from",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20385,
"src": "851:21:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20378,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "851:7:48",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20381,
"indexed": true,
"mutability": "mutable",
"name": "_to",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20385,
"src": "874:19:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20380,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "874:7:48",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20383,
"indexed": false,
"mutability": "mutable",
"name": "_value",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20385,
"src": "895:14:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 20382,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "895:7:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "850:60:48"
},
"src": "836:75:48"
},
{
"anonymous": false,
"documentation": {
"id": 20386,
"nodeType": "StructuredDocumentation",
"src": "919:280:48",
"text": " @dev triggered when a wallet allows another wallet to transfer tokens from on its behalf\n @param _owner wallet that approves the allowance\n @param _spender wallet that receives the allowance\n @param _value allowance amount"
},
"id": 20394,
"name": "Approval",
"nodeType": "EventDefinition",
"parameters": {
"id": 20393,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20388,
"indexed": true,
"mutability": "mutable",
"name": "_owner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20394,
"src": "1220:22:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20387,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1220:7:48",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20390,
"indexed": true,
"mutability": "mutable",
"name": "_spender",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20394,
"src": "1244:24:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20389,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1244:7:48",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20392,
"indexed": false,
"mutability": "mutable",
"name": "_value",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20394,
"src": "1270:14:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 20391,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1270:7:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1219:66:48"
},
"src": "1205:81:48"
},
{
"body": {
"id": 20451,
"nodeType": "Block",
"src": "1679:332:48",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 20413,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 20409,
"name": "_name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20397,
"src": "1731:5:48",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 20408,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1725:5:48",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
"typeString": "type(bytes storage pointer)"
},
"typeName": {
"id": 20407,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1725:5:48",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 20410,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1725:12:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 20411,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1725:19:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 20412,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1747:1:48",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1725:23:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f494e56414c49445f4e414d45",
"id": 20414,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1750:18:48",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246",
"typeString": "literal_string \"ERR_INVALID_NAME\""
},
"value": "ERR_INVALID_NAME"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246",
"typeString": "literal_string \"ERR_INVALID_NAME\""
}
],
"id": 20406,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1717:7:48",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 20415,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1717:52:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 20416,
"nodeType": "ExpressionStatement",
"src": "1717:52:48"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 20424,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 20420,
"name": "_symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20399,
"src": "1794:7:48",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 20419,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1788:5:48",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
"typeString": "type(bytes storage pointer)"
},
"typeName": {
"id": 20418,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1788:5:48",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 20421,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1788:14:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 20422,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1788:21:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 20423,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1812:1:48",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1788:25:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f494e56414c49445f53594d424f4c",
"id": 20425,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1815:20:48",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8cbe13dffb618f268f4d803a75787a665744c462e7a6ba0f32e015df7f7a2fda",
"typeString": "literal_string \"ERR_INVALID_SYMBOL\""
},
"value": "ERR_INVALID_SYMBOL"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8cbe13dffb618f268f4d803a75787a665744c462e7a6ba0f32e015df7f7a2fda",
"typeString": "literal_string \"ERR_INVALID_SYMBOL\""
}
],
"id": 20417,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1780:7:48",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 20426,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1780:56:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 20427,
"nodeType": "ExpressionStatement",
"src": "1780:56:48"
},
{
"expression": {
"argumentTypes": null,
"id": 20430,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 20428,
"name": "name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20355,
"src": "1849:4:48",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 20429,
"name": "_name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20397,
"src": "1856:5:48",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"src": "1849:12:48",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"id": 20431,
"nodeType": "ExpressionStatement",
"src": "1849:12:48"
},
{
"expression": {
"argumentTypes": null,
"id": 20434,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 20432,
"name": "symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20358,
"src": "1872:6:48",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 20433,
"name": "_symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20399,
"src": "1881:7:48",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"src": "1872:16:48",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"id": 20435,
"nodeType": "ExpressionStatement",
"src": "1872:16:48"
},
{
"expression": {
"argumentTypes": null,
"id": 20438,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 20436,
"name": "decimals",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20361,
"src": "1899:8:48",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 20437,
"name": "_decimals",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20401,
"src": "1910:9:48",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "1899:20:48",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 20439,
"nodeType": "ExpressionStatement",
"src": "1899:20:48"
},
{
"expression": {
"argumentTypes": null,
"id": 20442,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 20440,
"name": "totalSupply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20364,
"src": "1930:11:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 20441,
"name": "_totalSupply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20403,
"src": "1944:12:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1930:26:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20443,
"nodeType": "ExpressionStatement",
"src": "1930:26:48"
},
{
"expression": {
"argumentTypes": null,
"id": 20449,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20444,
"name": "balanceOf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20369,
"src": "1967:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20447,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 20445,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "1977:3:48",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 20446,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1977:10:48",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1967:21:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 20448,
"name": "_totalSupply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20403,
"src": "1991:12:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1967:36:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20450,
"nodeType": "ExpressionStatement",
"src": "1967:36:48"
}
]
},
"documentation": {
"id": 20395,
"nodeType": "StructuredDocumentation",
"src": "1294:277:48",
"text": " @dev initializes a new ERC20Token instance\n @param _name token name\n @param _symbol token symbol\n @param _decimals decimal points, for display purposes\n @param _totalSupply total supply of token units"
},
"id": 20452,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 20404,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20397,
"mutability": "mutable",
"name": "_name",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20452,
"src": "1589:19:48",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 20396,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1589:6:48",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20399,
"mutability": "mutable",
"name": "_symbol",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20452,
"src": "1610:21:48",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 20398,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1610:6:48",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20401,
"mutability": "mutable",
"name": "_decimals",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20452,
"src": "1633:15:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 20400,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "1633:5:48",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20403,
"mutability": "mutable",
"name": "_totalSupply",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20452,
"src": "1650:20:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 20402,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1650:7:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1588:83:48"
},
"returnParameters": {
"id": 20405,
"nodeType": "ParameterList",
"parameters": [],
"src": "1679:0:48"
},
"scope": 20617,
"src": "1577:434:48",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"baseFunctions": [
21441
],
"body": {
"id": 20499,
"nodeType": "Block",
"src": "2497:201:48",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 20477,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20466,
"name": "balanceOf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20369,
"src": "2508:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20469,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 20467,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "2518:3:48",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 20468,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2518:10:48",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2508:21:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 20475,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20457,
"src": "2558:6:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20470,
"name": "balanceOf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20369,
"src": "2532:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20473,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 20471,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "2542:3:48",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 20472,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2542:10:48",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2532:21:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20474,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 22628,
"src": "2532:25:48",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 20476,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2532:33:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2508:57:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20478,
"nodeType": "ExpressionStatement",
"src": "2508:57:48"
},
{
"expression": {
"argumentTypes": null,
"id": 20488,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20479,
"name": "balanceOf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20369,
"src": "2576:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20481,
"indexExpression": {
"argumentTypes": null,
"id": 20480,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20455,
"src": "2586:3:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2576:14:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 20486,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20457,
"src": "2612:6:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20482,
"name": "balanceOf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20369,
"src": "2593:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20484,
"indexExpression": {
"argumentTypes": null,
"id": 20483,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20455,
"src": "2603:3:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2593:14:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20485,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 22606,
"src": "2593:18:48",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 20487,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2593:26:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2576:43:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20489,
"nodeType": "ExpressionStatement",
"src": "2576:43:48"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 20491,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "2644:3:48",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 20492,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2644:10:48",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 20493,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20455,
"src": "2656:3:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 20494,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20457,
"src": "2661:6:48",
"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": 20490,
"name": "Transfer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20385,
"src": "2635:8:48",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 20495,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2635:33:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 20496,
"nodeType": "EmitStatement",
"src": "2630:38:48"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 20497,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2686:4:48",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 20465,
"id": 20498,
"nodeType": "Return",
"src": "2679:11:48"
}
]
},
"documentation": {
"id": 20453,
"nodeType": "StructuredDocumentation",
"src": "2019:318:48",
"text": " @dev transfers tokens to a given address\n throws on any error rather then return a false flag to minimize user errors\n @param _to target address\n @param _value transfer amount\n @return true if the transfer was successful, false if it wasn't"
},
"functionSelector": "a9059cbb",
"id": 20500,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": [
{
"argumentTypes": null,
"id": 20461,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20455,
"src": "2463:3:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"id": 20462,
"modifierName": {
"argumentTypes": null,
"id": 20460,
"name": "validAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22953,
"src": "2450:12:48",
"typeDescriptions": {
"typeIdentifier": "t_modifier$_t_address_$",
"typeString": "modifier (address)"
}
},
"nodeType": "ModifierInvocation",
"src": "2450:17:48"
}
],
"name": "transfer",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 20459,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "2432:8:48"
},
"parameters": {
"id": 20458,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20455,
"mutability": "mutable",
"name": "_to",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20500,
"src": "2361:11:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20454,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2361:7:48",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20457,
"mutability": "mutable",
"name": "_value",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20500,
"src": "2374:14:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 20456,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2374:7:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2360:29:48"
},
"returnParameters": {
"id": 20465,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20464,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20500,
"src": "2486:4:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 20463,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2486:4:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2485:6:48"
},
"scope": 20617,
"src": "2343:355:48",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "public"
},
{
"baseFunctions": [
21452
],
"body": {
"id": 20566,
"nodeType": "Block",
"src": "3301:268:48",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 20534,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20519,
"name": "allowance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20376,
"src": "3312:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
}
},
"id": 20523,
"indexExpression": {
"argumentTypes": null,
"id": 20520,
"name": "_from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20503,
"src": "3322:5:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3312:16:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20524,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 20521,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "3329:3:48",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 20522,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3329:10:48",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "3312:28:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 20532,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20507,
"src": "3376:6:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20525,
"name": "allowance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20376,
"src": "3343:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
}
},
"id": 20527,
"indexExpression": {
"argumentTypes": null,
"id": 20526,
"name": "_from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20503,
"src": "3353:5:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3343:16:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20530,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 20528,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "3360:3:48",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 20529,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3360:10:48",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3343:28:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20531,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 22628,
"src": "3343:32:48",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 20533,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3343:40:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3312:71:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20535,
"nodeType": "ExpressionStatement",
"src": "3312:71:48"
},
{
"expression": {
"argumentTypes": null,
"id": 20545,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20536,
"name": "balanceOf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20369,
"src": "3394:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20538,
"indexExpression": {
"argumentTypes": null,
"id": 20537,
"name": "_from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20503,
"src": "3404:5:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "3394:16:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 20543,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20507,
"src": "3434:6:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20539,
"name": "balanceOf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20369,
"src": "3413:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20541,
"indexExpression": {
"argumentTypes": null,
"id": 20540,
"name": "_from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20503,
"src": "3423:5:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3413:16:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20542,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 22628,
"src": "3413:20:48",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 20544,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3413:28:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3394:47:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20546,
"nodeType": "ExpressionStatement",
"src": "3394:47:48"
},
{
"expression": {
"argumentTypes": null,
"id": 20556,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20547,
"name": "balanceOf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20369,
"src": "3452:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20549,
"indexExpression": {
"argumentTypes": null,
"id": 20548,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20505,
"src": "3462:3:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "3452:14:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 20554,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20507,
"src": "3488:6:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20550,
"name": "balanceOf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20369,
"src": "3469:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20552,
"indexExpression": {
"argumentTypes": null,
"id": 20551,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20505,
"src": "3479:3:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3469:14:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20553,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 22606,
"src": "3469:18:48",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 20555,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3469:26:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3452:43:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20557,
"nodeType": "ExpressionStatement",
"src": "3452:43:48"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 20559,
"name": "_from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20503,
"src": "3520:5:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 20560,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20505,
"src": "3527:3:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 20561,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20507,
"src": "3532:6:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 20558,
"name": "Transfer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20385,
"src": "3511:8:48",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 20562,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3511:28:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 20563,
"nodeType": "EmitStatement",
"src": "3506:33:48"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 20564,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3557:4:48",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 20518,
"id": 20565,
"nodeType": "Return",
"src": "3550:11:48"
}
]
},
"documentation": {
"id": 20501,
"nodeType": "StructuredDocumentation",
"src": "2706:387:48",
"text": " @dev transfers tokens to a given address on behalf of another address\n throws on any error rather then return a false flag to minimize user errors\n @param _from source address\n @param _to target address\n @param _value transfer amount\n @return true if the transfer was successful, false if it wasn't"
},
"functionSelector": "23b872dd",
"id": 20567,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": [
{
"argumentTypes": null,
"id": 20511,
"name": "_from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20503,
"src": "3238:5:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"id": 20512,
"modifierName": {
"argumentTypes": null,
"id": 20510,
"name": "validAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22953,
"src": "3225:12:48",
"typeDescriptions": {
"typeIdentifier": "t_modifier$_t_address_$",
"typeString": "modifier (address)"
}
},
"nodeType": "ModifierInvocation",
"src": "3225:19:48"
},
{
"arguments": [
{
"argumentTypes": null,
"id": 20514,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20505,
"src": "3267:3:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"id": 20515,
"modifierName": {
"argumentTypes": null,
"id": 20513,
"name": "validAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22953,
"src": "3254:12:48",
"typeDescriptions": {
"typeIdentifier": "t_modifier$_t_address_$",
"typeString": "modifier (address)"
}
},
"nodeType": "ModifierInvocation",
"src": "3254:17:48"
}
],
"name": "transferFrom",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 20509,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "3207:8:48"
},
"parameters": {
"id": 20508,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20503,
"mutability": "mutable",
"name": "_from",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20567,
"src": "3121:13:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20502,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3121:7:48",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20505,
"mutability": "mutable",
"name": "_to",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20567,
"src": "3136:11:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20504,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3136:7:48",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20507,
"mutability": "mutable",
"name": "_value",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20567,
"src": "3149:14:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 20506,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3149:7:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3120:44:48"
},
"returnParameters": {
"id": 20518,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20517,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20567,
"src": "3290:4:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 20516,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "3290:4:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3289:6:48"
},
"scope": 20617,
"src": "3099:470:48",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "public"
},
{
"baseFunctions": [
21461
],
"body": {
"id": 20615,
"nodeType": "Block",
"src": "4447:356:48",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 20593,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 20584,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 20582,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20572,
"src": "4592:6:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 20583,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4602:1:48",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "4592:11:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 20592,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20585,
"name": "allowance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20376,
"src": "4607:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
}
},
"id": 20588,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 20586,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "4617:3:48",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 20587,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "4617:10:48",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "4607:21:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20590,
"indexExpression": {
"argumentTypes": null,
"id": 20589,
"name": "_spender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20570,
"src": "4629:8:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "4607:31:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 20591,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4642:1:48",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "4607:36:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "4592:51:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f494e56414c49445f414d4f554e54",
"id": 20594,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4645:20:48",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839",
"typeString": "literal_string \"ERR_INVALID_AMOUNT\""
},
"value": "ERR_INVALID_AMOUNT"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839",
"typeString": "literal_string \"ERR_INVALID_AMOUNT\""
}
],
"id": 20581,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "4584:7:48",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 20595,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4584:82:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 20596,
"nodeType": "ExpressionStatement",
"src": "4584:82:48"
},
{
"expression": {
"argumentTypes": null,
"id": 20604,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20597,
"name": "allowance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20376,
"src": "4679:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
}
},
"id": 20601,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 20598,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "4689:3:48",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 20599,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "4689:10:48",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "4679:21:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20602,
"indexExpression": {
"argumentTypes": null,
"id": 20600,
"name": "_spender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20570,
"src": "4701:8:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "4679:31:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 20603,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20572,
"src": "4713:6:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4679:40:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20605,
"nodeType": "ExpressionStatement",
"src": "4679:40:48"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 20607,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "4744:3:48",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 20608,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "4744:10:48",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 20609,
"name": "_spender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20570,
"src": "4756:8:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 20610,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20572,
"src": "4766:6:48",
"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": 20606,
"name": "Approval",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20394,
"src": "4735:8:48",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 20611,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4735:38:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 20612,
"nodeType": "EmitStatement",
"src": "4730:43:48"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 20613,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4791:4:48",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 20580,
"id": 20614,
"nodeType": "Return",
"src": "4784:11:48"
}
]
},
"documentation": {
"id": 20568,
"nodeType": "StructuredDocumentation",
"src": "3577:701:48",
"text": " @dev allows another account/contract to transfers tokens on behalf of the caller\n throws on any error rather then return a false flag to minimize user errors\n also, to minimize the risk of the approve/transferFrom attack vector\n (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\n in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\n @param _spender approved address\n @param _value allowance amount\n @return true if the approval was successful, false if it wasn't"
},
"functionSelector": "095ea7b3",
"id": 20616,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": [
{
"argumentTypes": null,
"id": 20576,
"name": "_spender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20570,
"src": "4408:8:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"id": 20577,
"modifierName": {
"argumentTypes": null,
"id": 20575,
"name": "validAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22953,
"src": "4395:12:48",
"typeDescriptions": {
"typeIdentifier": "t_modifier$_t_address_$",
"typeString": "modifier (address)"
}
},
"nodeType": "ModifierInvocation",
"src": "4395:22:48"
}
],
"name": "approve",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 20574,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "4377:8:48"
},
"parameters": {
"id": 20573,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20570,
"mutability": "mutable",
"name": "_spender",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20616,
"src": "4301:16:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20569,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4301:7:48",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20572,
"mutability": "mutable",
"name": "_value",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20616,
"src": "4319:14:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 20571,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4319:7:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "4300:34:48"
},
"returnParameters": {
"id": 20580,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20579,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20616,
"src": "4436:4:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 20578,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "4436:4:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "4435:6:48"
},
"scope": 20617,
"src": "4284:519:48",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "public"
}
],
"scope": 20618,
"src": "241:4565:48"
}
],
"src": "52:4756:48"
},
"legacyAST": {
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/ERC20Token.sol",
"exportedSymbols": {
"ERC20Token": [
20617
]
},
"id": 20618,
"license": "SEE LICENSE IN LICENSE",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 20341,
"literals": [
"solidity",
"0.6",
".12"
],
"nodeType": "PragmaDirective",
"src": "52:23:48"
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol",
"file": "./interfaces/IERC20Token.sol",
"id": 20342,
"nodeType": "ImportDirective",
"scope": 20618,
"sourceUnit": 21463,
"src": "77:38:48",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol",
"file": "../utility/Utils.sol",
"id": 20343,
"nodeType": "ImportDirective",
"scope": 20618,
"sourceUnit": 22997,
"src": "117:30:48",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol",
"file": "../utility/SafeMath.sol",
"id": 20344,
"nodeType": "ImportDirective",
"scope": 20618,
"sourceUnit": 22690,
"src": "149:33:48",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 20346,
"name": "IERC20Token",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21462,
"src": "264:11:48",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21462",
"typeString": "contract IERC20Token"
}
},
"id": 20347,
"nodeType": "InheritanceSpecifier",
"src": "264:11:48"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 20348,
"name": "Utils",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 22996,
"src": "277:5:48",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Utils_$22996",
"typeString": "contract Utils"
}
},
"id": 20349,
"nodeType": "InheritanceSpecifier",
"src": "277:5:48"
}
],
"contractDependencies": [
21462,
22996
],
"contractKind": "contract",
"documentation": {
"id": 20345,
"nodeType": "StructuredDocumentation",
"src": "186:53:48",
"text": " @dev ERC20 Standard Token implementation"
},
"fullyImplemented": true,
"id": 20617,
"linearizedBaseContracts": [
20617,
22996,
21462
],
"name": "ERC20Token",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 20352,
"libraryName": {
"contractScope": null,
"id": 20350,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 22689,
"src": "296:8:48",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$22689",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "290:27:48",
"typeName": {
"id": 20351,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "309:7:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"baseFunctions": [
21401
],
"constant": false,
"functionSelector": "06fdde03",
"id": 20355,
"mutability": "mutable",
"name": "name",
"nodeType": "VariableDeclaration",
"overrides": {
"id": 20354,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "341:8:48"
},
"scope": 20617,
"src": "327:27:48",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string"
},
"typeName": {
"id": 20353,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "327:6:48",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "public"
},
{
"baseFunctions": [
21406
],
"constant": false,
"functionSelector": "95d89b41",
"id": 20358,
"mutability": "mutable",
"name": "symbol",
"nodeType": "VariableDeclaration",
"overrides": {
"id": 20357,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "375:8:48"
},
"scope": 20617,
"src": "361:29:48",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string"
},
"typeName": {
"id": 20356,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "361:6:48",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "public"
},
{
"baseFunctions": [
21411
],
"constant": false,
"functionSelector": "313ce567",
"id": 20361,
"mutability": "mutable",
"name": "decimals",
"nodeType": "VariableDeclaration",
"overrides": {
"id": 20360,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "410:8:48"
},
"scope": 20617,
"src": "397:30:48",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 20359,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "397:5:48",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "public"
},
{
"baseFunctions": [
21416
],
"constant": false,
"functionSelector": "18160ddd",
"id": 20364,
"mutability": "mutable",
"name": "totalSupply",
"nodeType": "VariableDeclaration",
"overrides": {
"id": 20363,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "449:8:48"
},
"scope": 20617,
"src": "434:35:48",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 20362,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "434:7:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"baseFunctions": [
21423
],
"constant": false,
"functionSelector": "70a08231",
"id": 20369,
"mutability": "mutable",
"name": "balanceOf",
"nodeType": "VariableDeclaration",
"overrides": {
"id": 20368,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "512:8:48"
},
"scope": 20617,
"src": "476:54:48",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"typeName": {
"id": 20367,
"keyType": {
"id": 20365,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "485:7:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "476:28:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 20366,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "496:7:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "public"
},
{
"baseFunctions": [
21432
],
"constant": false,
"functionSelector": "dd62ed3e",
"id": 20376,
"mutability": "mutable",
"name": "allowance",
"nodeType": "VariableDeclaration",
"overrides": {
"id": 20375,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "594:8:48"
},
"scope": 20617,
"src": "537:75:48",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
},
"typeName": {
"id": 20374,
"keyType": {
"id": 20370,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "546:7:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "537:49:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
},
"valueType": {
"id": 20373,
"keyType": {
"id": 20371,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "566:7:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "557:28:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 20372,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "577:7:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
}
},
"value": null,
"visibility": "public"
},
{
"anonymous": false,
"documentation": {
"id": 20377,
"nodeType": "StructuredDocumentation",
"src": "621:209:48",
"text": " @dev triggered when tokens are transferred between wallets\n @param _from source address\n @param _to target address\n @param _value transfer amount"
},
"id": 20385,
"name": "Transfer",
"nodeType": "EventDefinition",
"parameters": {
"id": 20384,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20379,
"indexed": true,
"mutability": "mutable",
"name": "_from",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20385,
"src": "851:21:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20378,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "851:7:48",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20381,
"indexed": true,
"mutability": "mutable",
"name": "_to",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20385,
"src": "874:19:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20380,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "874:7:48",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20383,
"indexed": false,
"mutability": "mutable",
"name": "_value",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20385,
"src": "895:14:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 20382,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "895:7:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "850:60:48"
},
"src": "836:75:48"
},
{
"anonymous": false,
"documentation": {
"id": 20386,
"nodeType": "StructuredDocumentation",
"src": "919:280:48",
"text": " @dev triggered when a wallet allows another wallet to transfer tokens from on its behalf\n @param _owner wallet that approves the allowance\n @param _spender wallet that receives the allowance\n @param _value allowance amount"
},
"id": 20394,
"name": "Approval",
"nodeType": "EventDefinition",
"parameters": {
"id": 20393,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20388,
"indexed": true,
"mutability": "mutable",
"name": "_owner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20394,
"src": "1220:22:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20387,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1220:7:48",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20390,
"indexed": true,
"mutability": "mutable",
"name": "_spender",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20394,
"src": "1244:24:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20389,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1244:7:48",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20392,
"indexed": false,
"mutability": "mutable",
"name": "_value",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20394,
"src": "1270:14:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 20391,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1270:7:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1219:66:48"
},
"src": "1205:81:48"
},
{
"body": {
"id": 20451,
"nodeType": "Block",
"src": "1679:332:48",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 20413,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 20409,
"name": "_name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20397,
"src": "1731:5:48",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 20408,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1725:5:48",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
"typeString": "type(bytes storage pointer)"
},
"typeName": {
"id": 20407,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1725:5:48",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 20410,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1725:12:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 20411,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1725:19:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 20412,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1747:1:48",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1725:23:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f494e56414c49445f4e414d45",
"id": 20414,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1750:18:48",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246",
"typeString": "literal_string \"ERR_INVALID_NAME\""
},
"value": "ERR_INVALID_NAME"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246",
"typeString": "literal_string \"ERR_INVALID_NAME\""
}
],
"id": 20406,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1717:7:48",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 20415,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1717:52:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 20416,
"nodeType": "ExpressionStatement",
"src": "1717:52:48"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 20424,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 20420,
"name": "_symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20399,
"src": "1794:7:48",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"id": 20419,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1788:5:48",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
"typeString": "type(bytes storage pointer)"
},
"typeName": {
"id": 20418,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1788:5:48",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 20421,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1788:14:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 20422,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1788:21:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 20423,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1812:1:48",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1788:25:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f494e56414c49445f53594d424f4c",
"id": 20425,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1815:20:48",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8cbe13dffb618f268f4d803a75787a665744c462e7a6ba0f32e015df7f7a2fda",
"typeString": "literal_string \"ERR_INVALID_SYMBOL\""
},
"value": "ERR_INVALID_SYMBOL"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8cbe13dffb618f268f4d803a75787a665744c462e7a6ba0f32e015df7f7a2fda",
"typeString": "literal_string \"ERR_INVALID_SYMBOL\""
}
],
"id": 20417,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1780:7:48",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 20426,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1780:56:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 20427,
"nodeType": "ExpressionStatement",
"src": "1780:56:48"
},
{
"expression": {
"argumentTypes": null,
"id": 20430,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 20428,
"name": "name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20355,
"src": "1849:4:48",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 20429,
"name": "_name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20397,
"src": "1856:5:48",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"src": "1849:12:48",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"id": 20431,
"nodeType": "ExpressionStatement",
"src": "1849:12:48"
},
{
"expression": {
"argumentTypes": null,
"id": 20434,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 20432,
"name": "symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20358,
"src": "1872:6:48",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 20433,
"name": "_symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20399,
"src": "1881:7:48",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"src": "1872:16:48",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"id": 20435,
"nodeType": "ExpressionStatement",
"src": "1872:16:48"
},
{
"expression": {
"argumentTypes": null,
"id": 20438,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 20436,
"name": "decimals",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20361,
"src": "1899:8:48",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 20437,
"name": "_decimals",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20401,
"src": "1910:9:48",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "1899:20:48",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 20439,
"nodeType": "ExpressionStatement",
"src": "1899:20:48"
},
{
"expression": {
"argumentTypes": null,
"id": 20442,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 20440,
"name": "totalSupply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20364,
"src": "1930:11:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 20441,
"name": "_totalSupply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20403,
"src": "1944:12:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1930:26:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20443,
"nodeType": "ExpressionStatement",
"src": "1930:26:48"
},
{
"expression": {
"argumentTypes": null,
"id": 20449,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20444,
"name": "balanceOf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20369,
"src": "1967:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20447,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 20445,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "1977:3:48",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 20446,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1977:10:48",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1967:21:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 20448,
"name": "_totalSupply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20403,
"src": "1991:12:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1967:36:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20450,
"nodeType": "ExpressionStatement",
"src": "1967:36:48"
}
]
},
"documentation": {
"id": 20395,
"nodeType": "StructuredDocumentation",
"src": "1294:277:48",
"text": " @dev initializes a new ERC20Token instance\n @param _name token name\n @param _symbol token symbol\n @param _decimals decimal points, for display purposes\n @param _totalSupply total supply of token units"
},
"id": 20452,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 20404,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20397,
"mutability": "mutable",
"name": "_name",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20452,
"src": "1589:19:48",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 20396,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1589:6:48",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20399,
"mutability": "mutable",
"name": "_symbol",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20452,
"src": "1610:21:48",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 20398,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1610:6:48",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20401,
"mutability": "mutable",
"name": "_decimals",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20452,
"src": "1633:15:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 20400,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "1633:5:48",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20403,
"mutability": "mutable",
"name": "_totalSupply",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20452,
"src": "1650:20:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 20402,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1650:7:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1588:83:48"
},
"returnParameters": {
"id": 20405,
"nodeType": "ParameterList",
"parameters": [],
"src": "1679:0:48"
},
"scope": 20617,
"src": "1577:434:48",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"baseFunctions": [
21441
],
"body": {
"id": 20499,
"nodeType": "Block",
"src": "2497:201:48",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 20477,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20466,
"name": "balanceOf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20369,
"src": "2508:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20469,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 20467,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "2518:3:48",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 20468,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2518:10:48",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2508:21:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 20475,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20457,
"src": "2558:6:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20470,
"name": "balanceOf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20369,
"src": "2532:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20473,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 20471,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "2542:3:48",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 20472,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2542:10:48",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2532:21:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20474,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 22628,
"src": "2532:25:48",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 20476,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2532:33:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2508:57:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20478,
"nodeType": "ExpressionStatement",
"src": "2508:57:48"
},
{
"expression": {
"argumentTypes": null,
"id": 20488,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20479,
"name": "balanceOf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20369,
"src": "2576:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20481,
"indexExpression": {
"argumentTypes": null,
"id": 20480,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20455,
"src": "2586:3:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2576:14:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 20486,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20457,
"src": "2612:6:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20482,
"name": "balanceOf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20369,
"src": "2593:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20484,
"indexExpression": {
"argumentTypes": null,
"id": 20483,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20455,
"src": "2603:3:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2593:14:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20485,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 22606,
"src": "2593:18:48",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 20487,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2593:26:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2576:43:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20489,
"nodeType": "ExpressionStatement",
"src": "2576:43:48"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 20491,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "2644:3:48",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 20492,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2644:10:48",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 20493,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20455,
"src": "2656:3:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 20494,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20457,
"src": "2661:6:48",
"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": 20490,
"name": "Transfer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20385,
"src": "2635:8:48",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 20495,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2635:33:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 20496,
"nodeType": "EmitStatement",
"src": "2630:38:48"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 20497,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2686:4:48",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 20465,
"id": 20498,
"nodeType": "Return",
"src": "2679:11:48"
}
]
},
"documentation": {
"id": 20453,
"nodeType": "StructuredDocumentation",
"src": "2019:318:48",
"text": " @dev transfers tokens to a given address\n throws on any error rather then return a false flag to minimize user errors\n @param _to target address\n @param _value transfer amount\n @return true if the transfer was successful, false if it wasn't"
},
"functionSelector": "a9059cbb",
"id": 20500,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": [
{
"argumentTypes": null,
"id": 20461,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20455,
"src": "2463:3:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"id": 20462,
"modifierName": {
"argumentTypes": null,
"id": 20460,
"name": "validAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22953,
"src": "2450:12:48",
"typeDescriptions": {
"typeIdentifier": "t_modifier$_t_address_$",
"typeString": "modifier (address)"
}
},
"nodeType": "ModifierInvocation",
"src": "2450:17:48"
}
],
"name": "transfer",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 20459,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "2432:8:48"
},
"parameters": {
"id": 20458,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20455,
"mutability": "mutable",
"name": "_to",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20500,
"src": "2361:11:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20454,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2361:7:48",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20457,
"mutability": "mutable",
"name": "_value",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20500,
"src": "2374:14:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 20456,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2374:7:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2360:29:48"
},
"returnParameters": {
"id": 20465,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20464,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20500,
"src": "2486:4:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 20463,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2486:4:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2485:6:48"
},
"scope": 20617,
"src": "2343:355:48",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "public"
},
{
"baseFunctions": [
21452
],
"body": {
"id": 20566,
"nodeType": "Block",
"src": "3301:268:48",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 20534,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20519,
"name": "allowance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20376,
"src": "3312:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
}
},
"id": 20523,
"indexExpression": {
"argumentTypes": null,
"id": 20520,
"name": "_from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20503,
"src": "3322:5:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3312:16:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20524,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 20521,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "3329:3:48",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 20522,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3329:10:48",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "3312:28:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 20532,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20507,
"src": "3376:6:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20525,
"name": "allowance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20376,
"src": "3343:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
}
},
"id": 20527,
"indexExpression": {
"argumentTypes": null,
"id": 20526,
"name": "_from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20503,
"src": "3353:5:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3343:16:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20530,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 20528,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "3360:3:48",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 20529,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3360:10:48",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3343:28:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20531,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 22628,
"src": "3343:32:48",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 20533,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3343:40:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3312:71:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20535,
"nodeType": "ExpressionStatement",
"src": "3312:71:48"
},
{
"expression": {
"argumentTypes": null,
"id": 20545,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20536,
"name": "balanceOf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20369,
"src": "3394:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20538,
"indexExpression": {
"argumentTypes": null,
"id": 20537,
"name": "_from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20503,
"src": "3404:5:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "3394:16:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 20543,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20507,
"src": "3434:6:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20539,
"name": "balanceOf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20369,
"src": "3413:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20541,
"indexExpression": {
"argumentTypes": null,
"id": 20540,
"name": "_from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20503,
"src": "3423:5:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3413:16:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20542,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 22628,
"src": "3413:20:48",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 20544,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3413:28:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3394:47:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20546,
"nodeType": "ExpressionStatement",
"src": "3394:47:48"
},
{
"expression": {
"argumentTypes": null,
"id": 20556,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20547,
"name": "balanceOf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20369,
"src": "3452:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20549,
"indexExpression": {
"argumentTypes": null,
"id": 20548,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20505,
"src": "3462:3:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "3452:14:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 20554,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20507,
"src": "3488:6:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20550,
"name": "balanceOf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20369,
"src": "3469:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20552,
"indexExpression": {
"argumentTypes": null,
"id": 20551,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20505,
"src": "3479:3:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3469:14:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20553,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 22606,
"src": "3469:18:48",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 20555,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3469:26:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3452:43:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20557,
"nodeType": "ExpressionStatement",
"src": "3452:43:48"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 20559,
"name": "_from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20503,
"src": "3520:5:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 20560,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20505,
"src": "3527:3:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 20561,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20507,
"src": "3532:6:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 20558,
"name": "Transfer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20385,
"src": "3511:8:48",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 20562,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3511:28:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 20563,
"nodeType": "EmitStatement",
"src": "3506:33:48"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 20564,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3557:4:48",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 20518,
"id": 20565,
"nodeType": "Return",
"src": "3550:11:48"
}
]
},
"documentation": {
"id": 20501,
"nodeType": "StructuredDocumentation",
"src": "2706:387:48",
"text": " @dev transfers tokens to a given address on behalf of another address\n throws on any error rather then return a false flag to minimize user errors\n @param _from source address\n @param _to target address\n @param _value transfer amount\n @return true if the transfer was successful, false if it wasn't"
},
"functionSelector": "23b872dd",
"id": 20567,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": [
{
"argumentTypes": null,
"id": 20511,
"name": "_from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20503,
"src": "3238:5:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"id": 20512,
"modifierName": {
"argumentTypes": null,
"id": 20510,
"name": "validAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22953,
"src": "3225:12:48",
"typeDescriptions": {
"typeIdentifier": "t_modifier$_t_address_$",
"typeString": "modifier (address)"
}
},
"nodeType": "ModifierInvocation",
"src": "3225:19:48"
},
{
"arguments": [
{
"argumentTypes": null,
"id": 20514,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20505,
"src": "3267:3:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"id": 20515,
"modifierName": {
"argumentTypes": null,
"id": 20513,
"name": "validAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22953,
"src": "3254:12:48",
"typeDescriptions": {
"typeIdentifier": "t_modifier$_t_address_$",
"typeString": "modifier (address)"
}
},
"nodeType": "ModifierInvocation",
"src": "3254:17:48"
}
],
"name": "transferFrom",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 20509,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "3207:8:48"
},
"parameters": {
"id": 20508,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20503,
"mutability": "mutable",
"name": "_from",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20567,
"src": "3121:13:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20502,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3121:7:48",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20505,
"mutability": "mutable",
"name": "_to",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20567,
"src": "3136:11:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20504,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3136:7:48",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20507,
"mutability": "mutable",
"name": "_value",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20567,
"src": "3149:14:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 20506,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3149:7:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3120:44:48"
},
"returnParameters": {
"id": 20518,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20517,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20567,
"src": "3290:4:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 20516,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "3290:4:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3289:6:48"
},
"scope": 20617,
"src": "3099:470:48",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "public"
},
{
"baseFunctions": [
21461
],
"body": {
"id": 20615,
"nodeType": "Block",
"src": "4447:356:48",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 20593,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 20584,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 20582,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20572,
"src": "4592:6:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 20583,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4602:1:48",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "4592:11:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 20592,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20585,
"name": "allowance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20376,
"src": "4607:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
}
},
"id": 20588,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 20586,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "4617:3:48",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 20587,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "4617:10:48",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "4607:21:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20590,
"indexExpression": {
"argumentTypes": null,
"id": 20589,
"name": "_spender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20570,
"src": "4629:8:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "4607:31:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 20591,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4642:1:48",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "4607:36:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "4592:51:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f494e56414c49445f414d4f554e54",
"id": 20594,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4645:20:48",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839",
"typeString": "literal_string \"ERR_INVALID_AMOUNT\""
},
"value": "ERR_INVALID_AMOUNT"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839",
"typeString": "literal_string \"ERR_INVALID_AMOUNT\""
}
],
"id": 20581,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "4584:7:48",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 20595,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4584:82:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 20596,
"nodeType": "ExpressionStatement",
"src": "4584:82:48"
},
{
"expression": {
"argumentTypes": null,
"id": 20604,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 20597,
"name": "allowance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20376,
"src": "4679:9:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
}
},
"id": 20601,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 20598,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "4689:3:48",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 20599,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "4689:10:48",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "4679:21:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 20602,
"indexExpression": {
"argumentTypes": null,
"id": 20600,
"name": "_spender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20570,
"src": "4701:8:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "4679:31:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 20603,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20572,
"src": "4713:6:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4679:40:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20605,
"nodeType": "ExpressionStatement",
"src": "4679:40:48"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 20607,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "4744:3:48",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 20608,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "4744:10:48",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 20609,
"name": "_spender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20570,
"src": "4756:8:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 20610,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20572,
"src": "4766:6:48",
"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": 20606,
"name": "Approval",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20394,
"src": "4735:8:48",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 20611,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4735:38:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 20612,
"nodeType": "EmitStatement",
"src": "4730:43:48"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 20613,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4791:4:48",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 20580,
"id": 20614,
"nodeType": "Return",
"src": "4784:11:48"
}
]
},
"documentation": {
"id": 20568,
"nodeType": "StructuredDocumentation",
"src": "3577:701:48",
"text": " @dev allows another account/contract to transfers tokens on behalf of the caller\n throws on any error rather then return a false flag to minimize user errors\n also, to minimize the risk of the approve/transferFrom attack vector\n (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\n in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\n @param _spender approved address\n @param _value allowance amount\n @return true if the approval was successful, false if it wasn't"
},
"functionSelector": "095ea7b3",
"id": 20616,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": [
{
"argumentTypes": null,
"id": 20576,
"name": "_spender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20570,
"src": "4408:8:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"id": 20577,
"modifierName": {
"argumentTypes": null,
"id": 20575,
"name": "validAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22953,
"src": "4395:12:48",
"typeDescriptions": {
"typeIdentifier": "t_modifier$_t_address_$",
"typeString": "modifier (address)"
}
},
"nodeType": "ModifierInvocation",
"src": "4395:22:48"
}
],
"name": "approve",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 20574,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "4377:8:48"
},
"parameters": {
"id": 20573,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20570,
"mutability": "mutable",
"name": "_spender",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20616,
"src": "4301:16:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20569,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4301:7:48",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20572,
"mutability": "mutable",
"name": "_value",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20616,
"src": "4319:14:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 20571,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4319:7:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "4300:34:48"
},
"returnParameters": {
"id": 20580,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20579,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 20616,
"src": "4436:4:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 20578,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "4436:4:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "4435:6:48"
},
"scope": 20617,
"src": "4284:519:48",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "public"
}
],
"scope": 20618,
"src": "241:4565:48"
}
],
"src": "52:4756:48"
},
"compiler": {
"name": "solc",
"version": "0.6.12+commit.27d51765.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.2.3",
"updatedAt": "2020-11-10T14:20:44.727Z",
"networkType": "ethereum",
"devdoc": {
"details": "ERC20 Standard Token implementation",
"events": {
"Approval(address,address,uint256)": {
"details": "triggered when a wallet allows another wallet to transfer tokens from on its behalf",
"params": {
"_owner": "wallet that approves the allowance",
"_spender": "wallet that receives the allowance",
"_value": "allowance amount"
}
},
"Transfer(address,address,uint256)": {
"details": "triggered when tokens are transferred between wallets",
"params": {
"_from": "source address",
"_to": "target address",
"_value": "transfer amount"
}
}
},
"kind": "dev",
"methods": {
"approve(address,uint256)": {
"details": "allows another account/contract to transfers tokens on behalf of the caller throws on any error rather then return a false flag to minimize user errors also, to minimize the risk of the approve/transferFrom attack vector (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value",
"params": {
"_spender": "approved address",
"_value": "allowance amount"
},
"returns": {
"_0": "true if the approval was successful, false if it wasn't"
}
},
"constructor": {
"details": "initializes a new ERC20Token instance",
"params": {
"_decimals": "decimal points, for display purposes",
"_name": "token name",
"_symbol": "token symbol",
"_totalSupply": "total supply of token units"
}
},
"transfer(address,uint256)": {
"details": "transfers tokens to a given address throws on any error rather then return a false flag to minimize user errors",
"params": {
"_to": "target address",
"_value": "transfer amount"
},
"returns": {
"_0": "true if the transfer was successful, false if it wasn't"
}
},
"transferFrom(address,address,uint256)": {
"details": "transfers tokens to a given address on behalf of another address throws on any error rather then return a false flag to minimize user errors",
"params": {
"_from": "source address",
"_to": "target address",
"_value": "transfer amount"
},
"returns": {
"_0": "true if the transfer was successful, false if it wasn't"
}
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}