-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
36 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from ape_ethereum.transactions import TransactionType | ||
|
||
from ape_arbitrum.ecosystem import LOCAL_GAS_LIMIT, ArbitrumConfig | ||
|
||
|
||
def test_gas_limit(arbitrum): | ||
# NOTE: The reason we have a hard-coded gas limit is because | ||
# the block gas limit in Arbitrum is extremely high. | ||
assert arbitrum.config.local.gas_limit == LOCAL_GAS_LIMIT | ||
|
||
|
||
def test_default_transaction_type(arbitrum): | ||
assert arbitrum.config.mainnet.default_transaction_type == TransactionType.STATIC | ||
|
||
|
||
def test_mainnet_fork_not_configured(): | ||
obj = ArbitrumConfig.model_validate({}) | ||
assert obj.mainnet_fork.required_confirmations == 0 | ||
|
||
|
||
def test_mainnet_fork_configured(): | ||
data = {"mainnet_fork": {"required_confirmations": 555}} | ||
obj = ArbitrumConfig.model_validate(data) | ||
assert obj.mainnet_fork.required_confirmations == 555 | ||
|
||
|
||
def test_custom_network(): | ||
data = {"apenet": {"required_confirmations": 333}} | ||
obj = ArbitrumConfig.model_validate(data) | ||
assert obj.apenet.required_confirmations == 333 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters