erc2020i

    0

    0

    lucycodes42

    Solidity Code Snippets

    interface EMoneyToken is ERC-1996, ERC-2018, ERC-2019, ERC-2021 { function currency() external view returns (string memory); function version() external pure returns (string memory); function availableFunds(address account) external view returns (uint256); function checkTransferAllowed(address from, address to, uint256 value) external view returns (byte status); function checkApproveAllowed(address from, address spender, uint256 value) external view returns (byte status); function checkHoldAllowed(address from, address to, address notary, uint256 value) external view returns (byte status); function checkAuthorizeHoldOperatorAllowed(address operator, address from) external view returns (byte status); function checkOrderTransferAllowed(address from, address to, uint256 value) external view returns (byte status); function checkAuthorizeClearableTransferOperatorAllowed(address operator, address from) external view returns (byte status); function checkOrderFundAll

    Shortcut: erc2020i_draft

    // https://eips.ethereum.org/EIPS/eip-2020
    // https://github.com/IoBuilders/em-token (example)
    // SPDX-License-Identifier: MIT
    /*
    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.
    
    Financial institutions work today with electronic systems,
    which hold account balances in databases on core banking systems.
    In order for an institution to be allowed to maintain records of client balances segregated and available for clients,
    such institution must be regulated under a known legal framework and must possess a license to do so.
    Maintaining a license under regulatory supervision entails ensuring compliance (i.e. performing KYC on all clients and ensuring good AML practices before allowing transactions)
    and demonstrating technical and operational solvency through periodic audits,
    so clients depositing funds with the institution can rest assured that their money is safe.
    */
    pragma solidity >=0.5.0 <0.8.0;
    
    interface EMoneyToken /* is ERC-1996, ERC-2018, ERC-2019, ERC-2021 */ {
        function currency() external view returns (string memory);
        function version() external pure returns (string memory);
        function availableFunds(address account) external view returns (uint256);
        function checkTransferAllowed(address from, address to, uint256 value) external view returns (byte status);
        function checkApproveAllowed(address from, address spender, uint256 value) external view returns (byte status);
        function checkHoldAllowed(address from, address to, address notary, uint256 value) external view returns (byte status);
        function checkAuthorizeHoldOperatorAllowed(address operator, address from) external view returns (byte status);
        function checkOrderTransferAllowed(address from, address to, uint256 value) external view returns (byte status);
        function checkAuthorizeClearableTransferOperatorAllowed(address operator, address from) external view returns (byte status);
        function checkOrderFundAllowed(address to, address operator, uint256 value) external view returns (byte status);
        function checkAuthorizeFundOperatorAllowed(address operator, address to) external view returns (byte status);
        function checkOrderPayoutAllowed(address from, address operator, uint256 value) external view returns (byte status);
        function checkAuthorizePayoutOperatorAllowed(address operator, address from) external view returns (byte status);
    }
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.