REI Network Documents
  • REI Network
    • Welcome to REI Network
    • Why We build REI Network
    • Introduction to $REI
  • Developer
    • Quick Start
    • API Reference
    • Token Addresses
    • System Contracts
      • StakeManager
      • Fee
      • ContractFee
      • Router
      • AbstractToken
      • CommissionShare
      • FeeToken
      • FeePool
      • ValidatorRewardPool
      • FreeFee
      • UnstakePool
      • FreeFeeToken
      • Config
    • Guides
      • Using The Graph
        • Using The Graph on REI Network
        • Running a Graph Node on REI Network
      • Using Gnosis Safe
      • Exchange Integration
  • REI DAO
    • What is REI DAO?
      • Background
      • Management content of REI DAO
      • How the REI DAO is implemented?
      • How REI DAO works?
    • Governance
      • About Governance
      • Governance Process
      • Voting with Snapshot
      • FAQ
    • Guides
      • Dashboard
      • Become a Validator
      • Jail Mechanism
      • Slash Mechanism
      • Voting for a Validator
      • Stake for Free Gas
      • Using BLS
        • Check BLS
      • REI@3.0.X Upgrade Guide
Powered by GitBook
On this page
  • Stake for free gas
  • Withdraw Gas Stakes
  1. REI DAO
  2. Guides

Stake for Free Gas

PreviousVoting for a ValidatorNextUsing BLS

Last updated 1 year ago

Stake for free gas

Step1: Navigate to

Step2: Click on GAS STAKE button, enter the address and amount to stake

import { getDefaultProvider, Wallet } from "ethers";
import { Fee__factory } from "@rei-network/contracts";

const provider = getDefaultProvider("https://rpc-mainnet.rei.network");

const wallet = new Wallet("yourPrivateKey", provider);

const fee = Fee__factory.connect(
  "0x0000000000000000000000000000000000001005",
  wallet
);

fee
  .deposit("yourAddress", {
    value: "depositAmount",
  })
  .then(() => {
    // ...
  })
  .catch(() => {
    // ...
  });

Withdraw Gas Stakes

The staked $REI cannot be withdrawn within 3 days. After 3 days, WITHDRAW will be enabled.

import { getDefaultProvider, Wallet } from "ethers";
import { Fee__factory } from "@rei-network/contracts";

const provider = getDefaultProvider("https://rpc-mainnet.rei.network");

const wallet = new Wallet("yourPrivateKey", provider);

const fee = Fee__factory.connect(
  "0x0000000000000000000000000000000000001005",
  wallet
);

fee
  .withdraw("yourAddress", "withdrawAmount")
  .then(() => {
    // ...
  })
  .catch(() => {
    // ...
  });
https://dao.rei.network/#/stakeforgas