UNPKG

myria-core-sdk

Version:

Latest version SDK

978 lines (977 loc) 107 kB
{ "contractName": "IERC20", "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": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "Transfer", "type": "event" }, { "inputs": [], "name": "totalSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "transfer", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "spender", "type": "address" } ], "name": "allowance", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "approve", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "sender", "type": "address" }, { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "transferFrom", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.6.11+commit.5ef660b1\"},\"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\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/scalable-dex/contracts/src/tokens/ERC20/IERC20.sol\":\"IERC20\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"project:/scalable-dex/contracts/src/tokens/ERC20/IERC20.sol\":{\"keccak256\":\"0xa5012111c615f803033b4dbfeae29ce9f290c356ed2dc9cc409ce52d4e6d3051\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://484eff1e6ee4fd0dd3b0f36a3105f6cd1f2c8a119aeca6b58b4d85c74c4b1205\",\"dweb:/ipfs/QmS5Upw35Fx4EhrHtw6hMLJ14DYwbyqwaBgpNVSjb7Leqt\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "immutableReferences": {}, "sourceMap": "", "deployedSourceMap": "", "source": "// SPDX-License-Identifier: Apache-2.0.\r\npragma solidity ^0.6.11;\r\n\r\n/*\r\n Interface of the ERC20 standard as defined in the EIP. Does not include\r\n the optional functions; to access them see {ERC20Detailed}.\r\n*/\r\ninterface IERC20 {\r\n function totalSupply() external view returns (uint256);\r\n\r\n function balanceOf(address account) external view returns (uint256);\r\n\r\n function transfer(address recipient, uint256 amount) external returns (bool);\r\n\r\n function allowance(address owner, address spender) external view returns (uint256);\r\n\r\n function approve(address spender, uint256 amount) external returns (bool);\r\n\r\n function transferFrom(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) external returns (bool);\r\n\r\n event Transfer(address indexed from, address indexed to, uint256 value);\r\n\r\n event Approval(address indexed owner, address indexed spender, uint256 value);\r\n}\r\n", "sourcePath": "D:\\Myria\\starkex-contracts\\scalable-dex\\contracts\\src\\tokens\\ERC20\\IERC20.sol", "ast": { "absolutePath": "project:/scalable-dex/contracts/src/tokens/ERC20/IERC20.sol", "exportedSymbols": { "IERC20": [ 14409 ] }, "id": 14410, "license": "Apache-2.0.", "nodeType": "SourceUnit", "nodes": [ { "id": 14342, "literals": [ "solidity", "^", "0.6", ".11" ], "nodeType": "PragmaDirective", "src": "41:24:92" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "interface", "documentation": null, "fullyImplemented": false, "id": 14409, "linearizedBaseContracts": [ 14409 ], "name": "IERC20", "nodeType": "ContractDefinition", "nodes": [ { "body": null, "documentation": null, "functionSelector": "18160ddd", "id": 14347, "implemented": false, "kind": "function", "modifiers": [], "name": "totalSupply", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 14343, "nodeType": "ParameterList", "parameters": [], "src": "259:2:92" }, "returnParameters": { "id": 14346, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 14345, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 14347, "src": "285:7:92", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 14344, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "285:7:92", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "284:9:92" }, "scope": 14409, "src": "239:55:92", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "body": null, "documentation": null, "functionSelector": "70a08231", "id": 14354, "implemented": false, "kind": "function", "modifiers": [], "name": "balanceOf", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 14350, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 14349, "mutability": "mutable", "name": "account", "nodeType": "VariableDeclaration", "overrides": null, "scope": 14354, "src": "321:15:92", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 14348, "name": "address", "nodeType": "ElementaryTypeName", "src": "321:7:92", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "320:17:92" }, "returnParameters": { "id": 14353, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 14352, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 14354, "src": "361:7:92", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 14351, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "361:7:92", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "360:9:92" }, "scope": 14409, "src": "302:68:92", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "body": null, "documentation": null, "functionSelector": "a9059cbb", "id": 14363, "implemented": false, "kind": "function", "modifiers": [], "name": "transfer", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 14359, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 14356, "mutability": "mutable", "name": "recipient", "nodeType": "VariableDeclaration", "overrides": null, "scope": 14363, "src": "396:17:92", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 14355, "name": "address", "nodeType": "ElementaryTypeName", "src": "396:7:92", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 14358, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 14363, "src": "415:14:92", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 14357, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "415:7:92", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "395:35:92" }, "returnParameters": { "id": 14362, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 14361, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 14363, "src": "449:4:92", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 14360, "name": "bool", "nodeType": "ElementaryTypeName", "src": "449:4:92", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "448:6:92" }, "scope": 14409, "src": "378:77:92", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": null, "documentation": null, "functionSelector": "dd62ed3e", "id": 14372, "implemented": false, "kind": "function", "modifiers": [], "name": "allowance", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 14368, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 14365, "mutability": "mutable", "name": "owner", "nodeType": "VariableDeclaration", "overrides": null, "scope": 14372, "src": "482:13:92", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 14364, "name": "address", "nodeType": "ElementaryTypeName", "src": "482:7:92", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 14367, "mutability": "mutable", "name": "spender", "nodeType": "VariableDeclaration", "overrides": null, "scope": 14372, "src": "497:15:92", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 14366, "name": "address", "nodeType": "ElementaryTypeName", "src": "497:7:92", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "481:32:92" }, "returnParameters": { "id": 14371, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 14370, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 14372, "src": "537:7:92", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 14369, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "537:7:92", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "536:9:92" }, "scope": 14409, "src": "463:83:92", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "body": null, "documentation": null, "functionSelector": "095ea7b3", "id": 14381, "implemented": false, "kind": "function", "modifiers": [], "name": "approve", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 14377, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 14374, "mutability": "mutable", "name": "spender", "nodeType": "VariableDeclaration", "overrides": null, "scope": 14381, "src": "571:15:92", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 14373, "name": "address", "nodeType": "ElementaryTypeName", "src": "571:7:92", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 14376, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 14381, "src": "588:14:92", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 14375, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "588:7:92", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "570:33:92" }, "returnParameters": { "id": 14380, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 14379, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 14381, "src": "622:4:92", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 14378, "name": "bool", "nodeType": "ElementaryTypeName", "src": "622:4:92", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "621:6:92" }, "scope": 14409, "src": "554:74:92", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": null, "documentation": null, "functionSelector": "23b872dd", "id": 14392, "implemented": false, "kind": "function", "modifiers": [], "name": "transferFrom", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 14388, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 14383, "mutability": "mutable", "name": "sender", "nodeType": "VariableDeclaration", "overrides": null, "scope": 14392, "src": "668:14:92", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 14382, "name": "address", "nodeType": "ElementaryTypeName", "src": "668:7:92", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 14385, "mutability": "mutable", "name": "recipient", "nodeType": "VariableDeclaration", "overrides": null, "scope": 14392, "src": "693:17:92", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 14384, "name": "address", "nodeType": "ElementaryTypeName", "src": "693:7:92", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 14387, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 14392, "src": "721:14:92", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 14386, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "721:7:92", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "657:85:92" }, "returnParameters": { "id": 14391, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 14390, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 14392, "src": "761:4:92", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 14389, "name": "bool", "nodeType": "ElementaryTypeName", "src": "761:4:92", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "760:6:92" }, "scope": 14409, "src": "636:131:92", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "anonymous": false, "documentation": null, "id": 14400, "name": "Transfer", "nodeType": "EventDefinition", "parameters": { "id": 14399, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 14394, "indexed": true, "mutability": "mutable", "name": "from", "nodeType": "VariableDeclaration", "overrides": null, "scope": 14400, "src": "790:20:92", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 14393, "name": "address", "nodeType": "ElementaryTypeName", "src": "790:7:92", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 14396, "indexed": true, "mutability": "mutable", "name": "to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 14400, "src": "812:18:92", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 14395, "name": "address", "nodeType": "ElementaryTypeName", "src": "812:7:92", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 14398, "indexed": false, "mutability": "mutable", "name": "value", "nodeType": "VariableDeclaration", "overrides": null, "scope": 14400, "src": "832:13:92", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 14397, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "832:7:92", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "789:57:92" }, "src": "775:72:92" }, { "anonymous": false,