Lock and Unlock Functions
function lockTokens(
address _tokenAddress,
uint256 _amount,
uint256 _unlockTime,
address payable _withdrawer
)
public returns (uint256 _id)
Function for locking tokens in the vault.
function withdrawTokens(
address _tokenAddress,
uint256 _index,
uint256 _id,
uint256 _amount
)
external
Function for withdrawing tokens from the vault.
function getItemAtUserIndex(
uint256 _index,
address _tokenAddress,
address _user
)
external view returns (uint256, uint256, address, uint256)
Function to retrieve data from the Item under user index number.
function getUserLockedItemAtIndex(
address _user,
uint256 _index
)
external view returns (address)
Function to retrieve token address at desired index for the specified user.
function getLockedItemAtId(uint256 _id)
external
view
returns (uint256, uint256, address, uint256)
Function to retrieve all the data from Item struct under given Id.