Mokshya Protocol
  • Mokshya
  • Aptos
    • candymachine
      • Installation
      • Preparing your assets
      • Prepare config.json
      • Initialize Candy Machine
      • Update Whitelist
      • Mint UI
    • Token Staking
      • Installation
      • Staking Creation and Control
      • Stake Token
      • Claim Reward and Unstake
    • Token Vesting
      • Installation
      • Vesting Operations
Powered by GitBook
On this page
  1. Aptos
  2. Token Staking

Stake Token

Staker with the tokens can stake the token as follows

 const staking_payloads = {
      type: "entry_function_payload",
      function: mokshyastaking+"::tokenstaking::stake_token",
      type_arguments: [],
      arguments: [creator.address(),collection,tokenname,tokenPropertyVersion,num_of_tokens
      ],
    };
    let txnRequest = await client.generateTransaction(staker.address(), staking_payloads);
    let bcsTxn = AptosClient.generateBCSTransaction(staker, txnRequest);
    await client.submitSignedBCSTransaction(bcsTxn);
PreviousStaking Creation and ControlNextClaim Reward and Unstake

Last updated 2 years ago