-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Hack revm/non-revm testing imports based on config
- Loading branch information
Showing
3 changed files
with
75 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,68 @@ | ||
from rich import print | ||
|
||
from wake.development.core import Abi, Account, Address, Eip712Domain, Wei, abi | ||
from wake.development.globals import random | ||
from wake.development.internal import UnknownEvent | ||
from wake.development.primitive_types import * | ||
from wake.development.transactions import ( | ||
Eip1559Transaction, | ||
Eip2930Transaction, | ||
Error, | ||
LegacyTransaction, | ||
Panic, | ||
PanicCodeEnum, | ||
TransactionAbc, | ||
TransactionRevertedError, | ||
UnknownTransactionRevertedError, | ||
may_revert, | ||
must_revert, | ||
on_revert, | ||
) | ||
from wake.development.utils import ( | ||
burn_erc20, | ||
get_create2_address_from_code, | ||
get_create2_address_from_hash, | ||
get_create_address, | ||
get_logic_contract, | ||
keccak256, | ||
mint_erc20, | ||
read_storage_variable, | ||
write_storage_variable, | ||
) | ||
from wake.development.globals import random, get_config | ||
|
||
from .core import Chain, default_chain | ||
if get_config().testing.cmd == "revm": | ||
from wake_rs import Abi, Account, Address, abi, keccak256, Chain, default_chain | ||
from wake.development.core import Eip712Domain, Wei # TODO | ||
from wake.development.internal import UnknownEvent | ||
from wake.development.primitive_types import * | ||
from wake.development.transactions import ( | ||
Eip1559Transaction, | ||
Eip2930Transaction, | ||
Error, | ||
LegacyTransaction, | ||
Panic, | ||
PanicCodeEnum, | ||
TransactionAbc, | ||
TransactionRevertedError, | ||
UnknownTransactionRevertedError, | ||
may_revert, | ||
must_revert, | ||
on_revert, | ||
) | ||
from wake.development.utils import ( | ||
burn_erc20, | ||
get_create2_address_from_code, | ||
get_create2_address_from_hash, | ||
get_create_address, | ||
get_logic_contract, | ||
mint_erc20, | ||
read_storage_variable, | ||
write_storage_variable, | ||
) | ||
|
||
chain = default_chain | ||
chain = default_chain() | ||
else: | ||
from wake.development.core import Abi, Account, Address, Eip712Domain, Wei, abi | ||
from wake.development.internal import UnknownEvent | ||
from wake.development.primitive_types import * | ||
from wake.development.transactions import ( | ||
Eip1559Transaction, | ||
Eip2930Transaction, | ||
Error, | ||
LegacyTransaction, | ||
Panic, | ||
PanicCodeEnum, | ||
TransactionAbc, | ||
TransactionRevertedError, | ||
UnknownTransactionRevertedError, | ||
may_revert, | ||
must_revert, | ||
on_revert, | ||
) | ||
from wake.development.utils import ( | ||
burn_erc20, | ||
get_create2_address_from_code, | ||
get_create2_address_from_hash, | ||
get_create_address, | ||
get_logic_contract, | ||
keccak256, | ||
mint_erc20, | ||
read_storage_variable, | ||
write_storage_variable, | ||
) | ||
|
||
from .core import Chain, default_chain | ||
|
||
chain = default_chain |
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