all erc details added

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

@ -271,6 +271,60 @@ export function getCompletionSnippets(range: monacoTypes.IRange, monaco): monaco
detail: 'ERC173i-draft',
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,
range
},
{
label: 'erc725i',
kind: monaco.languages.CompletionItemKind.Snippet,
insertText: '\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-725\r\n\/\/ https:\/\/github.com\/ERC725Alliance\/ERC725 (example)\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\n\/*\r\nThe following describes standard functions for a unique identifiable proxy account to be used by humans, groups, organisations, objects and machines.\r\nThe proxy has 2 abilities: (1) it can execute arbitrary contract calls, and (2) it can hold arbitrary data through a generic key\/value store.\r\nOne of these keys should hold the owner of the contract. The owner may be an address or a key manager contract for more complex management logic.\r\nMost importantly, this contract should be the reference point for a long-lasting identifiable profiles.\r\n*\/\r\ninterface ERC725 {\r\n event DataChanged(bytes32 indexed key, bytes32 indexed value);\r\n event OwnerChanged(address indexed ownerAddress);\r\n event ContractCreated(address indexed contractAddress);\r\n\r\n \/\/ address public owner;\r\n\r\n function changeOwner(address _owner) external;\r\n function getData(bytes32 _key) external view returns (bytes32 _value);\r\n function setData(bytes32 _key, bytes32 _value) external;\r\n function execute(uint256 _operationType, address _to, uint256 _value, bytes calldata _data) external;\r\n}',
documentation: 'Draft: EIP-725: Proxy Account. Standard functions for a unique identifiable proxy account to be used by humans, groups, organisations, objects and machines\n\n \/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-725\r\n\/\/ https:\/\/github.com\/ERC725Alliance\/ERC725 (example)\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\n\/*\r\nThe following describes standard functions for a unique identifiable proxy account to be used by humans, groups, organisations, objects and machines.\r\nThe proxy has 2 abilities: (1) it can execute arbitrary contract calls, and (2) it can hold arbitrary data through a generic key\/value store.\r\nOne of these keys should hold the owner of the contract. The owner may be an address or a key manager contract for more complex management logic.\r\nMost importantly, this contract should be the reference point for a long-lasting identifiable profiles.\r\n*\/\r\ninterface ERC725 {\r\n event DataChanged(bytes32 indexed key, bytes32 indexed value);\r\n event OwnerChanged(address indexed ownerAddress);\r\n event ContractCreated(address indexed contractAddress);\r\n\r\n \/\/ address public owner;\r\n\r\n function changeOwner(address _owner) external;\r\n function getData(bytes32 _key) external view returns (bytes32 _value);\r\n function setData(bytes32 _key, bytes32 _value) external;\r\n function execute(uint256 _operationType, address _to, uint256 _value, bytes calldata _data) external;\r\n}',
detail: 'ERC725i-draft',
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,
range
},
{
label: 'erc1996i',
kind: monaco.languages.CompletionItemKind.Snippet,
insertText: '\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-1996\r\n\/\/ https:\/\/github.com\/IoBuilders\/holdable-token (example)\r\n\/\/ SPDX-License-Identifier: MIT\r\n\/*\r\nAn extension to the ERC-20 standard token that allows tokens to be put on hold.\r\nThis guarantees a future transfer and makes the held tokens unavailable for transfer in the mean time.\r\nHolds are similar to escrows in that are firm and lead to final settlement.\r\n*\/\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\ninterface IHoldable \/* is ERC-20 *\/ {\r\n enum HoldStatusCode {\r\n Nonexistent,\r\n Ordered,\r\n Executed,\r\n ReleasedByNotary,\r\n ReleasedByPayee,\r\n ReleasedOnExpiration\r\n }\r\n\r\n function hold(string calldata operationId, address to, address notary, uint256 value, uint256 timeToExpiration) external returns (bool);\r\n function holdFrom(string calldata operationId, address from, address to, address notary,\r\n uint256 value, uint256 timeToExpiration) external returns (bool);\r\n function releaseHold(string calldata operationId) external returns (bool);\r\n function executeHold(string calldata operationId, uint256 value) external returns (bool);\r\n function renewHold(string calldata operationId, uint256 timeToExpiration) external returns (bool);\r\n function retrieveHoldData(string calldata operationId) external view returns (address from, address to, address notary,\r\n uint256 value, uint256 expiration, HoldStatusCode status);\r\n\r\n function balanceOnHold(address account) external view returns (uint256);\r\n function netBalanceOf(address account) external view returns (uint256);\r\n function totalSupplyOnHold() external view returns (uint256);\r\n\r\n function authorizeHoldOperator(address operator) external returns (bool);\r\n function revokeHoldOperator(address operator) external returns (bool);\r\n function isHoldOperatorFor(address operator, address from) external view returns (bool);\r\n\r\n event HoldCreated(address indexed holdIssuer, string operationId, address from,\r\n address to, address indexed notary, uint256 value, uint256 expiration);\r\n event HoldExecuted(address indexed holdIssuer, string operationId, address indexed notary, uint256 heldValue, uint256 transferredValue);\r\n event HoldReleased(address indexed holdIssuer, string operationId, HoldStatusCode status);\r\n event HoldRenewed(address indexed holdIssuer, string operationId, uint256 oldExpiration, uint256 newExpiration);\r\n event AuthorizedHoldOperator(address indexed operator, address indexed account);\r\n event RevokedHoldOperator(address indexed operator, address indexed account);\r\n}',
documentation: 'Draft: EIP-1996: Holdable Token, An extension to the ERC-20 standard token that allows tokens to be put on hold. This guarantees a future transfer and makes the held tokens unavailable for transfer in the mean time. Holds are similar to escrows in that are firm and lead to final settlement.\n\n \/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-1996\r\n\/\/ https:\/\/github.com\/IoBuilders\/holdable-token (example)\r\n\/\/ SPDX-License-Identifier: MIT\r\n\/*\r\nAn extension to the ERC-20 standard token that allows tokens to be put on hold.\r\nThis guarantees a future transfer and makes the held tokens unavailable for transfer in the mean time.\r\nHolds are similar to escrows in that are firm and lead to final settlement.\r\n*\/\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\ninterface IHoldable \/* is ERC-20 *\/ {\r\n enum HoldStatusCode {\r\n Nonexistent,\r\n Ordered,\r\n Executed,\r\n ReleasedByNotary,\r\n ReleasedByPayee,\r\n ReleasedOnExpiration\r\n }\r\n\r\n function hold(string calldata operationId, address to, address notary, uint256 value, uint256 timeToExpiration) external returns (bool);\r\n function holdFrom(string calldata operationId, address from, address to, address notary,\r\n uint256 value, uint256 timeToExpiration) external returns (bool);\r\n function releaseHold(string calldata operationId) external returns (bool);\r\n function executeHold(string calldata operationId, uint256 value) external returns (bool);\r\n function renewHold(string calldata operationId, uint256 timeToExpiration) external returns (bool);\r\n function retrieveHoldData(string calldata operationId) external view returns (address from, address to, address notary,\r\n uint256 value, uint256 expiration, HoldStatusCode status);\r\n\r\n function balanceOnHold(address account) external view returns (uint256);\r\n function netBalanceOf(address account) external view returns (uint256);\r\n function totalSupplyOnHold() external view returns (uint256);\r\n\r\n function authorizeHoldOperator(address operator) external returns (bool);\r\n function revokeHoldOperator(address operator) external returns (bool);\r\n function isHoldOperatorFor(address operator, address from) external view returns (bool);\r\n\r\n event HoldCreated(address indexed holdIssuer, string operationId, address from,\r\n address to, address indexed notary, uint256 value, uint256 expiration);\r\n event HoldExecuted(address indexed holdIssuer, string operationId, address indexed notary, uint256 heldValue, uint256 transferredValue);\r\n event HoldReleased(address indexed holdIssuer, string operationId, HoldStatusCode status);\r\n event HoldRenewed(address indexed holdIssuer, string operationId, uint256 oldExpiration, uint256 newExpiration);\r\n event AuthorizedHoldOperator(address indexed operator, address indexed account);\r\n event RevokedHoldOperator(address indexed operator, address indexed account);\r\n}',
detail: 'ERC1996i-draft',
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,
range
},
{
label: 'erc2018i',
kind: monaco.languages.CompletionItemKind.Snippet,
insertText: '\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-2018\r\n\/\/ https:\/\/github.com\/IoBuilders\/clearable-token (example)\r\n\/\/ SPDX-License-Identifier: MIT\r\n\/*\r\nIn banking and finance, clearing denotes all activities from the time a commitment is made for a transaction until it is settled\r\n\r\nThe clearing process turns the promise of a transfer into the actual movement of money from one account to another.\r\nA clearing agent decides if the transfer can be executed or not.\r\nThe amount which should be transferred is not deducted from the balance of the payer, but neither is it available for another transfer and therefore ensures,\r\nthat the execution of the transfer will be successful when it is executed.\r\n*\/\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\ninterface ClearableToken \/* is ERC-1996 *\/ {\r\n enum ClearableTransferStatusCode { Nonexistent, Ordered, InProcess, Executed, Rejected, Cancelled }\r\n\r\n function orderTransfer(string calldata operationId, address to, uint256 value) external returns (bool);\r\n function orderTransferFrom(string calldata operationId, address from, address to, uint256 value) external returns (bool);\r\n function cancelTransfer(string calldata operationId) external returns (bool);\r\n function processClearableTransfer(string calldata operationId) external returns (bool);\r\n function executeClearableTransfer(string calldata operationId) external returns (bool);\r\n function rejectClearableTransfer(string calldata operationId, string calldata reason) external returns (bool);\r\n function retrieveClearableTransferData(string calldata operationId) external view returns (address from, address to,\r\n uint256 value, ClearableTransferStatusCode status);\r\n\r\n function authorizeClearableTransferOperator(address operator) external returns (bool);\r\n function revokeClearableTransferOperator(address operator) external returns (bool);\r\n function isClearableTransferOperatorFor(address operator, address from) external view returns (bool);\r\n\r\n event ClearableTransferOrdered(address indexed orderer, string operationId, address indexed from, address indexed to, uint256 value);\r\n event ClearableTransferInProcess(address indexed orderer, string operationId);\r\n event ClearableTransferExecuted(address indexed orderer, string operationId);\r\n event ClearableTransferRejected(address indexed orderer, string operationId, string reason);\r\n event ClearableTransferCancelled(address indexed orderer, string operationId);\r\n event AuthorizedClearableTransferOperator(address indexed operator, address indexed account);\r\n event RevokedClearableTransferOperator(address indexed operator, address indexed account);\r\n}',
documentation: 'Draft: EIP-2018: The clearing process turns the promise of a transfer into the actual movement of money from one account to another. A clearing agent decides if the transfer can be executed or not. The amount which should be transferred is not deducted from the balance of the payer, but neither is it available for another transfer and therefore ensures, that the execution of the transfer will be successful when it is executed.\n\n \/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-2018\r\n\/\/ https:\/\/github.com\/IoBuilders\/clearable-token (example)\r\n\/\/ SPDX-License-Identifier: MIT\r\n\/*\r\nIn banking and finance, clearing denotes all activities from the time a commitment is made for a transaction until it is settled\r\n\r\nThe clearing process turns the promise of a transfer into the actual movement of money from one account to another.\r\nA clearing agent decides if the transfer can be executed or not.\r\nThe amount which should be transferred is not deducted from the balance of the payer, but neither is it available for another transfer and therefore ensures,\r\nthat the execution of the transfer will be successful when it is executed.\r\n*\/\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\ninterface ClearableToken \/* is ERC-1996 *\/ {\r\n enum ClearableTransferStatusCode { Nonexistent, Ordered, InProcess, Executed, Rejected, Cancelled }\r\n\r\n function orderTransfer(string calldata operationId, address to, uint256 value) external returns (bool);\r\n function orderTransferFrom(string calldata operationId, address from, address to, uint256 value) external returns (bool);\r\n function cancelTransfer(string calldata operationId) external returns (bool);\r\n function processClearableTransfer(string calldata operationId) external returns (bool);\r\n function executeClearableTransfer(string calldata operationId) external returns (bool);\r\n function rejectClearableTransfer(string calldata operationId, string calldata reason) external returns (bool);\r\n function retrieveClearableTransferData(string calldata operationId) external view returns (address from, address to,\r\n uint256 value, ClearableTransferStatusCode status);\r\n\r\n function authorizeClearableTransferOperator(address operator) external returns (bool);\r\n function revokeClearableTransferOperator(address operator) external returns (bool);\r\n function isClearableTransferOperatorFor(address operator, address from) external view returns (bool);\r\n\r\n event ClearableTransferOrdered(address indexed orderer, string operationId, address indexed from, address indexed to, uint256 value);\r\n event ClearableTransferInProcess(address indexed orderer, string operationId);\r\n event ClearableTransferExecuted(address indexed orderer, string operationId);\r\n event ClearableTransferRejected(address indexed orderer, string operationId, string reason);\r\n event ClearableTransferCancelled(address indexed orderer, string operationId);\r\n event AuthorizedClearableTransferOperator(address indexed operator, address indexed account);\r\n event RevokedClearableTransferOperator(address indexed operator, address indexed account);\r\n}',
detail: 'ERC2018i-draft',
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,
range
},
{
label: 'erc2019i',
kind: monaco.languages.CompletionItemKind.Snippet,
insertText: '\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-2019\r\n\/\/ https:\/\/github.com\/IoBuilders\/fundable-token (example)\r\n\/\/ SPDX-License-Identifier: MIT\r\n\/*\r\nAn extension to the ERC-20 standard token that allows Token wallet owners to request a wallet to be funded, by calling the smart contract and attaching a fund instruction string.\r\n\r\nToken wallet owners (or approved addresses) can order tokenization requests through blockchain.\r\nThis is done by calling the orderFund or orderFundFrom methods,\r\nwhich initiate the workflow for the token contract operator to either honor or reject the fund request.\r\nIn this case, fund instructions are provided when submitting the request,\r\nwhich are used by the operator to determine the source of the funds to be debited in order to do fund the token wallet (through minting).\r\n*\/\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\ninterface IFundable \/* is ERC-20 *\/ {\r\n enum FundStatusCode {\r\n Nonexistent,\r\n Ordered,\r\n InProcess,\r\n Executed,\r\n Rejected,\r\n Cancelled\r\n }\r\n function authorizeFundOperator(address orderer) external returns (bool);\r\n function revokeFundOperator(address orderer) external returns (bool) ;\r\n function orderFund(string calldata operationId, uint256 value, string calldata instructions) external returns (bool);\r\n function orderFundFrom(string calldata operationId, address walletToFund, uint256 value,\r\n string calldata instructions) external returns (bool);\r\n function cancelFund(string calldata operationId) external returns (bool);\r\n function processFund(string calldata operationId) external returns (bool);\r\n function executeFund(string calldata operationId) external returns (bool);\r\n function rejectFund(string calldata operationId, string calldata reason) external returns (bool);\r\n\r\n function isFundOperatorFor(address walletToFund, address orderer) external view returns (bool);\r\n function retrieveFundData(address orderer, string calldata operationId) external view returns (address walletToFund,\r\n uint256 value, string memory instructions, FundStatusCode status);\r\n\r\n event FundOrdered(address indexed orderer, string indexed operationId, address indexed , uint256 value, string instructions);\r\n event FundInProcess(address indexed orderer, string indexed operationId);\r\n event FundExecuted(address indexed orderer, string indexed operationId);\r\n event FundRejected(address indexed orderer, string indexed operationId, string reason);\r\n event FundCancelled(address indexed orderer, string indexed operationId);\r\n event FundOperatorAuthorized(address indexed walletToFund, address indexed orderer);\r\n event FundOperatorRevoked(address indexed walletToFund, address indexed orderer);\r\n}',
documentation: 'Draft: EIP-2019: Fundable Token. An extension to the ERC-20 standard token that allows Token wallet owners to request a wallet to be funded, by calling the smart contract and attaching a fund instruction string.\n\n \/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-2019\r\n\/\/ https:\/\/github.com\/IoBuilders\/fundable-token (example)\r\n\/\/ SPDX-License-Identifier: MIT\r\n\/*\r\nAn extension to the ERC-20 standard token that allows Token wallet owners to request a wallet to be funded, by calling the smart contract and attaching a fund instruction string.\r\n\r\nToken wallet owners (or approved addresses) can order tokenization requests through blockchain.\r\nThis is done by calling the orderFund or orderFundFrom methods,\r\nwhich initiate the workflow for the token contract operator to either honor or reject the fund request.\r\nIn this case, fund instructions are provided when submitting the request,\r\nwhich are used by the operator to determine the source of the funds to be debited in order to do fund the token wallet (through minting).\r\n*\/\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\ninterface IFundable \/* is ERC-20 *\/ {\r\n enum FundStatusCode {\r\n Nonexistent,\r\n Ordered,\r\n InProcess,\r\n Executed,\r\n Rejected,\r\n Cancelled\r\n }\r\n function authorizeFundOperator(address orderer) external returns (bool);\r\n function revokeFundOperator(address orderer) external returns (bool) ;\r\n function orderFund(string calldata operationId, uint256 value, string calldata instructions) external returns (bool);\r\n function orderFundFrom(string calldata operationId, address walletToFund, uint256 value,\r\n string calldata instructions) external returns (bool);\r\n function cancelFund(string calldata operationId) external returns (bool);\r\n function processFund(string calldata operationId) external returns (bool);\r\n function executeFund(string calldata operationId) external returns (bool);\r\n function rejectFund(string calldata operationId, string calldata reason) external returns (bool);\r\n\r\n function isFundOperatorFor(address walletToFund, address orderer) external view returns (bool);\r\n function retrieveFundData(address orderer, string calldata operationId) external view returns (address walletToFund,\r\n uint256 value, string memory instructions, FundStatusCode status);\r\n\r\n event FundOrdered(address indexed orderer, string indexed operationId, address indexed , uint256 value, string instructions);\r\n event FundInProcess(address indexed orderer, string indexed operationId);\r\n event FundExecuted(address indexed orderer, string indexed operationId);\r\n event FundRejected(address indexed orderer, string indexed operationId, string reason);\r\n event FundCancelled(address indexed orderer, string indexed operationId);\r\n event FundOperatorAuthorized(address indexed walletToFund, address indexed orderer);\r\n event FundOperatorRevoked(address indexed walletToFund, address indexed orderer);\r\n}',
detail: 'ERC2019i-draft',
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,
range
},
{
label: 'erc2020i',
kind: monaco.languages.CompletionItemKind.Snippet,
insertText: '\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-2020\r\n\/\/ https:\/\/github.com\/IoBuilders\/em-token (example)\r\n\/\/ SPDX-License-Identifier: MIT\r\n\/*\r\nThe E-Money Standard Token aims to enable the issuance of regulated electronic money on blockchain networks, and its practical usage in real financial applications.\r\n\r\nFinancial institutions work today with electronic systems,\r\nwhich hold account balances in databases on core banking systems.\r\nIn order for an institution to be allowed to maintain records of client balances segregated and available for clients,\r\nsuch institution must be regulated under a known legal framework and must possess a license to do so.\r\nMaintaining a license under regulatory supervision entails ensuring compliance (i.e. performing KYC on all clients and ensuring good AML practices before allowing transactions)\r\nand demonstrating technical and operational solvency through periodic audits,\r\nso clients depositing funds with the institution can rest assured that their money is safe.\r\n*\/\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\ninterface EMoneyToken \/* is ERC-1996, ERC-2018, ERC-2019, ERC-2021 *\/ {\r\n function currency() external view returns (string memory);\r\n function version() external pure returns (string memory);\r\n function availableFunds(address account) external view returns (uint256);\r\n function checkTransferAllowed(address from, address to, uint256 value) external view returns (byte status);\r\n function checkApproveAllowed(address from, address spender, uint256 value) external view returns (byte status);\r\n function checkHoldAllowed(address from, address to, address notary, uint256 value) external view returns (byte status);\r\n function checkAuthorizeHoldOperatorAllowed(address operator, address from) external view returns (byte status);\r\n function checkOrderTransferAllowed(address from, address to, uint256 value) external view returns (byte status);\r\n function checkAuthorizeClearableTransferOperatorAllowed(address operator, address from) external view returns (byte status);\r\n function checkOrderFundAllowed(address to, address operator, uint256 value) external view returns (byte status);\r\n function checkAuthorizeFundOperatorAllowed(address operator, address to) external view returns (byte status);\r\n function checkOrderPayoutAllowed(address from, address operator, uint256 value) external view returns (byte status);\r\n function checkAuthorizePayoutOperatorAllowed(address operator, address from) external view returns (byte status);\r\n}',
documentation: 'Draft: EIP-2020: E-Money Standard Token. The E-Money Standard Token aims to enable the issuance of regulated electronic money on blockchain networks, and its practical usage in real financial applications.\n\n \/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-2020\r\n\/\/ https:\/\/github.com\/IoBuilders\/em-token (example)\r\n\/\/ SPDX-License-Identifier: MIT\r\n\/*\r\nThe E-Money Standard Token aims to enable the issuance of regulated electronic money on blockchain networks, and its practical usage in real financial applications.\r\n\r\nFinancial institutions work today with electronic systems,\r\nwhich hold account balances in databases on core banking systems.\r\nIn order for an institution to be allowed to maintain records of client balances segregated and available for clients,\r\nsuch institution must be regulated under a known legal framework and must possess a license to do so.\r\nMaintaining a license under regulatory supervision entails ensuring compliance (i.e. performing KYC on all clients and ensuring good AML practices before allowing transactions)\r\nand demonstrating technical and operational solvency through periodic audits,\r\nso clients depositing funds with the institution can rest assured that their money is safe.\r\n*\/\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\ninterface EMoneyToken \/* is ERC-1996, ERC-2018, ERC-2019, ERC-2021 *\/ {\r\n function currency() external view returns (string memory);\r\n function version() external pure returns (string memory);\r\n function availableFunds(address account) external view returns (uint256);\r\n function checkTransferAllowed(address from, address to, uint256 value) external view returns (byte status);\r\n function checkApproveAllowed(address from, address spender, uint256 value) external view returns (byte status);\r\n function checkHoldAllowed(address from, address to, address notary, uint256 value) external view returns (byte status);\r\n function checkAuthorizeHoldOperatorAllowed(address operator, address from) external view returns (byte status);\r\n function checkOrderTransferAllowed(address from, address to, uint256 value) external view returns (byte status);\r\n function checkAuthorizeClearableTransferOperatorAllowed(address operator, address from) external view returns (byte status);\r\n function checkOrderFundAllowed(address to, address operator, uint256 value) external view returns (byte status);\r\n function checkAuthorizeFundOperatorAllowed(address operator, address to) external view returns (byte status);\r\n function checkOrderPayoutAllowed(address from, address operator, uint256 value) external view returns (byte status);\r\n function checkAuthorizePayoutOperatorAllowed(address operator, address from) external view returns (byte status);\r\n}',
detail: 'ERC2020i-draft',
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,
range
},
{
label: 'erc2021i',
kind: monaco.languages.CompletionItemKind.Snippet,
insertText: '\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-2021\r\n\/\/ https:\/\/github.com\/IoBuilders\/payoutable-token (example)\r\n\/\/ SPDX-License-Identifier: MIT\r\n\/*\r\nAn extension to the ERC-20 standard token that allows Token wallet owners to request payout from their wallet,\r\nby calling the smart contract and attaching a payout instruction string.\r\n\r\nToken wallet owners (or approved addresses) can order payout requests through blockchain.\r\nThis is done by calling the orderPayoutFrom or orderPayoutFrom methods,\r\nwhich initiate the workflow for the token contract operator to either honor or reject the payout request.\r\nIn this case, payout instructions are provided when submitting the request, which are used by the operator to determine the destination of the funds.\r\n\r\nIn general, it is not advisable to place explicit routing instructions for the payouts on a verbatim basis on the blockchain,\r\nand it is advised to use a private communication alternatives, such as private channels, encrypted storage or similar,\r\nto do so (external to the blockchain ledger). Another (less desirable) possibility is to place these instructions on the instructions field in encrypted form.\r\n*\/\r\n\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\ninterface IPayoutable \/* is ERC-20 *\/ {\r\n enum PayoutStatusCode {\r\n Nonexistent,\r\n Ordered,\r\n InProcess,\r\n FundsInSuspense,\r\n Executed,\r\n Rejected,\r\n Cancelled\r\n }\r\n function authorizePayoutOperator(address orderer) external returns (bool);\r\n function revokePayoutOperator(address orderer) external returns (bool);\r\n function orderPayout(string calldata operationId, uint256 value, string calldata instructions) external returns (bool);\r\n function orderPayoutFrom(string calldata operationId, address walletToBePaidOut, uint256 value, string calldata instructions)\r\n external returns (bool);\r\n function cancelPayout(string calldata operationId) external returns (bool);\r\n function processPayout(string calldata operationId) external returns (bool);\r\n function putFundsInSuspenseInPayout(string calldata operationId) external returns (bool);\r\n function executePayout(string calldata operationId) external returns (bool);\r\n function rejectPayout(string calldata operationId, string calldata reason) external returns (bool);\r\n\r\n function isPayoutOperatorFor(address walletToDebit, address orderer) external view returns (bool);\r\n function retrievePayoutData(string calldata operationId) external view\r\n returns (address walletToDebit, uint256 value, string memory instructions, PayoutStatusCode status);\r\n\r\n event PayoutOrdered(address indexed orderer, string indexed operationId, address indexed walletToDebit, uint256 value, string instructions);\r\n event PayoutInProcess(address indexed orderer, string indexed operationId);\r\n event PayoutFundsInSuspense(address indexed orderer, string indexed operationId);\r\n event PayoutExecuted(address indexed orderer, string indexed operationId);\r\n event PayoutRejected(address indexed orderer, string indexed operationId, string reason);\r\n event PayoutCancelled(address indexed orderer, string indexed operationId);\r\n event PayoutOperatorAuthorized(address indexed walletToBePaidOut, address indexed orderer);\r\n event PayoutOperatorRevoked(address indexed walletToBePaidOut, address indexed orderer);\r\n}',
documentation: 'Draft: EIP-2021: Payoutable Token: An extension to the ERC-20 standard token that allows Token wallet owners to request payout from their wallet, by calling the smart contract and attaching a payout instruction string. \/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-2021\r\n\/\/ https:\/\/github.com\/IoBuilders\/payoutable-token (example)\r\n\/\/ SPDX-License-Identifier: MIT\r\n\/*\r\nAn extension to the ERC-20 standard token that allows Token wallet owners to request payout from their wallet,\r\nby calling the smart contract and attaching a payout instruction string.\r\n\r\nToken wallet owners (or approved addresses) can order payout requests through blockchain.\r\nThis is done by calling the orderPayoutFrom or orderPayoutFrom methods,\r\nwhich initiate the workflow for the token contract operator to either honor or reject the payout request.\r\nIn this case, payout instructions are provided when submitting the request, which are used by the operator to determine the destination of the funds.\r\n\r\nIn general, it is not advisable to place explicit routing instructions for the payouts on a verbatim basis on the blockchain,\r\nand it is advised to use a private communication alternatives, such as private channels, encrypted storage or similar,\r\nto do so (external to the blockchain ledger). Another (less desirable) possibility is to place these instructions on the instructions field in encrypted form.\r\n*\/\r\n\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\ninterface IPayoutable \/* is ERC-20 *\/ {\r\n enum PayoutStatusCode {\r\n Nonexistent,\r\n Ordered,\r\n InProcess,\r\n FundsInSuspense,\r\n Executed,\r\n Rejected,\r\n Cancelled\r\n }\r\n function authorizePayoutOperator(address orderer) external returns (bool);\r\n function revokePayoutOperator(address orderer) external returns (bool);\r\n function orderPayout(string calldata operationId, uint256 value, string calldata instructions) external returns (bool);\r\n function orderPayoutFrom(string calldata operationId, address walletToBePaidOut, uint256 value, string calldata instructions)\r\n external returns (bool);\r\n function cancelPayout(string calldata operationId) external returns (bool);\r\n function processPayout(string calldata operationId) external returns (bool);\r\n function putFundsInSuspenseInPayout(string calldata operationId) external returns (bool);\r\n function executePayout(string calldata operationId) external returns (bool);\r\n function rejectPayout(string calldata operationId, string calldata reason) external returns (bool);\r\n\r\n function isPayoutOperatorFor(address walletToDebit, address orderer) external view returns (bool);\r\n function retrievePayoutData(string calldata operationId) external view\r\n returns (address walletToDebit, uint256 value, string memory instructions, PayoutStatusCode status);\r\n\r\n event PayoutOrdered(address indexed orderer, string indexed operationId, address indexed walletToDebit, uint256 value, string instructions);\r\n event PayoutInProcess(address indexed orderer, string indexed operationId);\r\n event PayoutFundsInSuspense(address indexed orderer, string indexed operationId);\r\n event PayoutExecuted(address indexed orderer, string indexed operationId);\r\n event PayoutRejected(address indexed orderer, string indexed operationId, string reason);\r\n event PayoutCancelled(address indexed orderer, string indexed operationId);\r\n event PayoutOperatorAuthorized(address indexed walletToBePaidOut, address indexed orderer);\r\n event PayoutOperatorRevoked(address indexed walletToBePaidOut, address indexed orderer);\r\n}',
detail: 'ERC2021i-draft',
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,
range
}
/* eslint-enable */
]

Loading…
Cancel
Save