-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: zksync test fixes and get_account func added (#202)
* feat: zksync test fixes and get_account func added * lint: fix
- Loading branch information
1 parent
91fabf1
commit 66a49fb
Showing
6 changed files
with
55 additions
and
18 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,21 @@ | ||
import boa | ||
from boa import Env | ||
|
||
from moccasin.moccasin_account import MoccasinAccount | ||
from tests.constants import ANVIL1_PRIVATE_KEY | ||
|
||
STARTING_ANVIL1_BALANCE = 10000000000000000000000 | ||
|
||
|
||
def test_get_balance_env(anvil_two_no_state, complex_project_config): | ||
network = "anvil-fork" # Not a real fork | ||
complex_project_config.set_active_network(network) | ||
mox_account = MoccasinAccount(private_key=ANVIL1_PRIVATE_KEY) | ||
assert mox_account.get_balance() >= STARTING_ANVIL1_BALANCE | ||
# We should do this more places to make tests more isolated. | ||
boa.set_env(Env()) | ||
|
||
|
||
def test_get_balance_no_env(): | ||
mox_account = MoccasinAccount(private_key=ANVIL1_PRIVATE_KEY) | ||
assert mox_account.get_balance() == 0 |
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