Skip to main content

SoulboundCloneERC20

Git Source

Inherits: CloneERC20

A cloneable ERC20 token with the following additional features:

  • Only the owner can mint/burn tokens
  • Transfers and approvals are disabled

This contract can be cloned using the ClonesWithImmutableArgs.clone3(). The arguments required are:

  • name (string)
  • symbol (string)
  • decimals (uint8)
  • expiry (uint64)
  • owner (address)
  • underlying token (address)

Functions

onlyOwner

modifier onlyOwner();

mint

Mint new tokens

Only callable by the owner

function mint(address to_, uint256 amount_) external onlyOwner;

burn

Burn tokens

Only callable by the owner

function burn(address from_, uint256 amount_) external onlyOwner;

transfer

function transfer(address, uint256) public pure override returns (bool);

transferFrom

function transferFrom(address, address, uint256) public pure override returns (bool);

approve

function approve(address, uint256) public pure override returns (bool);

expiry

The timestamp at which the derivative can be redeemed for the underlying

function expiry() external pure returns (uint48);

Returns

NameTypeDescription
<none>uint48The expiry timestamp

owner

The address of the owner of the derivative

function owner() public pure returns (address);

Returns

NameTypeDescription
<none>addressThe address of the owner

underlying

The token to be redeemed when the derivative is vested

function underlying() external pure returns (ERC20);

Returns

NameTypeDescription
<none>ERC20The address of the underlying token

Errors

NotPermitted

error NotPermitted();