Module ITIP20

Module ITIP20 

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 feeRecipient() external view returns (address);
    function setFeeRecipient(address newRecipient) external view returns (address);
    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);
    struct RewardStream { address funder; uint64 startTime; uint64 endTime; uint256 ratePerSecondScaled; uint256 amountTotal; }
    struct UserRewardInfo { address rewardRecipient; uint256 rewardPerToken; uint256 rewardBalance; }
    function startReward(uint256 amount, uint32 secs) external returns (uint64);
    function setRewardRecipient(address recipient) external;
    function cancelReward(uint64 id) external returns (uint256);
    function claimRewards() external returns (uint256);
    function finalizeStreams(uint64 timestamp) external;
    function getStream(uint64 id) external view returns (RewardStream memory);
    function totalRewardPerSecond() external view returns (uint256);
    function optedInSupply() external view returns (uint128);
    function nextStreamId() external view returns (uint64);
    function userRewardInfo(address account) external view returns (UserRewardInfo memory);
    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 RewardScheduled(address indexed funder, uint64 indexed id, uint256 amount, uint32 durationSeconds);
    event RewardCanceled(address indexed funder, uint64 indexed id, uint256 refund);
    event RewardRecipientSet(address indexed holder, address indexed recipient);
    event FeeRecipientUpdated(address indexed updater, address indexed newRecipient);
    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 NotStreamFunder();
    error StreamInactive();
    error NoOptedInSupply();
    error Unauthorized();
    error RewardsDisabled();
    error ScheduledRewardsDisabled();
    error ProtectedAddress();
    error InvalidToken();
}

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.
FeeRecipientUpdated
Event with signature FeeRecipientUpdated(address,address) and selector 0xaaebcf1bfa00580e41d966056b48521fa9f202645c86d4ddf28113e617c1b1d3.
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.
InvalidSupplyCap
Custom error with signature InvalidSupplyCap() and selector 0xc0d76d92.
InvalidToken
Custom error with signature InvalidToken() and selector 0xc1ab6dc1.
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.
NotStreamFunder
Custom error with signature NotStreamFunder() and selector 0xc5c6817c.
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.
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.
RewardCanceled
Event with signature RewardCanceled(address,uint64,uint256) and selector 0x548999e5273967cea74399e38512376cfcef682ef11162c3053a3fd5e3ecf690.
RewardRecipientSet
Event with signature RewardRecipientSet(address,address) and selector 0xbbf8c20751167a65b38d4dd87c3eba00bfae01d85fb809a89eee1ba842673b98.
RewardScheduled
Event with signature RewardScheduled(address,uint64,uint256,uint32) and selector 0xdccc16ad6ef8ed89a8cf72c1012b4dae85f76e8ffecb49e3166105b88c8671f9.
RewardStream
RewardsDisabled
Custom error with signature RewardsDisabled() and selector 0x33d63cbd.
ScheduledRewardsDisabled
Custom error with signature ScheduledRewardsDisabled() and selector 0xadf4cab0.
StreamInactive
Custom error with signature StreamInactive() and selector 0xcb3c54e9.
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.
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.
cancelRewardCall
Function with signature cancelReward(uint64) and selector 0xe2156f0f.
cancelRewardReturn
Container type for the return parameters of the cancelReward(uint64) 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.
feeRecipientCall
Function with signature feeRecipient() and selector 0x46904840.
feeRecipientReturn
Container type for the return parameters of the feeRecipient() function.
finalizeStreamsCall
Function with signature finalizeStreams(uint64) and selector 0xab99ea1e.
finalizeStreamsReturn
Container type for the return parameters of the finalizeStreams(uint64) function.
getStreamCall
Function with signature getStream(uint64) and selector 0xe6ad47f2.
getStreamReturn
Container type for the return parameters of the getStream(uint64) 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.
nextStreamIdCall
Function with signature nextStreamId() and selector 0x1e99d569.
nextStreamIdReturn
Container type for the return parameters of the nextStreamId() 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.
quoteTokenCall
Function with signature quoteToken() and selector 0x217a4b70.
quoteTokenReturn
Container type for the return parameters of the quoteToken() function.
setFeeRecipientCall
Function with signature setFeeRecipient(address) and selector 0xe74b981b.
setFeeRecipientReturn
Container type for the return parameters of the setFeeRecipient(address) 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.
startRewardCall
Function with signature startReward(uint256,uint32) and selector 0x8afa46c7.
startRewardReturn
Container type for the return parameters of the startReward(uint256,uint32) 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.
totalRewardPerSecondCall
Function with signature totalRewardPerSecond() and selector 0x3c2466b4.
totalRewardPerSecondReturn
Container type for the return parameters of the totalRewardPerSecond() 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.