Skip to content

Add support of ERC-7943 #337

@rya-sge

Description

@rya-sge

Support of ERC-7953.

This EIP proposes the Universal RWA (uRWA) standard, a set of interfaces for tokenized Real World Assets (RWAs) such as securities, real estate, commodities, or other physical/financial assets on the blockchain.

Already supported

function forcedTransfer(address from, address to, uint256 amount) external returns(bool result);
function getFrozenTokens(address account) external view returns (uint256 amount);
function canTransfer(address from, address to, uint256 amount) external view returns (bool allowed);

Modification

ERC20 EnforcementModule:

  • Add function setFrozenTokens
  • forcedTransferemits the following event:
    event ForcedTransfer(address indexed from, address indexed to, uint256 amount);
  • freezePartialTokens/unfreezePartialTokens/setFrozenTokensemits the following event:
    event Frozen(address indexed account, uint256 amount);
  • During a transfer, revert with the following error ERC7943InsufficientUnfrozenBalance if the active balance is not enough

An ERC-20 transfer reverts with the following custom error if the active balance is not enough
error ERC7943InsufficientUnfrozenBalance(address account, uint256 amount, uint256 unfrozen);

ValidationModule
Non authorized transfer due to address frozen (EnforcementModule revert with:

error ERC7943CannotTransact(address account);

ValidationModuleAllowlist
Non authorized transfer due to address not whitelisted revert with:

error ERC7943CannotTransact(address account);

CMTAT Base Module
Non authorized transfer revert with:
error ERC7943CannotTransfer(address from, address to, uint256 amount);

Note that this error should not be used often since we will use a most specific custom error message for pause and deactivate

EnforcementModule:
Add function canTransact
function canTransact(address account) external view returns (bool allowed);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Next releaseThe issue has been merged into dev and will be part of the next release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions