-
Notifications
You must be signed in to change notification settings - Fork 1
/
post-deploy.sh
26 lines (22 loc) · 1.77 KB
/
post-deploy.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
WALLETS_FILE=$1
NETWORK=$2
echo "Granting RESOLUTION_ROLE on ResolutionManager"
cat $WALLETS_FILE | xargs -n1 -IWALLET npx hardhat grant-role --contract ResolutionManager --role RESOLUTION_ROLE --account WALLET --network $NETWORK
echo "Granting RESOLUTION_ROLE on ShareholderRegistry"
cat $WALLETS_FILE | xargs -n1 -IWALLET npx hardhat grant-role --contract ShareholderRegistry --role RESOLUTION_ROLE --account WALLET --network $NETWORK
echo "Granting RESOLUTION_ROLE on GovernanceToken"
cat $WALLETS_FILE | xargs -n1 -IWALLET npx hardhat grant-role --contract GovernanceToken --role RESOLUTION_ROLE --account WALLET --network $NETWORK
echo "Granting OPERATOR_ROLE on ResolutionManager"
cat $WALLETS_FILE | xargs -n1 -IWALLET npx hardhat grant-role --contract ResolutionManager --role OPERATOR_ROLE --account WALLET --network $NETWORK
echo "Granting OPERATOR_ROLE on ShareholderRegistry"
cat $WALLETS_FILE | xargs -n1 -IWALLET npx hardhat grant-role --contract ShareholderRegistry --role OPERATOR_ROLE --account WALLET --network $NETWORK
echo "Granting OPERATOR_ROLE on GovernanceToken"
cat $WALLETS_FILE | xargs -n1 -IWALLET npx hardhat grant-role --contract GovernanceToken --role OPERATOR_ROLE --account WALLET --network $NETWORK
echo "Granting ESCROW_ROLE on GovernanceToken"
cat $WALLETS_FILE | xargs -n1 -IWALLET npx hardhat grant-role --contract GovernanceToken --role ESCROW_ROLE --account WALLET --network $NETWORK
echo "Minting shares"
cat $WALLETS_FILE | xargs -n1 -IWALLET npx hardhat mint-share WALLET --network $NETWORK
echo "Setting MANAGING_BOARD status"
cat $WALLETS_FILE | xargs -n1 -IWALLET npx hardhat set --account WALLET --status managing_board --network $NETWORK
echo "Minting tokens"
cat $WALLETS_FILE | xargs -n1 -IWALLET npx hardhat mint --account WALLET --amount 42 --network $NETWORK