@oikos/swap
Version:
Oikos Swap Contracts
1,021 lines (1,020 loc) • 78.4 kB
JSON
{
"contractName": "ERC20Mock",
"abi": [
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "spender",
"type": "address"
},
{
"name": "value",
"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": "from",
"type": "address"
},
{
"name": "to",
"type": "address"
},
{
"name": "value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "decimals",
"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": "owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "symbol",
"outputs": [
{
"name": "",
"type": "bytes32"
}
],
"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": "to",
"type": "address"
},
{
"name": "value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"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"
},
{
"inputs": [
{
"name": "_name",
"type": "bytes32"
},
{
"name": "_symbol",
"type": "bytes32"
},
{
"name": "_decimals",
"type": "uint256"
},
{
"name": "_supply",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"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"
}
],
"bytecode": "0x608060405234801561001057600080fd5b50d3801561001d57600080fd5b50d2801561002a57600080fd5b50604051608080610d1c8339810180604052608081101561004a57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190805190602001909291905050506000339050846003819055508360048190555082600581905550816000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816002819055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35050505050610bc5806101576000396000f3fe608060405234801561001057600080fd5b50d3801561001d57600080fd5b50d2801561002a57600080fd5b50600436106100e0576000357c01000000000000000000000000000000000000000000000000000000009004806339509351116100a8578063395093511461022b57806370a082311461029157806395d89b41146102e9578063a457c2d714610307578063a9059cbb1461036d578063dd62ed3e146103d3576100e0565b806306fdde03146100e5578063095ea7b31461010357806318160ddd1461016957806323b872dd14610187578063313ce5671461020d575b600080fd5b6100ed61044b565b6040518082815260200191505060405180910390f35b61014f6004803603604081101561011957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610451565b604051808215151515815260200191505060405180910390f35b610171610468565b6040518082815260200191505060405180910390f35b6101f36004803603606081101561019d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610472565b604051808215151515815260200191505060405180910390f35b610215610523565b6040518082815260200191505060405180910390f35b6102776004803603604081101561024157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610529565b604051808215151515815260200191505060405180910390f35b6102d3600480360360208110156102a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105ce565b6040518082815260200191505060405180910390f35b6102f1610616565b6040518082815260200191505060405180910390f35b6103536004803603604081101561031d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061c565b604051808215151515815260200191505060405180910390f35b6103b96004803603604081101561038357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106c1565b604051808215151515815260200191505060405180910390f35b610435600480360360408110156103e957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506106d8565b6040518082815260200191505060405180910390f35b60035481565b600061045e33848461075f565b6001905092915050565b6000600254905090565b600061047f8484846108be565b610518843361051385600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a8890919063ffffffff16565b61075f565b600190509392505050565b60055481565b60006105c433846105bf85600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b1190919063ffffffff16565b61075f565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60045481565b60006106b733846106b285600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a8890919063ffffffff16565b61075f565b6001905092915050565b60006106ce3384846108be565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561079957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156107d357600080fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156108f857600080fd5b610949816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a8890919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506109dc816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b1190919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b600082821115610b00576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f536166654d617468237375623a20554e444552464c4f5700000000000000000081525060200191505060405180910390fd5b600082840390508091505092915050565b600080828401905083811015610b8f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f536166654d617468236164643a204f564552464c4f570000000000000000000081525060200191505060405180910390fd5b809150509291505056fea165627a7a7230582042ee763652f007f6d43e396e69981ad79a7555b03441ac479d79063e77eb68b30029",
"deployedBytecode": "0x608060405234801561001057600080fd5b50d3801561001d57600080fd5b50d2801561002a57600080fd5b50600436106100e0576000357c01000000000000000000000000000000000000000000000000000000009004806339509351116100a8578063395093511461022b57806370a082311461029157806395d89b41146102e9578063a457c2d714610307578063a9059cbb1461036d578063dd62ed3e146103d3576100e0565b806306fdde03146100e5578063095ea7b31461010357806318160ddd1461016957806323b872dd14610187578063313ce5671461020d575b600080fd5b6100ed61044b565b6040518082815260200191505060405180910390f35b61014f6004803603604081101561011957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610451565b604051808215151515815260200191505060405180910390f35b610171610468565b6040518082815260200191505060405180910390f35b6101f36004803603606081101561019d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610472565b604051808215151515815260200191505060405180910390f35b610215610523565b6040518082815260200191505060405180910390f35b6102776004803603604081101561024157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610529565b604051808215151515815260200191505060405180910390f35b6102d3600480360360208110156102a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105ce565b6040518082815260200191505060405180910390f35b6102f1610616565b6040518082815260200191505060405180910390f35b6103536004803603604081101561031d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061c565b604051808215151515815260200191505060405180910390f35b6103b96004803603604081101561038357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106c1565b604051808215151515815260200191505060405180910390f35b610435600480360360408110156103e957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506106d8565b6040518082815260200191505060405180910390f35b60035481565b600061045e33848461075f565b6001905092915050565b6000600254905090565b600061047f8484846108be565b610518843361051385600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a8890919063ffffffff16565b61075f565b600190509392505050565b60055481565b60006105c433846105bf85600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b1190919063ffffffff16565b61075f565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60045481565b60006106b733846106b285600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a8890919063ffffffff16565b61075f565b6001905092915050565b60006106ce3384846108be565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561079957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156107d357600080fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156108f857600080fd5b610949816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a8890919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506109dc816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b1190919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b600082821115610b00576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f536166654d617468237375623a20554e444552464c4f5700000000000000000081525060200191505060405180910390fd5b600082840390508091505092915050565b600080828401905083811015610b8f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f536166654d617468236164643a204f564552464c4f570000000000000000000081525060200191505060405180910390fd5b809150509291505056fea165627a7a7230582042ee763652f007f6d43e396e69981ad79a7555b03441ac479d79063e77eb68b30029",
"sourceMap": "57:416:11:-;;;166:304;8:9:-1;5:2;;;30:1;27;20:12;5:2;166:304:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;166:304:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;166:304:11;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;166:304:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;260:15;278:10;260:28;;301:5;294:4;:12;;;;321:7;312:6;:16;;;;345:9;334:8;:20;;;;381:7;360:9;:18;370:7;360:18;;;;;;;;;;;;;;;:28;;;;409:7;394:12;:22;;;;448:7;427:38;;444:1;427:38;;;457:7;427:38;;;;;;;;;;;;;;;;;;166:304;;;;;57:416;;;;;;",
"deployedSourceMap": "57:416:11:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;57:416:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;57:416:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;57:416:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;90:19;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2768:135:12;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2768:135:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1028:83;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3355:210;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3355:210:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;138:23:11;;;:::i;:::-;;;;;;;;;;;;;;;;;;;4066:190:12;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4066:190:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1315:98;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1315:98:12;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;113:21:11;;;:::i;:::-;;;;;;;;;;;;;;;;;;;4762:200:12;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4762:200:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;2017:127;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2017:127:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1735:123;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1735:123:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;90:19:11;;;;:::o;2768:135:12:-;2833:4;2845:36;2854:10;2866:7;2875:5;2845:8;:36::i;:::-;2894:4;2887:11;;2768:135;;;;:::o;1028:83::-;1072:7;1094:12;;1087:19;;1028:83;:::o;3355:210::-;3434:4;3446:26;3456:4;3462:2;3466:5;3446:9;:26::i;:::-;3478:65;3487:4;3493:10;3505:37;3536:5;3505:8;:14;3514:4;3505:14;;;;;;;;;;;;;;;:26;3520:10;3505:26;;;;;;;;;;;;;;;;:30;;:37;;;;:::i;:::-;3478:8;:65::i;:::-;3556:4;3549:11;;3355:210;;;;;:::o;138:23:11:-;;;;:::o;4066:190:12:-;4146:4;4158:76;4167:10;4179:7;4188:45;4222:10;4188:8;:20;4197:10;4188:20;;;;;;;;;;;;;;;:29;4209:7;4188:29;;;;;;;;;;;;;;;;:33;;:45;;;;:::i;:::-;4158:8;:76::i;:::-;4247:4;4240:11;;4066:190;;;;:::o;1315:98::-;1370:7;1392:9;:16;1402:5;1392:16;;;;;;;;;;;;;;;;1385:23;;1315:98;;;:::o;113:21:11:-;;;;:::o;4762:200:12:-;4847:4;4859:81;4868:10;4880:7;4889:50;4923:15;4889:8;:20;4898:10;4889:20;;;;;;;;;;;;;;;:29;4910:7;4889:29;;;;;;;;;;;;;;;;:33;;:50;;;;:::i;:::-;4859:8;:81::i;:::-;4953:4;4946:11;;4762:200;;;;:::o;2017:127::-;2078:4;2090:32;2100:10;2112:2;2116:5;2090:9;:32::i;:::-;2135:4;2128:11;;2017:127;;;;:::o;1735:123::-;1807:7;1829:8;:15;1838:5;1829:15;;;;;;;;;;;;;;;:24;1845:7;1829:24;;;;;;;;;;;;;;;;1822:31;;1735:123;;;;:::o;6706:230::-;6813:1;6794:21;;:7;:21;;;;6786:30;;;;;;6847:1;6830:19;;:5;:19;;;;6822:28;;;;;;6884:5;6857:8;:15;6866:5;6857:15;;;;;;;;;;;;;;;:24;6873:7;6857:24;;;;;;;;;;;;;;;:32;;;;6916:7;6900:31;;6909:5;6900:31;;;6925:5;6900:31;;;;;;;;;;;;;;;;;;6706:230;;;:::o;5172:238::-;5269:1;5255:16;;:2;:16;;;;5247:25;;;;;;5297:26;5317:5;5297:9;:15;5307:4;5297:15;;;;;;;;;;;;;;;;:19;;:26;;;;:::i;:::-;5279:9;:15;5289:4;5279:15;;;;;;;;;;;;;;;:44;;;;5345:24;5363:5;5345:9;:13;5355:2;5345:13;;;;;;;;;;;;;;;;:17;;:24;;;;:::i;:::-;5329:9;:13;5339:2;5329:13;;;;;;;;;;;;;;;:40;;;;5395:2;5380:25;;5389:4;5380:25;;;5399:5;5380:25;;;;;;;;;;;;;;;;;;5172:238;;;:::o;1219:158:15:-;1277:7;1305:1;1300;:6;;1292:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1340:9;1356:1;1352;:5;1340:17;;1371:1;1364:8;;;1219:158;;;;:::o;1452:::-;1510:7;1525:9;1541:1;1537;:5;1525:17;;1561:1;1556;:6;;1548:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1603:1;1596:8;;;1452:158;;;;:::o",
"source": "pragma solidity ^0.5.0;\n\nimport \"../tokens/ERC20.sol\";\n\n\ncontract ERC20Mock is ERC20 {\n\n bytes32 public name;\n bytes32 public symbol;\n uint256 public decimals;\n\n constructor (bytes32 _name, bytes32 _symbol, uint256 _decimals, uint256 _supply) public {\n address _sender = msg.sender;\n name = _name;\n symbol = _symbol;\n decimals = _decimals;\n _balances[_sender] = _supply;\n _totalSupply = _supply;\n emit Transfer(address(0), _sender, _supply);\n }\n\n}",
"sourcePath": "/home/binyu/Desktop/Synthetix/prod/swap-solidity/contracts/mocks/ERC20Mock.sol",
"ast": {
"absolutePath": "/home/binyu/Desktop/Synthetix/prod/swap-solidity/contracts/mocks/ERC20Mock.sol",
"exportedSymbols": {
"ERC20Mock": [
3391
]
},
"id": 3392,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 3334,
"literals": [
"solidity",
"^",
"0.5",
".0"
],
"nodeType": "PragmaDirective",
"src": "0:23:11"
},
{
"absolutePath": "/home/binyu/Desktop/Synthetix/prod/swap-solidity/contracts/tokens/ERC20.sol",
"file": "../tokens/ERC20.sol",
"id": 3335,
"nodeType": "ImportDirective",
"scope": 3392,
"sourceUnit": 3788,
"src": "25:29:11",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 3336,
"name": "ERC20",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3787,
"src": "79:5:11",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20_$3787",
"typeString": "contract ERC20"
}
},
"id": 3337,
"nodeType": "InheritanceSpecifier",
"src": "79:5:11"
}
],
"contractDependencies": [
3787
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 3391,
"linearizedBaseContracts": [
3391,
3787
],
"name": "ERC20Mock",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 3339,
"name": "name",
"nodeType": "VariableDeclaration",
"scope": 3391,
"src": "90:19:11",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 3338,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "90:7:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 3341,
"name": "symbol",
"nodeType": "VariableDeclaration",
"scope": 3391,
"src": "113:21:11",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 3340,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "113:7:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 3343,
"name": "decimals",
"nodeType": "VariableDeclaration",
"scope": 3391,
"src": "138:23:11",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3342,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "138:7:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 3389,
"nodeType": "Block",
"src": "254:216:11",
"statements": [
{
"assignments": [
3355
],
"declarations": [
{
"constant": false,
"id": 3355,
"name": "_sender",
"nodeType": "VariableDeclaration",
"scope": 3389,
"src": "260:15:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3354,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "260:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3358,
"initialValue": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3356,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6022,
"src": "278:3:11",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3357,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "278:10:11",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "260:28:11"
},
{
"expression": {
"argumentTypes": null,
"id": 3361,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3359,
"name": "name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3339,
"src": "294:4:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 3360,
"name": "_name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3345,
"src": "301:5:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "294:12:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 3362,
"nodeType": "ExpressionStatement",
"src": "294:12:11"
},
{
"expression": {
"argumentTypes": null,
"id": 3365,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3363,
"name": "symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3341,
"src": "312:6:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 3364,
"name": "_symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3347,
"src": "321:7:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"src": "312:16:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 3366,
"nodeType": "ExpressionStatement",
"src": "312:16:11"
},
{
"expression": {
"argumentTypes": null,
"id": 3369,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3367,
"name": "decimals",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3343,
"src": "334:8:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 3368,
"name": "_decimals",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3349,
"src": "345:9:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "334:20:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3370,
"nodeType": "ExpressionStatement",
"src": "334:20:11"
},
{
"expression": {
"argumentTypes": null,
"id": 3375,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3371,
"name": "_balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3401,
"src": "360:9:11",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 3373,
"indexExpression": {
"argumentTypes": null,
"id": 3372,
"name": "_sender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3355,
"src": "370:7:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "360:18:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 3374,
"name": "_supply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3351,
"src": "381:7:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "360:28:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3376,
"nodeType": "ExpressionStatement",
"src": "360:28:11"
},
{
"expression": {
"argumentTypes": null,
"id": 3379,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3377,
"name": "_totalSupply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3425,
"src": "394:12:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 3378,
"name": "_supply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3351,
"src": "409:7:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "394:22:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3380,
"nodeType": "ExpressionStatement",
"src": "394:22:11"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 3383,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "444:1:11",
"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": 3382,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "436:7:11",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 3384,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "436:10:11",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3385,
"name": "_sender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3355,
"src": "448:7:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3386,
"name": "_supply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3351,
"src": "457:7:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3381,
"name": "Transfer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3415,
"src": "427:8:11",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3387,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "427:38:11",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3388,
"nodeType": "EmitStatement",
"src": "422:43:11"
}
]
},
"documentation": null,
"id": 3390,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3352,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3345,
"name": "_name",
"nodeType": "VariableDeclaration",
"scope": 3390,
"src": "179:13:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 3344,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "179:7:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3347,
"name": "_symbol",
"nodeType": "VariableDeclaration",
"scope": 3390,
"src": "194:15:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 3346,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "194:7:11",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3349,
"name": "_decimals",
"nodeType": "VariableDeclaration",
"scope": 3390,
"src": "211:17:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3348,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "211:7:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3351,
"name": "_supply",
"nodeType": "VariableDeclaration",
"scope": 3390,
"src": "230:15:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3350,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "230:7:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "178:68:11"
},
"returnParameters": {