@dolomite-exchange/dolomite-margin
Version:
Ethereum Smart Contracts and TypeScript library used for the DolomiteMargin trading protocol
870 lines (869 loc) • 344 kB
JSON
{
"contractName": "OmiseToken",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Issue",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"constant": false,
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "issue",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "address",
"name": "who",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "issueTo",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "address",
"name": "who",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "decimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Issue\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"issue\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"issueTo\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/cdc218/projects/dolomite-protocol-v2/contracts/testing/OmiseToken.sol\":\"OmiseToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/home/cdc218/projects/dolomite-protocol-v2/contracts/testing/OmiseToken.sol\":{\"keccak256\":\"0xa75033c87297b84a758be97971af549a800fa95c2e3712141322792ab0359318\",\"urls\":[\"bzz-raw://0fa71edd30b29032e08db8c44fef82c8a384d2aa5cfd541e776af84ac4b72b63\",\"dweb:/ipfs/QmSX22SfTtzB9nsxQteyWwU3An7qEr4f6pTmvMNHTrinbH\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x640b6dee7a4b830bdfd52b5031a07fc2b12209f5b2e29e5d364a7d37f69d8076\",\"urls\":[\"bzz-raw://31113152e1ddb78fe7a4197f247591ca894e93f916867beb708d8e747b6cc74f\",\"dweb:/ipfs/QmbZaJyXdpsYGykVhHH9qpVGQg9DGCxE2QufbCUy3daTgq\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50610a47806100206000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c8063313ce56711610081578063a9059cbb1161005b578063a9059cbb1461016c578063cc872b661461017f578063dd62ed3e14610192576100c9565b8063313ce5671461013c57806370a082311461015157806395d89b4114610164576100c9565b80631207f0c1116100b25780631207f0c11461010157806318160ddd1461011457806323b872dd14610129576100c9565b806306fdde03146100ce578063095ea7b3146100ec575b600080fd5b6100d66101a5565b6040516100e3919061090d565b60405180910390f35b6100ff6100fa3660046107a3565b6101dc565b005b6100ff61010f3660046107a3565b610250565b61011c6102f8565b6040516100e3919061092e565b6100ff610137366004610756565b6102fe565b6101446104a5565b6040516100e3919061093c565b61011c61015f3660046106f6565b6104aa565b6100d66104d2565b6100ff61017a3660046107a3565b610509565b6100ff61018d3660046107d3565b6105c7565b61011c6101a036600461071c565b6105d4565b60408051808201909152600a81527f54657374204f6d69736500000000000000000000000000000000000000000000602082015290565b33600081815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915290819020839055517fa0175360a15bca328baf7ea85c7b784d58b222a50d0ce760b10dba336d226a6191610244913091908690869061088c565b60405180910390a15050565b600054610263908263ffffffff61060e16565b600090815573ffffffffffffffffffffffffffffffffffffffff831681526001602052604090205461029b908263ffffffff61060e16565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600160205260409081902091909155517f4b2682685b046a3dae8e75ff49b82fa703e366056a43c6a791411011134f4f5d90610244903090859085906108e5565b60005490565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600160205260409020548111801590610363575073ffffffffffffffffffffffffffffffffffffffff831660009081526002602090815260408083203384529091529020548111155b61036c57600080fd5b73ffffffffffffffffffffffffffffffffffffffff82166000908152600160205260409020546103a2908263ffffffff61060e16565b73ffffffffffffffffffffffffffffffffffffffff80841660009081526001602052604080822093909355908516815220546103e4908263ffffffff61065d16565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260016020908152604080832093909355600281528282203383529052205461042e908263ffffffff61065d16565b73ffffffffffffffffffffffffffffffffffffffff841660009081526002602090815260408083203384529091529081902091909155517fd1398bee19313d6bf672ccb116e51f4a1a947e91c757907f51fbb5b5e56c698f906104989030908690869086906108ca565b60405180910390a1505050565b601290565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b60408051808201909152600481527f544f4d4700000000000000000000000000000000000000000000000000000000602082015290565b3360009081526001602052604090205481111561052557600080fd5b336000908152600160205260408082208054849003905573ffffffffffffffffffffffffffffffffffffffff84168252902054610568908263ffffffff61060e16565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600160205260409081902091909155517fd1398bee19313d6bf672ccb116e51f4a1a947e91c757907f51fbb5b5e56c698f9061024490309033908690869061088c565b6105d13382610250565b50565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600260209081526040808320938516835292905220545b92915050565b600082820183811015610656576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161064d9061091e565b60405180910390fd5b9392505050565b600061065683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250600081848411156106d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161064d919061090d565b505050900390565b8035610608816109e7565b8035610608816109fb565b60006020828403121561070857600080fd5b600061071484846106e0565b949350505050565b6000806040838503121561072f57600080fd5b600061073b85856106e0565b925050602061074c858286016106e0565b9150509250929050565b60008060006060848603121561076b57600080fd5b600061077786866106e0565b9350506020610788868287016106e0565b9250506040610799868287016106eb565b9150509250925092565b600080604083850312156107b657600080fd5b60006107c285856106e0565b925050602061074c858286016106eb565b6000602082840312156107e557600080fd5b600061071484846106eb565b6107fa8161097e565b82525050565b6107fa81610957565b60006108148261094a565b61081e818561094e565b935061082e81856020860161098f565b610837816109bf565b9093019392505050565b600061084e601b8361094e565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b6107fa81610975565b6107fa81610978565b6080810161089a8287610800565b6108a760208301866107f1565b6108b46040830185610800565b6108c1606083018461087a565b95945050505050565b608081016108d88287610800565b6108a76020830186610800565b606081016108f38286610800565b6109006020830185610800565b610714604083018461087a565b602080825281016106568184610809565b6020808252810161060881610841565b60208101610608828461087a565b602081016106088284610883565b5190565b90815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8216610608565b90565b60ff1690565b600061060882600061060882610957565b60005b838110156109aa578181015183820152602001610992565b838111156109b9576000848401525b50505050565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690565b6109f081610957565b81146105d157600080fd5b6109f08161097556fea365627a7a7231582057700ec393d759a8439e5f4a1d8d9c40f35e9857b9b64de862d20ffa2193bb7e6c6578706572696d656e74616cf564736f6c63430005100040",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100c95760003560e01c8063313ce56711610081578063a9059cbb1161005b578063a9059cbb1461016c578063cc872b661461017f578063dd62ed3e14610192576100c9565b8063313ce5671461013c57806370a082311461015157806395d89b4114610164576100c9565b80631207f0c1116100b25780631207f0c11461010157806318160ddd1461011457806323b872dd14610129576100c9565b806306fdde03146100ce578063095ea7b3146100ec575b600080fd5b6100d66101a5565b6040516100e3919061090d565b60405180910390f35b6100ff6100fa3660046107a3565b6101dc565b005b6100ff61010f3660046107a3565b610250565b61011c6102f8565b6040516100e3919061092e565b6100ff610137366004610756565b6102fe565b6101446104a5565b6040516100e3919061093c565b61011c61015f3660046106f6565b6104aa565b6100d66104d2565b6100ff61017a3660046107a3565b610509565b6100ff61018d3660046107d3565b6105c7565b61011c6101a036600461071c565b6105d4565b60408051808201909152600a81527f54657374204f6d69736500000000000000000000000000000000000000000000602082015290565b33600081815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915290819020839055517fa0175360a15bca328baf7ea85c7b784d58b222a50d0ce760b10dba336d226a6191610244913091908690869061088c565b60405180910390a15050565b600054610263908263ffffffff61060e16565b600090815573ffffffffffffffffffffffffffffffffffffffff831681526001602052604090205461029b908263ffffffff61060e16565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600160205260409081902091909155517f4b2682685b046a3dae8e75ff49b82fa703e366056a43c6a791411011134f4f5d90610244903090859085906108e5565b60005490565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600160205260409020548111801590610363575073ffffffffffffffffffffffffffffffffffffffff831660009081526002602090815260408083203384529091529020548111155b61036c57600080fd5b73ffffffffffffffffffffffffffffffffffffffff82166000908152600160205260409020546103a2908263ffffffff61060e16565b73ffffffffffffffffffffffffffffffffffffffff80841660009081526001602052604080822093909355908516815220546103e4908263ffffffff61065d16565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260016020908152604080832093909355600281528282203383529052205461042e908263ffffffff61065d16565b73ffffffffffffffffffffffffffffffffffffffff841660009081526002602090815260408083203384529091529081902091909155517fd1398bee19313d6bf672ccb116e51f4a1a947e91c757907f51fbb5b5e56c698f906104989030908690869086906108ca565b60405180910390a1505050565b601290565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b60408051808201909152600481527f544f4d4700000000000000000000000000000000000000000000000000000000602082015290565b3360009081526001602052604090205481111561052557600080fd5b336000908152600160205260408082208054849003905573ffffffffffffffffffffffffffffffffffffffff84168252902054610568908263ffffffff61060e16565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600160205260409081902091909155517fd1398bee19313d6bf672ccb116e51f4a1a947e91c757907f51fbb5b5e56c698f9061024490309033908690869061088c565b6105d13382610250565b50565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600260209081526040808320938516835292905220545b92915050565b600082820183811015610656576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161064d9061091e565b60405180910390fd5b9392505050565b600061065683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250600081848411156106d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161064d919061090d565b505050900390565b8035610608816109e7565b8035610608816109fb565b60006020828403121561070857600080fd5b600061071484846106e0565b949350505050565b6000806040838503121561072f57600080fd5b600061073b85856106e0565b925050602061074c858286016106e0565b9150509250929050565b60008060006060848603121561076b57600080fd5b600061077786866106e0565b9350506020610788868287016106e0565b9250506040610799868287016106eb565b9150509250925092565b600080604083850312156107b657600080fd5b60006107c285856106e0565b925050602061074c858286016106eb565b6000602082840312156107e557600080fd5b600061071484846106eb565b6107fa8161097e565b82525050565b6107fa81610957565b60006108148261094a565b61081e818561094e565b935061082e81856020860161098f565b610837816109bf565b9093019392505050565b600061084e601b8361094e565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b6107fa81610975565b6107fa81610978565b6080810161089a8287610800565b6108a760208301866107f1565b6108b46040830185610800565b6108c1606083018461087a565b95945050505050565b608081016108d88287610800565b6108a76020830186610800565b606081016108f38286610800565b6109006020830185610800565b610714604083018461087a565b602080825281016106568184610809565b6020808252810161060881610841565b60208101610608828461087a565b602081016106088284610883565b5190565b90815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8216610608565b90565b60ff1690565b600061060882600061060882610957565b60005b838110156109aa578181015183820152602001610992565b838111156109b9576000848401525b50505050565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690565b6109f081610957565b81146105d157600080fd5b6109f08161097556fea365627a7a7231582057700ec393d759a8439e5f4a1d8d9c40f35e9857b9b64de862d20ffa2193bb7e6c6578706572696d656e74616cf564736f6c63430005100040",
"sourceMap": "734:2332:109:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;734:2332:109;;;;;;;",
"deployedSourceMap": "734:2332:109:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;734:2332:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1886:88;;;:::i;:::-;;;;;;;;;;;;;;;;2831:233;;;;;;;;;:::i;:::-;;1266:196;;;;;;;;;:::i;1468:83::-;;;:::i;:::-;;;;;;;;2380:445;;;;;;;;;:::i;1980:74::-;;;:::i;:::-;;;;;;;;1557:99;;;;;;;;;:::i;1796:84::-;;;:::i;2060:314::-;;;;;;;;;:::i;1178:82::-;;;;;;;;;:::i;1662:128::-;;;;;;;;;:::i;1886:88::-;1948:19;;;;;;;;;;;;;;;;;1886:88;:::o;2831:233::-;2905:10;2897:19;;;;:7;:19;;;;;;;;;:28;;;;;;;;;;;:36;;;2948:109;;;;;2978:4;;2905:10;2917:7;;2928:5;;2948:109;;;;;;;;;;2831:233;;:::o;1266:196::-;1338:6;;:18;;1349:6;1338:18;:10;:18;:::i;:::-;1329:6;:27;;;1382:13;;;;;:8;:13;;;;;;:25;;1400:6;1382:25;:17;:25;:::i;:::-;1366:13;;;;;;;:8;:13;;;;;;;:41;;;;1422:33;;;;;1436:4;;1375:3;;1448:6;;1422:33;;1468:83;1512:7;1538:6;1468:83;:::o;2380:445::-;2468:14;;;;;;;:8;:14;;;;;;:23;-1:-1:-1;2468:23:109;;;:61;;-1:-1:-1;2495:13:109;;;;;;;:7;:13;;;;;;;;2509:10;2495:25;;;;;;;;:34;-1:-1:-1;2495:34:109;2468:61;2460:70;;;;;;2556:12;;;;;;;:8;:12;;;;;;:23;;2573:5;2556:23;:16;:23;:::i;:::-;2541:12;;;;;;;;:8;:12;;;;;;:38;;;;2606:14;;;;;;;:25;;2625:5;2606:25;:18;:25;:::i;:::-;2589:14;;;;;;;:8;:14;;;;;;;;:42;;;;2669:7;:13;;;;;2683:10;2669:25;;;;;;:36;;2699:5;2669:36;:29;:36;:::i;:::-;2641:13;;;;;;;:7;:13;;;;;;;;2655:10;2641:25;;;;;;;;;:64;;;;2720:98;;;;;2750:4;;2649;;2787:2;;2803:5;;2720:98;;;;;;;;;;2380:445;;;:::o;1980:74::-;2045:2;1980:74;:::o;1557:99::-;1636:13;;1610:7;1636:13;;;:8;:13;;;;;;;1557:99::o;1796:84::-;1860:13;;;;;;;;;;;;;;;;;1796:84;:::o;2060:314::-;2139:10;2130:20;;;;:8;:20;;;;;;:29;-1:-1:-1;2130:29:109;2122:38;;;;;;2180:10;2171:20;;;;:8;:20;;;;;;:29;;;;;;;:20;2225:12;;;;;;;:23;;2195:5;2225:23;:16;:23;:::i;:::-;2210:12;;;;;;;:8;:12;;;;;;;:38;;;;2263:104;;;;;2293:4;;2312:10;;2219:2;;2352:5;;2263:104;;1178:82;1226:27;1234:10;1246:6;1226:7;:27::i;:::-;1178:82;:::o;1662:128::-;1760:14;;;;1734:7;1760:14;;;:7;:14;;;;;;;;:23;;;;;;;;;;1662:128;;;;;:::o;834:176:150:-;892:7;923:5;;;946:6;;;;938:46;;;;;;;;;;;;;;;;;;;;;;1002:1;834:176;-1:-1:-1;;;834:176:150:o;1274:134::-;1332:7;1358:43;1362:1;1365;1358:43;;;;;;;;;;;;;;;;;1818:7;1853:12;1845:6;;;;1837:29;;;;;;;;;;;;;;;-1:-1:-1;;;1888:5:150;;;1732:187::o;5:130:-1:-;72:20;;97:33;72:20;97:33;;142:130;209:20;;234:33;209:20;234:33;;279:241;;383:2;371:9;362:7;358:23;354:32;351:2;;;399:1;396;389:12;351:2;434:1;451:53;496:7;476:9;451:53;;;441:63;345:175;-1:-1;;;;345:175;527:366;;;648:2;636:9;627:7;623:23;619:32;616:2;;;664:1;661;654:12;616:2;699:1;716:53;761:7;741:9;716:53;;;706:63;;678:97;806:2;824:53;869:7;860:6;849:9;845:22;824:53;;;814:63;;785:98;610:283;;;;;;900:491;;;;1038:2;1026:9;1017:7;1013:23;1009:32;1006:2;;;1054:1;1051;1044:12;1006:2;1089:1;1106:53;1151:7;1131:9;1106:53;;;1096:63;;1068:97;1196:2;1214:53;1259:7;1250:6;1239:9;1235:22;1214:53;;;1204:63;;1175:98;1304:2;1322:53;1367:7;1358:6;1347:9;1343:22;1322:53;;;1312:63;;1283:98;1000:391;;;;;;1398:366;;;1519:2;1507:9;1498:7;1494:23;1490:32;1487:2;;;1535:1;1532;1525:12;1487:2;1570:1;1587:53;1632:7;1612:9;1587:53;;;1577:63;;1549:97;1677:2;1695:53;1740:7;1731:6;1720:9;1716:22;1695:53;;1771:241;;1875:2;1863:9;1854:7;1850:23;1846:32;1843:2;;;1891:1;1888;1881:12;1843:2;1926:1;1943:53;1988:7;1968:9;1943:53;;2019:142;2110:45;2149:5;2110:45;;;2105:3;2098:58;2092:69;;;2168:113;2251:24;2269:5;2251:24;;2288:347;;2400:39;2433:5;2400:39;;;2451:71;2515:6;2510:3;2451:71;;;2444:78;;2527:52;2572:6;2567:3;2560:4;2553:5;2549:16;2527:52;;;2600:29;2622:6;2600:29;;;2591:39;;;;2380:255;-1:-1;;;2380:255;2643:327;;2803:67;2867:2;2862:3;2803:67;;;2903:29;2883:50;;2961:2;2952:12;;2789:181;-1:-1;;2789:181;2978:113;3061:24;3079:5;3061:24;;3098:107;3177:22;3193:5;3177:22;;3212:563;3422:3;3407:19;;3437:71;3411:9;3481:6;3437:71;;;3519:80;3595:2;3584:9;3580:18;3571:6;3519:80;;;3610:72;3678:2;3667:9;3663:18;3654:6;3610:72;;;3693;3761:2;3750:9;3746:18;3737:6;3693:72;;;3393:382;;;;;;;;3782:547;3984:3;3969:19;;3999:71;3973:9;4043:6;3999:71;;;4081:72;4149:2;4138:9;4134:18;4125:6;4081:72;;4336:435;4510:2;4495:18;;4524:71;4499:9;4568:6;4524:71;;;4606:72;4674:2;4663:9;4659:18;4650:6;4606:72;;;4689;4757:2;4746:9;4742:18;4733:6;4689:72;;4778:301;4916:2;4930:47;;;4901:18;;4991:78;4901:18;5055:6;4991:78;;5086:407;5277:2;5291:47;;;5262:18;;5352:131;5262:18;5352:131;;5500:213;5618:2;5603:18;;5632:71;5607:9;5676:6;5632:71;;5720:205;5834:2;5819:18;;5848:67;5823:9;5888:6;5848:67;;5932:122;6020:12;;5991:63;6062:163;6165:19;;;6214:4;6205:14;;6158:67;6233:91;;6404:42;6393:54;;6295:24;6376:76;6459:72;6521:5;6504:27;6538:81;6609:4;6598:16;;6581:38;6626:129;;6713:37;6744:5;6762:121;6841:37;6872:5;6841:37;;7006:268;7071:1;7078:101;7092:6;7089:1;7086:13;7078:101;;;7159:11;;;7153:18;7140:11;;;7133:39;7114:2;7107:10;7078:101;;;7194:6;7191:1;7188:13;7185:2;;;7259:1;7250:6;7245:3;7241:16;7234:27;7185:2;7055:219;;;;;7282:97;7370:2;7350:14;7366:7;7346:28;;7330:49;7387:117;7456:24;7474:5;7456:24;;;7449:5;7446:35;7436:2;;7495:1;7492;7485:12;7511:117;7580:24;7598:5;7580:24;",
"source": "/*\n\n Copyright 2019 dYdX Trading Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.5.7;\npragma experimental ABIEncoderV2;\n\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\n\n\ncontract OmiseToken {\n using SafeMath for uint256;\n\n uint256 supply;\n mapping (address => uint256) balances;\n mapping (address => mapping (address => uint256)) allowed;\n\n event Transfer(address token, address from, address to, uint256 value);\n event Approval(address token, address owner, address spender, uint256 value);\n event Issue(address token, address owner, uint256 value);\n\n // Allow anyone to get new token\n function issue(uint256 amount) public {\n issueTo(msg.sender, amount);\n }\n\n function issueTo(address who, uint256 amount) public {\n supply = supply.add(amount);\n balances[who] = balances[who].add(amount);\n emit Issue(address(this), who, amount);\n }\n\n function totalSupply() public view returns (uint256) {\n return supply;\n }\n\n function balanceOf(address who) public view returns (uint256) {\n return balances[who];\n }\n\n function allowance(address owner, address spender) public view returns (uint256) {\n return allowed[owner][spender];\n }\n\n function symbol() public pure returns (string memory) {\n return \"TOMG\";\n }\n\n function name() public pure returns (string memory) {\n return \"Test Omise\";\n }\n\n function decimals() public pure returns (uint8) {\n return 18;\n }\n\n function transfer(address to, uint256 value) public {\n require(balances[msg.sender] >= value);\n\n balances[msg.sender] -= value;\n balances[to] = balances[to].add(value);\n emit Transfer(\n address(this),\n msg.sender,\n to,\n value\n );\n }\n\n function transferFrom(address from, address to, uint256 value) public {\n require(balances[from] >= value && allowed[from][msg.sender] >= value);\n\n balances[to] = balances[to].add(value);\n balances[from] = balances[from].sub(value);\n allowed[from][msg.sender] = allowed[from][msg.sender].sub(value);\n emit Transfer(\n address(this),\n from,\n to,\n value\n );\n }\n\n function approve(address spender, uint256 value) public {\n allowed[msg.sender][spender] = value;\n emit Approval(\n address(this),\n msg.sender,\n spender,\n value\n );\n }\n}\n",
"sourcePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/testing/OmiseToken.sol",
"ast": {
"absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/testing/OmiseToken.sol",
"exportedSymbols": {
"OmiseToken": [
32214
]
},
"id": 32215,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 31914,
"literals": [
"solidity",
"^",
"0.5",
".7"
],
"nodeType": "PragmaDirective",
"src": "603:23:109"
},
{
"id": 31915,
"literals": [
"experimental",
"ABIEncoderV2"
],
"nodeType": "PragmaDirective",
"src": "627:33:109"
},
{
"absolutePath": "@openzeppelin/contracts/math/SafeMath.sol",
"file": "@openzeppelin/contracts/math/SafeMath.sol",
"id": 31917,
"nodeType": "ImportDirective",
"scope": 32215,
"sourceUnit": 37366,
"src": "662:69:109",
"symbolAliases": [
{
"foreign": 31916,
"local": null
}
],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 32214,
"linearizedBaseContracts": [
32214
],
"name": "OmiseToken",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 31920,
"libraryName": {
"contractScope": null,
"id": 31918,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 37365,
"src": "766:8:109",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$37365",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "760:27:109",
"typeName": {
"id": 31919,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "779:7:109",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"constant": false,
"id": 31922,
"name": "supply",
"nodeType": "VariableDeclaration",
"scope": 32214,
"src": "793:14:109",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 31921,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "793:7:109",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 31926,
"name": "balances",
"nodeType": "VariableDeclaration",
"scope": 32214,
"src": "813:37:109",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"typeName": {
"id": 31925,
"keyType": {
"id": 31923,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "822:7:109",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "813:28:109",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 31924,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "833:7:109",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 31932,
"name": "allowed",
"nodeType": "VariableDeclaration",
"scope": 32214,
"src": "856:57:109",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
},
"typeName": {
"id": 31931,
"keyType": {
"id": 31927,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "865:7:109",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "856:49:109",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
},
"valueType": {
"id": 31930,
"keyType": {
"id": 31928,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "885:7:109",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "876:28:109",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 31929,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "896:7:109",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
}
},
"value": null,
"visibility": "internal"
},
{
"anonymous": false,
"documentation": null,
"id": 31942,
"name": "Transfer",
"nodeType": "EventDefinition",
"parameters": {
"id": 31941,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 31934,
"indexed": false,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 31942,
"src": "935:13:109",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 31933,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "935:7:109",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 31936,
"indexed": false,
"name": "from",
"nodeType": "VariableDeclaration",
"scope": 31942,
"src": "950:12:109",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 31935,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "950:7:109",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 31938,
"indexed": false,
"name": "to",
"nodeType": "VariableDeclaration",
"scope": 31942,
"src": "964:10:109",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 31937,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "964:7:109",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 31940,
"indexed": false,
"name": "value",
"nodeType": "VariableDeclaration",
"scope": 31942,
"src": "976:13:109",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 31939,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "976:7:109",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "934:56:109"
},
"src": "920:71:109"
},
{
"anonymous": false,
"documentation": null,
"id": 31952,
"name": "Approval",
"nodeType": "EventDefinition",
"parameters": {
"id": 31951,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 31944,
"indexed": false,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 31952,
"src": "1011:13:109",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 31943,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1011:7:109",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 31946,
"indexed": false,
"name": "owner",
"nodeType": "VariableDeclaration",
"scope": 31952,
"src": "1026:13:109",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 31945,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1026:7:109",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 31948,
"indexed": false,
"name": "spender",
"nodeType": "VariableDeclaration",
"scope": 31952,
"src": "1041:15:109",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 31947,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1041:7:109",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 31950,
"indexed": false,
"name": "value",
"nodeType": "VariableDeclaration",
"scope": 31952,
"src": "1058:13:109",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 31949,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1058:7:109",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1010:62:109"
},
"src": "996:77:109"
},
{
"anonymous": false,
"documentation": null,
"id": 31960,
"name": "Issue",
"nodeType": "EventDefinition",
"parameters": {
"id": 31959,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 31954,
"indexed": false,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 31960,
"src": "1090:13:109",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 31953,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1090:7:109",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 31956,
"indexed": false,
"name": "owner",
"nodeType": "VariableDeclaration",
"scope": 31960,
"src": "1105:13:109",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 31955,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1105:7:109",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 31958,
"indexed": false,
"name": "value",
"nodeType": "VariableDeclaration",
"scope": 31960,
"src": "1120:13:109",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 31957,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1120:7:109",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,