UNPKG

@dolomite-exchange/dolomite-margin

Version:

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

761 lines (760 loc) 419 kB
{ "contractName": "MalformedToken", "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": "uint256", "name": "amount", "type": "uint256" } ], "name": "issue", "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": "address", "name": "_target", "type": "address" }, { "internalType": "uint256", "name": "_value", "type": "uint256" } ], "name": "addBalance", "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\":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\":\"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\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"setBalance\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"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\":{},\"notice\":\"Typical token, but the transfer and approve functions don't return bools\"}},\"settings\":{\"compilationTarget\":{\"/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/testing/MalformedToken.sol\":\"MalformedToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/testing/MalformedToken.sol\":{\"keccak256\":\"0xed70a69f63237ee3a23e0a9434f69ecf4c3c69c8ec9ed3dcf29b1e69ee901a8e\",\"urls\":[\"bzz-raw://94a6738219340b4feaa8a11978094a44c1e67ab182fadcf35ec508530c831cee\",\"dweb:/ipfs/QmfYLuMXuYaRXBRrxDvN25GvA26dxUFbq56n1ziHP1UEmC\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x640b6dee7a4b830bdfd52b5031a07fc2b12209f5b2e29e5d364a7d37f69d8076\",\"urls\":[\"bzz-raw://31113152e1ddb78fe7a4197f247591ca894e93f916867beb708d8e747b6cc74f\",\"dweb:/ipfs/QmbZaJyXdpsYGykVhHH9qpVGQg9DGCxE2QufbCUy3daTgq\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b50610cfb806100206000396000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c8063313ce5671161008c578063a9059cbb11610066578063a9059cbb14610195578063cc872b66146101a8578063dd62ed3e146101bb578063e30443bc146101ce576100df565b8063313ce5671461016557806370a082311461017a57806395d89b411461018d576100df565b806318160ddd116100bd57806318160ddd1461012a57806321e5383a1461013f57806323b872dd14610152576100df565b806306fdde03146100e4578063095ea7b3146101025780631207f0c114610117575b600080fd5b6100ec6101e1565b6040516100f99190610b92565b60405180910390f35b61011561011036600461098b565b610218565b005b61011561012536600461098b565b61028b565b610132610332565b6040516100f99190610bf3565b61011561014d36600461098b565b610338565b61011561016036600461093e565b610403565b61016d6105f9565b6040516100f99190610c01565b6101326101883660046108de565b6105fe565b6100ec610626565b6101156101a336600461098b565b61065d565b6101156101b63660046109bb565b610761565b6101326101c9366004610904565b61076e565b6101156101dc36600461098b565b6107a8565b60408051808201909152600f81527f4d616c666f726d656420546f6b656e0000000000000000000000000000000000602082015290565b33600081815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff871680855292529182902084905590519091907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061027f908590610bf3565b60405180910390a35050565b60005461029e908263ffffffff6107ff16565b600090815573ffffffffffffffffffffffffffffffffffffffff83168152600160205260409020546102d6908263ffffffff6107ff16565b73ffffffffffffffffffffffffffffffffffffffff83166000818152600160205260409081902092909255905130907f4b2682685b046a3dae8e75ff49b82fa703e366056a43c6a791411011134f4f5d9061027f908590610bf3565b60005490565b6000610343836105fe565b905080818301101561038a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038190610be3565b60405180910390fd5b61039a818363ffffffff6107ff16565b73ffffffffffffffffffffffffffffffffffffffff84166000818152600160205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906103f6908690610bf3565b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260016020526040902054811115610462576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038190610bd3565b73ffffffffffffffffffffffffffffffffffffffff831660009081526002602090815260408083203384529091529020548111156104cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038190610bc3565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054610502908263ffffffff6107ff16565b73ffffffffffffffffffffffffffffffffffffffff8084166000908152600160205260408082209390935590851681522054610544908263ffffffff61084516565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260016020908152604080832093909355600281528282203383529052205461058e908263ffffffff61084516565b73ffffffffffffffffffffffffffffffffffffffff80851660008181526002602090815260408083203384529091529081902093909355915190841691907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906103f6908590610bf3565b601290565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b60408051808201909152600381527f4d414c0000000000000000000000000000000000000000000000000000000000602082015290565b336000908152600160205260409020548111156106a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038190610ba3565b336000908152600160205260409020546106c6908263ffffffff61084516565b336000908152600160205260408082209290925573ffffffffffffffffffffffffffffffffffffffff841681522054610705908263ffffffff6107ff16565b73ffffffffffffffffffffffffffffffffffffffff83166000818152600160205260409081902092909255905133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061027f908590610bf3565b61076b338261028b565b50565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600260209081526040808320938516835292905220545b92915050565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260016020526040808220849055517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061027f908590610bf3565b60008282018381101561083e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038190610bb3565b9392505050565b600061083e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250600081848411156108c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103819190610b92565b505050900390565b80356107a281610c9b565b80356107a281610caf565b6000602082840312156108f057600080fd5b60006108fc84846108c8565b949350505050565b6000806040838503121561091757600080fd5b600061092385856108c8565b9250506020610934858286016108c8565b9150509250929050565b60008060006060848603121561095357600080fd5b600061095f86866108c8565b9350506020610970868287016108c8565b9250506040610981868287016108d3565b9150509250925092565b6000806040838503121561099e57600080fd5b60006109aa85856108c8565b9250506020610934858286016108d3565b6000602082840312156109cd57600080fd5b60006108fc84846108d3565b60006109e482610c0f565b6109ee8185610c13565b93506109fe818560208601610c43565b610a0781610c73565b9093019392505050565b6000610a1e601683610c13565b7f546f6b656e3a205472616e73666572206661696c656400000000000000000000815260200192915050565b6000610a57601b83610c13565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b6000610a90602583610c13565b7f237472616e7366657246726f6d3a20494e53554646494349454e545f414c4c4f81527f57414e4345000000000000000000000000000000000000000000000000000000602082015260400192915050565b6000610aef602383610c13565b7f237472616e7366657246726f6d3a20494e53554646494349454e545f42414c4181527f4e43450000000000000000000000000000000000000000000000000000000000602082015260400192915050565b6000610b4e600d83610c13565b7f494e56414c49445f56414c554500000000000000000000000000000000000000815260200192915050565b610b8381610c3a565b82525050565b610b8381610c3d565b6020808252810161083e81846109d9565b602080825281016107a281610a11565b602080825281016107a281610a4a565b602080825281016107a281610a83565b602080825281016107a281610ae2565b602080825281016107a281610b41565b602081016107a28284610b7a565b602081016107a28284610b89565b5190565b90815260200190565b600073ffffffffffffffffffffffffffffffffffffffff82166107a2565b90565b60ff1690565b60005b83811015610c5e578181015183820152602001610c46565b83811115610c6d576000848401525b50505050565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690565b610ca481610c1c565b811461076b57600080fd5b610ca481610c3a56fea365627a7a7231582053318c4e99388ec87a55283a54d35ca690dfd75b21a5c7ae204c31c8759375116c6578706572696d656e74616cf564736f6c63430005100040", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100df5760003560e01c8063313ce5671161008c578063a9059cbb11610066578063a9059cbb14610195578063cc872b66146101a8578063dd62ed3e146101bb578063e30443bc146101ce576100df565b8063313ce5671461016557806370a082311461017a57806395d89b411461018d576100df565b806318160ddd116100bd57806318160ddd1461012a57806321e5383a1461013f57806323b872dd14610152576100df565b806306fdde03146100e4578063095ea7b3146101025780631207f0c114610117575b600080fd5b6100ec6101e1565b6040516100f99190610b92565b60405180910390f35b61011561011036600461098b565b610218565b005b61011561012536600461098b565b61028b565b610132610332565b6040516100f99190610bf3565b61011561014d36600461098b565b610338565b61011561016036600461093e565b610403565b61016d6105f9565b6040516100f99190610c01565b6101326101883660046108de565b6105fe565b6100ec610626565b6101156101a336600461098b565b61065d565b6101156101b63660046109bb565b610761565b6101326101c9366004610904565b61076e565b6101156101dc36600461098b565b6107a8565b60408051808201909152600f81527f4d616c666f726d656420546f6b656e0000000000000000000000000000000000602082015290565b33600081815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff871680855292529182902084905590519091907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061027f908590610bf3565b60405180910390a35050565b60005461029e908263ffffffff6107ff16565b600090815573ffffffffffffffffffffffffffffffffffffffff83168152600160205260409020546102d6908263ffffffff6107ff16565b73ffffffffffffffffffffffffffffffffffffffff83166000818152600160205260409081902092909255905130907f4b2682685b046a3dae8e75ff49b82fa703e366056a43c6a791411011134f4f5d9061027f908590610bf3565b60005490565b6000610343836105fe565b905080818301101561038a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038190610be3565b60405180910390fd5b61039a818363ffffffff6107ff16565b73ffffffffffffffffffffffffffffffffffffffff84166000818152600160205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906103f6908690610bf3565b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260016020526040902054811115610462576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038190610bd3565b73ffffffffffffffffffffffffffffffffffffffff831660009081526002602090815260408083203384529091529020548111156104cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038190610bc3565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054610502908263ffffffff6107ff16565b73ffffffffffffffffffffffffffffffffffffffff8084166000908152600160205260408082209390935590851681522054610544908263ffffffff61084516565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260016020908152604080832093909355600281528282203383529052205461058e908263ffffffff61084516565b73ffffffffffffffffffffffffffffffffffffffff80851660008181526002602090815260408083203384529091529081902093909355915190841691907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906103f6908590610bf3565b601290565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b60408051808201909152600381527f4d414c0000000000000000000000000000000000000000000000000000000000602082015290565b336000908152600160205260409020548111156106a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038190610ba3565b336000908152600160205260409020546106c6908263ffffffff61084516565b336000908152600160205260408082209290925573ffffffffffffffffffffffffffffffffffffffff841681522054610705908263ffffffff6107ff16565b73ffffffffffffffffffffffffffffffffffffffff83166000818152600160205260409081902092909255905133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061027f908590610bf3565b61076b338261028b565b50565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600260209081526040808320938516835292905220545b92915050565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260016020526040808220849055517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061027f908590610bf3565b60008282018381101561083e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038190610bb3565b9392505050565b600061083e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250600081848411156108c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103819190610b92565b505050900390565b80356107a281610c9b565b80356107a281610caf565b6000602082840312156108f057600080fd5b60006108fc84846108c8565b949350505050565b6000806040838503121561091757600080fd5b600061092385856108c8565b9250506020610934858286016108c8565b9150509250929050565b60008060006060848603121561095357600080fd5b600061095f86866108c8565b9350506020610970868287016108c8565b9250506040610981868287016108d3565b9150509250925092565b6000806040838503121561099e57600080fd5b60006109aa85856108c8565b9250506020610934858286016108d3565b6000602082840312156109cd57600080fd5b60006108fc84846108d3565b60006109e482610c0f565b6109ee8185610c13565b93506109fe818560208601610c43565b610a0781610c73565b9093019392505050565b6000610a1e601683610c13565b7f546f6b656e3a205472616e73666572206661696c656400000000000000000000815260200192915050565b6000610a57601b83610c13565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b6000610a90602583610c13565b7f237472616e7366657246726f6d3a20494e53554646494349454e545f414c4c4f81527f57414e4345000000000000000000000000000000000000000000000000000000602082015260400192915050565b6000610aef602383610c13565b7f237472616e7366657246726f6d3a20494e53554646494349454e545f42414c4181527f4e43450000000000000000000000000000000000000000000000000000000000602082015260400192915050565b6000610b4e600d83610c13565b7f494e56414c49445f56414c554500000000000000000000000000000000000000815260200192915050565b610b8381610c3a565b82525050565b610b8381610c3d565b6020808252810161083e81846109d9565b602080825281016107a281610a11565b602080825281016107a281610a4a565b602080825281016107a281610a83565b602080825281016107a281610ae2565b602080825281016107a281610b41565b602081016107a28284610b7a565b602081016107a28284610b89565b5190565b90815260200190565b600073ffffffffffffffffffffffffffffffffffffffff82166107a2565b90565b60ff1690565b60005b83811015610c5e578181015183820152602001610c46565b83811115610c6d576000848401525b50505050565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690565b610ca481610c1c565b811461076b57600080fd5b610ca481610c3a56fea365627a7a7231582053318c4e99388ec87a55283a54d35ca690dfd75b21a5c7ae204c31c8759375116c6578706572696d656e74616cf564736f6c63430005100040", "sourceMap": "810:2905:108:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;810:2905:108;;;;;;;", "deployedSourceMap": "810:2905:108:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;810:2905:108;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2465:93;;;:::i;:::-;;;;;;;;;;;;;;;;3507:206;;;;;;;;;:::i;:::-;;1846:196;;;;;;;;;:::i;2048:83::-;;;:::i;:::-;;;;;;;;1521:319;;;;;;;;;:::i;2988:513::-;;;;;;;;;:::i;2564:74::-;;;:::i;:::-;;;;;;;;2137:99;;;;;;;;;:::i;2376:83::-;;;:::i;2644:338::-;;;;;;;;;:::i;1273:82::-;;;;;;;;;:::i;2242:128::-;;;;;;;;;:::i;1361:154::-;;;;;;;;;:::i;2465:93::-;2527:24;;;;;;;;;;;;;;;;;2465:93;:::o;3507:206::-;3581:10;3573:19;;;;:7;:19;;;;;;;;;:28;;;;;;;;;;;:36;;;3624:82;;3573:28;;3581:10;3624:82;;;;3604:5;;3624:82;;;;;;;;;;3507:206;;:::o;1846:196::-;1918:6;;:18;;1929:6;1918:18;:10;:18;:::i;:::-;1909:6;:27;;;1962:13;;;;;:8;:13;;;;;;:25;;1980:6;1962:25;:17;:25;:::i;:::-;1946:13;;;;;;;:8;:13;;;;;;;:41;;;;2002:33;;2016:4;;2002:33;;;;2028:6;;2002:33;;2048:83;2092:7;2118:6;2048:83;:::o;1521:319::-;1618:16;1637:18;1647:7;1637:9;:18::i;:::-;1618:37;;1697:11;1682;1673:6;:20;:35;;1665:61;;;;;;;;;;;;;;;;;;;;;;1756:23;:11;1772:6;1756:23;:15;:23;:::i;:::-;1736:17;;;;;;;:8;:17;;;;;;:43;;;;1794:39;;1736:17;;;1794:39;;;;1826:6;;1794:39;;;;;;;;;;1521:319;;;:::o;2988:513::-;3076:14;;;;;;;:8;:14;;;;;;:23;-1:-1:-1;3076:23:108;3068:71;;;;;;;;;;;;;;3157:13;;;;;;;:7;:13;;;;;;;;3171:10;3157:25;;;;;;;;:34;-1:-1:-1;3157:34:108;3149:84;;;;;;;;;;;;;;3259:12;;;;;;;:8;:12;;;;;;:23;;3276:5;3259:23;:16;:23;:::i;:::-;3244:12;;;;;;;;:8;:12;;;;;;:38;;;;3309:14;;;;;;;:25;;3328:5;3309:25;:18;:25;:::i;:::-;3292:14;;;;;;;:8;:14;;;;;;;;:42;;;;3372:7;:13;;;;;3386:10;3372:25;;;;;;:36;;3402:5;3372:36;:29;:36;:::i;:::-;3344:13;;;;;;;;:7;:13;;;;;;;;3358:10;3344:25;;;;;;;;;:64;;;;3423:71;;;;;;3344:13;3423:71;;;;3479:5;;3423:71;;2564:74;2629:2;2564:74;:::o;2137:99::-;2216:13;;2190:7;2216:13;;;:8;:13;;;;;;;2137:99::o;2376:83::-;2440:12;;;;;;;;;;;;;;;;;2376:83;:::o;2644:338::-;2723:10;2714:20;;;;:8;:20;;;;;;:29;-1:-1:-1;2714:29:108;2706:64;;;;;;;;;;;;;;2813:10;2804:20;;;;:8;:20;;;;;;:31;;2829:5;2804:31;:24;:31;:::i;:::-;2790:10;2781:20;;;;:8;:20;;;;;;:54;;;;:20;2860:12;;;;;;:23;;2877:5;2860:23;:16;:23;:::i;:::-;2845:12;;;;;;;:8;:12;;;;;;;:38;;;;2898:77;;2920:10;;2898:77;;;;2960:5;;2898:77;;1273:82;1321:27;1329:10;1341:6;1321:7;:27::i;:::-;1273:82;:::o;2242:128::-;2340:14;;;;2314:7;2340:14;;;:7;:14;;;;;;;;:23;;;;;;;;;;2242:128;;;;;:::o;1361:154::-;1428:17;;;;;;;:8;:17;;;;;;:26;;;1469:39;;;;;1448:6;;1469:39;;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:347;;2131:39;2164:5;2131:39;;;2182:71;2246:6;2241:3;2182:71;;;2175:78;;2258:52;2303:6;2298:3;2291:4;2284:5;2280:16;2258:52;;;2331:29;2353:6;2331:29;;;2322:39;;;;2111:255;-1:-1;;;2111:255;2374:322;;2534:67;2598:2;2593:3;2534:67;;;2634:24;2614:45;;2687:2;2678:12;;2520:176;-1:-1;;2520:176;2705:327;;2865:67;2929:2;2924:3;2865:67;;;2965:29;2945:50;;3023:2;3014:12;;2851:181;-1:-1;;2851:181;3041:374;;3201:67;3265:2;3260:3;3201:67;;;3301:34;3281:55;;3370:7;3365:2;3356:12;;3349:29;3406:2;3397:12;;3187:228;-1:-1;;3187:228;3424:372;;3584:67;3648:2;3643:3;3584:67;;;3684:34;3664:55;;3753:5;3748:2;3739:12;;3732:27;3787:2;3778:12;;3570:226;-1:-1;;3570:226;3805:313;;3965:67;4029:2;4024:3;3965:67;;;4065:15;4045:36;;4109:2;4100:12;;3951:167;-1:-1;;3951:167;4126:113;4209:24;4227:5;4209:24;;;4204:3;4197:37;4191:48;;;4246:107;4325:22;4341:5;4325:22;;4360:301;4498:2;4512:47;;;4483:18;;4573:78;4483:18;4637:6;4573:78;;4668:407;4859:2;4873:47;;;4844:18;;4934:131;4844:18;4934:131;;5082:407;5273:2;5287:47;;;5258:18;;5348:131;5258:18;5348:131;;5496:407;5687:2;5701:47;;;5672:18;;5762:131;5672:18;5762:131;;5910:407;6101:2;6115:47;;;6086:18;;6176:131;6086:18;6176:131;;6324:407;6515:2;6529:47;;;6500:18;;6590:131;6500:18;6590:131;;6738:213;6856:2;6841:18;;6870:71;6845:9;6914:6;6870:71;;6958:205;7072:2;7057:18;;7086:67;7061:9;7126:6;7086:67;;7170:122;7258:12;;7229:63;7300:163;7403:19;;;7452:4;7443:14;;7396:67;7471:91;;7642:42;7631:54;;7533:24;7614:76;7697:72;7759:5;7742:27;7776:81;7847:4;7836:16;;7819:38;7865:268;7930:1;7937:101;7951:6;7948:1;7945:13;7937:101;;;8018:11;;;8012:18;7999:11;;;7992:39;7973:2;7966:10;7937:101;;;8053:6;8050:1;8047:13;8044:2;;;8118:1;8109:6;8104:3;8100:16;8093:27;8044:2;7914:219;;;;;8141:97;8229:2;8209:14;8225:7;8205:28;;8189:49;8246:117;8315:24;8333:5;8315:24;;;8308:5;8305:35;8295:2;;8354:1;8351;8344:12;8370:117;8439:24;8457:5;8439:24;", "source": "/*\n\n Copyright 2022 Dolomite.\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\n/**\n * Typical token, but the transfer and approve functions don't return bools\n */\ncontract MalformedToken {\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 indexed from, address indexed to, uint256 value);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n event Issue(address indexed token, address indexed 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 setBalance(address _target, uint _value) public {\n balances[_target] = _value;\n emit Transfer(address(0x0), _target, _value);\n }\n\n function addBalance(\n address _target,\n uint _value\n )\n public\n {\n uint currBalance = balanceOf(_target);\n require(_value + currBalance >= currBalance, \"INVALID_VALUE\");\n balances[_target] = currBalance.add(_value);\n emit Transfer(address(0x0), _target, _value);\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 \"MAL\";\n }\n\n function name() public pure returns (string memory) {\n return \"Malformed Token\";\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, \"Token: Transfer failed\");\n\n balances[msg.sender] = balances[msg.sender].sub(value);\n balances[to] = balances[to].add(value);\n emit Transfer(\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, \"#transferFrom: INSUFFICIENT_BALANCE\");\n require(allowed[from][msg.sender] >= value, \"#transferFrom: INSUFFICIENT_ALLOWANCE\");\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 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 msg.sender,\n spender,\n value\n );\n }\n}\n", "sourcePath": "/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/testing/MalformedToken.sol", "ast": { "absolutePath": "/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/testing/MalformedToken.sol", "exportedSymbols": { "MalformedToken": [ 31912 ] }, "id": 31913, "nodeType": "SourceUnit", "nodes": [ { "id": 31552, "literals": [ "solidity", "^", "0.5", ".7" ], "nodeType": "PragmaDirective", "src": "595:23:108" }, { "id": 31553, "literals": [ "experimental", "ABIEncoderV2" ], "nodeType": "PragmaDirective", "src": "619:33:108" }, { "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", "file": "@openzeppelin/contracts/math/SafeMath.sol", "id": 31555, "nodeType": "ImportDirective", "scope": 31913, "sourceUnit": 37366, "src": "654:69:108", "symbolAliases": [ { "foreign": 31554, "local": null } ], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": "Typical token, but the transfer and approve functions don't return bools", "fullyImplemented": true, "id": 31912, "linearizedBaseContracts": [ 31912 ], "name": "MalformedToken", "nodeType": "ContractDefinition", "nodes": [ { "id": 31558, "libraryName": { "contractScope": null, "id": 31556, "name": "SafeMath", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 37365, "src": "846:8:108", "typeDescriptions": { "typeIdentifier": "t_contract$_SafeMath_$37365", "typeString": "library SafeMath" } }, "nodeType": "UsingForDirective", "src": "840:27:108", "typeName": { "id": 31557, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "859:7:108", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, { "constant": false, "id": 31560, "name": "supply", "nodeType": "VariableDeclaration", "scope": 31912, "src": "873:14:108", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 31559, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "873:7:108", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 31564, "name": "balances", "nodeType": "VariableDeclaration", "scope": 31912, "src": "893:36:108", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "typeName": { "id": 31563, "keyType": { "id": 31561, "name": "address", "nodeType": "ElementaryTypeName", "src": "901:7:108", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "893:27:108", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 31562, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "912:7:108", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 31570, "name": "allowed", "nodeType": "VariableDeclaration", "scope": 31912, "src": "935:55:108", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" }, "typeName": { "id": 31569, "keyType": { "id": 31565, "name": "address", "nodeType": "ElementaryTypeName", "src": "943:7:108", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "935:47:108", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" }, "valueType": { "id": 31568, "keyType": { "id": 31566, "name": "address", "nodeType": "ElementaryTypeName", "src": "962:7:108", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "954:27:108", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 31567, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "973:7:108", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } } }, "value": null, "visibility": "internal" }, { "anonymous": false, "documentation": null, "id": 31578, "name": "Transfer", "nodeType": "EventDefinition", "parameters": { "id": 31577, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 31572, "indexed": true, "name": "from", "nodeType": "VariableDeclaration", "scope": 31578, "src": "1012:20:108", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 31571, "name": "address", "nodeType": "ElementaryTypeName", "src": "1012:7:108", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 31574, "indexed": true, "name": "to", "nodeType": "VariableDeclaration", "scope": 31578, "src": "1034:18:108", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 31573, "name": "address", "nodeType": "ElementaryTypeName", "src": "1034:7:108", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 31576, "indexed": false, "name": "value", "nodeType": "VariableDeclaration", "scope": 31578, "src": "1054:13:108", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 31575, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1054:7:108", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1011:57:108" }, "src": "997:72:108" }, { "anonymous": false, "documentation": null, "id": 31586, "name": "Approval", "nodeType": "EventDefinition", "parameters": { "id": 31585, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 31580, "indexed": true, "name": "owner", "nodeType": "VariableDeclaration", "scope": 31586, "src": "1089:21:108", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 31579, "name": "address", "nodeType": "ElementaryTypeName", "src": "1089:7:108", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 31582, "indexed": true, "name": "spender", "nodeType": "VariableDeclaration", "scope": 31586, "src": "1112:23:108", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 31581, "name": "address", "nodeType": "ElementaryTypeName", "src": "1112:7:108", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 31584, "indexed": false, "name": "value", "nodeType": "VariableDeclaration", "scope": 31586, "src": "1137:13:108", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 31583, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1137:7:108", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1088:63:108" }, "src": "1074:78:108" }, { "anonymous": false, "documentation": null, "id": 31594, "name": "Issue", "nodeType": "EventDefinition", "parameters": { "id": 31593, "nodeType": "ParameterList", "parameters": [