Source Code
View the RWAToken.sol source code
UpgradabilityThis contract uses the
UUPSUpgradeable pattern and inherits from ERC20Upgradeable, OwnableUpgradeable, and PausableUpgradeable.Methods
initialize()
initialize()
Initialization function for the upgradeable contract. It sets token parameters, the custody wallet, the USDT reference contract, and the compliance manager.
string
required
Token name
string
required
Token symbol
address
required
Initial owner
address
required
Custody wallet
address
required
USDT contract address
address
required
Compliance manager address
configureSale()
configureSale()
configureSaleTime()
configureSaleTime()
startSale()
startSale()
Activates token sales. Sale time constraints are enforced during minting.
pauseSale()
pauseSale()
Pauses an ongoing token sale.
setUnlockTime()
setUnlockTime()
Sets the earliest timestamp at which tokens become transferable (
0 means unlocked).uint256
required
Unlock timestamp
emergencyUnlock()
emergencyUnlock()
Emergency unlock mechanism that immediately allows token transfers.
pause()
pause()
Emergency function that pauses all token transfers.
unpause()
unpause()
Resumes all token transfers.
setCustodyWallet()
setCustodyWallet()
Updates the custody wallet address that receives raised funds.
address
required
New custody wallet address
recoverUnsoldTokens()
recoverUnsoldTokens()
Recovers unsold tokens from the sale and mints them to the custody wallet.
recoverTokens()
recoverTokens()
Recovers any ERC20 tokens that were accidentally sent to this contract.
address
required
Token contract address to recover
forcedTransfer()
forcedTransfer()
updateAssetInfo()
updateAssetInfo()
mint()
mint()
burn()
burn()
remainingForSale()
remainingForSale()
Returns the remaining number of tokens available for sale.
uint256
Remaining number of tokens available for sale
usdtToTokenAmount()
usdtToTokenAmount()