Skip to main content

2: Stake to Coinbase with NEAR CLI

To stake from an account...​

1. Authenticate your NEAR wallet with the CLI​

  1. Using the computer on which you installed the NEAR CLI, log into the NEAR wallet site

  2. Execute the command:

near login
  1. Click Allow in the new tab.

  2. Enter your Wallet ID.

  3. Click Confirm.

2. Deposit NEAR to the stakingpool contract​

COINBASE VALIDATOR INFORMATION

Validator name: Bison Trails
Staking pool IDs:

  • bisontrails.poolv1.near
  • bisontrails2.poolv1.near
  1. Execute the command using Coinbase's Staking Pool ID: bisontrails.poolv1.near.
near call <bisontrails.poolv1.near> deposit '{}' --accountId <WALLET_ID> --amount <N>
  1. Receive the response:
Log [my_validator.stakingpool]: @bt_admin.testnet deposited 100000000000000000000000000. New unstaked balance is 100000000000000000000000000

3. Stake NEAR to the stakingpool contract​

  1. Execute the command:
near call <bisontrails.poolv1.near> stake '{"amount": "N000000000000000000000000"}' --accountId <WALLET_ID>
  1. 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
tip

Congratulations! You are now staked to a Coinbase validator.

To stake from a lockup contract...​

1. Confirm ownership of your lockup contract​

  1. From Terminal, execute the command:
near view LOCKUP_CONTRACT get_owner_account_id ‘{}’
  1. Match the owner_account_id to the lockup contract ID associated with that owner ID.

2. Designate the staking pool and deposit NEAR​

  1. Execute the command:
near call LOCKUP_CONTRACT select_staking_pool '{"staking_pool_account_id": "bisontrails.poolv1.near"}' --accountId OWNER_ACCOUNT_ID
  1. To deposit NEAR, execute the command:
near call LOCKUP_CONTRACT deposit_to_staking_pool '{"amount":"N000000000000000000000000"}' --accountId OWNER_ACCOUNT_ID --gas=150000000000000
  1. 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​

  1. Execute the command:
near call LOCKUP_CONTRACT stake '{"amount":"N000000000000000000000000"}' --accountId OWNER_ACCOUNT_ID --gas=150000000000000
  1. Receive TRUE or FALSE value along with your transaction receipt and a URL to view your transaction in the explorer.
tip

Congratulations! You are now staked to a Coinbase validator.

Was this helpful?