diff --git a/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts b/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts index 52e379ecd2..e3248a2c0e 100644 --- a/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts +++ b/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts @@ -195,7 +195,7 @@ export function getCompletionSnippets(range: monacoTypes.IRange, monaco): monaco label: 'erc20i', kind: monaco.languages.CompletionItemKind.Snippet, insertText: '\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-20\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\ninterface Token {\r\n\r\n \/\/\/ @param _owner The address from which the balance will be retrieved\r\n \/\/\/ @return balance the balance\r\n function balanceOf(address _owner) external view returns (uint256 balance);\r\n\r\n \/\/\/ @notice send `_value` token to `_to` from `msg.sender`\r\n \/\/\/ @param _to The address of the recipient\r\n \/\/\/ @param _value The amount of token to be transferred\r\n \/\/\/ @return success Whether the transfer was successful or not\r\n function transfer(address _to, uint256 _value) external returns (bool success);\r\n\r\n \/\/\/ @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`\r\n \/\/\/ @param _from The address of the sender\r\n \/\/\/ @param _to The address of the recipient\r\n \/\/\/ @param _value The amount of token to be transferred\r\n \/\/\/ @return success Whether the transfer was successful or not\r\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);\r\n\r\n \/\/\/ @notice `msg.sender` approves `_addr` to spend `_value` tokens\r\n \/\/\/ @param _spender The address of the account able to transfer the tokens\r\n \/\/\/ @param _value The amount of wei to be approved for transfer\r\n \/\/\/ @return success Whether the approval was successful or not\r\n function approve(address _spender, uint256 _value) external returns (bool success);\r\n\r\n \/\/\/ @param _owner The address of the account owning tokens\r\n \/\/\/ @param _spender The address of the account able to transfer the tokens\r\n \/\/\/ @return remaining Amount of remaining tokens allowed to spent\r\n function allowance(address _owner, address _spender) external view returns (uint256 remaining);\r\n\r\n event Transfer(address indexed _from, address indexed _to, uint256 _value);\r\n event Approval(address indexed _owner, address indexed _spender, uint256 _value);\r\n}', - documentation: 'ERC20 token standard interface\n\n \/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-20\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.8.0;\r\n\r\ninterface Token {\r\n\r\n \/\/\/ @param _owner The address from which the balance will be retrieved\r\n \/\/\/ @return balance the balance\r\n function balanceOf(address _owner) external view returns (uint256 balance);\r\n\r\n \/\/\/ @notice send `_value` token to `_to` from `msg.sender`\r\n \/\/\/ @param _to The address of the recipient\r\n \/\/\/ @param _value The amount of token to be transferred\r\n \/\/\/ @return success Whether the transfer was successful or not\r\n function transfer(address _to, uint256 _value) external returns (bool success);\r\n\r\n \/\/\/ @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`\r\n \/\/\/ @param _from The address of the sender\r\n \/\/\/ @param _to The address of the recipient\r\n \/\/\/ @param _value The amount of token to be transferred\r\n \/\/\/ @return success Whether the transfer was successful or not\r\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);\r\n\r\n \/\/\/ @notice `msg.sender` approves `_addr` to spend `_value` tokens\r\n \/\/\/ @param _spender The address of the account able to transfer the tokens\r\n \/\/\/ @param _value The amount of wei to be approved for transfer\r\n \/\/\/ @return success Whether the approval was successful or not\r\n function approve(address _spender, uint256 _value) external returns (bool success);\r\n\r\n \/\/\/ @param _owner The address of the account owning tokens\r\n \/\/\/ @param _spender The address of the account able to transfer the tokens\r\n \/\/\/ @return remaining Amount of remaining tokens allowed to spent\r\n function allowance(address _owner, address _spender) external view returns (uint256 remaining);\r\n\r\n event Transfer(address indexed _from, address indexed _to, uint256 _value);\r\n event Approval(address indexed _owner, address indexed _spender, uint256 _value);\r\n}', + documentation: 'ERC20 token standard interface\n\n \/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-20\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\ninterface Token {\r\n\r\n \/\/\/ @param _owner The address from which the balance will be retrieved\r\n \/\/\/ @return balance the balance\r\n function balanceOf(address _owner) external view returns (uint256 balance);\r\n\r\n \/\/\/ @notice send `_value` token to `_to` from `msg.sender`\r\n \/\/\/ @param _to The address of the recipient\r\n \/\/\/ @param _value The amount of token to be transferred\r\n \/\/\/ @return success Whether the transfer was successful or not\r\n function transfer(address _to, uint256 _value) external returns (bool success);\r\n\r\n \/\/\/ @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`\r\n \/\/\/ @param _from The address of the sender\r\n \/\/\/ @param _to The address of the recipient\r\n \/\/\/ @param _value The amount of token to be transferred\r\n \/\/\/ @return success Whether the transfer was successful or not\r\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);\r\n\r\n \/\/\/ @notice `msg.sender` approves `_addr` to spend `_value` tokens\r\n \/\/\/ @param _spender The address of the account able to transfer the tokens\r\n \/\/\/ @param _value The amount of wei to be approved for transfer\r\n \/\/\/ @return success Whether the approval was successful or not\r\n function approve(address _spender, uint256 _value) external returns (bool success);\r\n\r\n \/\/\/ @param _owner The address of the account owning tokens\r\n \/\/\/ @param _spender The address of the account able to transfer the tokens\r\n \/\/\/ @return remaining Amount of remaining tokens allowed to spent\r\n function allowance(address _owner, address _spender) external view returns (uint256 remaining);\r\n\r\n event Transfer(address indexed _from, address indexed _to, uint256 _value);\r\n event Approval(address indexed _owner, address indexed _spender, uint256 _value);\r\n}', detail: 'ERC20 interface', insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet, range @@ -204,7 +204,7 @@ export function getCompletionSnippets(range: monacoTypes.IRange, monaco): monaco label: 'erc20', kind: monaco.languages.CompletionItemKind.Snippet, insertText: '\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-20\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\ninterface Token {\r\n\r\n \/\/\/ @param _owner The address from which the balance will be retrieved\r\n \/\/\/ @return balance the balance\r\n function balanceOf(address _owner) external view returns (uint256 balance);\r\n\r\n \/\/\/ @notice send `_value` token to `_to` from `msg.sender`\r\n \/\/\/ @param _to The address of the recipient\r\n \/\/\/ @param _value The amount of token to be transferred\r\n \/\/\/ @return success Whether the transfer was successful or not\r\n function transfer(address _to, uint256 _value) external returns (bool success);\r\n\r\n \/\/\/ @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`\r\n \/\/\/ @param _from The address of the sender\r\n \/\/\/ @param _to The address of the recipient\r\n \/\/\/ @param _value The amount of token to be transferred\r\n \/\/\/ @return success Whether the transfer was successful or not\r\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);\r\n\r\n \/\/\/ @notice `msg.sender` approves `_addr` to spend `_value` tokens\r\n \/\/\/ @param _spender The address of the account able to transfer the tokens\r\n \/\/\/ @param _value The amount of wei to be approved for transfer\r\n \/\/\/ @return success Whether the approval was successful or not\r\n function approve(address _spender , uint256 _value) external returns (bool success);\r\n\r\n \/\/\/ @param _owner The address of the account owning tokens\r\n \/\/\/ @param _spender The address of the account able to transfer the tokens\r\n \/\/\/ @return remaining Amount of remaining tokens allowed to spent\r\n function allowance(address _owner, address _spender) external view returns (uint256 remaining);\r\n\r\n event Transfer(address indexed _from, address indexed _to, uint256 _value);\r\n event Approval(address indexed _owner, address indexed _spender, uint256 _value);\r\n}\r\n\r\ncontract Standard_Token is Token {\r\n uint256 constant private MAX_UINT256 = 2**256 - 1;\r\n mapping (address => uint256) public balances;\r\n mapping (address => mapping (address => uint256)) public allowed;\r\n uint256 public totalSupply;\r\n \/*\r\n NOTE:\r\n The following variables are OPTIONAL vanities. One does not have to include them.\r\n They allow one to customise the token contract & in no way influences the core functionality.\r\n Some wallets\/interfaces might not even bother to look at this information.\r\n *\/\r\n string public name; \/\/fancy name: eg Simon Bucks\r\n uint8 public decimals; \/\/How many decimals to show.\r\n string public symbol; \/\/An identifier: eg SBX\r\n\r\n constructor(uint256 _initialAmount, string memory _tokenName, uint8 _decimalUnits, string memory _tokenSymbol) {\r\n balances[msg.sender] = _initialAmount; \/\/ Give the creator all initial tokens\r\n totalSupply = _initialAmount; \/\/ Update total supply\r\n name = _tokenName; \/\/ Set the name for display purposes\r\n decimals = _decimalUnits; \/\/ Amount of decimals for display purposes\r\n symbol = _tokenSymbol; \/\/ Set the symbol for display purposes\r\n }\r\n\r\n function transfer(address _to, uint256 _value) public override returns (bool success) {\r\n require(balances[msg.sender] >= _value, \"token balance is lower than the value requested\");\r\n balances[msg.sender] -= _value;\r\n balances[_to] += _value;\r\n emit Transfer(msg.sender, _to, _value); \/\/solhint-disable-line indent, no-unused-vars\r\n return true;\r\n }\r\n\r\n function transferFrom(address _from, address _to, uint256 _value) public override returns (bool success) {\r\n uint256 allowance = allowed[_from][msg.sender];\r\n require(balances[_from] >= _value && allowance >= _value, \"token balance or allowance is lower than amount requested\");\r\n balances[_to] += _value;\r\n balances[_from] -= _value;\r\n if (allowance < MAX_UINT256) {\r\n allowed[_from][msg.sender] -= _value;\r\n }\r\n emit Transfer(_from, _to, _value); \/\/solhint-disable-line indent, no-unused-vars\r\n return true;\r\n }\r\n\r\n function balanceOf(address _owner) public override view returns (uint256 balance) {\r\n return balances[_owner];\r\n }\r\n\r\n function approve(address _spender, uint256 _value) public override returns (bool success) {\r\n allowed[msg.sender][_spender] = _value;\r\n emit Approval(msg.sender, _spender, _value); \/\/solhint-disable-line indent, no-unused-vars\r\n return true;\r\n }\r\n\r\n function allowance(address _owner, address _spender) public override view returns (uint256 remaining) {\r\n return allowed[_owner][_spender];\r\n }\r\n}', - documentation: 'ERC20 example implementation\n\n \/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-20\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.8.0;\r\n\r\ninterface Token {\r\n\r\n \/\/\/ @param _owner The address from which the balance will be retrieved\r\n \/\/\/ @return balance the balance\r\n function balanceOf(address _owner) external view returns (uint256 balance);\r\n\r\n \/\/\/ @notice send `_value` token to `_to` from `msg.sender`\r\n \/\/\/ @param _to The address of the recipient\r\n \/\/\/ @param _value The amount of token to be transferred\r\n \/\/\/ @return success Whether the transfer was successful or not\r\n function transfer(address _to, uint256 _value) external returns (bool success);\r\n\r\n \/\/\/ @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`\r\n \/\/\/ @param _from The address of the sender\r\n \/\/\/ @param _to The address of the recipient\r\n \/\/\/ @param _value The amount of token to be transferred\r\n \/\/\/ @return success Whether the transfer was successful or not\r\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);\r\n\r\n \/\/\/ @notice `msg.sender` approves `_addr` to spend `_value` tokens\r\n \/\/\/ @param _spender The address of the account able to transfer the tokens\r\n \/\/\/ @param _value The amount of wei to be approved for transfer\r\n \/\/\/ @return success Whether the approval was successful or not\r\n function approve(address _spender , uint256 _value) external returns (bool success);\r\n\r\n \/\/\/ @param _owner The address of the account owning tokens\r\n \/\/\/ @param _spender The address of the account able to transfer the tokens\r\n \/\/\/ @return remaining Amount of remaining tokens allowed to spent\r\n function allowance(address _owner, address _spender) external view returns (uint256 remaining);\r\n\r\n event Transfer(address indexed _from, address indexed _to, uint256 _value);\r\n event Approval(address indexed _owner, address indexed _spender, uint256 _value);\r\n}\r\n\r\ncontract Standard_Token is Token {\r\n uint256 constant private MAX_UINT256 = 2**256 - 1;\r\n mapping (address => uint256) public balances;\r\n mapping (address => mapping (address => uint256)) public allowed;\r\n uint256 public totalSupply;\r\n \/*\r\n NOTE:\r\n The following variables are OPTIONAL vanities. One does not have to include them.\r\n They allow one to customise the token contract & in no way influences the core functionality.\r\n Some wallets\/interfaces might not even bother to look at this information.\r\n *\/\r\n string public name; \/\/fancy name: eg Simon Bucks\r\n uint8 public decimals; \/\/How many decimals to show.\r\n string public symbol; \/\/An identifier: eg SBX\r\n\r\n constructor(uint256 _initialAmount, string memory _tokenName, uint8 _decimalUnits, string memory _tokenSymbol) {\r\n balances[msg.sender] = _initialAmount; \/\/ Give the creator all initial tokens\r\n totalSupply = _initialAmount; \/\/ Update total supply\r\n name = _tokenName; \/\/ Set the name for display purposes\r\n decimals = _decimalUnits; \/\/ Amount of decimals for display purposes\r\n symbol = _tokenSymbol; \/\/ Set the symbol for display purposes\r\n }\r\n\r\n function transfer(address _to, uint256 _value) public override returns (bool success) {\r\n require(balances[msg.sender] >= _value, \"token balance is lower than the value requested\");\r\n balances[msg.sender] -= _value;\r\n balances[_to] += _value;\r\n emit Transfer(msg.sender, _to, _value); \/\/solhint-disable-line indent, no-unused-vars\r\n return true;\r\n }\r\n\r\n function transferFrom(address _from, address _to, uint256 _value) public override returns (bool success) {\r\n uint256 allowance = allowed[_from][msg.sender];\r\n require(balances[_from] >= _value && allowance >= _value, \"token balance or allowance is lower than amount requested\");\r\n balances[_to] += _value;\r\n balances[_from] -= _value;\r\n if (allowance < MAX_UINT256) {\r\n allowed[_from][msg.sender] -= _value;\r\n }\r\n emit Transfer(_from, _to, _value); \/\/solhint-disable-line indent, no-unused-vars\r\n return true;\r\n }\r\n\r\n function balanceOf(address _owner) public override view returns (uint256 balance) {\r\n return balances[_owner];\r\n }\r\n\r\n function approve(address _spender, uint256 _value) public override returns (bool success) {\r\n allowed[msg.sender][_spender] = _value;\r\n emit Approval(msg.sender, _spender, _value); \/\/solhint-disable-line indent, no-unused-vars\r\n return true;\r\n }\r\n\r\n function allowance(address _owner, address _spender) public override view returns (uint256 remaining) {\r\n return allowed[_owner][_spender];\r\n }\r\n}', + documentation: 'ERC20 example implementation\n\n \/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-20\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\ninterface Token {\r\n\r\n \/\/\/ @param _owner The address from which the balance will be retrieved\r\n \/\/\/ @return balance the balance\r\n function balanceOf(address _owner) external view returns (uint256 balance);\r\n\r\n \/\/\/ @notice send `_value` token to `_to` from `msg.sender`\r\n \/\/\/ @param _to The address of the recipient\r\n \/\/\/ @param _value The amount of token to be transferred\r\n \/\/\/ @return success Whether the transfer was successful or not\r\n function transfer(address _to, uint256 _value) external returns (bool success);\r\n\r\n \/\/\/ @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`\r\n \/\/\/ @param _from The address of the sender\r\n \/\/\/ @param _to The address of the recipient\r\n \/\/\/ @param _value The amount of token to be transferred\r\n \/\/\/ @return success Whether the transfer was successful or not\r\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);\r\n\r\n \/\/\/ @notice `msg.sender` approves `_addr` to spend `_value` tokens\r\n \/\/\/ @param _spender The address of the account able to transfer the tokens\r\n \/\/\/ @param _value The amount of wei to be approved for transfer\r\n \/\/\/ @return success Whether the approval was successful or not\r\n function approve(address _spender , uint256 _value) external returns (bool success);\r\n\r\n \/\/\/ @param _owner The address of the account owning tokens\r\n \/\/\/ @param _spender The address of the account able to transfer the tokens\r\n \/\/\/ @return remaining Amount of remaining tokens allowed to spent\r\n function allowance(address _owner, address _spender) external view returns (uint256 remaining);\r\n\r\n event Transfer(address indexed _from, address indexed _to, uint256 _value);\r\n event Approval(address indexed _owner, address indexed _spender, uint256 _value);\r\n}\r\n\r\ncontract Standard_Token is Token {\r\n uint256 constant private MAX_UINT256 = 2**256 - 1;\r\n mapping (address => uint256) public balances;\r\n mapping (address => mapping (address => uint256)) public allowed;\r\n uint256 public totalSupply;\r\n \/*\r\n NOTE:\r\n The following variables are OPTIONAL vanities. One does not have to include them.\r\n They allow one to customise the token contract & in no way influences the core functionality.\r\n Some wallets\/interfaces might not even bother to look at this information.\r\n *\/\r\n string public name; \/\/fancy name: eg Simon Bucks\r\n uint8 public decimals; \/\/How many decimals to show.\r\n string public symbol; \/\/An identifier: eg SBX\r\n\r\n constructor(uint256 _initialAmount, string memory _tokenName, uint8 _decimalUnits, string memory _tokenSymbol) {\r\n balances[msg.sender] = _initialAmount; \/\/ Give the creator all initial tokens\r\n totalSupply = _initialAmount; \/\/ Update total supply\r\n name = _tokenName; \/\/ Set the name for display purposes\r\n decimals = _decimalUnits; \/\/ Amount of decimals for display purposes\r\n symbol = _tokenSymbol; \/\/ Set the symbol for display purposes\r\n }\r\n\r\n function transfer(address _to, uint256 _value) public override returns (bool success) {\r\n require(balances[msg.sender] >= _value, \"token balance is lower than the value requested\");\r\n balances[msg.sender] -= _value;\r\n balances[_to] += _value;\r\n emit Transfer(msg.sender, _to, _value); \/\/solhint-disable-line indent, no-unused-vars\r\n return true;\r\n }\r\n\r\n function transferFrom(address _from, address _to, uint256 _value) public override returns (bool success) {\r\n uint256 allowance = allowed[_from][msg.sender];\r\n require(balances[_from] >= _value && allowance >= _value, \"token balance or allowance is lower than amount requested\");\r\n balances[_to] += _value;\r\n balances[_from] -= _value;\r\n if (allowance < MAX_UINT256) {\r\n allowed[_from][msg.sender] -= _value;\r\n }\r\n emit Transfer(_from, _to, _value); \/\/solhint-disable-line indent, no-unused-vars\r\n return true;\r\n }\r\n\r\n function balanceOf(address _owner) public override view returns (uint256 balance) {\r\n return balances[_owner];\r\n }\r\n\r\n function approve(address _spender, uint256 _value) public override returns (bool success) {\r\n allowed[msg.sender][_spender] = _value;\r\n emit Approval(msg.sender, _spender, _value); \/\/solhint-disable-line indent, no-unused-vars\r\n return true;\r\n }\r\n\r\n function allowance(address _owner, address _spender) public override view returns (uint256 remaining) {\r\n return allowed[_owner][_spender];\r\n }\r\n}', detail: 'ERC20 example', insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet, range @@ -213,10 +213,37 @@ export function getCompletionSnippets(range: monacoTypes.IRange, monaco): monaco label: 'erc165i', kind: monaco.languages.CompletionItemKind.Snippet, insertText: '\/\/ https://eips.ethereum.org/EIPS/eip-165 \r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.9.0;\r\ninterface ERC165 {\r\n \/\/\/ @notice Query if a contract implements an interface\r\n \/\/\/ @param interfaceID The interface identifier, as specified in ERC-165\r\n \/\/\/ @dev Interface identification is specified in ERC-165. This function\r\n \/\/\/ uses less than 30,000 gas.\r\n \/\/\/ @return `true` if the contract implements `interfaceID` and\r\n \/\/\/ `interfaceID` is not 0xffffffff, `false` otherwise\r\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\r\n}', - documentation: 'ERC165 Standard Interface Detection Interface: Creates a standard method to publish and detect what interfaces a smart contract implements. \n\n \/\/ https://eips.ethereum.org/EIPS/eip-165 \r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.8.0;\r\ninterface ERC165 {\r\n \/\/\/ @notice Query if a contract implements an interface\r\n \/\/\/ @param interfaceID The interface identifier, as specified in ERC-165\r\n \/\/\/ @dev Interface identification is specified in ERC-165. This function\r\n \/\/\/ uses less than 30,000 gas.\r\n \/\/\/ @return `true` if the contract implements `interfaceID` and\r\n \/\/\/ `interfaceID` is not 0xffffffff, `false` otherwise\r\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\r\n}', + documentation: 'ERC165 Standard Interface Detection Interface: Creates a standard method to publish and detect what interfaces a smart contract implements. \n\n \/\/ https://eips.ethereum.org/EIPS/eip-165 \r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.9.0;\r\ninterface ERC165 {\r\n \/\/\/ @notice Query if a contract implements an interface\r\n \/\/\/ @param interfaceID The interface identifier, as specified in ERC-165\r\n \/\/\/ @dev Interface identification is specified in ERC-165. This function\r\n \/\/\/ uses less than 30,000 gas.\r\n \/\/\/ @return `true` if the contract implements `interfaceID` and\r\n \/\/\/ `interfaceID` is not 0xffffffff, `false` otherwise\r\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\r\n}', detail: 'ERC165 interface', insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet, range + }, + { + label: 'erc721i', + kind: monaco.languages.CompletionItemKind.Snippet, + insertText: '\/\/ https://eips.ethereum.org/EIPS/eip-721 \r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\n\/\/\/ @title ERC-721 Non-Fungible Token Standard\r\n\/\/\/ @dev See https:\/\/eips.ethereum.org\/EIPS\/eip-721\r\n\/\/\/ Note: the ERC-165 identifier for this interface is 0x80ac58cd.\r\ninterface ERC721 \/* is ERC165 *\/ {\r\n \/\/\/ @dev This emits when ownership of any NFT changes by any mechanism.\r\n \/\/\/ This event emits when NFTs are created (`from` == 0) and destroyed\r\n \/\/\/ (`to` == 0). Exception: during contract creation, any number of NFTs\r\n \/\/\/ may be created and assigned without emitting Transfer. At the time of\r\n \/\/\/ any transfer, the approved address for that NFT (if any) is reset to none.\r\n event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);\r\n\r\n \/\/\/ @dev This emits when the approved address for an NFT is changed or\r\n \/\/\/ reaffirmed. The zero address indicates there is no approved address.\r\n \/\/\/ When a Transfer event emits, this also indicates that the approved\r\n \/\/\/ address for that NFT (if any) is reset to none.\r\n event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);\r\n\r\n \/\/\/ @dev This emits when an operator is enabled or disabled for an owner.\r\n \/\/\/ The operator can manage all NFTs of the owner.\r\n event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);\r\n\r\n \/\/\/ @notice Count all NFTs assigned to an owner\r\n \/\/\/ @dev NFTs assigned to the zero address are considered invalid, and this\r\n \/\/\/ function throws for queries about the zero address.\r\n \/\/\/ @param _owner An address for whom to query the balance\r\n \/\/\/ @return The number of NFTs owned by `_owner`, possibly zero\r\n function balanceOf(address _owner) external view returns (uint256);\r\n\r\n \/\/\/ @notice Find the owner of an NFT\r\n \/\/\/ @dev NFTs assigned to zero address are considered invalid, and queries\r\n \/\/\/ about them do throw.\r\n \/\/\/ @param _tokenId The identifier for an NFT\r\n \/\/\/ @return The address of the owner of the NFT\r\n function ownerOf(uint256 _tokenId) external view returns (address);\r\n\r\n \/\/\/ @notice Transfers the ownership of an NFT from one address to another address\r\n \/\/\/ @dev Throws unless `msg.sender` is the current owner, an authorized\r\n \/\/\/ operator, or the approved address for this NFT. Throws if `_from` is\r\n \/\/\/ not the current owner. Throws if `_to` is the zero address. Throws if\r\n \/\/\/ `_tokenId` is not a valid NFT. When transfer is complete, this function\r\n \/\/\/ checks if `_to` is a smart contract (code size > 0). If so, it calls\r\n \/\/\/ `onERC721Received` on `_to` and throws if the return value is not\r\n \/\/\/ `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`.\r\n \/\/\/ @param _from The current owner of the NFT\r\n \/\/\/ @param _to The new owner\r\n \/\/\/ @param _tokenId The NFT to transfer\r\n \/\/\/ @param data Additional data with no specified format, sent in call to `_to`\r\n function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory data) external payable;\r\n\r\n \/\/\/ @notice Transfers the ownership of an NFT from one address to another address\r\n \/\/\/ @dev This works identically to the other function with an extra data parameter,\r\n \/\/\/ except this function just sets data to \"\".\r\n \/\/\/ @param _from The current owner of the NFT\r\n \/\/\/ @param _to The new owner\r\n \/\/\/ @param _tokenId The NFT to transfer\r\n function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable;\r\n\r\n \/\/\/ @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE\r\n \/\/\/ TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE\r\n \/\/\/ THEY MAY BE PERMANENTLY LOST\r\n \/\/\/ @dev Throws unless `msg.sender` is the current owner, an authorized\r\n \/\/\/ operator, or the approved address for this NFT. Throws if `_from` is\r\n \/\/\/ not the current owner. Throws if `_to` is the zero address. Throws if\r\n \/\/\/ `_tokenId` is not a valid NFT.\r\n \/\/\/ @param _from The current owner of the NFT\r\n \/\/\/ @param _to The new owner\r\n \/\/\/ @param _tokenId The NFT to transfer\r\n function transferFrom(address _from, address _to, uint256 _tokenId) external payable;\r\n\r\n \/\/\/ @notice Change or reaffirm the approved address for an NFT\r\n \/\/\/ @dev The zero address indicates there is no approved address.\r\n \/\/\/ Throws unless `msg.sender` is the current NFT owner, or an authorized\r\n \/\/\/ operator of the current owner.\r\n \/\/\/ @param _approved The new approved NFT controller\r\n \/\/\/ @param _tokenId The NFT to approve\r\n function approve(address _approved, uint256 _tokenId) external payable;\r\n\r\n \/\/\/ @notice Enable or disable approval for a third party (\"operator\") to manage\r\n \/\/\/ all of `msg.sender` assets\r\n \/\/\/ @dev Emits the ApprovalForAll event. The contract MUST allow\r\n \/\/\/ multiple operators per owner.\r\n \/\/\/ @param _operator Address to add to the set of authorized operators\r\n \/\/\/ @param _approved True if the operator is approved, false to revoke approval\r\n function setApprovalForAll(address _operator, bool _approved) external;\r\n\r\n \/\/\/ @notice Get the approved address for a single NFT\r\n \/\/\/ @dev Throws if `_tokenId` is not a valid NFT.\r\n \/\/\/ @param _tokenId The NFT to find the approved address for\r\n \/\/\/ @return The approved address for this NFT, or the zero address if there is none\r\n function getApproved(uint256 _tokenId) external view returns (address);\r\n\r\n \/\/\/ @notice Query if an address is an authorized operator for another address\r\n \/\/\/ @param _owner The address that owns the NFTs\r\n \/\/\/ @param _operator The address that acts on behalf of the owner\r\n \/\/\/ @return True if `_operator` is an approved operator for `_owner`, false otherwise\r\n function isApprovedForAll(address _owner, address _operator) external view returns (bool);\r\n}\r\n\r\ninterface ERC165 {\r\n \/\/\/ @notice Query if a contract implements an interface\r\n \/\/\/ @param interfaceID The interface identifier, as specified in ERC-165\r\n \/\/\/ @dev Interface identification is specified in ERC-165. This function\r\n \/\/\/ uses less than 30,000 gas.\r\n \/\/\/ @return `true` if the contract implements `interfaceID` and\r\n \/\/\/ `interfaceID` is not 0xffffffff, `false` otherwise\r\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\r\n}', + documentation: 'ERC-721 Non-Fungible Token Standard, A standard interface for non-fungible tokens, also known as deeds. \n\n \/\/ https://eips.ethereum.org/EIPS/eip-721 \r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\n\/\/\/ @title ERC-721 Non-Fungible Token Standard\r\n\/\/\/ @dev See https:\/\/eips.ethereum.org\/EIPS\/eip-721\r\n\/\/\/ Note: the ERC-165 identifier for this interface is 0x80ac58cd.\r\ninterface ERC721 \/* is ERC165 *\/ {\r\n \/\/\/ @dev This emits when ownership of any NFT changes by any mechanism.\r\n \/\/\/ This event emits when NFTs are created (`from` == 0) and destroyed\r\n \/\/\/ (`to` == 0). Exception: during contract creation, any number of NFTs\r\n \/\/\/ may be created and assigned without emitting Transfer. At the time of\r\n \/\/\/ any transfer, the approved address for that NFT (if any) is reset to none.\r\n event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);\r\n\r\n \/\/\/ @dev This emits when the approved address for an NFT is changed or\r\n \/\/\/ reaffirmed. The zero address indicates there is no approved address.\r\n \/\/\/ When a Transfer event emits, this also indicates that the approved\r\n \/\/\/ address for that NFT (if any) is reset to none.\r\n event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);\r\n\r\n \/\/\/ @dev This emits when an operator is enabled or disabled for an owner.\r\n \/\/\/ The operator can manage all NFTs of the owner.\r\n event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);\r\n\r\n \/\/\/ @notice Count all NFTs assigned to an owner\r\n \/\/\/ @dev NFTs assigned to the zero address are considered invalid, and this\r\n \/\/\/ function throws for queries about the zero address.\r\n \/\/\/ @param _owner An address for whom to query the balance\r\n \/\/\/ @return The number of NFTs owned by `_owner`, possibly zero\r\n function balanceOf(address _owner) external view returns (uint256);\r\n\r\n \/\/\/ @notice Find the owner of an NFT\r\n \/\/\/ @dev NFTs assigned to zero address are considered invalid, and queries\r\n \/\/\/ about them do throw.\r\n \/\/\/ @param _tokenId The identifier for an NFT\r\n \/\/\/ @return The address of the owner of the NFT\r\n function ownerOf(uint256 _tokenId) external view returns (address);\r\n\r\n \/\/\/ @notice Transfers the ownership of an NFT from one address to another address\r\n \/\/\/ @dev Throws unless `msg.sender` is the current owner, an authorized\r\n \/\/\/ operator, or the approved address for this NFT. Throws if `_from` is\r\n \/\/\/ not the current owner. Throws if `_to` is the zero address. Throws if\r\n \/\/\/ `_tokenId` is not a valid NFT. When transfer is complete, this function\r\n \/\/\/ checks if `_to` is a smart contract (code size > 0). If so, it calls\r\n \/\/\/ `onERC721Received` on `_to` and throws if the return value is not\r\n \/\/\/ `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`.\r\n \/\/\/ @param _from The current owner of the NFT\r\n \/\/\/ @param _to The new owner\r\n \/\/\/ @param _tokenId The NFT to transfer\r\n \/\/\/ @param data Additional data with no specified format, sent in call to `_to`\r\n function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory data) external payable;\r\n\r\n \/\/\/ @notice Transfers the ownership of an NFT from one address to another address\r\n \/\/\/ @dev This works identically to the other function with an extra data parameter,\r\n \/\/\/ except this function just sets data to \"\".\r\n \/\/\/ @param _from The current owner of the NFT\r\n \/\/\/ @param _to The new owner\r\n \/\/\/ @param _tokenId The NFT to transfer\r\n function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable;\r\n\r\n \/\/\/ @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE\r\n \/\/\/ TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE\r\n \/\/\/ THEY MAY BE PERMANENTLY LOST\r\n \/\/\/ @dev Throws unless `msg.sender` is the current owner, an authorized\r\n \/\/\/ operator, or the approved address for this NFT. Throws if `_from` is\r\n \/\/\/ not the current owner. Throws if `_to` is the zero address. Throws if\r\n \/\/\/ `_tokenId` is not a valid NFT.\r\n \/\/\/ @param _from The current owner of the NFT\r\n \/\/\/ @param _to The new owner\r\n \/\/\/ @param _tokenId The NFT to transfer\r\n function transferFrom(address _from, address _to, uint256 _tokenId) external payable;\r\n\r\n \/\/\/ @notice Change or reaffirm the approved address for an NFT\r\n \/\/\/ @dev The zero address indicates there is no approved address.\r\n \/\/\/ Throws unless `msg.sender` is the current NFT owner, or an authorized\r\n \/\/\/ operator of the current owner.\r\n \/\/\/ @param _approved The new approved NFT controller\r\n \/\/\/ @param _tokenId The NFT to approve\r\n function approve(address _approved, uint256 _tokenId) external payable;\r\n\r\n \/\/\/ @notice Enable or disable approval for a third party (\"operator\") to manage\r\n \/\/\/ all of `msg.sender` assets\r\n \/\/\/ @dev Emits the ApprovalForAll event. The contract MUST allow\r\n \/\/\/ multiple operators per owner.\r\n \/\/\/ @param _operator Address to add to the set of authorized operators\r\n \/\/\/ @param _approved True if the operator is approved, false to revoke approval\r\n function setApprovalForAll(address _operator, bool _approved) external;\r\n\r\n \/\/\/ @notice Get the approved address for a single NFT\r\n \/\/\/ @dev Throws if `_tokenId` is not a valid NFT.\r\n \/\/\/ @param _tokenId The NFT to find the approved address for\r\n \/\/\/ @return The approved address for this NFT, or the zero address if there is none\r\n function getApproved(uint256 _tokenId) external view returns (address);\r\n\r\n \/\/\/ @notice Query if an address is an authorized operator for another address\r\n \/\/\/ @param _owner The address that owns the NFTs\r\n \/\/\/ @param _operator The address that acts on behalf of the owner\r\n \/\/\/ @return True if `_operator` is an approved operator for `_owner`, false otherwise\r\n function isApprovedForAll(address _owner, address _operator) external view returns (bool);\r\n}\r\n\r\ninterface ERC165 {\r\n \/\/\/ @notice Query if a contract implements an interface\r\n \/\/\/ @param interfaceID The interface identifier, as specified in ERC-165\r\n \/\/\/ @dev Interface identification is specified in ERC-165. This function\r\n \/\/\/ uses less than 30,000 gas.\r\n \/\/\/ @return `true` if the contract implements `interfaceID` and\r\n \/\/\/ `interfaceID` is not 0xffffffff, `false` otherwise\r\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\r\n}', + detail: 'ERC721 interface', + insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet, + range + }, + { + label: 'erc777i', + kind: monaco.languages.CompletionItemKind.Snippet, + insertText: '\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-777\r\n\/\/ Example implementation https:\/\/github.com\/0xjac\/ERC777\/blob\/master\/contracts\/examples\/ReferenceToken.sol\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\ninterface ERC777Token {\r\n function name() external view returns (string memory);\r\n function symbol() external view returns (string memory);\r\n function totalSupply() external view returns (uint256);\r\n function balanceOf(address holder) external view returns (uint256);\r\n function granularity() external view returns (uint256);\r\n\r\n function defaultOperators() external view returns (address[] memory);\r\n function isOperatorFor(\r\n address operator,\r\n address holder\r\n ) external view returns (bool);\r\n function authorizeOperator(address operator) external;\r\n function revokeOperator(address operator) external;\r\n\r\n function send(address to, uint256 amount, bytes calldata data) external;\r\n function operatorSend(\r\n address from,\r\n address to,\r\n uint256 amount,\r\n bytes calldata data,\r\n bytes calldata operatorData\r\n ) external;\r\n\r\n function burn(uint256 amount, bytes calldata data) external;\r\n function operatorBurn(\r\n address from,\r\n uint256 amount,\r\n bytes calldata data,\r\n bytes calldata operatorData\r\n ) external;\r\n\r\n event Sent(\r\n address indexed operator,\r\n address indexed from,\r\n address indexed to,\r\n uint256 amount,\r\n bytes data,\r\n bytes operatorData\r\n );\r\n event Minted(\r\n address indexed operator,\r\n address indexed to,\r\n uint256 amount,\r\n bytes data,\r\n bytes operatorData\r\n );\r\n event Burned(\r\n address indexed operator,\r\n address indexed from,\r\n uint256 amount,\r\n bytes data,\r\n bytes operatorData\r\n );\r\n event AuthorizedOperator(\r\n address indexed operator,\r\n address indexed holder\r\n );\r\n event RevokedOperator(address indexed operator, address indexed holder);\r\n}', + documentation: 'ERC777 token standard, extending ERC20 \n\n \/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-777\r\n\/\/ Example implementation https:\/\/github.com\/0xjac\/ERC777\/blob\/master\/contracts\/examples\/ReferenceToken.sol\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\ninterface ERC777Token {\r\n function name() external view returns (string memory);\r\n function symbol() external view returns (string memory);\r\n function totalSupply() external view returns (uint256);\r\n function balanceOf(address holder) external view returns (uint256);\r\n function granularity() external view returns (uint256);\r\n\r\n function defaultOperators() external view returns (address[] memory);\r\n function isOperatorFor(\r\n address operator,\r\n address holder\r\n ) external view returns (bool);\r\n function authorizeOperator(address operator) external;\r\n function revokeOperator(address operator) external;\r\n\r\n function send(address to, uint256 amount, bytes calldata data) external;\r\n function operatorSend(\r\n address from,\r\n address to,\r\n uint256 amount,\r\n bytes calldata data,\r\n bytes calldata operatorData\r\n ) external;\r\n\r\n function burn(uint256 amount, bytes calldata data) external;\r\n function operatorBurn(\r\n address from,\r\n uint256 amount,\r\n bytes calldata data,\r\n bytes calldata operatorData\r\n ) external;\r\n\r\n event Sent(\r\n address indexed operator,\r\n address indexed from,\r\n address indexed to,\r\n uint256 amount,\r\n bytes data,\r\n bytes operatorData\r\n );\r\n event Minted(\r\n address indexed operator,\r\n address indexed to,\r\n uint256 amount,\r\n bytes data,\r\n bytes operatorData\r\n );\r\n event Burned(\r\n address indexed operator,\r\n address indexed from,\r\n uint256 amount,\r\n bytes data,\r\n bytes operatorData\r\n );\r\n event AuthorizedOperator(\r\n address indexed operator,\r\n address indexed holder\r\n );\r\n event RevokedOperator(address indexed operator, address indexed holder);\r\n}', + detail: 'ERC777 interface', + insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet, + range + }, + { + label: 'erc1155i', + kind: monaco.languages.CompletionItemKind.Snippet, + insertText: '\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-1155\r\n\/\/ Example implementation https:\/\/github.com\/enjin\/erc-1155\/blob\/master\/contracts\/ERC1155.sol\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\n\/**\r\n @title ERC-1155 Multi Token Standard\r\n @dev See https:\/\/eips.ethereum.org\/EIPS\/eip-1155\r\n Note: The ERC-165 identifier for this interface is 0xd9b67a26.\r\n *\/\r\ninterface ERC1155 \/* is ERC165 *\/ {\r\n \/**\r\n @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see \"Safe Transfer Rules\" section of the standard).\r\n The `_operator` argument MUST be the address of an account\/contract that is approved to make the transfer (SHOULD be msg.sender).\r\n The `_from` argument MUST be the address of the holder whose balance is decreased.\r\n The `_to` argument MUST be the address of the recipient whose balance is increased.\r\n The `_id` argument MUST be the token type being transferred.\r\n The `_value` argument MUST be the number of tokens the holder balance is decreased by and match what the recipient balance is increased by.\r\n When minting\/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address).\r\n When burning\/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address).\r\n *\/\r\n event TransferSingle(address indexed _operator, address indexed _from, address indexed _to, uint256 _id, uint256 _value);\r\n\r\n \/**\r\n @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see \"Safe Transfer Rules\" section of the standard).\r\n The `_operator` argument MUST be the address of an account\/contract that is approved to make the transfer (SHOULD be msg.sender).\r\n The `_from` argument MUST be the address of the holder whose balance is decreased.\r\n The `_to` argument MUST be the address of the recipient whose balance is increased.\r\n The `_ids` argument MUST be the list of tokens being transferred.\r\n The `_values` argument MUST be the list of number of tokens (matching the list and order of tokens specified in _ids) the holder balance is decreased by and match what the recipient balance is increased by.\r\n When minting\/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address).\r\n When burning\/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address).\r\n *\/\r\n event TransferBatch(address indexed _operator, address indexed _from, address indexed _to, uint256[] _ids, uint256[] _values);\r\n\r\n \/**\r\n @dev MUST emit when approval for a second party\/operator address to manage all tokens for an owner address is enabled or disabled (absence of an event assumes disabled).\r\n *\/\r\n event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);\r\n\r\n \/**\r\n @dev MUST emit when the URI is updated for a token ID.\r\n URIs are defined in RFC 3986.\r\n The URI MUST point to a JSON file that conforms to the \"ERC-1155 Metadata URI JSON Schema\".\r\n *\/\r\n event URI(string _value, uint256 indexed _id);\r\n\r\n \/**\r\n @notice Transfers `_value` amount of an `_id` from the `_from` address to the `_to` address specified (with safety call).\r\n @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see \"Approval\" section of the standard).\r\n MUST revert if `_to` is the zero address.\r\n MUST revert if balance of holder for token `_id` is lower than the `_value` sent.\r\n MUST revert on any other error.\r\n MUST emit the `TransferSingle` event to reflect the balance change (see \"Safe Transfer Rules\" section of the standard).\r\n After the above conditions are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call `onERC1155Received` on `_to` and act appropriately (see \"Safe Transfer Rules\" section of the standard).\r\n @param _from Source address\r\n @param _to Target address\r\n @param _id ID of the token type\r\n @param _value Transfer amount\r\n @param _data Additional data with no specified format, MUST be sent unaltered in call to `onERC1155Received` on `_to`\r\n *\/\r\n function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _value, bytes calldata _data) external;\r\n\r\n \/**\r\n @notice Transfers `_values` amount(s) of `_ids` from the `_from` address to the `_to` address specified (with safety call).\r\n @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see \"Approval\" section of the standard).\r\n MUST revert if `_to` is the zero address.\r\n MUST revert if length of `_ids` is not the same as length of `_values`.\r\n MUST revert if any of the balance(s) of the holder(s) for token(s) in `_ids` is lower than the respective amount(s) in `_values` sent to the recipient.\r\n MUST revert on any other error.\r\n MUST emit `TransferSingle` or `TransferBatch` event(s) such that all the balance changes are reflected (see \"Safe Transfer Rules\" section of the standard).\r\n Balance changes and events MUST follow the ordering of the arrays (_ids[0]\/_values[0] before _ids[1]\/_values[1], etc).\r\n After the above conditions for the transfer(s) in the batch are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call the relevant `ERC1155TokenReceiver` hook(s) on `_to` and act appropriately (see \"Safe Transfer Rules\" section of the standard).\r\n @param _from Source address\r\n @param _to Target address\r\n @param _ids IDs of each token type (order and length must match _values array)\r\n @param _values Transfer amounts per token type (order and length must match _ids array)\r\n @param _data Additional data with no specified format, MUST be sent unaltered in call to the `ERC1155TokenReceiver` hook(s) on `_to`\r\n *\/\r\n function safeBatchTransferFrom(address _from, address _to, uint256[] calldata _ids,\r\n uint256[] calldata _values, bytes calldata _data) external;\r\n\r\n \/**\r\n @notice Get the balance of an account tokens.\r\n @param _owner The address of the token holder\r\n @param _id ID of the token\r\n @return The _owner balance of the token type requested\r\n *\/\r\n function balanceOf(address _owner, uint256 _id) external view returns (uint256);\r\n\r\n \/**\r\n @notice Get the balance of multiple account\/token pairs\r\n @param _owners The addresses of the token holders\r\n @param _ids ID of the tokens\r\n @return The _owner balance of the token types requested (i.e. balance for each (owner, id) pair)\r\n *\/\r\n function balanceOfBatch(address[] calldata _owners, uint256[] calldata _ids) external view returns (uint256[] memory);\r\n\r\n \/**\r\n @notice Enable or disable approval for a third party (\"operator\") to manage all of the caller tokens.\r\n @dev MUST emit the ApprovalForAll event on success.\r\n @param _operator Address to add to the set of authorized operators\r\n @param _approved True if the operator is approved, false to revoke approval\r\n *\/\r\n function setApprovalForAll(address _operator, bool _approved) external;\r\n\r\n \/**\r\n @notice Queries the approval status of an operator for a given owner.\r\n @param _owner The owner of the tokens\r\n @param _operator Address of authorized operator\r\n @return True if the operator is approved, false if not\r\n *\/\r\n function isApprovedForAll(address _owner, address _operator) external view returns (bool);\r\n}\r\n\r\n\/* ERC-1155 Token Receiver\r\nSmart contracts MUST implement all of the functions in the ERC1155TokenReceiver interface to accept transfers. See \u201CSafe Transfer Rules\u201D for further detail.\r\n\r\nSmart contracts MUST implement the ERC-165 supportsInterface function and signify support for the ERC1155TokenReceiver interface to accept transfers. See \u201CERC1155TokenReceiver ERC-165 rules\u201D for further detail.\r\n\r\n\/**\r\n Note: The ERC-165 identifier for this interface is 0x4e2312e0.\r\n*\/\r\ninterface ERC1155TokenReceiver {\r\n \/**\r\n @notice Handle the receipt of a single ERC1155 token type.\r\n @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeTransferFrom` after the balance has been updated.\r\n This function MUST return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` (i.e. 0xf23a6e61) if it accepts the transfer.\r\n This function MUST revert if it rejects the transfer.\r\n Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.\r\n @param _operator The address which initiated the transfer (i.e. msg.sender)\r\n @param _from The address which previously owned the token\r\n @param _id The ID of the token being transferred\r\n @param _value The amount of tokens being transferred\r\n @param _data Additional data with no specified format\r\n @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\r\n *\/\r\n function onERC1155Received(address _operator, address _from, uint256 _id, uint256 _value, bytes calldata _data) external returns(bytes4);\r\n\r\n \/**\r\n @notice Handle the receipt of multiple ERC1155 token types.\r\n @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeBatchTransferFrom` after the balances have been updated.\r\n This function MUST return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` (i.e. 0xbc197c81) if it accepts the transfer(s).\r\n This function MUST revert if it rejects the transfer(s).\r\n Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.\r\n @param _operator The address which initiated the batch transfer (i.e. msg.sender)\r\n @param _from The address which previously owned the token\r\n @param _ids An array containing ids of each token being transferred (order and length must match _values array)\r\n @param _values An array containing amounts of each token being transferred (order and length must match _ids array)\r\n @param _data Additional data with no specified format\r\n @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\r\n *\/\r\n function onERC1155BatchReceived(address _operator, address _from, uint256[] calldata _ids,\r\n uint256[] calldata _values, bytes calldata _data) external returns(bytes4);\r\n}', + documentation: 'EIP-1155: ERC-1155 Multi Token Standard, A standard interface for contracts that manage multiple token types. A single deployed contract may include any combination of fungible tokens, non-fungible tokens or other configurations (e.g. semi-fungible tokens). \n\n \/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-1155\r\n\/\/ Example implementation https:\/\/github.com\/enjin\/erc-1155\/blob\/master\/contracts\/ERC1155.sol\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\n\/**\r\n @title ERC-1155 Multi Token Standard\r\n @dev See https:\/\/eips.ethereum.org\/EIPS\/eip-1155\r\n Note: The ERC-165 identifier for this interface is 0xd9b67a26.\r\n *\/\r\ninterface ERC1155 \/* is ERC165 *\/ {\r\n \/**\r\n @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see \"Safe Transfer Rules\" section of the standard).\r\n The `_operator` argument MUST be the address of an account\/contract that is approved to make the transfer (SHOULD be msg.sender).\r\n The `_from` argument MUST be the address of the holder whose balance is decreased.\r\n The `_to` argument MUST be the address of the recipient whose balance is increased.\r\n The `_id` argument MUST be the token type being transferred.\r\n The `_value` argument MUST be the number of tokens the holder balance is decreased by and match what the recipient balance is increased by.\r\n When minting\/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address).\r\n When burning\/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address).\r\n *\/\r\n event TransferSingle(address indexed _operator, address indexed _from, address indexed _to, uint256 _id, uint256 _value);\r\n\r\n \/**\r\n @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see \"Safe Transfer Rules\" section of the standard).\r\n The `_operator` argument MUST be the address of an account\/contract that is approved to make the transfer (SHOULD be msg.sender).\r\n The `_from` argument MUST be the address of the holder whose balance is decreased.\r\n The `_to` argument MUST be the address of the recipient whose balance is increased.\r\n The `_ids` argument MUST be the list of tokens being transferred.\r\n The `_values` argument MUST be the list of number of tokens (matching the list and order of tokens specified in _ids) the holder balance is decreased by and match what the recipient balance is increased by.\r\n When minting\/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address).\r\n When burning\/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address).\r\n *\/\r\n event TransferBatch(address indexed _operator, address indexed _from, address indexed _to, uint256[] _ids, uint256[] _values);\r\n\r\n \/**\r\n @dev MUST emit when approval for a second party\/operator address to manage all tokens for an owner address is enabled or disabled (absence of an event assumes disabled).\r\n *\/\r\n event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);\r\n\r\n \/**\r\n @dev MUST emit when the URI is updated for a token ID.\r\n URIs are defined in RFC 3986.\r\n The URI MUST point to a JSON file that conforms to the \"ERC-1155 Metadata URI JSON Schema\".\r\n *\/\r\n event URI(string _value, uint256 indexed _id);\r\n\r\n \/**\r\n @notice Transfers `_value` amount of an `_id` from the `_from` address to the `_to` address specified (with safety call).\r\n @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see \"Approval\" section of the standard).\r\n MUST revert if `_to` is the zero address.\r\n MUST revert if balance of holder for token `_id` is lower than the `_value` sent.\r\n MUST revert on any other error.\r\n MUST emit the `TransferSingle` event to reflect the balance change (see \"Safe Transfer Rules\" section of the standard).\r\n After the above conditions are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call `onERC1155Received` on `_to` and act appropriately (see \"Safe Transfer Rules\" section of the standard).\r\n @param _from Source address\r\n @param _to Target address\r\n @param _id ID of the token type\r\n @param _value Transfer amount\r\n @param _data Additional data with no specified format, MUST be sent unaltered in call to `onERC1155Received` on `_to`\r\n *\/\r\n function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _value, bytes calldata _data) external;\r\n\r\n \/**\r\n @notice Transfers `_values` amount(s) of `_ids` from the `_from` address to the `_to` address specified (with safety call).\r\n @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see \"Approval\" section of the standard).\r\n MUST revert if `_to` is the zero address.\r\n MUST revert if length of `_ids` is not the same as length of `_values`.\r\n MUST revert if any of the balance(s) of the holder(s) for token(s) in `_ids` is lower than the respective amount(s) in `_values` sent to the recipient.\r\n MUST revert on any other error.\r\n MUST emit `TransferSingle` or `TransferBatch` event(s) such that all the balance changes are reflected (see \"Safe Transfer Rules\" section of the standard).\r\n Balance changes and events MUST follow the ordering of the arrays (_ids[0]\/_values[0] before _ids[1]\/_values[1], etc).\r\n After the above conditions for the transfer(s) in the batch are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call the relevant `ERC1155TokenReceiver` hook(s) on `_to` and act appropriately (see \"Safe Transfer Rules\" section of the standard).\r\n @param _from Source address\r\n @param _to Target address\r\n @param _ids IDs of each token type (order and length must match _values array)\r\n @param _values Transfer amounts per token type (order and length must match _ids array)\r\n @param _data Additional data with no specified format, MUST be sent unaltered in call to the `ERC1155TokenReceiver` hook(s) on `_to`\r\n *\/\r\n function safeBatchTransferFrom(address _from, address _to, uint256[] calldata _ids,\r\n uint256[] calldata _values, bytes calldata _data) external;\r\n\r\n \/**\r\n @notice Get the balance of an account tokens.\r\n @param _owner The address of the token holder\r\n @param _id ID of the token\r\n @return The _owner balance of the token type requested\r\n *\/\r\n function balanceOf(address _owner, uint256 _id) external view returns (uint256);\r\n\r\n \/**\r\n @notice Get the balance of multiple account\/token pairs\r\n @param _owners The addresses of the token holders\r\n @param _ids ID of the tokens\r\n @return The _owner balance of the token types requested (i.e. balance for each (owner, id) pair)\r\n *\/\r\n function balanceOfBatch(address[] calldata _owners, uint256[] calldata _ids) external view returns (uint256[] memory);\r\n\r\n \/**\r\n @notice Enable or disable approval for a third party (\"operator\") to manage all of the caller tokens.\r\n @dev MUST emit the ApprovalForAll event on success.\r\n @param _operator Address to add to the set of authorized operators\r\n @param _approved True if the operator is approved, false to revoke approval\r\n *\/\r\n function setApprovalForAll(address _operator, bool _approved) external;\r\n\r\n \/**\r\n @notice Queries the approval status of an operator for a given owner.\r\n @param _owner The owner of the tokens\r\n @param _operator Address of authorized operator\r\n @return True if the operator is approved, false if not\r\n *\/\r\n function isApprovedForAll(address _owner, address _operator) external view returns (bool);\r\n}\r\n\r\n\/* ERC-1155 Token Receiver\r\nSmart contracts MUST implement all of the functions in the ERC1155TokenReceiver interface to accept transfers. See \u201CSafe Transfer Rules\u201D for further detail.\r\n\r\nSmart contracts MUST implement the ERC-165 supportsInterface function and signify support for the ERC1155TokenReceiver interface to accept transfers. See \u201CERC1155TokenReceiver ERC-165 rules\u201D for further detail.\r\n\r\n\/**\r\n Note: The ERC-165 identifier for this interface is 0x4e2312e0.\r\n*\/\r\ninterface ERC1155TokenReceiver {\r\n \/**\r\n @notice Handle the receipt of a single ERC1155 token type.\r\n @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeTransferFrom` after the balance has been updated.\r\n This function MUST return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` (i.e. 0xf23a6e61) if it accepts the transfer.\r\n This function MUST revert if it rejects the transfer.\r\n Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.\r\n @param _operator The address which initiated the transfer (i.e. msg.sender)\r\n @param _from The address which previously owned the token\r\n @param _id The ID of the token being transferred\r\n @param _value The amount of tokens being transferred\r\n @param _data Additional data with no specified format\r\n @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\r\n *\/\r\n function onERC1155Received(address _operator, address _from, uint256 _id, uint256 _value, bytes calldata _data) external returns(bytes4);\r\n\r\n \/**\r\n @notice Handle the receipt of multiple ERC1155 token types.\r\n @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeBatchTransferFrom` after the balances have been updated.\r\n This function MUST return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` (i.e. 0xbc197c81) if it accepts the transfer(s).\r\n This function MUST revert if it rejects the transfer(s).\r\n Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.\r\n @param _operator The address which initiated the batch transfer (i.e. msg.sender)\r\n @param _from The address which previously owned the token\r\n @param _ids An array containing ids of each token being transferred (order and length must match _values array)\r\n @param _values An array containing amounts of each token being transferred (order and length must match _ids array)\r\n @param _data Additional data with no specified format\r\n @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\r\n *\/\r\n function onERC1155BatchReceived(address _operator, address _from, uint256[] calldata _ids,\r\n uint256[] calldata _values, bytes calldata _data) external returns(bytes4);\r\n}', + detail: 'ERC1155 interface', + insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet, + range } /* eslint-enable */ ]