From d510ba4445f3706c08efe97eb3b25de0c0c3b719 Mon Sep 17 00:00:00 2001 From: NotPeopling2day <32708219+NotPeopling2day@users.noreply.github.com> Date: Mon, 15 Apr 2024 21:31:52 -0400 Subject: [PATCH] refactor!: remove goerli and mumbai (#1993) --- docs/userguides/networks.md | 12 +-- docs/userguides/scripts.md | 6 +- docs/userguides/transactions.md | 106 ++++++++++++------------- tests/integration/cli/test_networks.py | 10 +-- 4 files changed, 67 insertions(+), 67 deletions(-) diff --git a/docs/userguides/networks.md b/docs/userguides/networks.md index a9fc355060..a303607037 100644 --- a/docs/userguides/networks.md +++ b/docs/userguides/networks.md @@ -195,7 +195,7 @@ To add a corresponding entry in `ape-etherscan` (assuming you are using `ape-eth etherscan: ethereum: rate_limit: 15 # Configure a rate limit that makes sense for retry logic. - + # The name of the entry is the same as your custom network! customnetwork: uri: https://custom.scan # URL used for showing transactions @@ -360,9 +360,9 @@ ethereum: # Most networks use 120 seconds (2 minutes). transaction_acceptance_timeout: 60 - # The amount of times to retry fetching a receipt. This is useful - # because decentralized systems may show the transaction accepted - # on some nodes but not on others, and potentially RPC requests + # The amount of times to retry fetching a receipt. This is useful + # because decentralized systems may show the transaction accepted + # on some nodes but not on others, and potentially RPC requests # won't return a receipt immediately after sending its transaction. # This config accounts for such delay. The default is `20`. max_receipt_retries: 10 @@ -371,13 +371,13 @@ ethereum: # estimates gas. Note: local networks tend to use "max" here # by default. gas_limit: auto - + # Base-fee multipliers are useful for times when the base fee changes # before a transaction is sent but after the base fee was derived, # thus causing rejection. A multiplier reduces the chance of # rejection. The default for live networks is `1.4` times the base fee. base_fee_multiplier: 1.2 - + # The block time helps Ape make decisions about # polling chain data. block_time: 10 diff --git a/docs/userguides/scripts.md b/docs/userguides/scripts.md index 17bff861bb..012942dd62 100644 --- a/docs/userguides/scripts.md +++ b/docs/userguides/scripts.md @@ -74,11 +74,11 @@ from ape.cli import ape_cli_context @click.command() @ape_cli_context() -def cli(cli_ctx): +def cli(cli_ctx): # There is no connection yet at this point. testnets = { "ethereum": ["sepolia"], - "polygon": ["mumbai"] + "polygon": ["amoy"] } nm = cli_ctx.network_manager @@ -137,7 +137,7 @@ Without specifying `--network`, the script with connect to your default network. Else, specify the network using the `--network` flag: ```shell -ape run foobar --network polygon:mumbai:alchemy +ape run foobar --network polygon:amoy:alchemy ``` You can also change networks within the script using the `ProviderContextManager` (see examples in the CLI-script section above). diff --git a/docs/userguides/transactions.md b/docs/userguides/transactions.md index 49f30f52fd..7cceb24486 100644 --- a/docs/userguides/transactions.md +++ b/docs/userguides/transactions.md @@ -47,7 +47,7 @@ This will launch an IPython shell: ```python In [1]: dev = accounts.load("dev") -In [2]: token = dev.deploy(project.Token) +In [2]: token = dev.deploy(project.Token) In [3]: token.contract_method_defined_in_contract() ``` @@ -205,58 +205,58 @@ The trace might look something like: ```bash Call trace for '0x43abb1fdadfdae68f84ce8cd2582af6ab02412f686ee2544aa998db662a5ef50' txn.origin=0x1e59ce931B4CFea3fe4B875411e280e173cB7A9C -ContractA.methodWithoutArguments() -> 0x00..7a9c [469604 gas] -├── SYMBOL.supercluster(x=234444) -> [ -│ [23523523235235, 11111111111, 234444], -│ [ -│ 345345347789999991, -│ 99999998888882, -│ 345457847457457458457457457 -│ ], -│ [234444, 92222229999998888882, 3454], -│ [ -│ 111145345347789999991, -│ 333399998888882, -│ 234545457847457457458457457457 -│ ] -│ ] [461506 gas] -├── SYMBOL.methodB1(lolol="ice-cream", dynamo=345457847457457458457457457) [402067 gas] -│ ├── ContractC.getSomeList() -> [ -│ │ 3425311345134513461345134534531452345, -│ │ 111344445534535353, -│ │ 993453434534534534534977788884443333 -│ │ ] [370103 gas] -│ └── ContractC.methodC1( -│ windows95="simpler", -│ jamaica=345457847457457458457457457, -│ cardinal=ContractA -│ ) [363869 gas] -├── SYMBOL.callMe(blue=tx.origin) -> tx.origin [233432 gas] -├── SYMBOL.methodB2(trombone=tx.origin) [231951 gas] -│ ├── ContractC.paperwork(ContractA) -> ( -│ │ os="simpler", -│ │ country=345457847457457458457457457, -│ │ wings=ContractA -│ │ ) [227360 gas] -│ ├── ContractC.methodC1(windows95="simpler", jamaica=0, cardinal=ContractC) [222263 gas] -│ ├── ContractC.methodC2() [147236 gas] -│ └── ContractC.methodC2() [122016 gas] -├── ContractC.addressToValue(tx.origin) -> 0 [100305 gas] -├── SYMBOL.bandPractice(tx.origin) -> 0 [94270 gas] -├── SYMBOL.methodB1(lolol="lemondrop", dynamo=0) [92321 gas] -│ ├── ContractC.getSomeList() -> [ -│ │ 3425311345134513461345134534531452345, -│ │ 111344445534535353, -│ │ 993453434534534534534977788884443333 -│ │ ] [86501 gas] -│ └── ContractC.methodC1(windows95="simpler", jamaica=0, cardinal=ContractA) [82729 gas] -└── SYMBOL.methodB1(lolol="snitches_get_stiches", dynamo=111) [55252 gas] - ├── ContractC.getSomeList() -> [ - │ 3425311345134513461345134534531452345, - │ 111344445534535353, - │ 993453434534534534534977788884443333 - │ ] [52079 gas] - └── ContractC.methodC1(windows95="simpler", jamaica=111, cardinal=ContractA) [48306 gas] +ContractA.methodWithoutArguments() -> 0x00..7a9c [469604 gas] +├── SYMBOL.supercluster(x=234444) -> [ +│ [23523523235235, 11111111111, 234444], +│ [ +│ 345345347789999991, +│ 99999998888882, +│ 345457847457457458457457457 +│ ], +│ [234444, 92222229999998888882, 3454], +│ [ +│ 111145345347789999991, +│ 333399998888882, +│ 234545457847457457458457457457 +│ ] +│ ] [461506 gas] +├── SYMBOL.methodB1(lolol="ice-cream", dynamo=345457847457457458457457457) [402067 gas] +│ ├── ContractC.getSomeList() -> [ +│ │ 3425311345134513461345134534531452345, +│ │ 111344445534535353, +│ │ 993453434534534534534977788884443333 +│ │ ] [370103 gas] +│ └── ContractC.methodC1( +│ windows95="simpler", +│ jamaica=345457847457457458457457457, +│ cardinal=ContractA +│ ) [363869 gas] +├── SYMBOL.callMe(blue=tx.origin) -> tx.origin [233432 gas] +├── SYMBOL.methodB2(trombone=tx.origin) [231951 gas] +│ ├── ContractC.paperwork(ContractA) -> ( +│ │ os="simpler", +│ │ country=345457847457457458457457457, +│ │ wings=ContractA +│ │ ) [227360 gas] +│ ├── ContractC.methodC1(windows95="simpler", jamaica=0, cardinal=ContractC) [222263 gas] +│ ├── ContractC.methodC2() [147236 gas] +│ └── ContractC.methodC2() [122016 gas] +├── ContractC.addressToValue(tx.origin) -> 0 [100305 gas] +├── SYMBOL.bandPractice(tx.origin) -> 0 [94270 gas] +├── SYMBOL.methodB1(lolol="lemondrop", dynamo=0) [92321 gas] +│ ├── ContractC.getSomeList() -> [ +│ │ 3425311345134513461345134534531452345, +│ │ 111344445534535353, +│ │ 993453434534534534534977788884443333 +│ │ ] [86501 gas] +│ └── ContractC.methodC1(windows95="simpler", jamaica=0, cardinal=ContractA) [82729 gas] +└── SYMBOL.methodB1(lolol="snitches_get_stiches", dynamo=111) [55252 gas] + ├── ContractC.getSomeList() -> [ + │ 3425311345134513461345134534531452345, + │ 111344445534535353, + │ 993453434534534534534977788884443333 + │ ] [52079 gas] + └── ContractC.methodC1(windows95="simpler", jamaica=111, cardinal=ContractA) [48306 gas] ``` Additionally, you can view the traces of other transactions on your network. diff --git a/tests/integration/cli/test_networks.py b/tests/integration/cli/test_networks.py index fcf02689cd..a1f6c0da87 100644 --- a/tests/integration/cli/test_networks.py +++ b/tests/integration/cli/test_networks.py @@ -39,11 +39,11 @@ """ _GETH_NETWORKS_TREE = """ ethereum (default) -├── sepolia -│ └── geth (default) ├── local (default) │ └── geth (default) -└── mainnet +├── mainnet +│ └── geth (default) +└── sepolia └── geth (default) """ _TEST_PROVIDER_TREE_OUTPUT = """ @@ -62,11 +62,11 @@ │ └── geth (default) ├── apenet1 │ └── geth (default) -├── sepolia +├── mainnet │ └── geth (default) ├── local (default) │ └── geth (default) -└── mainnet +└── sepolia └── geth (default) """