Stake for Free Gas
This feature is currently only available on REI-Testnet

Stake for free gas

UI
Ethers
Step2: Click on GAS STAKE button, ether the address and amount to stake
1
import { getDefaultProvider, Wallet } from "ethers";
2
import { Fee__factory } from "@rei-network/contracts";
3
4
const provider = getDefaultProvider("https://rpc-mainnet.rei.network");
5
6
const wallet = new Wallet("yourPrivateKey", provider);
7
8
const fee = Fee__factory.connect(
9
"0x0000000000000000000000000000000000001005",
10
wallet
11
);
12
13
fee
14
.deposit("yourAddress", {
15
value: "depositAmount",
16
})
17
.then(() => {
18
// ...
19
})
20
.catch(() => {
21
// ...
22
});
Copied!

Withdraw Gas Stakes

UI
Ethers
The staked REI cannot be withdrawn until the vesting period expires. After the Vesting Status reaches 100%, WITHDRAW will be enabled.

1
import { getDefaultProvider, Wallet } from "ethers";
2
import { Fee__factory } from "@rei-network/contracts";
3
4
const provider = getDefaultProvider("https://rpc-mainnet.rei.network");
5
6
const wallet = new Wallet("yourPrivateKey", provider);
7
8
const fee = Fee__factory.connect(
9
"0x0000000000000000000000000000000000001005",
10
wallet
11
);
12
13
fee
14
.withdraw("yourAddress", "withdrawAmount")
15
.then(() => {
16
// ...
17
})
18
.catch(() => {
19
// ...
20
});
Copied!
Last modified 2mo ago