Skip to content

Commit fe1efac

Browse files
committed
Drop locals()
1 parent 4788e1d commit fe1efac

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

.env.example

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# To modify src/aleph/src/conf.py, create a .env file and add:
22
# ALEPH_<KEY>=<VALUE>
3-
# To modify allowed CHAINS, follow this example:
4-
# ALEPH_CHAINS_SEPOLIA_ACTIVE=True
3+
# To modify active & rpc fields in CHAINS, follow this example:
4+
# ALEPH_CHAINS_SEPOLIA_ACTIVE=True
5+
# ALEPH_CHAINS_SEPOLIA_RPC=https://...

src/aleph/sdk/conf.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,16 @@ class Settings(BaseSettings):
115115
),
116116
}
117117
# Add all placeholders to allow easy dynamic setup of CHAINS
118-
locals().update(
119-
{
120-
f"CHAINS_{chain.upper() if isinstance(chain, str) else Chain(chain).value}_{key.upper()}": (
121-
value if value is not None else ""
122-
)
123-
for chain, info in CHAINS.items()
124-
for key, value in info
125-
}
126-
)
118+
CHAINS_SEPOLIA_ACTIVE: Optional[bool]
119+
CHAINS_ETH_ACTIVE: Optional[bool]
120+
CHAINS_AVAX_ACTIVE: Optional[bool]
121+
CHAINS_BASE_ACTIVE: Optional[bool]
122+
CHAINS_BSC_ACTIVE: Optional[bool]
123+
CHAINS_SEPOLIA_RPC: Optional[str]
124+
CHAINS_ETH_RPC: Optional[str]
125+
CHAINS_AVAX_RPC: Optional[str]
126+
CHAINS_BASE_RPC: Optional[str]
127+
CHAINS_BSC_RPC: Optional[str]
127128

128129
# Dns resolver
129130
DNS_IPFS_DOMAIN = "ipfs.public.aleph.sh"

0 commit comments

Comments
 (0)