-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathverify.sh
More file actions
24 lines (20 loc) · 752 Bytes
/
verify.sh
File metadata and controls
24 lines (20 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
# 加载环境变量
source .env
# 验证实现合约
forge verify-contract \
--rpc-url "https://testnet-rpc.monad.xyz" \
--verifier sourcify \
--verifier-url "https://sourcify-api-monad.blockvision.org" \
$IMPLEMENTATION_ADDRESS \
src/RedPacketImpl.sol:RedPacketImpl
# 生成构造函数参数
INIT_DATA=$(cast calldata "initialize(address)" $ADMIN_ADDRESS)
# 验证代理合约
forge verify-contract \
--rpc-url "https://testnet-rpc.monad.xyz" \
--verifier sourcify \
--verifier-url "https://sourcify-api-monad.blockvision.org" \
$PROXY_ADDRESS \
src/RedPacketProxy.sol:RedPacketProxy \
--constructor-args $(cast abi-encode "constructor(address,bytes)" $IMPLEMENTATION_ADDRESS $INIT_DATA)