Skip to content

Commit 7f13fa8

Browse files
committed
deployment work on local anvil node
1 parent df83149 commit 7f13fa8

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

target_chains/ethereum/contracts/.env.test

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# =============================================================================
22
# FOUNDRY TEST CONFIGURATION
3-
# This file contains test values for local development and testing
43
# =============================================================================
54

6-
# Deployment Configuration (Anvil/Local Testing)
5+
# Deployment Configuration
76
PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
87
RPC_URL=http://localhost:8545
98
ETHERSCAN_API_KEY=test_api_key_not_needed_for_local

target_chains/ethereum/contracts/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ cp .env.test .env
5757
# Start a local node
5858
anvil
5959

60+
# Anvil shows a list of default accounts and their corresponding private keys.
61+
# Fetch any one of the private key from the anvil terminal and update in .env file.
62+
6063
# In another terminal, deploy the contracts
6164
npm run deploy-local
6265
```
@@ -80,6 +83,13 @@ The deployment script will:
8083
- Deploy the Pyth contracts (PythUpgradable with ERC1967 proxy)
8184
- Configure all necessary parameters from environment variables
8285

86+
5. Deploy and Verify the contracts (on live network)
87+
88+
```bash
89+
# Make sure your .env file has the correct ETHERSCAN_API_KEY
90+
npm run deploy-and-verify
91+
```
92+
8393
### Guardian Set Sync
8494

8595
After deploying Wormhole contracts on mainnet, you need to sync the guardian sets to match the current mainnet state:

target_chains/ethereum/contracts/foundry.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ rpc_url="${RPC_URL}"
2525
local = "http://localhost:8545"
2626

2727
[etherscan]
28-
base_sepolia = { key = "${ETHERSCAN_API_KEY}" }
28+
etherscan_api_key = { key = "${ETHERSCAN_API_KEY}" }

target_chains/ethereum/contracts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"test": "forge test",
1818
"deploy": "forge script script/Deploy.s.sol --rpc-url rpc_url --broadcast",
1919
"deploy-and-verify": "forge script script/Deploy.s.sol --rpc-url rpc_url --broadcast --verify",
20-
"deploy-local": "forge script script/Deploy.s.sol --rpc-url http://127.0.0.1:8545 --broadcast",
20+
"deploy-local": "ETHERSCAN_API_KEY= forge script script/Deploy.s.sol --rpc-url local --broadcast",
2121
"receiver-submit-guardian-sets": "forge script script/ReceiverSubmitGuardianSetUpgrades.s.sol --rpc-url $RPC_URL --broadcast",
2222
"create-governance-vaa": "forge script script/CreateLocalnetGovernanceVaa.s.sol",
2323
"install-forge-deps": "forge install foundry-rs/[email protected] --no-git",

0 commit comments

Comments
 (0)