Update grant availability script to use taco network philosophy and no longer specify l2 network since it is now implied.

pull/3262/head
derekpierre 2023-10-02 12:12:44 -04:00
parent 55c6e6a971
commit 1d8c05bb33
1 changed files with 6 additions and 5 deletions

View File

@ -22,6 +22,7 @@ from nucypher_core.umbral import SecretKey
from web3 import Web3 from web3 import Web3
from web3.types import Wei from web3.types import Wei
from nucypher.blockchain.eth.networks import NetworksInventory
from nucypher.blockchain.eth.signers import Signer from nucypher.blockchain.eth.signers import Signer
from nucypher.characters.lawful import Alice, Bob, Ursula from nucypher.characters.lawful import Alice, Bob, Ursula
from nucypher.config.characters import AliceConfiguration from nucypher.config.characters import AliceConfiguration
@ -53,9 +54,9 @@ except KeyError:
raise RuntimeError(message) raise RuntimeError(message)
# Alice Configuration # Alice Configuration
DOMAIN: str = 'mainnet' # tapir TACO_NETWORK: str = NetworksInventory.LYNX.name # mainnet
DEFAULT_SEEDNODE_URIS: List[str] = [ DEFAULT_SEEDNODE_URIS: List[str] = [
*TEACHER_NODES[DOMAIN], *TEACHER_NODES[TACO_NETWORK],
] ]
INSECURE_PASSWORD: str = "METRICS_INSECURE_DEVELOPMENT_PASSWORD" INSECURE_PASSWORD: str = "METRICS_INSECURE_DEVELOPMENT_PASSWORD"
TEMP_ALICE_DIR: Path = Path('/', 'tmp', 'grant-metrics') TEMP_ALICE_DIR: Path = Path('/', 'tmp', 'grant-metrics')
@ -154,8 +155,7 @@ def make_alice(known_nodes: Optional[Set[Ursula]] = None):
# This is Alice's PRE payment method. # This is Alice's PRE payment method.
pre_payment_method = SubscriptionManagerPayment( pre_payment_method = SubscriptionManagerPayment(
network='polygon', network=TACO_NETWORK, blockchain_endpoint=POLYGON_PROVIDER_URI
eth_provider=POLYGON_PROVIDER_URI
) )
wallet = Signer.from_signer_uri(f'keystore://{SIGNER_URI}') wallet = Signer.from_signer_uri(f'keystore://{SIGNER_URI}')
@ -163,10 +163,11 @@ def make_alice(known_nodes: Optional[Set[Ursula]] = None):
alice_config = AliceConfiguration( alice_config = AliceConfiguration(
eth_endpoint=ETHEREUM_PROVIDER_URI, eth_endpoint=ETHEREUM_PROVIDER_URI,
polygon_endpoint=POLYGON_PROVIDER_URI,
checksum_address=ALICE_ADDRESS, checksum_address=ALICE_ADDRESS,
signer_uri=f'keystore://{SIGNER_URI}', signer_uri=f'keystore://{SIGNER_URI}',
config_root=TEMP_ALICE_DIR, config_root=TEMP_ALICE_DIR,
domain=DOMAIN, domain=TACO_NETWORK,
known_nodes=known_nodes, known_nodes=known_nodes,
start_learning_now=False, start_learning_now=False,
learn_on_same_thread=True, learn_on_same_thread=True,