Skip to main content

Module ITIP20

Module ITIP20 

Source
Expand description

TIP20 token interface providing standard ERC20 functionality with Tempo-specific extensions.

TIP20 tokens extend the ERC20 standard with:

  • Currency denomination support for real-world asset backing
  • Transfer policy enforcement for compliance
  • Supply caps for controlled token issuance
  • Pause/unpause functionality for emergency controls
  • Memo support for transaction context The interface supports both standard token operations and administrative functions for managing token behavior and compliance requirements.
interface ITIP20 {
    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view returns (uint8);
    function totalSupply() external view returns (uint256);
    function quoteToken() external view returns (address);
    function nextQuoteToken() external view returns (address);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address to, uint256 amount) external returns (bool);
    function approve(address spender, uint256 amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint256);
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
    function mint(address to, uint256 amount) external;
    function burn(uint256 amount) external;
    function currency() external view returns (string memory);
    function supplyCap() external view returns (uint256);
    function paused() external view returns (bool);
    function transferPolicyId() external view returns (uint64);
    function burnBlocked(address from, uint256 amount) external;
    function mintWithMemo(address to, uint256 amount, bytes32 memo) external;
    function burnWithMemo(uint256 amount, bytes32 memo) external;
    function transferWithMemo(address to, uint256 amount, bytes32 memo) external;
    function transferFromWithMemo(address from, address to, uint256 amount, bytes32 memo) external returns (bool);
    function changeTransferPolicyId(uint64 newPolicyId) external;
    function setSupplyCap(uint256 newSupplyCap) external;
    function pause() external;
    function unpause() external;
    function setNextQuoteToken(address newQuoteToken) external;
    function completeQuoteTokenUpdate() external;
    function PAUSE_ROLE() external view returns (bytes32);
    function UNPAUSE_ROLE() external view returns (bytes32);
    function ISSUER_ROLE() external view returns (bytes32);
    function BURN_BLOCKED_ROLE() external view returns (bytes32);
    function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external;
    function nonces(address owner) external view returns (uint256);
    function DOMAIN_SEPARATOR() external view returns (bytes32);
    struct UserRewardInfo { address rewardRecipient; uint256 rewardPerToken; uint256 rewardBalance; }
    function distributeReward(uint256 amount) external;
    function setRewardRecipient(address recipient) external;
    function claimRewards() external returns (uint256);
    function optedInSupply() external view returns (uint128);
    function globalRewardPerToken() external view returns (uint256);
    function userRewardInfo(address account) external view returns (UserRewardInfo memory);
    function getPendingRewards(address account) external view returns (uint128);
    event Transfer(address indexed from, address indexed to, uint256 amount);
    event Approval(address indexed owner, address indexed spender, uint256 amount);
    event Mint(address indexed to, uint256 amount);
    event Burn(address indexed from, uint256 amount);
    event BurnBlocked(address indexed from, uint256 amount);
    event TransferWithMemo(address indexed from, address indexed to, uint256 amount, bytes32 indexed memo);
    event TransferPolicyUpdate(address indexed updater, uint64 indexed newPolicyId);
    event SupplyCapUpdate(address indexed updater, uint256 indexed newSupplyCap);
    event PauseStateUpdate(address indexed updater, bool isPaused);
    event NextQuoteTokenSet(address indexed updater, address indexed nextQuoteToken);
    event QuoteTokenUpdate(address indexed updater, address indexed newQuoteToken);
    event RewardDistributed(address indexed funder, uint256 amount);
    event RewardRecipientSet(address indexed holder, address indexed recipient);
    error InsufficientBalance(uint256 available, uint256 required, address token);
    error InsufficientAllowance();
    error SupplyCapExceeded();
    error InvalidSupplyCap();
    error InvalidPayload();
    error StringTooLong();
    error PolicyForbids();
    error InvalidRecipient();
    error ContractPaused();
    error InvalidCurrency();
    error InvalidQuoteToken();
    error TransfersDisabled();
    error InvalidAmount();
    error NoOptedInSupply();
    error Unauthorized();
    error ProtectedAddress();
    error InvalidToken();
    error Uninitialized();
    error InvalidTransferPolicyId();
    error PermitExpired();
    error InvalidSignature();
}

Modules§

abi
Contains dynamic ABI definitions for this contract.

Structs§

Approval
Event with signature Approval(address,address,uint256) and selector 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
BURN_BLOCKED_ROLECall
@notice Returns the role identifier for burning tokens from blocked accounts @return The burn blocked role identifier Function with signature BURN_BLOCKED_ROLE() and selector 0x32ad9be8.
BURN_BLOCKED_ROLEReturn
@notice Returns the role identifier for burning tokens from blocked accounts @return The burn blocked role identifier Container type for the return parameters of the BURN_BLOCKED_ROLE() function.
Burn
Event with signature Burn(address,uint256) and selector 0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5.
BurnBlocked
Event with signature BurnBlocked(address,uint256) and selector 0xeff07194896bfa6254e521809f217f70dbdd9cefa6b894f5326af3ce8402c320.
ContractPaused
Custom error with signature ContractPaused() and selector 0xab35696f.
DOMAIN_SEPARATORCall
Function with signature DOMAIN_SEPARATOR() and selector 0x3644e515.
DOMAIN_SEPARATORReturn
Container type for the return parameters of the DOMAIN_SEPARATOR() function.
ISSUER_ROLECall
@notice Returns the role identifier for issuing tokens @return The issuer role identifier Function with signature ISSUER_ROLE() and selector 0x82aefa24.
ISSUER_ROLEReturn
@notice Returns the role identifier for issuing tokens @return The issuer role identifier Container type for the return parameters of the ISSUER_ROLE() function.
ITIP20Instance
A ITIP20 instance.
InsufficientAllowance
Custom error with signature InsufficientAllowance() and selector 0x13be252b.
InsufficientBalance
Custom error with signature InsufficientBalance(uint256,uint256,address) and selector 0x832f98b5.
InvalidAmount
Custom error with signature InvalidAmount() and selector 0x2c5211c6.
InvalidCurrency
Custom error with signature InvalidCurrency() and selector 0xf5993428.
InvalidPayload
Custom error with signature InvalidPayload() and selector 0x7c6953f9.
InvalidQuoteToken
Custom error with signature InvalidQuoteToken() and selector 0xd15b4fe2.
InvalidRecipient
Custom error with signature InvalidRecipient() and selector 0x9c8d2cd2.
InvalidSignature
Custom error with signature InvalidSignature() and selector 0x8baa579f.
InvalidSupplyCap
Custom error with signature InvalidSupplyCap() and selector 0xc0d76d92.
InvalidToken
Custom error with signature InvalidToken() and selector 0xc1ab6dc1.
InvalidTransferPolicyId
Custom error with signature InvalidTransferPolicyId() and selector 0x7b94a16b.
Mint
Event with signature Mint(address,uint256) and selector 0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885.
NextQuoteTokenSet
Event with signature NextQuoteTokenSet(address,address) and selector 0x509c22f85ddeb1f3a347c45d225acd96afb87104e38b781e22a9376f0842a83a.
NoOptedInSupply
Custom error with signature NoOptedInSupply() and selector 0xe845980e.
PAUSE_ROLECall
@notice Returns the role identifier for pausing the contract @return The pause role identifier Function with signature PAUSE_ROLE() and selector 0x389ed267.
PAUSE_ROLEReturn
@notice Returns the role identifier for pausing the contract @return The pause role identifier Container type for the return parameters of the PAUSE_ROLE() function.
PauseStateUpdate
Event with signature PauseStateUpdate(address,bool) and selector 0xf79595a776ff71356be9e7ff196226a16d0f4d637ff39031256c0eafd7af6b5e.
PermitExpired
Custom error with signature PermitExpired() and selector 0x1a15a3cc.
PolicyForbids
Custom error with signature PolicyForbids() and selector 0x54cfe659.
ProtectedAddress
Custom error with signature ProtectedAddress() and selector 0xe1320079.
QuoteTokenUpdate
Event with signature QuoteTokenUpdate(address,address) and selector 0xa2bc96949c0ac82a2c9b213d46c45d745e1e2567d1496b5e117d9c808ef004f3.
RewardDistributed
Event with signature RewardDistributed(address,uint256) and selector 0xe34918ff1c7084970068b53fd71ad6d8b04e9f15d3886cbf006443e6cdc52ea6.
RewardRecipientSet
Event with signature RewardRecipientSet(address,address) and selector 0xbbf8c20751167a65b38d4dd87c3eba00bfae01d85fb809a89eee1ba842673b98.
StringTooLong
Custom error with signature StringTooLong() and selector 0xb11b2ad8.
SupplyCapExceeded
Custom error with signature SupplyCapExceeded() and selector 0xf58f733a.
SupplyCapUpdate
Event with signature SupplyCapUpdate(address,uint256) and selector 0x6d7e6630766134be7e051b11b8882e6f47926ddd2fd1268bebd168c30f055c4f.
Transfer
Event with signature Transfer(address,address,uint256) and selector 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
TransferPolicyUpdate
Event with signature TransferPolicyUpdate(address,uint64) and selector 0xa870ab07b4f8e8e92e8876245ea0ec666bc09ccf6814a1fb6a8e6984b1932cce.
TransferWithMemo
Event with signature TransferWithMemo(address,address,uint256,bytes32) and selector 0x57bc7354aa85aed339e000bccffabbc529466af35f0772c8f8ee1145927de7f0.
TransfersDisabled
Custom error with signature TransfersDisabled() and selector 0x8574adcf.
UNPAUSE_ROLECall
@notice Returns the role identifier for unpausing the contract @return The unpause role identifier Function with signature UNPAUSE_ROLE() and selector 0x309756fb.
UNPAUSE_ROLEReturn
@notice Returns the role identifier for unpausing the contract @return The unpause role identifier Container type for the return parameters of the UNPAUSE_ROLE() function.
Unauthorized
Custom error with signature Unauthorized() and selector 0x82b42900.
Uninitialized
Custom error with signature Uninitialized() and selector 0x1c72fad4.
UserRewardInfo
allowanceCall
Function with signature allowance(address,address) and selector 0xdd62ed3e.
allowanceReturn
Container type for the return parameters of the allowance(address,address) function.
approveCall
Function with signature approve(address,uint256) and selector 0x095ea7b3.
approveReturn
Container type for the return parameters of the approve(address,uint256) function.
balanceOfCall
Function with signature balanceOf(address) and selector 0x70a08231.
balanceOfReturn
Container type for the return parameters of the balanceOf(address) function.
burnBlockedCall
Function with signature burnBlocked(address,uint256) and selector 0xec0cf3dc.
burnBlockedReturn
Container type for the return parameters of the burnBlocked(address,uint256) function.
burnCall
Function with signature burn(uint256) and selector 0x42966c68.
burnReturn
Container type for the return parameters of the burn(uint256) function.
burnWithMemoCall
Function with signature burnWithMemo(uint256,bytes32) and selector 0x38f23b0b.
burnWithMemoReturn
Container type for the return parameters of the burnWithMemo(uint256,bytes32) function.
changeTransferPolicyIdCall
Function with signature changeTransferPolicyId(uint64) and selector 0xfd5e9420.
changeTransferPolicyIdReturn
Container type for the return parameters of the changeTransferPolicyId(uint64) function.
claimRewardsCall
Function with signature claimRewards() and selector 0x372500ab.
claimRewardsReturn
Container type for the return parameters of the claimRewards() function.
completeQuoteTokenUpdateCall
Function with signature completeQuoteTokenUpdate() and selector 0x638bc4a3.
completeQuoteTokenUpdateReturn
Container type for the return parameters of the completeQuoteTokenUpdate() function.
currencyCall
Function with signature currency() and selector 0xe5a6b10f.
currencyReturn
Container type for the return parameters of the currency() function.
decimalsCall
Function with signature decimals() and selector 0x313ce567.
decimalsReturn
Container type for the return parameters of the decimals() function.
distributeRewardCall
Function with signature distributeReward(uint256) and selector 0x940a4e45.
distributeRewardReturn
Container type for the return parameters of the distributeReward(uint256) function.
getPendingRewardsCall
Function with signature getPendingRewards(address) and selector 0xf6ed2017.
getPendingRewardsReturn
Container type for the return parameters of the getPendingRewards(address) function.
globalRewardPerTokenCall
Function with signature globalRewardPerToken() and selector 0x726ce324.
globalRewardPerTokenReturn
Container type for the return parameters of the globalRewardPerToken() function.
mintCall
Function with signature mint(address,uint256) and selector 0x40c10f19.
mintReturn
Container type for the return parameters of the mint(address,uint256) function.
mintWithMemoCall
Function with signature mintWithMemo(address,uint256,bytes32) and selector 0xe44f0b12.
mintWithMemoReturn
Container type for the return parameters of the mintWithMemo(address,uint256,bytes32) function.
nameCall
Function with signature name() and selector 0x06fdde03.
nameReturn
Container type for the return parameters of the name() function.
nextQuoteTokenCall
Function with signature nextQuoteToken() and selector 0x7d0819b7.
nextQuoteTokenReturn
Container type for the return parameters of the nextQuoteToken() function.
noncesCall
Function with signature nonces(address) and selector 0x7ecebe00.
noncesReturn
Container type for the return parameters of the nonces(address) function.
optedInSupplyCall
Function with signature optedInSupply() and selector 0x8ef39dce.
optedInSupplyReturn
Container type for the return parameters of the optedInSupply() function.
pauseCall
Function with signature pause() and selector 0x8456cb59.
pauseReturn
Container type for the return parameters of the pause() function.
pausedCall
Function with signature paused() and selector 0x5c975abb.
pausedReturn
Container type for the return parameters of the paused() function.
permitCall
Function with signature permit(address,address,uint256,uint256,uint8,bytes32,bytes32) and selector 0xd505accf.
permitReturn
Container type for the return parameters of the permit(address,address,uint256,uint256,uint8,bytes32,bytes32) function.
quoteTokenCall
Function with signature quoteToken() and selector 0x217a4b70.
quoteTokenReturn
Container type for the return parameters of the quoteToken() function.
setNextQuoteTokenCall
Function with signature setNextQuoteToken(address) and selector 0x4593223f.
setNextQuoteTokenReturn
Container type for the return parameters of the setNextQuoteToken(address) function.
setRewardRecipientCall
Function with signature setRewardRecipient(address) and selector 0xe521136f.
setRewardRecipientReturn
Container type for the return parameters of the setRewardRecipient(address) function.
setSupplyCapCall
Function with signature setSupplyCap(uint256) and selector 0xb6a3f59a.
setSupplyCapReturn
Container type for the return parameters of the setSupplyCap(uint256) function.
supplyCapCall
Function with signature supplyCap() and selector 0x8f770ad0.
supplyCapReturn
Container type for the return parameters of the supplyCap() function.
symbolCall
Function with signature symbol() and selector 0x95d89b41.
symbolReturn
Container type for the return parameters of the symbol() function.
totalSupplyCall
Function with signature totalSupply() and selector 0x18160ddd.
totalSupplyReturn
Container type for the return parameters of the totalSupply() function.
transferCall
Function with signature transfer(address,uint256) and selector 0xa9059cbb.
transferFromCall
Function with signature transferFrom(address,address,uint256) and selector 0x23b872dd.
transferFromReturn
Container type for the return parameters of the transferFrom(address,address,uint256) function.
transferFromWithMemoCall
Function with signature transferFromWithMemo(address,address,uint256,bytes32) and selector 0x929c2539.
transferFromWithMemoReturn
Container type for the return parameters of the transferFromWithMemo(address,address,uint256,bytes32) function.
transferPolicyIdCall
Function with signature transferPolicyId() and selector 0x9c4bad29.
transferPolicyIdReturn
Container type for the return parameters of the transferPolicyId() function.
transferReturn
Container type for the return parameters of the transfer(address,uint256) function.
transferWithMemoCall
Function with signature transferWithMemo(address,uint256,bytes32) and selector 0x95777d59.
transferWithMemoReturn
Container type for the return parameters of the transferWithMemo(address,uint256,bytes32) function.
unpauseCall
Function with signature unpause() and selector 0x3f4ba83a.
unpauseReturn
Container type for the return parameters of the unpause() function.
userRewardInfoCall
Function with signature userRewardInfo(address) and selector 0x360b8ed9.
userRewardInfoReturn
Container type for the return parameters of the userRewardInfo(address) function.

Enums§

ITIP20Calls
Container for all the ITIP20 function calls.
ITIP20Errors
Container for all the ITIP20 custom errors.
ITIP20Events
Container for all the ITIP20 events.

Functions§

new
Creates a new wrapper around an on-chain ITIP20 contract instance.