jcc-solidity-utils
Version:
jcc solidity utils
777 lines (776 loc) • 117 kB
JSON
{
"contractName": "MockBalanceList",
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_addr",
"type": "address"
},
{
"name": "_amount",
"type": "uint256"
}
],
"name": "add",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_addr",
"type": "address"
},
{
"name": "_amount",
"type": "uint256"
}
],
"name": "sub",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_addr",
"type": "address"
}
],
"name": "balance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_idx",
"type": "uint256"
}
],
"name": "get",
"outputs": [
{
"components": [
{
"name": "addr",
"type": "address"
},
{
"name": "idx",
"type": "uint256"
},
{
"name": "balance",
"type": "uint256"
}
],
"name": "",
"type": "tuple"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "from",
"type": "uint256"
},
{
"name": "count",
"type": "uint256"
}
],
"name": "getList",
"outputs": [
{
"components": [
{
"name": "addr",
"type": "address"
},
{
"name": "idx",
"type": "uint256"
},
{
"name": "balance",
"type": "uint256"
}
],
"name": "",
"type": "tuple[]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "count",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_addr\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"sub\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_idx\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"components\":[{\"name\":\"addr\",\"type\":\"address\"},{\"name\":\"idx\",\"type\":\"uint256\"},{\"name\":\"balance\",\"type\":\"uint256\"}],\"name\":\"\",\"type\":\"tuple\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"from\",\"type\":\"uint256\"},{\"name\":\"count\",\"type\":\"uint256\"}],\"name\":\"getList\",\"outputs\":[{\"components\":[{\"name\":\"addr\",\"type\":\"address\"},{\"name\":\"idx\",\"type\":\"uint256\"},{\"name\":\"balance\",\"type\":\"uint256\"}],\"name\":\"\",\"type\":\"tuple[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"balance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_addr\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"add\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/mock/MockBalanceList.sol\":\"MockBalanceList\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/BalanceList.sol\":{\"keccak256\":\"0x2906ed3a67d18deb64a973c72383c5973e99261b580f35334358687019259d1d\",\"urls\":[\"bzzr://b0b2d9f12203b12bc44278243e2855d059a7a369f1606e25aff9ac639fa13468\"]},\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x239546071316c89d3bbc9e61b2ccae270a4493bbd2f7c240052f533807d50ab7\",\"urls\":[\"bzzr://267bf48e0a30f7b671aa3c98a6b27ffe7bc64efd6533f49e54188b520baa94c5\"]},\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/mock/MockBalanceList.sol\":{\"keccak256\":\"0x0c09ce7b46e26eb0205ce26f79c49f11c05eb8184d74f46e30722352354c2bd5\",\"urls\":[\"bzzr://c1c8f9ef6deb3080d05c7ec31b3ede3ec492f65ee20e28aa7f49fd6432b2515f\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50610c83806100206000396000f3006080604052600436106100775763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306661abd811461007c57806326ffee08146100a75780639507d39a146100c7578063a9816b08146100f4578063e3d670d714610121578063f5d82b6b14610141575b600080fd5b34801561008857600080fd5b50610091610161565b60405161009e9190610c25565b60405180910390f35b3480156100b357600080fd5b506100916100c236600461097d565b610173565b3480156100d357600080fd5b506100e76100e23660046109b7565b61018f565b60405161009e9190610c17565b34801561010057600080fd5b5061011461010f3660046109d5565b6101a8565b60405161009e9190610bb6565b34801561012d57600080fd5b5061009161013c366004610957565b6101bc565b34801561014d57600080fd5b5061009161015c36600461097d565b6101ce565b600061016d60006101e1565b90505b90565b600061018681848463ffffffff6101e816565b90505b92915050565b6101976108a0565b61018960008363ffffffff61036916565b60606101866000848463ffffffff6103f216565b6000610189818363ffffffff61050816565b600061018681848463ffffffff61056316565b6001015490565b60006101f48484610632565b151561021e5760405160e560020a62461bcd02815260040161021590610be7565b60405180910390fd5b600160a060020a03831660009081526020859052604090205460018501805461026c92859291811061024c57fe5b90600052602060002090600302016002015461069490919063ffffffff16565b600160a060020a038416600090815260208690526040902054600186018054909190811061029657fe5b6000918252602080832060026003909302019190910192909255600160a060020a038516815290859052604090205460018501805490919081106102d657fe5b90600052602060002090600302016002015460001415610323576102fa84846106a6565b151561031b5760405160e560020a62461bcd02815260040161021590610bc7565b506000610362565b600160a060020a038316600090815260208590526040902054600185018054909190811061034d57fe5b90600052602060002090600302016002015490505b9392505050565b6103716108a0565b600183015482106103975760405160e560020a62461bcd02815260040161021590610c07565b600183018054839081106103a757fe5b60009182526020918290206040805160608101825260039093029091018054600160a060020a0316835260018101549383019390935260029092015491810191909152905092915050565b60606000818180851161041a5760405160e560020a62461bcd02815260040161021590610bd7565b600092508460405190808252806020026020018201604052801561045857816020015b6104456108a0565b81526020019060019003908161043d5790505b5091508590505b60018701548110156104fe5784831415610478576104fe565b6001870180548290811061048857fe5b60009182526020918290206040805160608101825260039093029091018054600160a060020a031683526001810154938301939093526002909201549181019190915282518390859081106104d957fe5b602090810290910101526104f483600163ffffffff6107fe16565b925060010161045f565b5095945050505050565b60006105148383610632565b61051f576000610186565b600160a060020a038216600090815260208490526040902054600184018054909190811061054957fe5b906000526020600020906003020160020154905092915050565b600061056f8484610632565b1561060657600160a060020a0383166000908152602085905260409020546001850180546105c29285929181106105a257fe5b9060005260206000209060030201600201546107fe90919063ffffffff16565b600160a060020a03841660009081526020869052604090205460018601805490919081106105ec57fe5b906000526020600020906003020160020181905550610323565b61061184848461080d565b15156103235760405160e560020a62461bcd02815260040161021590610bf7565b6001820154600090151561064857506000610189565b600160a060020a038216600081815260208590526040902054600185018054909190811061067257fe5b6000918252602090912060039091020154600160a060020a0316149392505050565b6000828211156106a057fe5b50900390565b60008060006106b58585610632565b15156106c457600092506107f6565b600160a060020a03841660009081526020869052604081205460018701805490919081106106ee57fe5b906000526020600020906003020160020154111561070f57600092506107f6565b600160a060020a03841660009081526020869052604090205460018087018054929450916107429163ffffffff61069416565b8154811061074c57fe5b9060005260206000209060030201905080856001018381548110151561076e57fe5b600091825260208083208454600390930201805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039384161781556001808601548183015560029586015495909101949094558454909116825287905260409020839055858101546107e39163ffffffff61069416565b6107f060018701826108cb565b50600192505b505092915050565b60008282018381101561036257fe5b60006108176108a0565b505060408051606081018252600160a060020a039384168082526001868101805460208086018281528688019889528285018455600093845281842096516003909302909601805473ffffffffffffffffffffffffffffffffffffffff191692909916919091178855935187830181905595516002909701969096559085529490529091205590565b6060604051908101604052806000600160a060020a0316815260200160008152602001600081525090565b8154818355818111156108f7576003028160030283600052602060002091820191016108f791906108fc565b505050565b61017091905b8082111561093b57805473ffffffffffffffffffffffffffffffffffffffff191681556000600182018190556002820155600301610902565b5090565b60006101868235610c3d565b60006101868235610170565b60006020828403121561096957600080fd5b6000610975848461093f565b949350505050565b6000806040838503121561099057600080fd5b600061099c858561093f565b92505060206109ad8582860161094b565b9150509250929050565b6000602082840312156109c957600080fd5b6000610975848461094b565b600080604083850312156109e857600080fd5b600061099c858561094b565b6109fd81610c3d565b82525050565b6000610a0e82610c39565b808452602084019350610a2083610c33565b60005b82811015610a5057610a36868351610b70565b610a3f82610c33565b606096909601959150600101610a23565b5093949350505050565b601081527f72656d6f76652064617461206661696c00000000000000000000000000000000602082015260400190565b601f81527f636f756e74206e756d626572206d75737420626967676572207468616e203000602082015260400190565b601c81527f63616e206e6f7420737562206e6f20657869737420656c656d656e7400000000602082015260400190565b601081527f696e736572742064617461206661696c00000000000000000000000000000000602082015260400190565b602381527f696e646578206d75737420736d616c6c207468616e2063757272656e7420636f60208201527f756e740000000000000000000000000000000000000000000000000000000000604082015260600190565b80516060830190610b8184826109f4565b506020820151610b946020850182610bad565b506040820151610ba76040850182610bad565b50505050565b6109fd81610170565b602080825281016101868184610a03565b6020808252810161018981610a5a565b6020808252810161018981610a8a565b6020808252810161018981610aba565b6020808252810161018981610aea565b6020808252810161018981610b1a565b606081016101898284610b70565b602081016101898284610bad565b60200190565b5190565b600160a060020a0316905600a265627a7a72305820e2eb7fb25b6105a928319c16dc626e1d23d24ea4f341ffa5a1654b05169ad4866c6578706572696d656e74616cf50037",
"deployedBytecode": "0x6080604052600436106100775763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306661abd811461007c57806326ffee08146100a75780639507d39a146100c7578063a9816b08146100f4578063e3d670d714610121578063f5d82b6b14610141575b600080fd5b34801561008857600080fd5b50610091610161565b60405161009e9190610c25565b60405180910390f35b3480156100b357600080fd5b506100916100c236600461097d565b610173565b3480156100d357600080fd5b506100e76100e23660046109b7565b61018f565b60405161009e9190610c17565b34801561010057600080fd5b5061011461010f3660046109d5565b6101a8565b60405161009e9190610bb6565b34801561012d57600080fd5b5061009161013c366004610957565b6101bc565b34801561014d57600080fd5b5061009161015c36600461097d565b6101ce565b600061016d60006101e1565b90505b90565b600061018681848463ffffffff6101e816565b90505b92915050565b6101976108a0565b61018960008363ffffffff61036916565b60606101866000848463ffffffff6103f216565b6000610189818363ffffffff61050816565b600061018681848463ffffffff61056316565b6001015490565b60006101f48484610632565b151561021e5760405160e560020a62461bcd02815260040161021590610be7565b60405180910390fd5b600160a060020a03831660009081526020859052604090205460018501805461026c92859291811061024c57fe5b90600052602060002090600302016002015461069490919063ffffffff16565b600160a060020a038416600090815260208690526040902054600186018054909190811061029657fe5b6000918252602080832060026003909302019190910192909255600160a060020a038516815290859052604090205460018501805490919081106102d657fe5b90600052602060002090600302016002015460001415610323576102fa84846106a6565b151561031b5760405160e560020a62461bcd02815260040161021590610bc7565b506000610362565b600160a060020a038316600090815260208590526040902054600185018054909190811061034d57fe5b90600052602060002090600302016002015490505b9392505050565b6103716108a0565b600183015482106103975760405160e560020a62461bcd02815260040161021590610c07565b600183018054839081106103a757fe5b60009182526020918290206040805160608101825260039093029091018054600160a060020a0316835260018101549383019390935260029092015491810191909152905092915050565b60606000818180851161041a5760405160e560020a62461bcd02815260040161021590610bd7565b600092508460405190808252806020026020018201604052801561045857816020015b6104456108a0565b81526020019060019003908161043d5790505b5091508590505b60018701548110156104fe5784831415610478576104fe565b6001870180548290811061048857fe5b60009182526020918290206040805160608101825260039093029091018054600160a060020a031683526001810154938301939093526002909201549181019190915282518390859081106104d957fe5b602090810290910101526104f483600163ffffffff6107fe16565b925060010161045f565b5095945050505050565b60006105148383610632565b61051f576000610186565b600160a060020a038216600090815260208490526040902054600184018054909190811061054957fe5b906000526020600020906003020160020154905092915050565b600061056f8484610632565b1561060657600160a060020a0383166000908152602085905260409020546001850180546105c29285929181106105a257fe5b9060005260206000209060030201600201546107fe90919063ffffffff16565b600160a060020a03841660009081526020869052604090205460018601805490919081106105ec57fe5b906000526020600020906003020160020181905550610323565b61061184848461080d565b15156103235760405160e560020a62461bcd02815260040161021590610bf7565b6001820154600090151561064857506000610189565b600160a060020a038216600081815260208590526040902054600185018054909190811061067257fe5b6000918252602090912060039091020154600160a060020a0316149392505050565b6000828211156106a057fe5b50900390565b60008060006106b58585610632565b15156106c457600092506107f6565b600160a060020a03841660009081526020869052604081205460018701805490919081106106ee57fe5b906000526020600020906003020160020154111561070f57600092506107f6565b600160a060020a03841660009081526020869052604090205460018087018054929450916107429163ffffffff61069416565b8154811061074c57fe5b9060005260206000209060030201905080856001018381548110151561076e57fe5b600091825260208083208454600390930201805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039384161781556001808601548183015560029586015495909101949094558454909116825287905260409020839055858101546107e39163ffffffff61069416565b6107f060018701826108cb565b50600192505b505092915050565b60008282018381101561036257fe5b60006108176108a0565b505060408051606081018252600160a060020a039384168082526001868101805460208086018281528688019889528285018455600093845281842096516003909302909601805473ffffffffffffffffffffffffffffffffffffffff191692909916919091178855935187830181905595516002909701969096559085529490529091205590565b6060604051908101604052806000600160a060020a0316815260200160008152602001600081525090565b8154818355818111156108f7576003028160030283600052602060002091820191016108f791906108fc565b505050565b61017091905b8082111561093b57805473ffffffffffffffffffffffffffffffffffffffff191681556000600182018190556002820155600301610902565b5090565b60006101868235610c3d565b60006101868235610170565b60006020828403121561096957600080fd5b6000610975848461093f565b949350505050565b6000806040838503121561099057600080fd5b600061099c858561093f565b92505060206109ad8582860161094b565b9150509250929050565b6000602082840312156109c957600080fd5b6000610975848461094b565b600080604083850312156109e857600080fd5b600061099c858561094b565b6109fd81610c3d565b82525050565b6000610a0e82610c39565b808452602084019350610a2083610c33565b60005b82811015610a5057610a36868351610b70565b610a3f82610c33565b606096909601959150600101610a23565b5093949350505050565b601081527f72656d6f76652064617461206661696c00000000000000000000000000000000602082015260400190565b601f81527f636f756e74206e756d626572206d75737420626967676572207468616e203000602082015260400190565b601c81527f63616e206e6f7420737562206e6f20657869737420656c656d656e7400000000602082015260400190565b601081527f696e736572742064617461206661696c00000000000000000000000000000000602082015260400190565b602381527f696e646578206d75737420736d616c6c207468616e2063757272656e7420636f60208201527f756e740000000000000000000000000000000000000000000000000000000000604082015260600190565b80516060830190610b8184826109f4565b506020820151610b946020850182610bad565b506040820151610ba76040850182610bad565b50505050565b6109fd81610170565b602080825281016101868184610a03565b6020808252810161018981610a5a565b6020808252810161018981610a8a565b6020808252810161018981610aba565b6020808252810161018981610aea565b6020808252810161018981610b1a565b606081016101898284610b70565b602081016101898284610bad565b60200190565b5190565b600160a060020a0316905600a265627a7a72305820e2eb7fb25b6105a928319c16dc626e1d23d24ea4f341ffa5a1654b05169ad4866c6578706572696d656e74616cf50037",
"sourceMap": "138:822:24:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;138:822:24;;;;;;;",
"deployedSourceMap": "138:822:24:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;877:81;;8:9:-1;5:2;;;30:1;27;20:12;5:2;877:81:24;;;;;;;;;;;;;;;;;;;;372:116;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;372:116:24;;;;;;;;;599:112;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;599:112:24;;;;;;;;;;;;;;;;;715:158;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;715:158:24;;;;;;;;;;;;;;;;;492:103;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;492:103:24;;;;;;;;;252:116;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;252:116:24;;;;;;;;;877:81;915:7;937:16;:8;:14;:16::i;:::-;930:23;;877:81;;:::o;372:116::-;433:7;455:28;433:7;468:5;475:7;455:28;:12;:28;:::i;:::-;448:35;;372:116;;;;;:::o;599:112::-;647:19;;:::i;:::-;688:18;:8;701:4;688:18;:12;:18;:::i;715:158::-;794:21;839:29;:8;856:4;862:5;839:29;:16;:29;:::i;492:103::-;545:7;567:23;545:7;584:5;567:23;:16;:23;:::i;252:116::-;313:7;335:28;313:7;348:5;355:7;335:28;:12;:28;:::i;2356:106:13:-;2441:9;;:16;;2356:106::o;1870:482::-;1974:7;1997:18;2003:4;2009:5;1997;:18::i;:::-;1989:59;;;;;;-1:-1:-1;;;;;1989:59:13;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2106:19:13;;:12;:19;;;;;;;;;;;2096:9;;;:30;;:65;;2153:7;;2096:9;:30;;;;;;;;;;;;;;;;:45;;;:56;;:65;;;;:::i;:::-;-1:-1:-1;;;;;2065:19:13;;:12;:19;;;;;;;;;;;2055:9;;;:30;;:9;;2065:19;2055:30;;;;;;;;;;;;;;:38;:30;;;;;:38;;;;:106;;;;-1:-1:-1;;;;;2182:19:13;;;;;;;;;;;;2172:9;;;:30;;:9;;2182:19;2172:30;;;;;;;;;;;;;;;;:38;;;2214:1;2172:43;2168:128;;;2233:19;2240:4;2246:5;2233:6;:19::i;:::-;2225:48;;;;;;-1:-1:-1;;;;;2225:48:13;;;;;;;;;-1:-1:-1;2288:1:13;2281:8;;2168:128;-1:-1:-1;;;;;2319:19:13;;:12;:19;;;;;;;;;;;2309:9;;;:30;;:9;;2319:19;2309:30;;;;;;;;;;;;;;;;:38;;;2302:45;;1870:482;;;;;;:::o;2654:219::-;2742:7;;:::i;:::-;2782:9;;;:16;2774:24;;2766:72;;;;-1:-1:-1;;;;;2766:72:13;;;;;;;;;2852:9;;;:16;;2862:5;;2852:16;;;;;;;;;;;;;;;2845:23;;;;;;;;2852:16;;;;;;;2845:23;;-1:-1:-1;;;;;2845:23:13;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2654:219:13;;;;:::o;2952:457::-;3063:9;3148:12;3063:9;3148:12;3095:10;;;3087:54;;;;-1:-1:-1;;;;;3087:54:13;;;;;;;;;3163:1;3148:16;;3207:6;3193:21;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;3170:44;;3238:4;3226:16;;3221:167;3248:9;;;:16;3244:20;;3221:167;;;3291:6;3283:4;:14;3279:44;;;3309:5;;3279:44;3343:9;;;:12;;3353:1;;3343:12;;;;;;;;;;;;;;;3331:24;;;;;;;;3343:12;;;;;;;3331:24;;-1:-1:-1;;;;;3331:24:13;;;;;;;;;;;;;;;;;;;;;;;;;;:9;;:3;;3335:4;;3331:9;;;;;;;;;;;;;;:24;3370:11;:4;3379:1;3370:11;:8;:11;:::i;:::-;3363:18;-1:-1:-1;3266:3:13;;3221:167;;;-1:-1:-1;3401:3:13;2952:457;-1:-1:-1;;;;;2952:457:13:o;2466:184::-;2558:7;2582:18;2588:4;2594:5;2582;:18::i;:::-;:63;;2644:1;2582:63;;;-1:-1:-1;;;;;2613:19:13;;:12;:19;;;;;;;;;;;2603:9;;;:30;;:9;;2613:19;2603:30;;;;;;;;;;;;;;;;:38;;;2575:70;;2466:184;;;;:::o;1389:477::-;1493:7;1565:18;1571:4;1577:5;1565;:18::i;:::-;1561:249;;;-1:-1:-1;;;;;1644:19:13;;:12;:19;;;;;;;;;;;1634:9;;;:30;;:69;;1695:7;;1634:9;:30;;;;;;;;;;;;;;;;:47;;;:60;;:69;;;;:::i;:::-;-1:-1:-1;;;;;1603:19:13;;:12;:19;;;;;;;;;;;1593:9;;;:30;;:9;;1603:19;1593:30;;;;;;;;;;;;;;;;:38;;:110;;;;1561:249;;;1754:28;1761:4;1767:5;1774:7;1754:6;:28::i;:::-;1746:57;;;;;;-1:-1:-1;;;;;1746:57:13;;;;;;;;395:207;503:9;;;:16;485:4;;503:21;499:39;;;-1:-1:-1;533:5:13;526:12;;499:39;-1:-1:-1;;;;;552:44:13;;562:12;:19;;;;;;;;;;;552:9;;;:30;;:9;;562:19;552:30;;;;;;;;;;;;;;;;;;;:35;-1:-1:-1;;;;;552:35:13;:44;;395:207;-1:-1:-1;;;395:207:13:o;1093:116:20:-;1153:7;1175:8;;;;1168:16;;;;-1:-1:-1;1197:7:20;;;1093:116::o;895:490:13:-;977:4;1129:15;1172:25;996:18;1002:4;1008:5;996;:18::i;:::-;995:19;991:52;;;1031:5;1024:12;;;;991:52;-1:-1:-1;;;;;1062:19:13;;1093:1;1062:19;;;;;;;;;;;1052:9;;;:30;;:9;;1062:19;1052:30;;;;;;;;;;;;;;;;:38;;;:42;1048:75;;;1111:5;1104:12;;;;1048:75;-1:-1:-1;;;;;1147:19:13;;:12;:19;;;;;;;;;;;1200:9;;;;1210:16;;1147:19;;-1:-1:-1;1200:9:13;1210:23;;;:20;:23;:::i;:::-;1200:34;;;;;;;;;;;;;;;;;;1172:62;;1261:9;1240:4;:9;;1250:7;1240:18;;;;;;;;;;;;;;;;;;:30;;:18;;;;;:30;;-1:-1:-1;;1240:30:13;-1:-1:-1;;;;;1240:30:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;1289:14;;;;;1276:28;;;;;;;;:38;;;1339:9;;;:16;:23;;;:20;:23;:::i;:::-;1320:42;:9;;;:42;;:::i;:::-;;1376:4;1369:11;;895:490;;;;;;;:::o;1319:134:20:-;1379:7;1406;;;1426;;;;1419:15;;;606:285:13;713:4;725:16;;:::i;:::-;-1:-1:-1;;750:63:13;;;;;;;;-1:-1:-1;;;;;750:63:13;;;;;;777:9;;;;:16;;750:63;;;;;;;;;;;;;23:18:-1;;;45:23;;-1:-1;819:17:13;;;;;;;;;;;;;;;;;-1:-1:-1;;819:17:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;842:19;;;;;;;;;:27;777:9;606:285::o;138:822:24:-;;;;;;;;;;;-1:-1:-1;;;;;138:822:24;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;;;-1:-1:-1;;138:822:24;;;;;;;;;;;;;;;;;;;;;;5:118:-1;;72:46;110:6;97:20;72:46;;130:118;;197:46;235:6;222:20;197:46;;255:241;;359:2;347:9;338:7;334:23;330:32;327:2;;;375:1;372;365:12;327:2;410:1;427:53;472:7;452:9;427:53;;;417:63;321:175;-1:-1;;;;321:175;503:366;;;624:2;612:9;603:7;599:23;595:32;592:2;;;640:1;637;630:12;592:2;675:1;692:53;737:7;717:9;692:53;;;682:63;;654:97;782:2;800:53;845:7;836:6;825:9;821:22;800:53;;;790:63;;761:98;586:283;;;;;;876:241;;980:2;968:9;959:7;955:23;951:32;948:2;;;996:1;993;986:12;948:2;1031:1;1048:53;1093:7;1073:9;1048:53;;1124:366;;;1245:2;1233:9;1224:7;1220:23;1216:32;1213:2;;;1261:1;1258;1251:12;1213:2;1296:1;1313:53;1358:7;1338:9;1313:53;;1497:110;1570:31;1595:5;1570:31;;;1565:3;1558:44;1552:55;;;1683:741;;1860:75;1929:5;1860:75;;;1953:6;1948:3;1941:19;1977:4;1972:3;1968:14;1961:21;;2022:77;2093:5;2022:77;;;2120:1;2105:297;2130:6;2127:1;2124:13;2105:297;;;2170:99;2265:3;2256:6;2250:13;2170:99;;;2286:81;2360:6;2286:81;;;2390:4;2381:14;;;;;2276:91;-1:-1;2152:1;2145:9;2105:297;;;-1:-1;2415:3;;1839:585;-1:-1;;;;1839:585;2433:296;2588:2;2576:15;;2625:66;2620:2;2611:12;;2604:88;2720:2;2711:12;;2569:160;2738:296;2893:2;2881:15;;2930:66;2925:2;2916:12;;2909:88;3025:2;3016:12;;2874:160;3043:296;3198:2;3186:15;;3235:66;3230:2;3221:12;;3214:88;3330:2;3321:12;;3179:160;3348:296;3503:2;3491:15;;3540:66;3535:2;3526:12;;3519:88;3635:2;3626:12;;3484:160;3653:397;3808:2;3796:15;;3845:66;3840:2;3831:12;;3824:88;3946:66;3941:2;3932:12;;3925:88;4041:2;4032:12;;3789:261;4121:662;4323:22;;4254:4;4245:14;;;4357:61;4249:3;4323:22;4357:61;;;4274:156;4505:4;4498:5;4494:16;4488:23;4523:62;4579:4;4574:3;4570:14;4557:11;4523:62;;;4440:157;4676:4;4669:5;4665:16;4659:23;4694:62;4750:4;4745:3;4741:14;4728:11;4694:62;;;4607:161;4227:556;;;;5518:110;5591:31;5616:5;5591:31;;5635:425;5835:2;5849:47;;;5820:18;;5910:140;5820:18;6036:6;5910:140;;6067:387;6248:2;6262:47;;;6233:18;;6323:121;6233:18;6323:121;;6461:387;6642:2;6656:47;;;6627:18;;6717:121;6627:18;6717:121;;6855:387;7036:2;7050:47;;;7021:18;;7111:121;7021:18;7111:121;;7249:387;7430:2;7444:47;;;7415:18;;7505:121;7415:18;7505:121;;7643:387;7824:2;7838:47;;;7809:18;;7899:121;7809:18;7899:121;;8037:293;8195:2;8180:18;;8209:111;8184:9;8293:6;8209:111;;8337:193;8445:2;8430:18;;8459:61;8434:9;8493:6;8459:61;;8539:142;8669:4;8657:17;;8638:43;8690:128;8801:12;;8785:33;8977:128;-1:-1;;;;;9046:54;;9029:76",
"source": "pragma solidity >=0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"../list/BalanceList.sol\";\n\n// 定义一个调用BalanceList的合约\ncontract MockBalanceList {\n using BalanceList for BalanceList.balanceMap;\n\n BalanceList.balanceMap _balance;\n\n function add(address _addr, uint256 _amount) public returns (uint256) {\n return _balance.add(_addr, _amount);\n }\n\n function sub(address _addr, uint256 _amount) public returns (uint256) {\n return _balance.sub(_addr, _amount);\n }\n\n function balance(address _addr) public view returns (uint256) {\n return _balance.balance(_addr);\n }\n\n function get(uint256 _idx) public view returns (BalanceList.element memory) {\n return _balance.get(_idx);\n }\n\n function getList(uint256 from, uint256 count)\n public\n view\n returns (BalanceList.element[] memory)\n {\n return _balance.getList(from, count);\n }\n\n function count() public view returns (uint256) {\n return _balance.count();\n }\n}\n",
"sourcePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/mock/MockBalanceList.sol",
"ast": {
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/mock/MockBalanceList.sol",
"exportedSymbols": {
"MockBalanceList": [
5975
]
},
"id": 5976,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 5882,
"literals": [
"solidity",
">=",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:25:24"
},
{
"id": 5883,
"literals": [
"experimental",
"ABIEncoderV2"
],
"nodeType": "PragmaDirective",
"src": "26:33:24"
},
{
"absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/BalanceList.sol",
"file": "../list/BalanceList.sol",
"id": 5884,
"nodeType": "ImportDirective",
"scope": 5976,
"sourceUnit": 2327,
"src": "61:33:24",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 5975,
"linearizedBaseContracts": [
5975
],
"name": "MockBalanceList",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 5887,
"libraryName": {
"contractScope": null,
"id": 5885,
"name": "BalanceList",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2326,
"src": "173:11:24",
"typeDescriptions": {
"typeIdentifier": "t_contract$_BalanceList_$2326",
"typeString": "library BalanceList"
}
},
"nodeType": "UsingForDirective",
"src": "167:45:24",
"typeName": {
"contractScope": null,
"id": 5886,
"name": "BalanceList.balanceMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1905,
"src": "189:22:24",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
}
}
},
{
"constant": false,
"id": 5889,
"name": "_balance",
"nodeType": "VariableDeclaration",
"scope": 5975,
"src": "216:31:24",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage",
"typeString": "struct BalanceList.balanceMap"
},
"typeName": {
"contractScope": null,
"id": 5888,
"name": "BalanceList.balanceMap",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1905,
"src": "216:22:24",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage_ptr",
"typeString": "struct BalanceList.balanceMap"
}
},
"value": null,
"visibility": "internal"
},
{
"body": {
"id": 5904,
"nodeType": "Block",
"src": "322:46:24",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 5900,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5891,
"src": "348:5:24",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 5901,
"name": "_amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5893,
"src": "355:7:24",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 5898,
"name": "_balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5889,
"src": "335:8:24",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage",
"typeString": "struct BalanceList.balanceMap storage ref"
}
},
"id": 5899,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 2119,
"src": "335:12:24",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_struct$_balanceMap_$1905_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_balanceMap_$1905_storage_ptr_$",
"typeString": "function (struct BalanceList.balanceMap storage pointer,address,uint256) returns (uint256)"
}
},
"id": 5902,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "335:28:24",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 5897,
"id": 5903,
"nodeType": "Return",
"src": "328:35:24"
}
]
},
"documentation": null,
"id": 5905,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "add",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5894,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5891,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 5905,
"src": "265:13:24",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 5890,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "265:7:24",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5893,
"name": "_amount",
"nodeType": "VariableDeclaration",
"scope": 5905,
"src": "280:15:24",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5892,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "280:7:24",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "264:32:24"
},
"payable": false,
"returnParameters": {
"id": 5897,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5896,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 5905,
"src": "313:7:24",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5895,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "313:7:24",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "312:9:24"
},
"scope": 5975,
"src": "252:116:24",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 5920,
"nodeType": "Block",
"src": "442:46:24",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 5916,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5907,
"src": "468:5:24",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 5917,
"name": "_amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5909,
"src": "475:7:24",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 5914,
"name": "_balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5889,
"src": "455:8:24",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage",
"typeString": "struct BalanceList.balanceMap storage ref"
}
},
"id": 5915,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "sub",
"nodeType": "MemberAccess",
"referencedDeclaration": 2192,
"src": "455:12:24",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_struct$_balanceMap_$1905_storage_ptr_$_t_address_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_balanceMap_$1905_storage_ptr_$",
"typeString": "function (struct BalanceList.balanceMap storage pointer,address,uint256) returns (uint256)"
}
},
"id": 5918,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "455:28:24",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 5913,
"id": 5919,
"nodeType": "Return",
"src": "448:35:24"
}
]
},
"documentation": null,
"id": 5921,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "sub",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5910,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5907,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 5921,
"src": "385:13:24",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 5906,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "385:7:24",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5909,
"name": "_amount",
"nodeType": "VariableDeclaration",
"scope": 5921,
"src": "400:15:24",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5908,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "400:7:24",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "384:32:24"
},
"payable": false,
"returnParameters": {
"id": 5913,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5912,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 5921,
"src": "433:7:24",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5911,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "433:7:24",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "432:9:24"
},
"scope": 5975,
"src": "372:116:24",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 5933,
"nodeType": "Block",
"src": "554:41:24",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 5930,
"name": "_addr",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5923,
"src": "584:5:24",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"id": 5928,
"name": "_balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5889,
"src": "567:8:24",
"typeDescriptions": {
"typeIdentifier": "t_struct$_balanceMap_$1905_storage",
"typeString": "struct BalanceList.balanceMap storage ref"
}
},
"id": 5929,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 2229,
"src": "567:16:24",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_struct$_balanceMap_$1905_storage_ptr_$_t_address_$returns$_t_uint256_$bound_to$_t_struct$_balanceMap_$1905_storage_ptr_$",
"typeString": "function (struct BalanceList.balanceMap storage pointer,address) view returns (uint256)"
}
},
"id": 5931,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "567:23:24",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 5927,
"id": 5932,
"nodeType": "Return",
"src": "560:30:24"
}
]
},
"documentation": null,
"id": 5934,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "balance",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5924,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5923,
"name": "_addr",
"nodeType": "VariableDeclaration",
"scope": 5934,
"src": "509:13:24",
"stateVariable": false,