UNPKG

@dolomite-exchange/dolomite-margin

Version:

Ethereum Smart Contracts and TypeScript library used for the DolomiteMargin trading protocol

934 lines (933 loc) 94 kB
{ "contractName": "ErroringToken", "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "token", "type": "address" }, { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "Issue", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "Transfer", "type": "event" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "_target", "type": "address" }, { "internalType": "uint256", "name": "_value", "type": "uint256" } ], "name": "addBalance", "outputs": [], "payable": false, "stateMutability": "nonpayable", "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": [ { "internalType": "address", "name": "who", "type": "address" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "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": false, "inputs": [ { "internalType": "address", "name": "_target", "type": "address" }, { "internalType": "uint256", "name": "_value", "type": "uint256" } ], "name": "setBalance", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "bool", "name": "_shouldRevertNameCall", "type": "bool" } ], "name": "setShouldRevertNameCall", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "shouldRevertNameCall", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "totalSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "name", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "symbol", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "decimals", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "transfer", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "transferFrom", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "approve", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Issue\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"addBalance\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"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\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"view\",\"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\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"setBalance\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_shouldRevertNameCall\",\"type\":\"bool\"}],\"name\":\"setShouldRevertNameCall\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"shouldRevertNameCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"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\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/testing/ErroringToken.sol\":\"ErroringToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/protocol/interfaces/IERC20Detailed.sol\":{\"keccak256\":\"0x22a62e2a8155e70300773721902f4b9118e17aa0bb5d9d1b046050a014cfb223\",\"urls\":[\"bzz-raw://03af737a33c552fbe58f6f1fbd5496854fdc28dd57be4365d56663725c083a18\",\"dweb:/ipfs/QmbgLqGAQEd6tXsZB8QaPNCAMiU6nNzP75wNbKdS65BuUF\"]},\"/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/testing/ErroringToken.sol\":{\"keccak256\":\"0xb8f4133c354a420b31bd2c732302b73e94dcf690038ab3dea6dadc5322d8cf3e\",\"urls\":[\"bzz-raw://56d509e8dd3562baf84e96e503a17f267592ddae0881a3a7c83277a1fb8c8148\",\"dweb:/ipfs/QmTadFcJhq8LvosZyEhWDEHHCJo6bQZiN9inKTcCTn6mni\"]},\"/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/testing/TestToken.sol\":{\"keccak256\":\"0xfbf238308c7b72cfc85387bdcf3a88145ab193c82268bed81f6eeea470c8e1bb\",\"urls\":[\"bzz-raw://ee425eb5d26cf169e6fc1ec50c66a59596bb4af77c9b190e5d8b3a0abd26efa1\",\"dweb:/ipfs/QmRKFYpuX7Q3pJ3UuLMcAHJ8SF1Gegp7Q99r2wZo57hDrR\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x640b6dee7a4b830bdfd52b5031a07fc2b12209f5b2e29e5d364a7d37f69d8076\",\"urls\":[\"bzz-raw://31113152e1ddb78fe7a4197f247591ca894e93f916867beb708d8e747b6cc74f\",\"dweb:/ipfs/QmbZaJyXdpsYGykVhHH9qpVGQg9DGCxE2QufbCUy3daTgq\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xe5bb0f57cff3e299f360052ba50f1ea0fff046df2be070b6943e0e3c3fdad8a9\",\"urls\":[\"bzz-raw://59fd025151435da35faa8093a5c7a17de02de9d08ad27275c5cdf05050820d91\",\"dweb:/ipfs/QmQMvwEcPhoRXzbXyrdoeRtvLoifUW9Qh7Luho7bmUPRkc\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b5061091b806100206000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c8063313ce56711610097578063b6169b9c11610066578063b6169b9c146101b8578063cc872b66146101cb578063dd62ed3e146101de578063e30443bc146101f1576100f5565b8063313ce5671461019057806370a08231146101a557806395d89b41146100fa578063a9059cbb14610118576100f5565b806318160ddd116100d357806318160ddd1461014d5780631e929ac31461016257806321e5383a1461016a57806323b872dd1461017d576100f5565b806306fdde03146100fa578063095ea7b3146101185780631207f0c114610138575b600080fd5b610102610204565b60405161010f91906107be565b60405180910390f35b61012b610126366004610640565b610241565b60405161010f91906107b0565b61014b610146366004610640565b61024a565b005b6101556102fd565b60405161010f91906107ff565b61012b610303565b61014b610178366004610640565b61030c565b61012b61018b3660046105f3565b6103fa565b610198610403565b60405161010f919061080d565b6101556101b3366004610593565b610437565b61014b6101c6366004610670565b61045f565b61014b6101d936600461068e565b610490565b6101556101ec3660046105b9565b61049d565b61014b6101ff366004610640565b6104d5565b60606040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610238906107df565b60405180910390fd5b60005b92915050565b60005461025d908263ffffffff61052c16565b600090815573ffffffffffffffffffffffffffffffffffffffff8316815260016020526040902054610295908263ffffffff61052c16565b73ffffffffffffffffffffffffffffffffffffffff83166000818152600160205260409081902092909255905130907f4b2682685b046a3dae8e75ff49b82fa703e366056a43c6a791411011134f4f5d906102f19085906107ff565b60405180910390a35050565b60005490565b60035460ff1681565b600061031783610437565b9050808183011015610355576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610238906107ef565b610365818363ffffffff61052c16565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600160205260408120919091555461039f908363ffffffff61052c16565b600090815560405173ffffffffffffffffffffffffffffffffffffffff851691907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906103ed9086906107ff565b60405180910390a3505050565b60009392505050565b60006040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610238906107df565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b61049a338261024a565b50565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260016020526040808220849055517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906102f19085906107ff565b60008282018381101561056b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610238906107cf565b9392505050565b8035610244816108b2565b8035610244816108c6565b8035610244816108cf565b6000602082840312156105a557600080fd5b60006105b18484610572565b949350505050565b600080604083850312156105cc57600080fd5b60006105d88585610572565b92505060206105e985828601610572565b9150509250929050565b60008060006060848603121561060857600080fd5b60006106148686610572565b935050602061062586828701610572565b925050604061063686828701610588565b9150509250925092565b6000806040838503121561065357600080fd5b600061065f8585610572565b92505060206105e985828601610588565b60006020828403121561068257600080fd5b60006105b1848461057d565b6000602082840312156106a057600080fd5b60006105b18484610588565b6106b581610833565b82525050565b60006106c68261081b565b6106d0818561081f565b93506106e081856020860161085a565b6106e98161088a565b9093019392505050565b6000610700601b8361081f565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b600061073960058361081f565b7f4552524f52000000000000000000000000000000000000000000000000000000815260200192915050565b6000610772600d8361081f565b7f494e56414c49445f56414c554500000000000000000000000000000000000000815260200192915050565b6106b581610851565b6106b581610854565b6020810161024482846106ac565b6020808252810161056b81846106bb565b60208082528101610244816106f3565b602080825281016102448161072c565b6020808252810161024481610765565b60208101610244828461079e565b6020810161024482846107a7565b5190565b90815260200190565b600061024482610838565b151590565b73ffffffffffffffffffffffffffffffffffffffff1690565b90565b60ff1690565b60005b8381101561087557818101518382015260200161085d565b83811115610884576000848401525b50505050565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690565b6108bb81610828565b811461049a57600080fd5b6108bb81610833565b6108bb8161085156fea365627a7a72315820b038eeda434e21bb90fe6256fdba9010e753ff8dea858ef4a91aad8c84093fe26c6578706572696d656e74616cf564736f6c63430005100040", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100f55760003560e01c8063313ce56711610097578063b6169b9c11610066578063b6169b9c146101b8578063cc872b66146101cb578063dd62ed3e146101de578063e30443bc146101f1576100f5565b8063313ce5671461019057806370a08231146101a557806395d89b41146100fa578063a9059cbb14610118576100f5565b806318160ddd116100d357806318160ddd1461014d5780631e929ac31461016257806321e5383a1461016a57806323b872dd1461017d576100f5565b806306fdde03146100fa578063095ea7b3146101185780631207f0c114610138575b600080fd5b610102610204565b60405161010f91906107be565b60405180910390f35b61012b610126366004610640565b610241565b60405161010f91906107b0565b61014b610146366004610640565b61024a565b005b6101556102fd565b60405161010f91906107ff565b61012b610303565b61014b610178366004610640565b61030c565b61012b61018b3660046105f3565b6103fa565b610198610403565b60405161010f919061080d565b6101556101b3366004610593565b610437565b61014b6101c6366004610670565b61045f565b61014b6101d936600461068e565b610490565b6101556101ec3660046105b9565b61049d565b61014b6101ff366004610640565b6104d5565b60606040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610238906107df565b60405180910390fd5b60005b92915050565b60005461025d908263ffffffff61052c16565b600090815573ffffffffffffffffffffffffffffffffffffffff8316815260016020526040902054610295908263ffffffff61052c16565b73ffffffffffffffffffffffffffffffffffffffff83166000818152600160205260409081902092909255905130907f4b2682685b046a3dae8e75ff49b82fa703e366056a43c6a791411011134f4f5d906102f19085906107ff565b60405180910390a35050565b60005490565b60035460ff1681565b600061031783610437565b9050808183011015610355576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610238906107ef565b610365818363ffffffff61052c16565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600160205260408120919091555461039f908363ffffffff61052c16565b600090815560405173ffffffffffffffffffffffffffffffffffffffff851691907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906103ed9086906107ff565b60405180910390a3505050565b60009392505050565b60006040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610238906107df565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b61049a338261024a565b50565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260016020526040808220849055517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906102f19085906107ff565b60008282018381101561056b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610238906107cf565b9392505050565b8035610244816108b2565b8035610244816108c6565b8035610244816108cf565b6000602082840312156105a557600080fd5b60006105b18484610572565b949350505050565b600080604083850312156105cc57600080fd5b60006105d88585610572565b92505060206105e985828601610572565b9150509250929050565b60008060006060848603121561060857600080fd5b60006106148686610572565b935050602061062586828701610572565b925050604061063686828701610588565b9150509250925092565b6000806040838503121561065357600080fd5b600061065f8585610572565b92505060206105e985828601610588565b60006020828403121561068257600080fd5b60006105b1848461057d565b6000602082840312156106a057600080fd5b60006105b18484610588565b6106b581610833565b82525050565b60006106c68261081b565b6106d0818561081f565b93506106e081856020860161085a565b6106e98161088a565b9093019392505050565b6000610700601b8361081f565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b600061073960058361081f565b7f4552524f52000000000000000000000000000000000000000000000000000000815260200192915050565b6000610772600d8361081f565b7f494e56414c49445f56414c554500000000000000000000000000000000000000815260200192915050565b6106b581610851565b6106b581610854565b6020810161024482846106ac565b6020808252810161056b81846106bb565b60208082528101610244816106f3565b602080825281016102448161072c565b6020808252810161024481610765565b60208101610244828461079e565b6020810161024482846107a7565b5190565b90815260200190565b600061024482610838565b151590565b73ffffffffffffffffffffffffffffffffffffffff1690565b90565b60ff1690565b60005b8381101561087557818101518382015260200161085d565b83811115610884576000848401525b50505050565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690565b6108bb81610828565b811461049a57600080fd5b6108bb81610833565b6108bb8161085156fea365627a7a72315820b038eeda434e21bb90fe6256fdba9010e753ff8dea858ef4a91aad8c84093fe26c6578706572696d656e74616cf564736f6c63430005100040", "sourceMap": "709:598:107:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;709:598:107;;;;;;;", "deployedSourceMap": "709:598:107:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;709:598:107;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;752:84;;;:::i;:::-;;;;;;;;;;;;;;;;1219:86;;;;;;;;;:::i;:::-;;;;;;;;1918:196:139;;;;;;;;;:::i;:::-;;2120:83;;;:::i;:::-;;;;;;;;1009:32;;;:::i;1550:362::-;;;;;;;;;:::i;1113:100:107:-;;;;;;;;;:::i;934:80::-;;;:::i;:::-;;;;;;;;2209:99:139;;;;;;;;;:::i;1415:129::-;;;;;;;;;:::i;1164:82::-;;;;;;;;;:::i;2314:128::-;;;;;;;;;:::i;1252:157::-;;;;;;;;;:::i;752:84:107:-;789:13;814:15;;;;;;;;;;;;;;;;;;;1219:86;1270:4;1219:86;;;;;:::o;1918:196:139:-;1990:6;;:18;;2001:6;1990:18;:10;:18;:::i;:::-;1981:6;:27;;;2034:13;;;;;:8;:13;;;;;;:25;;2052:6;2034:25;:17;:25;:::i;:::-;2018:13;;;;;;;:8;:13;;;;;;;:41;;;;2074:33;;2088:4;;2074:33;;;;2100:6;;2074:33;;;;;;;;;;1918:196;;:::o;2120:83::-;2164:7;2190:6;2120:83;:::o;1009:32::-;;;;;;:::o;1550:362::-;1650:19;1672:18;1682:7;1672:9;:18::i;:::-;1650:40;;1732:11;1717;1708:6;:20;:35;;1700:61;;;;;;;;;;;;;;1791:23;:11;1807:6;1791:23;:15;:23;:::i;:::-;1771:17;;;;;;;:8;:17;;;;;:43;;;;1833:6;:18;;1844:6;1833:18;:10;:18;:::i;:::-;1824:6;:27;;;1866:39;;;;;;1824:6;1866:39;;;;1898:6;;1866:39;;;;;;;;;;1550:362;;;:::o;1113:100:107:-;1178:4;1113:100;;;;;:::o;934:80::-;975:5;992:15;;;;;;;;;;;2209:99:139;2288:13;;2262:7;2288:13;;;:8;:13;;;;;;;2209:99::o;1415:129::-;1493:20;:44;;;;;;;;;;;;;1415:129::o;1164:82::-;1212:27;1220:10;1232:6;1212:7;:27::i;:::-;1164:82;:::o;2314:128::-;2412:14;;;;2386:7;2412:14;;;:7;:14;;;;;;;;:23;;;;;;;;;;;;;2314:128::o;1252:157::-;1322:17;;;;;;;:8;:17;;;;;;:26;;;1363:39;;;;;1342:6;;1363:39;;834:176:150;892:7;923:5;;;946:6;;;;938:46;;;;;;;;;;;;;;1002:1;834:176;-1:-1:-1;;;834:176:150:o;5:130:-1:-;72:20;;97:33;72:20;97:33;;142:124;206:20;;231:30;206:20;231:30;;273:130;340:20;;365:33;340:20;365:33;;410:241;;514:2;502:9;493:7;489:23;485:32;482:2;;;530:1;527;520:12;482:2;565:1;582:53;627:7;607:9;582:53;;;572:63;476:175;-1:-1;;;;476:175;658:366;;;779:2;767:9;758:7;754:23;750:32;747:2;;;795:1;792;785:12;747:2;830:1;847:53;892:7;872:9;847:53;;;837:63;;809:97;937:2;955:53;1000:7;991:6;980:9;976:22;955:53;;;945:63;;916:98;741:283;;;;;;1031:491;;;;1169:2;1157:9;1148:7;1144:23;1140:32;1137:2;;;1185:1;1182;1175:12;1137:2;1220:1;1237:53;1282:7;1262:9;1237:53;;;1227:63;;1199:97;1327:2;1345:53;1390:7;1381:6;1370:9;1366:22;1345:53;;;1335:63;;1306:98;1435:2;1453:53;1498:7;1489:6;1478:9;1474:22;1453:53;;;1443:63;;1414:98;1131:391;;;;;;1529:366;;;1650:2;1638:9;1629:7;1625:23;1621:32;1618:2;;;1666:1;1663;1656:12;1618:2;1701:1;1718:53;1763:7;1743:9;1718:53;;;1708:63;;1680:97;1808:2;1826:53;1871:7;1862:6;1851:9;1847:22;1826:53;;1902:235;;2003:2;1991:9;1982:7;1978:23;1974:32;1971:2;;;2019:1;2016;2009:12;1971:2;2054:1;2071:50;2113:7;2093:9;2071:50;;2144:241;;2248:2;2236:9;2227:7;2223:23;2219:32;2216:2;;;2264:1;2261;2254:12;2216:2;2299:1;2316:53;2361:7;2341:9;2316:53;;2392:104;2469:21;2484:5;2469:21;;;2464:3;2457:34;2451:45;;;2503:347;;2615:39;2648:5;2615:39;;;2666:71;2730:6;2725:3;2666:71;;;2659:78;;2742:52;2787:6;2782:3;2775:4;2768:5;2764:16;2742:52;;;2815:29;2837:6;2815:29;;;2806:39;;;;2595:255;-1:-1;;;2595:255;2858:327;;3018:67;3082:2;3077:3;3018:67;;;3118:29;3098:50;;3176:2;3167:12;;3004:181;-1:-1;;3004:181;3194:304;;3354:66;3418:1;3413:3;3354:66;;;3453:7;3433:28;;3489:2;3480:12;;3340:158;-1:-1;;3340:158;3507:313;;3667:67;3731:2;3726:3;3667:67;;;3767:15;3747:36;;3811:2;3802:12;;3653:167;-1:-1;;3653:167;3828:113;3911:24;3929:5;3911:24;;3948:107;4027:22;4043:5;4027:22;;4062:201;4174:2;4159:18;;4188:65;4163:9;4226:6;4188:65;;4270:301;4408:2;4422:47;;;4393:18;;4483:78;4393:18;4547:6;4483:78;;4578:407;4769:2;4783:47;;;4754:18;;4844:131;4754:18;4844:131;;4992:407;5183:2;5197:47;;;5168:18;;5258:131;5168:18;5258:131;;5406:407;5597:2;5611:47;;;5582:18;;5672:131;5582:18;5672:131;;5820:213;5938:2;5923:18;;5952:71;5927:9;5996:6;5952:71;;6040:205;6154:2;6139:18;;6168:67;6143:9;6208:6;6168:67;;6252:122;6340:12;;6311:63;6382:163;6485:19;;;6534:4;6525:14;;6478:67;6553:91;;6615:24;6633:5;6615:24;;6651:85;6717:13;6710:21;;6693:43;6743:121;6816:42;6805:54;;6788:76;6871:72;6933:5;6916:27;6950:81;7021:4;7010:16;;6993:38;7039:268;7104:1;7111:101;7125:6;7122:1;7119:13;7111:101;;;7192:11;;;7186:18;7173:11;;;7166:39;7147:2;7140:10;7111:101;;;7227:6;7224:1;7221:13;7218:2;;;7292:1;7283:6;7278:3;7274:16;7267:27;7218:2;7088:219;;;;;7315:97;7403:2;7383:14;7399:7;7379:28;;7363:49;7420:117;7489:24;7507:5;7489:24;;;7482:5;7479:35;7469:2;;7528:1;7525;7518:12;7544:111;7610:21;7625:5;7610:21;;7662:117;7731:24;7749:5;7731: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 { TestToken } from \"./TestToken.sol\";\n\n\ncontract ErroringToken is TestToken {\n\n function name() public view returns (string memory) {\n revert(\"ERROR\");\n }\n\n function symbol() public view returns (string memory) {\n revert(\"ERROR\");\n }\n\n function decimals() public view returns (uint8) {\n revert(\"ERROR\");\n }\n\n function transfer(address, uint256) public returns (bool) {\n return false;\n }\n\n function transferFrom(address, address, uint256) public returns (bool) {\n return false;\n }\n\n function approve(address, uint256) public returns (bool) {\n return false;\n }\n}\n", "sourcePath": "/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/testing/ErroringToken.sol", "ast": { "absolutePath": "/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/testing/ErroringToken.sol", "exportedSymbols": { "ErroringToken": [ 31550 ] }, "id": 31551, "nodeType": "SourceUnit", "nodes": [ { "id": 31476, "literals": [ "solidity", "^", "0.5", ".7" ], "nodeType": "PragmaDirective", "src": "603:23:107" }, { "id": 31477, "literals": [ "experimental", "ABIEncoderV2" ], "nodeType": "PragmaDirective", "src": "627:33:107" }, { "absolutePath": "/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/testing/TestToken.sol", "file": "./TestToken.sol", "id": 31479, "nodeType": "ImportDirective", "scope": 31551, "sourceUnit": 36717, "src": "662:44:107", "symbolAliases": [ { "foreign": 31478, "local": null } ], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 31480, "name": "TestToken", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 36716, "src": "735:9:107", "typeDescriptions": { "typeIdentifier": "t_contract$_TestToken_$36716", "typeString": "contract TestToken" } }, "id": 31481, "nodeType": "InheritanceSpecifier", "src": "735:9:107" } ], "contractDependencies": [ 24715, 36716, 37552 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 31550, "linearizedBaseContracts": [ 31550, 36716, 24715, 37552 ], "name": "ErroringToken", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 31490, "nodeType": "Block", "src": "804:32:107", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "4552524f52", "id": 31487, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "821:7:107", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_6368faa35d5ea15ae80b929d8626383bb91c2157389a6ddb6239282e6aa9005d", "typeString": "literal_string \"ERROR\"" }, "value": "ERROR" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_6368faa35d5ea15ae80b929d8626383bb91c2157389a6ddb6239282e6aa9005d", "typeString": "literal_string \"ERROR\"" } ], "id": 31486, "name": "revert", "nodeType": "Identifier", "overloadedDeclarations": [ 38112, 38113 ], "referencedDeclaration": 38113, "src": "814:6:107", "typeDescriptions": { "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 31488, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "814:15:107", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 31489, "nodeType": "ExpressionStatement", "src": "814:15:107" } ] }, "documentation": null, "id": 31491, "implemented": true, "kind": "function", "modifiers": [], "name": "name", "nodeType": "FunctionDefinition", "parameters": { "id": 31482, "nodeType": "ParameterList", "parameters": [], "src": "765:2:107" }, "returnParameters": { "id": 31485, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 31484, "name": "", "nodeType": "VariableDeclaration", "scope": 31491, "src": "789:13:107", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 31483, "name": "string", "nodeType": "ElementaryTypeName", "src": "789:6:107", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "788:15:107" }, "scope": 31550, "src": "752:84:107", "stateMutability": "view", "superFunction": 36546, "visibility": "public" }, { "body": { "id": 31500, "nodeType": "Block", "src": "896:32:107", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "4552524f52", "id": 31497, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "913:7:107", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_6368faa35d5ea15ae80b929d8626383bb91c2157389a6ddb6239282e6aa9005d", "typeString": "literal_string \"ERROR\"" }, "value": "ERROR" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_6368faa35d5ea15ae80b929d8626383bb91c2157389a6ddb6239282e6aa9005d", "typeString": "literal_string \"ERROR\"" } ], "id": 31496, "name": "revert", "nodeType": "Identifier", "overloadedDeclarations": [ 38112, 38113 ], "referencedDeclaration": 38113, "src": "906:6:107", "typeDescriptions": { "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 31498, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "906:15:107", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 31499, "nodeType": "ExpressionStatement", "src": "906:15:107" } ] }, "documentation": null, "id": 31501, "implemented": true, "kind": "function", "modifiers": [], "name": "symbol", "nodeType": "FunctionDefinition", "parameters": { "id": 31492, "nodeType": "ParameterList", "parameters": [], "src": "857:2:107" }, "returnParameters": { "id": 31495, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 31494, "name": "", "nodeType": "VariableDeclaration", "scope": 31501, "src": "881:13:107", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 31493, "name": "string", "nodeType": "ElementaryTypeName", "src": "881:6:107", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "880:15:107" }, "scope": 31550, "src": "842:86:107", "stateMutability": "view", "superFunction": 36531, "visibility": "public" }, { "body": { "id": 31510, "nodeType": "Block", "src": "982:32:107", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "4552524f52", "id": 31507, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "999:7:107", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_6368faa35d5ea15ae80b929d8626383bb91c2157389a6ddb6239282e6aa9005d", "typeString": "literal_string \"ERROR\"" }, "value": "ERROR" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_6368faa35d5ea15ae80b929d8626383bb91c2157389a6ddb6239282e6aa9005d", "typeString": "literal_string \"ERROR\"" } ], "id": 31506, "name": "revert", "nodeType": "Identifier", "overloadedDeclarations": [ 38112, 38113 ], "referencedDeclaration": 38113, "src": "992:6:107", "typeDescriptions": { "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 31508, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "992:15:107", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 31509, "nodeType": "ExpressionStatement", "src": "992:15:107" } ] }, "documentation": null, "id": 31511, "implemented": true, "kind": "function", "modifiers": [], "name": "decimals", "nodeType": "FunctionDefinition", "parameters": { "id": 31502, "nodeType": "ParameterList", "parameters": [], "src": "951:2:107" }, "returnParameters": { "id": 31505, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 31504, "name": "", "nodeType": "VariableDeclaration", "scope": 31511, "src": "975:5:107", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 31503, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "975:5:107", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": null, "visibility": "internal" } ], "src": "974:7:107" }, "scope": 31550, "src": "934:80:107", "stateMutability": "view", "superFunction": 36554, "visibility": "public" }, { "body": { "id": 31522, "nodeType": "Block", "src": "1078:29:107", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "66616c7365", "id": 31520, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1095:5:107", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "functionReturnParameters": 31519, "id": 31521, "nodeType": "Return", "src": "1088:12:107" } ] }, "documentation": null, "id": 31523, "implemented": true, "kind": "function", "modifiers": [], "name": "transfer", "nodeType": "FunctionDefinition", "parameters": { "id": 31516, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 31513, "name": "", "nodeType": "VariableDeclaration", "scope": 31523, "src": "1038:7:107", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 31512, "name": "address", "nodeType": "ElementaryTypeName", "src": "1038:7:107", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 31515, "name": "", "nodeType": "VariableDeclaration", "scope": 31523, "src": "1047:7:107", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 31514, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1047:7:107", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1037:18:107" }, "returnParameters": { "id": 31519,