Source Code View the RWAToken.sol source code
Upgradability This contract uses the UUPSUpgradeable pattern and inherits from ERC20Upgradeable, OwnableUpgradeable, and PausableUpgradeable.
Methods
Initialization function for the upgradeable contract. It sets token parameters, the custody wallet, the USDT reference contract, and the compliance manager. function initialize (
string memory _name ,
string memory _symbol ,
address _initialOwner ,
address _custodyWallet ,
address _usdt ,
address _complianceManage
) public ;
Compliance manager address
Activates token sales. Sale time constraints are enforced during minting. function startSale () external ;
Pauses an ongoing token sale. function pauseSale () external ;
Sets the earliest timestamp at which tokens become transferable (0 means unlocked). function setUnlockTime ( uint256 _unlockTime ) external ;
Emergency unlock mechanism that immediately allows token transfers. function emergencyUnlock () external ;
Emergency function that pauses all token transfers. function pause () external ;
Resumes all token transfers. function unpause () external ;
Updates the custody wallet address that receives raised funds. function setCustodyWallet ( address _custodyWallet ) external ;
New custody wallet address
Recovers unsold tokens from the sale and mints them to the custody wallet. function recoverUnsoldTokens () external ;
Recovers any ERC20 tokens that were accidentally sent to this contract. function recoverTokens ( address token ) external ;
Token contract address to recover
Executes a forced token transfer for compliance or recovery purposes. function forcedTransfer (
address from ,
address to ,
uint256 amount ,
string calldata reason
) external ;
Updates legal and valuation information for the underlying real-world asset. function updateAssetInfo ( string memory _metadataURI , uint256 _valuation ) external ;
Purchases tokens with USDT during an active sale and verifies the user’s compliance signature. function mint (
uint256 amountUSDT ,
bytes memory signature ,
uint256 expireTime
) external ;
Compliance signature payload
Signature expiration time
Owner-only function that burns tokens from a specific address for compliance or recovery purposes. function burn ( address from , uint256 amount ) external ;
Address whose tokens will be burned
Returns the remaining number of tokens available for sale. function remainingForSale () external view returns ( uint256 );
Remaining number of tokens available for sale
Calculates how many tokens can be minted for a given USDT amount. function usdtToTokenAmount ( uint256 amountUSDT ) public view returns ( uint256 );
Calculates the USDT amount required for a given token amount. function tokenToUSDTAmount ( uint256 tokenAmount ) public view returns ( uint256 );