{ "contractName": "DataTokenTemplate", "abi": [ { "constant": false, "inputs": [ { "name": "spender", "type": "address" }, { "name": "amount", "type": "uint256" } ], "name": "approve", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "totalSupply", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "sender", "type": "address" }, { "name": "recipient", "type": "address" }, { "name": "amount", "type": "uint256" } ], "name": "transferFrom", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "BASE_MARKET_FEE_PERCENTAGE", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "spender", "type": "address" }, { "name": "addedValue", "type": "uint256" } ], "name": "increaseAllowance", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "name": "account", "type": "address" } ], "name": "balanceOf", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "spender", "type": "address" }, { "name": "subtractedValue", "type": "uint256" } ], "name": "decreaseAllowance", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "recipient", "type": "address" }, { "name": "amount", "type": "uint256" } ], "name": "transfer", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "BASE_COMMUNITY_FEE_PERCENTAGE", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "owner", "type": "address" }, { "name": "spender", "type": "address" } ], "name": "allowance", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "BASE", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "inputs": [ { "name": "name", "type": "string" }, { "name": "symbol", "type": "string" }, { "name": "minterAddress", "type": "address" }, { "name": "cap", "type": "uint256" }, { "name": "blob", "type": "string" }, { "name": "feeCollector", "type": "address" } ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "consumer", "type": "address" }, { "indexed": true, "name": "payer", "type": "address" }, { "indexed": false, "name": "amount", "type": "uint256" }, { "indexed": false, "name": "serviceId", "type": "uint256" }, { "indexed": false, "name": "timestamp", "type": "uint256" }, { "indexed": true, "name": "mrktFeeCollector", "type": "address" }, { "indexed": false, "name": "marketFee", "type": "uint256" } ], "name": "OrderStarted", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "orderTxId", "type": "bytes32" }, { "indexed": true, "name": "consumer", "type": "address" }, { "indexed": false, "name": "amount", "type": "uint256" }, { "indexed": false, "name": "serviceId", "type": "uint256" }, { "indexed": true, "name": "provider", "type": "address" }, { "indexed": false, "name": "timestamp", "type": "uint256" } ], "name": "OrderFinished", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "currentMinter", "type": "address" }, { "indexed": false, "name": "newMinter", "type": "address" } ], "name": "MinterProposed", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "currentMinter", "type": "address" }, { "indexed": false, "name": "newMinter", "type": "address" } ], "name": "MinterApproved", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "from", "type": "address" }, { "indexed": true, "name": "to", "type": "address" }, { "indexed": false, "name": "value", "type": "uint256" } ], "name": "Transfer", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "owner", "type": "address" }, { "indexed": true, "name": "spender", "type": "address" }, { "indexed": false, "name": "value", "type": "uint256" } ], "name": "Approval", "type": "event" }, { "constant": false, "inputs": [ { "name": "name", "type": "string" }, { "name": "symbol", "type": "string" }, { "name": "minterAddress", "type": "address" }, { "name": "cap", "type": "uint256" }, { "name": "blob", "type": "string" }, { "name": "feeCollector", "type": "address" } ], "name": "initialize", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "account", "type": "address" }, { "name": "value", "type": "uint256" } ], "name": "mint", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "consumer", "type": "address" }, { "name": "amount", "type": "uint256" }, { "name": "serviceId", "type": "uint256" }, { "name": "mrktFeeCollector", "type": "address" } ], "name": "startOrder", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "orderTxId", "type": "bytes32" }, { "name": "consumer", "type": "address" }, { "name": "amount", "type": "uint256" }, { "name": "serviceId", "type": "uint256" } ], "name": "finishOrder", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "newMinter", "type": "address" } ], "name": "proposeMinter", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [], "name": "approveMinter", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "name", "outputs": [ { "name": "", "type": "string" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "symbol", "outputs": [ { "name": "", "type": "string" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "blob", "outputs": [ { "name": "", "type": "string" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "decimals", "outputs": [ { "name": "", "type": "uint8" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "cap", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "account", "type": "address" } ], "name": "isMinter", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "minter", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "isInitialized", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "amount", "type": "uint256" }, { "name": "feePercentage", "type": "uint256" } ], "name": "calculateFee", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "pure", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minter\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sender\",\"type\":\"address\"},{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BASE_MARKET_FEE_PERCENTAGE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"feePercentage\",\"type\":\"uint256\"}],\"name\":\"calculateFee\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"cap\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newMinter\",\"type\":\"address\"}],\"name\":\"proposeMinter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"orderTxId\",\"type\":\"bytes32\"},{\"name\":\"consumer\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"serviceId\",\"type\":\"uint256\"}],\"name\":\"finishOrder\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"symbol\",\"type\":\"string\"},{\"name\":\"minterAddress\",\"type\":\"address\"},{\"name\":\"cap\",\"type\":\"uint256\"},{\"name\":\"blob\",\"type\":\"string\"},{\"name\":\"feeCollector\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isMinter\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"consumer\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"serviceId\",\"type\":\"uint256\"},{\"name\":\"mrktFeeCollector\",\"type\":\"address\"}],\"name\":\"startOrder\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BASE_COMMUNITY_FEE_PERCENTAGE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"approveMinter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BASE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"blob\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"symbol\",\"type\":\"string\"},{\"name\":\"minterAddress\",\"type\":\"address\"},{\"name\":\"cap\",\"type\":\"uint256\"},{\"name\":\"blob\",\"type\":\"string\"},{\"name\":\"feeCollector\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"consumer\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"payer\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"serviceId\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"mrktFeeCollector\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"marketFee\",\"type\":\"uint256\"}],\"name\":\"OrderStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"orderTxId\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"consumer\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"serviceId\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"OrderFinished\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"currentMinter\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"newMinter\",\"type\":\"address\"}],\"name\":\"MinterProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"currentMinter\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"newMinter\",\"type\":\"address\"}],\"name\":\"MinterApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}],\"devdoc\":{\"details\":\"DataTokenTemplate is an ERC20 compliant token template Used by the factory contract as a bytecode reference to deploy new DataTokens.\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. * Requirements: * - `spender` cannot be the zero address.\"},\"approveMinter()\":{\"details\":\"approveMinter It approves a new token minter address. Only the current minter can call it.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"blob()\":{\"details\":\"blob It returns the blob (e.g https://123.com).\",\"return\":\"DataToken blob.\"},\"calculateFee(uint256,uint256)\":{\"details\":\"calculateFee giving a fee percentage, and amount it calculates the actual fee\",\"params\":{\"amount\":\"the amount of token\",\"feePercentage\":\"the fee percentage \"},\"return\":\"the token fee.\"},\"cap()\":{\"details\":\"cap it returns the capital.\",\"return\":\"DataToken cap.\"},\"constructor\":{\"details\":\"constructor Called prior contract deployment\",\"params\":{\"blob\":\"data string refering to the resolver for the metadata\",\"cap\":\"the total ERC20 cap\",\"feeCollector\":\"it is the community fee collector address\",\"minterAddress\":\"refers to an address that has minter role\",\"name\":\"refers to a template DataToken name\",\"symbol\":\"refers to a template DataToken symbol\"}},\"decimals()\":{\"details\":\"decimals It returns the token decimals. how many supported decimal points\",\"return\":\"DataToken decimals.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"finishOrder(bytes32,address,uint256,uint256)\":{\"details\":\"finishOrder called by provider prior completing service delivery only if there is a partial or full refund.\",\"params\":{\"amount\":\"refers to amount of tokens that is going to be transfered.\",\"consumer\":\"refers to an address that has consumed that service.\",\"orderTxId\":\"refers to the transaction Id of startOrder acts as a payment reference.\",\"serviceId\":\"service index in the metadata.\"}},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address.\"},\"initialize(string,string,address,uint256,string,address)\":{\"details\":\"initialize Called prior contract initialization (e.g creating new DataToken instance) Calls private _initialize function. Only if contract is not initialized.\",\"params\":{\"blob\":\"data string refering to the resolver for the metadata\",\"cap\":\"the total ERC20 cap\",\"feeCollector\":\"it is the community fee collector address\",\"minterAddress\":\"refers to an address that has minter rights\",\"name\":\"refers to a new DataToken name\",\"symbol\":\"refers to a nea DataToken symbol\"}},\"isInitialized()\":{\"details\":\"isInitialized It checks whether the contract is initialized.\",\"return\":\"true if the contract is initialized.\"},\"isMinter(address)\":{\"details\":\"isMinter It takes the address and checks whether it has a minter role.\",\"params\":{\"account\":\"refers to the address.\"},\"return\":\"true if account has a minter role.\"},\"mint(address,uint256)\":{\"details\":\"mint Only the minter address can call it. msg.value should be higher than zero and gt or eq minting fee\",\"params\":{\"account\":\"refers to an address that token is going to be minted to.\",\"value\":\"refers to amount of tokens that is going to be minted.\"}},\"minter()\":{\"details\":\"minter\",\"return\":\"minter's address.\"},\"name()\":{\"details\":\"name It returns the token name.\",\"return\":\"DataToken name.\"},\"proposeMinter(address)\":{\"details\":\"proposeMinter It proposes a new token minter address. Only the current minter can call it.\",\"params\":{\"newMinter\":\"refers to a new token minter address.\"}},\"startOrder(address,uint256,uint256,address)\":{\"details\":\"startOrder called by payer or consumer prior ordering a service consume on a marketplace.\",\"params\":{\"amount\":\"refers to amount of tokens that is going to be transfered.\",\"consumer\":\"is the consumer address (payer could be different address)\",\"mrktFeeCollector\":\"marketplace fee collector\",\"serviceId\":\"service index in the metadata\"}},\"symbol()\":{\"details\":\"symbol It returns the token symbol.\",\"return\":\"DataToken symbol.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. * Requirements: * - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. * Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; * Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for `sender`'s tokens of at least `amount`.\"}},\"title\":\"DataTokenTemplate \"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/templates/DataTokenTemplate.sol\":\"DataTokenTemplate\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/interfaces/IERC20Template.sol\":{\"keccak256\":\"0x022ebed2ba4949e96a05cc394cf690d8fd3190a4733cebe8cbe930ac25cfde18\",\"urls\":[\"bzzr://2fa3d5cae14f0af7d78f6e1d13bc41854082c03ab2f86462ebb09afda88ee6e9\"]},\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/templates/DataTokenTemplate.sol\":{\"keccak256\":\"0x732470be7c02504d17c4aec8a2c50dc1830de309d72ded427bb12fd006ae66a8\",\"urls\":[\"bzzr://be77bb3f4e346c7234cb55d82d984dafade99886ad28af99e3be69d5115fa9f4\"]},\"openzeppelin-solidity/contracts/GSN/Context.sol\":{\"keccak256\":\"0x90a3995645af7562d84b9d69363ffa5ae7217714ab61e951bf7bc450f40e4061\",\"urls\":[\"bzzr://51482c01bddf23793bddee43b60ab9578a62948a4f2082def24ea792a553b055\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x640b6dee7a4b830bdfd52b5031a07fc2b12209f5b2e29e5d364a7d37f69d8076\",\"urls\":[\"bzzr://292843005e754e752644f767477ec5ad7a1ffc91ddb18c38b8079c62f3993cad\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xb15af804e2bc97db51e4e103f13de9fe13f87e6b835d7a88c897966c0e58506e\",\"urls\":[\"bzzr://6200c125af376381ae6c5415b8f3c1cb83889be20a7a51d67ac607487a10313b\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xe5bb0f57cff3e299f360052ba50f1ea0fff046df2be070b6943e0e3c3fdad8a9\",\"urls\":[\"bzzr://cf2d583b8dce38d0617fdcd65f2fd9f126fe17b7f683b5a515ea9d2762d8b062\"]}},\"version\":1}", "bytecode": "0x60806040526007805460a060020a60ff02191690553480156200002157600080fd5b5060405162001f0738038062001f07833981018060405260c08110156200004757600080fd5b8101908080516401000000008111156200006057600080fd5b820160208101848111156200007457600080fd5b81516401000000008111828201871017156200008f57600080fd5b50509291906020018051640100000000811115620000ac57600080fd5b82016020810184811115620000c057600080fd5b8151640100000000811182820187101715620000db57600080fd5b505060208201516040830151606090930180519295919491926401000000008111156200010757600080fd5b820160208101848111156200011b57600080fd5b81516401000000008111828201871017156200013657600080fd5b505060209091015190925090506200015c86868686868664010000000062000169810204565b5050505050505062000439565b6000600160a060020a038516620001cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603081526020018062001e446030913960400191505060405180910390fd5b600854600160a060020a03161562000230576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f81526020018062001ed8602f913960400191505060405180910390fd5b600160a060020a03821662000291576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252604081526020018062001e746040913960400191505060405180910390fd5b83620002e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018062001eb46024913960400191505060405180910390fd5b60068490558651620003039060039060208a019062000394565b5082516200031990600590602086019062000394565b5085516200032f90600490602089019062000394565b505060088054600160a060020a0319908116600160a060020a039687161790915560078054740100000000000000000000000000000000000000009216929095169190911760a060020a60ff02191681179384905560ff930492909216949350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620003d757805160ff191683800117855562000407565b8280016001018555821562000407579182015b8281111562000407578251825591602001919060010190620003ea565b506200041592915062000419565b5090565b6200043691905b8082111562000415576000815560010162000420565b90565b6119fb80620004496000396000f3fe608060405234801561001057600080fd5b50600436106101ab576000357c01000000000000000000000000000000000000000000000000000000009004806370a08231116100fb578063aa271e1a116100b4578063dd62ed3e1161008e578063dd62ed3e1461060a578063eb40024b14610638578063ec342ad014610640578063fde0e7a814610648576101ab565b8063aa271e1a146105aa578063ab63d2b2146105d0578063b2263a5d146102e1576101ab565b806370a08231146103ba5780638ca0c059146103e05780639070d2f81461041857806395d89b411461054a578063a457c2d714610552578063a9059cbb1461057e576101ab565b8063313ce56711610168578063392e53cd11610142578063392e53cd14610332578063395093511461033a57806340c10f191461036657806350d2fcc414610394576101ab565b8063313ce567146102e957806334e7312214610307578063355274ea1461032a576101ab565b806306fdde03146101b0578063075461721461022d578063095ea7b31461025157806318160ddd1461029157806323b872dd146102ab578063294541c7146102e1575b600080fd5b6101b8610650565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101f25781810151838201526020016101da565b50505050905090810190601f16801561021f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102356106e7565b60408051600160a060020a039092168252519081900360200190f35b61027d6004803603604081101561026757600080fd5b50600160a060020a0381351690602001356106f6565b604080519115158252519081900360200190f35b610299610714565b60408051918252519081900360200190f35b61027d600480360360608110156102c157600080fd5b50600160a060020a0381358116916020810135909116906040013561071a565b6102996107a7565b6102f16107b2565b6040805160ff9092168252519081900360200190f35b6102996004803603604081101561031d57600080fd5b50803590602001356107b7565b610299610802565b61027d610808565b61027d6004803603604081101561035057600080fd5b50600160a060020a038135169060200135610829565b6103926004803603604081101561037c57600080fd5b50600160a060020a03813516906020013561087d565b005b610392600480360360208110156103aa57600080fd5b5035600160a060020a0316610948565b610299600480360360208110156103d057600080fd5b5035600160a060020a0316610a01565b610392600480360360808110156103f657600080fd5b50803590600160a060020a036020820135169060408101359060600135610a1c565b61027d600480360360c081101561042e57600080fd5b81019060208101813564010000000081111561044957600080fd5b82018360208201111561045b57600080fd5b8035906020019184600183028401116401000000008311171561047d57600080fd5b91939092909160208101903564010000000081111561049b57600080fd5b8201836020820111156104ad57600080fd5b803590602001918460018302840111640100000000831117156104cf57600080fd5b91939092600160a060020a0383351692602081013592919060608101906040013564010000000081111561050257600080fd5b82018360208201111561051457600080fd5b8035906020019184600183028401116401000000008311171561053657600080fd5b919350915035600160a060020a0316610ac3565b6101b8610bde565b61027d6004803603604081101561056857600080fd5b50600160a060020a038135169060200135610c3f565b61027d6004803603604081101561059457600080fd5b50600160a060020a038135169060200135610cad565b61027d600480360360208110156105c057600080fd5b5035600160a060020a0316610cc1565b610392600480360360808110156105e657600080fd5b50600160a060020a0381358116916020810135916040820135916060013516610cd5565b6102996004803603604081101561062057600080fd5b50600160a060020a0381358116916020013516610dd7565b610392610e02565b610299610ece565b6101b8610eda565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106dc5780601f106106b1576101008083540402835291602001916106dc565b820191906000526020600020905b8154815290600101906020018083116106bf57829003601f168201915b505050505090505b90565b600854600160a060020a031690565b600061070a610703610f3b565b8484610f3f565b5060015b92915050565b60025490565b6000610727848484611031565b61079d84610733610f3b565b6107988560405180606001604052806028815260200161190b60289139600160a060020a038a16600090815260016020526040812090610771610f3b565b600160a060020a03168152602081019190915260400160002054919063ffffffff61119316565b610f3f565b5060019392505050565b66038d7ea4c6800081565b601290565b6000826107c65750600061070e565b816107d35750600061070e565b6107fb670de0b6b3a76400006107ef858563ffffffff61122d16565b9063ffffffff61128916565b9392505050565b60065490565b60075474010000000000000000000000000000000000000000900460ff1690565b600061070a610836610f3b565b846107988560016000610847610f3b565b600160a060020a03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6112cb16565b600854600160a060020a031633146108c95760405160e560020a62461bcd0281526004018080602001828103825260218152602001806117b46021913960400191505060405180910390fd5b6006546108e4826108d8610714565b9063ffffffff6112cb16565b111561093a576040805160e560020a62461bcd02815260206004820152601f60248201527f44617461546f6b656e54656d706c6174653a2063617020657863656564656400604482015290519081900360640190fd5b6109448282611328565b5050565b600854600160a060020a031633146109945760405160e560020a62461bcd0281526004018080602001828103825260218152602001806117b46021913960400191505060405180910390fd5b6009805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117918290556040805133815292909116602083015280517fa24c529cc8b2d85b7dfb2ed0b4d7e9a816546212138b5d223bee13481e21be6b9281900390910190a150565b600160a060020a031660009081526020819052604090205490565b8115610a6a57610a2c8383610cad565b610a6a5760405160e560020a62461bcd0281526004018080602001828103825260298152602001806117fb6029913960400191505060405180910390fd5b604080518581526020810184905280820183905242606082015290513391600160a060020a038616917f46872661d5d7765097d3a97ca99b7cbfa68b54b6d51904168974901ee607a26d9181900360800190a350505050565b60075460009074010000000000000000000000000000000000000000900460ff1615610b235760405160e560020a62461bcd02815260040180806020018281038252603581526020018061177f6035913960400191505060405180910390fd5b610bd08a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8e018190048102820181019092528c815292508c91508b908190840183828082843760009201919091525050604080516020601f8b018190048102820181019092528981528c93508b9250908a908a90819084018382808284376000920191909152508a925061141b915050565b9a9950505050505050505050565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106dc5780601f106106b1576101008083540402835291602001916106dc565b600061070a610c4c610f3b565b84610798856040518060600160405280602581526020016119ab6025913960016000610c76610f3b565b600160a060020a03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61119316565b600061070a610cba610f3b565b8484611031565b600854600160a060020a0391821691161490565b600080610cef856103e8670de0b6b3a76400005b046107b7565b600754909150610d0890600160a060020a031682610cad565b50600160a060020a03831615610d3b57610d2d856103e8670de0b6b3a7640000610ce9565b9150610d398383610cad565b505b6000610d4d828463ffffffff6112cb16565b600854909150610d7590600160a060020a0316610d70888463ffffffff6115f716565b610cad565b5060408051878152602081018790524281830152606081018590529051600160a060020a03808716923392918b16917fe1c4fa794edfa8f619b8257a077398950357b9c6398528f94480307352f9afcc9181900360800190a450505050505050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b600954600160a060020a03163314610e4e5760405160e560020a62461bcd0281526004018080602001828103825260328152602001806118946032913960400191505060405180910390fd5b60085460095460408051600160a060020a03938416815292909116602083015280517f96ab0400119a548d3cc4c74e857d0d9c427fe9df20d3d0d99af10cc292e6c8869281900390910190a1600980546008805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b670de0b6b3a764000081565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106dc5780601f106106b1576101008083540402835291602001916106dc565b3390565b600160a060020a038316610f875760405160e560020a62461bcd0281526004018080602001828103825260248152602001806119876024913960400191505060405180910390fd5b600160a060020a038216610fcf5760405160e560020a62461bcd02815260040180806020018281038252602281526020018061175d6022913960400191505060405180910390fd5b600160a060020a03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600160a060020a0383166110795760405160e560020a62461bcd0281526004018080602001828103825260258152602001806119626025913960400191505060405180910390fd5b600160a060020a0382166110c15760405160e560020a62461bcd02815260040180806020018281038252602381526020018061173a6023913960400191505060405180910390fd5b611104816040518060600160405280602681526020016117d560269139600160a060020a038616600090815260208190526040902054919063ffffffff61119316565b600160a060020a038085166000908152602081905260408082209390935590841681522054611139908263ffffffff6112cb16565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156112255760405160e560020a62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360005b838110156111ea5781810151838201526020016111d2565b50505050905090810190601f1680156112175780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008261123c5750600061070e565b8282028284828161124957fe5b04146107fb5760405160e560020a62461bcd0281526004018080602001828103825260218152602001806118c66021913960400191505060405180910390fd5b60006107fb83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611639565b6000828201838110156107fb576040805160e560020a62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600160a060020a038216611386576040805160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600254611399908263ffffffff6112cb16565b600255600160a060020a0382166000908152602081905260409020546113c5908263ffffffff6112cb16565b600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6000600160a060020a0385166114655760405160e560020a62461bcd0281526004018080602001828103825260308152602001806118246030913960400191505060405180910390fd5b600854600160a060020a0316156114b05760405160e560020a62461bcd02815260040180806020018281038252602f815260200180611933602f913960400191505060405180910390fd5b600160a060020a0382166114f85760405160e560020a62461bcd0281526004018080602001828103825260408152602001806118546040913960400191505060405180910390fd5b836115375760405160e560020a62461bcd0281526004018080602001828103825260248152602001806118e76024913960400191505060405180910390fd5b6006849055865161154f9060039060208a01906116a1565b5082516115639060059060208601906116a1565b5085516115779060049060208901906116a1565b50506008805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a039687161790915560078054740100000000000000000000000000000000000000009216929095169190911774ff0000000000000000000000000000000000000000191681179384905560ff930492909216949350505050565b60006107fb83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611193565b6000818361168b5760405160e560020a62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156111ea5781810151838201526020016111d2565b50600083858161169757fe5b0495945050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106116e257805160ff191683800117855561170f565b8280016001018555821561170f579182015b8281111561170f5782518255916020019190600101906116f4565b5061171b92915061171f565b5090565b6106e491905b8082111561171b576000815560010161172556fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737344617461546f6b656e54656d706c6174653a20746f6b656e20696e7374616e636520616c726561647920696e697469616c697a656444617461546f6b656e54656d706c6174653a20696e76616c6964206d696e74657245524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636544617461546f6b656e54656d706c6174653a206661696c656420746f2066696e697368206f7264657244617461546f6b656e54656d706c6174653a20496e76616c6964206d696e7465722c20207a65726f206164647265737344617461546f6b656e54656d706c6174653a20496e76616c696420636f6d6d756e6974792066656520636f6c6c6563746f722c207a65726f206164647265737344617461546f6b656e54656d706c6174653a20696e76616c69642070726f706f736564206d696e7465722061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7744617461546f6b656e54656d706c6174653a20496e76616c6964206361702076616c756545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636544617461546f6b656e54656d706c6174653a20496e76616c6964206d696e7465722c207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa165627a7a72305820eba0bc78149b6d1ffe40fbc64e2eba565a7b83a86bb20e444ee47c3f23c66de6002944617461546f6b656e54656d706c6174653a20496e76616c6964206d696e7465722c20207a65726f206164647265737344617461546f6b656e54656d706c6174653a20496e76616c696420636f6d6d756e6974792066656520636f6c6c6563746f722c207a65726f206164647265737344617461546f6b656e54656d706c6174653a20496e76616c6964206361702076616c756544617461546f6b656e54656d706c6174653a20496e76616c6964206d696e7465722c207a65726f2061646472657373", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101ab576000357c01000000000000000000000000000000000000000000000000000000009004806370a08231116100fb578063aa271e1a116100b4578063dd62ed3e1161008e578063dd62ed3e1461060a578063eb40024b14610638578063ec342ad014610640578063fde0e7a814610648576101ab565b8063aa271e1a146105aa578063ab63d2b2146105d0578063b2263a5d146102e1576101ab565b806370a08231146103ba5780638ca0c059146103e05780639070d2f81461041857806395d89b411461054a578063a457c2d714610552578063a9059cbb1461057e576101ab565b8063313ce56711610168578063392e53cd11610142578063392e53cd14610332578063395093511461033a57806340c10f191461036657806350d2fcc414610394576101ab565b8063313ce567146102e957806334e7312214610307578063355274ea1461032a576101ab565b806306fdde03146101b0578063075461721461022d578063095ea7b31461025157806318160ddd1461029157806323b872dd146102ab578063294541c7146102e1575b600080fd5b6101b8610650565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101f25781810151838201526020016101da565b50505050905090810190601f16801561021f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102356106e7565b60408051600160a060020a039092168252519081900360200190f35b61027d6004803603604081101561026757600080fd5b50600160a060020a0381351690602001356106f6565b604080519115158252519081900360200190f35b610299610714565b60408051918252519081900360200190f35b61027d600480360360608110156102c157600080fd5b50600160a060020a0381358116916020810135909116906040013561071a565b6102996107a7565b6102f16107b2565b6040805160ff9092168252519081900360200190f35b6102996004803603604081101561031d57600080fd5b50803590602001356107b7565b610299610802565b61027d610808565b61027d6004803603604081101561035057600080fd5b50600160a060020a038135169060200135610829565b6103926004803603604081101561037c57600080fd5b50600160a060020a03813516906020013561087d565b005b610392600480360360208110156103aa57600080fd5b5035600160a060020a0316610948565b610299600480360360208110156103d057600080fd5b5035600160a060020a0316610a01565b610392600480360360808110156103f657600080fd5b50803590600160a060020a036020820135169060408101359060600135610a1c565b61027d600480360360c081101561042e57600080fd5b81019060208101813564010000000081111561044957600080fd5b82018360208201111561045b57600080fd5b8035906020019184600183028401116401000000008311171561047d57600080fd5b91939092909160208101903564010000000081111561049b57600080fd5b8201836020820111156104ad57600080fd5b803590602001918460018302840111640100000000831117156104cf57600080fd5b91939092600160a060020a0383351692602081013592919060608101906040013564010000000081111561050257600080fd5b82018360208201111561051457600080fd5b8035906020019184600183028401116401000000008311171561053657600080fd5b919350915035600160a060020a0316610ac3565b6101b8610bde565b61027d6004803603604081101561056857600080fd5b50600160a060020a038135169060200135610c3f565b61027d6004803603604081101561059457600080fd5b50600160a060020a038135169060200135610cad565b61027d600480360360208110156105c057600080fd5b5035600160a060020a0316610cc1565b610392600480360360808110156105e657600080fd5b50600160a060020a0381358116916020810135916040820135916060013516610cd5565b6102996004803603604081101561062057600080fd5b50600160a060020a0381358116916020013516610dd7565b610392610e02565b610299610ece565b6101b8610eda565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106dc5780601f106106b1576101008083540402835291602001916106dc565b820191906000526020600020905b8154815290600101906020018083116106bf57829003601f168201915b505050505090505b90565b600854600160a060020a031690565b600061070a610703610f3b565b8484610f3f565b5060015b92915050565b60025490565b6000610727848484611031565b61079d84610733610f3b565b6107988560405180606001604052806028815260200161190b60289139600160a060020a038a16600090815260016020526040812090610771610f3b565b600160a060020a03168152602081019190915260400160002054919063ffffffff61119316565b610f3f565b5060019392505050565b66038d7ea4c6800081565b601290565b6000826107c65750600061070e565b816107d35750600061070e565b6107fb670de0b6b3a76400006107ef858563ffffffff61122d16565b9063ffffffff61128916565b9392505050565b60065490565b60075474010000000000000000000000000000000000000000900460ff1690565b600061070a610836610f3b565b846107988560016000610847610f3b565b600160a060020a03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6112cb16565b600854600160a060020a031633146108c95760405160e560020a62461bcd0281526004018080602001828103825260218152602001806117b46021913960400191505060405180910390fd5b6006546108e4826108d8610714565b9063ffffffff6112cb16565b111561093a576040805160e560020a62461bcd02815260206004820152601f60248201527f44617461546f6b656e54656d706c6174653a2063617020657863656564656400604482015290519081900360640190fd5b6109448282611328565b5050565b600854600160a060020a031633146109945760405160e560020a62461bcd0281526004018080602001828103825260218152602001806117b46021913960400191505060405180910390fd5b6009805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117918290556040805133815292909116602083015280517fa24c529cc8b2d85b7dfb2ed0b4d7e9a816546212138b5d223bee13481e21be6b9281900390910190a150565b600160a060020a031660009081526020819052604090205490565b8115610a6a57610a2c8383610cad565b610a6a5760405160e560020a62461bcd0281526004018080602001828103825260298152602001806117fb6029913960400191505060405180910390fd5b604080518581526020810184905280820183905242606082015290513391600160a060020a038616917f46872661d5d7765097d3a97ca99b7cbfa68b54b6d51904168974901ee607a26d9181900360800190a350505050565b60075460009074010000000000000000000000000000000000000000900460ff1615610b235760405160e560020a62461bcd02815260040180806020018281038252603581526020018061177f6035913960400191505060405180910390fd5b610bd08a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8e018190048102820181019092528c815292508c91508b908190840183828082843760009201919091525050604080516020601f8b018190048102820181019092528981528c93508b9250908a908a90819084018382808284376000920191909152508a925061141b915050565b9a9950505050505050505050565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106dc5780601f106106b1576101008083540402835291602001916106dc565b600061070a610c4c610f3b565b84610798856040518060600160405280602581526020016119ab6025913960016000610c76610f3b565b600160a060020a03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61119316565b600061070a610cba610f3b565b8484611031565b600854600160a060020a0391821691161490565b600080610cef856103e8670de0b6b3a76400005b046107b7565b600754909150610d0890600160a060020a031682610cad565b50600160a060020a03831615610d3b57610d2d856103e8670de0b6b3a7640000610ce9565b9150610d398383610cad565b505b6000610d4d828463ffffffff6112cb16565b600854909150610d7590600160a060020a0316610d70888463ffffffff6115f716565b610cad565b5060408051878152602081018790524281830152606081018590529051600160a060020a03808716923392918b16917fe1c4fa794edfa8f619b8257a077398950357b9c6398528f94480307352f9afcc9181900360800190a450505050505050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b600954600160a060020a03163314610e4e5760405160e560020a62461bcd0281526004018080602001828103825260328152602001806118946032913960400191505060405180910390fd5b60085460095460408051600160a060020a03938416815292909116602083015280517f96ab0400119a548d3cc4c74e857d0d9c427fe9df20d3d0d99af10cc292e6c8869281900390910190a1600980546008805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b670de0b6b3a764000081565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106dc5780601f106106b1576101008083540402835291602001916106dc565b3390565b600160a060020a038316610f875760405160e560020a62461bcd0281526004018080602001828103825260248152602001806119876024913960400191505060405180910390fd5b600160a060020a038216610fcf5760405160e560020a62461bcd02815260040180806020018281038252602281526020018061175d6022913960400191505060405180910390fd5b600160a060020a03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600160a060020a0383166110795760405160e560020a62461bcd0281526004018080602001828103825260258152602001806119626025913960400191505060405180910390fd5b600160a060020a0382166110c15760405160e560020a62461bcd02815260040180806020018281038252602381526020018061173a6023913960400191505060405180910390fd5b611104816040518060600160405280602681526020016117d560269139600160a060020a038616600090815260208190526040902054919063ffffffff61119316565b600160a060020a038085166000908152602081905260408082209390935590841681522054611139908263ffffffff6112cb16565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156112255760405160e560020a62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360005b838110156111ea5781810151838201526020016111d2565b50505050905090810190601f1680156112175780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008261123c5750600061070e565b8282028284828161124957fe5b04146107fb5760405160e560020a62461bcd0281526004018080602001828103825260218152602001806118c66021913960400191505060405180910390fd5b60006107fb83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611639565b6000828201838110156107fb576040805160e560020a62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600160a060020a038216611386576040805160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600254611399908263ffffffff6112cb16565b600255600160a060020a0382166000908152602081905260409020546113c5908263ffffffff6112cb16565b600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6000600160a060020a0385166114655760405160e560020a62461bcd0281526004018080602001828103825260308152602001806118246030913960400191505060405180910390fd5b600854600160a060020a0316156114b05760405160e560020a62461bcd02815260040180806020018281038252602f815260200180611933602f913960400191505060405180910390fd5b600160a060020a0382166114f85760405160e560020a62461bcd0281526004018080602001828103825260408152602001806118546040913960400191505060405180910390fd5b836115375760405160e560020a62461bcd0281526004018080602001828103825260248152602001806118e76024913960400191505060405180910390fd5b6006849055865161154f9060039060208a01906116a1565b5082516115639060059060208601906116a1565b5085516115779060049060208901906116a1565b50506008805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a039687161790915560078054740100000000000000000000000000000000000000009216929095169190911774ff0000000000000000000000000000000000000000191681179384905560ff930492909216949350505050565b60006107fb83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611193565b6000818361168b5760405160e560020a62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156111ea5781810151838201526020016111d2565b50600083858161169757fe5b0495945050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106116e257805160ff191683800117855561170f565b8280016001018555821561170f579182015b8281111561170f5782518255916020019190600101906116f4565b5061171b92915061171f565b5090565b6106e491905b8082111561171b576000815560010161172556fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737344617461546f6b656e54656d706c6174653a20746f6b656e20696e7374616e636520616c726561647920696e697469616c697a656444617461546f6b656e54656d706c6174653a20696e76616c6964206d696e74657245524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636544617461546f6b656e54656d706c6174653a206661696c656420746f2066696e697368206f7264657244617461546f6b656e54656d706c6174653a20496e76616c6964206d696e7465722c20207a65726f206164647265737344617461546f6b656e54656d706c6174653a20496e76616c696420636f6d6d756e6974792066656520636f6c6c6563746f722c207a65726f206164647265737344617461546f6b656e54656d706c6174653a20696e76616c69642070726f706f736564206d696e7465722061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7744617461546f6b656e54656d706c6174653a20496e76616c6964206361702076616c756545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636544617461546f6b656e54656d706c6174653a20496e76616c6964206d696e7465722c207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa165627a7a72305820eba0bc78149b6d1ffe40fbc64e2eba565a7b83a86bb20e444ee47c3f23c66de60029", "sourceMap": "488:11040:12:-;;;775:35;;;-1:-1:-1;;;;;;775:35:12;;;2543:369;5:2:-1;;;;30:1;27;20:12;5:2;2543:369:12;;;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;2543:369:12;;;;;;19:11:-1;14:3;11:20;8:2;;;44:1;41;34:12;8:2;62:21;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;261:11;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;0:372;;2543:369:12;;;;;;;19:11:-1;14:3;11:20;8:2;;;44:1;41;34:12;8:2;62:21;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;261:11;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;-1:-1;;2543:369:12;;;;;;;;;;;;;;;;;;;;19:11:-1;11:20;;8:2;;;44:1;41;34:12;8:2;62:21;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;261:11;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;-1:-1;;2543:369:12;;;;;;;-1:-1:-1;2543:369:12;-1:-1:-1;2758:147:12;2783:4;2801:6;2821:13;2848:3;2543:369;;2758:11;;;;:147;:::i;:::-;;2543:369;;;;;;488:11040;;4397:980;4624:4;-1:-1:-1;;;;;4665:27:12;;4644:123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4799:7;;-1:-1:-1;;;;;4799:7:12;:21;4778:116;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4926:26:12;;4905:137;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5074:8;5053:91;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5154:4;:10;;;5174:12;;;;:5;;:12;;;;;:::i;:::-;-1:-1:-1;5196:12:12;;;;:5;;:12;;;;;:::i;:::-;-1:-1:-1;5218:16:12;;;;:7;;:16;;;;;:::i;:::-;-1:-1:-1;;5244:7:12;:23;;-1:-1:-1;;;;;;5244:23:12;;;-1:-1:-1;;;;;5244:23:12;;;;;;;5277:22;:37;;5324:18;5277:37;;;;;;;;;;-1:-1:-1;;;;;;5324:18:12;;;;;;;;5359:11;;;;;;;4397:980;-1:-1:-1;;;;4397:980:12:o;488:11040::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;488:11040:12;;;-1:-1:-1;488:11040:12;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", "deployedSourceMap": "488:11040:12:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;488:11040:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9339:82;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;9339:82:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10651:109;;;:::i;:::-;;;;-1:-1:-1;;;;;10651:109:12;;;;;;;;;;;;;;2500:149:17;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2500:149:17;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;1559:89;;;:::i;:::-;;;;;;;;;;;;;;;;3107:300;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3107:300:17;;;;;;;;;;;;;;;;;:::i;998:64:12:-;;;:::i;9996:82::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;11252:274;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;11252:274:12;;;;;;;:::i;10182:75::-;;;:::i;10920:88::-;;;:::i;3802:207:17:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3802:207:17;;;;;;;;:::i;5694:271:12:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;5694:271:12;;;;;;;;:::i;:::-;;8509:221;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8509:221:12;-1:-1:-1;;;;;8509:221:12;;:::i;1706:108:17:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1706:108:17;-1:-1:-1;;;;;1706:108:17;;:::i;7784:514:12:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;7784:514:12;;;-1:-1:-1;;;;;7784:514:12;;;;;;;;;;;;;;;:::i;3489:442::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;3489:442:12;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;3489:442:12;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;3489:442:12;;;;;;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;3489:442:12;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;3489:442:12;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;3489:442:12;;;;;;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;3489:442:12;;;;-1:-1:-1;;;;;3489:442:12;;;;;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;3489:442:12;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;3489:442:12;;;;;;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;3489:442:12;;-1:-1:-1;3489:442:12;-1:-1:-1;3489:442:12;-1:-1:-1;;;;;3489:442:12;;:::i;9536:86::-;;;:::i;4496:258:17:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;4496:258:17;;;;;;;;:::i;2017:155::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2017:155:17;;;;;;;;:::i;10469:107:12:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10469:107:12;-1:-1:-1;;;;;10469:107:12;;:::i;6374:911::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;6374:911:12;;;;;;;;;;;;;;;;;;;;:::i;2230:132:17:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2230:132:17;;;;;;;;;;:::i;8879:351:12:-;;;:::i;882:37::-;;;:::i;9747:82::-;;;:::i;9339:::-;9409:5;9402:12;;;;;;;;-1:-1:-1;;9402:12:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9377:13;;9402:12;;9409:5;;9402:12;;9409:5;9402:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9339:82;;:::o;10651:109::-;10746:7;;-1:-1:-1;;;;;10746:7:12;10651:109;:::o;2500:149:17:-;2566:4;2582:39;2591:12;:10;:12::i;:::-;2605:7;2614:6;2582:8;:39::i;:::-;-1:-1:-1;2638:4:17;2500:149;;;;;:::o;1559:89::-;1629:12;;1559:89;:::o;3107:300::-;3196:4;3212:36;3222:6;3230:9;3241:6;3212:9;:36::i;:::-;3258:121;3267:6;3275:12;:10;:12::i;:::-;3289:89;3327:6;3289:89;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3289:19:17;;;;;;:11;:19;;;;;;3309:12;:10;:12::i;:::-;-1:-1:-1;;;;;3289:33:17;;;;;;;;;;;;-1:-1:-1;3289:33:17;;;:89;;:37;:89;:::i;:::-;3258:8;:121::i;:::-;-1:-1:-1;3396:4:17;3107:300;;;;;:::o;998:64:12:-;1051:11;998:64;:::o;9996:82::-;723:2;9996:82;:::o;11252:274::-;11379:7;11405:11;11402:24;;-1:-1:-1;11425:1:12;11418:8;;11402:24;11439:18;11436:31;;-1:-1:-1;11466:1:12;11459:8;;11436:31;11484:35;913:6;11484:25;:6;11495:13;11484:25;:10;:25;:::i;:::-;:29;:35;:29;:35;:::i;:::-;11477:42;11252:274;-1:-1:-1;;;11252:274:12:o;10182:75::-;10246:4;;10182:75;:::o;10920:88::-;10990:11;;;;;;;;10920:88::o;3802:207:17:-;3882:4;3898:83;3907:12;:10;:12::i;:::-;3921:7;3930:50;3969:10;3930:11;:25;3942:12;:10;:12::i;:::-;-1:-1:-1;;;;;3930:25:17;;;;;;;;;;;;;;;;;-1:-1:-1;3930:25:17;;;:34;;;;;;;;;;;:50;:38;:50;:::i;5694:271:12:-;2003:7;;-1:-1:-1;;;;;2003:7:12;1989:10;:21;1968:102;;;;-1:-1:-1;;;;;1968:102:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5865:4;;5837:24;5855:5;5837:13;:11;:13::i;:::-;:17;:24;:17;:24;:::i;:::-;:32;;5816:111;;;;;-1:-1:-1;;;;;5816:111:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;5937:21;5943:7;5952:5;5937;:21::i;:::-;5694:271;;:::o;8509:221::-;2003:7;;-1:-1:-1;;;;;2003:7:12;1989:10;:21;1968:102;;;;-1:-1:-1;;;;;1968:102:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8604:15;:27;;-1:-1:-1;;8604:27:12;-1:-1:-1;;;;;8604:27:12;;;;;;;;;;;8646:77;;;8674:10;8646:77;;8698:15;;;;8646:77;;;;;;;;;;;;;;;;8509:221;:::o;1706:108:17:-;-1:-1:-1;;;;;1789:18:17;1763:7;1789:18;;;;;;;;;;;;1706:108::o;7784:514:12:-;7953:11;;7948:159;;8006:26;8015:8;8025:6;8006:8;:26::i;:::-;7981:126;;;;-1:-1:-1;;;;;7981:126:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8123:168;;;;;;;;;;;;;;;;;;8266:15;8123:168;;;;;;8242:10;;-1:-1:-1;;;;;8123:168:12;;;;;;;;;;;;7784:514;;;;:::o;3489:442::-;1818:11;;3750:4;;1818:11;;;;;1817:12;1796:112;;;;-1:-1:-1;;;;;1796:112:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3777:147;3802:4;;3777:147;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;;3777:147:12;;;;137:4:-1;3777:147:12;;;;;;;;;;;;;;;;;;-1:-1:-1;3820:6:12;;-1:-1:-1;3820:6:12;;;;3777:147;;3820:6;;;;3777:147;1:33:-1;99:1;81:16;;74:27;;;;-1:-1;;3777:147:12;;;;137:4:-1;3777:147:12;;;;;;;;;;;;;;;;;3840:13;;-1:-1:-1;3867:3:12;;-1:-1:-1;3777:147:12;3884:4;;;;;;3777:147;;3884:4;;;;3777:147;1:33:-1;99:1;81:16;;74:27;;;;-1:-1;3902:12:12;;-1:-1:-1;3777:11:12;;-1:-1:-1;;3777:147:12:i;:::-;3770:154;3489:442;-1:-1:-1;;;;;;;;;;3489:442:12:o;9536:86::-;9608:7;9601:14;;;;;;;;-1:-1:-1;;9601:14:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9576:13;;9601:14;;9608:7;;9601:14;;9608:7;9601:14;;;;;;;;;;;;;;;;;;;;;;;;4496:258:17;4581:4;4597:129;4606:12;:10;:12::i;:::-;4620:7;4629:96;4668:15;4629:96;;;;;;;;;;;;;;;;;:11;:25;4641:12;:10;:12::i;:::-;-1:-1:-1;;;;;4629:25:17;;;;;;;;;;;;;;;;;-1:-1:-1;4629:25:17;;;:34;;;;;;;;;;;:96;;:38;:96;:::i;2017:155::-;2086:4;2102:42;2112:12;:10;:12::i;:::-;2126:9;2137:6;2102:9;:42::i;10469:107:12:-;10550:7;;-1:-1:-1;;;;;10550:18:12;;;:7;;:18;;10469:107::o;6374:911::-;6542:17;;6596:86;6622:6;988:4;913:6;981:11;;6596:12;:86::i;:::-;6701:22;;6573:109;;-1:-1:-1;6692:46:12;;-1:-1:-1;;;;;6701:22:12;6573:109;6692:8;:46::i;:::-;-1:-1:-1;;;;;;6751:30:12;;;6748:217;;6808:95;6838:6;1058:4;913:6;1051:11;;6808:95;6796:107;;6917:37;6926:16;6944:9;6917:8;:37::i;:::-;;6748:217;6974:16;6993:27;:12;7010:9;6993:27;:16;:27;:::i;:::-;7039:7;;6974:46;;-1:-1:-1;7030:39:12;;-1:-1:-1;;;;;7039:7:12;7048:20;:6;6974:46;7048:20;:10;:20;:::i;:::-;7030:8;:39::i;:::-;-1:-1:-1;7085:193:12;;;;;;;;;;;;7200:15;7085:193;;;;;;;;;;;;-1:-1:-1;;;;;7085:193:12;;;;7133:10;;7085:193;;;;;;;;;;;;;6374:911;;;;;;;:::o;2230:132:17:-;-1:-1:-1;;;;;2328:18:17;;;2302:7;2328:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;2230:132::o;8879:351:12:-;8970:15;;-1:-1:-1;;;;;8970:15:12;8956:10;:29;8935:126;;;;-1:-1:-1;;;;;8935:126:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9104:7;;9125:15;;9076:74;;;-1:-1:-1;;;;;9104:7:12;;;9076:74;;9125:15;;;;9076:74;;;;;;;;;;;;;;;;9170:15;;;9160:7;:25;;-1:-1:-1;;9160:25:12;;;-1:-1:-1;;;;;9170:15:12;;9160:25;;;;9195:28;;;8879:351::o;882:37::-;913:6;882:37;:::o;9747:82::-;9817:5;9810:12;;;;;;;;-1:-1:-1;;9810:12:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9785:13;;9810:12;;9817:5;;9810:12;;9817:5;9810:12;;;;;;;;;;;;;;;;;;;;;;;;788:96:14;867:10;788:96;:::o;7350:332:17:-;-1:-1:-1;;;;;7443:19:17;;7435:68;;;;-1:-1:-1;;;;;7435:68:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7521:21:17;;7513:68;;;;-1:-1:-1;;;;;7513:68:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7592:18:17;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;7643:32;;;;;;;;;;;;;;;;;7350:332;;;:::o;5228:464::-;-1:-1:-1;;;;;5325:20:17;;5317:70;;;;-1:-1:-1;;;;;5317:70:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5405:23:17;;5397:71;;;;-1:-1:-1;;;;;5397:71:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5499;5521:6;5499:71;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5499:17:17;;:9;:17;;;;;;;;;;;;:71;;:21;:71;:::i;:::-;-1:-1:-1;;;;;5479:17:17;;;:9;:17;;;;;;;;;;;:91;;;;5603:20;;;;;;;:32;;5628:6;5603:32;:24;:32;:::i;:::-;-1:-1:-1;;;;;5580:20:17;;;:9;:20;;;;;;;;;;;;:55;;;;5650:35;;;;;;;5580:20;;5650:35;;;;;;;;;;;;;5228:464;;;:::o;1732:187:15:-;1818:7;1853:12;1845:6;;;;1837:29;;;;-1:-1:-1;;;;;1837:29:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;1837:29:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1888:5:15;;;1732:187::o;2159:459::-;2217:7;2458:6;2454:45;;-1:-1:-1;2487:1:15;2480:8;;2454:45;2521:5;;;2525:1;2521;:5;:1;2544:5;;;;;:10;2536:56;;;;-1:-1:-1;;;;;2536:56:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3073:130;3131:7;3157:39;3161:1;3164;3157:39;;;;;;;;;;;;;;;;;:3;:39::i;834:176::-;892:7;923:5;;;946:6;;;;938:46;;;;;-1:-1:-1;;;;;938:46:15;;;;;;;;;;;;;;;;;;;;;;;;;;;5962:302:17;-1:-1:-1;;;;;6037:21:17;;6029:65;;;;;-1:-1:-1;;;;;6029:65:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;6120:12;;:24;;6137:6;6120:24;:16;:24;:::i;:::-;6105:12;:39;-1:-1:-1;;;;;6175:18:17;;:9;:18;;;;;;;;;;;:30;;6198:6;6175:30;:22;:30;:::i;:::-;-1:-1:-1;;;;;6154:18:17;;:9;:18;;;;;;;;;;;:51;;;;6220:37;;;;;;;6154:18;;:9;;6220:37;;;;;;;;;;5962:302;;:::o;4397:980:12:-;4624:4;-1:-1:-1;;;;;4665:27:12;;4644:123;;;;-1:-1:-1;;;;;4644:123:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4799:7;;-1:-1:-1;;;;;4799:7:12;:21;4778:116;;;;-1:-1:-1;;;;;4778:116:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4926:26:12;;4905:137;;;;-1:-1:-1;;;;;4905:137:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5074:8;5053:91;;;;-1:-1:-1;;;;;5053:91:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5154:4;:10;;;5174:12;;;;:5;;:12;;;;;:::i;:::-;-1:-1:-1;5196:12:12;;;;:5;;:12;;;;;:::i;:::-;-1:-1:-1;5218:16:12;;;;:7;;:16;;;;;:::i;:::-;-1:-1:-1;;5244:7:12;:23;;-1:-1:-1;;5244:23:12;;;-1:-1:-1;;;;;5244:23:12;;;;;;;5277:22;:37;;5324:18;5277:37;;;;;;;;;;-1:-1:-1;;5324:18:12;;;;;;;;5359:11;;;;;;;4397:980;-1:-1:-1;;;;4397:980:12:o;1274:134:15:-;1332:7;1358:43;1362:1;1365;1358:43;;;;;;;;;;;;;;;;;:3;:43::i;3718:338::-;3804:7;3904:12;3897:5;3889:28;;;;-1:-1:-1;;;;;3889:28:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;3889:28:15;;3927:9;3943:1;3939;:5;;;;;;;3718:338;-1:-1:-1;;;;;3718:338:15:o;488:11040:12:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;488:11040:12;;;-1:-1:-1;488:11040:12;:::i;:::-;;;:::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 '../interfaces/IERC20Template.sol';\nimport 'openzeppelin-solidity/contracts/token/ERC20/ERC20.sol';\n\n\n/**\n* @title DataTokenTemplate\n* \n* @dev DataTokenTemplate is an ERC20 compliant token template\n* Used by the factory contract as a bytecode reference to \n* deploy new DataTokens.\n*/\ncontract DataTokenTemplate is IERC20Template, ERC20 {\n using SafeMath for uint256;\n\n string private _name;\n string private _symbol;\n string private _blob;\n uint256 private _cap;\n uint8 private constant _decimals = 18;\n address private _communityFeeCollector;\n bool private initialized = false;\n address private _minter;\n address private _proposedMinter;\n uint256 public constant BASE = 10**18;\n uint256 public constant BASE_COMMUNITY_FEE_PERCENTAGE = BASE / 1000;\n uint256 public constant BASE_MARKET_FEE_PERCENTAGE = BASE / 1000;\n\n event OrderStarted(\n address indexed consumer,\n address indexed payer,\n uint256 amount, \n uint256 serviceId, \n uint256 timestamp,\n address indexed mrktFeeCollector,\n uint256 marketFee\n );\n\n event OrderFinished(\n bytes32 orderTxId, \n address indexed consumer,\n uint256 amount, \n uint256 serviceId, \n address indexed provider,\n uint256 timestamp\n );\n\n event MinterProposed(\n address currentMinter,\n address newMinter\n );\n\n event MinterApproved(\n address currentMinter,\n address newMinter\n );\n\n modifier onlyNotInitialized() {\n require(\n !initialized,\n 'DataTokenTemplate: token instance already initialized'\n );\n _;\n }\n \n modifier onlyMinter() {\n require(\n msg.sender == _minter,\n 'DataTokenTemplate: invalid minter' \n );\n _;\n }\n\n /**\n * @dev constructor\n * Called prior contract deployment\n * @param name refers to a template DataToken name\n * @param symbol refers to a template DataToken symbol\n * @param minterAddress refers to an address that has minter role\n * @param cap the total ERC20 cap\n * @param blob data string refering to the resolver for the metadata\n * @param feeCollector it is the community fee collector address\n */\n constructor(\n string memory name,\n string memory symbol,\n address minterAddress,\n uint256 cap,\n string memory blob,\n address feeCollector\n )\n public\n {\n _initialize(\n name,\n symbol,\n minterAddress,\n cap,\n blob,\n feeCollector\n );\n }\n \n /**\n * @dev initialize\n * Called prior contract initialization (e.g creating new DataToken instance)\n * Calls private _initialize function. Only if contract is not initialized.\n * @param name refers to a new DataToken name\n * @param symbol refers to a nea DataToken symbol\n * @param minterAddress refers to an address that has minter rights\n * @param cap the total ERC20 cap\n * @param blob data string refering to the resolver for the metadata\n * @param feeCollector it is the community fee collector address\n */\n function initialize(\n string calldata name,\n string calldata symbol,\n address minterAddress,\n uint256 cap,\n string calldata blob,\n address feeCollector\n ) \n external\n onlyNotInitialized\n returns(bool)\n {\n return _initialize(\n name,\n symbol,\n minterAddress,\n cap,\n blob,\n feeCollector\n );\n }\n\n /**\n * @dev _initialize\n * Private function called on contract initialization.\n * @param name refers to a new DataToken name\n * @param symbol refers to a nea DataToken symbol\n * @param minterAddress refers to an address that has minter rights\n * @param cap the total ERC20 cap\n * @param blob data string refering to the resolver for the metadata\n * @param feeCollector it is the community fee collector address\n */\n function _initialize(\n string memory name,\n string memory symbol,\n address minterAddress,\n uint256 cap,\n string memory blob,\n address feeCollector\n )\n private\n returns(bool)\n {\n require(\n minterAddress != address(0), \n 'DataTokenTemplate: Invalid minter, zero address'\n );\n\n require(\n _minter == address(0), \n 'DataTokenTemplate: Invalid minter, zero address'\n );\n\n require(\n feeCollector != address(0),\n 'DataTokenTemplate: Invalid community fee collector, zero address'\n );\n\n require(\n cap != 0,\n 'DataTokenTemplate: Invalid cap value'\n );\n _cap = cap;\n _name = name;\n _blob = blob;\n _symbol = symbol;\n _minter = minterAddress;\n _communityFeeCollector = feeCollector;\n initialized = true;\n return initialized;\n }\n\n /**\n * @dev mint\n * Only the minter address can call it.\n * msg.value should be higher than zero and gt or eq minting fee\n * @param account refers to an address that token is going to be minted to.\n * @param value refers to amount of tokens that is going to be minted.\n */\n function mint(\n address account,\n uint256 value\n ) \n external \n onlyMinter \n {\n require(\n totalSupply().add(value) <= _cap, \n 'DataTokenTemplate: cap exceeded'\n );\n _mint(account, value);\n }\n\n /**\n * @dev startOrder\n * called by payer or consumer prior ordering a service consume on a marketplace.\n * @param consumer is the consumer address (payer could be different address)\n * @param amount refers to amount of tokens that is going to be transfered.\n * @param serviceId service index in the metadata\n * @param mrktFeeCollector marketplace fee collector\n */\n function startOrder(\n address consumer,\n uint256 amount,\n uint256 serviceId,\n address mrktFeeCollector\n )\n external\n {\n uint256 marketFee = 0;\n uint256 communityFee = calculateFee(\n amount, \n BASE_COMMUNITY_FEE_PERCENTAGE\n );\n transfer(_communityFeeCollector, communityFee);\n if(mrktFeeCollector != address(0)){\n marketFee = calculateFee(\n amount, \n BASE_MARKET_FEE_PERCENTAGE\n );\n transfer(mrktFeeCollector, marketFee);\n }\n uint256 totalFee = communityFee.add(marketFee);\n transfer(_minter, amount.sub(totalFee));\n\n emit OrderStarted(\n consumer,\n msg.sender,\n amount,\n serviceId,\n block.timestamp,\n mrktFeeCollector,\n marketFee\n );\n }\n\n /**\n * @dev finishOrder\n * called by provider prior completing service delivery only\n * if there is a partial or full refund.\n * @param orderTxId refers to the transaction Id of startOrder acts \n * as a payment reference.\n * @param consumer refers to an address that has consumed that service.\n * @param amount refers to amount of tokens that is going to be transfered.\n * @param serviceId service index in the metadata.\n */\n function finishOrder(\n bytes32 orderTxId, \n address consumer, \n uint256 amount,\n uint256 serviceId\n )\n external\n {\n if ( amount != 0 ) \n require(\n transfer(consumer, amount),\n 'DataTokenTemplate: failed to finish order'\n );\n\n emit OrderFinished(\n orderTxId, \n consumer, \n amount, \n serviceId, \n msg.sender,\n block.timestamp\n );\n }\n\n /**\n * @dev proposeMinter\n * It proposes a new token minter address.\n * Only the current minter can call it.\n * @param newMinter refers to a new token minter address.\n */\n function proposeMinter(address newMinter) \n external \n onlyMinter \n {\n _proposedMinter = newMinter;\n emit MinterProposed(\n msg.sender,\n _proposedMinter\n );\n }\n\n /**\n * @dev approveMinter\n * It approves a new token minter address.\n * Only the current minter can call it.\n */\n function approveMinter()\n external\n {\n require(\n msg.sender == _proposedMinter,\n 'DataTokenTemplate: invalid proposed minter address'\n );\n emit MinterApproved(\n _minter,\n _proposedMinter\n );\n _minter = _proposedMinter;\n _proposedMinter = address(0);\n }\n\n /**\n * @dev name\n * It returns the token name.\n * @return DataToken name.\n */\n function name() external view returns(string memory) {\n return _name;\n }\n\n /**\n * @dev symbol\n * It returns the token symbol.\n * @return DataToken symbol.\n */\n function symbol() external view returns(string memory) {\n return _symbol;\n }\n\n /**\n * @dev blob\n * It returns the blob (e.g https://123.com).\n * @return DataToken blob.\n */\n function blob() external view returns(string memory) {\n return _blob;\n }\n\n /**\n * @dev decimals\n * It returns the token decimals.\n * how many supported decimal points\n * @return DataToken decimals.\n */\n function decimals() external view returns(uint8) {\n return _decimals;\n }\n\n /**\n * @dev cap\n * it returns the capital.\n * @return DataToken cap.\n */\n function cap() external view returns (uint256) {\n return _cap;\n }\n\n /**\n * @dev isMinter\n * It takes the address and checks whether it has a minter role.\n * @param account refers to the address.\n * @return true if account has a minter role.\n */\n function isMinter(address account) external view returns(bool) {\n return (_minter == account);\n } \n\n /**\n * @dev minter\n * @return minter's address.\n */\n function minter()\n external\n view \n returns(address)\n {\n return _minter;\n }\n\n /**\n * @dev isInitialized\n * It checks whether the contract is initialized.\n * @return true if the contract is initialized.\n */ \n function isInitialized() external view returns(bool) {\n return initialized;\n }\n\n /**\n * @dev calculateFee\n * giving a fee percentage, and amount it calculates the actual fee\n * @param amount the amount of token\n * @param feePercentage the fee percentage \n * @return the token fee.\n */ \n function calculateFee(\n uint256 amount,\n uint256 feePercentage\n )\n public\n pure\n returns(uint256)\n {\n if(amount == 0) return 0;\n if(feePercentage == 0) return 0;\n return amount.mul(feePercentage).div(BASE);\n }\n}\n", "sourcePath": "/home/travis/build/oceanprotocol/ocean-contracts/contracts/templates/DataTokenTemplate.sol", "ast": { "absolutePath": "/home/travis/build/oceanprotocol/ocean-contracts/contracts/templates/DataTokenTemplate.sol", "exportedSymbols": { "DataTokenTemplate": [ 5703 ] }, "id": 5704, "nodeType": "SourceUnit", "nodes": [ { "id": 5179, "literals": [ "solidity", "0.5", ".7" ], "nodeType": "PragmaDirective", "src": "0:22:12" }, { "absolutePath": "/home/travis/build/oceanprotocol/ocean-contracts/contracts/interfaces/IERC20Template.sol", "file": "../interfaces/IERC20Template.sol", "id": 5180, "nodeType": "ImportDirective", "scope": 5704, "sourceUnit": 5090, "src": "185:42:12", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", "id": 5181, "nodeType": "ImportDirective", "scope": 5704, "sourceUnit": 6469, "src": "228:63:12", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 5182, "name": "IERC20Template", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 5089, "src": "518:14:12", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20Template_$5089", "typeString": "contract IERC20Template" } }, "id": 5183, "nodeType": "InheritanceSpecifier", "src": "518:14:12" }, { "arguments": null, "baseName": { "contractScope": null, "id": 5184, "name": "ERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 6468, "src": "534:5:12", "typeDescriptions": { "typeIdentifier": "t_contract$_ERC20_$6468", "typeString": "contract ERC20" } }, "id": 5185, "nodeType": "InheritanceSpecifier", "src": "534:5:12" } ], "contractDependencies": [ 5089, 5758, 6468, 6537 ], "contractKind": "contract", "documentation": "@title DataTokenTemplate\n \n@dev DataTokenTemplate is an ERC20 compliant token template\n Used by the factory contract as a bytecode reference to \n deploy new DataTokens.", "fullyImplemented": true, "id": 5703, "linearizedBaseContracts": [ 5703, 6468, 6537, 5758, 5089 ], "name": "DataTokenTemplate", "nodeType": "ContractDefinition", "nodes": [ { "id": 5188, "libraryName": { "contractScope": null, "id": 5186, "name": "SafeMath", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 5945, "src": "552:8:12", "typeDescriptions": { "typeIdentifier": "t_contract$_SafeMath_$5945", "typeString": "library SafeMath" } }, "nodeType": "UsingForDirective", "src": "546:27:12", "typeName": { "id": 5187, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "565:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, { "constant": false, "id": 5190, "name": "_name", "nodeType": "VariableDeclaration", "scope": 5703, "src": "579:21:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string" }, "typeName": { "id": 5189, "name": "string", "nodeType": "ElementaryTypeName", "src": "579:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "private" }, { "constant": false, "id": 5192, "name": "_symbol", "nodeType": "VariableDeclaration", "scope": 5703, "src": "606:23:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string" }, "typeName": { "id": 5191, "name": "string", "nodeType": "ElementaryTypeName", "src": "606:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "private" }, { "constant": false, "id": 5194, "name": "_blob", "nodeType": "VariableDeclaration", "scope": 5703, "src": "635:21:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string" }, "typeName": { "id": 5193, "name": "string", "nodeType": "ElementaryTypeName", "src": "635:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "private" }, { "constant": false, "id": 5196, "name": "_cap", "nodeType": "VariableDeclaration", "scope": 5703, "src": "662:20:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5195, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "662:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "private" }, { "constant": true, "id": 5199, "name": "_decimals", "nodeType": "VariableDeclaration", "scope": 5703, "src": "688:37:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 5197, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "688:5:12", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": { "argumentTypes": null, "hexValue": "3138", "id": 5198, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "723:2:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_18_by_1", "typeString": "int_const 18" }, "value": "18" }, "visibility": "private" }, { "constant": false, "id": 5201, "name": "_communityFeeCollector", "nodeType": "VariableDeclaration", "scope": 5703, "src": "731:38:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5200, "name": "address", "nodeType": "ElementaryTypeName", "src": "731:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "private" }, { "constant": false, "id": 5204, "name": "initialized", "nodeType": "VariableDeclaration", "scope": 5703, "src": "775:35:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 5202, "name": "bool", "nodeType": "ElementaryTypeName", "src": "775:4:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": { "argumentTypes": null, "hexValue": "66616c7365", "id": 5203, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "805:5:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "visibility": "private" }, { "constant": false, "id": 5206, "name": "_minter", "nodeType": "VariableDeclaration", "scope": 5703, "src": "816:23:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5205, "name": "address", "nodeType": "ElementaryTypeName", "src": "816:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "private" }, { "constant": false, "id": 5208, "name": "_proposedMinter", "nodeType": "VariableDeclaration", "scope": 5703, "src": "845:31:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5207, "name": "address", "nodeType": "ElementaryTypeName", "src": "845:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "private" }, { "constant": true, "id": 5213, "name": "BASE", "nodeType": "VariableDeclaration", "scope": 5703, "src": "882:37:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5209, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "882:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_rational_1000000000000000000_by_1", "typeString": "int_const 1000000000000000000" }, "id": 5212, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "hexValue": "3130", "id": 5210, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "913:2:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_10_by_1", "typeString": "int_const 10" }, "value": "10" }, "nodeType": "BinaryOperation", "operator": "**", "rightExpression": { "argumentTypes": null, "hexValue": "3138", "id": 5211, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "917:2:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_18_by_1", "typeString": "int_const 18" }, "value": "18" }, "src": "913:6:12", "typeDescriptions": { "typeIdentifier": "t_rational_1000000000000000000_by_1", "typeString": "int_const 1000000000000000000" } }, "visibility": "public" }, { "constant": true, "id": 5218, "name": "BASE_COMMUNITY_FEE_PERCENTAGE", "nodeType": "VariableDeclaration", "scope": 5703, "src": "925:67:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5214, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "925:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5217, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5215, "name": "BASE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5213, "src": "981:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { "argumentTypes": null, "hexValue": "31303030", "id": 5216, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "988:4:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1000_by_1", "typeString": "int_const 1000" }, "value": "1000" }, "src": "981:11:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "public" }, { "constant": true, "id": 5223, "name": "BASE_MARKET_FEE_PERCENTAGE", "nodeType": "VariableDeclaration", "scope": 5703, "src": "998:64:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5219, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "998:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5222, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5220, "name": "BASE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5213, "src": "1051:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { "argumentTypes": null, "hexValue": "31303030", "id": 5221, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1058:4:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1000_by_1", "typeString": "int_const 1000" }, "value": "1000" }, "src": "1051:11:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "public" }, { "anonymous": false, "documentation": null, "id": 5239, "name": "OrderStarted", "nodeType": "EventDefinition", "parameters": { "id": 5238, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5225, "indexed": true, "name": "consumer", "nodeType": "VariableDeclaration", "scope": 5239, "src": "1101:24:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5224, "name": "address", "nodeType": "ElementaryTypeName", "src": "1101:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5227, "indexed": true, "name": "payer", "nodeType": "VariableDeclaration", "scope": 5239, "src": "1139:21:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5226, "name": "address", "nodeType": "ElementaryTypeName", "src": "1139:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5229, "indexed": false, "name": "amount", "nodeType": "VariableDeclaration", "scope": 5239, "src": "1174:14:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5228, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1174:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5231, "indexed": false, "name": "serviceId", "nodeType": "VariableDeclaration", "scope": 5239, "src": "1203:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5230, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1203:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5233, "indexed": false, "name": "timestamp", "nodeType": "VariableDeclaration", "scope": 5239, "src": "1235:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5232, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1235:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5235, "indexed": true, "name": "mrktFeeCollector", "nodeType": "VariableDeclaration", "scope": 5239, "src": "1266:32:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5234, "name": "address", "nodeType": "ElementaryTypeName", "src": "1266:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5237, "indexed": false, "name": "marketFee", "nodeType": "VariableDeclaration", "scope": 5239, "src": "1312:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5236, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1312:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1087:248:12" }, "src": "1069:267:12" }, { "anonymous": false, "documentation": null, "id": 5253, "name": "OrderFinished", "nodeType": "EventDefinition", "parameters": { "id": 5252, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5241, "indexed": false, "name": "orderTxId", "nodeType": "VariableDeclaration", "scope": 5253, "src": "1375:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 5240, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1375:7:12", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5243, "indexed": true, "name": "consumer", "nodeType": "VariableDeclaration", "scope": 5253, "src": "1407:24:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5242, "name": "address", "nodeType": "ElementaryTypeName", "src": "1407:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5245, "indexed": false, "name": "amount", "nodeType": "VariableDeclaration", "scope": 5253, "src": "1445:14:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5244, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1445:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5247, "indexed": false, "name": "serviceId", "nodeType": "VariableDeclaration", "scope": 5253, "src": "1474:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5246, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1474:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5249, "indexed": true, "name": "provider", "nodeType": "VariableDeclaration", "scope": 5253, "src": "1506:24:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5248, "name": "address", "nodeType": "ElementaryTypeName", "src": "1506:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5251, "indexed": false, "name": "timestamp", "nodeType": "VariableDeclaration", "scope": 5253, "src": "1544:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5250, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1544:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1361:206:12" }, "src": "1342:226:12" }, { "anonymous": false, "documentation": null, "id": 5259, "name": "MinterProposed", "nodeType": "EventDefinition", "parameters": { "id": 5258, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5255, "indexed": false, "name": "currentMinter", "nodeType": "VariableDeclaration", "scope": 5259, "src": "1604:21:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5254, "name": "address", "nodeType": "ElementaryTypeName", "src": "1604:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5257, "indexed": false, "name": "newMinter", "nodeType": "VariableDeclaration", "scope": 5259, "src": "1635:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5256, "name": "address", "nodeType": "ElementaryTypeName", "src": "1635:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1594:64:12" }, "src": "1574:85:12" }, { "anonymous": false, "documentation": null, "id": 5265, "name": "MinterApproved", "nodeType": "EventDefinition", "parameters": { "id": 5264, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5261, "indexed": false, "name": "currentMinter", "nodeType": "VariableDeclaration", "scope": 5265, "src": "1695:21:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5260, "name": "address", "nodeType": "ElementaryTypeName", "src": "1695:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5263, "indexed": false, "name": "newMinter", "nodeType": "VariableDeclaration", "scope": 5265, "src": "1726:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5262, "name": "address", "nodeType": "ElementaryTypeName", "src": "1726:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1685:64:12" }, "src": "1665:85:12" }, { "body": { "id": 5274, "nodeType": "Block", "src": "1786:140:12", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5269, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "1817:12:12", "subExpression": { "argumentTypes": null, "id": 5268, "name": "initialized", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5204, "src": "1818:11:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "44617461546f6b656e54656d706c6174653a20746f6b656e20696e7374616e636520616c726561647920696e697469616c697a6564", "id": 5270, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1843:55:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_3fbe4c86a4c4d9736fd0d2a9400f74e8d124de74cfedc7affa27132fa840428d", "typeString": "literal_string \"DataTokenTemplate: token instance already initialized\"" }, "value": "DataTokenTemplate: token instance already initialized" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_3fbe4c86a4c4d9736fd0d2a9400f74e8d124de74cfedc7affa27132fa840428d", "typeString": "literal_string \"DataTokenTemplate: token instance already initialized\"" } ], "id": 5267, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 6555, 6556 ], "referencedDeclaration": 6556, "src": "1796:7:12", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 5271, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1796:112:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5272, "nodeType": "ExpressionStatement", "src": "1796:112:12" }, { "id": 5273, "nodeType": "PlaceholderStatement", "src": "1918:1:12" } ] }, "documentation": null, "id": 5275, "name": "onlyNotInitialized", "nodeType": "ModifierDefinition", "parameters": { "id": 5266, "nodeType": "ParameterList", "parameters": [], "src": "1783:2:12" }, "src": "1756:170:12", "visibility": "internal" }, { "body": { "id": 5286, "nodeType": "Block", "src": "1958:130:12", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 5281, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 5278, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6552, "src": "1989:3:12", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 5279, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1989:10:12", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 5280, "name": "_minter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5206, "src": "2003:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1989:21:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "44617461546f6b656e54656d706c6174653a20696e76616c6964206d696e746572", "id": 5282, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2024:35:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_40e35c5de830427b1e8c63a3538e0f1b39d02b02870d69ff7c4ee4488565fe71", "typeString": "literal_string \"DataTokenTemplate: invalid minter\"" }, "value": "DataTokenTemplate: invalid minter" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_40e35c5de830427b1e8c63a3538e0f1b39d02b02870d69ff7c4ee4488565fe71", "typeString": "literal_string \"DataTokenTemplate: invalid minter\"" } ], "id": 5277, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 6555, 6556 ], "referencedDeclaration": 6556, "src": "1968:7:12", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 5283, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1968:102:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5284, "nodeType": "ExpressionStatement", "src": "1968:102:12" }, { "id": 5285, "nodeType": "PlaceholderStatement", "src": "2080:1:12" } ] }, "documentation": null, "id": 5287, "name": "onlyMinter", "nodeType": "ModifierDefinition", "parameters": { "id": 5276, "nodeType": "ParameterList", "parameters": [], "src": "1955:2:12" }, "src": "1936:152:12", "visibility": "internal" }, { "body": { "id": 5311, "nodeType": "Block", "src": "2748:164:12", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5303, "name": "name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5289, "src": "2783:4:12", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, { "argumentTypes": null, "id": 5304, "name": "symbol", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5291, "src": "2801:6:12", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, { "argumentTypes": null, "id": 5305, "name": "minterAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5293, "src": "2821:13:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 5306, "name": "cap", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5295, "src": "2848:3:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 5307, "name": "blob", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5297, "src": "2865:4:12", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, { "argumentTypes": null, "id": 5308, "name": "feeCollector", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5299, "src": "2883:12:12", "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", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 5302, "name": "_initialize", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5423, "src": "2758:11:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_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) returns (bool)" } }, "id": 5309, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2758:147:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 5310, "nodeType": "ExpressionStatement", "src": "2758:147:12" } ] }, "documentation": "@dev constructor\n Called prior contract deployment\n@param name refers to a template DataToken name\n@param symbol refers to a template DataToken symbol\n@param minterAddress refers to an address that has minter role\n@param cap the total ERC20 cap\n@param blob data string refering to the resolver for the metadata\n@param feeCollector it is the community fee collector address", "id": 5312, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 5300, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5289, "name": "name", "nodeType": "VariableDeclaration", "scope": 5312, "src": "2564:18:12", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 5288, "name": "string", "nodeType": "ElementaryTypeName", "src": "2564:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5291, "name": "symbol", "nodeType": "VariableDeclaration", "scope": 5312, "src": "2592:20:12", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 5290, "name": "string", "nodeType": "ElementaryTypeName", "src": "2592:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5293, "name": "minterAddress", "nodeType": "VariableDeclaration", "scope": 5312, "src": "2622:21:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5292, "name": "address", "nodeType": "ElementaryTypeName", "src": "2622:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5295, "name": "cap", "nodeType": "VariableDeclaration", "scope": 5312, "src": "2653:11:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5294, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2653:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5297, "name": "blob", "nodeType": "VariableDeclaration", "scope": 5312, "src": "2674:18:12", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 5296, "name": "string", "nodeType": "ElementaryTypeName", "src": "2674:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5299, "name": "feeCollector", "nodeType": "VariableDeclaration", "scope": 5312, "src": "2702:20:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5298, "name": "address", "nodeType": "ElementaryTypeName", "src": "2702:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "2554:174:12" }, "returnParameters": { "id": 5301, "nodeType": "ParameterList", "parameters": [], "src": "2748:0:12" }, "scope": 5703, "src": "2543:369:12", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 5340, "nodeType": "Block", "src": "3760:171:12", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5332, "name": "name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5314, "src": "3802:4:12", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" } }, { "argumentTypes": null, "id": 5333, "name": "symbol", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5316, "src": "3820:6:12", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" } }, { "argumentTypes": null, "id": 5334, "name": "minterAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5318, "src": "3840:13:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 5335, "name": "cap", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5320, "src": "3867:3:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 5336, "name": "blob", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5322, "src": "3884:4:12", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" } }, { "argumentTypes": null, "id": 5337, "name": "feeCollector", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5324, "src": "3902:12:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" }, { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 5331, "name": "_initialize", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5423, "src": "3777:11:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_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) returns (bool)" } }, "id": 5338, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3777:147:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 5330, "id": 5339, "nodeType": "Return", "src": "3770:154:12" } ] }, "documentation": "@dev initialize\n Called prior contract initialization (e.g creating new DataToken instance)\n Calls private _initialize function. Only if contract is not initialized.\n@param name refers to a new DataToken name\n@param symbol refers to a nea DataToken symbol\n@param minterAddress refers to an address that has minter rights\n@param cap the total ERC20 cap\n@param blob data string refering to the resolver for the metadata\n@param feeCollector it is the community fee collector address", "id": 5341, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 5327, "modifierName": { "argumentTypes": null, "id": 5326, "name": "onlyNotInitialized", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5275, "src": "3715:18:12", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "3715:18:12" } ], "name": "initialize", "nodeType": "FunctionDefinition", "parameters": { "id": 5325, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5314, "name": "name", "nodeType": "VariableDeclaration", "scope": 5341, "src": "3518:20:12", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string" }, "typeName": { "id": 5313, "name": "string", "nodeType": "ElementaryTypeName", "src": "3518:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5316, "name": "symbol", "nodeType": "VariableDeclaration", "scope": 5341, "src": "3548:22:12", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string" }, "typeName": { "id": 5315, "name": "string", "nodeType": "ElementaryTypeName", "src": "3548:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5318, "name": "minterAddress", "nodeType": "VariableDeclaration", "scope": 5341, "src": "3580:21:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5317, "name": "address", "nodeType": "ElementaryTypeName", "src": "3580:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5320, "name": "cap", "nodeType": "VariableDeclaration", "scope": 5341, "src": "3611:11:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5319, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3611:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5322, "name": "blob", "nodeType": "VariableDeclaration", "scope": 5341, "src": "3632:20:12", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string" }, "typeName": { "id": 5321, "name": "string", "nodeType": "ElementaryTypeName", "src": "3632:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5324, "name": "feeCollector", "nodeType": "VariableDeclaration", "scope": 5341, "src": "3662:20:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5323, "name": "address", "nodeType": "ElementaryTypeName", "src": "3662:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "3508:180:12" }, "returnParameters": { "id": 5330, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5329, "name": "", "nodeType": "VariableDeclaration", "scope": 5341, "src": "3750:4:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 5328, "name": "bool", "nodeType": "ElementaryTypeName", "src": "3750:4:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "3749:6:12" }, "scope": 5703, "src": "3489:442:12", "stateMutability": "nonpayable", "superFunction": 5000, "visibility": "external" }, { "body": { "id": 5422, "nodeType": "Block", "src": "4634:743:12", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 5363, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5359, "name": "minterAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5347, "src": "4665:13:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 5361, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4690:1:12", "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": 5360, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4682:7:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 5362, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4682:10:12", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "4665:27:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "44617461546f6b656e54656d706c6174653a20496e76616c6964206d696e7465722c20207a65726f2061646472657373", "id": 5364, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4707:50:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_79b023297db239e06df0b00bacc5eecb1d80c9686a2e70ed8293de6723d3cfa6", "typeString": "literal_string \"DataTokenTemplate: Invalid minter, zero address\"" }, "value": "DataTokenTemplate: Invalid minter, zero address" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_79b023297db239e06df0b00bacc5eecb1d80c9686a2e70ed8293de6723d3cfa6", "typeString": "literal_string \"DataTokenTemplate: Invalid minter, zero address\"" } ], "id": 5358, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 6555, 6556 ], "referencedDeclaration": 6556, "src": "4644:7:12", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 5365, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4644:123:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5366, "nodeType": "ExpressionStatement", "src": "4644:123:12" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 5372, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5368, "name": "_minter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5206, "src": "4799:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 5370, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4818:1:12", "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": 5369, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4810:7:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 5371, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4810:10:12", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "4799:21:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "44617461546f6b656e54656d706c6174653a20496e76616c6964206d696e7465722c207a65726f2061646472657373", "id": 5373, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4835:49:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_b9b9e16289fbb5851262a16209ee436929da92a7a333eeb45338a6bda1fc88b5", "typeString": "literal_string \"DataTokenTemplate: Invalid minter, zero address\"" }, "value": "DataTokenTemplate: Invalid minter, zero address" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_b9b9e16289fbb5851262a16209ee436929da92a7a333eeb45338a6bda1fc88b5", "typeString": "literal_string \"DataTokenTemplate: Invalid minter, zero address\"" } ], "id": 5367, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 6555, 6556 ], "referencedDeclaration": 6556, "src": "4778:7:12", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 5374, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4778:116:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5375, "nodeType": "ExpressionStatement", "src": "4778:116:12" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 5381, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5377, "name": "feeCollector", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5353, "src": "4926:12:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 5379, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4950:1:12", "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": 5378, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4942:7:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 5380, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4942:10:12", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "4926:26:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "44617461546f6b656e54656d706c6174653a20496e76616c696420636f6d6d756e6974792066656520636f6c6c6563746f722c207a65726f2061646472657373", "id": 5382, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4966:66:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_79b4d95ff9378609f77ba871e4eb20868d893b58fb0b84eff9a61c2168cec2e8", "typeString": "literal_string \"DataTokenTemplate: Invalid community fee collector, zero address\"" }, "value": "DataTokenTemplate: Invalid community fee collector, zero address" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_79b4d95ff9378609f77ba871e4eb20868d893b58fb0b84eff9a61c2168cec2e8", "typeString": "literal_string \"DataTokenTemplate: Invalid community fee collector, zero address\"" } ], "id": 5376, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 6555, 6556 ], "referencedDeclaration": 6556, "src": "4905:7:12", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 5383, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4905:137:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5384, "nodeType": "ExpressionStatement", "src": "4905:137:12" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5388, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5386, "name": "cap", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5349, "src": "5074:3:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 5387, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5081:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "5074:8:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "44617461546f6b656e54656d706c6174653a20496e76616c6964206361702076616c7565", "id": 5389, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5096:38:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_931eb4f9c6ddf66acc5bb36f4acf3bb199deea0451b189ecfb6b4e252da29b03", "typeString": "literal_string \"DataTokenTemplate: Invalid cap value\"" }, "value": "DataTokenTemplate: Invalid cap value" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_931eb4f9c6ddf66acc5bb36f4acf3bb199deea0451b189ecfb6b4e252da29b03", "typeString": "literal_string \"DataTokenTemplate: Invalid cap value\"" } ], "id": 5385, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 6555, 6556 ], "referencedDeclaration": 6556, "src": "5053:7:12", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 5390, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5053:91:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5391, "nodeType": "ExpressionStatement", "src": "5053:91:12" }, { "expression": { "argumentTypes": null, "id": 5394, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5392, "name": "_cap", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5196, "src": "5154:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 5393, "name": "cap", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5349, "src": "5161:3:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5154:10:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 5395, "nodeType": "ExpressionStatement", "src": "5154:10:12" }, { "expression": { "argumentTypes": null, "id": 5398, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5396, "name": "_name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5190, "src": "5174:5:12", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 5397, "name": "name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5343, "src": "5182:4:12", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "src": "5174:12:12", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "id": 5399, "nodeType": "ExpressionStatement", "src": "5174:12:12" }, { "expression": { "argumentTypes": null, "id": 5402, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5400, "name": "_blob", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5194, "src": "5196:5:12", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 5401, "name": "blob", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5351, "src": "5204:4:12", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "src": "5196:12:12", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "id": 5403, "nodeType": "ExpressionStatement", "src": "5196:12:12" }, { "expression": { "argumentTypes": null, "id": 5406, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5404, "name": "_symbol", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5192, "src": "5218:7:12", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 5405, "name": "symbol", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5345, "src": "5228:6:12", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "src": "5218:16:12", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "id": 5407, "nodeType": "ExpressionStatement", "src": "5218:16:12" }, { "expression": { "argumentTypes": null, "id": 5410, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5408, "name": "_minter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5206, "src": "5244:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 5409, "name": "minterAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5347, "src": "5254:13:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "5244:23:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 5411, "nodeType": "ExpressionStatement", "src": "5244:23:12" }, { "expression": { "argumentTypes": null, "id": 5414, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5412, "name": "_communityFeeCollector", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5201, "src": "5277:22:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 5413, "name": "feeCollector", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5353, "src": "5302:12:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "5277:37:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 5415, "nodeType": "ExpressionStatement", "src": "5277:37:12" }, { "expression": { "argumentTypes": null, "id": 5418, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5416, "name": "initialized", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5204, "src": "5324:11:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 5417, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "5338:4:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "5324:18:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 5419, "nodeType": "ExpressionStatement", "src": "5324:18:12" }, { "expression": { "argumentTypes": null, "id": 5420, "name": "initialized", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5204, "src": "5359:11:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 5357, "id": 5421, "nodeType": "Return", "src": "5352:18:12" } ] }, "documentation": "@dev _initialize\n Private function called on contract initialization.\n@param name refers to a new DataToken name\n@param symbol refers to a nea DataToken symbol\n@param minterAddress refers to an address that has minter rights\n@param cap the total ERC20 cap\n@param blob data string refering to the resolver for the metadata\n@param feeCollector it is the community fee collector address", "id": 5423, "implemented": true, "kind": "function", "modifiers": [], "name": "_initialize", "nodeType": "FunctionDefinition", "parameters": { "id": 5354, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5343, "name": "name", "nodeType": "VariableDeclaration", "scope": 5423, "src": "4427:18:12", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 5342, "name": "string", "nodeType": "ElementaryTypeName", "src": "4427:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5345, "name": "symbol", "nodeType": "VariableDeclaration", "scope": 5423, "src": "4455:20:12", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 5344, "name": "string", "nodeType": "ElementaryTypeName", "src": "4455:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5347, "name": "minterAddress", "nodeType": "VariableDeclaration", "scope": 5423, "src": "4485:21:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5346, "name": "address", "nodeType": "ElementaryTypeName", "src": "4485:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5349, "name": "cap", "nodeType": "VariableDeclaration", "scope": 5423, "src": "4516:11:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5348, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4516:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5351, "name": "blob", "nodeType": "VariableDeclaration", "scope": 5423, "src": "4537:18:12", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 5350, "name": "string", "nodeType": "ElementaryTypeName", "src": "4537:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5353, "name": "feeCollector", "nodeType": "VariableDeclaration", "scope": 5423, "src": "4565:20:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5352, "name": "address", "nodeType": "ElementaryTypeName", "src": "4565:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "4417:174:12" }, "returnParameters": { "id": 5357, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5356, "name": "", "nodeType": "VariableDeclaration", "scope": 5423, "src": "4624:4:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 5355, "name": "bool", "nodeType": "ElementaryTypeName", "src": "4624:4:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "4623:6:12" }, "scope": 5703, "src": "4397:980:12", "stateMutability": "nonpayable", "superFunction": null, "visibility": "private" }, { "body": { "id": 5448, "nodeType": "Block", "src": "5806:159:12", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5439, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5436, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5427, "src": "5855:5:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 5433, "name": "totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6095, "src": "5837:11:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 5434, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5837:13:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 5435, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 5785, "src": "5837:17:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 5437, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5837:24:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "id": 5438, "name": "_cap", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5196, "src": "5865:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5837:32:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "44617461546f6b656e54656d706c6174653a20636170206578636565646564", "id": 5440, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5884:33:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_db37e28d4a1d757900849adc30f19972d8f520005ecc78e1ba1f3c9b13636ae7", "typeString": "literal_string \"DataTokenTemplate: cap exceeded\"" }, "value": "DataTokenTemplate: cap exceeded" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_db37e28d4a1d757900849adc30f19972d8f520005ecc78e1ba1f3c9b13636ae7", "typeString": "literal_string \"DataTokenTemplate: cap exceeded\"" } ], "id": 5432, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 6555, 6556 ], "referencedDeclaration": 6556, "src": "5816:7:12", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 5441, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5816:111:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5442, "nodeType": "ExpressionStatement", "src": "5816:111:12" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5444, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5425, "src": "5943:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 5445, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5427, "src": "5952:5:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 5443, "name": "_mint", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6352, "src": "5937:5:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 5446, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5937:21:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5447, "nodeType": "ExpressionStatement", "src": "5937:21:12" } ] }, "documentation": "@dev mint\n Only the minter address can call it.\n msg.value should be higher than zero and gt or eq minting fee\n@param account refers to an address that token is going to be minted to.\n@param value refers to amount of tokens that is going to be minted.", "id": 5449, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 5430, "modifierName": { "argumentTypes": null, "id": 5429, "name": "onlyMinter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5287, "src": "5790:10:12", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "5790:10:12" } ], "name": "mint", "nodeType": "FunctionDefinition", "parameters": { "id": 5428, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5425, "name": "account", "nodeType": "VariableDeclaration", "scope": 5449, "src": "5717:15:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5424, "name": "address", "nodeType": "ElementaryTypeName", "src": "5717:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5427, "name": "value", "nodeType": "VariableDeclaration", "scope": 5449, "src": "5742:13:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5426, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5742:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "5707:54:12" }, "returnParameters": { "id": 5431, "nodeType": "ParameterList", "parameters": [], "src": "5806:0:12" }, "scope": 5703, "src": "5694:271:12", "stateMutability": "nonpayable", "superFunction": 5007, "visibility": "external" }, { "body": { "id": 5522, "nodeType": "Block", "src": "6532:753:12", "statements": [ { "assignments": [ 5461 ], "declarations": [ { "constant": false, "id": 5461, "name": "marketFee", "nodeType": "VariableDeclaration", "scope": 5522, "src": "6542:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5460, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6542:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 5463, "initialValue": { "argumentTypes": null, "hexValue": "30", "id": 5462, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "6562:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "nodeType": "VariableDeclarationStatement", "src": "6542:21:12" }, { "assignments": [ 5465 ], "declarations": [ { "constant": false, "id": 5465, "name": "communityFee", "nodeType": "VariableDeclaration", "scope": 5522, "src": "6573:20:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5464, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6573:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 5470, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5467, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5453, "src": "6622:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 5468, "name": "BASE_COMMUNITY_FEE_PERCENTAGE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5218, "src": "6643:29:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 5466, "name": "calculateFee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5702, "src": "6596:12:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 5469, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6596:86:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "6573:109:12" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5472, "name": "_communityFeeCollector", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5201, "src": "6701:22:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 5473, "name": "communityFee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5465, "src": "6725:12:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 5471, "name": "transfer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6126, "src": "6692:8:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) returns (bool)" } }, "id": 5474, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6692:46:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 5475, "nodeType": "ExpressionStatement", "src": "6692:46:12" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 5480, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5476, "name": "mrktFeeCollector", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5457, "src": "6751:16:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 5478, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "6779:1:12", "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": 5477, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "6771:7:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 5479, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6771:10:12", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "6751:30:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 5494, "nodeType": "IfStatement", "src": "6748:217:12", "trueBody": { "id": 5493, "nodeType": "Block", "src": "6782:183:12", "statements": [ { "expression": { "argumentTypes": null, "id": 5486, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5481, "name": "marketFee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5461, "src": "6796:9:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5483, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5453, "src": "6838:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 5484, "name": "BASE_MARKET_FEE_PERCENTAGE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5223, "src": "6863:26:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 5482, "name": "calculateFee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5702, "src": "6808:12:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 5485, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6808:95:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "6796:107:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 5487, "nodeType": "ExpressionStatement", "src": "6796:107:12" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5489, "name": "mrktFeeCollector", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5457, "src": "6926:16:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 5490, "name": "marketFee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5461, "src": "6944:9:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 5488, "name": "transfer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6126, "src": "6917:8:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) returns (bool)" } }, "id": 5491, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6917:37:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 5492, "nodeType": "ExpressionStatement", "src": "6917:37:12" } ] } }, { "assignments": [ 5496 ], "declarations": [ { "constant": false, "id": 5496, "name": "totalFee", "nodeType": "VariableDeclaration", "scope": 5522, "src": "6974:16:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5495, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6974:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 5501, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5499, "name": "marketFee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5461, "src": "7010:9:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 5497, "name": "communityFee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5465, "src": "6993:12:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 5498, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 5785, "src": "6993:16:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 5500, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6993:27:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "6974:46:12" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5503, "name": "_minter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5206, "src": "7039:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5506, "name": "totalFee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5496, "src": "7059:8:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 5504, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5453, "src": "7048:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 5505, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 5801, "src": "7048:10:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 5507, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7048:20:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 5502, "name": "transfer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6126, "src": "7030:8:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) returns (bool)" } }, "id": 5508, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7030:39:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 5509, "nodeType": "ExpressionStatement", "src": "7030:39:12" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5511, "name": "consumer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5451, "src": "7111:8:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 5512, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6552, "src": "7133:3:12", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 5513, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "7133:10:12", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 5514, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5453, "src": "7157:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 5515, "name": "serviceId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5455, "src": "7177:9:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 5516, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6542, "src": "7200:5:12", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 5517, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "7200:15:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 5518, "name": "mrktFeeCollector", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5457, "src": "7229:16:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 5519, "name": "marketFee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5461, "src": "7259:9:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 5510, "name": "OrderStarted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5239, "src": "7085:12:12", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256,uint256,uint256,address,uint256)" } }, "id": 5520, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7085:193:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5521, "nodeType": "EmitStatement", "src": "7080:198:12" } ] }, "documentation": "@dev startOrder\n called by payer or consumer prior ordering a service consume on a marketplace.\n@param consumer is the consumer address (payer could be different address)\n@param amount refers to amount of tokens that is going to be transfered.\n@param serviceId service index in the metadata\n@param mrktFeeCollector marketplace fee collector", "id": 5523, "implemented": true, "kind": "function", "modifiers": [], "name": "startOrder", "nodeType": "FunctionDefinition", "parameters": { "id": 5458, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5451, "name": "consumer", "nodeType": "VariableDeclaration", "scope": 5523, "src": "6403:16:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5450, "name": "address", "nodeType": "ElementaryTypeName", "src": "6403:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5453, "name": "amount", "nodeType": "VariableDeclaration", "scope": 5523, "src": "6429:14:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5452, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6429:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5455, "name": "serviceId", "nodeType": "VariableDeclaration", "scope": 5523, "src": "6453:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5454, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6453:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5457, "name": "mrktFeeCollector", "nodeType": "VariableDeclaration", "scope": 5523, "src": "6480:24:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5456, "name": "address", "nodeType": "ElementaryTypeName", "src": "6480:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "6393:117:12" }, "returnParameters": { "id": 5459, "nodeType": "ParameterList", "parameters": [], "src": "6532:0:12" }, "scope": 5703, "src": "6374:911:12", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { "id": 5557, "nodeType": "Block", "src": "7938:360:12", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5536, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5534, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5529, "src": "7953:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 5535, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "7963:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "7953:11:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 5545, "nodeType": "IfStatement", "src": "7948:159:12", "trueBody": { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5539, "name": "consumer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5527, "src": "8015:8:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 5540, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5529, "src": "8025:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 5538, "name": "transfer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6126, "src": "8006:8:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) returns (bool)" } }, "id": 5541, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8006:26:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "44617461546f6b656e54656d706c6174653a206661696c656420746f2066696e697368206f72646572", "id": 5542, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "8050:43:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_5beb845327406b92f3857bb14436e4b6862cb87998aca33ed8309c1bf98b5e76", "typeString": "literal_string \"DataTokenTemplate: failed to finish order\"" }, "value": "DataTokenTemplate: failed to finish order" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_5beb845327406b92f3857bb14436e4b6862cb87998aca33ed8309c1bf98b5e76", "typeString": "literal_string \"DataTokenTemplate: failed to finish order\"" } ], "id": 5537, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 6555, 6556 ], "referencedDeclaration": 6556, "src": "7981:7:12", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 5543, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7981:126:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5544, "nodeType": "ExpressionStatement", "src": "7981:126:12" } }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5547, "name": "orderTxId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5525, "src": "8150:9:12", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "argumentTypes": null, "id": 5548, "name": "consumer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5527, "src": "8174:8:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 5549, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5529, "src": "8197:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 5550, "name": "serviceId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5531, "src": "8218:9:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 5551, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6552, "src": "8242:3:12", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 5552, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "8242:10:12", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 5553, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6542, "src": "8266:5:12", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 5554, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "8266:15:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 5546, "name": "OrderFinished", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5253, "src": "8123:13:12", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_uint256_$_t_uint256_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (bytes32,address,uint256,uint256,address,uint256)" } }, "id": 5555, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8123:168:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5556, "nodeType": "EmitStatement", "src": "8118:173:12" } ] }, "documentation": "@dev finishOrder\n called by provider prior completing service delivery only\n if there is a partial or full refund.\n@param orderTxId refers to the transaction Id of startOrder acts \n as a payment reference.\n@param consumer refers to an address that has consumed that service.\n@param amount refers to amount of tokens that is going to be transfered.\n@param serviceId service index in the metadata.", "id": 5558, "implemented": true, "kind": "function", "modifiers": [], "name": "finishOrder", "nodeType": "FunctionDefinition", "parameters": { "id": 5532, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5525, "name": "orderTxId", "nodeType": "VariableDeclaration", "scope": 5558, "src": "7814:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 5524, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "7814:7:12", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5527, "name": "consumer", "nodeType": "VariableDeclaration", "scope": 5558, "src": "7842:16:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5526, "name": "address", "nodeType": "ElementaryTypeName", "src": "7842:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5529, "name": "amount", "nodeType": "VariableDeclaration", "scope": 5558, "src": "7869:14:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5528, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "7869:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5531, "name": "serviceId", "nodeType": "VariableDeclaration", "scope": 5558, "src": "7893:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5530, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "7893:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "7804:112:12" }, "returnParameters": { "id": 5533, "nodeType": "ParameterList", "parameters": [], "src": "7938:0:12" }, "scope": 5703, "src": "7784:514:12", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { "id": 5575, "nodeType": "Block", "src": "8594:136:12", "statements": [ { "expression": { "argumentTypes": null, "id": 5567, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5565, "name": "_proposedMinter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5208, "src": "8604:15:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 5566, "name": "newMinter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5560, "src": "8622:9:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "8604:27:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 5568, "nodeType": "ExpressionStatement", "src": "8604:27:12" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 5570, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6552, "src": "8674:3:12", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 5571, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "8674:10:12", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 5572, "name": "_proposedMinter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5208, "src": "8698:15:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 5569, "name": "MinterProposed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5259, "src": "8646:14:12", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", "typeString": "function (address,address)" } }, "id": 5573, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8646:77:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5574, "nodeType": "EmitStatement", "src": "8641:82:12" } ] }, "documentation": "@dev proposeMinter\n It proposes a new token minter address.\n Only the current minter can call it.\n@param newMinter refers to a new token minter address.", "id": 5576, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 5563, "modifierName": { "argumentTypes": null, "id": 5562, "name": "onlyMinter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5287, "src": "8578:10:12", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "8578:10:12" } ], "name": "proposeMinter", "nodeType": "FunctionDefinition", "parameters": { "id": 5561, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5560, "name": "newMinter", "nodeType": "VariableDeclaration", "scope": 5576, "src": "8532:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5559, "name": "address", "nodeType": "ElementaryTypeName", "src": "8532:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "8531:19:12" }, "returnParameters": { "id": 5564, "nodeType": "ParameterList", "parameters": [], "src": "8594:0:12" }, "scope": 5703, "src": "8509:221:12", "stateMutability": "nonpayable", "superFunction": 5085, "visibility": "external" }, { "body": { "id": 5602, "nodeType": "Block", "src": "8925:305:12", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 5583, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 5580, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6552, "src": "8956:3:12", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 5581, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "8956:10:12", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 5582, "name": "_proposedMinter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5208, "src": "8970:15:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "8956:29:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "44617461546f6b656e54656d706c6174653a20696e76616c69642070726f706f736564206d696e7465722061646472657373", "id": 5584, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "8999:52:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_7af8769e1ae364fd1070260138caf964484121753b4fb103f09e0f3de065c059", "typeString": "literal_string \"DataTokenTemplate: invalid proposed minter address\"" }, "value": "DataTokenTemplate: invalid proposed minter address" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_7af8769e1ae364fd1070260138caf964484121753b4fb103f09e0f3de065c059", "typeString": "literal_string \"DataTokenTemplate: invalid proposed minter address\"" } ], "id": 5579, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 6555, 6556 ], "referencedDeclaration": 6556, "src": "8935:7:12", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 5585, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8935:126:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5586, "nodeType": "ExpressionStatement", "src": "8935:126:12" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5588, "name": "_minter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5206, "src": "9104:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 5589, "name": "_proposedMinter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5208, "src": "9125:15:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 5587, "name": "MinterApproved", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5265, "src": "9076:14:12", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", "typeString": "function (address,address)" } }, "id": 5590, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9076:74:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5591, "nodeType": "EmitStatement", "src": "9071:79:12" }, { "expression": { "argumentTypes": null, "id": 5594, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5592, "name": "_minter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5206, "src": "9160:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 5593, "name": "_proposedMinter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5208, "src": "9170:15:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "9160:25:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 5595, "nodeType": "ExpressionStatement", "src": "9160:25:12" }, { "expression": { "argumentTypes": null, "id": 5600, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5596, "name": "_proposedMinter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5208, "src": "9195:15:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 5598, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "9221:1:12", "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": 5597, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "9213:7:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 5599, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9213:10:12", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "9195:28:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 5601, "nodeType": "ExpressionStatement", "src": "9195:28:12" } ] }, "documentation": "@dev approveMinter\n It approves a new token minter address.\n Only the current minter can call it.", "id": 5603, "implemented": true, "kind": "function", "modifiers": [], "name": "approveMinter", "nodeType": "FunctionDefinition", "parameters": { "id": 5577, "nodeType": "ParameterList", "parameters": [], "src": "8901:2:12" }, "returnParameters": { "id": 5578, "nodeType": "ParameterList", "parameters": [], "src": "8925:0:12" }, "scope": 5703, "src": "8879:351:12", "stateMutability": "nonpayable", "superFunction": 5088, "visibility": "external" }, { "body": { "id": 5610, "nodeType": "Block", "src": "9392:29:12", "statements": [ { "expression": { "argumentTypes": null, "id": 5608, "name": "_name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5190, "src": "9409:5:12", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "functionReturnParameters": 5607, "id": 5609, "nodeType": "Return", "src": "9402:12:12" } ] }, "documentation": "@dev name\n It returns the token name.\n@return DataToken name.", "id": 5611, "implemented": true, "kind": "function", "modifiers": [], "name": "name", "nodeType": "FunctionDefinition", "parameters": { "id": 5604, "nodeType": "ParameterList", "parameters": [], "src": "9352:2:12" }, "returnParameters": { "id": 5607, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5606, "name": "", "nodeType": "VariableDeclaration", "scope": 5611, "src": "9377:13:12", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 5605, "name": "string", "nodeType": "ElementaryTypeName", "src": "9377:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "9376:15:12" }, "scope": 5703, "src": "9339:82:12", "stateMutability": "view", "superFunction": 5017, "visibility": "external" }, { "body": { "id": 5618, "nodeType": "Block", "src": "9591:31:12", "statements": [ { "expression": { "argumentTypes": null, "id": 5616, "name": "_symbol", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5192, "src": "9608:7:12", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "functionReturnParameters": 5615, "id": 5617, "nodeType": "Return", "src": "9601:14:12" } ] }, "documentation": "@dev symbol\n It returns the token symbol.\n@return DataToken symbol.", "id": 5619, "implemented": true, "kind": "function", "modifiers": [], "name": "symbol", "nodeType": "FunctionDefinition", "parameters": { "id": 5612, "nodeType": "ParameterList", "parameters": [], "src": "9551:2:12" }, "returnParameters": { "id": 5615, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5614, "name": "", "nodeType": "VariableDeclaration", "scope": 5619, "src": "9576:13:12", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 5613, "name": "string", "nodeType": "ElementaryTypeName", "src": "9576:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "9575:15:12" }, "scope": 5703, "src": "9536:86:12", "stateMutability": "view", "superFunction": 5022, "visibility": "external" }, { "body": { "id": 5626, "nodeType": "Block", "src": "9800:29:12", "statements": [ { "expression": { "argumentTypes": null, "id": 5624, "name": "_blob", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5194, "src": "9817:5:12", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "functionReturnParameters": 5623, "id": 5625, "nodeType": "Return", "src": "9810:12:12" } ] }, "documentation": "@dev blob\n It returns the blob (e.g https://123.com).\n@return DataToken blob.", "id": 5627, "implemented": true, "kind": "function", "modifiers": [], "name": "blob", "nodeType": "FunctionDefinition", "parameters": { "id": 5620, "nodeType": "ParameterList", "parameters": [], "src": "9760:2:12" }, "returnParameters": { "id": 5623, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5622, "name": "", "nodeType": "VariableDeclaration", "scope": 5627, "src": "9785:13:12", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 5621, "name": "string", "nodeType": "ElementaryTypeName", "src": "9785:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "9784:15:12" }, "scope": 5703, "src": "9747:82:12", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": { "id": 5634, "nodeType": "Block", "src": "10045:33:12", "statements": [ { "expression": { "argumentTypes": null, "id": 5632, "name": "_decimals", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5199, "src": "10062:9:12", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "functionReturnParameters": 5631, "id": 5633, "nodeType": "Return", "src": "10055:16:12" } ] }, "documentation": "@dev decimals\n It returns the token decimals.\n how many supported decimal points\n@return DataToken decimals.", "id": 5635, "implemented": true, "kind": "function", "modifiers": [], "name": "decimals", "nodeType": "FunctionDefinition", "parameters": { "id": 5628, "nodeType": "ParameterList", "parameters": [], "src": "10013:2:12" }, "returnParameters": { "id": 5631, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5630, "name": "", "nodeType": "VariableDeclaration", "scope": 5635, "src": "10038:5:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 5629, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "10038:5:12", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": null, "visibility": "internal" } ], "src": "10037:7:12" }, "scope": 5703, "src": "9996:82:12", "stateMutability": "view", "superFunction": 5027, "visibility": "external" }, { "body": { "id": 5642, "nodeType": "Block", "src": "10229:28:12", "statements": [ { "expression": { "argumentTypes": null, "id": 5640, "name": "_cap", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5196, "src": "10246:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 5639, "id": 5641, "nodeType": "Return", "src": "10239:11:12" } ] }, "documentation": "@dev cap\n it returns the capital.\n@return DataToken cap.", "id": 5643, "implemented": true, "kind": "function", "modifiers": [], "name": "cap", "nodeType": "FunctionDefinition", "parameters": { "id": 5636, "nodeType": "ParameterList", "parameters": [], "src": "10194:2:12" }, "returnParameters": { "id": 5639, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5638, "name": "", "nodeType": "VariableDeclaration", "scope": 5643, "src": "10220:7:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5637, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10220:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "10219:9:12" }, "scope": 5703, "src": "10182:75:12", "stateMutability": "view", "superFunction": 5032, "visibility": "external" }, { "body": { "id": 5655, "nodeType": "Block", "src": "10532:44:12", "statements": [ { "expression": { "argumentTypes": null, "components": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 5652, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5650, "name": "_minter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5206, "src": "10550:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 5651, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5645, "src": "10561:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "10550:18:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "id": 5653, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "10549:20:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 5649, "id": 5654, "nodeType": "Return", "src": "10542:27:12" } ] }, "documentation": "@dev isMinter\n It takes the address and checks whether it has a minter role.\n@param account refers to the address.\n@return true if account has a minter role.", "id": 5656, "implemented": true, "kind": "function", "modifiers": [], "name": "isMinter", "nodeType": "FunctionDefinition", "parameters": { "id": 5646, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5645, "name": "account", "nodeType": "VariableDeclaration", "scope": 5656, "src": "10487:15:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5644, "name": "address", "nodeType": "ElementaryTypeName", "src": "10487:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "10486:17:12" }, "returnParameters": { "id": 5649, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5648, "name": "", "nodeType": "VariableDeclaration", "scope": 5656, "src": "10526:4:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 5647, "name": "bool", "nodeType": "ElementaryTypeName", "src": "10526:4:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "10525:6:12" }, "scope": 5703, "src": "10469:107:12", "stateMutability": "view", "superFunction": 5039, "visibility": "external" }, { "body": { "id": 5663, "nodeType": "Block", "src": "10729:31:12", "statements": [ { "expression": { "argumentTypes": null, "id": 5661, "name": "_minter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5206, "src": "10746:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "functionReturnParameters": 5660, "id": 5662, "nodeType": "Return", "src": "10739:14:12" } ] }, "documentation": "@dev minter\n@return minter's address.", "id": 5664, "implemented": true, "kind": "function", "modifiers": [], "name": "minter", "nodeType": "FunctionDefinition", "parameters": { "id": 5657, "nodeType": "ParameterList", "parameters": [], "src": "10666:2:12" }, "returnParameters": { "id": 5660, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5659, "name": "", "nodeType": "VariableDeclaration", "scope": 5664, "src": "10716:7:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5658, "name": "address", "nodeType": "ElementaryTypeName", "src": "10716:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "10715:9:12" }, "scope": 5703, "src": "10651:109:12", "stateMutability": "view", "superFunction": 5012, "visibility": "external" }, { "body": { "id": 5671, "nodeType": "Block", "src": "10973:35:12", "statements": [ { "expression": { "argumentTypes": null, "id": 5669, "name": "initialized", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5204, "src": "10990:11:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 5668, "id": 5670, "nodeType": "Return", "src": "10983:18:12" } ] }, "documentation": "@dev isInitialized\n It checks whether the contract is initialized.\n@return true if the contract is initialized.", "id": 5672, "implemented": true, "kind": "function", "modifiers": [], "name": "isInitialized", "nodeType": "FunctionDefinition", "parameters": { "id": 5665, "nodeType": "ParameterList", "parameters": [], "src": "10942:2:12" }, "returnParameters": { "id": 5668, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5667, "name": "", "nodeType": "VariableDeclaration", "scope": 5672, "src": "10967:4:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 5666, "name": "bool", "nodeType": "ElementaryTypeName", "src": "10967:4:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "10966:6:12" }, "scope": 5703, "src": "10920:88:12", "stateMutability": "view", "superFunction": 5044, "visibility": "external" }, { "body": { "id": 5701, "nodeType": "Block", "src": "11392:134:12", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5683, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5681, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5674, "src": "11405:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 5682, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "11415:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "11405:11:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 5686, "nodeType": "IfStatement", "src": "11402:24:12", "trueBody": { "expression": { "argumentTypes": null, "hexValue": "30", "id": 5684, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "11425:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "functionReturnParameters": 5680, "id": 5685, "nodeType": "Return", "src": "11418:8:12" } }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5689, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5687, "name": "feePercentage", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5676, "src": "11439:13:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 5688, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "11456:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "11439:18:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 5692, "nodeType": "IfStatement", "src": "11436:31:12", "trueBody": { "expression": { "argumentTypes": null, "hexValue": "30", "id": 5690, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "11466:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "functionReturnParameters": 5680, "id": 5691, "nodeType": "Return", "src": "11459:8:12" } }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5698, "name": "BASE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5213, "src": "11514:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5695, "name": "feePercentage", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5676, "src": "11495:13:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 5693, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5674, "src": "11484:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 5694, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 5862, "src": "11484:10:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 5696, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "11484:25:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 5697, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 5878, "src": "11484:29:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 5699, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "11484:35:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 5680, "id": 5700, "nodeType": "Return", "src": "11477:42:12" } ] }, "documentation": "@dev calculateFee\n giving a fee percentage, and amount it calculates the actual fee\n@param amount the amount of token\n@param feePercentage the fee percentage \n@return the token fee.", "id": 5702, "implemented": true, "kind": "function", "modifiers": [], "name": "calculateFee", "nodeType": "FunctionDefinition", "parameters": { "id": 5677, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5674, "name": "amount", "nodeType": "VariableDeclaration", "scope": 5702, "src": "11283:14:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5673, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "11283:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5676, "name": "feePercentage", "nodeType": "VariableDeclaration", "scope": 5702, "src": "11307:21:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5675, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "11307:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "11273:61:12" }, "returnParameters": { "id": 5680, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5679, "name": "", "nodeType": "VariableDeclaration", "scope": 5702, "src": "11379:7:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5678, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "11379:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "11378:9:12" }, "scope": 5703, "src": "11252:274:12", "stateMutability": "pure", "superFunction": null, "visibility": "public" } ], "scope": 5704, "src": "488:11040:12" } ], "src": "0:11529:12" }, "legacyAST": { "absolutePath": "/home/travis/build/oceanprotocol/ocean-contracts/contracts/templates/DataTokenTemplate.sol", "exportedSymbols": { "DataTokenTemplate": [ 5703 ] }, "id": 5704, "nodeType": "SourceUnit", "nodes": [ { "id": 5179, "literals": [ "solidity", "0.5", ".7" ], "nodeType": "PragmaDirective", "src": "0:22:12" }, { "absolutePath": "/home/travis/build/oceanprotocol/ocean-contracts/contracts/interfaces/IERC20Template.sol", "file": "../interfaces/IERC20Template.sol", "id": 5180, "nodeType": "ImportDirective", "scope": 5704, "sourceUnit": 5090, "src": "185:42:12", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", "id": 5181, "nodeType": "ImportDirective", "scope": 5704, "sourceUnit": 6469, "src": "228:63:12", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 5182, "name": "IERC20Template", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 5089, "src": "518:14:12", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20Template_$5089", "typeString": "contract IERC20Template" } }, "id": 5183, "nodeType": "InheritanceSpecifier", "src": "518:14:12" }, { "arguments": null, "baseName": { "contractScope": null, "id": 5184, "name": "ERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 6468, "src": "534:5:12", "typeDescriptions": { "typeIdentifier": "t_contract$_ERC20_$6468", "typeString": "contract ERC20" } }, "id": 5185, "nodeType": "InheritanceSpecifier", "src": "534:5:12" } ], "contractDependencies": [ 5089, 5758, 6468, 6537 ], "contractKind": "contract", "documentation": "@title DataTokenTemplate\n \n@dev DataTokenTemplate is an ERC20 compliant token template\n Used by the factory contract as a bytecode reference to \n deploy new DataTokens.", "fullyImplemented": true, "id": 5703, "linearizedBaseContracts": [ 5703, 6468, 6537, 5758, 5089 ], "name": "DataTokenTemplate", "nodeType": "ContractDefinition", "nodes": [ { "id": 5188, "libraryName": { "contractScope": null, "id": 5186, "name": "SafeMath", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 5945, "src": "552:8:12", "typeDescriptions": { "typeIdentifier": "t_contract$_SafeMath_$5945", "typeString": "library SafeMath" } }, "nodeType": "UsingForDirective", "src": "546:27:12", "typeName": { "id": 5187, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "565:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, { "constant": false, "id": 5190, "name": "_name", "nodeType": "VariableDeclaration", "scope": 5703, "src": "579:21:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string" }, "typeName": { "id": 5189, "name": "string", "nodeType": "ElementaryTypeName", "src": "579:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "private" }, { "constant": false, "id": 5192, "name": "_symbol", "nodeType": "VariableDeclaration", "scope": 5703, "src": "606:23:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string" }, "typeName": { "id": 5191, "name": "string", "nodeType": "ElementaryTypeName", "src": "606:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "private" }, { "constant": false, "id": 5194, "name": "_blob", "nodeType": "VariableDeclaration", "scope": 5703, "src": "635:21:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string" }, "typeName": { "id": 5193, "name": "string", "nodeType": "ElementaryTypeName", "src": "635:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "private" }, { "constant": false, "id": 5196, "name": "_cap", "nodeType": "VariableDeclaration", "scope": 5703, "src": "662:20:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5195, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "662:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "private" }, { "constant": true, "id": 5199, "name": "_decimals", "nodeType": "VariableDeclaration", "scope": 5703, "src": "688:37:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 5197, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "688:5:12", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": { "argumentTypes": null, "hexValue": "3138", "id": 5198, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "723:2:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_18_by_1", "typeString": "int_const 18" }, "value": "18" }, "visibility": "private" }, { "constant": false, "id": 5201, "name": "_communityFeeCollector", "nodeType": "VariableDeclaration", "scope": 5703, "src": "731:38:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5200, "name": "address", "nodeType": "ElementaryTypeName", "src": "731:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "private" }, { "constant": false, "id": 5204, "name": "initialized", "nodeType": "VariableDeclaration", "scope": 5703, "src": "775:35:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 5202, "name": "bool", "nodeType": "ElementaryTypeName", "src": "775:4:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": { "argumentTypes": null, "hexValue": "66616c7365", "id": 5203, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "805:5:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "visibility": "private" }, { "constant": false, "id": 5206, "name": "_minter", "nodeType": "VariableDeclaration", "scope": 5703, "src": "816:23:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5205, "name": "address", "nodeType": "ElementaryTypeName", "src": "816:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "private" }, { "constant": false, "id": 5208, "name": "_proposedMinter", "nodeType": "VariableDeclaration", "scope": 5703, "src": "845:31:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5207, "name": "address", "nodeType": "ElementaryTypeName", "src": "845:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "private" }, { "constant": true, "id": 5213, "name": "BASE", "nodeType": "VariableDeclaration", "scope": 5703, "src": "882:37:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5209, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "882:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_rational_1000000000000000000_by_1", "typeString": "int_const 1000000000000000000" }, "id": 5212, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "hexValue": "3130", "id": 5210, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "913:2:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_10_by_1", "typeString": "int_const 10" }, "value": "10" }, "nodeType": "BinaryOperation", "operator": "**", "rightExpression": { "argumentTypes": null, "hexValue": "3138", "id": 5211, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "917:2:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_18_by_1", "typeString": "int_const 18" }, "value": "18" }, "src": "913:6:12", "typeDescriptions": { "typeIdentifier": "t_rational_1000000000000000000_by_1", "typeString": "int_const 1000000000000000000" } }, "visibility": "public" }, { "constant": true, "id": 5218, "name": "BASE_COMMUNITY_FEE_PERCENTAGE", "nodeType": "VariableDeclaration", "scope": 5703, "src": "925:67:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5214, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "925:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5217, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5215, "name": "BASE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5213, "src": "981:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { "argumentTypes": null, "hexValue": "31303030", "id": 5216, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "988:4:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1000_by_1", "typeString": "int_const 1000" }, "value": "1000" }, "src": "981:11:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "public" }, { "constant": true, "id": 5223, "name": "BASE_MARKET_FEE_PERCENTAGE", "nodeType": "VariableDeclaration", "scope": 5703, "src": "998:64:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5219, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "998:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5222, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5220, "name": "BASE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5213, "src": "1051:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { "argumentTypes": null, "hexValue": "31303030", "id": 5221, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1058:4:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1000_by_1", "typeString": "int_const 1000" }, "value": "1000" }, "src": "1051:11:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "public" }, { "anonymous": false, "documentation": null, "id": 5239, "name": "OrderStarted", "nodeType": "EventDefinition", "parameters": { "id": 5238, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5225, "indexed": true, "name": "consumer", "nodeType": "VariableDeclaration", "scope": 5239, "src": "1101:24:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5224, "name": "address", "nodeType": "ElementaryTypeName", "src": "1101:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5227, "indexed": true, "name": "payer", "nodeType": "VariableDeclaration", "scope": 5239, "src": "1139:21:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5226, "name": "address", "nodeType": "ElementaryTypeName", "src": "1139:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5229, "indexed": false, "name": "amount", "nodeType": "VariableDeclaration", "scope": 5239, "src": "1174:14:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5228, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1174:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5231, "indexed": false, "name": "serviceId", "nodeType": "VariableDeclaration", "scope": 5239, "src": "1203:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5230, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1203:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5233, "indexed": false, "name": "timestamp", "nodeType": "VariableDeclaration", "scope": 5239, "src": "1235:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5232, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1235:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5235, "indexed": true, "name": "mrktFeeCollector", "nodeType": "VariableDeclaration", "scope": 5239, "src": "1266:32:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5234, "name": "address", "nodeType": "ElementaryTypeName", "src": "1266:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5237, "indexed": false, "name": "marketFee", "nodeType": "VariableDeclaration", "scope": 5239, "src": "1312:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5236, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1312:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1087:248:12" }, "src": "1069:267:12" }, { "anonymous": false, "documentation": null, "id": 5253, "name": "OrderFinished", "nodeType": "EventDefinition", "parameters": { "id": 5252, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5241, "indexed": false, "name": "orderTxId", "nodeType": "VariableDeclaration", "scope": 5253, "src": "1375:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 5240, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1375:7:12", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5243, "indexed": true, "name": "consumer", "nodeType": "VariableDeclaration", "scope": 5253, "src": "1407:24:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5242, "name": "address", "nodeType": "ElementaryTypeName", "src": "1407:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5245, "indexed": false, "name": "amount", "nodeType": "VariableDeclaration", "scope": 5253, "src": "1445:14:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5244, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1445:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5247, "indexed": false, "name": "serviceId", "nodeType": "VariableDeclaration", "scope": 5253, "src": "1474:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5246, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1474:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5249, "indexed": true, "name": "provider", "nodeType": "VariableDeclaration", "scope": 5253, "src": "1506:24:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5248, "name": "address", "nodeType": "ElementaryTypeName", "src": "1506:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5251, "indexed": false, "name": "timestamp", "nodeType": "VariableDeclaration", "scope": 5253, "src": "1544:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5250, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1544:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1361:206:12" }, "src": "1342:226:12" }, { "anonymous": false, "documentation": null, "id": 5259, "name": "MinterProposed", "nodeType": "EventDefinition", "parameters": { "id": 5258, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5255, "indexed": false, "name": "currentMinter", "nodeType": "VariableDeclaration", "scope": 5259, "src": "1604:21:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5254, "name": "address", "nodeType": "ElementaryTypeName", "src": "1604:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5257, "indexed": false, "name": "newMinter", "nodeType": "VariableDeclaration", "scope": 5259, "src": "1635:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5256, "name": "address", "nodeType": "ElementaryTypeName", "src": "1635:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1594:64:12" }, "src": "1574:85:12" }, { "anonymous": false, "documentation": null, "id": 5265, "name": "MinterApproved", "nodeType": "EventDefinition", "parameters": { "id": 5264, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5261, "indexed": false, "name": "currentMinter", "nodeType": "VariableDeclaration", "scope": 5265, "src": "1695:21:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5260, "name": "address", "nodeType": "ElementaryTypeName", "src": "1695:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5263, "indexed": false, "name": "newMinter", "nodeType": "VariableDeclaration", "scope": 5265, "src": "1726:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5262, "name": "address", "nodeType": "ElementaryTypeName", "src": "1726:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1685:64:12" }, "src": "1665:85:12" }, { "body": { "id": 5274, "nodeType": "Block", "src": "1786:140:12", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5269, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "1817:12:12", "subExpression": { "argumentTypes": null, "id": 5268, "name": "initialized", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5204, "src": "1818:11:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "44617461546f6b656e54656d706c6174653a20746f6b656e20696e7374616e636520616c726561647920696e697469616c697a6564", "id": 5270, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1843:55:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_3fbe4c86a4c4d9736fd0d2a9400f74e8d124de74cfedc7affa27132fa840428d", "typeString": "literal_string \"DataTokenTemplate: token instance already initialized\"" }, "value": "DataTokenTemplate: token instance already initialized" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_3fbe4c86a4c4d9736fd0d2a9400f74e8d124de74cfedc7affa27132fa840428d", "typeString": "literal_string \"DataTokenTemplate: token instance already initialized\"" } ], "id": 5267, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 6555, 6556 ], "referencedDeclaration": 6556, "src": "1796:7:12", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 5271, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1796:112:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5272, "nodeType": "ExpressionStatement", "src": "1796:112:12" }, { "id": 5273, "nodeType": "PlaceholderStatement", "src": "1918:1:12" } ] }, "documentation": null, "id": 5275, "name": "onlyNotInitialized", "nodeType": "ModifierDefinition", "parameters": { "id": 5266, "nodeType": "ParameterList", "parameters": [], "src": "1783:2:12" }, "src": "1756:170:12", "visibility": "internal" }, { "body": { "id": 5286, "nodeType": "Block", "src": "1958:130:12", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 5281, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 5278, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6552, "src": "1989:3:12", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 5279, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1989:10:12", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 5280, "name": "_minter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5206, "src": "2003:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1989:21:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "44617461546f6b656e54656d706c6174653a20696e76616c6964206d696e746572", "id": 5282, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2024:35:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_40e35c5de830427b1e8c63a3538e0f1b39d02b02870d69ff7c4ee4488565fe71", "typeString": "literal_string \"DataTokenTemplate: invalid minter\"" }, "value": "DataTokenTemplate: invalid minter" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_40e35c5de830427b1e8c63a3538e0f1b39d02b02870d69ff7c4ee4488565fe71", "typeString": "literal_string \"DataTokenTemplate: invalid minter\"" } ], "id": 5277, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 6555, 6556 ], "referencedDeclaration": 6556, "src": "1968:7:12", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 5283, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1968:102:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5284, "nodeType": "ExpressionStatement", "src": "1968:102:12" }, { "id": 5285, "nodeType": "PlaceholderStatement", "src": "2080:1:12" } ] }, "documentation": null, "id": 5287, "name": "onlyMinter", "nodeType": "ModifierDefinition", "parameters": { "id": 5276, "nodeType": "ParameterList", "parameters": [], "src": "1955:2:12" }, "src": "1936:152:12", "visibility": "internal" }, { "body": { "id": 5311, "nodeType": "Block", "src": "2748:164:12", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5303, "name": "name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5289, "src": "2783:4:12", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, { "argumentTypes": null, "id": 5304, "name": "symbol", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5291, "src": "2801:6:12", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, { "argumentTypes": null, "id": 5305, "name": "minterAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5293, "src": "2821:13:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 5306, "name": "cap", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5295, "src": "2848:3:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 5307, "name": "blob", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5297, "src": "2865:4:12", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, { "argumentTypes": null, "id": 5308, "name": "feeCollector", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5299, "src": "2883:12:12", "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", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 5302, "name": "_initialize", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5423, "src": "2758:11:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_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) returns (bool)" } }, "id": 5309, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2758:147:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 5310, "nodeType": "ExpressionStatement", "src": "2758:147:12" } ] }, "documentation": "@dev constructor\n Called prior contract deployment\n@param name refers to a template DataToken name\n@param symbol refers to a template DataToken symbol\n@param minterAddress refers to an address that has minter role\n@param cap the total ERC20 cap\n@param blob data string refering to the resolver for the metadata\n@param feeCollector it is the community fee collector address", "id": 5312, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 5300, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5289, "name": "name", "nodeType": "VariableDeclaration", "scope": 5312, "src": "2564:18:12", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 5288, "name": "string", "nodeType": "ElementaryTypeName", "src": "2564:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5291, "name": "symbol", "nodeType": "VariableDeclaration", "scope": 5312, "src": "2592:20:12", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 5290, "name": "string", "nodeType": "ElementaryTypeName", "src": "2592:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5293, "name": "minterAddress", "nodeType": "VariableDeclaration", "scope": 5312, "src": "2622:21:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5292, "name": "address", "nodeType": "ElementaryTypeName", "src": "2622:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5295, "name": "cap", "nodeType": "VariableDeclaration", "scope": 5312, "src": "2653:11:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5294, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2653:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5297, "name": "blob", "nodeType": "VariableDeclaration", "scope": 5312, "src": "2674:18:12", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 5296, "name": "string", "nodeType": "ElementaryTypeName", "src": "2674:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5299, "name": "feeCollector", "nodeType": "VariableDeclaration", "scope": 5312, "src": "2702:20:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5298, "name": "address", "nodeType": "ElementaryTypeName", "src": "2702:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "2554:174:12" }, "returnParameters": { "id": 5301, "nodeType": "ParameterList", "parameters": [], "src": "2748:0:12" }, "scope": 5703, "src": "2543:369:12", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 5340, "nodeType": "Block", "src": "3760:171:12", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5332, "name": "name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5314, "src": "3802:4:12", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" } }, { "argumentTypes": null, "id": 5333, "name": "symbol", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5316, "src": "3820:6:12", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" } }, { "argumentTypes": null, "id": 5334, "name": "minterAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5318, "src": "3840:13:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 5335, "name": "cap", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5320, "src": "3867:3:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 5336, "name": "blob", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5322, "src": "3884:4:12", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" } }, { "argumentTypes": null, "id": 5337, "name": "feeCollector", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5324, "src": "3902:12:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" }, { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 5331, "name": "_initialize", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5423, "src": "3777:11:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_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) returns (bool)" } }, "id": 5338, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3777:147:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 5330, "id": 5339, "nodeType": "Return", "src": "3770:154:12" } ] }, "documentation": "@dev initialize\n Called prior contract initialization (e.g creating new DataToken instance)\n Calls private _initialize function. Only if contract is not initialized.\n@param name refers to a new DataToken name\n@param symbol refers to a nea DataToken symbol\n@param minterAddress refers to an address that has minter rights\n@param cap the total ERC20 cap\n@param blob data string refering to the resolver for the metadata\n@param feeCollector it is the community fee collector address", "id": 5341, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 5327, "modifierName": { "argumentTypes": null, "id": 5326, "name": "onlyNotInitialized", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5275, "src": "3715:18:12", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "3715:18:12" } ], "name": "initialize", "nodeType": "FunctionDefinition", "parameters": { "id": 5325, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5314, "name": "name", "nodeType": "VariableDeclaration", "scope": 5341, "src": "3518:20:12", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string" }, "typeName": { "id": 5313, "name": "string", "nodeType": "ElementaryTypeName", "src": "3518:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5316, "name": "symbol", "nodeType": "VariableDeclaration", "scope": 5341, "src": "3548:22:12", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string" }, "typeName": { "id": 5315, "name": "string", "nodeType": "ElementaryTypeName", "src": "3548:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5318, "name": "minterAddress", "nodeType": "VariableDeclaration", "scope": 5341, "src": "3580:21:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5317, "name": "address", "nodeType": "ElementaryTypeName", "src": "3580:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5320, "name": "cap", "nodeType": "VariableDeclaration", "scope": 5341, "src": "3611:11:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5319, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3611:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5322, "name": "blob", "nodeType": "VariableDeclaration", "scope": 5341, "src": "3632:20:12", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string" }, "typeName": { "id": 5321, "name": "string", "nodeType": "ElementaryTypeName", "src": "3632:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5324, "name": "feeCollector", "nodeType": "VariableDeclaration", "scope": 5341, "src": "3662:20:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5323, "name": "address", "nodeType": "ElementaryTypeName", "src": "3662:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "3508:180:12" }, "returnParameters": { "id": 5330, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5329, "name": "", "nodeType": "VariableDeclaration", "scope": 5341, "src": "3750:4:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 5328, "name": "bool", "nodeType": "ElementaryTypeName", "src": "3750:4:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "3749:6:12" }, "scope": 5703, "src": "3489:442:12", "stateMutability": "nonpayable", "superFunction": 5000, "visibility": "external" }, { "body": { "id": 5422, "nodeType": "Block", "src": "4634:743:12", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 5363, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5359, "name": "minterAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5347, "src": "4665:13:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 5361, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4690:1:12", "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": 5360, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4682:7:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 5362, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4682:10:12", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "4665:27:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "44617461546f6b656e54656d706c6174653a20496e76616c6964206d696e7465722c20207a65726f2061646472657373", "id": 5364, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4707:50:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_79b023297db239e06df0b00bacc5eecb1d80c9686a2e70ed8293de6723d3cfa6", "typeString": "literal_string \"DataTokenTemplate: Invalid minter, zero address\"" }, "value": "DataTokenTemplate: Invalid minter, zero address" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_79b023297db239e06df0b00bacc5eecb1d80c9686a2e70ed8293de6723d3cfa6", "typeString": "literal_string \"DataTokenTemplate: Invalid minter, zero address\"" } ], "id": 5358, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 6555, 6556 ], "referencedDeclaration": 6556, "src": "4644:7:12", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 5365, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4644:123:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5366, "nodeType": "ExpressionStatement", "src": "4644:123:12" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 5372, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5368, "name": "_minter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5206, "src": "4799:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 5370, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4818:1:12", "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": 5369, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4810:7:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 5371, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4810:10:12", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "4799:21:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "44617461546f6b656e54656d706c6174653a20496e76616c6964206d696e7465722c207a65726f2061646472657373", "id": 5373, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4835:49:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_b9b9e16289fbb5851262a16209ee436929da92a7a333eeb45338a6bda1fc88b5", "typeString": "literal_string \"DataTokenTemplate: Invalid minter, zero address\"" }, "value": "DataTokenTemplate: Invalid minter, zero address" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_b9b9e16289fbb5851262a16209ee436929da92a7a333eeb45338a6bda1fc88b5", "typeString": "literal_string \"DataTokenTemplate: Invalid minter, zero address\"" } ], "id": 5367, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 6555, 6556 ], "referencedDeclaration": 6556, "src": "4778:7:12", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 5374, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4778:116:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5375, "nodeType": "ExpressionStatement", "src": "4778:116:12" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 5381, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5377, "name": "feeCollector", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5353, "src": "4926:12:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 5379, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4950:1:12", "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": 5378, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4942:7:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 5380, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4942:10:12", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "4926:26:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "44617461546f6b656e54656d706c6174653a20496e76616c696420636f6d6d756e6974792066656520636f6c6c6563746f722c207a65726f2061646472657373", "id": 5382, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4966:66:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_79b4d95ff9378609f77ba871e4eb20868d893b58fb0b84eff9a61c2168cec2e8", "typeString": "literal_string \"DataTokenTemplate: Invalid community fee collector, zero address\"" }, "value": "DataTokenTemplate: Invalid community fee collector, zero address" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_79b4d95ff9378609f77ba871e4eb20868d893b58fb0b84eff9a61c2168cec2e8", "typeString": "literal_string \"DataTokenTemplate: Invalid community fee collector, zero address\"" } ], "id": 5376, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 6555, 6556 ], "referencedDeclaration": 6556, "src": "4905:7:12", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 5383, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4905:137:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5384, "nodeType": "ExpressionStatement", "src": "4905:137:12" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5388, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5386, "name": "cap", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5349, "src": "5074:3:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 5387, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5081:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "5074:8:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "44617461546f6b656e54656d706c6174653a20496e76616c6964206361702076616c7565", "id": 5389, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5096:38:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_931eb4f9c6ddf66acc5bb36f4acf3bb199deea0451b189ecfb6b4e252da29b03", "typeString": "literal_string \"DataTokenTemplate: Invalid cap value\"" }, "value": "DataTokenTemplate: Invalid cap value" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_931eb4f9c6ddf66acc5bb36f4acf3bb199deea0451b189ecfb6b4e252da29b03", "typeString": "literal_string \"DataTokenTemplate: Invalid cap value\"" } ], "id": 5385, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 6555, 6556 ], "referencedDeclaration": 6556, "src": "5053:7:12", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 5390, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5053:91:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5391, "nodeType": "ExpressionStatement", "src": "5053:91:12" }, { "expression": { "argumentTypes": null, "id": 5394, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5392, "name": "_cap", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5196, "src": "5154:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 5393, "name": "cap", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5349, "src": "5161:3:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5154:10:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 5395, "nodeType": "ExpressionStatement", "src": "5154:10:12" }, { "expression": { "argumentTypes": null, "id": 5398, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5396, "name": "_name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5190, "src": "5174:5:12", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 5397, "name": "name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5343, "src": "5182:4:12", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "src": "5174:12:12", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "id": 5399, "nodeType": "ExpressionStatement", "src": "5174:12:12" }, { "expression": { "argumentTypes": null, "id": 5402, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5400, "name": "_blob", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5194, "src": "5196:5:12", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 5401, "name": "blob", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5351, "src": "5204:4:12", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "src": "5196:12:12", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "id": 5403, "nodeType": "ExpressionStatement", "src": "5196:12:12" }, { "expression": { "argumentTypes": null, "id": 5406, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5404, "name": "_symbol", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5192, "src": "5218:7:12", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 5405, "name": "symbol", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5345, "src": "5228:6:12", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "src": "5218:16:12", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "id": 5407, "nodeType": "ExpressionStatement", "src": "5218:16:12" }, { "expression": { "argumentTypes": null, "id": 5410, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5408, "name": "_minter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5206, "src": "5244:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 5409, "name": "minterAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5347, "src": "5254:13:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "5244:23:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 5411, "nodeType": "ExpressionStatement", "src": "5244:23:12" }, { "expression": { "argumentTypes": null, "id": 5414, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5412, "name": "_communityFeeCollector", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5201, "src": "5277:22:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 5413, "name": "feeCollector", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5353, "src": "5302:12:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "5277:37:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 5415, "nodeType": "ExpressionStatement", "src": "5277:37:12" }, { "expression": { "argumentTypes": null, "id": 5418, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5416, "name": "initialized", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5204, "src": "5324:11:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 5417, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "5338:4:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "5324:18:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 5419, "nodeType": "ExpressionStatement", "src": "5324:18:12" }, { "expression": { "argumentTypes": null, "id": 5420, "name": "initialized", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5204, "src": "5359:11:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 5357, "id": 5421, "nodeType": "Return", "src": "5352:18:12" } ] }, "documentation": "@dev _initialize\n Private function called on contract initialization.\n@param name refers to a new DataToken name\n@param symbol refers to a nea DataToken symbol\n@param minterAddress refers to an address that has minter rights\n@param cap the total ERC20 cap\n@param blob data string refering to the resolver for the metadata\n@param feeCollector it is the community fee collector address", "id": 5423, "implemented": true, "kind": "function", "modifiers": [], "name": "_initialize", "nodeType": "FunctionDefinition", "parameters": { "id": 5354, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5343, "name": "name", "nodeType": "VariableDeclaration", "scope": 5423, "src": "4427:18:12", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 5342, "name": "string", "nodeType": "ElementaryTypeName", "src": "4427:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5345, "name": "symbol", "nodeType": "VariableDeclaration", "scope": 5423, "src": "4455:20:12", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 5344, "name": "string", "nodeType": "ElementaryTypeName", "src": "4455:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5347, "name": "minterAddress", "nodeType": "VariableDeclaration", "scope": 5423, "src": "4485:21:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5346, "name": "address", "nodeType": "ElementaryTypeName", "src": "4485:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5349, "name": "cap", "nodeType": "VariableDeclaration", "scope": 5423, "src": "4516:11:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5348, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4516:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5351, "name": "blob", "nodeType": "VariableDeclaration", "scope": 5423, "src": "4537:18:12", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 5350, "name": "string", "nodeType": "ElementaryTypeName", "src": "4537:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5353, "name": "feeCollector", "nodeType": "VariableDeclaration", "scope": 5423, "src": "4565:20:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5352, "name": "address", "nodeType": "ElementaryTypeName", "src": "4565:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "4417:174:12" }, "returnParameters": { "id": 5357, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5356, "name": "", "nodeType": "VariableDeclaration", "scope": 5423, "src": "4624:4:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 5355, "name": "bool", "nodeType": "ElementaryTypeName", "src": "4624:4:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "4623:6:12" }, "scope": 5703, "src": "4397:980:12", "stateMutability": "nonpayable", "superFunction": null, "visibility": "private" }, { "body": { "id": 5448, "nodeType": "Block", "src": "5806:159:12", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5439, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5436, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5427, "src": "5855:5:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 5433, "name": "totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6095, "src": "5837:11:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 5434, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5837:13:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 5435, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 5785, "src": "5837:17:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 5437, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5837:24:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "id": 5438, "name": "_cap", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5196, "src": "5865:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5837:32:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "44617461546f6b656e54656d706c6174653a20636170206578636565646564", "id": 5440, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5884:33:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_db37e28d4a1d757900849adc30f19972d8f520005ecc78e1ba1f3c9b13636ae7", "typeString": "literal_string \"DataTokenTemplate: cap exceeded\"" }, "value": "DataTokenTemplate: cap exceeded" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_db37e28d4a1d757900849adc30f19972d8f520005ecc78e1ba1f3c9b13636ae7", "typeString": "literal_string \"DataTokenTemplate: cap exceeded\"" } ], "id": 5432, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 6555, 6556 ], "referencedDeclaration": 6556, "src": "5816:7:12", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 5441, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5816:111:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5442, "nodeType": "ExpressionStatement", "src": "5816:111:12" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5444, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5425, "src": "5943:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 5445, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5427, "src": "5952:5:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 5443, "name": "_mint", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6352, "src": "5937:5:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 5446, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5937:21:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5447, "nodeType": "ExpressionStatement", "src": "5937:21:12" } ] }, "documentation": "@dev mint\n Only the minter address can call it.\n msg.value should be higher than zero and gt or eq minting fee\n@param account refers to an address that token is going to be minted to.\n@param value refers to amount of tokens that is going to be minted.", "id": 5449, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 5430, "modifierName": { "argumentTypes": null, "id": 5429, "name": "onlyMinter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5287, "src": "5790:10:12", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "5790:10:12" } ], "name": "mint", "nodeType": "FunctionDefinition", "parameters": { "id": 5428, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5425, "name": "account", "nodeType": "VariableDeclaration", "scope": 5449, "src": "5717:15:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5424, "name": "address", "nodeType": "ElementaryTypeName", "src": "5717:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5427, "name": "value", "nodeType": "VariableDeclaration", "scope": 5449, "src": "5742:13:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5426, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5742:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "5707:54:12" }, "returnParameters": { "id": 5431, "nodeType": "ParameterList", "parameters": [], "src": "5806:0:12" }, "scope": 5703, "src": "5694:271:12", "stateMutability": "nonpayable", "superFunction": 5007, "visibility": "external" }, { "body": { "id": 5522, "nodeType": "Block", "src": "6532:753:12", "statements": [ { "assignments": [ 5461 ], "declarations": [ { "constant": false, "id": 5461, "name": "marketFee", "nodeType": "VariableDeclaration", "scope": 5522, "src": "6542:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5460, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6542:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 5463, "initialValue": { "argumentTypes": null, "hexValue": "30", "id": 5462, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "6562:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "nodeType": "VariableDeclarationStatement", "src": "6542:21:12" }, { "assignments": [ 5465 ], "declarations": [ { "constant": false, "id": 5465, "name": "communityFee", "nodeType": "VariableDeclaration", "scope": 5522, "src": "6573:20:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5464, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6573:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 5470, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5467, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5453, "src": "6622:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 5468, "name": "BASE_COMMUNITY_FEE_PERCENTAGE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5218, "src": "6643:29:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 5466, "name": "calculateFee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5702, "src": "6596:12:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 5469, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6596:86:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "6573:109:12" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5472, "name": "_communityFeeCollector", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5201, "src": "6701:22:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 5473, "name": "communityFee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5465, "src": "6725:12:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 5471, "name": "transfer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6126, "src": "6692:8:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) returns (bool)" } }, "id": 5474, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6692:46:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 5475, "nodeType": "ExpressionStatement", "src": "6692:46:12" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 5480, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5476, "name": "mrktFeeCollector", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5457, "src": "6751:16:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 5478, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "6779:1:12", "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": 5477, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "6771:7:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 5479, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6771:10:12", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "6751:30:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 5494, "nodeType": "IfStatement", "src": "6748:217:12", "trueBody": { "id": 5493, "nodeType": "Block", "src": "6782:183:12", "statements": [ { "expression": { "argumentTypes": null, "id": 5486, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5481, "name": "marketFee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5461, "src": "6796:9:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5483, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5453, "src": "6838:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 5484, "name": "BASE_MARKET_FEE_PERCENTAGE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5223, "src": "6863:26:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 5482, "name": "calculateFee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5702, "src": "6808:12:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 5485, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6808:95:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "6796:107:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 5487, "nodeType": "ExpressionStatement", "src": "6796:107:12" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5489, "name": "mrktFeeCollector", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5457, "src": "6926:16:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 5490, "name": "marketFee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5461, "src": "6944:9:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 5488, "name": "transfer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6126, "src": "6917:8:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) returns (bool)" } }, "id": 5491, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6917:37:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 5492, "nodeType": "ExpressionStatement", "src": "6917:37:12" } ] } }, { "assignments": [ 5496 ], "declarations": [ { "constant": false, "id": 5496, "name": "totalFee", "nodeType": "VariableDeclaration", "scope": 5522, "src": "6974:16:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5495, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6974:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 5501, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5499, "name": "marketFee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5461, "src": "7010:9:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 5497, "name": "communityFee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5465, "src": "6993:12:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 5498, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 5785, "src": "6993:16:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 5500, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "6993:27:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "6974:46:12" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5503, "name": "_minter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5206, "src": "7039:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5506, "name": "totalFee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5496, "src": "7059:8:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 5504, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5453, "src": "7048:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 5505, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 5801, "src": "7048:10:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 5507, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7048:20:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 5502, "name": "transfer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6126, "src": "7030:8:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) returns (bool)" } }, "id": 5508, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7030:39:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 5509, "nodeType": "ExpressionStatement", "src": "7030:39:12" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5511, "name": "consumer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5451, "src": "7111:8:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 5512, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6552, "src": "7133:3:12", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 5513, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "7133:10:12", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 5514, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5453, "src": "7157:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 5515, "name": "serviceId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5455, "src": "7177:9:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 5516, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6542, "src": "7200:5:12", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 5517, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "7200:15:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 5518, "name": "mrktFeeCollector", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5457, "src": "7229:16:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 5519, "name": "marketFee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5461, "src": "7259:9:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 5510, "name": "OrderStarted", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5239, "src": "7085:12:12", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256,uint256,uint256,address,uint256)" } }, "id": 5520, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7085:193:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5521, "nodeType": "EmitStatement", "src": "7080:198:12" } ] }, "documentation": "@dev startOrder\n called by payer or consumer prior ordering a service consume on a marketplace.\n@param consumer is the consumer address (payer could be different address)\n@param amount refers to amount of tokens that is going to be transfered.\n@param serviceId service index in the metadata\n@param mrktFeeCollector marketplace fee collector", "id": 5523, "implemented": true, "kind": "function", "modifiers": [], "name": "startOrder", "nodeType": "FunctionDefinition", "parameters": { "id": 5458, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5451, "name": "consumer", "nodeType": "VariableDeclaration", "scope": 5523, "src": "6403:16:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5450, "name": "address", "nodeType": "ElementaryTypeName", "src": "6403:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5453, "name": "amount", "nodeType": "VariableDeclaration", "scope": 5523, "src": "6429:14:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5452, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6429:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5455, "name": "serviceId", "nodeType": "VariableDeclaration", "scope": 5523, "src": "6453:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5454, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6453:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5457, "name": "mrktFeeCollector", "nodeType": "VariableDeclaration", "scope": 5523, "src": "6480:24:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5456, "name": "address", "nodeType": "ElementaryTypeName", "src": "6480:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "6393:117:12" }, "returnParameters": { "id": 5459, "nodeType": "ParameterList", "parameters": [], "src": "6532:0:12" }, "scope": 5703, "src": "6374:911:12", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { "id": 5557, "nodeType": "Block", "src": "7938:360:12", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5536, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5534, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5529, "src": "7953:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 5535, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "7963:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "7953:11:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 5545, "nodeType": "IfStatement", "src": "7948:159:12", "trueBody": { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5539, "name": "consumer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5527, "src": "8015:8:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 5540, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5529, "src": "8025:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 5538, "name": "transfer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6126, "src": "8006:8:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) returns (bool)" } }, "id": 5541, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8006:26:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "44617461546f6b656e54656d706c6174653a206661696c656420746f2066696e697368206f72646572", "id": 5542, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "8050:43:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_5beb845327406b92f3857bb14436e4b6862cb87998aca33ed8309c1bf98b5e76", "typeString": "literal_string \"DataTokenTemplate: failed to finish order\"" }, "value": "DataTokenTemplate: failed to finish order" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_5beb845327406b92f3857bb14436e4b6862cb87998aca33ed8309c1bf98b5e76", "typeString": "literal_string \"DataTokenTemplate: failed to finish order\"" } ], "id": 5537, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 6555, 6556 ], "referencedDeclaration": 6556, "src": "7981:7:12", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 5543, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "7981:126:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5544, "nodeType": "ExpressionStatement", "src": "7981:126:12" } }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5547, "name": "orderTxId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5525, "src": "8150:9:12", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "argumentTypes": null, "id": 5548, "name": "consumer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5527, "src": "8174:8:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 5549, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5529, "src": "8197:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 5550, "name": "serviceId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5531, "src": "8218:9:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 5551, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6552, "src": "8242:3:12", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 5552, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "8242:10:12", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 5553, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6542, "src": "8266:5:12", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 5554, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "8266:15:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 5546, "name": "OrderFinished", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5253, "src": "8123:13:12", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_uint256_$_t_uint256_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (bytes32,address,uint256,uint256,address,uint256)" } }, "id": 5555, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8123:168:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5556, "nodeType": "EmitStatement", "src": "8118:173:12" } ] }, "documentation": "@dev finishOrder\n called by provider prior completing service delivery only\n if there is a partial or full refund.\n@param orderTxId refers to the transaction Id of startOrder acts \n as a payment reference.\n@param consumer refers to an address that has consumed that service.\n@param amount refers to amount of tokens that is going to be transfered.\n@param serviceId service index in the metadata.", "id": 5558, "implemented": true, "kind": "function", "modifiers": [], "name": "finishOrder", "nodeType": "FunctionDefinition", "parameters": { "id": 5532, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5525, "name": "orderTxId", "nodeType": "VariableDeclaration", "scope": 5558, "src": "7814:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 5524, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "7814:7:12", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5527, "name": "consumer", "nodeType": "VariableDeclaration", "scope": 5558, "src": "7842:16:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5526, "name": "address", "nodeType": "ElementaryTypeName", "src": "7842:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5529, "name": "amount", "nodeType": "VariableDeclaration", "scope": 5558, "src": "7869:14:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5528, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "7869:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5531, "name": "serviceId", "nodeType": "VariableDeclaration", "scope": 5558, "src": "7893:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5530, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "7893:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "7804:112:12" }, "returnParameters": { "id": 5533, "nodeType": "ParameterList", "parameters": [], "src": "7938:0:12" }, "scope": 5703, "src": "7784:514:12", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { "id": 5575, "nodeType": "Block", "src": "8594:136:12", "statements": [ { "expression": { "argumentTypes": null, "id": 5567, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5565, "name": "_proposedMinter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5208, "src": "8604:15:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 5566, "name": "newMinter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5560, "src": "8622:9:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "8604:27:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 5568, "nodeType": "ExpressionStatement", "src": "8604:27:12" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 5570, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6552, "src": "8674:3:12", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 5571, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "8674:10:12", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 5572, "name": "_proposedMinter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5208, "src": "8698:15:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 5569, "name": "MinterProposed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5259, "src": "8646:14:12", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", "typeString": "function (address,address)" } }, "id": 5573, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8646:77:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5574, "nodeType": "EmitStatement", "src": "8641:82:12" } ] }, "documentation": "@dev proposeMinter\n It proposes a new token minter address.\n Only the current minter can call it.\n@param newMinter refers to a new token minter address.", "id": 5576, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 5563, "modifierName": { "argumentTypes": null, "id": 5562, "name": "onlyMinter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5287, "src": "8578:10:12", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "8578:10:12" } ], "name": "proposeMinter", "nodeType": "FunctionDefinition", "parameters": { "id": 5561, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5560, "name": "newMinter", "nodeType": "VariableDeclaration", "scope": 5576, "src": "8532:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5559, "name": "address", "nodeType": "ElementaryTypeName", "src": "8532:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "8531:19:12" }, "returnParameters": { "id": 5564, "nodeType": "ParameterList", "parameters": [], "src": "8594:0:12" }, "scope": 5703, "src": "8509:221:12", "stateMutability": "nonpayable", "superFunction": 5085, "visibility": "external" }, { "body": { "id": 5602, "nodeType": "Block", "src": "8925:305:12", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 5583, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 5580, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6552, "src": "8956:3:12", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 5581, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "8956:10:12", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 5582, "name": "_proposedMinter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5208, "src": "8970:15:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "8956:29:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "44617461546f6b656e54656d706c6174653a20696e76616c69642070726f706f736564206d696e7465722061646472657373", "id": 5584, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "8999:52:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_7af8769e1ae364fd1070260138caf964484121753b4fb103f09e0f3de065c059", "typeString": "literal_string \"DataTokenTemplate: invalid proposed minter address\"" }, "value": "DataTokenTemplate: invalid proposed minter address" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_7af8769e1ae364fd1070260138caf964484121753b4fb103f09e0f3de065c059", "typeString": "literal_string \"DataTokenTemplate: invalid proposed minter address\"" } ], "id": 5579, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 6555, 6556 ], "referencedDeclaration": 6556, "src": "8935:7:12", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 5585, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "8935:126:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5586, "nodeType": "ExpressionStatement", "src": "8935:126:12" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5588, "name": "_minter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5206, "src": "9104:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 5589, "name": "_proposedMinter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5208, "src": "9125:15:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 5587, "name": "MinterApproved", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5265, "src": "9076:14:12", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", "typeString": "function (address,address)" } }, "id": 5590, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9076:74:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5591, "nodeType": "EmitStatement", "src": "9071:79:12" }, { "expression": { "argumentTypes": null, "id": 5594, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5592, "name": "_minter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5206, "src": "9160:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 5593, "name": "_proposedMinter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5208, "src": "9170:15:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "9160:25:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 5595, "nodeType": "ExpressionStatement", "src": "9160:25:12" }, { "expression": { "argumentTypes": null, "id": 5600, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 5596, "name": "_proposedMinter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5208, "src": "9195:15:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 5598, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "9221:1:12", "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": 5597, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "9213:7:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 5599, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "9213:10:12", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "9195:28:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 5601, "nodeType": "ExpressionStatement", "src": "9195:28:12" } ] }, "documentation": "@dev approveMinter\n It approves a new token minter address.\n Only the current minter can call it.", "id": 5603, "implemented": true, "kind": "function", "modifiers": [], "name": "approveMinter", "nodeType": "FunctionDefinition", "parameters": { "id": 5577, "nodeType": "ParameterList", "parameters": [], "src": "8901:2:12" }, "returnParameters": { "id": 5578, "nodeType": "ParameterList", "parameters": [], "src": "8925:0:12" }, "scope": 5703, "src": "8879:351:12", "stateMutability": "nonpayable", "superFunction": 5088, "visibility": "external" }, { "body": { "id": 5610, "nodeType": "Block", "src": "9392:29:12", "statements": [ { "expression": { "argumentTypes": null, "id": 5608, "name": "_name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5190, "src": "9409:5:12", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "functionReturnParameters": 5607, "id": 5609, "nodeType": "Return", "src": "9402:12:12" } ] }, "documentation": "@dev name\n It returns the token name.\n@return DataToken name.", "id": 5611, "implemented": true, "kind": "function", "modifiers": [], "name": "name", "nodeType": "FunctionDefinition", "parameters": { "id": 5604, "nodeType": "ParameterList", "parameters": [], "src": "9352:2:12" }, "returnParameters": { "id": 5607, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5606, "name": "", "nodeType": "VariableDeclaration", "scope": 5611, "src": "9377:13:12", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 5605, "name": "string", "nodeType": "ElementaryTypeName", "src": "9377:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "9376:15:12" }, "scope": 5703, "src": "9339:82:12", "stateMutability": "view", "superFunction": 5017, "visibility": "external" }, { "body": { "id": 5618, "nodeType": "Block", "src": "9591:31:12", "statements": [ { "expression": { "argumentTypes": null, "id": 5616, "name": "_symbol", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5192, "src": "9608:7:12", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "functionReturnParameters": 5615, "id": 5617, "nodeType": "Return", "src": "9601:14:12" } ] }, "documentation": "@dev symbol\n It returns the token symbol.\n@return DataToken symbol.", "id": 5619, "implemented": true, "kind": "function", "modifiers": [], "name": "symbol", "nodeType": "FunctionDefinition", "parameters": { "id": 5612, "nodeType": "ParameterList", "parameters": [], "src": "9551:2:12" }, "returnParameters": { "id": 5615, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5614, "name": "", "nodeType": "VariableDeclaration", "scope": 5619, "src": "9576:13:12", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 5613, "name": "string", "nodeType": "ElementaryTypeName", "src": "9576:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "9575:15:12" }, "scope": 5703, "src": "9536:86:12", "stateMutability": "view", "superFunction": 5022, "visibility": "external" }, { "body": { "id": 5626, "nodeType": "Block", "src": "9800:29:12", "statements": [ { "expression": { "argumentTypes": null, "id": 5624, "name": "_blob", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5194, "src": "9817:5:12", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "functionReturnParameters": 5623, "id": 5625, "nodeType": "Return", "src": "9810:12:12" } ] }, "documentation": "@dev blob\n It returns the blob (e.g https://123.com).\n@return DataToken blob.", "id": 5627, "implemented": true, "kind": "function", "modifiers": [], "name": "blob", "nodeType": "FunctionDefinition", "parameters": { "id": 5620, "nodeType": "ParameterList", "parameters": [], "src": "9760:2:12" }, "returnParameters": { "id": 5623, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5622, "name": "", "nodeType": "VariableDeclaration", "scope": 5627, "src": "9785:13:12", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 5621, "name": "string", "nodeType": "ElementaryTypeName", "src": "9785:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "9784:15:12" }, "scope": 5703, "src": "9747:82:12", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": { "id": 5634, "nodeType": "Block", "src": "10045:33:12", "statements": [ { "expression": { "argumentTypes": null, "id": 5632, "name": "_decimals", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5199, "src": "10062:9:12", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "functionReturnParameters": 5631, "id": 5633, "nodeType": "Return", "src": "10055:16:12" } ] }, "documentation": "@dev decimals\n It returns the token decimals.\n how many supported decimal points\n@return DataToken decimals.", "id": 5635, "implemented": true, "kind": "function", "modifiers": [], "name": "decimals", "nodeType": "FunctionDefinition", "parameters": { "id": 5628, "nodeType": "ParameterList", "parameters": [], "src": "10013:2:12" }, "returnParameters": { "id": 5631, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5630, "name": "", "nodeType": "VariableDeclaration", "scope": 5635, "src": "10038:5:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 5629, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "10038:5:12", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": null, "visibility": "internal" } ], "src": "10037:7:12" }, "scope": 5703, "src": "9996:82:12", "stateMutability": "view", "superFunction": 5027, "visibility": "external" }, { "body": { "id": 5642, "nodeType": "Block", "src": "10229:28:12", "statements": [ { "expression": { "argumentTypes": null, "id": 5640, "name": "_cap", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5196, "src": "10246:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 5639, "id": 5641, "nodeType": "Return", "src": "10239:11:12" } ] }, "documentation": "@dev cap\n it returns the capital.\n@return DataToken cap.", "id": 5643, "implemented": true, "kind": "function", "modifiers": [], "name": "cap", "nodeType": "FunctionDefinition", "parameters": { "id": 5636, "nodeType": "ParameterList", "parameters": [], "src": "10194:2:12" }, "returnParameters": { "id": 5639, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5638, "name": "", "nodeType": "VariableDeclaration", "scope": 5643, "src": "10220:7:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5637, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10220:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "10219:9:12" }, "scope": 5703, "src": "10182:75:12", "stateMutability": "view", "superFunction": 5032, "visibility": "external" }, { "body": { "id": 5655, "nodeType": "Block", "src": "10532:44:12", "statements": [ { "expression": { "argumentTypes": null, "components": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 5652, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5650, "name": "_minter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5206, "src": "10550:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 5651, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5645, "src": "10561:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "10550:18:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "id": 5653, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "10549:20:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 5649, "id": 5654, "nodeType": "Return", "src": "10542:27:12" } ] }, "documentation": "@dev isMinter\n It takes the address and checks whether it has a minter role.\n@param account refers to the address.\n@return true if account has a minter role.", "id": 5656, "implemented": true, "kind": "function", "modifiers": [], "name": "isMinter", "nodeType": "FunctionDefinition", "parameters": { "id": 5646, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5645, "name": "account", "nodeType": "VariableDeclaration", "scope": 5656, "src": "10487:15:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5644, "name": "address", "nodeType": "ElementaryTypeName", "src": "10487:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "10486:17:12" }, "returnParameters": { "id": 5649, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5648, "name": "", "nodeType": "VariableDeclaration", "scope": 5656, "src": "10526:4:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 5647, "name": "bool", "nodeType": "ElementaryTypeName", "src": "10526:4:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "10525:6:12" }, "scope": 5703, "src": "10469:107:12", "stateMutability": "view", "superFunction": 5039, "visibility": "external" }, { "body": { "id": 5663, "nodeType": "Block", "src": "10729:31:12", "statements": [ { "expression": { "argumentTypes": null, "id": 5661, "name": "_minter", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5206, "src": "10746:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "functionReturnParameters": 5660, "id": 5662, "nodeType": "Return", "src": "10739:14:12" } ] }, "documentation": "@dev minter\n@return minter's address.", "id": 5664, "implemented": true, "kind": "function", "modifiers": [], "name": "minter", "nodeType": "FunctionDefinition", "parameters": { "id": 5657, "nodeType": "ParameterList", "parameters": [], "src": "10666:2:12" }, "returnParameters": { "id": 5660, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5659, "name": "", "nodeType": "VariableDeclaration", "scope": 5664, "src": "10716:7:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5658, "name": "address", "nodeType": "ElementaryTypeName", "src": "10716:7:12", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "10715:9:12" }, "scope": 5703, "src": "10651:109:12", "stateMutability": "view", "superFunction": 5012, "visibility": "external" }, { "body": { "id": 5671, "nodeType": "Block", "src": "10973:35:12", "statements": [ { "expression": { "argumentTypes": null, "id": 5669, "name": "initialized", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5204, "src": "10990:11:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 5668, "id": 5670, "nodeType": "Return", "src": "10983:18:12" } ] }, "documentation": "@dev isInitialized\n It checks whether the contract is initialized.\n@return true if the contract is initialized.", "id": 5672, "implemented": true, "kind": "function", "modifiers": [], "name": "isInitialized", "nodeType": "FunctionDefinition", "parameters": { "id": 5665, "nodeType": "ParameterList", "parameters": [], "src": "10942:2:12" }, "returnParameters": { "id": 5668, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5667, "name": "", "nodeType": "VariableDeclaration", "scope": 5672, "src": "10967:4:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 5666, "name": "bool", "nodeType": "ElementaryTypeName", "src": "10967:4:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "10966:6:12" }, "scope": 5703, "src": "10920:88:12", "stateMutability": "view", "superFunction": 5044, "visibility": "external" }, { "body": { "id": 5701, "nodeType": "Block", "src": "11392:134:12", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5683, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5681, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5674, "src": "11405:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 5682, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "11415:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "11405:11:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 5686, "nodeType": "IfStatement", "src": "11402:24:12", "trueBody": { "expression": { "argumentTypes": null, "hexValue": "30", "id": 5684, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "11425:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "functionReturnParameters": 5680, "id": 5685, "nodeType": "Return", "src": "11418:8:12" } }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 5689, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5687, "name": "feePercentage", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5676, "src": "11439:13:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 5688, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "11456:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "11439:18:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 5692, "nodeType": "IfStatement", "src": "11436:31:12", "trueBody": { "expression": { "argumentTypes": null, "hexValue": "30", "id": 5690, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "11466:1:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "functionReturnParameters": 5680, "id": 5691, "nodeType": "Return", "src": "11459:8:12" } }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5698, "name": "BASE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5213, "src": "11514:4:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 5695, "name": "feePercentage", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5676, "src": "11495:13:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 5693, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5674, "src": "11484:6:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 5694, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 5862, "src": "11484:10:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 5696, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "11484:25:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 5697, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 5878, "src": "11484:29:12", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 5699, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "11484:35:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 5680, "id": 5700, "nodeType": "Return", "src": "11477:42:12" } ] }, "documentation": "@dev calculateFee\n giving a fee percentage, and amount it calculates the actual fee\n@param amount the amount of token\n@param feePercentage the fee percentage \n@return the token fee.", "id": 5702, "implemented": true, "kind": "function", "modifiers": [], "name": "calculateFee", "nodeType": "FunctionDefinition", "parameters": { "id": 5677, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5674, "name": "amount", "nodeType": "VariableDeclaration", "scope": 5702, "src": "11283:14:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5673, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "11283:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 5676, "name": "feePercentage", "nodeType": "VariableDeclaration", "scope": 5702, "src": "11307:21:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5675, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "11307:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "11273:61:12" }, "returnParameters": { "id": 5680, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5679, "name": "", "nodeType": "VariableDeclaration", "scope": 5702, "src": "11379:7:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5678, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "11379:7:12", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "11378:9:12" }, "scope": 5703, "src": "11252:274:12", "stateMutability": "pure", "superFunction": null, "visibility": "public" } ], "scope": 5704, "src": "488:11040:12" } ], "src": "0:11529:12" }, "compiler": { "name": "solc", "version": "0.5.7+commit.6da8b019.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.2.4", "updatedAt": "2020-10-22T12:03:05.114Z", "devdoc": { "details": "DataTokenTemplate is an ERC20 compliant token template Used by the factory contract as a bytecode reference to deploy new DataTokens.", "methods": { "allowance(address,address)": { "details": "See {IERC20-allowance}." }, "approve(address,uint256)": { "details": "See {IERC20-approve}. * Requirements: * - `spender` cannot be the zero address." }, "approveMinter()": { "details": "approveMinter It approves a new token minter address. Only the current minter can call it." }, "balanceOf(address)": { "details": "See {IERC20-balanceOf}." }, "blob()": { "details": "blob It returns the blob (e.g https://123.com).", "return": "DataToken blob." }, "calculateFee(uint256,uint256)": { "details": "calculateFee giving a fee percentage, and amount it calculates the actual fee", "params": { "amount": "the amount of token", "feePercentage": "the fee percentage " }, "return": "the token fee." }, "cap()": { "details": "cap it returns the capital.", "return": "DataToken cap." }, "constructor": { "details": "constructor Called prior contract deployment", "params": { "blob": "data string refering to the resolver for the metadata", "cap": "the total ERC20 cap", "feeCollector": "it is the community fee collector address", "minterAddress": "refers to an address that has minter role", "name": "refers to a template DataToken name", "symbol": "refers to a template DataToken symbol" } }, "decimals()": { "details": "decimals It returns the token decimals. how many supported decimal points", "return": "DataToken decimals." }, "decreaseAllowance(address,uint256)": { "details": "Atomically decreases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." }, "finishOrder(bytes32,address,uint256,uint256)": { "details": "finishOrder called by provider prior completing service delivery only if there is a partial or full refund.", "params": { "amount": "refers to amount of tokens that is going to be transfered.", "consumer": "refers to an address that has consumed that service.", "orderTxId": "refers to the transaction Id of startOrder acts as a payment reference.", "serviceId": "service index in the metadata." } }, "increaseAllowance(address,uint256)": { "details": "Atomically increases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address." }, "initialize(string,string,address,uint256,string,address)": { "details": "initialize Called prior contract initialization (e.g creating new DataToken instance) Calls private _initialize function. Only if contract is not initialized.", "params": { "blob": "data string refering to the resolver for the metadata", "cap": "the total ERC20 cap", "feeCollector": "it is the community fee collector address", "minterAddress": "refers to an address that has minter rights", "name": "refers to a new DataToken name", "symbol": "refers to a nea DataToken symbol" } }, "isInitialized()": { "details": "isInitialized It checks whether the contract is initialized.", "return": "true if the contract is initialized." }, "isMinter(address)": { "details": "isMinter It takes the address and checks whether it has a minter role.", "params": { "account": "refers to the address." }, "return": "true if account has a minter role." }, "mint(address,uint256)": { "details": "mint Only the minter address can call it. msg.value should be higher than zero and gt or eq minting fee", "params": { "account": "refers to an address that token is going to be minted to.", "value": "refers to amount of tokens that is going to be minted." } }, "minter()": { "details": "minter", "return": "minter's address." }, "name()": { "details": "name It returns the token name.", "return": "DataToken name." }, "proposeMinter(address)": { "details": "proposeMinter It proposes a new token minter address. Only the current minter can call it.", "params": { "newMinter": "refers to a new token minter address." } }, "startOrder(address,uint256,uint256,address)": { "details": "startOrder called by payer or consumer prior ordering a service consume on a marketplace.", "params": { "amount": "refers to amount of tokens that is going to be transfered.", "consumer": "is the consumer address (payer could be different address)", "mrktFeeCollector": "marketplace fee collector", "serviceId": "service index in the metadata" } }, "symbol()": { "details": "symbol It returns the token symbol.", "return": "DataToken symbol." }, "totalSupply()": { "details": "See {IERC20-totalSupply}." }, "transfer(address,uint256)": { "details": "See {IERC20-transfer}. * Requirements: * - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`." }, "transferFrom(address,address,uint256)": { "details": "See {IERC20-transferFrom}. * Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; * Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for `sender`'s tokens of at least `amount`." } }, "title": "DataTokenTemplate " }, "userdoc": { "methods": {} } }