Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "contractName": "BucketSale",
- "abi": [
- {
- "constant": false,
- "inputs": [],
- "name": "tokenSoldFor",
- "outputs": [
- {
- "internalType": "contract ERC20",
- "name": "",
- "type": "address"
- }
- ],
- "payable": false,
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "internalType": "address",
- "name": "_buyer",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "_bucketId",
- "type": "uint256"
- },
- {
- "internalType": "uint256",
- "name": "_amount",
- "type": "uint256"
- },
- {
- "internalType": "address",
- "name": "_referrer",
- "type": "address"
- }
- ],
- "name": "agreeToTermsAndConditionsListedInThisContractAndEnterSale",
- "outputs": [],
- "payable": false,
- "stateMutability": "nonpayable",
- "type": "function"
- }
- ],
- "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_buyer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_bucketId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_referrer\",\"type\":\"address\"}],\"name\":\"agreeToTermsAndConditionsListedInThisContractAndEnterSale\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"tokenSoldFor\",\"outputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/mark/git/Foundry/smart-contracts/bucket-sale/contracts/EntryBot.sol\":\"BucketSale\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/mark/git/Foundry/smart-contracts/bucket-sale/contracts/EntryBot.sol\":{\"keccak256\":\"0xce281a092cd045211cd7ba4d838074c34a83b97617770d5572407bd0c970e389\",\"urls\":[\"bzz-raw://0e9dcc0c574c5ffdd2f22058ac9af50b6190b8f21565d88e0044a56a64cb9742\",\"dweb:/ipfs/QmdQkggS58wmeZvzbmLwaWZzJ4hgYMchqDhSkVYVYBcPax\"]}},\"version\":1}",
- "bytecode": "0x",
- "deployedBytecode": "0x",
- "sourceMap": "",
- "deployedSourceMap": "",
- "source": "pragma solidity ^0.5.17;\n\ncontract ERC20\n{\n function approve(address _spender, uint _amount)\n public\n returns (bool);\n function transferFrom(address _sender, address _receiver, uint _amount)\n public\n returns (bool);\n}\n\ncontract BucketSale\n{\n function tokenSoldFor()\n public\n returns (ERC20);\n\n function agreeToTermsAndConditionsListedInThisContractAndEnterSale(\n address _buyer,\n uint _bucketId,\n uint _amount,\n address _referrer)\n public;\n}\n\ninterface KyberNetworkInterface\n{\n function swapTokenToToken(\n ERC20 src,\n uint srcAmount,\n ERC20 dest,\n uint minConversionRate)\n external\n returns(uint);\n function swapEtherToToken(ERC20 token, uint minConversionRate)\n external\n payable\n returns(uint);\n function getExpectedRate(ERC20 src, ERC20 dest, uint _srcQty)\n external\n view\n returns (uint expectedRate, uint slippageRate);\n}\n\ncontract KyberTrader\n{\n address public constant ETH_TOKEN_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n KyberNetworkInterface public kyberNetworkProxy;\n ERC20 public mcdDai;\n\n function swapEtherToToken()\n public\n payable\n returns (uint _receivedAmount)\n {\n (, uint minRate) = kyberNetworkProxy.getExpectedRate(ERC20(ETH_TOKEN_ADDRESS), mcdDai, msg.value);\n uint result = kyberNetworkProxy.swapEtherToToken.value(msg.value)(mcdDai, minRate);\n return result;\n }\n\n function swapTokenToToken(\n ERC20 _srcToken,\n uint _srcQty)\n public\n returns (uint _receivedAmount)\n {\n // getExpectedRate returns expected rate and slippage rate\n // We use the slippage rate as the minRate\n (, uint minRate) = kyberNetworkProxy.getExpectedRate(_srcToken, mcdDai, _srcQty);\n\n // Check that the token transferFrom has succeeded\n require(_srcToken.transferFrom(msg.sender, address(this), _srcQty), \"Transfer of incoming ERC20 failed\");\n\n // Mitigate ERC20 Approve front-running attack, by initially setting\n // allowance to 0\n require(_srcToken.approve(address(kyberNetworkProxy), 0), \"Could not reset incoming ERC20 allowance\");\n\n // Approve tokens so network can take them during the swap\n _srcToken.approve(address(kyberNetworkProxy), _srcQty);\n\n // Perform the swap\n uint result = kyberNetworkProxy.swapTokenToToken(_srcToken, _srcQty, mcdDai, minRate);\n return result;\n }\n}\n\ncontract EntryBot is KyberTrader\n{\n BucketSale bucketSale;\n\n constructor(BucketSale _bucketSale, KyberNetworkInterface _kyberNetworkProxy)\n public\n {\n bucketSale = _bucketSale;\n mcdDai = bucketSale.tokenSoldFor();\n kyberNetworkProxy = _kyberNetworkProxy;\n bucketSale.tokenSoldFor().approve(address(bucketSale), uint(-1));\n }\n\n function agreeToTermsAndConditionsListedInThisBucketSaleContractAndEnterSaleWithEther(\n address _buyer,\n uint _bucketId,\n uint _numberOfBuckets,\n address _referrer)\n public\n payable\n {\n uint receivedDai = swapEtherToToken();\n _enterSale(\n _buyer,\n _bucketId,\n receivedDai,\n _numberOfBuckets,\n _referrer);\n }\n\n function agreeToTermsAndConditionsListedInThisBucketSaleContractAndEnterSaleWithErc20(\n address _buyer,\n uint _bucketId,\n ERC20 _Erc20,\n uint _totalBuyAmount,\n uint _numberOfBuckets,\n address _referrer)\n public\n {\n uint receivedDai = swapTokenToToken(_Erc20, _totalBuyAmount);\n _enterSale(\n _buyer,\n _bucketId,\n receivedDai,\n _numberOfBuckets,\n _referrer);\n }\n\n function agreeToTermsAndConditionsListedInThisBucketSaleContractAndEnterSaleWithDai(\n address _buyer,\n uint _bucketId,\n uint _totalBuyAmount,\n uint _numberOfBuckets,\n address _referrer)\n public\n {\n bucketSale.tokenSoldFor().transferFrom(msg.sender, address(this), _totalBuyAmount);\n _enterSale(_buyer, _bucketId, _totalBuyAmount, _numberOfBuckets, _referrer);\n }\n\n function _enterSale(\n address _buyer,\n uint _bucketId,\n uint _totalBuyAmount,\n uint _numberOfBuckets,\n address _referrer)\n private\n {\n uint amountPerBucket = _totalBuyAmount / _numberOfBuckets;\n\n for(uint i = 0; i < _numberOfBuckets; i++)\n {\n bucketSale.agreeToTermsAndConditionsListedInThisContractAndEnterSale(\n _buyer,\n _bucketId + i,\n amountPerBucket,\n _referrer\n );\n }\n }\n}\n\ncontract EntryBotMainNet is EntryBot\n{\n constructor()\n EntryBot(BucketSale(0x30076fF7436aE82207b9c03AbdF7CB056310A95A), KyberNetworkInterface(0x818E6FECD516Ecc3849DAf6845e3EC868087B755))\n public\n {}\n}",
- "sourcePath": "/home/mark/git/Foundry/smart-contracts/bucket-sale/contracts/EntryBot.sol",
- "ast": {
- "absolutePath": "/home/mark/git/Foundry/smart-contracts/bucket-sale/contracts/EntryBot.sol",
- "exportedSymbols": {
- "BucketSale": [
- 807
- ],
- "ERC20": [
- 790
- ],
- "EntryBot": [
- 1122
- ],
- "EntryBotMainNet": [
- 1137
- ],
- "KyberNetworkInterface": [
- 843
- ],
- "KyberTrader": [
- 947
- ]
- },
- "id": 1138,
- "nodeType": "SourceUnit",
- "nodes": [
- {
- "id": 769,
- "literals": [
- "solidity",
- "^",
- "0.5",
- ".17"
- ],
- "nodeType": "PragmaDirective",
- "src": "0:24:3"
- },
- {
- "baseContracts": [],
- "contractDependencies": [],
- "contractKind": "contract",
- "documentation": null,
- "fullyImplemented": false,
- "id": 790,
- "linearizedBaseContracts": [
- 790
- ],
- "name": "ERC20",
- "nodeType": "ContractDefinition",
- "nodes": [
- {
- "body": null,
- "documentation": null,
- "id": 778,
- "implemented": false,
- "kind": "function",
- "modifiers": [],
- "name": "approve",
- "nodeType": "FunctionDefinition",
- "parameters": {
- "id": 774,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 771,
- "name": "_spender",
- "nodeType": "VariableDeclaration",
- "scope": 778,
- "src": "64:16:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "typeName": {
- "id": 770,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "64:7:3",
- "stateMutability": "nonpayable",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 773,
- "name": "_amount",
- "nodeType": "VariableDeclaration",
- "scope": 778,
- "src": "82:12:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 772,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "82:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "src": "63:32:3"
- },
- "returnParameters": {
- "id": 777,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 776,
- "name": "",
- "nodeType": "VariableDeclaration",
- "scope": 778,
- "src": "128:4:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- },
- "typeName": {
- "id": 775,
- "name": "bool",
- "nodeType": "ElementaryTypeName",
- "src": "128:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "src": "127:6:3"
- },
- "scope": 790,
- "src": "47:87:3",
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "public"
- },
- {
- "body": null,
- "documentation": null,
- "id": 789,
- "implemented": false,
- "kind": "function",
- "modifiers": [],
- "name": "transferFrom",
- "nodeType": "FunctionDefinition",
- "parameters": {
- "id": 785,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 780,
- "name": "_sender",
- "nodeType": "VariableDeclaration",
- "scope": 789,
- "src": "161:15:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "typeName": {
- "id": 779,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "161:7:3",
- "stateMutability": "nonpayable",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 782,
- "name": "_receiver",
- "nodeType": "VariableDeclaration",
- "scope": 789,
- "src": "178:17:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "typeName": {
- "id": 781,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "178:7:3",
- "stateMutability": "nonpayable",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 784,
- "name": "_amount",
- "nodeType": "VariableDeclaration",
- "scope": 789,
- "src": "197:12:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 783,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "197:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "src": "160:50:3"
- },
- "returnParameters": {
- "id": 788,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 787,
- "name": "",
- "nodeType": "VariableDeclaration",
- "scope": 789,
- "src": "243:4:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- },
- "typeName": {
- "id": 786,
- "name": "bool",
- "nodeType": "ElementaryTypeName",
- "src": "243:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "src": "242:6:3"
- },
- "scope": 790,
- "src": "139:110:3",
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "public"
- }
- ],
- "scope": 1138,
- "src": "26:225:3"
- },
- {
- "baseContracts": [],
- "contractDependencies": [],
- "contractKind": "contract",
- "documentation": null,
- "fullyImplemented": false,
- "id": 807,
- "linearizedBaseContracts": [
- 807
- ],
- "name": "BucketSale",
- "nodeType": "ContractDefinition",
- "nodes": [
- {
- "body": null,
- "documentation": null,
- "id": 795,
- "implemented": false,
- "kind": "function",
- "modifiers": [],
- "name": "tokenSoldFor",
- "nodeType": "FunctionDefinition",
- "parameters": {
- "id": 791,
- "nodeType": "ParameterList",
- "parameters": [],
- "src": "300:2:3"
- },
- "returnParameters": {
- "id": 794,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 793,
- "name": "",
- "nodeType": "VariableDeclaration",
- "scope": 795,
- "src": "335:5:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- "typeName": {
- "contractScope": null,
- "id": 792,
- "name": "ERC20",
- "nodeType": "UserDefinedTypeName",
- "referencedDeclaration": 790,
- "src": "335:5:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "src": "334:7:3"
- },
- "scope": 807,
- "src": "279:63:3",
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "public"
- },
- {
- "body": null,
- "documentation": null,
- "id": 806,
- "implemented": false,
- "kind": "function",
- "modifiers": [],
- "name": "agreeToTermsAndConditionsListedInThisContractAndEnterSale",
- "nodeType": "FunctionDefinition",
- "parameters": {
- "id": 804,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 797,
- "name": "_buyer",
- "nodeType": "VariableDeclaration",
- "scope": 806,
- "src": "424:14:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "typeName": {
- "id": 796,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "424:7:3",
- "stateMutability": "nonpayable",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 799,
- "name": "_bucketId",
- "nodeType": "VariableDeclaration",
- "scope": 806,
- "src": "448:14:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 798,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "448:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 801,
- "name": "_amount",
- "nodeType": "VariableDeclaration",
- "scope": 806,
- "src": "472:12:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 800,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "472:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 803,
- "name": "_referrer",
- "nodeType": "VariableDeclaration",
- "scope": 806,
- "src": "494:17:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "typeName": {
- "id": 802,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "494:7:3",
- "stateMutability": "nonpayable",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "src": "414:98:3"
- },
- "returnParameters": {
- "id": 805,
- "nodeType": "ParameterList",
- "parameters": [],
- "src": "523:0:3"
- },
- "scope": 807,
- "src": "348:176:3",
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "public"
- }
- ],
- "scope": 1138,
- "src": "253:273:3"
- },
- {
- "baseContracts": [],
- "contractDependencies": [],
- "contractKind": "interface",
- "documentation": null,
- "fullyImplemented": false,
- "id": 843,
- "linearizedBaseContracts": [
- 843
- ],
- "name": "KyberNetworkInterface",
- "nodeType": "ContractDefinition",
- "nodes": [
- {
- "body": null,
- "documentation": null,
- "id": 820,
- "implemented": false,
- "kind": "function",
- "modifiers": [],
- "name": "swapTokenToToken",
- "nodeType": "FunctionDefinition",
- "parameters": {
- "id": 816,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 809,
- "name": "src",
- "nodeType": "VariableDeclaration",
- "scope": 820,
- "src": "605:9:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- "typeName": {
- "contractScope": null,
- "id": 808,
- "name": "ERC20",
- "nodeType": "UserDefinedTypeName",
- "referencedDeclaration": 790,
- "src": "605:5:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 811,
- "name": "srcAmount",
- "nodeType": "VariableDeclaration",
- "scope": 820,
- "src": "628:14:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 810,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "628:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 813,
- "name": "dest",
- "nodeType": "VariableDeclaration",
- "scope": 820,
- "src": "656:10:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- "typeName": {
- "contractScope": null,
- "id": 812,
- "name": "ERC20",
- "nodeType": "UserDefinedTypeName",
- "referencedDeclaration": 790,
- "src": "656:5:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 815,
- "name": "minConversionRate",
- "nodeType": "VariableDeclaration",
- "scope": 820,
- "src": "680:22:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 814,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "680:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "src": "591:112:3"
- },
- "returnParameters": {
- "id": 819,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 818,
- "name": "",
- "nodeType": "VariableDeclaration",
- "scope": 820,
- "src": "737:4:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 817,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "737:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "src": "736:6:3"
- },
- "scope": 843,
- "src": "566:177:3",
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "external"
- },
- {
- "body": null,
- "documentation": null,
- "id": 829,
- "implemented": false,
- "kind": "function",
- "modifiers": [],
- "name": "swapEtherToToken",
- "nodeType": "FunctionDefinition",
- "parameters": {
- "id": 825,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 822,
- "name": "token",
- "nodeType": "VariableDeclaration",
- "scope": 829,
- "src": "774:11:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- "typeName": {
- "contractScope": null,
- "id": 821,
- "name": "ERC20",
- "nodeType": "UserDefinedTypeName",
- "referencedDeclaration": 790,
- "src": "774:5:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 824,
- "name": "minConversionRate",
- "nodeType": "VariableDeclaration",
- "scope": 829,
- "src": "787:22:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 823,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "787:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "src": "773:37:3"
- },
- "returnParameters": {
- "id": 828,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 827,
- "name": "",
- "nodeType": "VariableDeclaration",
- "scope": 829,
- "src": "860:4:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 826,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "860:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "src": "859:6:3"
- },
- "scope": 843,
- "src": "748:118:3",
- "stateMutability": "payable",
- "superFunction": null,
- "visibility": "external"
- },
- {
- "body": null,
- "documentation": null,
- "id": 842,
- "implemented": false,
- "kind": "function",
- "modifiers": [],
- "name": "getExpectedRate",
- "nodeType": "FunctionDefinition",
- "parameters": {
- "id": 836,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 831,
- "name": "src",
- "nodeType": "VariableDeclaration",
- "scope": 842,
- "src": "896:9:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- "typeName": {
- "contractScope": null,
- "id": 830,
- "name": "ERC20",
- "nodeType": "UserDefinedTypeName",
- "referencedDeclaration": 790,
- "src": "896:5:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 833,
- "name": "dest",
- "nodeType": "VariableDeclaration",
- "scope": 842,
- "src": "907:10:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- "typeName": {
- "contractScope": null,
- "id": 832,
- "name": "ERC20",
- "nodeType": "UserDefinedTypeName",
- "referencedDeclaration": 790,
- "src": "907:5:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 835,
- "name": "_srcQty",
- "nodeType": "VariableDeclaration",
- "scope": 842,
- "src": "919:12:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 834,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "919:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "src": "895:37:3"
- },
- "returnParameters": {
- "id": 841,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 838,
- "name": "expectedRate",
- "nodeType": "VariableDeclaration",
- "scope": 842,
- "src": "980:17:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 837,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "980:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 840,
- "name": "slippageRate",
- "nodeType": "VariableDeclaration",
- "scope": 842,
- "src": "999:17:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 839,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "999:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "src": "979:38:3"
- },
- "scope": 843,
- "src": "871:147:3",
- "stateMutability": "view",
- "superFunction": null,
- "visibility": "external"
- }
- ],
- "scope": 1138,
- "src": "528:492:3"
- },
- {
- "baseContracts": [],
- "contractDependencies": [],
- "contractKind": "contract",
- "documentation": null,
- "fullyImplemented": true,
- "id": 947,
- "linearizedBaseContracts": [
- 947
- ],
- "name": "KyberTrader",
- "nodeType": "ContractDefinition",
- "nodes": [
- {
- "constant": true,
- "id": 846,
- "name": "ETH_TOKEN_ADDRESS",
- "nodeType": "VariableDeclaration",
- "scope": 947,
- "src": "1049:86:3",
- "stateVariable": true,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "typeName": {
- "id": 844,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "1049:7:3",
- "stateMutability": "nonpayable",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "value": {
- "argumentTypes": null,
- "hexValue": "307845656565654565656545654565654565456545656545454565656565456565656565656545456545",
- "id": 845,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "number",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "1093:42:3",
- "subdenomination": null,
- "typeDescriptions": {
- "typeIdentifier": "t_address_payable",
- "typeString": "address payable"
- },
- "value": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
- },
- "visibility": "public"
- },
- {
- "constant": false,
- "id": 848,
- "name": "kyberNetworkProxy",
- "nodeType": "VariableDeclaration",
- "scope": 947,
- "src": "1141:46:3",
- "stateVariable": true,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_KyberNetworkInterface_$843",
- "typeString": "contract KyberNetworkInterface"
- },
- "typeName": {
- "contractScope": null,
- "id": 847,
- "name": "KyberNetworkInterface",
- "nodeType": "UserDefinedTypeName",
- "referencedDeclaration": 843,
- "src": "1141:21:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_KyberNetworkInterface_$843",
- "typeString": "contract KyberNetworkInterface"
- }
- },
- "value": null,
- "visibility": "public"
- },
- {
- "constant": false,
- "id": 850,
- "name": "mcdDai",
- "nodeType": "VariableDeclaration",
- "scope": 947,
- "src": "1193:19:3",
- "stateVariable": true,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- "typeName": {
- "contractScope": null,
- "id": 849,
- "name": "ERC20",
- "nodeType": "UserDefinedTypeName",
- "referencedDeclaration": 790,
- "src": "1193:5:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- "value": null,
- "visibility": "public"
- },
- {
- "body": {
- "id": 881,
- "nodeType": "Block",
- "src": "1321:229:3",
- "statements": [
- {
- "assignments": [
- null,
- 856
- ],
- "declarations": [
- null,
- {
- "constant": false,
- "id": 856,
- "name": "minRate",
- "nodeType": "VariableDeclaration",
- "scope": 881,
- "src": "1334:12:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 855,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "1334:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "id": 866,
- "initialValue": {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "id": 860,
- "name": "ETH_TOKEN_ADDRESS",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 846,
- "src": "1390:17:3",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- ],
- "id": 859,
- "name": "ERC20",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 790,
- "src": "1384:5:3",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_contract$_ERC20_$790_$",
- "typeString": "type(contract ERC20)"
- }
- },
- "id": 861,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "typeConversion",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "1384:24:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- {
- "argumentTypes": null,
- "id": 862,
- "name": "mcdDai",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 850,
- "src": "1410:6:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- {
- "argumentTypes": null,
- "expression": {
- "argumentTypes": null,
- "id": 863,
- "name": "msg",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 2821,
- "src": "1418:3:3",
- "typeDescriptions": {
- "typeIdentifier": "t_magic_message",
- "typeString": "msg"
- }
- },
- "id": 864,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberName": "value",
- "nodeType": "MemberAccess",
- "referencedDeclaration": null,
- "src": "1418:9:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "expression": {
- "argumentTypes": null,
- "id": 857,
- "name": "kyberNetworkProxy",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 848,
- "src": "1350:17:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_KyberNetworkInterface_$843",
- "typeString": "contract KyberNetworkInterface"
- }
- },
- "id": 858,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberName": "getExpectedRate",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 842,
- "src": "1350:33:3",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_view$_t_contract$_ERC20_$790_$_t_contract$_ERC20_$790_$_t_uint256_$returns$_t_uint256_$_t_uint256_$",
- "typeString": "function (contract ERC20,contract ERC20,uint256) view external returns (uint256,uint256)"
- }
- },
- "id": 865,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "1350:78:3",
- "typeDescriptions": {
- "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
- "typeString": "tuple(uint256,uint256)"
- }
- },
- "nodeType": "VariableDeclarationStatement",
- "src": "1331:97:3"
- },
- {
- "assignments": [
- 868
- ],
- "declarations": [
- {
- "constant": false,
- "id": 868,
- "name": "result",
- "nodeType": "VariableDeclaration",
- "scope": 881,
- "src": "1438:11:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 867,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "1438:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "id": 878,
- "initialValue": {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "id": 875,
- "name": "mcdDai",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 850,
- "src": "1504:6:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- {
- "argumentTypes": null,
- "id": 876,
- "name": "minRate",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 856,
- "src": "1512:7:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "arguments": [
- {
- "argumentTypes": null,
- "expression": {
- "argumentTypes": null,
- "id": 872,
- "name": "msg",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 2821,
- "src": "1493:3:3",
- "typeDescriptions": {
- "typeIdentifier": "t_magic_message",
- "typeString": "msg"
- }
- },
- "id": 873,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberName": "value",
- "nodeType": "MemberAccess",
- "referencedDeclaration": null,
- "src": "1493:9:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "expression": {
- "argumentTypes": null,
- "expression": {
- "argumentTypes": null,
- "id": 869,
- "name": "kyberNetworkProxy",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 848,
- "src": "1452:17:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_KyberNetworkInterface_$843",
- "typeString": "contract KyberNetworkInterface"
- }
- },
- "id": 870,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberName": "swapEtherToToken",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 829,
- "src": "1452:34:3",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_payable$_t_contract$_ERC20_$790_$_t_uint256_$returns$_t_uint256_$",
- "typeString": "function (contract ERC20,uint256) payable external returns (uint256)"
- }
- },
- "id": 871,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberName": "value",
- "nodeType": "MemberAccess",
- "referencedDeclaration": null,
- "src": "1452:40:3",
- "typeDescriptions": {
- "typeIdentifier": "t_function_setvalue_pure$_t_uint256_$returns$_t_function_external_payable$_t_contract$_ERC20_$790_$_t_uint256_$returns$_t_uint256_$value_$",
- "typeString": "function (uint256) pure returns (function (contract ERC20,uint256) payable external returns (uint256))"
- }
- },
- "id": 874,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "1452:51:3",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_payable$_t_contract$_ERC20_$790_$_t_uint256_$returns$_t_uint256_$value",
- "typeString": "function (contract ERC20,uint256) payable external returns (uint256)"
- }
- },
- "id": 877,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "1452:68:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "nodeType": "VariableDeclarationStatement",
- "src": "1438:82:3"
- },
- {
- "expression": {
- "argumentTypes": null,
- "id": 879,
- "name": "result",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 868,
- "src": "1537:6:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "functionReturnParameters": 854,
- "id": 880,
- "nodeType": "Return",
- "src": "1530:13:3"
- }
- ]
- },
- "documentation": null,
- "id": 882,
- "implemented": true,
- "kind": "function",
- "modifiers": [],
- "name": "swapEtherToToken",
- "nodeType": "FunctionDefinition",
- "parameters": {
- "id": 851,
- "nodeType": "ParameterList",
- "parameters": [],
- "src": "1244:2:3"
- },
- "returnParameters": {
- "id": 854,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 853,
- "name": "_receivedAmount",
- "nodeType": "VariableDeclaration",
- "scope": 882,
- "src": "1295:20:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 852,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "1295:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "src": "1294:22:3"
- },
- "scope": 947,
- "src": "1219:331:3",
- "stateMutability": "payable",
- "superFunction": null,
- "visibility": "public"
- },
- {
- "body": {
- "id": 945,
- "nodeType": "Block",
- "src": "1696:883:3",
- "statements": [
- {
- "assignments": [
- null,
- 892
- ],
- "declarations": [
- null,
- {
- "constant": false,
- "id": 892,
- "name": "minRate",
- "nodeType": "VariableDeclaration",
- "scope": 945,
- "src": "1827:12:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 891,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "1827:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "id": 899,
- "initialValue": {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "id": 895,
- "name": "_srcToken",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 884,
- "src": "1877:9:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- {
- "argumentTypes": null,
- "id": 896,
- "name": "mcdDai",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 850,
- "src": "1888:6:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- {
- "argumentTypes": null,
- "id": 897,
- "name": "_srcQty",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 886,
- "src": "1896:7:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "expression": {
- "argumentTypes": null,
- "id": 893,
- "name": "kyberNetworkProxy",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 848,
- "src": "1843:17:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_KyberNetworkInterface_$843",
- "typeString": "contract KyberNetworkInterface"
- }
- },
- "id": 894,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberName": "getExpectedRate",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 842,
- "src": "1843:33:3",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_view$_t_contract$_ERC20_$790_$_t_contract$_ERC20_$790_$_t_uint256_$returns$_t_uint256_$_t_uint256_$",
- "typeString": "function (contract ERC20,contract ERC20,uint256) view external returns (uint256,uint256)"
- }
- },
- "id": 898,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "1843:61:3",
- "typeDescriptions": {
- "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
- "typeString": "tuple(uint256,uint256)"
- }
- },
- "nodeType": "VariableDeclarationStatement",
- "src": "1824:80:3"
- },
- {
- "expression": {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "expression": {
- "argumentTypes": null,
- "id": 903,
- "name": "msg",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 2821,
- "src": "2005:3:3",
- "typeDescriptions": {
- "typeIdentifier": "t_magic_message",
- "typeString": "msg"
- }
- },
- "id": 904,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberName": "sender",
- "nodeType": "MemberAccess",
- "referencedDeclaration": null,
- "src": "2005:10:3",
- "typeDescriptions": {
- "typeIdentifier": "t_address_payable",
- "typeString": "address payable"
- }
- },
- {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "id": 906,
- "name": "this",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 2875,
- "src": "2025:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_KyberTrader_$947",
- "typeString": "contract KyberTrader"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_KyberTrader_$947",
- "typeString": "contract KyberTrader"
- }
- ],
- "id": 905,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "ElementaryTypeNameExpression",
- "src": "2017:7:3",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_address_$",
- "typeString": "type(address)"
- },
- "typeName": "address"
- },
- "id": 907,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "typeConversion",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "2017:13:3",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "argumentTypes": null,
- "id": 908,
- "name": "_srcQty",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 886,
- "src": "2032:7:3",
- "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"
- }
- ],
- "expression": {
- "argumentTypes": null,
- "id": 901,
- "name": "_srcToken",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 884,
- "src": "1982:9:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- "id": 902,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberName": "transferFrom",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 789,
- "src": "1982:22:3",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
- "typeString": "function (address,address,uint256) external returns (bool)"
- }
- },
- "id": 909,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "1982:58:3",
- "typeDescriptions": {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- }
- },
- {
- "argumentTypes": null,
- "hexValue": "5472616e73666572206f6620696e636f6d696e67204552433230206661696c6564",
- "id": 910,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "string",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "2042:35:3",
- "subdenomination": null,
- "typeDescriptions": {
- "typeIdentifier": "t_stringliteral_cd8a26f843eff9b2bf99b352dcd2a0d6ce6e2f8c493a2424530bffc1932f5b6e",
- "typeString": "literal_string \"Transfer of incoming ERC20 failed\""
- },
- "value": "Transfer of incoming ERC20 failed"
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- },
- {
- "typeIdentifier": "t_stringliteral_cd8a26f843eff9b2bf99b352dcd2a0d6ce6e2f8c493a2424530bffc1932f5b6e",
- "typeString": "literal_string \"Transfer of incoming ERC20 failed\""
- }
- ],
- "id": 900,
- "name": "require",
- "nodeType": "Identifier",
- "overloadedDeclarations": [
- 2824,
- 2825
- ],
- "referencedDeclaration": 2825,
- "src": "1974:7:3",
- "typeDescriptions": {
- "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
- "typeString": "function (bool,string memory) pure"
- }
- },
- "id": 911,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "1974:104:3",
- "typeDescriptions": {
- "typeIdentifier": "t_tuple$__$",
- "typeString": "tuple()"
- }
- },
- "id": 912,
- "nodeType": "ExpressionStatement",
- "src": "1974:104:3"
- },
- {
- "expression": {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "id": 917,
- "name": "kyberNetworkProxy",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 848,
- "src": "2226:17:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_KyberNetworkInterface_$843",
- "typeString": "contract KyberNetworkInterface"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_KyberNetworkInterface_$843",
- "typeString": "contract KyberNetworkInterface"
- }
- ],
- "id": 916,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "ElementaryTypeNameExpression",
- "src": "2218:7:3",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_address_$",
- "typeString": "type(address)"
- },
- "typeName": "address"
- },
- "id": 918,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "typeConversion",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "2218:26:3",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "argumentTypes": null,
- "hexValue": "30",
- "id": 919,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "number",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "2246:1:3",
- "subdenomination": null,
- "typeDescriptions": {
- "typeIdentifier": "t_rational_0_by_1",
- "typeString": "int_const 0"
- },
- "value": "0"
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_rational_0_by_1",
- "typeString": "int_const 0"
- }
- ],
- "expression": {
- "argumentTypes": null,
- "id": 914,
- "name": "_srcToken",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 884,
- "src": "2200:9:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- "id": 915,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberName": "approve",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 778,
- "src": "2200:17:3",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
- "typeString": "function (address,uint256) external returns (bool)"
- }
- },
- "id": 920,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "2200:48:3",
- "typeDescriptions": {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- }
- },
- {
- "argumentTypes": null,
- "hexValue": "436f756c64206e6f7420726573657420696e636f6d696e6720455243323020616c6c6f77616e6365",
- "id": 921,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "string",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "2250:42:3",
- "subdenomination": null,
- "typeDescriptions": {
- "typeIdentifier": "t_stringliteral_d31ea363c9a235e5ac003b13cce657c446344b42ccccf806e7e8d722ee92802f",
- "typeString": "literal_string \"Could not reset incoming ERC20 allowance\""
- },
- "value": "Could not reset incoming ERC20 allowance"
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- },
- {
- "typeIdentifier": "t_stringliteral_d31ea363c9a235e5ac003b13cce657c446344b42ccccf806e7e8d722ee92802f",
- "typeString": "literal_string \"Could not reset incoming ERC20 allowance\""
- }
- ],
- "id": 913,
- "name": "require",
- "nodeType": "Identifier",
- "overloadedDeclarations": [
- 2824,
- 2825
- ],
- "referencedDeclaration": 2825,
- "src": "2192:7:3",
- "typeDescriptions": {
- "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
- "typeString": "function (bool,string memory) pure"
- }
- },
- "id": 922,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "2192:101:3",
- "typeDescriptions": {
- "typeIdentifier": "t_tuple$__$",
- "typeString": "tuple()"
- }
- },
- "id": 923,
- "nodeType": "ExpressionStatement",
- "src": "2192:101:3"
- },
- {
- "expression": {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "id": 928,
- "name": "kyberNetworkProxy",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 848,
- "src": "2397:17:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_KyberNetworkInterface_$843",
- "typeString": "contract KyberNetworkInterface"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_KyberNetworkInterface_$843",
- "typeString": "contract KyberNetworkInterface"
- }
- ],
- "id": 927,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "ElementaryTypeNameExpression",
- "src": "2389:7:3",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_address_$",
- "typeString": "type(address)"
- },
- "typeName": "address"
- },
- "id": 929,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "typeConversion",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "2389:26:3",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "argumentTypes": null,
- "id": 930,
- "name": "_srcQty",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 886,
- "src": "2417:7:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "expression": {
- "argumentTypes": null,
- "id": 924,
- "name": "_srcToken",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 884,
- "src": "2371:9:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- "id": 926,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberName": "approve",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 778,
- "src": "2371:17:3",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
- "typeString": "function (address,uint256) external returns (bool)"
- }
- },
- "id": 931,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "2371:54:3",
- "typeDescriptions": {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- }
- },
- "id": 932,
- "nodeType": "ExpressionStatement",
- "src": "2371:54:3"
- },
- {
- "assignments": [
- 934
- ],
- "declarations": [
- {
- "constant": false,
- "id": 934,
- "name": "result",
- "nodeType": "VariableDeclaration",
- "scope": 945,
- "src": "2464:11:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 933,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "2464:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "id": 942,
- "initialValue": {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "id": 937,
- "name": "_srcToken",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 884,
- "src": "2513:9:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- {
- "argumentTypes": null,
- "id": 938,
- "name": "_srcQty",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 886,
- "src": "2524:7:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- {
- "argumentTypes": null,
- "id": 939,
- "name": "mcdDai",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 850,
- "src": "2533:6:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- {
- "argumentTypes": null,
- "id": 940,
- "name": "minRate",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 892,
- "src": "2541:7:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "expression": {
- "argumentTypes": null,
- "id": 935,
- "name": "kyberNetworkProxy",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 848,
- "src": "2478:17:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_KyberNetworkInterface_$843",
- "typeString": "contract KyberNetworkInterface"
- }
- },
- "id": 936,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberName": "swapTokenToToken",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 820,
- "src": "2478:34:3",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_nonpayable$_t_contract$_ERC20_$790_$_t_uint256_$_t_contract$_ERC20_$790_$_t_uint256_$returns$_t_uint256_$",
- "typeString": "function (contract ERC20,uint256,contract ERC20,uint256) external returns (uint256)"
- }
- },
- "id": 941,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "2478:71:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "nodeType": "VariableDeclarationStatement",
- "src": "2464:85:3"
- },
- {
- "expression": {
- "argumentTypes": null,
- "id": 943,
- "name": "result",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 934,
- "src": "2566:6:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "functionReturnParameters": 890,
- "id": 944,
- "nodeType": "Return",
- "src": "2559:13:3"
- }
- ]
- },
- "documentation": null,
- "id": 946,
- "implemented": true,
- "kind": "function",
- "modifiers": [],
- "name": "swapTokenToToken",
- "nodeType": "FunctionDefinition",
- "parameters": {
- "id": 887,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 884,
- "name": "_srcToken",
- "nodeType": "VariableDeclaration",
- "scope": 946,
- "src": "1595:15:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- "typeName": {
- "contractScope": null,
- "id": 883,
- "name": "ERC20",
- "nodeType": "UserDefinedTypeName",
- "referencedDeclaration": 790,
- "src": "1595:5:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 886,
- "name": "_srcQty",
- "nodeType": "VariableDeclaration",
- "scope": 946,
- "src": "1624:12:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 885,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "1624:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "src": "1581:56:3"
- },
- "returnParameters": {
- "id": 890,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 889,
- "name": "_receivedAmount",
- "nodeType": "VariableDeclaration",
- "scope": 946,
- "src": "1670:20:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 888,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "1670:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "src": "1669:22:3"
- },
- "scope": 947,
- "src": "1556:1023:3",
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "public"
- }
- ],
- "scope": 1138,
- "src": "1022:1559:3"
- },
- {
- "baseContracts": [
- {
- "arguments": null,
- "baseName": {
- "contractScope": null,
- "id": 948,
- "name": "KyberTrader",
- "nodeType": "UserDefinedTypeName",
- "referencedDeclaration": 947,
- "src": "2604:11:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_KyberTrader_$947",
- "typeString": "contract KyberTrader"
- }
- },
- "id": 949,
- "nodeType": "InheritanceSpecifier",
- "src": "2604:11:3"
- }
- ],
- "contractDependencies": [
- 947
- ],
- "contractKind": "contract",
- "documentation": null,
- "fullyImplemented": true,
- "id": 1122,
- "linearizedBaseContracts": [
- 1122,
- 947
- ],
- "name": "EntryBot",
- "nodeType": "ContractDefinition",
- "nodes": [
- {
- "constant": false,
- "id": 951,
- "name": "bucketSale",
- "nodeType": "VariableDeclaration",
- "scope": 1122,
- "src": "2622:21:3",
- "stateVariable": true,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_BucketSale_$807",
- "typeString": "contract BucketSale"
- },
- "typeName": {
- "contractScope": null,
- "id": 950,
- "name": "BucketSale",
- "nodeType": "UserDefinedTypeName",
- "referencedDeclaration": 807,
- "src": "2622:10:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_BucketSale_$807",
- "typeString": "contract BucketSale"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "body": {
- "id": 986,
- "nodeType": "Block",
- "src": "2747:207:3",
- "statements": [
- {
- "expression": {
- "argumentTypes": null,
- "id": 960,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "leftHandSide": {
- "argumentTypes": null,
- "id": 958,
- "name": "bucketSale",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 951,
- "src": "2757:10:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_BucketSale_$807",
- "typeString": "contract BucketSale"
- }
- },
- "nodeType": "Assignment",
- "operator": "=",
- "rightHandSide": {
- "argumentTypes": null,
- "id": 959,
- "name": "_bucketSale",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 953,
- "src": "2770:11:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_BucketSale_$807",
- "typeString": "contract BucketSale"
- }
- },
- "src": "2757:24:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_BucketSale_$807",
- "typeString": "contract BucketSale"
- }
- },
- "id": 961,
- "nodeType": "ExpressionStatement",
- "src": "2757:24:3"
- },
- {
- "expression": {
- "argumentTypes": null,
- "id": 966,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "leftHandSide": {
- "argumentTypes": null,
- "id": 962,
- "name": "mcdDai",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 850,
- "src": "2791:6:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- "nodeType": "Assignment",
- "operator": "=",
- "rightHandSide": {
- "argumentTypes": null,
- "arguments": [],
- "expression": {
- "argumentTypes": [],
- "expression": {
- "argumentTypes": null,
- "id": 963,
- "name": "bucketSale",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 951,
- "src": "2800:10:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_BucketSale_$807",
- "typeString": "contract BucketSale"
- }
- },
- "id": 964,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberName": "tokenSoldFor",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 795,
- "src": "2800:23:3",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_contract$_ERC20_$790_$",
- "typeString": "function () external returns (contract ERC20)"
- }
- },
- "id": 965,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "2800:25:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- "src": "2791:34:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- "id": 967,
- "nodeType": "ExpressionStatement",
- "src": "2791:34:3"
- },
- {
- "expression": {
- "argumentTypes": null,
- "id": 970,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "leftHandSide": {
- "argumentTypes": null,
- "id": 968,
- "name": "kyberNetworkProxy",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 848,
- "src": "2835:17:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_KyberNetworkInterface_$843",
- "typeString": "contract KyberNetworkInterface"
- }
- },
- "nodeType": "Assignment",
- "operator": "=",
- "rightHandSide": {
- "argumentTypes": null,
- "id": 969,
- "name": "_kyberNetworkProxy",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 955,
- "src": "2855:18:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_KyberNetworkInterface_$843",
- "typeString": "contract KyberNetworkInterface"
- }
- },
- "src": "2835:38:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_KyberNetworkInterface_$843",
- "typeString": "contract KyberNetworkInterface"
- }
- },
- "id": 971,
- "nodeType": "ExpressionStatement",
- "src": "2835:38:3"
- },
- {
- "expression": {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "id": 978,
- "name": "bucketSale",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 951,
- "src": "2925:10:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_BucketSale_$807",
- "typeString": "contract BucketSale"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_BucketSale_$807",
- "typeString": "contract BucketSale"
- }
- ],
- "id": 977,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "ElementaryTypeNameExpression",
- "src": "2917:7:3",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_address_$",
- "typeString": "type(address)"
- },
- "typeName": "address"
- },
- "id": 979,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "typeConversion",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "2917:19:3",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "id": 982,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "UnaryOperation",
- "operator": "-",
- "prefix": true,
- "src": "2943:2:3",
- "subExpression": {
- "argumentTypes": null,
- "hexValue": "31",
- "id": 981,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "number",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "2944:1:3",
- "subdenomination": null,
- "typeDescriptions": {
- "typeIdentifier": "t_rational_1_by_1",
- "typeString": "int_const 1"
- },
- "value": "1"
- },
- "typeDescriptions": {
- "typeIdentifier": "t_rational_minus_1_by_1",
- "typeString": "int_const -1"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_rational_minus_1_by_1",
- "typeString": "int_const -1"
- }
- ],
- "id": 980,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "ElementaryTypeNameExpression",
- "src": "2938:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_uint256_$",
- "typeString": "type(uint256)"
- },
- "typeName": "uint"
- },
- "id": 983,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "typeConversion",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "2938:8:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "expression": {
- "argumentTypes": null,
- "arguments": [],
- "expression": {
- "argumentTypes": [],
- "expression": {
- "argumentTypes": null,
- "id": 972,
- "name": "bucketSale",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 951,
- "src": "2883:10:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_BucketSale_$807",
- "typeString": "contract BucketSale"
- }
- },
- "id": 974,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberName": "tokenSoldFor",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 795,
- "src": "2883:23:3",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_contract$_ERC20_$790_$",
- "typeString": "function () external returns (contract ERC20)"
- }
- },
- "id": 975,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "2883:25:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- "id": 976,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberName": "approve",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 778,
- "src": "2883:33:3",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
- "typeString": "function (address,uint256) external returns (bool)"
- }
- },
- "id": 984,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "2883:64:3",
- "typeDescriptions": {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- }
- },
- "id": 985,
- "nodeType": "ExpressionStatement",
- "src": "2883:64:3"
- }
- ]
- },
- "documentation": null,
- "id": 987,
- "implemented": true,
- "kind": "constructor",
- "modifiers": [],
- "name": "",
- "nodeType": "FunctionDefinition",
- "parameters": {
- "id": 956,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 953,
- "name": "_bucketSale",
- "nodeType": "VariableDeclaration",
- "scope": 987,
- "src": "2662:22:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_BucketSale_$807",
- "typeString": "contract BucketSale"
- },
- "typeName": {
- "contractScope": null,
- "id": 952,
- "name": "BucketSale",
- "nodeType": "UserDefinedTypeName",
- "referencedDeclaration": 807,
- "src": "2662:10:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_BucketSale_$807",
- "typeString": "contract BucketSale"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 955,
- "name": "_kyberNetworkProxy",
- "nodeType": "VariableDeclaration",
- "scope": 987,
- "src": "2686:40:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_KyberNetworkInterface_$843",
- "typeString": "contract KyberNetworkInterface"
- },
- "typeName": {
- "contractScope": null,
- "id": 954,
- "name": "KyberNetworkInterface",
- "nodeType": "UserDefinedTypeName",
- "referencedDeclaration": 843,
- "src": "2686:21:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_KyberNetworkInterface_$843",
- "typeString": "contract KyberNetworkInterface"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "src": "2661:66:3"
- },
- "returnParameters": {
- "id": 957,
- "nodeType": "ParameterList",
- "parameters": [],
- "src": "2747:0:3"
- },
- "scope": 1122,
- "src": "2650:304:3",
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "public"
- },
- {
- "body": {
- "id": 1011,
- "nodeType": "Block",
- "src": "3204:196:3",
- "statements": [
- {
- "assignments": [
- 999
- ],
- "declarations": [
- {
- "constant": false,
- "id": 999,
- "name": "receivedDai",
- "nodeType": "VariableDeclaration",
- "scope": 1011,
- "src": "3214:16:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 998,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "3214:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "id": 1002,
- "initialValue": {
- "argumentTypes": null,
- "arguments": [],
- "expression": {
- "argumentTypes": [],
- "id": 1000,
- "name": "swapEtherToToken",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 882,
- "src": "3233:16:3",
- "typeDescriptions": {
- "typeIdentifier": "t_function_internal_nonpayable$__$returns$_t_uint256_$",
- "typeString": "function () returns (uint256)"
- }
- },
- "id": 1001,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3233:18:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "nodeType": "VariableDeclarationStatement",
- "src": "3214:37:3"
- },
- {
- "expression": {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "id": 1004,
- "name": "_buyer",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 989,
- "src": "3285:6:3",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "argumentTypes": null,
- "id": 1005,
- "name": "_bucketId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 991,
- "src": "3305:9:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- {
- "argumentTypes": null,
- "id": 1006,
- "name": "receivedDai",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 999,
- "src": "3328:11:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- {
- "argumentTypes": null,
- "id": 1007,
- "name": "_numberOfBuckets",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 993,
- "src": "3353:16:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- {
- "argumentTypes": null,
- "id": 1008,
- "name": "_referrer",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 995,
- "src": "3383:9:3",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- ],
- "id": 1003,
- "name": "_enterSale",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1121,
- "src": "3261:10:3",
- "typeDescriptions": {
- "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_address_$returns$__$",
- "typeString": "function (address,uint256,uint256,uint256,address)"
- }
- },
- "id": 1009,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3261:132:3",
- "typeDescriptions": {
- "typeIdentifier": "t_tuple$__$",
- "typeString": "tuple()"
- }
- },
- "id": 1010,
- "nodeType": "ExpressionStatement",
- "src": "3261:132:3"
- }
- ]
- },
- "documentation": null,
- "id": 1012,
- "implemented": true,
- "kind": "function",
- "modifiers": [],
- "name": "agreeToTermsAndConditionsListedInThisBucketSaleContractAndEnterSaleWithEther",
- "nodeType": "FunctionDefinition",
- "parameters": {
- "id": 996,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 989,
- "name": "_buyer",
- "nodeType": "VariableDeclaration",
- "scope": 1012,
- "src": "3059:14:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "typeName": {
- "id": 988,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "3059:7:3",
- "stateMutability": "nonpayable",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 991,
- "name": "_bucketId",
- "nodeType": "VariableDeclaration",
- "scope": 1012,
- "src": "3087:14:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 990,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "3087:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 993,
- "name": "_numberOfBuckets",
- "nodeType": "VariableDeclaration",
- "scope": 1012,
- "src": "3115:21:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 992,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "3115:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 995,
- "name": "_referrer",
- "nodeType": "VariableDeclaration",
- "scope": 1012,
- "src": "3150:17:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "typeName": {
- "id": 994,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "3150:7:3",
- "stateMutability": "nonpayable",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "src": "3045:123:3"
- },
- "returnParameters": {
- "id": 997,
- "nodeType": "ParameterList",
- "parameters": [],
- "src": "3204:0:3"
- },
- "scope": 1122,
- "src": "2960:440:3",
- "stateMutability": "payable",
- "superFunction": null,
- "visibility": "public"
- },
- {
- "body": {
- "id": 1042,
- "nodeType": "Block",
- "src": "3694:219:3",
- "statements": [
- {
- "assignments": [
- 1028
- ],
- "declarations": [
- {
- "constant": false,
- "id": 1028,
- "name": "receivedDai",
- "nodeType": "VariableDeclaration",
- "scope": 1042,
- "src": "3704:16:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 1027,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "3704:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "id": 1033,
- "initialValue": {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "id": 1030,
- "name": "_Erc20",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1018,
- "src": "3740:6:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- {
- "argumentTypes": null,
- "id": 1031,
- "name": "_totalBuyAmount",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1020,
- "src": "3748:15:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "id": 1029,
- "name": "swapTokenToToken",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 946,
- "src": "3723:16:3",
- "typeDescriptions": {
- "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20_$790_$_t_uint256_$returns$_t_uint256_$",
- "typeString": "function (contract ERC20,uint256) returns (uint256)"
- }
- },
- "id": 1032,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3723:41:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "nodeType": "VariableDeclarationStatement",
- "src": "3704:60:3"
- },
- {
- "expression": {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "id": 1035,
- "name": "_buyer",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1014,
- "src": "3798:6:3",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "argumentTypes": null,
- "id": 1036,
- "name": "_bucketId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1016,
- "src": "3818:9:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- {
- "argumentTypes": null,
- "id": 1037,
- "name": "receivedDai",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1028,
- "src": "3841:11:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- {
- "argumentTypes": null,
- "id": 1038,
- "name": "_numberOfBuckets",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1022,
- "src": "3866:16:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- {
- "argumentTypes": null,
- "id": 1039,
- "name": "_referrer",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1024,
- "src": "3896:9:3",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- ],
- "id": 1034,
- "name": "_enterSale",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1121,
- "src": "3774:10:3",
- "typeDescriptions": {
- "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_address_$returns$__$",
- "typeString": "function (address,uint256,uint256,uint256,address)"
- }
- },
- "id": 1040,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "3774:132:3",
- "typeDescriptions": {
- "typeIdentifier": "t_tuple$__$",
- "typeString": "tuple()"
- }
- },
- "id": 1041,
- "nodeType": "ExpressionStatement",
- "src": "3774:132:3"
- }
- ]
- },
- "documentation": null,
- "id": 1043,
- "implemented": true,
- "kind": "function",
- "modifiers": [],
- "name": "agreeToTermsAndConditionsListedInThisBucketSaleContractAndEnterSaleWithErc20",
- "nodeType": "FunctionDefinition",
- "parameters": {
- "id": 1025,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 1014,
- "name": "_buyer",
- "nodeType": "VariableDeclaration",
- "scope": 1043,
- "src": "3505:14:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "typeName": {
- "id": 1013,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "3505:7:3",
- "stateMutability": "nonpayable",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 1016,
- "name": "_bucketId",
- "nodeType": "VariableDeclaration",
- "scope": 1043,
- "src": "3533:14:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 1015,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "3533:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 1018,
- "name": "_Erc20",
- "nodeType": "VariableDeclaration",
- "scope": 1043,
- "src": "3561:12:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- "typeName": {
- "contractScope": null,
- "id": 1017,
- "name": "ERC20",
- "nodeType": "UserDefinedTypeName",
- "referencedDeclaration": 790,
- "src": "3561:5:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 1020,
- "name": "_totalBuyAmount",
- "nodeType": "VariableDeclaration",
- "scope": 1043,
- "src": "3587:20:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 1019,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "3587:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 1022,
- "name": "_numberOfBuckets",
- "nodeType": "VariableDeclaration",
- "scope": 1043,
- "src": "3621:21:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 1021,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "3621:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 1024,
- "name": "_referrer",
- "nodeType": "VariableDeclaration",
- "scope": 1043,
- "src": "3656:17:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "typeName": {
- "id": 1023,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "3656:7:3",
- "stateMutability": "nonpayable",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "src": "3491:183:3"
- },
- "returnParameters": {
- "id": 1026,
- "nodeType": "ParameterList",
- "parameters": [],
- "src": "3694:0:3"
- },
- "scope": 1122,
- "src": "3406:507:3",
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "public"
- },
- {
- "body": {
- "id": 1077,
- "nodeType": "Block",
- "src": "4179:184:3",
- "statements": [
- {
- "expression": {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "expression": {
- "argumentTypes": null,
- "id": 1061,
- "name": "msg",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 2821,
- "src": "4228:3:3",
- "typeDescriptions": {
- "typeIdentifier": "t_magic_message",
- "typeString": "msg"
- }
- },
- "id": 1062,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberName": "sender",
- "nodeType": "MemberAccess",
- "referencedDeclaration": null,
- "src": "4228:10:3",
- "typeDescriptions": {
- "typeIdentifier": "t_address_payable",
- "typeString": "address payable"
- }
- },
- {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "id": 1064,
- "name": "this",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 2877,
- "src": "4248:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_EntryBot_$1122",
- "typeString": "contract EntryBot"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_EntryBot_$1122",
- "typeString": "contract EntryBot"
- }
- ],
- "id": 1063,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "nodeType": "ElementaryTypeNameExpression",
- "src": "4240:7:3",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_address_$",
- "typeString": "type(address)"
- },
- "typeName": "address"
- },
- "id": 1065,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "typeConversion",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "4240:13:3",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "argumentTypes": null,
- "id": 1066,
- "name": "_totalBuyAmount",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1049,
- "src": "4255:15:3",
- "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"
- }
- ],
- "expression": {
- "argumentTypes": null,
- "arguments": [],
- "expression": {
- "argumentTypes": [],
- "expression": {
- "argumentTypes": null,
- "id": 1056,
- "name": "bucketSale",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 951,
- "src": "4189:10:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_BucketSale_$807",
- "typeString": "contract BucketSale"
- }
- },
- "id": 1058,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberName": "tokenSoldFor",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 795,
- "src": "4189:23:3",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_contract$_ERC20_$790_$",
- "typeString": "function () external returns (contract ERC20)"
- }
- },
- "id": 1059,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "4189:25:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- }
- },
- "id": 1060,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberName": "transferFrom",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 789,
- "src": "4189:38:3",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
- "typeString": "function (address,address,uint256) external returns (bool)"
- }
- },
- "id": 1067,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "4189:82:3",
- "typeDescriptions": {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- }
- },
- "id": 1068,
- "nodeType": "ExpressionStatement",
- "src": "4189:82:3"
- },
- {
- "expression": {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "id": 1070,
- "name": "_buyer",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1045,
- "src": "4292:6:3",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "argumentTypes": null,
- "id": 1071,
- "name": "_bucketId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1047,
- "src": "4300:9:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- {
- "argumentTypes": null,
- "id": 1072,
- "name": "_totalBuyAmount",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1049,
- "src": "4311:15:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- {
- "argumentTypes": null,
- "id": 1073,
- "name": "_numberOfBuckets",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1051,
- "src": "4328:16:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- {
- "argumentTypes": null,
- "id": 1074,
- "name": "_referrer",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1053,
- "src": "4346:9:3",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- ],
- "id": 1069,
- "name": "_enterSale",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1121,
- "src": "4281:10:3",
- "typeDescriptions": {
- "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_address_$returns$__$",
- "typeString": "function (address,uint256,uint256,uint256,address)"
- }
- },
- "id": 1075,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "4281:75:3",
- "typeDescriptions": {
- "typeIdentifier": "t_tuple$__$",
- "typeString": "tuple()"
- }
- },
- "id": 1076,
- "nodeType": "ExpressionStatement",
- "src": "4281:75:3"
- }
- ]
- },
- "documentation": null,
- "id": 1078,
- "implemented": true,
- "kind": "function",
- "modifiers": [],
- "name": "agreeToTermsAndConditionsListedInThisBucketSaleContractAndEnterSaleWithDai",
- "nodeType": "FunctionDefinition",
- "parameters": {
- "id": 1054,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 1045,
- "name": "_buyer",
- "nodeType": "VariableDeclaration",
- "scope": 1078,
- "src": "4016:14:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "typeName": {
- "id": 1044,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "4016:7:3",
- "stateMutability": "nonpayable",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 1047,
- "name": "_bucketId",
- "nodeType": "VariableDeclaration",
- "scope": 1078,
- "src": "4044:14:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 1046,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "4044:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 1049,
- "name": "_totalBuyAmount",
- "nodeType": "VariableDeclaration",
- "scope": 1078,
- "src": "4072:20:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 1048,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "4072:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 1051,
- "name": "_numberOfBuckets",
- "nodeType": "VariableDeclaration",
- "scope": 1078,
- "src": "4106:21:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 1050,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "4106:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 1053,
- "name": "_referrer",
- "nodeType": "VariableDeclaration",
- "scope": 1078,
- "src": "4141:17:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "typeName": {
- "id": 1052,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "4141:7:3",
- "stateMutability": "nonpayable",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "src": "4002:157:3"
- },
- "returnParameters": {
- "id": 1055,
- "nodeType": "ParameterList",
- "parameters": [],
- "src": "4179:0:3"
- },
- "scope": 1122,
- "src": "3919:444:3",
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "public"
- },
- {
- "body": {
- "id": 1120,
- "nodeType": "Block",
- "src": "4566:357:3",
- "statements": [
- {
- "assignments": [
- 1092
- ],
- "declarations": [
- {
- "constant": false,
- "id": 1092,
- "name": "amountPerBucket",
- "nodeType": "VariableDeclaration",
- "scope": 1120,
- "src": "4576:20:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 1091,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "4576:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "id": 1096,
- "initialValue": {
- "argumentTypes": null,
- "commonType": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "id": 1095,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "leftExpression": {
- "argumentTypes": null,
- "id": 1093,
- "name": "_totalBuyAmount",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1084,
- "src": "4599:15:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "nodeType": "BinaryOperation",
- "operator": "/",
- "rightExpression": {
- "argumentTypes": null,
- "id": 1094,
- "name": "_numberOfBuckets",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1086,
- "src": "4617:16:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "src": "4599:34:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "nodeType": "VariableDeclarationStatement",
- "src": "4576:57:3"
- },
- {
- "body": {
- "id": 1118,
- "nodeType": "Block",
- "src": "4695:222:3",
- "statements": [
- {
- "expression": {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "id": 1110,
- "name": "_buyer",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1080,
- "src": "4795:6:3",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- {
- "argumentTypes": null,
- "commonType": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "id": 1113,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "leftExpression": {
- "argumentTypes": null,
- "id": 1111,
- "name": "_bucketId",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1082,
- "src": "4819:9:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "nodeType": "BinaryOperation",
- "operator": "+",
- "rightExpression": {
- "argumentTypes": null,
- "id": 1112,
- "name": "i",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1098,
- "src": "4831:1:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "src": "4819:13:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- {
- "argumentTypes": null,
- "id": 1114,
- "name": "amountPerBucket",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1092,
- "src": "4850:15:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- {
- "argumentTypes": null,
- "id": 1115,
- "name": "_referrer",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1088,
- "src": "4883:9:3",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- ],
- "expression": {
- "argumentTypes": null,
- "id": 1107,
- "name": "bucketSale",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 951,
- "src": "4709:10:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_BucketSale_$807",
- "typeString": "contract BucketSale"
- }
- },
- "id": 1109,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "memberName": "agreeToTermsAndConditionsListedInThisContractAndEnterSale",
- "nodeType": "MemberAccess",
- "referencedDeclaration": 806,
- "src": "4709:68:3",
- "typeDescriptions": {
- "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_address_$returns$__$",
- "typeString": "function (address,uint256,uint256,address) external"
- }
- },
- "id": 1116,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "kind": "functionCall",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "4709:197:3",
- "typeDescriptions": {
- "typeIdentifier": "t_tuple$__$",
- "typeString": "tuple()"
- }
- },
- "id": 1117,
- "nodeType": "ExpressionStatement",
- "src": "4709:197:3"
- }
- ]
- },
- "condition": {
- "argumentTypes": null,
- "commonType": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "id": 1103,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "leftExpression": {
- "argumentTypes": null,
- "id": 1101,
- "name": "i",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1098,
- "src": "4660:1:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "nodeType": "BinaryOperation",
- "operator": "<",
- "rightExpression": {
- "argumentTypes": null,
- "id": 1102,
- "name": "_numberOfBuckets",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1086,
- "src": "4664:16:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "src": "4660:20:3",
- "typeDescriptions": {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- }
- },
- "id": 1119,
- "initializationExpression": {
- "assignments": [
- 1098
- ],
- "declarations": [
- {
- "constant": false,
- "id": 1098,
- "name": "i",
- "nodeType": "VariableDeclaration",
- "scope": 1119,
- "src": "4648:6:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 1097,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "4648:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "id": 1100,
- "initialValue": {
- "argumentTypes": null,
- "hexValue": "30",
- "id": 1099,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "number",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "4657:1:3",
- "subdenomination": null,
- "typeDescriptions": {
- "typeIdentifier": "t_rational_0_by_1",
- "typeString": "int_const 0"
- },
- "value": "0"
- },
- "nodeType": "VariableDeclarationStatement",
- "src": "4648:10:3"
- },
- "loopExpression": {
- "expression": {
- "argumentTypes": null,
- "id": 1105,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "nodeType": "UnaryOperation",
- "operator": "++",
- "prefix": false,
- "src": "4682:3:3",
- "subExpression": {
- "argumentTypes": null,
- "id": 1104,
- "name": "i",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1098,
- "src": "4682:1:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "id": 1106,
- "nodeType": "ExpressionStatement",
- "src": "4682:3:3"
- },
- "nodeType": "ForStatement",
- "src": "4644:273:3"
- }
- ]
- },
- "documentation": null,
- "id": 1121,
- "implemented": true,
- "kind": "function",
- "modifiers": [],
- "name": "_enterSale",
- "nodeType": "FunctionDefinition",
- "parameters": {
- "id": 1089,
- "nodeType": "ParameterList",
- "parameters": [
- {
- "constant": false,
- "id": 1080,
- "name": "_buyer",
- "nodeType": "VariableDeclaration",
- "scope": 1121,
- "src": "4402:14:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "typeName": {
- "id": 1079,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "4402:7:3",
- "stateMutability": "nonpayable",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 1082,
- "name": "_bucketId",
- "nodeType": "VariableDeclaration",
- "scope": 1121,
- "src": "4430:14:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 1081,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "4430:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 1084,
- "name": "_totalBuyAmount",
- "nodeType": "VariableDeclaration",
- "scope": 1121,
- "src": "4458:20:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 1083,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "4458:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 1086,
- "name": "_numberOfBuckets",
- "nodeType": "VariableDeclaration",
- "scope": 1121,
- "src": "4492:21:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "typeName": {
- "id": 1085,
- "name": "uint",
- "nodeType": "ElementaryTypeName",
- "src": "4492:4:3",
- "typeDescriptions": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- },
- "value": null,
- "visibility": "internal"
- },
- {
- "constant": false,
- "id": 1088,
- "name": "_referrer",
- "nodeType": "VariableDeclaration",
- "scope": 1121,
- "src": "4527:17:3",
- "stateVariable": false,
- "storageLocation": "default",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- "typeName": {
- "id": 1087,
- "name": "address",
- "nodeType": "ElementaryTypeName",
- "src": "4527:7:3",
- "stateMutability": "nonpayable",
- "typeDescriptions": {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- },
- "value": null,
- "visibility": "internal"
- }
- ],
- "src": "4388:157:3"
- },
- "returnParameters": {
- "id": 1090,
- "nodeType": "ParameterList",
- "parameters": [],
- "src": "4566:0:3"
- },
- "scope": 1122,
- "src": "4369:554:3",
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "private"
- }
- ],
- "scope": 1138,
- "src": "2583:2342:3"
- },
- {
- "baseContracts": [
- {
- "arguments": null,
- "baseName": {
- "contractScope": null,
- "id": 1123,
- "name": "EntryBot",
- "nodeType": "UserDefinedTypeName",
- "referencedDeclaration": 1122,
- "src": "4955:8:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_EntryBot_$1122",
- "typeString": "contract EntryBot"
- }
- },
- "id": 1124,
- "nodeType": "InheritanceSpecifier",
- "src": "4955:8:3"
- }
- ],
- "contractDependencies": [
- 947,
- 1122
- ],
- "contractKind": "contract",
- "documentation": null,
- "fullyImplemented": true,
- "id": 1137,
- "linearizedBaseContracts": [
- 1137,
- 1122,
- 947
- ],
- "name": "EntryBotMainNet",
- "nodeType": "ContractDefinition",
- "nodes": [
- {
- "body": {
- "id": 1135,
- "nodeType": "Block",
- "src": "5139:2:3",
- "statements": []
- },
- "documentation": null,
- "id": 1136,
- "implemented": true,
- "kind": "constructor",
- "modifiers": [
- {
- "arguments": [
- {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "hexValue": "307833303037366646373433366145383232303762396330334162644637434230353633313041393541",
- "id": 1128,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "number",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "5008:42:3",
- "subdenomination": null,
- "typeDescriptions": {
- "typeIdentifier": "t_address_payable",
- "typeString": "address payable"
- },
- "value": "0x30076fF7436aE82207b9c03AbdF7CB056310A95A"
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address_payable",
- "typeString": "address payable"
- }
- ],
- "id": 1127,
- "name": "BucketSale",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 807,
- "src": "4997:10:3",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_contract$_BucketSale_$807_$",
- "typeString": "type(contract BucketSale)"
- }
- },
- "id": 1129,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "typeConversion",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "4997:54:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_BucketSale_$807",
- "typeString": "contract BucketSale"
- }
- },
- {
- "argumentTypes": null,
- "arguments": [
- {
- "argumentTypes": null,
- "hexValue": "307838313845364645434435313645636333383439444166363834356533454338363830383742373535",
- "id": 1131,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "number",
- "lValueRequested": false,
- "nodeType": "Literal",
- "src": "5075:42:3",
- "subdenomination": null,
- "typeDescriptions": {
- "typeIdentifier": "t_address_payable",
- "typeString": "address payable"
- },
- "value": "0x818E6FECD516Ecc3849DAf6845e3EC868087B755"
- }
- ],
- "expression": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address_payable",
- "typeString": "address payable"
- }
- ],
- "id": 1130,
- "name": "KyberNetworkInterface",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 843,
- "src": "5053:21:3",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_contract$_KyberNetworkInterface_$843_$",
- "typeString": "type(contract KyberNetworkInterface)"
- }
- },
- "id": 1132,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "kind": "typeConversion",
- "lValueRequested": false,
- "names": [],
- "nodeType": "FunctionCall",
- "src": "5053:65:3",
- "typeDescriptions": {
- "typeIdentifier": "t_contract$_KyberNetworkInterface_$843",
- "typeString": "contract KyberNetworkInterface"
- }
- }
- ],
- "id": 1133,
- "modifierName": {
- "argumentTypes": null,
- "id": 1126,
- "name": "EntryBot",
- "nodeType": "Identifier",
- "overloadedDeclarations": [],
- "referencedDeclaration": 1122,
- "src": "4988:8:3",
- "typeDescriptions": {
- "typeIdentifier": "t_type$_t_contract$_EntryBot_$1122_$",
- "typeString": "type(contract EntryBot)"
- }
- },
- "nodeType": "ModifierInvocation",
- "src": "4988:131:3"
- }
- ],
- "name": "",
- "nodeType": "FunctionDefinition",
- "parameters": {
- "id": 1125,
- "nodeType": "ParameterList",
- "parameters": [],
- "src": "4981:2:3"
- },
- "returnParameters": {
- "id": 1134,
- "nodeType": "ParameterList",
- "parameters": [],
- "src": "5139:0:3"
- },
- "scope": 1137,
- "src": "4970:171:3",
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "public"
- }
- ],
- "scope": 1138,
- "src": "4927:216:3"
- }
- ],
- "src": "0:5143:3"
- },
- "legacyAST": {
- "attributes": {
- "absolutePath": "/home/mark/git/Foundry/smart-contracts/bucket-sale/contracts/EntryBot.sol",
- "exportedSymbols": {
- "BucketSale": [
- 807
- ],
- "ERC20": [
- 790
- ],
- "EntryBot": [
- 1122
- ],
- "EntryBotMainNet": [
- 1137
- ],
- "KyberNetworkInterface": [
- 843
- ],
- "KyberTrader": [
- 947
- ]
- }
- },
- "children": [
- {
- "attributes": {
- "literals": [
- "solidity",
- "^",
- "0.5",
- ".17"
- ]
- },
- "id": 769,
- "name": "PragmaDirective",
- "src": "0:24:3"
- },
- {
- "attributes": {
- "baseContracts": [
- null
- ],
- "contractDependencies": [
- null
- ],
- "contractKind": "contract",
- "documentation": null,
- "fullyImplemented": false,
- "linearizedBaseContracts": [
- 790
- ],
- "name": "ERC20",
- "scope": 1138
- },
- "children": [
- {
- "attributes": {
- "body": null,
- "documentation": null,
- "implemented": false,
- "isConstructor": false,
- "kind": "function",
- "modifiers": [
- null
- ],
- "name": "approve",
- "scope": 790,
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "public"
- },
- "children": [
- {
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "_spender",
- "scope": 778,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "address",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "address",
- "stateMutability": "nonpayable",
- "type": "address"
- },
- "id": 770,
- "name": "ElementaryTypeName",
- "src": "64:7:3"
- }
- ],
- "id": 771,
- "name": "VariableDeclaration",
- "src": "64:16:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_amount",
- "scope": 778,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 772,
- "name": "ElementaryTypeName",
- "src": "82:4:3"
- }
- ],
- "id": 773,
- "name": "VariableDeclaration",
- "src": "82:12:3"
- }
- ],
- "id": 774,
- "name": "ParameterList",
- "src": "63:32:3"
- },
- {
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "",
- "scope": 778,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "bool",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "bool",
- "type": "bool"
- },
- "id": 775,
- "name": "ElementaryTypeName",
- "src": "128:4:3"
- }
- ],
- "id": 776,
- "name": "VariableDeclaration",
- "src": "128:4:3"
- }
- ],
- "id": 777,
- "name": "ParameterList",
- "src": "127:6:3"
- }
- ],
- "id": 778,
- "name": "FunctionDefinition",
- "src": "47:87:3"
- },
- {
- "attributes": {
- "body": null,
- "documentation": null,
- "implemented": false,
- "isConstructor": false,
- "kind": "function",
- "modifiers": [
- null
- ],
- "name": "transferFrom",
- "scope": 790,
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "public"
- },
- "children": [
- {
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "_sender",
- "scope": 789,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "address",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "address",
- "stateMutability": "nonpayable",
- "type": "address"
- },
- "id": 779,
- "name": "ElementaryTypeName",
- "src": "161:7:3"
- }
- ],
- "id": 780,
- "name": "VariableDeclaration",
- "src": "161:15:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_receiver",
- "scope": 789,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "address",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "address",
- "stateMutability": "nonpayable",
- "type": "address"
- },
- "id": 781,
- "name": "ElementaryTypeName",
- "src": "178:7:3"
- }
- ],
- "id": 782,
- "name": "VariableDeclaration",
- "src": "178:17:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_amount",
- "scope": 789,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 783,
- "name": "ElementaryTypeName",
- "src": "197:4:3"
- }
- ],
- "id": 784,
- "name": "VariableDeclaration",
- "src": "197:12:3"
- }
- ],
- "id": 785,
- "name": "ParameterList",
- "src": "160:50:3"
- },
- {
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "",
- "scope": 789,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "bool",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "bool",
- "type": "bool"
- },
- "id": 786,
- "name": "ElementaryTypeName",
- "src": "243:4:3"
- }
- ],
- "id": 787,
- "name": "VariableDeclaration",
- "src": "243:4:3"
- }
- ],
- "id": 788,
- "name": "ParameterList",
- "src": "242:6:3"
- }
- ],
- "id": 789,
- "name": "FunctionDefinition",
- "src": "139:110:3"
- }
- ],
- "id": 790,
- "name": "ContractDefinition",
- "src": "26:225:3"
- },
- {
- "attributes": {
- "baseContracts": [
- null
- ],
- "contractDependencies": [
- null
- ],
- "contractKind": "contract",
- "documentation": null,
- "fullyImplemented": false,
- "linearizedBaseContracts": [
- 807
- ],
- "name": "BucketSale",
- "scope": 1138
- },
- "children": [
- {
- "attributes": {
- "body": null,
- "documentation": null,
- "implemented": false,
- "isConstructor": false,
- "kind": "function",
- "modifiers": [
- null
- ],
- "name": "tokenSoldFor",
- "scope": 807,
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "public"
- },
- "children": [
- {
- "attributes": {
- "parameters": [
- null
- ]
- },
- "children": [],
- "id": 791,
- "name": "ParameterList",
- "src": "300:2:3"
- },
- {
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "",
- "scope": 795,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "contract ERC20",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "contractScope": null,
- "name": "ERC20",
- "referencedDeclaration": 790,
- "type": "contract ERC20"
- },
- "id": 792,
- "name": "UserDefinedTypeName",
- "src": "335:5:3"
- }
- ],
- "id": 793,
- "name": "VariableDeclaration",
- "src": "335:5:3"
- }
- ],
- "id": 794,
- "name": "ParameterList",
- "src": "334:7:3"
- }
- ],
- "id": 795,
- "name": "FunctionDefinition",
- "src": "279:63:3"
- },
- {
- "attributes": {
- "body": null,
- "documentation": null,
- "implemented": false,
- "isConstructor": false,
- "kind": "function",
- "modifiers": [
- null
- ],
- "name": "agreeToTermsAndConditionsListedInThisContractAndEnterSale",
- "scope": 807,
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "public"
- },
- "children": [
- {
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "_buyer",
- "scope": 806,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "address",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "address",
- "stateMutability": "nonpayable",
- "type": "address"
- },
- "id": 796,
- "name": "ElementaryTypeName",
- "src": "424:7:3"
- }
- ],
- "id": 797,
- "name": "VariableDeclaration",
- "src": "424:14:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_bucketId",
- "scope": 806,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 798,
- "name": "ElementaryTypeName",
- "src": "448:4:3"
- }
- ],
- "id": 799,
- "name": "VariableDeclaration",
- "src": "448:14:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_amount",
- "scope": 806,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 800,
- "name": "ElementaryTypeName",
- "src": "472:4:3"
- }
- ],
- "id": 801,
- "name": "VariableDeclaration",
- "src": "472:12:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_referrer",
- "scope": 806,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "address",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "address",
- "stateMutability": "nonpayable",
- "type": "address"
- },
- "id": 802,
- "name": "ElementaryTypeName",
- "src": "494:7:3"
- }
- ],
- "id": 803,
- "name": "VariableDeclaration",
- "src": "494:17:3"
- }
- ],
- "id": 804,
- "name": "ParameterList",
- "src": "414:98:3"
- },
- {
- "attributes": {
- "parameters": [
- null
- ]
- },
- "children": [],
- "id": 805,
- "name": "ParameterList",
- "src": "523:0:3"
- }
- ],
- "id": 806,
- "name": "FunctionDefinition",
- "src": "348:176:3"
- }
- ],
- "id": 807,
- "name": "ContractDefinition",
- "src": "253:273:3"
- },
- {
- "attributes": {
- "baseContracts": [
- null
- ],
- "contractDependencies": [
- null
- ],
- "contractKind": "interface",
- "documentation": null,
- "fullyImplemented": false,
- "linearizedBaseContracts": [
- 843
- ],
- "name": "KyberNetworkInterface",
- "scope": 1138
- },
- "children": [
- {
- "attributes": {
- "body": null,
- "documentation": null,
- "implemented": false,
- "isConstructor": false,
- "kind": "function",
- "modifiers": [
- null
- ],
- "name": "swapTokenToToken",
- "scope": 843,
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "external"
- },
- "children": [
- {
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "src",
- "scope": 820,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "contract ERC20",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "contractScope": null,
- "name": "ERC20",
- "referencedDeclaration": 790,
- "type": "contract ERC20"
- },
- "id": 808,
- "name": "UserDefinedTypeName",
- "src": "605:5:3"
- }
- ],
- "id": 809,
- "name": "VariableDeclaration",
- "src": "605:9:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "srcAmount",
- "scope": 820,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 810,
- "name": "ElementaryTypeName",
- "src": "628:4:3"
- }
- ],
- "id": 811,
- "name": "VariableDeclaration",
- "src": "628:14:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "dest",
- "scope": 820,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "contract ERC20",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "contractScope": null,
- "name": "ERC20",
- "referencedDeclaration": 790,
- "type": "contract ERC20"
- },
- "id": 812,
- "name": "UserDefinedTypeName",
- "src": "656:5:3"
- }
- ],
- "id": 813,
- "name": "VariableDeclaration",
- "src": "656:10:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "minConversionRate",
- "scope": 820,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 814,
- "name": "ElementaryTypeName",
- "src": "680:4:3"
- }
- ],
- "id": 815,
- "name": "VariableDeclaration",
- "src": "680:22:3"
- }
- ],
- "id": 816,
- "name": "ParameterList",
- "src": "591:112:3"
- },
- {
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "",
- "scope": 820,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 817,
- "name": "ElementaryTypeName",
- "src": "737:4:3"
- }
- ],
- "id": 818,
- "name": "VariableDeclaration",
- "src": "737:4:3"
- }
- ],
- "id": 819,
- "name": "ParameterList",
- "src": "736:6:3"
- }
- ],
- "id": 820,
- "name": "FunctionDefinition",
- "src": "566:177:3"
- },
- {
- "attributes": {
- "body": null,
- "documentation": null,
- "implemented": false,
- "isConstructor": false,
- "kind": "function",
- "modifiers": [
- null
- ],
- "name": "swapEtherToToken",
- "scope": 843,
- "stateMutability": "payable",
- "superFunction": null,
- "visibility": "external"
- },
- "children": [
- {
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "token",
- "scope": 829,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "contract ERC20",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "contractScope": null,
- "name": "ERC20",
- "referencedDeclaration": 790,
- "type": "contract ERC20"
- },
- "id": 821,
- "name": "UserDefinedTypeName",
- "src": "774:5:3"
- }
- ],
- "id": 822,
- "name": "VariableDeclaration",
- "src": "774:11:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "minConversionRate",
- "scope": 829,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 823,
- "name": "ElementaryTypeName",
- "src": "787:4:3"
- }
- ],
- "id": 824,
- "name": "VariableDeclaration",
- "src": "787:22:3"
- }
- ],
- "id": 825,
- "name": "ParameterList",
- "src": "773:37:3"
- },
- {
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "",
- "scope": 829,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 826,
- "name": "ElementaryTypeName",
- "src": "860:4:3"
- }
- ],
- "id": 827,
- "name": "VariableDeclaration",
- "src": "860:4:3"
- }
- ],
- "id": 828,
- "name": "ParameterList",
- "src": "859:6:3"
- }
- ],
- "id": 829,
- "name": "FunctionDefinition",
- "src": "748:118:3"
- },
- {
- "attributes": {
- "body": null,
- "documentation": null,
- "implemented": false,
- "isConstructor": false,
- "kind": "function",
- "modifiers": [
- null
- ],
- "name": "getExpectedRate",
- "scope": 843,
- "stateMutability": "view",
- "superFunction": null,
- "visibility": "external"
- },
- "children": [
- {
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "src",
- "scope": 842,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "contract ERC20",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "contractScope": null,
- "name": "ERC20",
- "referencedDeclaration": 790,
- "type": "contract ERC20"
- },
- "id": 830,
- "name": "UserDefinedTypeName",
- "src": "896:5:3"
- }
- ],
- "id": 831,
- "name": "VariableDeclaration",
- "src": "896:9:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "dest",
- "scope": 842,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "contract ERC20",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "contractScope": null,
- "name": "ERC20",
- "referencedDeclaration": 790,
- "type": "contract ERC20"
- },
- "id": 832,
- "name": "UserDefinedTypeName",
- "src": "907:5:3"
- }
- ],
- "id": 833,
- "name": "VariableDeclaration",
- "src": "907:10:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_srcQty",
- "scope": 842,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 834,
- "name": "ElementaryTypeName",
- "src": "919:4:3"
- }
- ],
- "id": 835,
- "name": "VariableDeclaration",
- "src": "919:12:3"
- }
- ],
- "id": 836,
- "name": "ParameterList",
- "src": "895:37:3"
- },
- {
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "expectedRate",
- "scope": 842,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 837,
- "name": "ElementaryTypeName",
- "src": "980:4:3"
- }
- ],
- "id": 838,
- "name": "VariableDeclaration",
- "src": "980:17:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "slippageRate",
- "scope": 842,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 839,
- "name": "ElementaryTypeName",
- "src": "999:4:3"
- }
- ],
- "id": 840,
- "name": "VariableDeclaration",
- "src": "999:17:3"
- }
- ],
- "id": 841,
- "name": "ParameterList",
- "src": "979:38:3"
- }
- ],
- "id": 842,
- "name": "FunctionDefinition",
- "src": "871:147:3"
- }
- ],
- "id": 843,
- "name": "ContractDefinition",
- "src": "528:492:3"
- },
- {
- "attributes": {
- "baseContracts": [
- null
- ],
- "contractDependencies": [
- null
- ],
- "contractKind": "contract",
- "documentation": null,
- "fullyImplemented": true,
- "linearizedBaseContracts": [
- 947
- ],
- "name": "KyberTrader",
- "scope": 1138
- },
- "children": [
- {
- "attributes": {
- "constant": true,
- "name": "ETH_TOKEN_ADDRESS",
- "scope": 947,
- "stateVariable": true,
- "storageLocation": "default",
- "type": "address",
- "visibility": "public"
- },
- "children": [
- {
- "attributes": {
- "name": "address",
- "stateMutability": "nonpayable",
- "type": "address"
- },
- "id": 844,
- "name": "ElementaryTypeName",
- "src": "1049:7:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "hexvalue": "307845656565654565656545654565654565456545656545454565656565456565656565656545456545",
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "subdenomination": null,
- "token": "number",
- "type": "address payable",
- "value": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
- },
- "id": 845,
- "name": "Literal",
- "src": "1093:42:3"
- }
- ],
- "id": 846,
- "name": "VariableDeclaration",
- "src": "1049:86:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "kyberNetworkProxy",
- "scope": 947,
- "stateVariable": true,
- "storageLocation": "default",
- "type": "contract KyberNetworkInterface",
- "value": null,
- "visibility": "public"
- },
- "children": [
- {
- "attributes": {
- "contractScope": null,
- "name": "KyberNetworkInterface",
- "referencedDeclaration": 843,
- "type": "contract KyberNetworkInterface"
- },
- "id": 847,
- "name": "UserDefinedTypeName",
- "src": "1141:21:3"
- }
- ],
- "id": 848,
- "name": "VariableDeclaration",
- "src": "1141:46:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "mcdDai",
- "scope": 947,
- "stateVariable": true,
- "storageLocation": "default",
- "type": "contract ERC20",
- "value": null,
- "visibility": "public"
- },
- "children": [
- {
- "attributes": {
- "contractScope": null,
- "name": "ERC20",
- "referencedDeclaration": 790,
- "type": "contract ERC20"
- },
- "id": 849,
- "name": "UserDefinedTypeName",
- "src": "1193:5:3"
- }
- ],
- "id": 850,
- "name": "VariableDeclaration",
- "src": "1193:19:3"
- },
- {
- "attributes": {
- "documentation": null,
- "implemented": true,
- "isConstructor": false,
- "kind": "function",
- "modifiers": [
- null
- ],
- "name": "swapEtherToToken",
- "scope": 947,
- "stateMutability": "payable",
- "superFunction": null,
- "visibility": "public"
- },
- "children": [
- {
- "attributes": {
- "parameters": [
- null
- ]
- },
- "children": [],
- "id": 851,
- "name": "ParameterList",
- "src": "1244:2:3"
- },
- {
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "_receivedAmount",
- "scope": 882,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 852,
- "name": "ElementaryTypeName",
- "src": "1295:4:3"
- }
- ],
- "id": 853,
- "name": "VariableDeclaration",
- "src": "1295:20:3"
- }
- ],
- "id": 854,
- "name": "ParameterList",
- "src": "1294:22:3"
- },
- {
- "children": [
- {
- "attributes": {
- "assignments": [
- null,
- 856
- ]
- },
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "minRate",
- "scope": 881,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 855,
- "name": "ElementaryTypeName",
- "src": "1334:4:3"
- }
- ],
- "id": 856,
- "name": "VariableDeclaration",
- "src": "1334:12:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "tuple(uint256,uint256)",
- "type_conversion": false
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "member_name": "getExpectedRate",
- "referencedDeclaration": 842,
- "type": "function (contract ERC20,contract ERC20,uint256) view external returns (uint256,uint256)"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 848,
- "type": "contract KyberNetworkInterface",
- "value": "kyberNetworkProxy"
- },
- "id": 857,
- "name": "Identifier",
- "src": "1350:17:3"
- }
- ],
- "id": 858,
- "name": "MemberAccess",
- "src": "1350:33:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "contract ERC20",
- "type_conversion": true
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- ],
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 790,
- "type": "type(contract ERC20)",
- "value": "ERC20"
- },
- "id": 859,
- "name": "Identifier",
- "src": "1384:5:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 846,
- "type": "address",
- "value": "ETH_TOKEN_ADDRESS"
- },
- "id": 860,
- "name": "Identifier",
- "src": "1390:17:3"
- }
- ],
- "id": 861,
- "name": "FunctionCall",
- "src": "1384:24:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 850,
- "type": "contract ERC20",
- "value": "mcdDai"
- },
- "id": 862,
- "name": "Identifier",
- "src": "1410:6:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "member_name": "value",
- "referencedDeclaration": null,
- "type": "uint256"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 2821,
- "type": "msg",
- "value": "msg"
- },
- "id": 863,
- "name": "Identifier",
- "src": "1418:3:3"
- }
- ],
- "id": 864,
- "name": "MemberAccess",
- "src": "1418:9:3"
- }
- ],
- "id": 865,
- "name": "FunctionCall",
- "src": "1350:78:3"
- }
- ],
- "id": 866,
- "name": "VariableDeclarationStatement",
- "src": "1331:97:3"
- },
- {
- "attributes": {
- "assignments": [
- 868
- ]
- },
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "result",
- "scope": 881,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 867,
- "name": "ElementaryTypeName",
- "src": "1438:4:3"
- }
- ],
- "id": 868,
- "name": "VariableDeclaration",
- "src": "1438:11:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "uint256",
- "type_conversion": false
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "function (contract ERC20,uint256) payable external returns (uint256)",
- "type_conversion": false
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "member_name": "value",
- "referencedDeclaration": null,
- "type": "function (uint256) pure returns (function (contract ERC20,uint256) payable external returns (uint256))"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "member_name": "swapEtherToToken",
- "referencedDeclaration": 829,
- "type": "function (contract ERC20,uint256) payable external returns (uint256)"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 848,
- "type": "contract KyberNetworkInterface",
- "value": "kyberNetworkProxy"
- },
- "id": 869,
- "name": "Identifier",
- "src": "1452:17:3"
- }
- ],
- "id": 870,
- "name": "MemberAccess",
- "src": "1452:34:3"
- }
- ],
- "id": 871,
- "name": "MemberAccess",
- "src": "1452:40:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "member_name": "value",
- "referencedDeclaration": null,
- "type": "uint256"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 2821,
- "type": "msg",
- "value": "msg"
- },
- "id": 872,
- "name": "Identifier",
- "src": "1493:3:3"
- }
- ],
- "id": 873,
- "name": "MemberAccess",
- "src": "1493:9:3"
- }
- ],
- "id": 874,
- "name": "FunctionCall",
- "src": "1452:51:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 850,
- "type": "contract ERC20",
- "value": "mcdDai"
- },
- "id": 875,
- "name": "Identifier",
- "src": "1504:6:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 856,
- "type": "uint256",
- "value": "minRate"
- },
- "id": 876,
- "name": "Identifier",
- "src": "1512:7:3"
- }
- ],
- "id": 877,
- "name": "FunctionCall",
- "src": "1452:68:3"
- }
- ],
- "id": 878,
- "name": "VariableDeclarationStatement",
- "src": "1438:82:3"
- },
- {
- "attributes": {
- "functionReturnParameters": 854
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 868,
- "type": "uint256",
- "value": "result"
- },
- "id": 879,
- "name": "Identifier",
- "src": "1537:6:3"
- }
- ],
- "id": 880,
- "name": "Return",
- "src": "1530:13:3"
- }
- ],
- "id": 881,
- "name": "Block",
- "src": "1321:229:3"
- }
- ],
- "id": 882,
- "name": "FunctionDefinition",
- "src": "1219:331:3"
- },
- {
- "attributes": {
- "documentation": null,
- "implemented": true,
- "isConstructor": false,
- "kind": "function",
- "modifiers": [
- null
- ],
- "name": "swapTokenToToken",
- "scope": 947,
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "public"
- },
- "children": [
- {
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "_srcToken",
- "scope": 946,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "contract ERC20",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "contractScope": null,
- "name": "ERC20",
- "referencedDeclaration": 790,
- "type": "contract ERC20"
- },
- "id": 883,
- "name": "UserDefinedTypeName",
- "src": "1595:5:3"
- }
- ],
- "id": 884,
- "name": "VariableDeclaration",
- "src": "1595:15:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_srcQty",
- "scope": 946,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 885,
- "name": "ElementaryTypeName",
- "src": "1624:4:3"
- }
- ],
- "id": 886,
- "name": "VariableDeclaration",
- "src": "1624:12:3"
- }
- ],
- "id": 887,
- "name": "ParameterList",
- "src": "1581:56:3"
- },
- {
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "_receivedAmount",
- "scope": 946,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 888,
- "name": "ElementaryTypeName",
- "src": "1670:4:3"
- }
- ],
- "id": 889,
- "name": "VariableDeclaration",
- "src": "1670:20:3"
- }
- ],
- "id": 890,
- "name": "ParameterList",
- "src": "1669:22:3"
- },
- {
- "children": [
- {
- "attributes": {
- "assignments": [
- null,
- 892
- ]
- },
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "minRate",
- "scope": 945,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 891,
- "name": "ElementaryTypeName",
- "src": "1827:4:3"
- }
- ],
- "id": 892,
- "name": "VariableDeclaration",
- "src": "1827:12:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "tuple(uint256,uint256)",
- "type_conversion": false
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "member_name": "getExpectedRate",
- "referencedDeclaration": 842,
- "type": "function (contract ERC20,contract ERC20,uint256) view external returns (uint256,uint256)"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 848,
- "type": "contract KyberNetworkInterface",
- "value": "kyberNetworkProxy"
- },
- "id": 893,
- "name": "Identifier",
- "src": "1843:17:3"
- }
- ],
- "id": 894,
- "name": "MemberAccess",
- "src": "1843:33:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 884,
- "type": "contract ERC20",
- "value": "_srcToken"
- },
- "id": 895,
- "name": "Identifier",
- "src": "1877:9:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 850,
- "type": "contract ERC20",
- "value": "mcdDai"
- },
- "id": 896,
- "name": "Identifier",
- "src": "1888:6:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 886,
- "type": "uint256",
- "value": "_srcQty"
- },
- "id": 897,
- "name": "Identifier",
- "src": "1896:7:3"
- }
- ],
- "id": 898,
- "name": "FunctionCall",
- "src": "1843:61:3"
- }
- ],
- "id": 899,
- "name": "VariableDeclarationStatement",
- "src": "1824:80:3"
- },
- {
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "tuple()",
- "type_conversion": false
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- },
- {
- "typeIdentifier": "t_stringliteral_cd8a26f843eff9b2bf99b352dcd2a0d6ce6e2f8c493a2424530bffc1932f5b6e",
- "typeString": "literal_string \"Transfer of incoming ERC20 failed\""
- }
- ],
- "overloadedDeclarations": [
- 2824,
- 2825
- ],
- "referencedDeclaration": 2825,
- "type": "function (bool,string memory) pure",
- "value": "require"
- },
- "id": 900,
- "name": "Identifier",
- "src": "1974:7:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "bool",
- "type_conversion": false
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address_payable",
- "typeString": "address payable"
- },
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "member_name": "transferFrom",
- "referencedDeclaration": 789,
- "type": "function (address,address,uint256) external returns (bool)"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 884,
- "type": "contract ERC20",
- "value": "_srcToken"
- },
- "id": 901,
- "name": "Identifier",
- "src": "1982:9:3"
- }
- ],
- "id": 902,
- "name": "MemberAccess",
- "src": "1982:22:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "member_name": "sender",
- "referencedDeclaration": null,
- "type": "address payable"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 2821,
- "type": "msg",
- "value": "msg"
- },
- "id": 903,
- "name": "Identifier",
- "src": "2005:3:3"
- }
- ],
- "id": 904,
- "name": "MemberAccess",
- "src": "2005:10:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "address",
- "type_conversion": true
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_KyberTrader_$947",
- "typeString": "contract KyberTrader"
- }
- ],
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "type": "type(address)",
- "value": "address"
- },
- "id": 905,
- "name": "ElementaryTypeNameExpression",
- "src": "2017:7:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 2875,
- "type": "contract KyberTrader",
- "value": "this"
- },
- "id": 906,
- "name": "Identifier",
- "src": "2025:4:3"
- }
- ],
- "id": 907,
- "name": "FunctionCall",
- "src": "2017:13:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 886,
- "type": "uint256",
- "value": "_srcQty"
- },
- "id": 908,
- "name": "Identifier",
- "src": "2032:7:3"
- }
- ],
- "id": 909,
- "name": "FunctionCall",
- "src": "1982:58:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "hexvalue": "5472616e73666572206f6620696e636f6d696e67204552433230206661696c6564",
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "subdenomination": null,
- "token": "string",
- "type": "literal_string \"Transfer of incoming ERC20 failed\"",
- "value": "Transfer of incoming ERC20 failed"
- },
- "id": 910,
- "name": "Literal",
- "src": "2042:35:3"
- }
- ],
- "id": 911,
- "name": "FunctionCall",
- "src": "1974:104:3"
- }
- ],
- "id": 912,
- "name": "ExpressionStatement",
- "src": "1974:104:3"
- },
- {
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "tuple()",
- "type_conversion": false
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_bool",
- "typeString": "bool"
- },
- {
- "typeIdentifier": "t_stringliteral_d31ea363c9a235e5ac003b13cce657c446344b42ccccf806e7e8d722ee92802f",
- "typeString": "literal_string \"Could not reset incoming ERC20 allowance\""
- }
- ],
- "overloadedDeclarations": [
- 2824,
- 2825
- ],
- "referencedDeclaration": 2825,
- "type": "function (bool,string memory) pure",
- "value": "require"
- },
- "id": 913,
- "name": "Identifier",
- "src": "2192:7:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "bool",
- "type_conversion": false
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_rational_0_by_1",
- "typeString": "int_const 0"
- }
- ],
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "member_name": "approve",
- "referencedDeclaration": 778,
- "type": "function (address,uint256) external returns (bool)"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 884,
- "type": "contract ERC20",
- "value": "_srcToken"
- },
- "id": 914,
- "name": "Identifier",
- "src": "2200:9:3"
- }
- ],
- "id": 915,
- "name": "MemberAccess",
- "src": "2200:17:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "address",
- "type_conversion": true
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_KyberNetworkInterface_$843",
- "typeString": "contract KyberNetworkInterface"
- }
- ],
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "type": "type(address)",
- "value": "address"
- },
- "id": 916,
- "name": "ElementaryTypeNameExpression",
- "src": "2218:7:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 848,
- "type": "contract KyberNetworkInterface",
- "value": "kyberNetworkProxy"
- },
- "id": 917,
- "name": "Identifier",
- "src": "2226:17:3"
- }
- ],
- "id": 918,
- "name": "FunctionCall",
- "src": "2218:26:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "hexvalue": "30",
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "subdenomination": null,
- "token": "number",
- "type": "int_const 0",
- "value": "0"
- },
- "id": 919,
- "name": "Literal",
- "src": "2246:1:3"
- }
- ],
- "id": 920,
- "name": "FunctionCall",
- "src": "2200:48:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "hexvalue": "436f756c64206e6f7420726573657420696e636f6d696e6720455243323020616c6c6f77616e6365",
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "subdenomination": null,
- "token": "string",
- "type": "literal_string \"Could not reset incoming ERC20 allowance\"",
- "value": "Could not reset incoming ERC20 allowance"
- },
- "id": 921,
- "name": "Literal",
- "src": "2250:42:3"
- }
- ],
- "id": 922,
- "name": "FunctionCall",
- "src": "2192:101:3"
- }
- ],
- "id": 923,
- "name": "ExpressionStatement",
- "src": "2192:101:3"
- },
- {
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "bool",
- "type_conversion": false
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "member_name": "approve",
- "referencedDeclaration": 778,
- "type": "function (address,uint256) external returns (bool)"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 884,
- "type": "contract ERC20",
- "value": "_srcToken"
- },
- "id": 924,
- "name": "Identifier",
- "src": "2371:9:3"
- }
- ],
- "id": 926,
- "name": "MemberAccess",
- "src": "2371:17:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "address",
- "type_conversion": true
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_KyberNetworkInterface_$843",
- "typeString": "contract KyberNetworkInterface"
- }
- ],
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "type": "type(address)",
- "value": "address"
- },
- "id": 927,
- "name": "ElementaryTypeNameExpression",
- "src": "2389:7:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 848,
- "type": "contract KyberNetworkInterface",
- "value": "kyberNetworkProxy"
- },
- "id": 928,
- "name": "Identifier",
- "src": "2397:17:3"
- }
- ],
- "id": 929,
- "name": "FunctionCall",
- "src": "2389:26:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 886,
- "type": "uint256",
- "value": "_srcQty"
- },
- "id": 930,
- "name": "Identifier",
- "src": "2417:7:3"
- }
- ],
- "id": 931,
- "name": "FunctionCall",
- "src": "2371:54:3"
- }
- ],
- "id": 932,
- "name": "ExpressionStatement",
- "src": "2371:54:3"
- },
- {
- "attributes": {
- "assignments": [
- 934
- ]
- },
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "result",
- "scope": 945,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 933,
- "name": "ElementaryTypeName",
- "src": "2464:4:3"
- }
- ],
- "id": 934,
- "name": "VariableDeclaration",
- "src": "2464:11:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "uint256",
- "type_conversion": false
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "member_name": "swapTokenToToken",
- "referencedDeclaration": 820,
- "type": "function (contract ERC20,uint256,contract ERC20,uint256) external returns (uint256)"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 848,
- "type": "contract KyberNetworkInterface",
- "value": "kyberNetworkProxy"
- },
- "id": 935,
- "name": "Identifier",
- "src": "2478:17:3"
- }
- ],
- "id": 936,
- "name": "MemberAccess",
- "src": "2478:34:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 884,
- "type": "contract ERC20",
- "value": "_srcToken"
- },
- "id": 937,
- "name": "Identifier",
- "src": "2513:9:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 886,
- "type": "uint256",
- "value": "_srcQty"
- },
- "id": 938,
- "name": "Identifier",
- "src": "2524:7:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 850,
- "type": "contract ERC20",
- "value": "mcdDai"
- },
- "id": 939,
- "name": "Identifier",
- "src": "2533:6:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 892,
- "type": "uint256",
- "value": "minRate"
- },
- "id": 940,
- "name": "Identifier",
- "src": "2541:7:3"
- }
- ],
- "id": 941,
- "name": "FunctionCall",
- "src": "2478:71:3"
- }
- ],
- "id": 942,
- "name": "VariableDeclarationStatement",
- "src": "2464:85:3"
- },
- {
- "attributes": {
- "functionReturnParameters": 890
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 934,
- "type": "uint256",
- "value": "result"
- },
- "id": 943,
- "name": "Identifier",
- "src": "2566:6:3"
- }
- ],
- "id": 944,
- "name": "Return",
- "src": "2559:13:3"
- }
- ],
- "id": 945,
- "name": "Block",
- "src": "1696:883:3"
- }
- ],
- "id": 946,
- "name": "FunctionDefinition",
- "src": "1556:1023:3"
- }
- ],
- "id": 947,
- "name": "ContractDefinition",
- "src": "1022:1559:3"
- },
- {
- "attributes": {
- "contractDependencies": [
- 947
- ],
- "contractKind": "contract",
- "documentation": null,
- "fullyImplemented": true,
- "linearizedBaseContracts": [
- 1122,
- 947
- ],
- "name": "EntryBot",
- "scope": 1138
- },
- "children": [
- {
- "attributes": {
- "arguments": null
- },
- "children": [
- {
- "attributes": {
- "contractScope": null,
- "name": "KyberTrader",
- "referencedDeclaration": 947,
- "type": "contract KyberTrader"
- },
- "id": 948,
- "name": "UserDefinedTypeName",
- "src": "2604:11:3"
- }
- ],
- "id": 949,
- "name": "InheritanceSpecifier",
- "src": "2604:11:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "bucketSale",
- "scope": 1122,
- "stateVariable": true,
- "storageLocation": "default",
- "type": "contract BucketSale",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "contractScope": null,
- "name": "BucketSale",
- "referencedDeclaration": 807,
- "type": "contract BucketSale"
- },
- "id": 950,
- "name": "UserDefinedTypeName",
- "src": "2622:10:3"
- }
- ],
- "id": 951,
- "name": "VariableDeclaration",
- "src": "2622:21:3"
- },
- {
- "attributes": {
- "documentation": null,
- "implemented": true,
- "isConstructor": true,
- "kind": "constructor",
- "modifiers": [
- null
- ],
- "name": "",
- "scope": 1122,
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "public"
- },
- "children": [
- {
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "_bucketSale",
- "scope": 987,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "contract BucketSale",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "contractScope": null,
- "name": "BucketSale",
- "referencedDeclaration": 807,
- "type": "contract BucketSale"
- },
- "id": 952,
- "name": "UserDefinedTypeName",
- "src": "2662:10:3"
- }
- ],
- "id": 953,
- "name": "VariableDeclaration",
- "src": "2662:22:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_kyberNetworkProxy",
- "scope": 987,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "contract KyberNetworkInterface",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "contractScope": null,
- "name": "KyberNetworkInterface",
- "referencedDeclaration": 843,
- "type": "contract KyberNetworkInterface"
- },
- "id": 954,
- "name": "UserDefinedTypeName",
- "src": "2686:21:3"
- }
- ],
- "id": 955,
- "name": "VariableDeclaration",
- "src": "2686:40:3"
- }
- ],
- "id": 956,
- "name": "ParameterList",
- "src": "2661:66:3"
- },
- {
- "attributes": {
- "parameters": [
- null
- ]
- },
- "children": [],
- "id": 957,
- "name": "ParameterList",
- "src": "2747:0:3"
- },
- {
- "children": [
- {
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "operator": "=",
- "type": "contract BucketSale"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 951,
- "type": "contract BucketSale",
- "value": "bucketSale"
- },
- "id": 958,
- "name": "Identifier",
- "src": "2757:10:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 953,
- "type": "contract BucketSale",
- "value": "_bucketSale"
- },
- "id": 959,
- "name": "Identifier",
- "src": "2770:11:3"
- }
- ],
- "id": 960,
- "name": "Assignment",
- "src": "2757:24:3"
- }
- ],
- "id": 961,
- "name": "ExpressionStatement",
- "src": "2757:24:3"
- },
- {
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "operator": "=",
- "type": "contract ERC20"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 850,
- "type": "contract ERC20",
- "value": "mcdDai"
- },
- "id": 962,
- "name": "Identifier",
- "src": "2791:6:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "arguments": [
- null
- ],
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "contract ERC20",
- "type_conversion": false
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- null
- ],
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "member_name": "tokenSoldFor",
- "referencedDeclaration": 795,
- "type": "function () external returns (contract ERC20)"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 951,
- "type": "contract BucketSale",
- "value": "bucketSale"
- },
- "id": 963,
- "name": "Identifier",
- "src": "2800:10:3"
- }
- ],
- "id": 964,
- "name": "MemberAccess",
- "src": "2800:23:3"
- }
- ],
- "id": 965,
- "name": "FunctionCall",
- "src": "2800:25:3"
- }
- ],
- "id": 966,
- "name": "Assignment",
- "src": "2791:34:3"
- }
- ],
- "id": 967,
- "name": "ExpressionStatement",
- "src": "2791:34:3"
- },
- {
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "operator": "=",
- "type": "contract KyberNetworkInterface"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 848,
- "type": "contract KyberNetworkInterface",
- "value": "kyberNetworkProxy"
- },
- "id": 968,
- "name": "Identifier",
- "src": "2835:17:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 955,
- "type": "contract KyberNetworkInterface",
- "value": "_kyberNetworkProxy"
- },
- "id": 969,
- "name": "Identifier",
- "src": "2855:18:3"
- }
- ],
- "id": 970,
- "name": "Assignment",
- "src": "2835:38:3"
- }
- ],
- "id": 971,
- "name": "ExpressionStatement",
- "src": "2835:38:3"
- },
- {
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "bool",
- "type_conversion": false
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "member_name": "approve",
- "referencedDeclaration": 778,
- "type": "function (address,uint256) external returns (bool)"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "arguments": [
- null
- ],
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "contract ERC20",
- "type_conversion": false
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- null
- ],
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "member_name": "tokenSoldFor",
- "referencedDeclaration": 795,
- "type": "function () external returns (contract ERC20)"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 951,
- "type": "contract BucketSale",
- "value": "bucketSale"
- },
- "id": 972,
- "name": "Identifier",
- "src": "2883:10:3"
- }
- ],
- "id": 974,
- "name": "MemberAccess",
- "src": "2883:23:3"
- }
- ],
- "id": 975,
- "name": "FunctionCall",
- "src": "2883:25:3"
- }
- ],
- "id": 976,
- "name": "MemberAccess",
- "src": "2883:33:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "address",
- "type_conversion": true
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_BucketSale_$807",
- "typeString": "contract BucketSale"
- }
- ],
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "type": "type(address)",
- "value": "address"
- },
- "id": 977,
- "name": "ElementaryTypeNameExpression",
- "src": "2917:7:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 951,
- "type": "contract BucketSale",
- "value": "bucketSale"
- },
- "id": 978,
- "name": "Identifier",
- "src": "2925:10:3"
- }
- ],
- "id": 979,
- "name": "FunctionCall",
- "src": "2917:19:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "uint256",
- "type_conversion": true
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_rational_minus_1_by_1",
- "typeString": "int_const -1"
- }
- ],
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "type": "type(uint256)",
- "value": "uint"
- },
- "id": 980,
- "name": "ElementaryTypeNameExpression",
- "src": "2938:4:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "operator": "-",
- "prefix": true,
- "type": "int_const -1"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "hexvalue": "31",
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "subdenomination": null,
- "token": "number",
- "type": "int_const 1",
- "value": "1"
- },
- "id": 981,
- "name": "Literal",
- "src": "2944:1:3"
- }
- ],
- "id": 982,
- "name": "UnaryOperation",
- "src": "2943:2:3"
- }
- ],
- "id": 983,
- "name": "FunctionCall",
- "src": "2938:8:3"
- }
- ],
- "id": 984,
- "name": "FunctionCall",
- "src": "2883:64:3"
- }
- ],
- "id": 985,
- "name": "ExpressionStatement",
- "src": "2883:64:3"
- }
- ],
- "id": 986,
- "name": "Block",
- "src": "2747:207:3"
- }
- ],
- "id": 987,
- "name": "FunctionDefinition",
- "src": "2650:304:3"
- },
- {
- "attributes": {
- "documentation": null,
- "implemented": true,
- "isConstructor": false,
- "kind": "function",
- "modifiers": [
- null
- ],
- "name": "agreeToTermsAndConditionsListedInThisBucketSaleContractAndEnterSaleWithEther",
- "scope": 1122,
- "stateMutability": "payable",
- "superFunction": null,
- "visibility": "public"
- },
- "children": [
- {
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "_buyer",
- "scope": 1012,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "address",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "address",
- "stateMutability": "nonpayable",
- "type": "address"
- },
- "id": 988,
- "name": "ElementaryTypeName",
- "src": "3059:7:3"
- }
- ],
- "id": 989,
- "name": "VariableDeclaration",
- "src": "3059:14:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_bucketId",
- "scope": 1012,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 990,
- "name": "ElementaryTypeName",
- "src": "3087:4:3"
- }
- ],
- "id": 991,
- "name": "VariableDeclaration",
- "src": "3087:14:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_numberOfBuckets",
- "scope": 1012,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 992,
- "name": "ElementaryTypeName",
- "src": "3115:4:3"
- }
- ],
- "id": 993,
- "name": "VariableDeclaration",
- "src": "3115:21:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_referrer",
- "scope": 1012,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "address",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "address",
- "stateMutability": "nonpayable",
- "type": "address"
- },
- "id": 994,
- "name": "ElementaryTypeName",
- "src": "3150:7:3"
- }
- ],
- "id": 995,
- "name": "VariableDeclaration",
- "src": "3150:17:3"
- }
- ],
- "id": 996,
- "name": "ParameterList",
- "src": "3045:123:3"
- },
- {
- "attributes": {
- "parameters": [
- null
- ]
- },
- "children": [],
- "id": 997,
- "name": "ParameterList",
- "src": "3204:0:3"
- },
- {
- "children": [
- {
- "attributes": {
- "assignments": [
- 999
- ]
- },
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "receivedDai",
- "scope": 1011,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 998,
- "name": "ElementaryTypeName",
- "src": "3214:4:3"
- }
- ],
- "id": 999,
- "name": "VariableDeclaration",
- "src": "3214:16:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "arguments": [
- null
- ],
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "uint256",
- "type_conversion": false
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- null
- ],
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 882,
- "type": "function () returns (uint256)",
- "value": "swapEtherToToken"
- },
- "id": 1000,
- "name": "Identifier",
- "src": "3233:16:3"
- }
- ],
- "id": 1001,
- "name": "FunctionCall",
- "src": "3233:18:3"
- }
- ],
- "id": 1002,
- "name": "VariableDeclarationStatement",
- "src": "3214:37:3"
- },
- {
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "tuple()",
- "type_conversion": false
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- ],
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1121,
- "type": "function (address,uint256,uint256,uint256,address)",
- "value": "_enterSale"
- },
- "id": 1003,
- "name": "Identifier",
- "src": "3261:10:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 989,
- "type": "address",
- "value": "_buyer"
- },
- "id": 1004,
- "name": "Identifier",
- "src": "3285:6:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 991,
- "type": "uint256",
- "value": "_bucketId"
- },
- "id": 1005,
- "name": "Identifier",
- "src": "3305:9:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 999,
- "type": "uint256",
- "value": "receivedDai"
- },
- "id": 1006,
- "name": "Identifier",
- "src": "3328:11:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 993,
- "type": "uint256",
- "value": "_numberOfBuckets"
- },
- "id": 1007,
- "name": "Identifier",
- "src": "3353:16:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 995,
- "type": "address",
- "value": "_referrer"
- },
- "id": 1008,
- "name": "Identifier",
- "src": "3383:9:3"
- }
- ],
- "id": 1009,
- "name": "FunctionCall",
- "src": "3261:132:3"
- }
- ],
- "id": 1010,
- "name": "ExpressionStatement",
- "src": "3261:132:3"
- }
- ],
- "id": 1011,
- "name": "Block",
- "src": "3204:196:3"
- }
- ],
- "id": 1012,
- "name": "FunctionDefinition",
- "src": "2960:440:3"
- },
- {
- "attributes": {
- "documentation": null,
- "implemented": true,
- "isConstructor": false,
- "kind": "function",
- "modifiers": [
- null
- ],
- "name": "agreeToTermsAndConditionsListedInThisBucketSaleContractAndEnterSaleWithErc20",
- "scope": 1122,
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "public"
- },
- "children": [
- {
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "_buyer",
- "scope": 1043,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "address",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "address",
- "stateMutability": "nonpayable",
- "type": "address"
- },
- "id": 1013,
- "name": "ElementaryTypeName",
- "src": "3505:7:3"
- }
- ],
- "id": 1014,
- "name": "VariableDeclaration",
- "src": "3505:14:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_bucketId",
- "scope": 1043,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 1015,
- "name": "ElementaryTypeName",
- "src": "3533:4:3"
- }
- ],
- "id": 1016,
- "name": "VariableDeclaration",
- "src": "3533:14:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_Erc20",
- "scope": 1043,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "contract ERC20",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "contractScope": null,
- "name": "ERC20",
- "referencedDeclaration": 790,
- "type": "contract ERC20"
- },
- "id": 1017,
- "name": "UserDefinedTypeName",
- "src": "3561:5:3"
- }
- ],
- "id": 1018,
- "name": "VariableDeclaration",
- "src": "3561:12:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_totalBuyAmount",
- "scope": 1043,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 1019,
- "name": "ElementaryTypeName",
- "src": "3587:4:3"
- }
- ],
- "id": 1020,
- "name": "VariableDeclaration",
- "src": "3587:20:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_numberOfBuckets",
- "scope": 1043,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 1021,
- "name": "ElementaryTypeName",
- "src": "3621:4:3"
- }
- ],
- "id": 1022,
- "name": "VariableDeclaration",
- "src": "3621:21:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_referrer",
- "scope": 1043,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "address",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "address",
- "stateMutability": "nonpayable",
- "type": "address"
- },
- "id": 1023,
- "name": "ElementaryTypeName",
- "src": "3656:7:3"
- }
- ],
- "id": 1024,
- "name": "VariableDeclaration",
- "src": "3656:17:3"
- }
- ],
- "id": 1025,
- "name": "ParameterList",
- "src": "3491:183:3"
- },
- {
- "attributes": {
- "parameters": [
- null
- ]
- },
- "children": [],
- "id": 1026,
- "name": "ParameterList",
- "src": "3694:0:3"
- },
- {
- "children": [
- {
- "attributes": {
- "assignments": [
- 1028
- ]
- },
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "receivedDai",
- "scope": 1042,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 1027,
- "name": "ElementaryTypeName",
- "src": "3704:4:3"
- }
- ],
- "id": 1028,
- "name": "VariableDeclaration",
- "src": "3704:16:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "uint256",
- "type_conversion": false
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_ERC20_$790",
- "typeString": "contract ERC20"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 946,
- "type": "function (contract ERC20,uint256) returns (uint256)",
- "value": "swapTokenToToken"
- },
- "id": 1029,
- "name": "Identifier",
- "src": "3723:16:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1018,
- "type": "contract ERC20",
- "value": "_Erc20"
- },
- "id": 1030,
- "name": "Identifier",
- "src": "3740:6:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1020,
- "type": "uint256",
- "value": "_totalBuyAmount"
- },
- "id": 1031,
- "name": "Identifier",
- "src": "3748:15:3"
- }
- ],
- "id": 1032,
- "name": "FunctionCall",
- "src": "3723:41:3"
- }
- ],
- "id": 1033,
- "name": "VariableDeclarationStatement",
- "src": "3704:60:3"
- },
- {
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "tuple()",
- "type_conversion": false
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- ],
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1121,
- "type": "function (address,uint256,uint256,uint256,address)",
- "value": "_enterSale"
- },
- "id": 1034,
- "name": "Identifier",
- "src": "3774:10:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1014,
- "type": "address",
- "value": "_buyer"
- },
- "id": 1035,
- "name": "Identifier",
- "src": "3798:6:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1016,
- "type": "uint256",
- "value": "_bucketId"
- },
- "id": 1036,
- "name": "Identifier",
- "src": "3818:9:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1028,
- "type": "uint256",
- "value": "receivedDai"
- },
- "id": 1037,
- "name": "Identifier",
- "src": "3841:11:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1022,
- "type": "uint256",
- "value": "_numberOfBuckets"
- },
- "id": 1038,
- "name": "Identifier",
- "src": "3866:16:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1024,
- "type": "address",
- "value": "_referrer"
- },
- "id": 1039,
- "name": "Identifier",
- "src": "3896:9:3"
- }
- ],
- "id": 1040,
- "name": "FunctionCall",
- "src": "3774:132:3"
- }
- ],
- "id": 1041,
- "name": "ExpressionStatement",
- "src": "3774:132:3"
- }
- ],
- "id": 1042,
- "name": "Block",
- "src": "3694:219:3"
- }
- ],
- "id": 1043,
- "name": "FunctionDefinition",
- "src": "3406:507:3"
- },
- {
- "attributes": {
- "documentation": null,
- "implemented": true,
- "isConstructor": false,
- "kind": "function",
- "modifiers": [
- null
- ],
- "name": "agreeToTermsAndConditionsListedInThisBucketSaleContractAndEnterSaleWithDai",
- "scope": 1122,
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "public"
- },
- "children": [
- {
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "_buyer",
- "scope": 1078,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "address",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "address",
- "stateMutability": "nonpayable",
- "type": "address"
- },
- "id": 1044,
- "name": "ElementaryTypeName",
- "src": "4016:7:3"
- }
- ],
- "id": 1045,
- "name": "VariableDeclaration",
- "src": "4016:14:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_bucketId",
- "scope": 1078,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 1046,
- "name": "ElementaryTypeName",
- "src": "4044:4:3"
- }
- ],
- "id": 1047,
- "name": "VariableDeclaration",
- "src": "4044:14:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_totalBuyAmount",
- "scope": 1078,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 1048,
- "name": "ElementaryTypeName",
- "src": "4072:4:3"
- }
- ],
- "id": 1049,
- "name": "VariableDeclaration",
- "src": "4072:20:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_numberOfBuckets",
- "scope": 1078,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 1050,
- "name": "ElementaryTypeName",
- "src": "4106:4:3"
- }
- ],
- "id": 1051,
- "name": "VariableDeclaration",
- "src": "4106:21:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_referrer",
- "scope": 1078,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "address",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "address",
- "stateMutability": "nonpayable",
- "type": "address"
- },
- "id": 1052,
- "name": "ElementaryTypeName",
- "src": "4141:7:3"
- }
- ],
- "id": 1053,
- "name": "VariableDeclaration",
- "src": "4141:17:3"
- }
- ],
- "id": 1054,
- "name": "ParameterList",
- "src": "4002:157:3"
- },
- {
- "attributes": {
- "parameters": [
- null
- ]
- },
- "children": [],
- "id": 1055,
- "name": "ParameterList",
- "src": "4179:0:3"
- },
- {
- "children": [
- {
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "bool",
- "type_conversion": false
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address_payable",
- "typeString": "address payable"
- },
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- }
- ],
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "member_name": "transferFrom",
- "referencedDeclaration": 789,
- "type": "function (address,address,uint256) external returns (bool)"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "arguments": [
- null
- ],
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "contract ERC20",
- "type_conversion": false
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- null
- ],
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "member_name": "tokenSoldFor",
- "referencedDeclaration": 795,
- "type": "function () external returns (contract ERC20)"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 951,
- "type": "contract BucketSale",
- "value": "bucketSale"
- },
- "id": 1056,
- "name": "Identifier",
- "src": "4189:10:3"
- }
- ],
- "id": 1058,
- "name": "MemberAccess",
- "src": "4189:23:3"
- }
- ],
- "id": 1059,
- "name": "FunctionCall",
- "src": "4189:25:3"
- }
- ],
- "id": 1060,
- "name": "MemberAccess",
- "src": "4189:38:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "member_name": "sender",
- "referencedDeclaration": null,
- "type": "address payable"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 2821,
- "type": "msg",
- "value": "msg"
- },
- "id": 1061,
- "name": "Identifier",
- "src": "4228:3:3"
- }
- ],
- "id": 1062,
- "name": "MemberAccess",
- "src": "4228:10:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "address",
- "type_conversion": true
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_contract$_EntryBot_$1122",
- "typeString": "contract EntryBot"
- }
- ],
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "type": "type(address)",
- "value": "address"
- },
- "id": 1063,
- "name": "ElementaryTypeNameExpression",
- "src": "4240:7:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 2877,
- "type": "contract EntryBot",
- "value": "this"
- },
- "id": 1064,
- "name": "Identifier",
- "src": "4248:4:3"
- }
- ],
- "id": 1065,
- "name": "FunctionCall",
- "src": "4240:13:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1049,
- "type": "uint256",
- "value": "_totalBuyAmount"
- },
- "id": 1066,
- "name": "Identifier",
- "src": "4255:15:3"
- }
- ],
- "id": 1067,
- "name": "FunctionCall",
- "src": "4189:82:3"
- }
- ],
- "id": 1068,
- "name": "ExpressionStatement",
- "src": "4189:82:3"
- },
- {
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "tuple()",
- "type_conversion": false
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- ],
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1121,
- "type": "function (address,uint256,uint256,uint256,address)",
- "value": "_enterSale"
- },
- "id": 1069,
- "name": "Identifier",
- "src": "4281:10:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1045,
- "type": "address",
- "value": "_buyer"
- },
- "id": 1070,
- "name": "Identifier",
- "src": "4292:6:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1047,
- "type": "uint256",
- "value": "_bucketId"
- },
- "id": 1071,
- "name": "Identifier",
- "src": "4300:9:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1049,
- "type": "uint256",
- "value": "_totalBuyAmount"
- },
- "id": 1072,
- "name": "Identifier",
- "src": "4311:15:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1051,
- "type": "uint256",
- "value": "_numberOfBuckets"
- },
- "id": 1073,
- "name": "Identifier",
- "src": "4328:16:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1053,
- "type": "address",
- "value": "_referrer"
- },
- "id": 1074,
- "name": "Identifier",
- "src": "4346:9:3"
- }
- ],
- "id": 1075,
- "name": "FunctionCall",
- "src": "4281:75:3"
- }
- ],
- "id": 1076,
- "name": "ExpressionStatement",
- "src": "4281:75:3"
- }
- ],
- "id": 1077,
- "name": "Block",
- "src": "4179:184:3"
- }
- ],
- "id": 1078,
- "name": "FunctionDefinition",
- "src": "3919:444:3"
- },
- {
- "attributes": {
- "documentation": null,
- "implemented": true,
- "isConstructor": false,
- "kind": "function",
- "modifiers": [
- null
- ],
- "name": "_enterSale",
- "scope": 1122,
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "private"
- },
- "children": [
- {
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "_buyer",
- "scope": 1121,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "address",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "address",
- "stateMutability": "nonpayable",
- "type": "address"
- },
- "id": 1079,
- "name": "ElementaryTypeName",
- "src": "4402:7:3"
- }
- ],
- "id": 1080,
- "name": "VariableDeclaration",
- "src": "4402:14:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_bucketId",
- "scope": 1121,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 1081,
- "name": "ElementaryTypeName",
- "src": "4430:4:3"
- }
- ],
- "id": 1082,
- "name": "VariableDeclaration",
- "src": "4430:14:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_totalBuyAmount",
- "scope": 1121,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 1083,
- "name": "ElementaryTypeName",
- "src": "4458:4:3"
- }
- ],
- "id": 1084,
- "name": "VariableDeclaration",
- "src": "4458:20:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_numberOfBuckets",
- "scope": 1121,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 1085,
- "name": "ElementaryTypeName",
- "src": "4492:4:3"
- }
- ],
- "id": 1086,
- "name": "VariableDeclaration",
- "src": "4492:21:3"
- },
- {
- "attributes": {
- "constant": false,
- "name": "_referrer",
- "scope": 1121,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "address",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "address",
- "stateMutability": "nonpayable",
- "type": "address"
- },
- "id": 1087,
- "name": "ElementaryTypeName",
- "src": "4527:7:3"
- }
- ],
- "id": 1088,
- "name": "VariableDeclaration",
- "src": "4527:17:3"
- }
- ],
- "id": 1089,
- "name": "ParameterList",
- "src": "4388:157:3"
- },
- {
- "attributes": {
- "parameters": [
- null
- ]
- },
- "children": [],
- "id": 1090,
- "name": "ParameterList",
- "src": "4566:0:3"
- },
- {
- "children": [
- {
- "attributes": {
- "assignments": [
- 1092
- ]
- },
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "amountPerBucket",
- "scope": 1120,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 1091,
- "name": "ElementaryTypeName",
- "src": "4576:4:3"
- }
- ],
- "id": 1092,
- "name": "VariableDeclaration",
- "src": "4576:20:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "commonType": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "operator": "/",
- "type": "uint256"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1084,
- "type": "uint256",
- "value": "_totalBuyAmount"
- },
- "id": 1093,
- "name": "Identifier",
- "src": "4599:15:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1086,
- "type": "uint256",
- "value": "_numberOfBuckets"
- },
- "id": 1094,
- "name": "Identifier",
- "src": "4617:16:3"
- }
- ],
- "id": 1095,
- "name": "BinaryOperation",
- "src": "4599:34:3"
- }
- ],
- "id": 1096,
- "name": "VariableDeclarationStatement",
- "src": "4576:57:3"
- },
- {
- "children": [
- {
- "attributes": {
- "assignments": [
- 1098
- ]
- },
- "children": [
- {
- "attributes": {
- "constant": false,
- "name": "i",
- "scope": 1119,
- "stateVariable": false,
- "storageLocation": "default",
- "type": "uint256",
- "value": null,
- "visibility": "internal"
- },
- "children": [
- {
- "attributes": {
- "name": "uint",
- "type": "uint256"
- },
- "id": 1097,
- "name": "ElementaryTypeName",
- "src": "4648:4:3"
- }
- ],
- "id": 1098,
- "name": "VariableDeclaration",
- "src": "4648:6:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "hexvalue": "30",
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "subdenomination": null,
- "token": "number",
- "type": "int_const 0",
- "value": "0"
- },
- "id": 1099,
- "name": "Literal",
- "src": "4657:1:3"
- }
- ],
- "id": 1100,
- "name": "VariableDeclarationStatement",
- "src": "4648:10:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "commonType": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "operator": "<",
- "type": "bool"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1098,
- "type": "uint256",
- "value": "i"
- },
- "id": 1101,
- "name": "Identifier",
- "src": "4660:1:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1086,
- "type": "uint256",
- "value": "_numberOfBuckets"
- },
- "id": 1102,
- "name": "Identifier",
- "src": "4664:16:3"
- }
- ],
- "id": 1103,
- "name": "BinaryOperation",
- "src": "4660:20:3"
- },
- {
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "operator": "++",
- "prefix": false,
- "type": "uint256"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1098,
- "type": "uint256",
- "value": "i"
- },
- "id": 1104,
- "name": "Identifier",
- "src": "4682:1:3"
- }
- ],
- "id": 1105,
- "name": "UnaryOperation",
- "src": "4682:3:3"
- }
- ],
- "id": 1106,
- "name": "ExpressionStatement",
- "src": "4682:3:3"
- },
- {
- "children": [
- {
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "tuple()",
- "type_conversion": false
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- {
- "typeIdentifier": "t_address",
- "typeString": "address"
- }
- ],
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "member_name": "agreeToTermsAndConditionsListedInThisContractAndEnterSale",
- "referencedDeclaration": 806,
- "type": "function (address,uint256,uint256,address) external"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 951,
- "type": "contract BucketSale",
- "value": "bucketSale"
- },
- "id": 1107,
- "name": "Identifier",
- "src": "4709:10:3"
- }
- ],
- "id": 1109,
- "name": "MemberAccess",
- "src": "4709:68:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1080,
- "type": "address",
- "value": "_buyer"
- },
- "id": 1110,
- "name": "Identifier",
- "src": "4795:6:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "commonType": {
- "typeIdentifier": "t_uint256",
- "typeString": "uint256"
- },
- "isConstant": false,
- "isLValue": false,
- "isPure": false,
- "lValueRequested": false,
- "operator": "+",
- "type": "uint256"
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1082,
- "type": "uint256",
- "value": "_bucketId"
- },
- "id": 1111,
- "name": "Identifier",
- "src": "4819:9:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1098,
- "type": "uint256",
- "value": "i"
- },
- "id": 1112,
- "name": "Identifier",
- "src": "4831:1:3"
- }
- ],
- "id": 1113,
- "name": "BinaryOperation",
- "src": "4819:13:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1092,
- "type": "uint256",
- "value": "amountPerBucket"
- },
- "id": 1114,
- "name": "Identifier",
- "src": "4850:15:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1088,
- "type": "address",
- "value": "_referrer"
- },
- "id": 1115,
- "name": "Identifier",
- "src": "4883:9:3"
- }
- ],
- "id": 1116,
- "name": "FunctionCall",
- "src": "4709:197:3"
- }
- ],
- "id": 1117,
- "name": "ExpressionStatement",
- "src": "4709:197:3"
- }
- ],
- "id": 1118,
- "name": "Block",
- "src": "4695:222:3"
- }
- ],
- "id": 1119,
- "name": "ForStatement",
- "src": "4644:273:3"
- }
- ],
- "id": 1120,
- "name": "Block",
- "src": "4566:357:3"
- }
- ],
- "id": 1121,
- "name": "FunctionDefinition",
- "src": "4369:554:3"
- }
- ],
- "id": 1122,
- "name": "ContractDefinition",
- "src": "2583:2342:3"
- },
- {
- "attributes": {
- "contractDependencies": [
- 947,
- 1122
- ],
- "contractKind": "contract",
- "documentation": null,
- "fullyImplemented": true,
- "linearizedBaseContracts": [
- 1137,
- 1122,
- 947
- ],
- "name": "EntryBotMainNet",
- "scope": 1138
- },
- "children": [
- {
- "attributes": {
- "arguments": null
- },
- "children": [
- {
- "attributes": {
- "contractScope": null,
- "name": "EntryBot",
- "referencedDeclaration": 1122,
- "type": "contract EntryBot"
- },
- "id": 1123,
- "name": "UserDefinedTypeName",
- "src": "4955:8:3"
- }
- ],
- "id": 1124,
- "name": "InheritanceSpecifier",
- "src": "4955:8:3"
- },
- {
- "attributes": {
- "documentation": null,
- "implemented": true,
- "isConstructor": true,
- "kind": "constructor",
- "name": "",
- "scope": 1137,
- "stateMutability": "nonpayable",
- "superFunction": null,
- "visibility": "public"
- },
- "children": [
- {
- "attributes": {
- "parameters": [
- null
- ]
- },
- "children": [],
- "id": 1125,
- "name": "ParameterList",
- "src": "4981:2:3"
- },
- {
- "attributes": {
- "parameters": [
- null
- ]
- },
- "children": [],
- "id": 1134,
- "name": "ParameterList",
- "src": "5139:0:3"
- },
- {
- "children": [
- {
- "attributes": {
- "argumentTypes": null,
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 1122,
- "type": "type(contract EntryBot)",
- "value": "EntryBot"
- },
- "id": 1126,
- "name": "Identifier",
- "src": "4988:8:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "contract BucketSale",
- "type_conversion": true
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address_payable",
- "typeString": "address payable"
- }
- ],
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 807,
- "type": "type(contract BucketSale)",
- "value": "BucketSale"
- },
- "id": 1127,
- "name": "Identifier",
- "src": "4997:10:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "hexvalue": "307833303037366646373433366145383232303762396330334162644637434230353633313041393541",
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "subdenomination": null,
- "token": "number",
- "type": "address payable",
- "value": "0x30076fF7436aE82207b9c03AbdF7CB056310A95A"
- },
- "id": 1128,
- "name": "Literal",
- "src": "5008:42:3"
- }
- ],
- "id": 1129,
- "name": "FunctionCall",
- "src": "4997:54:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "isStructConstructorCall": false,
- "lValueRequested": false,
- "names": [
- null
- ],
- "type": "contract KyberNetworkInterface",
- "type_conversion": true
- },
- "children": [
- {
- "attributes": {
- "argumentTypes": [
- {
- "typeIdentifier": "t_address_payable",
- "typeString": "address payable"
- }
- ],
- "overloadedDeclarations": [
- null
- ],
- "referencedDeclaration": 843,
- "type": "type(contract KyberNetworkInterface)",
- "value": "KyberNetworkInterface"
- },
- "id": 1130,
- "name": "Identifier",
- "src": "5053:21:3"
- },
- {
- "attributes": {
- "argumentTypes": null,
- "hexvalue": "307838313845364645434435313645636333383439444166363834356533454338363830383742373535",
- "isConstant": false,
- "isLValue": false,
- "isPure": true,
- "lValueRequested": false,
- "subdenomination": null,
- "token": "number",
- "type": "address payable",
- "value": "0x818E6FECD516Ecc3849DAf6845e3EC868087B755"
- },
- "id": 1131,
- "name": "Literal",
- "src": "5075:42:3"
- }
- ],
- "id": 1132,
- "name": "FunctionCall",
- "src": "5053:65:3"
- }
- ],
- "id": 1133,
- "name": "ModifierInvocation",
- "src": "4988:131:3"
- },
- {
- "attributes": {
- "statements": [
- null
- ]
- },
- "children": [],
- "id": 1135,
- "name": "Block",
- "src": "5139:2:3"
- }
- ],
- "id": 1136,
- "name": "FunctionDefinition",
- "src": "4970:171:3"
- }
- ],
- "id": 1137,
- "name": "ContractDefinition",
- "src": "4927:216:3"
- }
- ],
- "id": 1138,
- "name": "SourceUnit",
- "src": "0:5143:3"
- },
- "compiler": {
- "name": "solc",
- "version": "0.5.17+commit.d19bba13.Emscripten.clang"
- },
- "networks": {},
- "schemaVersion": "3.3.4",
- "updatedAt": "2021-04-01T14:17:02.467Z",
- "devdoc": {
- "methods": {}
- },
- "userdoc": {
- "methods": {}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement