2020-11-26 07:38:08 +01:00
{
"contractName" : "DTFactory" ,
"abi" : [
{
"inputs" : [
{
"name" : "_template" ,
"type" : "address"
} ,
{
"name" : "_collector" ,
"type" : "address"
}
] ,
"payable" : false ,
"stateMutability" : "nonpayable" ,
"type" : "constructor"
} ,
{
"anonymous" : false ,
"inputs" : [
{
"indexed" : true ,
"name" : "newTokenAddress" ,
"type" : "address"
} ,
{
"indexed" : true ,
"name" : "templateAddress" ,
"type" : "address"
} ,
{
"indexed" : true ,
"name" : "tokenName" ,
"type" : "string"
}
] ,
"name" : "TokenCreated" ,
"type" : "event"
} ,
{
"anonymous" : false ,
"inputs" : [
{
"indexed" : true ,
"name" : "tokenAddress" ,
"type" : "address"
} ,
{
"indexed" : false ,
"name" : "tokenName" ,
"type" : "string"
} ,
{
"indexed" : false ,
"name" : "tokenSymbol" ,
"type" : "string"
} ,
{
"indexed" : false ,
"name" : "tokenCap" ,
"type" : "uint256"
} ,
{
"indexed" : true ,
"name" : "registeredBy" ,
"type" : "address"
} ,
{
"indexed" : true ,
"name" : "blob" ,
"type" : "string"
}
] ,
"name" : "TokenRegistered" ,
"type" : "event"
} ,
{
"anonymous" : false ,
"inputs" : [
{
"indexed" : false ,
"name" : "instance" ,
"type" : "address"
}
] ,
"name" : "InstanceDeployed" ,
"type" : "event"
} ,
{
"constant" : false ,
"inputs" : [
{
"name" : "blob" ,
"type" : "string"
} ,
{
"name" : "name" ,
"type" : "string"
} ,
{
"name" : "symbol" ,
"type" : "string"
} ,
{
"name" : "cap" ,
"type" : "uint256"
}
] ,
"name" : "createToken" ,
"outputs" : [
{
"name" : "token" ,
"type" : "address"
}
] ,
"payable" : false ,
"stateMutability" : "nonpayable" ,
"type" : "function"
} ,
{
"constant" : true ,
"inputs" : [ ] ,
"name" : "getCurrentTokenCount" ,
"outputs" : [
{
"name" : "" ,
"type" : "uint256"
}
] ,
"payable" : false ,
"stateMutability" : "view" ,
"type" : "function"
} ,
{
"constant" : true ,
"inputs" : [ ] ,
"name" : "getTokenTemplate" ,
"outputs" : [
{
"name" : "" ,
"type" : "address"
}
] ,
"payable" : false ,
"stateMutability" : "view" ,
"type" : "function"
}
] ,
"metadata" : "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"getTokenTemplate\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCurrentTokenCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"blob\",\"type\":\"string\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"symbol\",\"type\":\"string\"},{\"name\":\"cap\",\"type\":\"uint256\"}],\"name\":\"createToken\",\"outputs\":[{\"name\":\"token\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_template\",\"type\":\"address\"},{\"name\":\"_collector\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"newTokenAddress\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"templateAddress\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenName\",\"type\":\"string\"}],\"name\":\"TokenCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"tokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"tokenName\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"tokenSymbol\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"tokenCap\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"registeredBy\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"blob\",\"type\":\"string\"}],\"name\":\"TokenRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"instance\",\"type\":\"address\"}],\"name\":\"InstanceDeployed\",\"type\":\"event\"}],\"devdoc\":{\"author\":\"Ocean Protocol Team\",\"details\":\"Implementation of Ocean DataTokens Factory * DTFactory deploys DataToken proxy contracts. New DataToken proxy contracts are links to the template contract's bytecode. Proxy contract functionality is based on Ocean Protocol custom implementation of ERC1167 standard.\",\"methods\":{\"constructor\":{\"details\":\"constructor Called on contract deployment. Could not be called with zero address parameters.\",\"params\":{\"_collector\":\"refers to the community fee collector address\",\"_template\":\"refers to the address of a deployed DataToken contract.\"}},\"createToken(string,string,string,uint256)\":{\"details\":\"Deploys new DataToken proxy contract. Template contract address could not be a zero address.\",\"params\":{\"blob\":\"any string that hold data/metadata for the new token\",\"cap\":\"the maximum total supply\",\"name\":\"token name\",\"symbol\":\"token symbol\"},\"return\":\"address of a new proxy DataToken contract\"},\"getCurrentTokenCount()\":{\"details\":\"get the current token count.\",\"return\":\"the current token count\"},\"getTokenTemplate()\":{\"details\":\"get the token template address\",\"return\":\"the template address\"}},\"title\":\"DTFactory contract\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/DTFactory.sol\":\"DTFactory\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/DTFactory.sol\":{\"keccak256\":\"0x8cf30689a380ec195de52dcee8a0263de862a457ee218d46a3fcb996edc48d89\",\"urls\":[\"bzzr://fb1f26c6ff8246dc38c4ce651fe17c85c8f9e64b3b1344b13c9ec9253202af1f\"]},\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/interfaces/IERC20Template.sol\":{\"keccak256\":\"0x022ebed2ba4949e96a05cc394cf690d8fd3190a4733cebe8cbe930ac25cfde18\",\"urls\":[\"bzzr://2fa3d5cae14f0af7d78f6e1d13bc41854082c03ab2f86462ebb09afda88ee6e9\"]},\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/utils/Deployer.sol\":{\"keccak256\" :
"bytecode" : " 0 x 6080604052600160025534801561001557600080 f d 5 b 50604051604080610 a 278339810180604052604081101561003557600080 f d 5 b 508051602090910151600160 a 0 60020 a 0 382161580159061005e5750600160 a 0 60020 a 0 3811615155 b 6100 b 3576040517 f 0 8 c 379 a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 81526004018080602001828103825260418152602001806109e66041913960600191505060405180910390 f d 5 b 60008054600160 a 0 60020 a 0 3938416600160 a 0 60020 a 0 31991821617909155600180549290931691161790556108 f 8806100 e e 6000396000 f 3 f e 608060405234801561001057600080 f d 5 b 506004361061005 d 577 c 0 1000000000000000000000000000000000000000000000000000000006000350463490 a a d 768114610062578063 c 6 c f 868 a 14610086578063 e f b e 8 f d 1146100 a 0 575 b 600080 f d 5 b 61006 a 610256565 b 60408051600160 a 0 60020 a 0 39092168252519081900360200190 f 35 b 61008e610265565 b 60408051918252519081900360200190 f 35 b 61006 a 600480360360808110156100 b 657600080 f d 5 b 8101906020810181356401000000008111156100 d 157600080 f d 5 b 8201836020820111156100e357600080 f d 5 b 8035906020019184600183028401116401000000008311171561010557600080 f d 5 b 91908080601 f 0 16020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561015857600080 f d 5 b 82018360208201111561016 a 57600080 f d 5 b 8035906020019184600183028401116401000000008311171561018 c 57600080 f d 5 b 91908080601 f 0 1602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156101 d f 57600080 f d 5 b 8201836020820111156101 f 157600080 f d 5 b 8035906020019184600183028401116401000000008311171561021357600080 f d 5 b 91908080601 f 0 16020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925061026 b 915050565 b 600054600160 a 0 60020 a 0 31690565 b 60025490565 b 6000816102 c 3576040517 f 0 8 c 379 a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 81526004018080602001828103825260228152602001806108716022913960400191505060405180910390 f d 5 b 6000546102 d 890600160 a 0 60020 a 0 316610791565 b 9050600160 a 0 60020 a 0 38116610339576040517 f 0 8 c 379 a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 815260040180806020018281038252603 a 815260200180610893603 a 913960400191505060405180910390 f d 5 b 6001546040517 f 9070 d 2 f 8000000000000000000000000000000000000000000000000000000008152336044820181905260648201859052600160 a 0 60020 a 0 392831660 a 4830181905260 c 0 60048401908152885160 c 485015288518695861694639070 d 2 f 8948 b 948 b 9491938 b 938 f 939182916024810191608482019160e4019060208 c 0 19080838360005 b 838110156103 d e 5781810151838201526020016103 c 6565 b 50505050905090810190601 f 16801561040 b 5780820380516001836020036101000 a 0 31916815260200191505 b 5084810383528951815289516020918201918 b 0 19080838360005 b 8381101561043e578181015183820152602001610426565 b 50505050905090810190601 f 16801561046 b 5780820380516001836020036101000 a 0 31916815260200191505 b 50848103825286518152865160209182019188019080838360005 b 8381101561049e578181015183820152602001610486565 b 50505050905090810190601 f 1680156104 c b 5780820380516001836020036101000 a 0 31916815260200191505 b 509950505050505050505050602060405180830381600087803 b 1580156104 f 157600080 f d 5 b 505 a f 1158015610505573 d 6000803e3 d 6000 f d 5 b 505050506040513 d 602081101561051 b 57600080 f d 5 b 5051610572576040517 f 0 8 c 379 a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 815260040180806020018281038252602e815260200180610843602 e 913960400191505060405180910390 f d 5 b 846040518082805190602001908083835 b 602083106105 a 25780518252601 f 199092019160209182019101610583565 b 5181516020939093036101000 a 60001901801990911692169190911790526040519201829003822060008054919550600160 a 0 60020 a 0 39182169450908716927 f b 51 c 8 c b e 199 f f e 8 b 0 d 1 d 39 b 62 d 473569750653 c b 18 b 165 f 77 a e 423 b 3900180 a d 9250 a 4856040518082805190602001908083835 b 602083106106365780518252601 f 199092019160209182019101610617565 b 6001836020036101000 a 0 38019825116818451168082178552505050505050905001915050604051809103902033600160 a 0 60020 a 0 31683600160 a 0 60020 a 0 3167 f 437e99 a 69 c 634128e67 a 85656 b 80 d 0 3 b 0 28 b a 37525 b 15070606e5 c 28e846984 a 888888604051808060200180602001848152602001838103835286818151815260200191508051906020019080838360005 b 838110156106e25781810151838201526020016106 c a 565 b 50505050905090810190601 f 16801561070 f 5780820380516001836020036101000 a 0 3191681
"deployedBytecode" : " 0 x 608060405234801561001057600080 f d 5 b 506004361061005 d 577 c 0 1000000000000000000000000000000000000000000000000000000006000350463490 a a d 768114610062578063 c 6 c f 868 a 14610086578063 e f b e 8 f d 1146100 a 0 575 b 600080 f d 5 b 61006 a 610256565 b 60408051600160 a 0 60020 a 0 39092168252519081900360200190 f 35 b 61008e610265565 b 60408051918252519081900360200190 f 35 b 61006 a 600480360360808110156100 b 657600080 f d 5 b 8101906020810181356401000000008111156100 d 157600080 f d 5 b 8201836020820111156100e357600080 f d 5 b 8035906020019184600183028401116401000000008311171561010557600080 f d 5 b 91908080601 f 0 16020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561015857600080 f d 5 b 82018360208201111561016 a 57600080 f d 5 b 8035906020019184600183028401116401000000008311171561018 c 57600080 f d 5 b 91908080601 f 0 1602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156101 d f 57600080 f d 5 b 8201836020820111156101 f 157600080 f d 5 b 8035906020019184600183028401116401000000008311171561021357600080 f d 5 b 91908080601 f 0 16020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925061026 b 915050565 b 600054600160 a 0 60020 a 0 31690565 b 60025490565 b 6000816102 c 3576040517 f 0 8 c 379 a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 81526004018080602001828103825260228152602001806108716022913960400191505060405180910390 f d 5 b 6000546102 d 890600160 a 0 60020 a 0 316610791565 b 9050600160 a 0 60020 a 0 38116610339576040517 f 0 8 c 379 a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 815260040180806020018281038252603 a 815260200180610893603 a 913960400191505060405180910390 f d 5 b 6001546040517 f 9070 d 2 f 8000000000000000000000000000000000000000000000000000000008152336044820181905260648201859052600160 a 0 60020 a 0 392831660 a 4830181905260 c 0 60048401908152885160 c 485015288518695861694639070 d 2 f 8948 b 948 b 9491938 b 938 f 939182916024810191608482019160e4019060208 c 0 19080838360005 b 838110156103 d e 5781810151838201526020016103 c 6565 b 50505050905090810190601 f 16801561040 b 5780820380516001836020036101000 a 0 31916815260200191505 b 5084810383528951815289516020918201918 b 0 19080838360005 b 8381101561043e578181015183820152602001610426565 b 50505050905090810190601 f 16801561046 b 5780820380516001836020036101000 a 0 31916815260200191505 b 50848103825286518152865160209182019188019080838360005 b 8381101561049e578181015183820152602001610486565 b 50505050905090810190601 f 1680156104 c b 5780820380516001836020036101000 a 0 31916815260200191505 b 509950505050505050505050602060405180830381600087803 b 1580156104 f 157600080 f d 5 b 505 a f 1158015610505573 d 6000803e3 d 6000 f d 5 b 505050506040513 d 602081101561051 b 57600080 f d 5 b 5051610572576040517 f 0 8 c 379 a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 815260040180806020018281038252602e815260200180610843602 e 913960400191505060405180910390 f d 5 b 846040518082805190602001908083835 b 602083106105 a 25780518252601 f 199092019160209182019101610583565 b 5181516020939093036101000 a 60001901801990911692169190911790526040519201829003822060008054919550600160 a 0 60020 a 0 39182169450908716927 f b 51 c 8 c b e 199 f f e 8 b 0 d 1 d 39 b 62 d 473569750653 c b 18 b 165 f 77 a e 423 b 3900180 a d 9250 a 4856040518082805190602001908083835 b 602083106106365780518252601 f 199092019160209182019101610617565 b 6001836020036101000 a 0 38019825116818451168082178552505050505050905001915050604051809103902033600160 a 0 60020 a 0 31683600160 a 0 60020 a 0 3167 f 437e99 a 69 c 634128e67 a 85656 b 80 d 0 3 b 0 28 b a 37525 b 15070606e5 c 28e846984 a 888888604051808060200180602001848152602001838103835286818151815260200191508051906020019080838360005 b 838110156106e25781810151838201526020016106 c a 565 b 50505050905090810190601 f 16801561070 f 5780820380516001836020036101000 a 0 31916815260200191505 b 50838103825285518152855160209182019187019080838360005 b 8381101561074257818101518382015260200161072 a 565 b 50505050905090810190601 f 16801561076 f 5780820380516001836020036101000 a 0 31916815260200191505 b 509550505050505060405180910390 a 450600280546001019055949350505050565 b 6040517 f 3 d 602 d 80600 a 3 d 3981 f 3363 d 3 d 373 d 3 d 3 d 363 d 7300000000000000000000000081526 c 0 10000000000000000000000008202601482018190527 f 5 a f 43 d 82803e903 d 91602 b 57 f d 5 b f 30000000000000000000000000000000000602883
"sourceMap" : "629:3010:0:-;;;780:1;744:37;;1438:351;8:9:-1;5:2;;;30:1;27;20:12;5:2;1438:351:0;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1438:351:0;;;;;;;-1:-1:-1;;;;;1549:23:0;;;;;;:63;;-1:-1:-1;;;;;;1588:24:0;;;;1549:63;1528:175;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1713:13;:25;;-1:-1:-1;;;;;1713:25:0;;;-1:-1:-1;;;;;;1713:25:0;;;;;;;;1748:34;;;;;;;;;;;629:3010;;;;;;" ,
"deployedSourceMap" : "629:3010:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;629:3010:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3540:97;;;:::i;:::-;;;;-1:-1:-1;;;;;3540:97:0;;;;;;;;;;;;;;3334:105;;;:::i;:::-;;;;;;;;;;;;;;;;2164:1068;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;2164:1068:0;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;2164:1068:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;2164:1068:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;2164:1068:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;2164:1068:0;;;;;;;;-1:-1:-1;2164:1068:0;;-1:-1:-1;;21:11;5:28;;2:2;;;46:1;43;36:12;2:2;2164:1068:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;2164:1068:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;2164:1068:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;2164:1068:0;;;;;;;;-1:-1:-1;2164:1068:0;;-1:-1:-1;;21:11;5:28;;2:2;;;46:1;43;36:12;2:2;2164:1068:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;2164:1068:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;2164:1068:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;2164:1068:0;;-1:-1:-1;;2164:1068:0;;;-1:-1:-1;2164:1068:0;;-1:-1:-1;;2164:1068:0:i;3540:97::-;3591:7;3617:13;-1:-1:-1;;;;;3617:13:0;3540:97;:::o;3334:105::-;3415:17;;3334:105;:::o;2164:1068::-;2330:13;2380:8;2359:89;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2474:13;;2467:21;;-1:-1:-1;;;;;2474:13:0;2467:6;:21::i;:::-;2459:29;-1:-1:-1;;;;;;2520:19:0;;2499:124;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2875:21;;2716:194;;;;;2804:10;2716:194;;;;;;;;;;;;-1:-1:-1;;;;;2875:21:0;;;2716:194;;;;;;;;;;;;;;;;;;;;;2679:5;;2716:24;;;;;2758:4;;2780:6;;2804:10;;2832:3;;2853:4;;2716:194;;;;;;;;;;;;;;;;;;;;;2633:28;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;2716:194:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2716:194:0;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;2716:194:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2716:194:0;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;2716:194:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2716:194:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2716:194:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2716:194:0;2695:287;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3032:4;2997:40;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;;;;365:33;;2997:40:0;;;;;;;;;-1:-1:-1;3017:13:0;;2997:40;;-1:-1:-1;;;;;;3017:13:0;;;;-1:-1:-1;2997:40:0;;;;;;-1:-1:-1;2997:40:0;3179:4;3052:141;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;3052:141:0;;;;;;;;;;;;;;;;3155:10;-1:-1:-1;;;;;3052:141:0;3081:5;-1:-1:-1;;;;;3052:141:0;;3100:4;3118:6;3138:3;3052:141;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3052:141:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3052:141:0;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3052:141:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3203:17:0;:22;;3224:1;3203:22;;;2164:1068;;-1:-1:-1;;;;2164:1068:0:o;811:963:13:-;1415:4;1409:11;1445:66;1431:81;;944:15;;;1541:4;1530:16;;1523:37;;;1596:66;1589:4;1578:16;;1571:92;889:16;;1703:4;1409:11;889:16;1686:22;1732:35;;;-1:-1:-1;;;;;1732:35:13;;;;;;1674:34;;-1:-1:-1;1732:35:13;;-1:-1:-1;1732:35:13;;;;;;;811:963;;;;:::o" ,
"source" : "pragma solidity 0.5.7;\n// Copyright BigchainDB GmbH and Ocean Protocol contributors\n// SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)\n// Code is Apache-2.0 and docs are CC-BY-4.0\n\nimport './utils/Deployer.sol';\nimport './interfaces/IERC20Template.sol';\n\n/**\n * @title DTFactory contract\n * @author Ocean Protocol Team\n *\n * @dev Implementation of Ocean DataTokens Factory\n *\n * DTFactory deploys DataToken proxy contracts.\n * New DataToken proxy contracts are links to the template contract's bytecode.\n * Proxy contract functionality is based on Ocean Protocol custom implementation of ERC1167 standard.\n */\ncontract DTFactory is Deployer {\n address private tokenTemplate;\n address private communityFeeCollector;\n uint256 private currentTokenCount = 1;\n\n event TokenCreated(\n address indexed newTokenAddress,\n address indexed templateAddress,\n string indexed tokenName\n );\n\n event TokenRegistered(\n address indexed tokenAddress,\n string tokenName,\n string tokenSymbol,\n uint256 tokenCap,\n address indexed registeredBy,\n string indexed blob\n );\n\n /**\n * @dev constructor\n * Called on contract deployment. Could not be called with zero address parameters.\n * @param _template refers to the address of a deployed DataToken contract.\n * @param _collector refers to the community fee collector address\n */\n constructor(\n address _template,\n address _collector\n ) public {\n require(\n _template != address(0) &&\n _collector != address(0),\n 'DTFactory: Invalid template token/community fee collector address'\n );\n tokenTemplate = _template;\n communityFeeCollector = _collector;\n }\n\n /**\n * @dev Deploys new DataToken proxy contract.\n * Template contract address could not be a zero address.\n * @param blob any string that hold data/metadata for the new token\n * @param name token name\n * @param symbol token symbol\n * @param cap the maximum total supply\n * @return address of a new proxy DataToken contract\n */\n function createToken(\n string memory blob,\n string memory name,\n string memory symbol,\n uint256 cap\n )\n public\n returns (address token)\n {\n require(\n cap != 0,\n 'DTFactory: zero cap is not allowed'\n );\n\n token = deploy(tokenTemplate);\n\n require(\n token != address(0),\n 'DTFactory: Failed to perform minimal deploy of a new token'\n );\n IERC20Template tokenInstance = IERC20Template(token);\n require(\n tokenInstance.initialize(\n name,\n symbol,\n msg.sender,\n cap,\n blob,\n communityFeeCollector\n ),\n 'DTFactory: Unable to initialize token instance'\n );\n emit TokenCreated(token, tokenTemplate, name);\n emit TokenRegistered(\n token,\n name,\n symbol,\n cap,\n msg.sender,\n blob\n );\n currentTokenCount += 1;\n }\n\n /**\n * @dev get the current token count.\n * @return the current token count\n */\n function getCurrentTokenCount() external view returns (uint256) {\n return currentTokenCount;\n }\n\n /**\n * @dev get the token template address\n * @return the template address\n */\n function getTokenTemplate() external view returns (address) {\n return tokenTemplate;\n }\n}\n" ,
"sourcePath" : "/home/travis/build/oceanprotocol/ocean-contracts/contracts/DTFactory.sol" ,
"ast" : {
"absolutePath" : "/home/travis/build/oceanprotocol/ocean-contracts/contracts/DTFactory.sol" ,
"exportedSymbols" : {
2020-12-11 11:37:09 +01:00
"DTFactory" : [ 158 ]
2020-11-26 07:38:08 +01:00
} ,
"id" : 159 ,
"nodeType" : "SourceUnit" ,
"nodes" : [
{
"id" : 1 ,
2020-12-11 11:37:09 +01:00
"literals" : [ "solidity" , "0.5" , ".7" ] ,
2020-11-26 07:38:08 +01:00
"nodeType" : "PragmaDirective" ,
"src" : "0:22:0"
} ,
{
"absolutePath" : "/home/travis/build/oceanprotocol/ocean-contracts/contracts/utils/Deployer.sol" ,
"file" : "./utils/Deployer.sol" ,
"id" : 2 ,
"nodeType" : "ImportDirective" ,
"scope" : 159 ,
"sourceUnit" : 5732 ,
"src" : "185:30:0" ,
"symbolAliases" : [ ] ,
"unitAlias" : ""
} ,
{
"absolutePath" : "/home/travis/build/oceanprotocol/ocean-contracts/contracts/interfaces/IERC20Template.sol" ,
"file" : "./interfaces/IERC20Template.sol" ,
"id" : 3 ,
"nodeType" : "ImportDirective" ,
"scope" : 159 ,
"sourceUnit" : 5090 ,
"src" : "216:41:0" ,
"symbolAliases" : [ ] ,
"unitAlias" : ""
} ,
{
"baseContracts" : [
{
"arguments" : null ,
"baseName" : {
"contractScope" : null ,
"id" : 4 ,
"name" : "Deployer" ,
"nodeType" : "UserDefinedTypeName" ,
"referencedDeclaration" : 5731 ,
"src" : "651:8:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_contract$_Deployer_$5731" ,
"typeString" : "contract Deployer"
}
} ,
"id" : 5 ,
"nodeType" : "InheritanceSpecifier" ,
"src" : "651:8:0"
}
] ,
2020-12-11 11:37:09 +01:00
"contractDependencies" : [ 5731 ] ,
2020-11-26 07:38:08 +01:00
"contractKind" : "contract" ,
"documentation" : "@title DTFactory contract\n@author Ocean Protocol Team\n * @dev Implementation of Ocean DataTokens Factory\n * DTFactory deploys DataToken proxy contracts.\n New DataToken proxy contracts are links to the template contract's bytecode.\n Proxy contract functionality is based on Ocean Protocol custom implementation of ERC1167 standard." ,
"fullyImplemented" : true ,
"id" : 158 ,
2020-12-11 11:37:09 +01:00
"linearizedBaseContracts" : [ 158 , 5731 ] ,
2020-11-26 07:38:08 +01:00
"name" : "DTFactory" ,
"nodeType" : "ContractDefinition" ,
"nodes" : [
{
"constant" : false ,
"id" : 7 ,
"name" : "tokenTemplate" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 158 ,
"src" : "666:29:0" ,
"stateVariable" : true ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
"id" : 6 ,
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "666:7:0" ,
"stateMutability" : "nonpayable" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "private"
} ,
{
"constant" : false ,
"id" : 9 ,
"name" : "communityFeeCollector" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 158 ,
"src" : "701:37:0" ,
"stateVariable" : true ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
"id" : 8 ,
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "701:7:0" ,
"stateMutability" : "nonpayable" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "private"
} ,
{
"constant" : false ,
"id" : 12 ,
"name" : "currentTokenCount" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 158 ,
"src" : "744:37:0" ,
"stateVariable" : true ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
"id" : 10 ,
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "744:7:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : {
"argumentTypes" : null ,
"hexValue" : "31" ,
"id" : 11 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "number" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "780:1:0" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_rational_1_by_1" ,
"typeString" : "int_const 1"
} ,
"value" : "1"
} ,
"visibility" : "private"
} ,
{
"anonymous" : false ,
"documentation" : null ,
"id" : 20 ,
"name" : "TokenCreated" ,
"nodeType" : "EventDefinition" ,
"parameters" : {
"id" : 19 ,
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
"id" : 14 ,
"indexed" : true ,
"name" : "newTokenAddress" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 20 ,
"src" : "816:31:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
"id" : 13 ,
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "816:7:0" ,
"stateMutability" : "nonpayable" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
"id" : 16 ,
"indexed" : true ,
"name" : "templateAddress" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 20 ,
"src" : "857:31:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
"id" : 15 ,
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "857:7:0" ,
"stateMutability" : "nonpayable" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
"id" : 18 ,
"indexed" : true ,
"name" : "tokenName" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 20 ,
"src" : "898:24:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string"
} ,
"typeName" : {
"id" : 17 ,
"name" : "string" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "898:6:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_storage_ptr" ,
"typeString" : "string"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "806:122:0"
} ,
"src" : "788:141:0"
} ,
{
"anonymous" : false ,
"documentation" : null ,
"id" : 34 ,
"name" : "TokenRegistered" ,
"nodeType" : "EventDefinition" ,
"parameters" : {
"id" : 33 ,
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
"id" : 22 ,
"indexed" : true ,
"name" : "tokenAddress" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 34 ,
"src" : "966:28:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
"id" : 21 ,
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "966:7:0" ,
"stateMutability" : "nonpayable" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
"id" : 24 ,
"indexed" : false ,
"name" : "tokenName" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 34 ,
"src" : "1004:16:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string"
} ,
"typeName" : {
"id" : 23 ,
"name" : "string" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1004:6:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_storage_ptr" ,
"typeString" : "string"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
"id" : 26 ,
"indexed" : false ,
"name" : "tokenSymbol" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 34 ,
"src" : "1030:18:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string"
} ,
"typeName" : {
"id" : 25 ,
"name" : "string" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1030:6:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_storage_ptr" ,
"typeString" : "string"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
"id" : 28 ,
"indexed" : false ,
"name" : "tokenCap" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 34 ,
"src" : "1058:16:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
"id" : 27 ,
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1058:7:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
"id" : 30 ,
"indexed" : true ,
"name" : "registeredBy" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 34 ,
"src" : "1084:28:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
"id" : 29 ,
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1084:7:0" ,
"stateMutability" : "nonpayable" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
"id" : 32 ,
"indexed" : true ,
"name" : "blob" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 34 ,
"src" : "1122:19:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string"
} ,
"typeName" : {
"id" : 31 ,
"name" : "string" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1122:6:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_storage_ptr" ,
"typeString" : "string"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "956:191:0"
} ,
"src" : "935:213:0"
} ,
{
"body" : {
"id" : 64 ,
"nodeType" : "Block" ,
"src" : "1518:271:0" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
} ,
"id" : 52 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"id" : 46 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
"id" : 42 ,
"name" : "_template" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 36 ,
"src" : "1549:9:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "!=" ,
"rightExpression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"hexValue" : "30" ,
"id" : 44 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "number" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "1570:1:0" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_rational_0_by_1" ,
"typeString" : "int_const 0"
} ,
"value" : "0"
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_rational_0_by_1" ,
"typeString" : "int_const 0"
}
] ,
"id" : 43 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"lValueRequested" : false ,
"nodeType" : "ElementaryTypeNameExpression" ,
"src" : "1562:7:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_type$_t_address_$" ,
"typeString" : "type(address)"
} ,
"typeName" : "address"
} ,
"id" : 45 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "typeConversion" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "1562:10:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address_payable" ,
"typeString" : "address payable"
}
} ,
"src" : "1549:23:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "&&" ,
"rightExpression" : {
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"id" : 51 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
"id" : 47 ,
"name" : "_collector" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 38 ,
"src" : "1588:10:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "!=" ,
"rightExpression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"hexValue" : "30" ,
"id" : 49 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "number" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "1610:1:0" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_rational_0_by_1" ,
"typeString" : "int_const 0"
} ,
"value" : "0"
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_rational_0_by_1" ,
"typeString" : "int_const 0"
}
] ,
"id" : 48 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"lValueRequested" : false ,
"nodeType" : "ElementaryTypeNameExpression" ,
"src" : "1602:7:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_type$_t_address_$" ,
"typeString" : "type(address)"
} ,
"typeName" : "address"
} ,
"id" : 50 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "typeConversion" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "1602:10:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address_payable" ,
"typeString" : "address payable"
}
} ,
"src" : "1588:24:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
} ,
"src" : "1549:63:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
} ,
{
"argumentTypes" : null ,
"hexValue" : "4454466163746f72793a20496e76616c69642074656d706c61746520746f6b656e2f636f6d6d756e6974792066656520636f6c6c6563746f722061646472657373" ,
"id" : 53 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "string" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "1626:67:0" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_stringliteral_4ad3e5f7655ba83235e545811343b3f1c7739bd2f1b726cbd7686d420baf2813" ,
"typeString" : "literal_string \"DTFactory: Invalid template token/community fee collector address\""
} ,
"value" : "DTFactory: Invalid template token/community fee collector address"
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
} ,
{
"typeIdentifier" : "t_stringliteral_4ad3e5f7655ba83235e545811343b3f1c7739bd2f1b726cbd7686d420baf2813" ,
"typeString" : "literal_string \"DTFactory: Invalid template token/community fee collector address\""
}
] ,
"id" : 41 ,
"name" : "require" ,
"nodeType" : "Identifier" ,
2020-12-11 11:37:09 +01:00
"overloadedDeclarations" : [ 6555 , 6556 ] ,
2020-11-26 07:38:08 +01:00
"referencedDeclaration" : 6556 ,
"src" : "1528:7:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$" ,
"typeString" : "function (bool,string memory) pure"
}
} ,
"id" : 54 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "1528:175:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
"id" : 55 ,
"nodeType" : "ExpressionStatement" ,
"src" : "1528:175:0"
} ,
{
"expression" : {
"argumentTypes" : null ,
"id" : 58 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftHandSide" : {
"argumentTypes" : null ,
"id" : 56 ,
"name" : "tokenTemplate" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 7 ,
"src" : "1713:13:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"nodeType" : "Assignment" ,
"operator" : "=" ,
"rightHandSide" : {
"argumentTypes" : null ,
"id" : 57 ,
"name" : "_template" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 36 ,
"src" : "1729:9:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"src" : "1713:25:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"id" : 59 ,
"nodeType" : "ExpressionStatement" ,
"src" : "1713:25:0"
} ,
{
"expression" : {
"argumentTypes" : null ,
"id" : 62 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftHandSide" : {
"argumentTypes" : null ,
"id" : 60 ,
"name" : "communityFeeCollector" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 9 ,
"src" : "1748:21:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"nodeType" : "Assignment" ,
"operator" : "=" ,
"rightHandSide" : {
"argumentTypes" : null ,
"id" : 61 ,
"name" : "_collector" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 38 ,
"src" : "1772:10:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"src" : "1748:34:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"id" : 63 ,
"nodeType" : "ExpressionStatement" ,
"src" : "1748:34:0"
}
]
} ,
"documentation" : "@dev constructor\n Called on contract deployment. Could not be called with zero address parameters.\n@param _template refers to the address of a deployed DataToken contract.\n@param _collector refers to the community fee collector address" ,
"id" : 65 ,
"implemented" : true ,
"kind" : "constructor" ,
"modifiers" : [ ] ,
"name" : "" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
"id" : 39 ,
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
"id" : 36 ,
"name" : "_template" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 65 ,
"src" : "1459:17:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
"id" : 35 ,
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1459:7:0" ,
"stateMutability" : "nonpayable" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
"id" : 38 ,
"name" : "_collector" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 65 ,
"src" : "1486:18:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
"id" : 37 ,
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1486:7:0" ,
"stateMutability" : "nonpayable" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "1449:61:0"
} ,
"returnParameters" : {
"id" : 40 ,
"nodeType" : "ParameterList" ,
"parameters" : [ ] ,
"src" : "1518:0:0"
} ,
"scope" : 158 ,
"src" : "1438:351:0" ,
"stateMutability" : "nonpayable" ,
"superFunction" : null ,
"visibility" : "public"
} ,
{
"body" : {
"id" : 140 ,
"nodeType" : "Block" ,
"src" : "2349:883:0" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"id" : 81 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
"id" : 79 ,
"name" : "cap" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 73 ,
"src" : "2380:3:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "!=" ,
"rightExpression" : {
"argumentTypes" : null ,
"hexValue" : "30" ,
"id" : 80 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "number" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "2387:1:0" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_rational_0_by_1" ,
"typeString" : "int_const 0"
} ,
"value" : "0"
} ,
"src" : "2380:8:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
} ,
{
"argumentTypes" : null ,
"hexValue" : "4454466163746f72793a207a65726f20636170206973206e6f7420616c6c6f776564" ,
"id" : 82 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "string" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "2402:36:0" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_stringliteral_275103c39c8e014c8efbcc9e9b88606200c5ae2f95e8ff4229101e5d34ee3597" ,
"typeString" : "literal_string \"DTFactory: zero cap is not allowed\""
} ,
"value" : "DTFactory: zero cap is not allowed"
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
} ,
{
"typeIdentifier" : "t_stringliteral_275103c39c8e014c8efbcc9e9b88606200c5ae2f95e8ff4229101e5d34ee3597" ,
"typeString" : "literal_string \"DTFactory: zero cap is not allowed\""
}
] ,
"id" : 78 ,
"name" : "require" ,
"nodeType" : "Identifier" ,
2020-12-11 11:37:09 +01:00
"overloadedDeclarations" : [ 6555 , 6556 ] ,
2020-11-26 07:38:08 +01:00
"referencedDeclaration" : 6556 ,
"src" : "2359:7:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$" ,
"typeString" : "function (bool,string memory) pure"
}
} ,
"id" : 83 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "2359:89:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
"id" : 84 ,
"nodeType" : "ExpressionStatement" ,
"src" : "2359:89:0"
} ,
{
"expression" : {
"argumentTypes" : null ,
"id" : 89 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftHandSide" : {
"argumentTypes" : null ,
"id" : 85 ,
"name" : "token" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 76 ,
"src" : "2459:5:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"nodeType" : "Assignment" ,
"operator" : "=" ,
"rightHandSide" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"id" : 87 ,
"name" : "tokenTemplate" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 7 ,
"src" : "2474:13:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
] ,
"id" : 86 ,
"name" : "deploy" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 5730 ,
"src" : "2467:6:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_internal_nonpayable$_t_address_$returns$_t_address_$" ,
"typeString" : "function (address) returns (address)"
}
} ,
"id" : 88 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "2467:21:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"src" : "2459:29:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"id" : 90 ,
"nodeType" : "ExpressionStatement" ,
"src" : "2459:29:0"
} ,
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"id" : 96 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
"id" : 92 ,
"name" : "token" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 76 ,
"src" : "2520:5:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "!=" ,
"rightExpression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"hexValue" : "30" ,
"id" : 94 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "number" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "2537:1:0" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_rational_0_by_1" ,
"typeString" : "int_const 0"
} ,
"value" : "0"
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_rational_0_by_1" ,
"typeString" : "int_const 0"
}
] ,
"id" : 93 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"lValueRequested" : false ,
"nodeType" : "ElementaryTypeNameExpression" ,
"src" : "2529:7:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_type$_t_address_$" ,
"typeString" : "type(address)"
} ,
"typeName" : "address"
} ,
"id" : 95 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "typeConversion" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "2529:10:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address_payable" ,
"typeString" : "address payable"
}
} ,
"src" : "2520:19:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
} ,
{
"argumentTypes" : null ,
"hexValue" : "4454466163746f72793a204661696c656420746f20706572666f726d206d696e696d616c206465706c6f79206f662061206e657720746f6b656e" ,
"id" : 97 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "string" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "2553:60:0" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_stringliteral_864bea267bbab0e2823533999ec879a0c10c7f940117c7fd1687efd3993a56e3" ,
"typeString" : "literal_string \"DTFactory: Failed to perform minimal deploy of a new token\""
} ,
"value" : "DTFactory: Failed to perform minimal deploy of a new token"
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
} ,
{
"typeIdentifier" : "t_stringliteral_864bea267bbab0e2823533999ec879a0c10c7f940117c7fd1687efd3993a56e3" ,
"typeString" : "literal_string \"DTFactory: Failed to perform minimal deploy of a new token\""
}
] ,
"id" : 91 ,
"name" : "require" ,
"nodeType" : "Identifier" ,
2020-12-11 11:37:09 +01:00
"overloadedDeclarations" : [ 6555 , 6556 ] ,
2020-11-26 07:38:08 +01:00
"referencedDeclaration" : 6556 ,
"src" : "2499:7:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$" ,
"typeString" : "function (bool,string memory) pure"
}
} ,
"id" : 98 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "2499:124:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
"id" : 99 ,
"nodeType" : "ExpressionStatement" ,
"src" : "2499:124:0"
} ,
{
2020-12-11 11:37:09 +01:00
"assignments" : [ 101 ] ,
2020-11-26 07:38:08 +01:00
"declarations" : [
{
"constant" : false ,
"id" : 101 ,
"name" : "tokenInstance" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 140 ,
"src" : "2633:28:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_contract$_IERC20Template_$5089" ,
"typeString" : "contract IERC20Template"
} ,
"typeName" : {
"contractScope" : null ,
"id" : 100 ,
"name" : "IERC20Template" ,
"nodeType" : "UserDefinedTypeName" ,
"referencedDeclaration" : 5089 ,
"src" : "2633:14:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_contract$_IERC20Template_$5089" ,
"typeString" : "contract IERC20Template"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"id" : 105 ,
"initialValue" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"id" : 103 ,
"name" : "token" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 76 ,
"src" : "2679:5:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
] ,
"id" : 102 ,
"name" : "IERC20Template" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 5089 ,
"src" : "2664:14:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_type$_t_contract$_IERC20Template_$5089_$" ,
"typeString" : "type(contract IERC20Template)"
}
} ,
"id" : 104 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "typeConversion" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "2664:21:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_contract$_IERC20Template_$5089" ,
"typeString" : "contract IERC20Template"
}
} ,
"nodeType" : "VariableDeclarationStatement" ,
"src" : "2633:52:0"
} ,
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"id" : 109 ,
"name" : "name" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 69 ,
"src" : "2758:4:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
} ,
{
"argumentTypes" : null ,
"id" : 110 ,
"name" : "symbol" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 71 ,
"src" : "2780:6:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
} ,
{
"argumentTypes" : null ,
"expression" : {
"argumentTypes" : null ,
"id" : 111 ,
"name" : "msg" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 6552 ,
"src" : "2804:3:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_magic_message" ,
"typeString" : "msg"
}
} ,
"id" : 112 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"memberName" : "sender" ,
"nodeType" : "MemberAccess" ,
"referencedDeclaration" : null ,
"src" : "2804:10:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address_payable" ,
"typeString" : "address payable"
}
} ,
{
"argumentTypes" : null ,
"id" : 113 ,
"name" : "cap" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 73 ,
"src" : "2832:3:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
{
"argumentTypes" : null ,
"id" : 114 ,
"name" : "blob" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 67 ,
"src" : "2853:4:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
} ,
{
"argumentTypes" : null ,
"id" : 115 ,
"name" : "communityFeeCollector" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 9 ,
"src" : "2875:21:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
} ,
{
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
} ,
{
"typeIdentifier" : "t_address_payable" ,
"typeString" : "address payable"
} ,
{
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
{
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
} ,
{
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
] ,
"expression" : {
"argumentTypes" : null ,
"id" : 107 ,
"name" : "tokenInstance" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 101 ,
"src" : "2716:13:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_contract$_IERC20Template_$5089" ,
"typeString" : "contract IERC20Template"
}
} ,
"id" : 108 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"memberName" : "initialize" ,
"nodeType" : "MemberAccess" ,
"referencedDeclaration" : 5000 ,
"src" : "2716:24:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_external_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_address_$returns$_t_bool_$" ,
"typeString" : "function (string memory,string memory,address,uint256,string memory,address) external returns (bool)"
}
} ,
"id" : 116 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "2716:194:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
} ,
{
"argumentTypes" : null ,
"hexValue" : "4454466163746f72793a20556e61626c6520746f20696e697469616c697a6520746f6b656e20696e7374616e6365" ,
"id" : 117 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "string" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "2924:48:0" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_stringliteral_0d4ad5d97b72e5d205f3629b55676990eb71b941b9757afabcf7e9a4e3e2cbe3" ,
"typeString" : "literal_string \"DTFactory: Unable to initialize token instance\""
} ,
"value" : "DTFactory: Unable to initialize token instance"
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
} ,
{
"typeIdentifier" : "t_stringliteral_0d4ad5d97b72e5d205f3629b55676990eb71b941b9757afabcf7e9a4e3e2cbe3" ,
"typeString" : "literal_string \"DTFactory: Unable to initialize token instance\""
}
] ,
"id" : 106 ,
"name" : "require" ,
"nodeType" : "Identifier" ,
2020-12-11 11:37:09 +01:00
"overloadedDeclarations" : [ 6555 , 6556 ] ,
2020-11-26 07:38:08 +01:00
"referencedDeclaration" : 6556 ,
"src" : "2695:7:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$" ,
"typeString" : "function (bool,string memory) pure"
}
} ,
"id" : 118 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "2695:287:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
"id" : 119 ,
"nodeType" : "ExpressionStatement" ,
"src" : "2695:287:0"
} ,
{
"eventCall" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"id" : 121 ,
"name" : "token" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 76 ,
"src" : "3010:5:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
{
"argumentTypes" : null ,
"id" : 122 ,
"name" : "tokenTemplate" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 7 ,
"src" : "3017:13:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
{
"argumentTypes" : null ,
"id" : 123 ,
"name" : "name" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 69 ,
"src" : "3032:4:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
{
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
{
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
] ,
"id" : 120 ,
"name" : "TokenCreated" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 20 ,
"src" : "2997:12:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_event_nonpayable$_t_address_$_t_address_$_t_string_memory_ptr_$returns$__$" ,
"typeString" : "function (address,address,string memory)"
}
} ,
"id" : 124 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "2997:40:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
"id" : 125 ,
"nodeType" : "EmitStatement" ,
"src" : "2992:45:0"
} ,
{
"eventCall" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"id" : 127 ,
"name" : "token" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 76 ,
"src" : "3081:5:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
{
"argumentTypes" : null ,
"id" : 128 ,
"name" : "name" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 69 ,
"src" : "3100:4:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
} ,
{
"argumentTypes" : null ,
"id" : 129 ,
"name" : "symbol" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 71 ,
"src" : "3118:6:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
} ,
{
"argumentTypes" : null ,
"id" : 130 ,
"name" : "cap" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 73 ,
"src" : "3138:3:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
{
"argumentTypes" : null ,
"expression" : {
"argumentTypes" : null ,
"id" : 131 ,
"name" : "msg" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 6552 ,
"src" : "3155:3:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_magic_message" ,
"typeString" : "msg"
}
} ,
"id" : 132 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"memberName" : "sender" ,
"nodeType" : "MemberAccess" ,
"referencedDeclaration" : null ,
"src" : "3155:10:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address_payable" ,
"typeString" : "address payable"
}
} ,
{
"argumentTypes" : null ,
"id" : 133 ,
"name" : "blob" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 67 ,
"src" : "3179:4:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
{
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
} ,
{
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
} ,
{
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
{
"typeIdentifier" : "t_address_payable" ,
"typeString" : "address payable"
} ,
{
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
] ,
"id" : 126 ,
"name" : "TokenRegistered" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 34 ,
"src" : "3052:15:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_event_nonpayable$_t_address_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint256_$_t_address_$_t_string_memory_ptr_$returns$__$" ,
"typeString" : "function (address,string memory,string memory,uint256,address,string memory)"
}
} ,
"id" : 134 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "3052:141:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
"id" : 135 ,
"nodeType" : "EmitStatement" ,
"src" : "3047:146:0"
} ,
{
"expression" : {
"argumentTypes" : null ,
"id" : 138 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftHandSide" : {
"argumentTypes" : null ,
"id" : 136 ,
"name" : "currentTokenCount" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 12 ,
"src" : "3203:17:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "Assignment" ,
"operator" : "+=" ,
"rightHandSide" : {
"argumentTypes" : null ,
"hexValue" : "31" ,
"id" : 137 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "number" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "3224:1:0" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_rational_1_by_1" ,
"typeString" : "int_const 1"
} ,
"value" : "1"
} ,
"src" : "3203:22:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"id" : 139 ,
"nodeType" : "ExpressionStatement" ,
"src" : "3203:22:0"
}
]
} ,
"documentation" : "@dev Deploys new DataToken proxy contract.\n Template contract address could not be a zero address.\n@param blob any string that hold data/metadata for the new token\n@param name token name\n@param symbol token symbol\n@param cap the maximum total supply\n@return address of a new proxy DataToken contract" ,
"id" : 141 ,
"implemented" : true ,
"kind" : "function" ,
"modifiers" : [ ] ,
"name" : "createToken" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
"id" : 74 ,
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
"id" : 67 ,
"name" : "blob" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 141 ,
"src" : "2194:18:0" ,
"stateVariable" : false ,
"storageLocation" : "memory" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string"
} ,
"typeName" : {
"id" : 66 ,
"name" : "string" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "2194:6:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_storage_ptr" ,
"typeString" : "string"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
"id" : 69 ,
"name" : "name" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 141 ,
"src" : "2222:18:0" ,
"stateVariable" : false ,
"storageLocation" : "memory" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string"
} ,
"typeName" : {
"id" : 68 ,
"name" : "string" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "2222:6:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_storage_ptr" ,
"typeString" : "string"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
"id" : 71 ,
"name" : "symbol" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 141 ,
"src" : "2250:20:0" ,
"stateVariable" : false ,
"storageLocation" : "memory" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string"
} ,
"typeName" : {
"id" : 70 ,
"name" : "string" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "2250:6:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_storage_ptr" ,
"typeString" : "string"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
"id" : 73 ,
"name" : "cap" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 141 ,
"src" : "2280:11:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
"id" : 72 ,
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "2280:7:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "2184:113:0"
} ,
"returnParameters" : {
"id" : 77 ,
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
"id" : 76 ,
"name" : "token" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 141 ,
"src" : "2330:13:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
"id" : 75 ,
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "2330:7:0" ,
"stateMutability" : "nonpayable" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "2329:15:0"
} ,
"scope" : 158 ,
"src" : "2164:1068:0" ,
"stateMutability" : "nonpayable" ,
"superFunction" : null ,
"visibility" : "public"
} ,
{
"body" : {
"id" : 148 ,
"nodeType" : "Block" ,
"src" : "3398:41:0" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"id" : 146 ,
"name" : "currentTokenCount" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 12 ,
"src" : "3415:17:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"functionReturnParameters" : 145 ,
"id" : 147 ,
"nodeType" : "Return" ,
"src" : "3408:24:0"
}
]
} ,
"documentation" : "@dev get the current token count.\n@return the current token count" ,
"id" : 149 ,
"implemented" : true ,
"kind" : "function" ,
"modifiers" : [ ] ,
"name" : "getCurrentTokenCount" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
"id" : 142 ,
"nodeType" : "ParameterList" ,
"parameters" : [ ] ,
"src" : "3363:2:0"
} ,
"returnParameters" : {
"id" : 145 ,
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
"id" : 144 ,
"name" : "" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 149 ,
"src" : "3389:7:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
"id" : 143 ,
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "3389:7:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "3388:9:0"
} ,
"scope" : 158 ,
"src" : "3334:105:0" ,
"stateMutability" : "view" ,
"superFunction" : null ,
"visibility" : "external"
} ,
{
"body" : {
"id" : 156 ,
"nodeType" : "Block" ,
"src" : "3600:37:0" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"id" : 154 ,
"name" : "tokenTemplate" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 7 ,
"src" : "3617:13:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"functionReturnParameters" : 153 ,
"id" : 155 ,
"nodeType" : "Return" ,
"src" : "3610:20:0"
}
]
} ,
"documentation" : "@dev get the token template address\n@return the template address" ,
"id" : 157 ,
"implemented" : true ,
"kind" : "function" ,
"modifiers" : [ ] ,
"name" : "getTokenTemplate" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
"id" : 150 ,
"nodeType" : "ParameterList" ,
"parameters" : [ ] ,
"src" : "3565:2:0"
} ,
"returnParameters" : {
"id" : 153 ,
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
"id" : 152 ,
"name" : "" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 157 ,
"src" : "3591:7:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
"id" : 151 ,
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "3591:7:0" ,
"stateMutability" : "nonpayable" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "3590:9:0"
} ,
"scope" : 158 ,
"src" : "3540:97:0" ,
"stateMutability" : "view" ,
"superFunction" : null ,
"visibility" : "external"
}
] ,
"scope" : 159 ,
"src" : "629:3010:0"
}
] ,
"src" : "0:3640:0"
} ,
"legacyAST" : {
"absolutePath" : "/home/travis/build/oceanprotocol/ocean-contracts/contracts/DTFactory.sol" ,
"exportedSymbols" : {
2020-12-11 11:37:09 +01:00
"DTFactory" : [ 158 ]
2020-11-26 07:38:08 +01:00
} ,
"id" : 159 ,
"nodeType" : "SourceUnit" ,
"nodes" : [
{
"id" : 1 ,
2020-12-11 11:37:09 +01:00
"literals" : [ "solidity" , "0.5" , ".7" ] ,
2020-11-26 07:38:08 +01:00
"nodeType" : "PragmaDirective" ,
"src" : "0:22:0"
} ,
{
"absolutePath" : "/home/travis/build/oceanprotocol/ocean-contracts/contracts/utils/Deployer.sol" ,
"file" : "./utils/Deployer.sol" ,
"id" : 2 ,
"nodeType" : "ImportDirective" ,
"scope" : 159 ,
"sourceUnit" : 5732 ,
"src" : "185:30:0" ,
"symbolAliases" : [ ] ,
"unitAlias" : ""
} ,
{
"absolutePath" : "/home/travis/build/oceanprotocol/ocean-contracts/contracts/interfaces/IERC20Template.sol" ,
"file" : "./interfaces/IERC20Template.sol" ,
"id" : 3 ,
"nodeType" : "ImportDirective" ,
"scope" : 159 ,
"sourceUnit" : 5090 ,
"src" : "216:41:0" ,
"symbolAliases" : [ ] ,
"unitAlias" : ""
} ,
{
"baseContracts" : [
{
"arguments" : null ,
"baseName" : {
"contractScope" : null ,
"id" : 4 ,
"name" : "Deployer" ,
"nodeType" : "UserDefinedTypeName" ,
"referencedDeclaration" : 5731 ,
"src" : "651:8:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_contract$_Deployer_$5731" ,
"typeString" : "contract Deployer"
}
} ,
"id" : 5 ,
"nodeType" : "InheritanceSpecifier" ,
"src" : "651:8:0"
}
] ,
2020-12-11 11:37:09 +01:00
"contractDependencies" : [ 5731 ] ,
2020-11-26 07:38:08 +01:00
"contractKind" : "contract" ,
"documentation" : "@title DTFactory contract\n@author Ocean Protocol Team\n * @dev Implementation of Ocean DataTokens Factory\n * DTFactory deploys DataToken proxy contracts.\n New DataToken proxy contracts are links to the template contract's bytecode.\n Proxy contract functionality is based on Ocean Protocol custom implementation of ERC1167 standard." ,
"fullyImplemented" : true ,
"id" : 158 ,
2020-12-11 11:37:09 +01:00
"linearizedBaseContracts" : [ 158 , 5731 ] ,
2020-11-26 07:38:08 +01:00
"name" : "DTFactory" ,
"nodeType" : "ContractDefinition" ,
"nodes" : [
{
"constant" : false ,
"id" : 7 ,
"name" : "tokenTemplate" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 158 ,
"src" : "666:29:0" ,
"stateVariable" : true ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
"id" : 6 ,
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "666:7:0" ,
"stateMutability" : "nonpayable" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "private"
} ,
{
"constant" : false ,
"id" : 9 ,
"name" : "communityFeeCollector" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 158 ,
"src" : "701:37:0" ,
"stateVariable" : true ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
"id" : 8 ,
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "701:7:0" ,
"stateMutability" : "nonpayable" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "private"
} ,
{
"constant" : false ,
"id" : 12 ,
"name" : "currentTokenCount" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 158 ,
"src" : "744:37:0" ,
"stateVariable" : true ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
"id" : 10 ,
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "744:7:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : {
"argumentTypes" : null ,
"hexValue" : "31" ,
"id" : 11 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "number" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "780:1:0" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_rational_1_by_1" ,
"typeString" : "int_const 1"
} ,
"value" : "1"
} ,
"visibility" : "private"
} ,
{
"anonymous" : false ,
"documentation" : null ,
"id" : 20 ,
"name" : "TokenCreated" ,
"nodeType" : "EventDefinition" ,
"parameters" : {
"id" : 19 ,
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
"id" : 14 ,
"indexed" : true ,
"name" : "newTokenAddress" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 20 ,
"src" : "816:31:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
"id" : 13 ,
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "816:7:0" ,
"stateMutability" : "nonpayable" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
"id" : 16 ,
"indexed" : true ,
"name" : "templateAddress" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 20 ,
"src" : "857:31:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
"id" : 15 ,
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "857:7:0" ,
"stateMutability" : "nonpayable" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
"id" : 18 ,
"indexed" : true ,
"name" : "tokenName" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 20 ,
"src" : "898:24:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string"
} ,
"typeName" : {
"id" : 17 ,
"name" : "string" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "898:6:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_storage_ptr" ,
"typeString" : "string"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "806:122:0"
} ,
"src" : "788:141:0"
} ,
{
"anonymous" : false ,
"documentation" : null ,
"id" : 34 ,
"name" : "TokenRegistered" ,
"nodeType" : "EventDefinition" ,
"parameters" : {
"id" : 33 ,
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
"id" : 22 ,
"indexed" : true ,
"name" : "tokenAddress" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 34 ,
"src" : "966:28:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
"id" : 21 ,
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "966:7:0" ,
"stateMutability" : "nonpayable" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
"id" : 24 ,
"indexed" : false ,
"name" : "tokenName" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 34 ,
"src" : "1004:16:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string"
} ,
"typeName" : {
"id" : 23 ,
"name" : "string" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1004:6:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_storage_ptr" ,
"typeString" : "string"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
"id" : 26 ,
"indexed" : false ,
"name" : "tokenSymbol" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 34 ,
"src" : "1030:18:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string"
} ,
"typeName" : {
"id" : 25 ,
"name" : "string" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1030:6:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_storage_ptr" ,
"typeString" : "string"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
"id" : 28 ,
"indexed" : false ,
"name" : "tokenCap" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 34 ,
"src" : "1058:16:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
"id" : 27 ,
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1058:7:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
"id" : 30 ,
"indexed" : true ,
"name" : "registeredBy" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 34 ,
"src" : "1084:28:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
"id" : 29 ,
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1084:7:0" ,
"stateMutability" : "nonpayable" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
"id" : 32 ,
"indexed" : true ,
"name" : "blob" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 34 ,
"src" : "1122:19:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string"
} ,
"typeName" : {
"id" : 31 ,
"name" : "string" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1122:6:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_storage_ptr" ,
"typeString" : "string"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "956:191:0"
} ,
"src" : "935:213:0"
} ,
{
"body" : {
"id" : 64 ,
"nodeType" : "Block" ,
"src" : "1518:271:0" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
} ,
"id" : 52 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"id" : 46 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
"id" : 42 ,
"name" : "_template" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 36 ,
"src" : "1549:9:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "!=" ,
"rightExpression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"hexValue" : "30" ,
"id" : 44 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "number" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "1570:1:0" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_rational_0_by_1" ,
"typeString" : "int_const 0"
} ,
"value" : "0"
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_rational_0_by_1" ,
"typeString" : "int_const 0"
}
] ,
"id" : 43 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"lValueRequested" : false ,
"nodeType" : "ElementaryTypeNameExpression" ,
"src" : "1562:7:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_type$_t_address_$" ,
"typeString" : "type(address)"
} ,
"typeName" : "address"
} ,
"id" : 45 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "typeConversion" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "1562:10:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address_payable" ,
"typeString" : "address payable"
}
} ,
"src" : "1549:23:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "&&" ,
"rightExpression" : {
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"id" : 51 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
"id" : 47 ,
"name" : "_collector" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 38 ,
"src" : "1588:10:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "!=" ,
"rightExpression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"hexValue" : "30" ,
"id" : 49 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "number" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "1610:1:0" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_rational_0_by_1" ,
"typeString" : "int_const 0"
} ,
"value" : "0"
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_rational_0_by_1" ,
"typeString" : "int_const 0"
}
] ,
"id" : 48 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"lValueRequested" : false ,
"nodeType" : "ElementaryTypeNameExpression" ,
"src" : "1602:7:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_type$_t_address_$" ,
"typeString" : "type(address)"
} ,
"typeName" : "address"
} ,
"id" : 50 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "typeConversion" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "1602:10:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address_payable" ,
"typeString" : "address payable"
}
} ,
"src" : "1588:24:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
} ,
"src" : "1549:63:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
} ,
{
"argumentTypes" : null ,
"hexValue" : "4454466163746f72793a20496e76616c69642074656d706c61746520746f6b656e2f636f6d6d756e6974792066656520636f6c6c6563746f722061646472657373" ,
"id" : 53 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "string" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "1626:67:0" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_stringliteral_4ad3e5f7655ba83235e545811343b3f1c7739bd2f1b726cbd7686d420baf2813" ,
"typeString" : "literal_string \"DTFactory: Invalid template token/community fee collector address\""
} ,
"value" : "DTFactory: Invalid template token/community fee collector address"
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
} ,
{
"typeIdentifier" : "t_stringliteral_4ad3e5f7655ba83235e545811343b3f1c7739bd2f1b726cbd7686d420baf2813" ,
"typeString" : "literal_string \"DTFactory: Invalid template token/community fee collector address\""
}
] ,
"id" : 41 ,
"name" : "require" ,
"nodeType" : "Identifier" ,
2020-12-11 11:37:09 +01:00
"overloadedDeclarations" : [ 6555 , 6556 ] ,
2020-11-26 07:38:08 +01:00
"referencedDeclaration" : 6556 ,
"src" : "1528:7:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$" ,
"typeString" : "function (bool,string memory) pure"
}
} ,
"id" : 54 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "1528:175:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
"id" : 55 ,
"nodeType" : "ExpressionStatement" ,
"src" : "1528:175:0"
} ,
{
"expression" : {
"argumentTypes" : null ,
"id" : 58 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftHandSide" : {
"argumentTypes" : null ,
"id" : 56 ,
"name" : "tokenTemplate" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 7 ,
"src" : "1713:13:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"nodeType" : "Assignment" ,
"operator" : "=" ,
"rightHandSide" : {
"argumentTypes" : null ,
"id" : 57 ,
"name" : "_template" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 36 ,
"src" : "1729:9:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"src" : "1713:25:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"id" : 59 ,
"nodeType" : "ExpressionStatement" ,
"src" : "1713:25:0"
} ,
{
"expression" : {
"argumentTypes" : null ,
"id" : 62 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftHandSide" : {
"argumentTypes" : null ,
"id" : 60 ,
"name" : "communityFeeCollector" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 9 ,
"src" : "1748:21:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"nodeType" : "Assignment" ,
"operator" : "=" ,
"rightHandSide" : {
"argumentTypes" : null ,
"id" : 61 ,
"name" : "_collector" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 38 ,
"src" : "1772:10:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"src" : "1748:34:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"id" : 63 ,
"nodeType" : "ExpressionStatement" ,
"src" : "1748:34:0"
}
]
} ,
"documentation" : "@dev constructor\n Called on contract deployment. Could not be called with zero address parameters.\n@param _template refers to the address of a deployed DataToken contract.\n@param _collector refers to the community fee collector address" ,
"id" : 65 ,
"implemented" : true ,
"kind" : "constructor" ,
"modifiers" : [ ] ,
"name" : "" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
"id" : 39 ,
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
"id" : 36 ,
"name" : "_template" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 65 ,
"src" : "1459:17:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
"id" : 35 ,
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1459:7:0" ,
"stateMutability" : "nonpayable" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
"id" : 38 ,
"name" : "_collector" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 65 ,
"src" : "1486:18:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
"id" : 37 ,
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "1486:7:0" ,
"stateMutability" : "nonpayable" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "1449:61:0"
} ,
"returnParameters" : {
"id" : 40 ,
"nodeType" : "ParameterList" ,
"parameters" : [ ] ,
"src" : "1518:0:0"
} ,
"scope" : 158 ,
"src" : "1438:351:0" ,
"stateMutability" : "nonpayable" ,
"superFunction" : null ,
"visibility" : "public"
} ,
{
"body" : {
"id" : 140 ,
"nodeType" : "Block" ,
"src" : "2349:883:0" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"id" : 81 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
"id" : 79 ,
"name" : "cap" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 73 ,
"src" : "2380:3:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "!=" ,
"rightExpression" : {
"argumentTypes" : null ,
"hexValue" : "30" ,
"id" : 80 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "number" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "2387:1:0" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_rational_0_by_1" ,
"typeString" : "int_const 0"
} ,
"value" : "0"
} ,
"src" : "2380:8:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
} ,
{
"argumentTypes" : null ,
"hexValue" : "4454466163746f72793a207a65726f20636170206973206e6f7420616c6c6f776564" ,
"id" : 82 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "string" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "2402:36:0" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_stringliteral_275103c39c8e014c8efbcc9e9b88606200c5ae2f95e8ff4229101e5d34ee3597" ,
"typeString" : "literal_string \"DTFactory: zero cap is not allowed\""
} ,
"value" : "DTFactory: zero cap is not allowed"
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
} ,
{
"typeIdentifier" : "t_stringliteral_275103c39c8e014c8efbcc9e9b88606200c5ae2f95e8ff4229101e5d34ee3597" ,
"typeString" : "literal_string \"DTFactory: zero cap is not allowed\""
}
] ,
"id" : 78 ,
"name" : "require" ,
"nodeType" : "Identifier" ,
2020-12-11 11:37:09 +01:00
"overloadedDeclarations" : [ 6555 , 6556 ] ,
2020-11-26 07:38:08 +01:00
"referencedDeclaration" : 6556 ,
"src" : "2359:7:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$" ,
"typeString" : "function (bool,string memory) pure"
}
} ,
"id" : 83 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "2359:89:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
"id" : 84 ,
"nodeType" : "ExpressionStatement" ,
"src" : "2359:89:0"
} ,
{
"expression" : {
"argumentTypes" : null ,
"id" : 89 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftHandSide" : {
"argumentTypes" : null ,
"id" : 85 ,
"name" : "token" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 76 ,
"src" : "2459:5:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"nodeType" : "Assignment" ,
"operator" : "=" ,
"rightHandSide" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"id" : 87 ,
"name" : "tokenTemplate" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 7 ,
"src" : "2474:13:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
] ,
"id" : 86 ,
"name" : "deploy" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 5730 ,
"src" : "2467:6:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_internal_nonpayable$_t_address_$returns$_t_address_$" ,
"typeString" : "function (address) returns (address)"
}
} ,
"id" : 88 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "2467:21:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"src" : "2459:29:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"id" : 90 ,
"nodeType" : "ExpressionStatement" ,
"src" : "2459:29:0"
} ,
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"commonType" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"id" : 96 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftExpression" : {
"argumentTypes" : null ,
"id" : 92 ,
"name" : "token" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 76 ,
"src" : "2520:5:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"nodeType" : "BinaryOperation" ,
"operator" : "!=" ,
"rightExpression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"hexValue" : "30" ,
"id" : 94 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "number" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "2537:1:0" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_rational_0_by_1" ,
"typeString" : "int_const 0"
} ,
"value" : "0"
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_rational_0_by_1" ,
"typeString" : "int_const 0"
}
] ,
"id" : 93 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"lValueRequested" : false ,
"nodeType" : "ElementaryTypeNameExpression" ,
"src" : "2529:7:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_type$_t_address_$" ,
"typeString" : "type(address)"
} ,
"typeName" : "address"
} ,
"id" : 95 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "typeConversion" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "2529:10:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address_payable" ,
"typeString" : "address payable"
}
} ,
"src" : "2520:19:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
} ,
{
"argumentTypes" : null ,
"hexValue" : "4454466163746f72793a204661696c656420746f20706572666f726d206d696e696d616c206465706c6f79206f662061206e657720746f6b656e" ,
"id" : 97 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "string" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "2553:60:0" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_stringliteral_864bea267bbab0e2823533999ec879a0c10c7f940117c7fd1687efd3993a56e3" ,
"typeString" : "literal_string \"DTFactory: Failed to perform minimal deploy of a new token\""
} ,
"value" : "DTFactory: Failed to perform minimal deploy of a new token"
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
} ,
{
"typeIdentifier" : "t_stringliteral_864bea267bbab0e2823533999ec879a0c10c7f940117c7fd1687efd3993a56e3" ,
"typeString" : "literal_string \"DTFactory: Failed to perform minimal deploy of a new token\""
}
] ,
"id" : 91 ,
"name" : "require" ,
"nodeType" : "Identifier" ,
2020-12-11 11:37:09 +01:00
"overloadedDeclarations" : [ 6555 , 6556 ] ,
2020-11-26 07:38:08 +01:00
"referencedDeclaration" : 6556 ,
"src" : "2499:7:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$" ,
"typeString" : "function (bool,string memory) pure"
}
} ,
"id" : 98 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "2499:124:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
"id" : 99 ,
"nodeType" : "ExpressionStatement" ,
"src" : "2499:124:0"
} ,
{
2020-12-11 11:37:09 +01:00
"assignments" : [ 101 ] ,
2020-11-26 07:38:08 +01:00
"declarations" : [
{
"constant" : false ,
"id" : 101 ,
"name" : "tokenInstance" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 140 ,
"src" : "2633:28:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_contract$_IERC20Template_$5089" ,
"typeString" : "contract IERC20Template"
} ,
"typeName" : {
"contractScope" : null ,
"id" : 100 ,
"name" : "IERC20Template" ,
"nodeType" : "UserDefinedTypeName" ,
"referencedDeclaration" : 5089 ,
"src" : "2633:14:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_contract$_IERC20Template_$5089" ,
"typeString" : "contract IERC20Template"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"id" : 105 ,
"initialValue" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"id" : 103 ,
"name" : "token" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 76 ,
"src" : "2679:5:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
] ,
"id" : 102 ,
"name" : "IERC20Template" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 5089 ,
"src" : "2664:14:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_type$_t_contract$_IERC20Template_$5089_$" ,
"typeString" : "type(contract IERC20Template)"
}
} ,
"id" : 104 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "typeConversion" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "2664:21:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_contract$_IERC20Template_$5089" ,
"typeString" : "contract IERC20Template"
}
} ,
"nodeType" : "VariableDeclarationStatement" ,
"src" : "2633:52:0"
} ,
{
"expression" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"id" : 109 ,
"name" : "name" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 69 ,
"src" : "2758:4:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
} ,
{
"argumentTypes" : null ,
"id" : 110 ,
"name" : "symbol" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 71 ,
"src" : "2780:6:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
} ,
{
"argumentTypes" : null ,
"expression" : {
"argumentTypes" : null ,
"id" : 111 ,
"name" : "msg" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 6552 ,
"src" : "2804:3:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_magic_message" ,
"typeString" : "msg"
}
} ,
"id" : 112 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"memberName" : "sender" ,
"nodeType" : "MemberAccess" ,
"referencedDeclaration" : null ,
"src" : "2804:10:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address_payable" ,
"typeString" : "address payable"
}
} ,
{
"argumentTypes" : null ,
"id" : 113 ,
"name" : "cap" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 73 ,
"src" : "2832:3:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
{
"argumentTypes" : null ,
"id" : 114 ,
"name" : "blob" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 67 ,
"src" : "2853:4:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
} ,
{
"argumentTypes" : null ,
"id" : 115 ,
"name" : "communityFeeCollector" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 9 ,
"src" : "2875:21:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
} ,
{
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
} ,
{
"typeIdentifier" : "t_address_payable" ,
"typeString" : "address payable"
} ,
{
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
{
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
} ,
{
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
] ,
"expression" : {
"argumentTypes" : null ,
"id" : 107 ,
"name" : "tokenInstance" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 101 ,
"src" : "2716:13:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_contract$_IERC20Template_$5089" ,
"typeString" : "contract IERC20Template"
}
} ,
"id" : 108 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"memberName" : "initialize" ,
"nodeType" : "MemberAccess" ,
"referencedDeclaration" : 5000 ,
"src" : "2716:24:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_external_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_address_$returns$_t_bool_$" ,
"typeString" : "function (string memory,string memory,address,uint256,string memory,address) external returns (bool)"
}
} ,
"id" : 116 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "2716:194:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
}
} ,
{
"argumentTypes" : null ,
"hexValue" : "4454466163746f72793a20556e61626c6520746f20696e697469616c697a6520746f6b656e20696e7374616e6365" ,
"id" : 117 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "string" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "2924:48:0" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_stringliteral_0d4ad5d97b72e5d205f3629b55676990eb71b941b9757afabcf7e9a4e3e2cbe3" ,
"typeString" : "literal_string \"DTFactory: Unable to initialize token instance\""
} ,
"value" : "DTFactory: Unable to initialize token instance"
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_bool" ,
"typeString" : "bool"
} ,
{
"typeIdentifier" : "t_stringliteral_0d4ad5d97b72e5d205f3629b55676990eb71b941b9757afabcf7e9a4e3e2cbe3" ,
"typeString" : "literal_string \"DTFactory: Unable to initialize token instance\""
}
] ,
"id" : 106 ,
"name" : "require" ,
"nodeType" : "Identifier" ,
2020-12-11 11:37:09 +01:00
"overloadedDeclarations" : [ 6555 , 6556 ] ,
2020-11-26 07:38:08 +01:00
"referencedDeclaration" : 6556 ,
"src" : "2695:7:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$" ,
"typeString" : "function (bool,string memory) pure"
}
} ,
"id" : 118 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "2695:287:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
"id" : 119 ,
"nodeType" : "ExpressionStatement" ,
"src" : "2695:287:0"
} ,
{
"eventCall" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"id" : 121 ,
"name" : "token" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 76 ,
"src" : "3010:5:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
{
"argumentTypes" : null ,
"id" : 122 ,
"name" : "tokenTemplate" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 7 ,
"src" : "3017:13:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
{
"argumentTypes" : null ,
"id" : 123 ,
"name" : "name" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 69 ,
"src" : "3032:4:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
{
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
{
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
] ,
"id" : 120 ,
"name" : "TokenCreated" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 20 ,
"src" : "2997:12:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_event_nonpayable$_t_address_$_t_address_$_t_string_memory_ptr_$returns$__$" ,
"typeString" : "function (address,address,string memory)"
}
} ,
"id" : 124 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "2997:40:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
"id" : 125 ,
"nodeType" : "EmitStatement" ,
"src" : "2992:45:0"
} ,
{
"eventCall" : {
"argumentTypes" : null ,
"arguments" : [
{
"argumentTypes" : null ,
"id" : 127 ,
"name" : "token" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 76 ,
"src" : "3081:5:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
{
"argumentTypes" : null ,
"id" : 128 ,
"name" : "name" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 69 ,
"src" : "3100:4:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
} ,
{
"argumentTypes" : null ,
"id" : 129 ,
"name" : "symbol" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 71 ,
"src" : "3118:6:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
} ,
{
"argumentTypes" : null ,
"id" : 130 ,
"name" : "cap" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 73 ,
"src" : "3138:3:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
{
"argumentTypes" : null ,
"expression" : {
"argumentTypes" : null ,
"id" : 131 ,
"name" : "msg" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 6552 ,
"src" : "3155:3:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_magic_message" ,
"typeString" : "msg"
}
} ,
"id" : 132 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"memberName" : "sender" ,
"nodeType" : "MemberAccess" ,
"referencedDeclaration" : null ,
"src" : "3155:10:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address_payable" ,
"typeString" : "address payable"
}
} ,
{
"argumentTypes" : null ,
"id" : 133 ,
"name" : "blob" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 67 ,
"src" : "3179:4:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
}
] ,
"expression" : {
"argumentTypes" : [
{
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
{
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
} ,
{
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
} ,
{
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
{
"typeIdentifier" : "t_address_payable" ,
"typeString" : "address payable"
} ,
{
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string memory"
}
] ,
"id" : 126 ,
"name" : "TokenRegistered" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 34 ,
"src" : "3052:15:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_function_event_nonpayable$_t_address_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint256_$_t_address_$_t_string_memory_ptr_$returns$__$" ,
"typeString" : "function (address,string memory,string memory,uint256,address,string memory)"
}
} ,
"id" : 134 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"kind" : "functionCall" ,
"lValueRequested" : false ,
"names" : [ ] ,
"nodeType" : "FunctionCall" ,
"src" : "3052:141:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_tuple$__$" ,
"typeString" : "tuple()"
}
} ,
"id" : 135 ,
"nodeType" : "EmitStatement" ,
"src" : "3047:146:0"
} ,
{
"expression" : {
"argumentTypes" : null ,
"id" : 138 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : false ,
"lValueRequested" : false ,
"leftHandSide" : {
"argumentTypes" : null ,
"id" : 136 ,
"name" : "currentTokenCount" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 12 ,
"src" : "3203:17:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"nodeType" : "Assignment" ,
"operator" : "+=" ,
"rightHandSide" : {
"argumentTypes" : null ,
"hexValue" : "31" ,
"id" : 137 ,
"isConstant" : false ,
"isLValue" : false ,
"isPure" : true ,
"kind" : "number" ,
"lValueRequested" : false ,
"nodeType" : "Literal" ,
"src" : "3224:1:0" ,
"subdenomination" : null ,
"typeDescriptions" : {
"typeIdentifier" : "t_rational_1_by_1" ,
"typeString" : "int_const 1"
} ,
"value" : "1"
} ,
"src" : "3203:22:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"id" : 139 ,
"nodeType" : "ExpressionStatement" ,
"src" : "3203:22:0"
}
]
} ,
"documentation" : "@dev Deploys new DataToken proxy contract.\n Template contract address could not be a zero address.\n@param blob any string that hold data/metadata for the new token\n@param name token name\n@param symbol token symbol\n@param cap the maximum total supply\n@return address of a new proxy DataToken contract" ,
"id" : 141 ,
"implemented" : true ,
"kind" : "function" ,
"modifiers" : [ ] ,
"name" : "createToken" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
"id" : 74 ,
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
"id" : 67 ,
"name" : "blob" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 141 ,
"src" : "2194:18:0" ,
"stateVariable" : false ,
"storageLocation" : "memory" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string"
} ,
"typeName" : {
"id" : 66 ,
"name" : "string" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "2194:6:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_storage_ptr" ,
"typeString" : "string"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
"id" : 69 ,
"name" : "name" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 141 ,
"src" : "2222:18:0" ,
"stateVariable" : false ,
"storageLocation" : "memory" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string"
} ,
"typeName" : {
"id" : 68 ,
"name" : "string" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "2222:6:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_storage_ptr" ,
"typeString" : "string"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
"id" : 71 ,
"name" : "symbol" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 141 ,
"src" : "2250:20:0" ,
"stateVariable" : false ,
"storageLocation" : "memory" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_memory_ptr" ,
"typeString" : "string"
} ,
"typeName" : {
"id" : 70 ,
"name" : "string" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "2250:6:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_string_storage_ptr" ,
"typeString" : "string"
}
} ,
"value" : null ,
"visibility" : "internal"
} ,
{
"constant" : false ,
"id" : 73 ,
"name" : "cap" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 141 ,
"src" : "2280:11:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
"id" : 72 ,
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "2280:7:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "2184:113:0"
} ,
"returnParameters" : {
"id" : 77 ,
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
"id" : 76 ,
"name" : "token" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 141 ,
"src" : "2330:13:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
"id" : 75 ,
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "2330:7:0" ,
"stateMutability" : "nonpayable" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "2329:15:0"
} ,
"scope" : 158 ,
"src" : "2164:1068:0" ,
"stateMutability" : "nonpayable" ,
"superFunction" : null ,
"visibility" : "public"
} ,
{
"body" : {
"id" : 148 ,
"nodeType" : "Block" ,
"src" : "3398:41:0" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"id" : 146 ,
"name" : "currentTokenCount" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 12 ,
"src" : "3415:17:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"functionReturnParameters" : 145 ,
"id" : 147 ,
"nodeType" : "Return" ,
"src" : "3408:24:0"
}
]
} ,
"documentation" : "@dev get the current token count.\n@return the current token count" ,
"id" : 149 ,
"implemented" : true ,
"kind" : "function" ,
"modifiers" : [ ] ,
"name" : "getCurrentTokenCount" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
"id" : 142 ,
"nodeType" : "ParameterList" ,
"parameters" : [ ] ,
"src" : "3363:2:0"
} ,
"returnParameters" : {
"id" : 145 ,
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
"id" : 144 ,
"name" : "" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 149 ,
"src" : "3389:7:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
} ,
"typeName" : {
"id" : 143 ,
"name" : "uint256" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "3389:7:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_uint256" ,
"typeString" : "uint256"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "3388:9:0"
} ,
"scope" : 158 ,
"src" : "3334:105:0" ,
"stateMutability" : "view" ,
"superFunction" : null ,
"visibility" : "external"
} ,
{
"body" : {
"id" : 156 ,
"nodeType" : "Block" ,
"src" : "3600:37:0" ,
"statements" : [
{
"expression" : {
"argumentTypes" : null ,
"id" : 154 ,
"name" : "tokenTemplate" ,
"nodeType" : "Identifier" ,
"overloadedDeclarations" : [ ] ,
"referencedDeclaration" : 7 ,
"src" : "3617:13:0" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"functionReturnParameters" : 153 ,
"id" : 155 ,
"nodeType" : "Return" ,
"src" : "3610:20:0"
}
]
} ,
"documentation" : "@dev get the token template address\n@return the template address" ,
"id" : 157 ,
"implemented" : true ,
"kind" : "function" ,
"modifiers" : [ ] ,
"name" : "getTokenTemplate" ,
"nodeType" : "FunctionDefinition" ,
"parameters" : {
"id" : 150 ,
"nodeType" : "ParameterList" ,
"parameters" : [ ] ,
"src" : "3565:2:0"
} ,
"returnParameters" : {
"id" : 153 ,
"nodeType" : "ParameterList" ,
"parameters" : [
{
"constant" : false ,
"id" : 152 ,
"name" : "" ,
"nodeType" : "VariableDeclaration" ,
"scope" : 157 ,
"src" : "3591:7:0" ,
"stateVariable" : false ,
"storageLocation" : "default" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
} ,
"typeName" : {
"id" : 151 ,
"name" : "address" ,
"nodeType" : "ElementaryTypeName" ,
"src" : "3591:7:0" ,
"stateMutability" : "nonpayable" ,
"typeDescriptions" : {
"typeIdentifier" : "t_address" ,
"typeString" : "address"
}
} ,
"value" : null ,
"visibility" : "internal"
}
] ,
"src" : "3590:9:0"
} ,
"scope" : 158 ,
"src" : "3540:97:0" ,
"stateMutability" : "view" ,
"superFunction" : null ,
"visibility" : "external"
}
] ,
"scope" : 159 ,
"src" : "629:3010:0"
}
] ,
"src" : "0:3640:0"
} ,
"compiler" : {
"name" : "solc" ,
"version" : "0.5.7+commit.6da8b019.Emscripten.clang"
} ,
"networks" : { } ,
"schemaVersion" : "3.2.4" ,
"updatedAt" : "2020-10-22T12:03:05.061Z" ,
"devdoc" : {
"author" : "Ocean Protocol Team" ,
"details" : "Implementation of Ocean DataTokens Factory * DTFactory deploys DataToken proxy contracts. New DataToken proxy contracts are links to the template contract's bytecode. Proxy contract functionality is based on Ocean Protocol custom implementation of ERC1167 standard." ,
"methods" : {
"constructor" : {
"details" : "constructor Called on contract deployment. Could not be called with zero address parameters." ,
"params" : {
"_collector" : "refers to the community fee collector address" ,
"_template" : "refers to the address of a deployed DataToken contract."
}
} ,
"createToken(string,string,string,uint256)" : {
"details" : "Deploys new DataToken proxy contract. Template contract address could not be a zero address." ,
"params" : {
"blob" : "any string that hold data/metadata for the new token" ,
"cap" : "the maximum total supply" ,
"name" : "token name" ,
"symbol" : "token symbol"
} ,
"return" : "address of a new proxy DataToken contract"
} ,
"getCurrentTokenCount()" : {
"details" : "get the current token count." ,
"return" : "the current token count"
} ,
"getTokenTemplate()" : {
"details" : "get the token template address" ,
"return" : "the template address"
}
} ,
"title" : "DTFactory contract"
} ,
"userdoc" : {
"methods" : { }
}
2020-12-11 11:37:09 +01:00
}