Skip to content

Commit

Permalink
RPC_BASE and RPC_AVAX proper description and default
Browse files Browse the repository at this point in the history
  • Loading branch information
olethanh committed Sep 3, 2024
1 parent 12c357a commit 0ffa329
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/aleph/vm/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,14 +228,15 @@ class Settings(BaseSettings):
# This address is the ALEPH SuperToken on SuperFluid Testnet
PAYMENT_PRICING_AGGREGATE: str = "" # TODO: Missing

# Use to check PAYG payment
RPC_AVAX: HttpUrl = Field(
default=None,
description="Replace chain RPC for AVAX",
default=STREAM_CHAINS[Chain.AVAX].rpc,
description="RPC API Endpoint for AVAX chain",
)

RPC_BASE: HttpUrl = Field(
default=None,
description="Replace chain RPC for BASE",
default=STREAM_CHAINS[Chain.BASE].rpc,
description="RPC API Endpoint for BASE chain",
)

PAYMENT_BUFFER: Decimal = Field(
Expand Down Expand Up @@ -399,10 +400,8 @@ def setup(self):
"""Setup the environment defined by the settings. Call this method after loading the settings."""

# Update chain RPC
if self.RPC_BASE is not None:
STREAM_CHAINS[Chain.BASE].rpc = str(self.RPC_BASE)
if self.RPC_AVAX is not None:
STREAM_CHAINS[Chain.AVAX].rpc = str(self.RPC_AVAX)
STREAM_CHAINS[Chain.AVAX].rpc = str(self.RPC_AVAX)
STREAM_CHAINS[Chain.BASE].rpc = str(self.RPC_BASE)

logger.info(STREAM_CHAINS)

Expand Down

0 comments on commit 0ffa329

Please sign in to comment.