-
Notifications
You must be signed in to change notification settings - Fork 28
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
1 parent
e348aa7
commit 1a9c440
Showing
2 changed files
with
98 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
from typing import Optional, Type | ||
|
||
class CfgEnv: | ||
def __new__(cls: Type["CfgEnv"]) -> "CfgEnv": ... | ||
|
||
class BlockEnv: | ||
def __new__( | ||
cls: Type["BlockEnv"], | ||
number: Optional[int] = None, | ||
coinbase: Optional[str] = None, | ||
timestamp: Optional[int] = None, | ||
difficulty: Optional[int] = None, | ||
basefee: Optional[int] = None, | ||
gas_limit: Optional[int] = None, | ||
) -> "BlockEnv": ... | ||
|
||
class TxEnv: | ||
def __new__( | ||
cls: Type["TxEnv"], | ||
caller: Optional[str] = None, | ||
gas_limit: Optional[int] = None, | ||
gas_price: Optional[int] = None, | ||
gas_priority_fee: Optional[int] = None, | ||
to: Optional[str] = None, | ||
value: Optional[int] = None, | ||
data: Optional[list[int]] = None, | ||
chain_id: Optional[int] = None, | ||
nonce: Optional[int] = None, | ||
) -> "TxEnv": ... | ||
|
||
class Env: | ||
def __new__( | ||
cls: Type["Env"], | ||
cfg: Optional[CfgEnv] = None, | ||
block: Optional[BlockEnv] = None, | ||
tx: Optional[TxEnv] = None, | ||
) -> "Env": ... | ||
|
||
class AccountInfo: | ||
@property | ||
def balance(self: "AccountInfo") -> int: ... | ||
@property | ||
def nonce(self: "AccountInfo") -> int: ... | ||
@property | ||
def code(self: "AccountInfo") -> list[int]: ... | ||
@property | ||
def code_hash(self: "AccountInfo") -> list[int]: ... | ||
def __new__( | ||
cls: Type["AccountInfo"], | ||
nonce: int, | ||
code_hash: Optional[bytes] = None, | ||
code: Optional[bytes] = None, | ||
) -> "AccountInfo": ... | ||
|
||
class EvmOpts: | ||
env: Env | ||
fork_url: Optional[str] | ||
fork_block_number: Optional[int] | ||
gas_limit: int | ||
tracing: bool | ||
def __new__( | ||
cls: Type["EvmOpts"], | ||
env: Optional[Env], | ||
fork_url: Optional[str], | ||
) -> "EvmOpts": ... | ||
|
||
class EVM: | ||
def __new__( | ||
cls: Type["EVM"], | ||
env: Optional[Env] = None, | ||
fork_url: Optional[str] = None, | ||
fork_block_number: Optional[int] = None, | ||
gas_limit: int = 18446744073709551615, | ||
tracing: bool = False, | ||
) -> "EVM": ... | ||
def basic(self: "EVM", address: str) -> Optional[AccountInfo]: ... | ||
def insert_account_info(self: "EVM", address: str, info: AccountInfo) -> None: ... | ||
def call_raw_committing( | ||
self: "EVM", | ||
caller: str, | ||
to: str, | ||
value: Optional[int] = None, | ||
data: Optional[list[int]] = None, | ||
) -> None: ... |
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