pull/5370/head
aniket-engg 1 year ago committed by Aniket
parent faf7d93884
commit 070f809873
  1. 9
      libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts

@ -262,6 +262,15 @@ export function getCompletionSnippets(range: monacoTypes.IRange, monaco): monaco
detail: 'ERC173-draft',
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,
range
},
{
label: 'erc173i',
kind: monaco.languages.CompletionItemKind.Snippet,
insertText: '\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-173\r\n\/\/ https:\/\/github.com\/0xcert\/ethereum-erc721\/blob\/master\/src\/contracts\/ownership\/ownable.sol (this example)\r\n\/\/ https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/master\/contracts\/access\/Ownable.sol\r\n\/\/ https:\/\/github.com\/FriendlyUser\/solidity-smart-contracts\/\/blob\/v0.2.0\/contracts\/other\/CredVert\/Ownable.sol\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\n\/\/\/ @title ERC-173 Contract Ownership Standard\r\n\/\/\/ @dev See https:\/\/github.com\/ethereum\/EIPs\/blob\/master\/EIPS\/eip-173.md\r\n\/\/\/ Note: the ERC-165 identifier for this interface is 0x7f5828d0\r\ninterface ERC173 \/* is ERC165 *\/ {\r\n \/\/\/ @dev This emits when ownership of a contract changes\r\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\r\n\r\n \/\/\/ @notice Get the address of the owner\r\n \/\/\/ @return The address of the owner.\r\n function owner() external view returns (address);\r\n \/\/\/ @notice Set the address of the new owner of the contract\r\n \/\/\/ @dev Set _newOwner to address(0) to renounce any ownership.\r\n \/\/\/ @param _newOwner The address of the new owner of the contract\r\n function transferOwnership(address _newOwner) external;\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: 'Draft: EIP-173 Interface for Contract Ownership Standard, A standard interface for ownership of contracts.\n\n \/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-173\r\n\/\/ https:\/\/github.com\/0xcert\/ethereum-erc721\/blob\/master\/src\/contracts\/ownership\/ownable.sol (this example)\r\n\/\/ https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/master\/contracts\/access\/Ownable.sol\r\n\/\/ https:\/\/github.com\/FriendlyUser\/solidity-smart-contracts\/\/blob\/v0.2.0\/contracts\/other\/CredVert\/Ownable.sol\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\n\/\/\/ @title ERC-173 Contract Ownership Standard\r\n\/\/\/ @dev See https:\/\/github.com\/ethereum\/EIPs\/blob\/master\/EIPS\/eip-173.md\r\n\/\/\/ Note: the ERC-165 identifier for this interface is 0x7f5828d0\r\ninterface ERC173 \/* is ERC165 *\/ {\r\n \/\/\/ @dev This emits when ownership of a contract changes\r\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\r\n\r\n \/\/\/ @notice Get the address of the owner\r\n \/\/\/ @return The address of the owner.\r\n function owner() external view returns (address);\r\n \/\/\/ @notice Set the address of the new owner of the contract\r\n \/\/\/ @dev Set _newOwner to address(0) to renounce any ownership.\r\n \/\/\/ @param _newOwner The address of the new owner of the contract\r\n function transferOwnership(address _newOwner) external;\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: 'ERC173i-draft',
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,
range
}
/* eslint-enable */
]

Loading…
Cancel
Save