본문으로 바로가기
Time to read: 1 min
전체 문서 색인은 llms.txt

Configure Foundry for Rootstock

Configure Foundry for Rootstock testnet and mainnet by setting RPC and account environment variables, then load them before you forge or cast.

Environment configuration

Once you have an account with a private key, create a .env file in the root of the foundry project and add the variables.

Foundry automatically loads a .env file present in the project directory.

The .env file should follow this format:

ROOTSTOCK_RPC_URL=https://rpc.testnet.rootstock.io/{YOUR_APIKEY}
PRIVATE_KEY=0x...
Info
  • Your PRIVATE_KEY has to be formatted correctly, so it has to start with 0x.
  • To obtain a Rootstock Rpc Url, visit the RPC API DASHBOARD, create an account and get your testnet or mainnet rpc url.

At the root of the project, run:

# To load the variables in the .env file
source .env
최종 수정: 작성일: 작성자: Owanate Amachree

이 페이지에서는

피드백