Contract Functions

ITokenStake

Interface for a token staking contract.

Version 1.4.2

ITokenStake Contract

This interface defines the basic functions for a token staking contract. It allows users to stake their tokens and earn rewards.

Features

  • Stake tokens
  • Unstake tokens
  • View staked balance
  • Claim rewards
  • Usage

    To use this interface, implement the functions in your staking contract.

    Example Implementation

    pragma solidity ^0.8.0; import "./ITokenStake.sol"; contract TokenStake is ITokenStake { // ... Implementation details }

    Functions

    stake

    stake(uint256 amount)

    unstake

    unstake(uint256 amount)

    claimRewards

    claimRewards()
    Ask about contract functions, security, or implementation details

    Press Enter to send your query

    Source Code

    1