Getting Started
Testnet Infrastructure
Primary Network
Cross-Chain
Encrypted ERC
Mainnet PoS — permissionless staking is irreversible. Read the docs before proceeding.
1
Grant MINTER_ROLE to Staking Manager
Allow the staking manager to mint reward tokens
ERC20 MINTER_ROLE@4d5ab0b
12
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { keccak256, toHex } from "viem";
// ExampleERC20Mintable uses OpenZeppelin AccessControl
// The MINTER_ROLE must be granted to the staking manager
// so it can mint reward tokens for validators
const MINTER_ROLE = keccak256(toHex("MINTER_ROLE"));
const hash = await walletClient.writeContract({
address: "0x..." as `0x${string}`,
abi: ExampleERC20MintableABI,
functionName: "grantRole",
args: [
MINTER_ROLE,
"0x..." // Staking Manager
],
});
await publicClient.waitForTransactionReceipt({ hash });Grants the staking manager permission to mint ERC20 reward tokens via AccessControl.
Command Palette
Search for a command to run...