Guides
Log In

2: Stake to Cloud with NEAR CLI

To stake from an account...

🚧

If using a Ledger hardware device to sign your transactions, skip to Step 2 and add --useLedgerKey to the end of the deposit and staking commands.

1. Authenticate your NEAR wallet with the CLI
  • Using the computer on which you installed the NEAR CLI, log into the NEAR wallet site
  • Execute the command:
near login
  • Click Allow in the new tab
  • Enter your Wallet ID
  • Click Confirm
2. Deposit NEAR to the stakingpool contract

📘

Coinbase Cloud validator information

Validator name: Bison Trails
Staking pool IDs:
bisontrails.poolv1.near
bisontrails2.poolv1.near

  • Execute the command using Coinbase Cloud's Staking Pool ID: bisontrails.poolv1.near
near call <bisontrails.poolv1.near> deposit '{}' --accountId <WALLET_ID> --amount <N>
  • Receive the response:
Log [my_validator.stakingpool]: @bt_admin.testnet deposited 100000000000000000000000000. New unstaked balance is 100000000000000000000000000
3. Stake NEAR to the stakingpool contract
  • Execute the command:
near call <bisontrails.poolv1.near> stake '{"amount": "N000000000000000000000000"}' --accountId <WALLET_ID>
  • Receive the response:
Log [my_validator.stakingpool]: @bt_admin.testnet staking 100000000000000000000000000. Received 100000000000000000000000000 new staking shares. Total 0 unstaked balance and 100000000000000000000000000 staking shares

👍

Congratulations! You are now staked to a Coinbase Cloud validator.


To stake from a lockup contract...

1. Confirm ownership of your lockup contract
  • From Terminal, execute the command:
near view LOCKUP_CONTRACT get_owner_account_id ‘{}’
  • Match the owner_account_id to the lockup contract ID associated with that owner ID
2. Designate the staking pool and deposit NEAR
  • Execute the command:
near call LOCKUP_CONTRACT select_staking_pool '{"staking_pool_account_id": "bisontrails.poolv1.near"}' --accountId OWNER_ACCOUNT_ID
  • To deposit NEAR, execute the command:
near call LOCKUP_CONTRACT deposit_to_staking_pool '{"amount":"N000000000000000000000000"}' --accountId OWNER_ACCOUNT_ID --gas=150000000000000
  • Receive TRUE or FALSE value, along with your transaction receipt and a URL to view your transaction in the explorer
3. Stake NEAR to the stakingpool contract
  • Execute the command:
near call LOCKUP_CONTRACT stake '{"amount":"N000000000000000000000000"}' --accountId OWNER_ACCOUNT_ID --gas=150000000000000
  • Receive TRUE or FALSE value along with your transaction receipt and a URL to view your transaction in the explorer

👍

Congratulations! You are now staked to a Coinbase Cloud validator.


What’s Next
Did this page help you?