Functions and Usage
Functions and Usage
Below is a detailed list of functions available in the smart contract and how to use them.
lockTokens(uint256 amount, uint256 duration): Locks a specified amount of tokens for a given duration.
Parameters:
amount
: The number of tokens to lock.duration
: The period in days for which the tokens will be locked.
Usage Example:
vault.lockTokens(1000, 365); // Locks 1000 tokens for 365 days
unlockTokens(uint256 amount): Unlocks the specified amount of tokens after the locking period.
Parameters:
amount
: The number of tokens to unlock.
Usage Example:
vault.unlockTokens(1000); // Unlocks 1000 tokens
claimRewards(): Claims the rewards accumulated during the locking period.
Usage Example:
vault.claimRewards(); // Claims all accumulated rewards
Last updated