Skip to content

Commit 35de4d7

Browse files
committed
fix: use free valory RPC
1 parent 645cc1d commit 35de4d7

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

operate/ledger/__init__.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,13 @@
2828
from operate.types import ChainType, LedgerType
2929

3030

31-
ETHEREUM_PUBLIC_RPC = "https://ethereum.publicnode.com"
32-
GNOSIS_PUBLIC_RPC = "https://gnosis-rpc.publicnode.com"
33-
GOERLI_PUBLIC_RPC = "https://ethereum-goerli.publicnode.com"
34-
SOLANA_PUBLIC_RPC = "https://api.mainnet-beta.solana.com"
31+
ETHEREUM_PUBLIC_RPC = os.environ.get("DEV_RPC", "https://ethereum.publicnode.com")
32+
GNOSIS_PUBLIC_RPC = os.environ.get("DEV_RPC", "https://gnosis-rpc.publicnode.com")
33+
GOERLI_PUBLIC_RPC = os.environ.get("DEV_RPC", "https://ethereum-goerli.publicnode.com")
34+
SOLANA_PUBLIC_RPC = os.environ.get("DEV_RPC", "https://api.mainnet-beta.solana.com")
3535

3636
ETHEREUM_RPC = os.environ.get("DEV_RPC", "https://ethereum.publicnode.com")
37-
GNOSIS_RPC = os.environ.get(
38-
"DEV_RPC", "https://go.getblock.io/2a1fa1ade5d547ca86eab099c35ce2a7"
39-
)
37+
GNOSIS_RPC = os.environ.get("DEV_RPC", "https://rpc-gate.autonolas.tech/gnosis-rpc/")
4038
GOERLI_RPC = os.environ.get("DEV_RPC", "https://ethereum-goerli.publicnode.com")
4139
SOLANA_RPC = os.environ.get("DEV_RPC", "https://api.mainnet-beta.solana.com")
4240

scripts/fund.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@
1111

1212
load_dotenv()
1313

14+
RPC = os.environ.get("DEV_RPC", "http://localhost:8545")
15+
1416
OLAS_CONTRACT_ADDRESS_GNOSIS = "0xcE11e14225575945b8E6Dc0D4F2dD4C570f79d9f"
1517

1618

1719
def fund(address: str, amount: float = 10.0) -> None:
1820
"""Fund an address."""
1921
staking_keys_path = os.environ.get("STAKING_TEST_KEYS_PATH", None)
20-
ledger_api = EthereumApi(address="http://localhost:8545")
22+
ledger_api = EthereumApi(address=RPC)
2123
crypto = EthereumCrypto("scripts/keys/gnosis.txt")
2224
tx = ledger_api.get_transfer_transaction(
2325
sender_address=crypto.address,

scripts/transfer_olas.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,22 @@
99
"""
1010

1111
import json
12+
import os
1213
import sys
1314
from pathlib import Path
1415

1516
from aea_ledger_ethereum.ethereum import EthereumApi, EthereumCrypto
1617

1718

19+
RPC = os.environ.get("DEV_RPC", "http://localhost:8545")
1820
OLAS_CONTRACT_ADDRESS_GNOSIS = "0xcE11e14225575945b8E6Dc0D4F2dD4C570f79d9f"
1921
WEI_MULTIPLIER = 1e18
2022

2123

2224
def fund(wallet: str, address: str, amount: float = 20.0) -> None:
2325
"""Fund wallet with OLAS token"""
2426
staking_wallet = EthereumCrypto(wallet)
25-
ledger_api = EthereumApi(address="http://localhost:8545")
27+
ledger_api = EthereumApi(address=RPC)
2628
olas_contract = ledger_api.api.eth.contract(
2729
address=ledger_api.api.to_checksum_address(OLAS_CONTRACT_ADDRESS_GNOSIS),
2830
abi=json.loads(

0 commit comments

Comments
 (0)