File tree 3 files changed +11
-9
lines changed
3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 28
28
from operate .types import ChainType , LedgerType
29
29
30
30
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")
35
35
36
36
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/" )
40
38
GOERLI_RPC = os .environ .get ("DEV_RPC" , "https://ethereum-goerli.publicnode.com" )
41
39
SOLANA_RPC = os .environ .get ("DEV_RPC" , "https://api.mainnet-beta.solana.com" )
42
40
Original file line number Diff line number Diff line change 11
11
12
12
load_dotenv ()
13
13
14
+ RPC = os .environ .get ("DEV_RPC" , "http://localhost:8545" )
15
+
14
16
OLAS_CONTRACT_ADDRESS_GNOSIS = "0xcE11e14225575945b8E6Dc0D4F2dD4C570f79d9f"
15
17
16
18
17
19
def fund (address : str , amount : float = 10.0 ) -> None :
18
20
"""Fund an address."""
19
21
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 )
21
23
crypto = EthereumCrypto ("scripts/keys/gnosis.txt" )
22
24
tx = ledger_api .get_transfer_transaction (
23
25
sender_address = crypto .address ,
Original file line number Diff line number Diff line change 9
9
"""
10
10
11
11
import json
12
+ import os
12
13
import sys
13
14
from pathlib import Path
14
15
15
16
from aea_ledger_ethereum .ethereum import EthereumApi , EthereumCrypto
16
17
17
18
19
+ RPC = os .environ .get ("DEV_RPC" , "http://localhost:8545" )
18
20
OLAS_CONTRACT_ADDRESS_GNOSIS = "0xcE11e14225575945b8E6Dc0D4F2dD4C570f79d9f"
19
21
WEI_MULTIPLIER = 1e18
20
22
21
23
22
24
def fund (wallet : str , address : str , amount : float = 20.0 ) -> None :
23
25
"""Fund wallet with OLAS token"""
24
26
staking_wallet = EthereumCrypto (wallet )
25
- ledger_api = EthereumApi (address = "http://localhost:8545" )
27
+ ledger_api = EthereumApi (address = RPC )
26
28
olas_contract = ledger_api .api .eth .contract (
27
29
address = ledger_api .api .to_checksum_address (OLAS_CONTRACT_ADDRESS_GNOSIS ),
28
30
abi = json .loads (
You can’t perform that action at this time.
0 commit comments