UNPKG

@0xcert/ethereum-erc20-contracts

Version:

Smart contract implementation of the ERC-20 standard on the Ethereum blockchain.

597 lines 16.5 kB
{ "ERC20": { "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": "_remaining", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_spender", "type": "address" }, { "internalType": "uint256", "name": "_value", "type": "uint256" } ], "name": "approve", "outputs": [ { "internalType": "bool", "name": "_success", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_owner", "type": "address" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "_balance", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "decimals", "outputs": [ { "internalType": "uint8", "name": "_decimals", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "name", "outputs": [ { "internalType": "string", "name": "_name", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "symbol", "outputs": [ { "internalType": "string", "name": "_symbol", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalSupply", "outputs": [ { "internalType": "uint256", "name": "_totalSupply", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_to", "type": "address" }, { "internalType": "uint256", "name": "_value", "type": "uint256" } ], "name": "transfer", "outputs": [ { "internalType": "bool", "name": "_success", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_from", "type": "address" }, { "internalType": "address", "name": "_to", "type": "address" }, { "internalType": "uint256", "name": "_value", "type": "uint256" } ], "name": "transferFrom", "outputs": [ { "internalType": "bool", "name": "_success", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" } ], "evm": { "bytecode": { "object": "" }, "methodIdentifiers": { "allowance(address,address)": "dd62ed3e", "approve(address,uint256)": "095ea7b3", "balanceOf(address)": "70a08231", "decimals()": "313ce567", "name()": "06fdde03", "symbol()": "95d89b41", "totalSupply()": "18160ddd", "transfer(address,uint256)": "a9059cbb", "transferFrom(address,address,uint256)": "23b872dd" } }, "metadata": { "compiler": { "version": "0.8.0+commit.c7dfd78e" }, "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": "_remaining", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_spender", "type": "address" }, { "internalType": "uint256", "name": "_value", "type": "uint256" } ], "name": "approve", "outputs": [ { "internalType": "bool", "name": "_success", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_owner", "type": "address" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "_balance", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "decimals", "outputs": [ { "internalType": "uint8", "name": "_decimals", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "name", "outputs": [ { "internalType": "string", "name": "_name", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "symbol", "outputs": [ { "internalType": "string", "name": "_symbol", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalSupply", "outputs": [ { "internalType": "uint256", "name": "_totalSupply", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_to", "type": "address" }, { "internalType": "uint256", "name": "_value", "type": "uint256" } ], "name": "transfer", "outputs": [ { "internalType": "bool", "name": "_success", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_from", "type": "address" }, { "internalType": "address", "name": "_to", "type": "address" }, { "internalType": "uint256", "name": "_value", "type": "uint256" } ], "name": "transferFrom", "outputs": [ { "internalType": "bool", "name": "_success", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" } ], "devdoc": { "details": "This interface uses the official ERC-20 specification from https://eips.ethereum.org/EIPS/eip-20 with the additional requirement that the functions specified as optional have become required.", "events": { "Approval(address,address,uint256)": { "details": "Triggers on any successful call to approve(address _spender, uint256 _value)." }, "Transfer(address,address,uint256)": { "details": "Triggers when tokens are transferred, including zero value transfers." } }, "kind": "dev", "methods": { "allowance(address,address)": { "details": "Returns the amount which _spender is still allowed to withdraw from _owner.", "params": { "_owner": "The address of the account owning tokens.", "_spender": "The address of the account able to transfer the tokens." }, "returns": { "_remaining": "Remaining allowance." } }, "approve(address,uint256)": { "details": "Allows _spender to withdraw from your account multiple times, up to the _value amount. If this function is called again it overwrites the current allowance with _value.", "params": { "_spender": "The address of the account able to transfer the tokens.", "_value": "The amount of tokens to be approved for transfer." }, "returns": { "_success": "Success of operation." } }, "balanceOf(address)": { "details": "Returns the account balance of another account with address _owner.", "params": { "_owner": "The address from which the balance will be retrieved." }, "returns": { "_balance": "Balance of _owner." } }, "decimals()": { "details": "Returns the number of decimals the token uses.", "returns": { "_decimals": "Number of decimals." } }, "name()": { "details": "Returns the name of the token.", "returns": { "_name": "Token name." } }, "symbol()": { "details": "Returns the symbol of the token.", "returns": { "_symbol": "Token symbol." } }, "totalSupply()": { "details": "Returns the total token supply.", "returns": { "_totalSupply": "Total supply." } }, "transfer(address,uint256)": { "details": "Transfers _value amount of tokens to address _to, and MUST fire the Transfer event. The function SHOULD throw if the message caller's account balance does not have enough tokens to spend.", "params": { "_to": "The address of the recipient.", "_value": "The amount of token to be transferred." }, "returns": { "_success": "Success of operation." } }, "transferFrom(address,address,uint256)": { "details": "Transfers _value amount of tokens from address _from to address _to, and MUST fire the Transfer event.", "params": { "_from": "The address of the sender.", "_to": "The address of the recipient.", "_value": "The amount of token to be transferred." }, "returns": { "_success": "Success of operation." } } }, "title": "A standard interface for tokens.", "version": 1 }, "userdoc": { "kind": "user", "methods": {}, "version": 1 } }, "settings": { "compilationTarget": { "./src/contracts/erc20.sol": "ERC20" }, "evmVersion": "istanbul", "libraries": {}, "metadata": { "bytecodeHash": "ipfs" }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [] }, "sources": { "./src/contracts/erc20.sol": { "keccak256": "0x6eda9fe8385e1806e54e097533f5b020873deeccd09c1aaa567198b1e4854ecc", "license": "MIT", "urls": [ "bzz-raw://cbbbe1e7e8ef960a557ce9da05607709e3052e679011bbf603fbcbd38f458e15", "dweb:/ipfs/QmWZxqrooFdd4oNqXyRgZG2HmktzxRaPygV1n4orA7fqrR" ] } }, "version": 1 } } }