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