Use the SDK
Create a Stagenet client in your script:
import { createStagenet } from "contract.dev";
const stagenet = createStagenet("<YOUR_STAGENET_RPC_URL>");Or load the RPC URL from contract.dev.js:
const stagenet = createStagenet();The no-argument form reads from the filesystem, so it is Node-only. Pass the RPC URL explicitly in browsers or edge runtimes.
Then interact with your Stagenet:
// Mint 1 ETH to an address
await stagenet.addBalance(
"0x1111111111111111111111111111111111111111",
10n ** 18n,
);
// Impersonate an account
await stagenet.impersonateAccount(
"0x28C6c06298d514Db089934071355E5743bf21d60",
);
// Override a nonce
await stagenet.setNonce(
"0x1111111111111111111111111111111111111111",
42,
);Last updated on