शुरू करने से पहले
- एक Tenderly access key। इसे अपने shell में
TENDERLY_ACCESS_KEYके रूप में export करें। - आपके account और project slugs, जो आपके Tenderly Dashboard के URL में उपलब्ध हैं।
एक single-network Virtual Environment बनाएं
RESPONSE=$(curl --request POST \
--url https://api.tenderly.co/api/v1/account/me/project/project/vnets \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Access-Key: ${TENDERLY_ACCESS_KEY}" \
--data '{
"slug": "my-staging-testnet-25",
"display_name": "My Staging TestNet",
"fork_config": { "network_id": 1, "block_number": "latest" },
"virtual_network_config": { "chain_config": { "chain_id": 73571 } },
"sync_state_config": { "enabled": false, "commitment_level": "latest" },
"explorer_page_config": { "enabled": false, "verification_visibility": "bytecode" }
}')
response पर
rpcs array में Admin और Public RPC URLs होते हैं। अपनी बाकी script के लिए Admin RPC को बाहर निकालें:एक Multichain Virtual Environment बनाएं
एक Multichain Virtual Environmentmultivnets endpoint के माध्यम से एक ही call में बनाया जाता है। कॉल में सभी networks एक stack_id के तहत समूहीकृत होते हैं, जो उनके बीच cross-chain bridging संभव बनाता है।
multivnet-create.sh
vnets array में प्रत्येक entry Multichain Virtual Environment के अंदर एक network बनाता है। response एक stack_id और Virtual Environment objects का एक array लौटाता है, जिनमें से प्रत्येक के अपने RPC endpoints होते हैं।
Field-by-field schema के लिए REST API reference देखें।
अगले कदम
- प्रति pull request Virtual Environments प्रोविज़न करने के लिए Foundry के साथ GitHub Actions सेट करें या Hardhat।
- अभी-अभी बनाए गए Virtual Environment पर Stage contracts।
- पूर्ण REST API reference ब्राउज़ करें।