-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeploy-testnet.sh
executable file
·54 lines (47 loc) · 1.27 KB
/
deploy-testnet.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
testnet() {
. .env.testnet.local
local script=$1
if [ -z "$ADDRESS_DEPLOYER" ]; then
echo "Missing ADDRESS_DEPLOYER"
exit 1
fi
if [ -z "$ALCHEMY_API_KEY" ]; then
echo "Missing ALCHEMY_API_KEY"
exit 1
fi
local RPC_URL="https://eth-sepolia.g.alchemy.com/v2/$ALCHEMY_API_KEY"
forge script "$script" \
-vvvv \
--rpc-url "$RPC_URL" \
--optimize \
--optimizer-runs 1000 \
--gas-estimate-multiplier 150 \
--chain sepolia \
--verify \
--legacy \
--sender "$ADDRESS_DEPLOYER" \
--interactives 1 \
--broadcast
}
case $1 in
all)
testnet script/DeployAllTestnet.s.sol:DeployTestnetScript
;;
auctions)
testnet script/EnsAuctions/DeployTestnet.s.sol:DeployEnsAuctionsTestnetScript
;;
fee-calculator)
testnet script/DynamicFeeCalculator/Deploy.s.sol:DeployDynamicFeeCalculatorScript
;;
drops)
testnet script/EnsAuctionDrops/Deploy.s.sol:DeployEnsAuctionDropsScript
;;
airdrop)
testnet script/EnsAuctionDrops/Airdrop.s.sol:AirdropScript
;;
*)
echo "Usage: $0 {all|auctions|fee-calculator|drops|airdrop}"
exit 1
esac
exit 0