generated from ApeWorX/project-template
-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: share BaseEthereumConfig class (#24)
- Loading branch information
Showing
4 changed files
with
48 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
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_fantom.ecosystem import FantomConfig | ||
|
||
|
||
def test_gas_limit(fantom): | ||
assert fantom.config.local.gas_limit == "max" | ||
|
||
|
||
def test_default_transaction_type(fantom): | ||
assert fantom.config.opera.default_transaction_type == TransactionType.DYNAMIC | ||
|
||
|
||
def test_opera_fork_not_configured(): | ||
obj = FantomConfig.model_validate({}) | ||
assert obj.opera_fork.required_confirmations == 0 | ||
|
||
|
||
def test_opera_fork_configured(): | ||
data = {"opera_fork": {"required_confirmations": 555}} | ||
obj = FantomConfig.model_validate(data) | ||
assert obj.opera_fork.required_confirmations == 555 | ||
|
||
|
||
def test_custom_network(): | ||
data = {"apenet": {"required_confirmations": 333}} | ||
obj = FantomConfig.model_validate(data) | ||
assert obj.apenet.required_confirmations == 333 |