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 selector0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. - BURN_
BLOCKED_ ROLE Call - @notice Returns the role identifier for burning tokens from blocked accounts
@return The burn blocked role identifier
Function with signature
BURN_BLOCKED_ROLE()and selector0x32ad9be8. - BURN_
BLOCKED_ ROLE Return - @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 selector0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5. - Burn
Blocked - Event with signature
BurnBlocked(address,uint256)and selector0xeff07194896bfa6254e521809f217f70dbdd9cefa6b894f5326af3ce8402c320. - Contract
Paused - Custom error with signature
ContractPaused()and selector0xab35696f. - FeeRecipient
Updated - Event with signature
FeeRecipientUpdated(address,address)and selector0xaaebcf1bfa00580e41d966056b48521fa9f202645c86d4ddf28113e617c1b1d3. - ISSUER_
ROLE Call - @notice Returns the role identifier for issuing tokens
@return The issuer role identifier
Function with signature
ISSUER_ROLE()and selector0x82aefa24. - ISSUER_
ROLE Return - @notice Returns the role identifier for issuing tokens
@return The issuer role identifier
Container type for the return parameters of the
ISSUER_ROLE()function. - ITIP20
Instance - A
ITIP20instance. - Insufficient
Allowance - Custom error with signature
InsufficientAllowance()and selector0x13be252b. - Insufficient
Balance - Custom error with signature
InsufficientBalance(uint256,uint256,address)and selector0x832f98b5. - Invalid
Amount - Custom error with signature
InvalidAmount()and selector0x2c5211c6. - Invalid
Currency - Custom error with signature
InvalidCurrency()and selector0xf5993428. - Invalid
Payload - Custom error with signature
InvalidPayload()and selector0x7c6953f9. - Invalid
Quote Token - Custom error with signature
InvalidQuoteToken()and selector0xd15b4fe2. - Invalid
Recipient - Custom error with signature
InvalidRecipient()and selector0x9c8d2cd2. - Invalid
Supply Cap - Custom error with signature
InvalidSupplyCap()and selector0xc0d76d92. - Invalid
Token - Custom error with signature
InvalidToken()and selector0xc1ab6dc1. - Mint
- Event with signature
Mint(address,uint256)and selector0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885. - Next
Quote Token Set - Event with signature
NextQuoteTokenSet(address,address)and selector0x509c22f85ddeb1f3a347c45d225acd96afb87104e38b781e22a9376f0842a83a. - NoOpted
InSupply - Custom error with signature
NoOptedInSupply()and selector0xe845980e. - NotStream
Funder - Custom error with signature
NotStreamFunder()and selector0xc5c6817c. - PAUSE_
ROLE Call - @notice Returns the role identifier for pausing the contract
@return The pause role identifier
Function with signature
PAUSE_ROLE()and selector0x389ed267. - PAUSE_
ROLE Return - @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. - Pause
State Update - Event with signature
PauseStateUpdate(address,bool)and selector0xf79595a776ff71356be9e7ff196226a16d0f4d637ff39031256c0eafd7af6b5e. - Policy
Forbids - Custom error with signature
PolicyForbids()and selector0x54cfe659. - Protected
Address - Custom error with signature
ProtectedAddress()and selector0xe1320079. - Quote
Token Update - Event with signature
QuoteTokenUpdate(address,address)and selector0xa2bc96949c0ac82a2c9b213d46c45d745e1e2567d1496b5e117d9c808ef004f3. - Reward
Canceled - Event with signature
RewardCanceled(address,uint64,uint256)and selector0x548999e5273967cea74399e38512376cfcef682ef11162c3053a3fd5e3ecf690. - Reward
Recipient Set - Event with signature
RewardRecipientSet(address,address)and selector0xbbf8c20751167a65b38d4dd87c3eba00bfae01d85fb809a89eee1ba842673b98. - Reward
Scheduled - Event with signature
RewardScheduled(address,uint64,uint256,uint32)and selector0xdccc16ad6ef8ed89a8cf72c1012b4dae85f76e8ffecb49e3166105b88c8671f9. - Reward
Stream - Rewards
Disabled - Custom error with signature
RewardsDisabled()and selector0x33d63cbd. - Scheduled
Rewards Disabled - Custom error with signature
ScheduledRewardsDisabled()and selector0xadf4cab0. - Stream
Inactive - Custom error with signature
StreamInactive()and selector0xcb3c54e9. - String
TooLong - Custom error with signature
StringTooLong()and selector0xb11b2ad8. - Supply
CapExceeded - Custom error with signature
SupplyCapExceeded()and selector0xf58f733a. - Supply
CapUpdate - Event with signature
SupplyCapUpdate(address,uint256)and selector0x6d7e6630766134be7e051b11b8882e6f47926ddd2fd1268bebd168c30f055c4f. - Transfer
- Event with signature
Transfer(address,address,uint256)and selector0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. - Transfer
Policy Update - Event with signature
TransferPolicyUpdate(address,uint64)and selector0xa870ab07b4f8e8e92e8876245ea0ec666bc09ccf6814a1fb6a8e6984b1932cce. - Transfer
With Memo - Event with signature
TransferWithMemo(address,address,uint256,bytes32)and selector0x57bc7354aa85aed339e000bccffabbc529466af35f0772c8f8ee1145927de7f0. - Transfers
Disabled - Custom error with signature
TransfersDisabled()and selector0x8574adcf. - UNPAUSE_
ROLE Call - @notice Returns the role identifier for unpausing the contract
@return The unpause role identifier
Function with signature
UNPAUSE_ROLE()and selector0x309756fb. - UNPAUSE_
ROLE Return - @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 selector0x82b42900. - User
Reward Info - allowance
Call - Function with signature
allowance(address,address)and selector0xdd62ed3e. - allowance
Return - Container type for the return parameters of the
allowance(address,address)function. - approve
Call - Function with signature
approve(address,uint256)and selector0x095ea7b3. - approve
Return - Container type for the return parameters of the
approve(address,uint256)function. - balance
OfCall - Function with signature
balanceOf(address)and selector0x70a08231. - balance
OfReturn - Container type for the return parameters of the
balanceOf(address)function. - burn
Blocked Call - Function with signature
burnBlocked(address,uint256)and selector0xec0cf3dc. - burn
Blocked Return - Container type for the return parameters of the
burnBlocked(address,uint256)function. - burn
Call - Function with signature
burn(uint256)and selector0x42966c68. - burn
Return - Container type for the return parameters of the
burn(uint256)function. - burn
With Memo Call - Function with signature
burnWithMemo(uint256,bytes32)and selector0x38f23b0b. - burn
With Memo Return - Container type for the return parameters of the
burnWithMemo(uint256,bytes32)function. - cancel
Reward Call - Function with signature
cancelReward(uint64)and selector0xe2156f0f. - cancel
Reward Return - Container type for the return parameters of the
cancelReward(uint64)function. - change
Transfer Policy IdCall - Function with signature
changeTransferPolicyId(uint64)and selector0xfd5e9420. - change
Transfer Policy IdReturn - Container type for the return parameters of the
changeTransferPolicyId(uint64)function. - claim
Rewards Call - Function with signature
claimRewards()and selector0x372500ab. - claim
Rewards Return - Container type for the return parameters of the
claimRewards()function. - complete
Quote Token Update Call - Function with signature
completeQuoteTokenUpdate()and selector0x638bc4a3. - complete
Quote Token Update Return - Container type for the return parameters of the
completeQuoteTokenUpdate()function. - currency
Call - Function with signature
currency()and selector0xe5a6b10f. - currency
Return - Container type for the return parameters of the
currency()function. - decimals
Call - Function with signature
decimals()and selector0x313ce567. - decimals
Return - Container type for the return parameters of the
decimals()function. - feeRecipient
Call - Function with signature
feeRecipient()and selector0x46904840. - feeRecipient
Return - Container type for the return parameters of the
feeRecipient()function. - finalize
Streams Call - Function with signature
finalizeStreams(uint64)and selector0xab99ea1e. - finalize
Streams Return - Container type for the return parameters of the
finalizeStreams(uint64)function. - getStream
Call - Function with signature
getStream(uint64)and selector0xe6ad47f2. - getStream
Return - Container type for the return parameters of the
getStream(uint64)function. - mint
Call - Function with signature
mint(address,uint256)and selector0x40c10f19. - mint
Return - Container type for the return parameters of the
mint(address,uint256)function. - mint
With Memo Call - Function with signature
mintWithMemo(address,uint256,bytes32)and selector0xe44f0b12. - mint
With Memo Return - Container type for the return parameters of the
mintWithMemo(address,uint256,bytes32)function. - name
Call - Function with signature
name()and selector0x06fdde03. - name
Return - Container type for the return parameters of the
name()function. - next
Quote Token Call - Function with signature
nextQuoteToken()and selector0x7d0819b7. - next
Quote Token Return - Container type for the return parameters of the
nextQuoteToken()function. - next
Stream IdCall - Function with signature
nextStreamId()and selector0x1e99d569. - next
Stream IdReturn - Container type for the return parameters of the
nextStreamId()function. - opted
InSupply Call - Function with signature
optedInSupply()and selector0x8ef39dce. - opted
InSupply Return - Container type for the return parameters of the
optedInSupply()function. - pause
Call - Function with signature
pause()and selector0x8456cb59. - pause
Return - Container type for the return parameters of the
pause()function. - paused
Call - Function with signature
paused()and selector0x5c975abb. - paused
Return - Container type for the return parameters of the
paused()function. - quote
Token Call - Function with signature
quoteToken()and selector0x217a4b70. - quote
Token Return - Container type for the return parameters of the
quoteToken()function. - setFee
Recipient Call - Function with signature
setFeeRecipient(address)and selector0xe74b981b. - setFee
Recipient Return - Container type for the return parameters of the
setFeeRecipient(address)function. - setNext
Quote Token Call - Function with signature
setNextQuoteToken(address)and selector0x4593223f. - setNext
Quote Token Return - Container type for the return parameters of the
setNextQuoteToken(address)function. - setReward
Recipient Call - Function with signature
setRewardRecipient(address)and selector0xe521136f. - setReward
Recipient Return - Container type for the return parameters of the
setRewardRecipient(address)function. - setSupply
CapCall - Function with signature
setSupplyCap(uint256)and selector0xb6a3f59a. - setSupply
CapReturn - Container type for the return parameters of the
setSupplyCap(uint256)function. - start
Reward Call - Function with signature
startReward(uint256,uint32)and selector0x8afa46c7. - start
Reward Return - Container type for the return parameters of the
startReward(uint256,uint32)function. - supply
CapCall - Function with signature
supplyCap()and selector0x8f770ad0. - supply
CapReturn - Container type for the return parameters of the
supplyCap()function. - symbol
Call - Function with signature
symbol()and selector0x95d89b41. - symbol
Return - Container type for the return parameters of the
symbol()function. - total
Reward PerSecond Call - Function with signature
totalRewardPerSecond()and selector0x3c2466b4. - total
Reward PerSecond Return - Container type for the return parameters of the
totalRewardPerSecond()function. - total
Supply Call - Function with signature
totalSupply()and selector0x18160ddd. - total
Supply Return - Container type for the return parameters of the
totalSupply()function. - transfer
Call - Function with signature
transfer(address,uint256)and selector0xa9059cbb. - transfer
From Call - Function with signature
transferFrom(address,address,uint256)and selector0x23b872dd. - transfer
From Return - Container type for the return parameters of the
transferFrom(address,address,uint256)function. - transfer
From With Memo Call - Function with signature
transferFromWithMemo(address,address,uint256,bytes32)and selector0x929c2539. - transfer
From With Memo Return - Container type for the return parameters of the
transferFromWithMemo(address,address,uint256,bytes32)function. - transfer
Policy IdCall - Function with signature
transferPolicyId()and selector0x9c4bad29. - transfer
Policy IdReturn - Container type for the return parameters of the
transferPolicyId()function. - transfer
Return - Container type for the return parameters of the
transfer(address,uint256)function. - transfer
With Memo Call - Function with signature
transferWithMemo(address,uint256,bytes32)and selector0x95777d59. - transfer
With Memo Return - Container type for the return parameters of the
transferWithMemo(address,uint256,bytes32)function. - unpause
Call - Function with signature
unpause()and selector0x3f4ba83a. - unpause
Return - Container type for the return parameters of the
unpause()function. - user
Reward Info Call - Function with signature
userRewardInfo(address)and selector0x360b8ed9. - user
Reward Info Return - Container type for the return parameters of the
userRewardInfo(address)function.
Enums§
- ITIP20
Calls - Container for all the
ITIP20function calls. - ITIP20
Errors - Container for all the
ITIP20custom errors. - ITIP20
Events - Container for all the
ITIP20events.