generated from ApeWorX/project-template
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: share and use BaseEthereumConfig (#22)
- Loading branch information
Showing
4 changed files
with
44 additions
and
37 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
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,28 @@ | ||
from ape_ethereum.transactions import TransactionType | ||
|
||
from ape_bsc.ecosystem import BSCConfig | ||
|
||
|
||
def test_gas_limit(bsc): | ||
assert bsc.config.local.gas_limit == "max" | ||
|
||
|
||
def test_default_transaction_type(bsc): | ||
assert bsc.config.mainnet.default_transaction_type == TransactionType.STATIC | ||
|
||
|
||
def test_mainnet_fork_not_configured(): | ||
obj = BSCConfig.model_validate({}) | ||
assert obj.mainnet_fork.required_confirmations == 0 | ||
|
||
|
||
def test_mainnet_fork_configured(): | ||
data = {"mainnet_fork": {"required_confirmations": 555}} | ||
obj = BSCConfig.model_validate(data) | ||
assert obj.mainnet_fork.required_confirmations == 555 | ||
|
||
|
||
def test_custom_network(): | ||
data = {"apenet": {"required_confirmations": 333}} | ||
obj = BSCConfig.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