Skip to content

Commit

Permalink
Add shebang in tasks.subnet-genesis-set-eam-permissions script (#847)
Browse files Browse the repository at this point in the history
Co-authored-by: raulk <[email protected]>
  • Loading branch information
mb1896 and raulk authored Apr 1, 2024
1 parent 147180c commit c1f5350
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion infra/fendermint/Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ TOPDOWN_MAX_PROPOSAL_RANGE = { value = "100", condition = { env_not_set = [
BOOTSTRAPS = { value = "", condition = { env_not_set = ["BOOTSTRAPS"] } }
# Comma-separate list of addresses that's allowed to deploy contracts to this subnet.
# No restrictions to deploy contracts if not set or empty.
ALLOWED_ADDR_LIST = { value = "", condition = { env_not_set = ["ALLOWED_ADDR_LIST"] } }
EAM_ALLOWED_ADDR_LIST = { value = "", condition = { env_not_set = ["EAM_ALLOWED_ADDR_LIST"] } }

# Comma-separated list of multiaddresses for the IPLD resolver to connect to.
# This should have the form of "/ip4/198.51.100.2/tcp/26655/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb"
Expand Down
7 changes: 4 additions & 3 deletions infra/fendermint/scripts/subnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,10 @@ env = { "CMD" = "genesis --genesis-file /data/genesis.json ipc from-parent --sub
[tasks.subnet-genesis-set-eam-permissions]
extend = "fendermint-tool"
script.pre = """
if [[ ! -z ${ALLOWED_ADDR_LIST} ]]; then
echo "ALLOWED_ADDR_LIST=${ALLOWED_ADDR_LIST}"
CMD="genesis --genesis-file /data/genesis.json set-eam-permissions --mode allowlist --addresses ${ALLOWED_ADDR_LIST}"
#!/bin/bash
if [[ ! -z ${EAM_ALLOWED_ADDR_LIST} ]]; then
echo "EAM_ALLOWED_ADDR_LIST=${EAM_ALLOWED_ADDR_LIST}"
CMD="genesis --genesis-file /data/genesis.json set-eam-permissions --mode allowlist --addresses ${EAM_ALLOWED_ADDR_LIST}"
else
CMD="genesis --genesis-file /data/genesis.json set-eam-permissions --mode unrestricted"
fi
Expand Down

0 comments on commit c1f5350

Please sign in to comment.