recon-generate 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,936 @@
|
|
|
1
|
+
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import dataclasses
|
|
5
|
+
from typing import List, Dict, Optional, overload, Union, Callable, Tuple
|
|
6
|
+
from typing_extensions import Literal
|
|
7
|
+
|
|
8
|
+
from wake.development.core import Contract, Library, Address, Account, Chain, RequestType
|
|
9
|
+
from wake.development.primitive_types import *
|
|
10
|
+
from wake.development.transactions import TransactionAbc, TransactionRevertedError
|
|
11
|
+
|
|
12
|
+
from enum import IntEnum
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class ERC20(Contract):
|
|
17
|
+
_abi = {b'\x91\xbe\xda$': {'inputs': [{'internalType': 'address', 'name': 'owner', 'type': 'address'}, {'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'internalType': 'uint256', 'name': 'allowance', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'InsufficientAllowance', 'type': 'error'}, b'\xdbB\x14M': {'inputs': [{'internalType': 'address', 'name': 'from', 'type': 'address'}, {'internalType': 'uint256', 'name': 'balance', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'InsufficientBalance', 'type': 'error'}, b'\x93\xea>\x04': {'inputs': [{'internalType': 'uint256', 'name': 'currentSupply', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'MintOverflow', 'type': 'error'}, b'\x8c[\xe1\xe5\xeb\xec}[\xd1OqB}\x1e\x84\xf3\xdd\x03\x14\xc0\xf7\xb2)\x1e[ \n\xc8\xc7\xc3\xb9%': {'anonymous': False, 'inputs': [{'indexed': True, 'internalType': 'address', 'name': 'owner', 'type': 'address'}, {'indexed': True, 'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'indexed': False, 'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'Approval', 'type': 'event'}, b'\xdd\xf2R\xad\x1b\xe2\xc8\x9bi\xc2\xb0h\xfc7\x8d\xaa\x95+\xa7\xf1c\xc4\xa1\x16(\xf5ZM\xf5#\xb3\xef': {'anonymous': False, 'inputs': [{'indexed': True, 'internalType': 'address', 'name': 'from', 'type': 'address'}, {'indexed': True, 'internalType': 'address', 'name': 'to', 'type': 'address'}, {'indexed': False, 'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'Transfer', 'type': 'event'}, b'6D\xe5\x15': {'inputs': [], 'name': 'DOMAIN_SEPARATOR', 'outputs': [{'internalType': 'bytes32', 'name': '', 'type': 'bytes32'}], 'stateMutability': 'view', 'type': 'function'}, b'\xddb\xed>': {'inputs': [{'internalType': 'address', 'name': '', 'type': 'address'}, {'internalType': 'address', 'name': '', 'type': 'address'}], 'name': 'allowance', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, b'\t^\xa7\xb3': {'inputs': [{'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'approve', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'nonpayable', 'type': 'function'}, b'p\xa0\x821': {'inputs': [{'internalType': 'address', 'name': '', 'type': 'address'}], 'name': 'balanceOf', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, b'1<\xe5g': {'inputs': [], 'name': 'decimals', 'outputs': [{'internalType': 'uint8', 'name': '', 'type': 'uint8'}], 'stateMutability': 'view', 'type': 'function'}, b'\x06\xfd\xde\x03': {'inputs': [], 'name': 'name', 'outputs': [{'internalType': 'string', 'name': '', 'type': 'string'}], 'stateMutability': 'view', 'type': 'function'}, b'~\xce\xbe\x00': {'inputs': [{'internalType': 'address', 'name': '', 'type': 'address'}], 'name': 'nonces', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, b'\xd5\x05\xac\xcf': {'inputs': [{'internalType': 'address', 'name': 'owner', 'type': 'address'}, {'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'internalType': 'uint256', 'name': 'value', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'deadline', 'type': 'uint256'}, {'internalType': 'uint8', 'name': 'v', 'type': 'uint8'}, {'internalType': 'bytes32', 'name': 'r', 'type': 'bytes32'}, {'internalType': 'bytes32', 'name': 's', 'type': 'bytes32'}], 'name': 'permit', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, b'\x95\xd8\x9bA': {'inputs': [], 'name': 'symbol', 'outputs': [{'internalType': 'string', 'name': '', 'type': 'string'}], 'stateMutability': 'view', 'type': 'function'}, b'\x18\x16\r\xdd': {'inputs': [], 'name': 'totalSupply', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, b'\xa9\x05\x9c\xbb': {'inputs': [{'internalType': 'address', 'name': 'to', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'transfer', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'nonpayable', 'type': 'function'}, b'#\xb8r\xdd': {'inputs': [{'internalType': 'address', 'name': 'from', 'type': 'address'}, {'internalType': 'address', 'name': 'to', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'transferFrom', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'nonpayable', 'type': 'function'}}
|
|
18
|
+
_storage_layout = {"storage":[{"astId":47,"contract":"src/MockERC20.sol:ERC20","label":"name","offset":0,"slot":0,"type":"t_string_storage"},{"astId":49,"contract":"src/MockERC20.sol:ERC20","label":"symbol","offset":0,"slot":1,"type":"t_string_storage"},{"astId":53,"contract":"src/MockERC20.sol:ERC20","label":"totalSupply","offset":0,"slot":2,"type":"t_uint256"},{"astId":57,"contract":"src/MockERC20.sol:ERC20","label":"balanceOf","offset":0,"slot":3,"type":"t_mapping(t_address,t_uint256)"},{"astId":63,"contract":"src/MockERC20.sol:ERC20","label":"allowance","offset":0,"slot":4,"type":"t_mapping(t_address,t_mapping(t_address,t_uint256))"},{"astId":71,"contract":"src/MockERC20.sol:ERC20","label":"nonces","offset":0,"slot":5,"type":"t_mapping(t_address,t_uint256)"}],"types":{"t_address":{"encoding":"inplace","label":"address","numberOfBytes":20},"t_mapping(t_address,t_mapping(t_address,t_uint256))":{"encoding":"mapping","label":"mapping(address => mapping(address => uint256))","numberOfBytes":32,"key":"t_address","value":"t_mapping(t_address,t_uint256)"},"t_mapping(t_address,t_uint256)":{"encoding":"mapping","label":"mapping(address => uint256)","numberOfBytes":32,"key":"t_address","value":"t_uint256"},"t_string_storage":{"encoding":"bytes","label":"string","numberOfBytes":32},"t_uint256":{"encoding":"inplace","label":"uint256","numberOfBytes":32}}}
|
|
19
|
+
_creation_code = ""
|
|
20
|
+
|
|
21
|
+
@overload
|
|
22
|
+
@classmethod
|
|
23
|
+
def deploy(cls, _name: str, _symbol: str, _decimals: uint8, *, from_: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, return_tx: Literal[False] = False, request_type: Literal["call"], chain: Optional[Chain] = None, gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> bytearray:
|
|
24
|
+
"""
|
|
25
|
+
Args:
|
|
26
|
+
_name: string
|
|
27
|
+
_symbol: string
|
|
28
|
+
_decimals: uint8
|
|
29
|
+
"""
|
|
30
|
+
...
|
|
31
|
+
|
|
32
|
+
@overload
|
|
33
|
+
@classmethod
|
|
34
|
+
def deploy(cls, _name: str, _symbol: str, _decimals: uint8, *, from_: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, return_tx: Literal[False] = False, request_type: Literal["tx"] = "tx", chain: Optional[Chain] = None, gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> ERC20:
|
|
35
|
+
"""
|
|
36
|
+
Args:
|
|
37
|
+
_name: string
|
|
38
|
+
_symbol: string
|
|
39
|
+
_decimals: uint8
|
|
40
|
+
"""
|
|
41
|
+
...
|
|
42
|
+
|
|
43
|
+
@overload
|
|
44
|
+
@classmethod
|
|
45
|
+
def deploy(cls, _name: str, _symbol: str, _decimals: uint8, *, from_: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, return_tx: Literal[False] = False, request_type: Literal["estimate"], chain: Optional[Chain] = None, gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> int:
|
|
46
|
+
"""
|
|
47
|
+
Args:
|
|
48
|
+
_name: string
|
|
49
|
+
_symbol: string
|
|
50
|
+
_decimals: uint8
|
|
51
|
+
"""
|
|
52
|
+
...
|
|
53
|
+
|
|
54
|
+
@overload
|
|
55
|
+
@classmethod
|
|
56
|
+
def deploy(cls, _name: str, _symbol: str, _decimals: uint8, *, from_: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, return_tx: Literal[False] = False, request_type: Literal["access_list"], chain: Optional[Chain] = None, gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Tuple[Dict[Address, List[int]], int]:
|
|
57
|
+
"""
|
|
58
|
+
Args:
|
|
59
|
+
_name: string
|
|
60
|
+
_symbol: string
|
|
61
|
+
_decimals: uint8
|
|
62
|
+
"""
|
|
63
|
+
...
|
|
64
|
+
|
|
65
|
+
@overload
|
|
66
|
+
@classmethod
|
|
67
|
+
def deploy(cls, _name: str, _symbol: str, _decimals: uint8, *, from_: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, return_tx: Literal[True], request_type: Literal["tx"] = "tx", chain: Optional[Chain] = None, gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> TransactionAbc[ERC20]:
|
|
68
|
+
"""
|
|
69
|
+
Args:
|
|
70
|
+
_name: string
|
|
71
|
+
_symbol: string
|
|
72
|
+
_decimals: uint8
|
|
73
|
+
"""
|
|
74
|
+
...
|
|
75
|
+
|
|
76
|
+
@classmethod
|
|
77
|
+
def deploy(cls, _name: str, _symbol: str, _decimals: uint8, *, from_: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, return_tx: bool = False, request_type: RequestType = "tx", chain: Optional[Chain] = None, gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Union[bytearray, ERC20, int, Tuple[Dict[Address, List[int]], int], TransactionAbc[ERC20]]:
|
|
78
|
+
"""
|
|
79
|
+
Args:
|
|
80
|
+
_name: string
|
|
81
|
+
_symbol: string
|
|
82
|
+
_decimals: uint8
|
|
83
|
+
"""
|
|
84
|
+
raise Exception("Cannot deploy abstract contract")
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def get_creation_code(cls) -> bytes:
|
|
88
|
+
raise Exception("Cannot get creation code of an abstract contract")
|
|
89
|
+
|
|
90
|
+
@dataclasses.dataclass
|
|
91
|
+
class InsufficientBalance(TransactionRevertedError):
|
|
92
|
+
"""
|
|
93
|
+
Attributes:
|
|
94
|
+
from_ (Address): address
|
|
95
|
+
balance (uint256): uint256
|
|
96
|
+
amount (uint256): uint256
|
|
97
|
+
"""
|
|
98
|
+
_abi = {'inputs': [{'internalType': 'address', 'name': 'from', 'type': 'address'}, {'internalType': 'uint256', 'name': 'balance', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'InsufficientBalance', 'type': 'error'}
|
|
99
|
+
original_name = 'InsufficientBalance'
|
|
100
|
+
selector = bytes4(b'\xdbB\x14M')
|
|
101
|
+
|
|
102
|
+
from_: Address = dataclasses.field(metadata={"original_name": "from"})
|
|
103
|
+
balance: uint256
|
|
104
|
+
amount: uint256
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
@dataclasses.dataclass
|
|
108
|
+
class InsufficientAllowance(TransactionRevertedError):
|
|
109
|
+
"""
|
|
110
|
+
Attributes:
|
|
111
|
+
owner (Address): address
|
|
112
|
+
spender (Address): address
|
|
113
|
+
allowance (uint256): uint256
|
|
114
|
+
amount (uint256): uint256
|
|
115
|
+
"""
|
|
116
|
+
_abi = {'inputs': [{'internalType': 'address', 'name': 'owner', 'type': 'address'}, {'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'internalType': 'uint256', 'name': 'allowance', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'InsufficientAllowance', 'type': 'error'}
|
|
117
|
+
original_name = 'InsufficientAllowance'
|
|
118
|
+
selector = bytes4(b'\x91\xbe\xda$')
|
|
119
|
+
|
|
120
|
+
owner: Address
|
|
121
|
+
spender: Address
|
|
122
|
+
allowance: uint256
|
|
123
|
+
amount: uint256
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
@dataclasses.dataclass
|
|
127
|
+
class MintOverflow(TransactionRevertedError):
|
|
128
|
+
"""
|
|
129
|
+
Attributes:
|
|
130
|
+
currentSupply (uint256): uint256
|
|
131
|
+
amount (uint256): uint256
|
|
132
|
+
"""
|
|
133
|
+
_abi = {'inputs': [{'internalType': 'uint256', 'name': 'currentSupply', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'MintOverflow', 'type': 'error'}
|
|
134
|
+
original_name = 'MintOverflow'
|
|
135
|
+
selector = bytes4(b'\x93\xea>\x04')
|
|
136
|
+
|
|
137
|
+
currentSupply: uint256
|
|
138
|
+
amount: uint256
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
@dataclasses.dataclass
|
|
142
|
+
class Transfer:
|
|
143
|
+
"""
|
|
144
|
+
Attributes:
|
|
145
|
+
from_ (Address): indexed address
|
|
146
|
+
to (Address): indexed address
|
|
147
|
+
amount (uint256): uint256
|
|
148
|
+
"""
|
|
149
|
+
_abi = {'anonymous': False, 'inputs': [{'indexed': True, 'internalType': 'address', 'name': 'from', 'type': 'address'}, {'indexed': True, 'internalType': 'address', 'name': 'to', 'type': 'address'}, {'indexed': False, 'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'Transfer', 'type': 'event'}
|
|
150
|
+
origin: Account = dataclasses.field(init=False, compare=False, repr=False)
|
|
151
|
+
original_name = 'Transfer'
|
|
152
|
+
selector = bytes32(b'\xdd\xf2R\xad\x1b\xe2\xc8\x9bi\xc2\xb0h\xfc7\x8d\xaa\x95+\xa7\xf1c\xc4\xa1\x16(\xf5ZM\xf5#\xb3\xef')
|
|
153
|
+
|
|
154
|
+
from_: Address = dataclasses.field(metadata={"original_name": "from"})
|
|
155
|
+
to: Address
|
|
156
|
+
amount: uint256
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
@dataclasses.dataclass
|
|
160
|
+
class Approval:
|
|
161
|
+
"""
|
|
162
|
+
Attributes:
|
|
163
|
+
owner (Address): indexed address
|
|
164
|
+
spender (Address): indexed address
|
|
165
|
+
amount (uint256): uint256
|
|
166
|
+
"""
|
|
167
|
+
_abi = {'anonymous': False, 'inputs': [{'indexed': True, 'internalType': 'address', 'name': 'owner', 'type': 'address'}, {'indexed': True, 'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'indexed': False, 'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'Approval', 'type': 'event'}
|
|
168
|
+
origin: Account = dataclasses.field(init=False, compare=False, repr=False)
|
|
169
|
+
original_name = 'Approval'
|
|
170
|
+
selector = bytes32(b'\x8c[\xe1\xe5\xeb\xec}[\xd1OqB}\x1e\x84\xf3\xdd\x03\x14\xc0\xf7\xb2)\x1e[ \n\xc8\xc7\xc3\xb9%')
|
|
171
|
+
|
|
172
|
+
owner: Address
|
|
173
|
+
spender: Address
|
|
174
|
+
amount: uint256
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
@overload
|
|
178
|
+
def name(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["call"] = "call", gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> str:
|
|
179
|
+
"""
|
|
180
|
+
Returns:
|
|
181
|
+
name: string
|
|
182
|
+
"""
|
|
183
|
+
...
|
|
184
|
+
|
|
185
|
+
@overload
|
|
186
|
+
def name(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["estimate"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> int:
|
|
187
|
+
"""
|
|
188
|
+
Returns:
|
|
189
|
+
name: string
|
|
190
|
+
"""
|
|
191
|
+
...
|
|
192
|
+
|
|
193
|
+
@overload
|
|
194
|
+
def name(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["access_list"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Tuple[Dict[Address, List[int]], int]:
|
|
195
|
+
"""
|
|
196
|
+
Returns:
|
|
197
|
+
name: string
|
|
198
|
+
"""
|
|
199
|
+
...
|
|
200
|
+
|
|
201
|
+
@overload
|
|
202
|
+
def name(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["tx"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> TransactionAbc[str]:
|
|
203
|
+
"""
|
|
204
|
+
Returns:
|
|
205
|
+
name: string
|
|
206
|
+
"""
|
|
207
|
+
...
|
|
208
|
+
|
|
209
|
+
def name(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: RequestType = 'call', gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Union[str, TransactionAbc[str], int, Tuple[Dict[Address, List[int]], int]]:
|
|
210
|
+
"""
|
|
211
|
+
Returns:
|
|
212
|
+
name: string
|
|
213
|
+
"""
|
|
214
|
+
return self._execute(self.chain, request_type, "06fdde03", [], True if request_type == "tx" else False, str, from_, to if to is not None else str(self.address), value, gas_limit, gas_price, max_fee_per_gas, max_priority_fee_per_gas, access_list, type, block, confirmations)
|
|
215
|
+
|
|
216
|
+
@overload
|
|
217
|
+
def symbol(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["call"] = "call", gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> str:
|
|
218
|
+
"""
|
|
219
|
+
Returns:
|
|
220
|
+
symbol: string
|
|
221
|
+
"""
|
|
222
|
+
...
|
|
223
|
+
|
|
224
|
+
@overload
|
|
225
|
+
def symbol(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["estimate"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> int:
|
|
226
|
+
"""
|
|
227
|
+
Returns:
|
|
228
|
+
symbol: string
|
|
229
|
+
"""
|
|
230
|
+
...
|
|
231
|
+
|
|
232
|
+
@overload
|
|
233
|
+
def symbol(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["access_list"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Tuple[Dict[Address, List[int]], int]:
|
|
234
|
+
"""
|
|
235
|
+
Returns:
|
|
236
|
+
symbol: string
|
|
237
|
+
"""
|
|
238
|
+
...
|
|
239
|
+
|
|
240
|
+
@overload
|
|
241
|
+
def symbol(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["tx"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> TransactionAbc[str]:
|
|
242
|
+
"""
|
|
243
|
+
Returns:
|
|
244
|
+
symbol: string
|
|
245
|
+
"""
|
|
246
|
+
...
|
|
247
|
+
|
|
248
|
+
def symbol(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: RequestType = 'call', gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Union[str, TransactionAbc[str], int, Tuple[Dict[Address, List[int]], int]]:
|
|
249
|
+
"""
|
|
250
|
+
Returns:
|
|
251
|
+
symbol: string
|
|
252
|
+
"""
|
|
253
|
+
return self._execute(self.chain, request_type, "95d89b41", [], True if request_type == "tx" else False, str, from_, to if to is not None else str(self.address), value, gas_limit, gas_price, max_fee_per_gas, max_priority_fee_per_gas, access_list, type, block, confirmations)
|
|
254
|
+
|
|
255
|
+
@overload
|
|
256
|
+
def decimals(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["call"] = "call", gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> uint8:
|
|
257
|
+
"""
|
|
258
|
+
Returns:
|
|
259
|
+
decimals: uint8
|
|
260
|
+
"""
|
|
261
|
+
...
|
|
262
|
+
|
|
263
|
+
@overload
|
|
264
|
+
def decimals(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["estimate"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> int:
|
|
265
|
+
"""
|
|
266
|
+
Returns:
|
|
267
|
+
decimals: uint8
|
|
268
|
+
"""
|
|
269
|
+
...
|
|
270
|
+
|
|
271
|
+
@overload
|
|
272
|
+
def decimals(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["access_list"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Tuple[Dict[Address, List[int]], int]:
|
|
273
|
+
"""
|
|
274
|
+
Returns:
|
|
275
|
+
decimals: uint8
|
|
276
|
+
"""
|
|
277
|
+
...
|
|
278
|
+
|
|
279
|
+
@overload
|
|
280
|
+
def decimals(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["tx"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> TransactionAbc[uint8]:
|
|
281
|
+
"""
|
|
282
|
+
Returns:
|
|
283
|
+
decimals: uint8
|
|
284
|
+
"""
|
|
285
|
+
...
|
|
286
|
+
|
|
287
|
+
def decimals(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: RequestType = 'call', gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Union[uint8, TransactionAbc[uint8], int, Tuple[Dict[Address, List[int]], int]]:
|
|
288
|
+
"""
|
|
289
|
+
Returns:
|
|
290
|
+
decimals: uint8
|
|
291
|
+
"""
|
|
292
|
+
return self._execute(self.chain, request_type, "313ce567", [], True if request_type == "tx" else False, uint8, from_, to if to is not None else str(self.address), value, gas_limit, gas_price, max_fee_per_gas, max_priority_fee_per_gas, access_list, type, block, confirmations)
|
|
293
|
+
|
|
294
|
+
@overload
|
|
295
|
+
def totalSupply(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["call"] = "call", gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> uint256:
|
|
296
|
+
"""
|
|
297
|
+
Returns:
|
|
298
|
+
totalSupply: uint256
|
|
299
|
+
"""
|
|
300
|
+
...
|
|
301
|
+
|
|
302
|
+
@overload
|
|
303
|
+
def totalSupply(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["estimate"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> int:
|
|
304
|
+
"""
|
|
305
|
+
Returns:
|
|
306
|
+
totalSupply: uint256
|
|
307
|
+
"""
|
|
308
|
+
...
|
|
309
|
+
|
|
310
|
+
@overload
|
|
311
|
+
def totalSupply(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["access_list"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Tuple[Dict[Address, List[int]], int]:
|
|
312
|
+
"""
|
|
313
|
+
Returns:
|
|
314
|
+
totalSupply: uint256
|
|
315
|
+
"""
|
|
316
|
+
...
|
|
317
|
+
|
|
318
|
+
@overload
|
|
319
|
+
def totalSupply(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["tx"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> TransactionAbc[uint256]:
|
|
320
|
+
"""
|
|
321
|
+
Returns:
|
|
322
|
+
totalSupply: uint256
|
|
323
|
+
"""
|
|
324
|
+
...
|
|
325
|
+
|
|
326
|
+
def totalSupply(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: RequestType = 'call', gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Union[uint256, TransactionAbc[uint256], int, Tuple[Dict[Address, List[int]], int]]:
|
|
327
|
+
"""
|
|
328
|
+
Returns:
|
|
329
|
+
totalSupply: uint256
|
|
330
|
+
"""
|
|
331
|
+
return self._execute(self.chain, request_type, "18160ddd", [], True if request_type == "tx" else False, uint256, from_, to if to is not None else str(self.address), value, gas_limit, gas_price, max_fee_per_gas, max_priority_fee_per_gas, access_list, type, block, confirmations)
|
|
332
|
+
|
|
333
|
+
@overload
|
|
334
|
+
def balanceOf(self, key0: Union[Account, Address], *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["call"] = "call", gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> uint256:
|
|
335
|
+
"""
|
|
336
|
+
Args:
|
|
337
|
+
key0: address
|
|
338
|
+
Returns:
|
|
339
|
+
uint256
|
|
340
|
+
"""
|
|
341
|
+
...
|
|
342
|
+
|
|
343
|
+
@overload
|
|
344
|
+
def balanceOf(self, key0: Union[Account, Address], *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["estimate"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> int:
|
|
345
|
+
"""
|
|
346
|
+
Args:
|
|
347
|
+
key0: address
|
|
348
|
+
Returns:
|
|
349
|
+
uint256
|
|
350
|
+
"""
|
|
351
|
+
...
|
|
352
|
+
|
|
353
|
+
@overload
|
|
354
|
+
def balanceOf(self, key0: Union[Account, Address], *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["access_list"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Tuple[Dict[Address, List[int]], int]:
|
|
355
|
+
"""
|
|
356
|
+
Args:
|
|
357
|
+
key0: address
|
|
358
|
+
Returns:
|
|
359
|
+
uint256
|
|
360
|
+
"""
|
|
361
|
+
...
|
|
362
|
+
|
|
363
|
+
@overload
|
|
364
|
+
def balanceOf(self, key0: Union[Account, Address], *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["tx"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> TransactionAbc[uint256]:
|
|
365
|
+
"""
|
|
366
|
+
Args:
|
|
367
|
+
key0: address
|
|
368
|
+
Returns:
|
|
369
|
+
uint256
|
|
370
|
+
"""
|
|
371
|
+
...
|
|
372
|
+
|
|
373
|
+
def balanceOf(self, key0: Union[Account, Address], *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: RequestType = 'call', gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Union[uint256, TransactionAbc[uint256], int, Tuple[Dict[Address, List[int]], int]]:
|
|
374
|
+
"""
|
|
375
|
+
Args:
|
|
376
|
+
key0: address
|
|
377
|
+
Returns:
|
|
378
|
+
uint256
|
|
379
|
+
"""
|
|
380
|
+
return self._execute(self.chain, request_type, "70a08231", [key0], True if request_type == "tx" else False, uint256, from_, to if to is not None else str(self.address), value, gas_limit, gas_price, max_fee_per_gas, max_priority_fee_per_gas, access_list, type, block, confirmations)
|
|
381
|
+
|
|
382
|
+
@overload
|
|
383
|
+
def allowance(self, key0: Union[Account, Address], key1: Union[Account, Address], *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["call"] = "call", gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> uint256:
|
|
384
|
+
"""
|
|
385
|
+
Args:
|
|
386
|
+
key0: address
|
|
387
|
+
key1: address
|
|
388
|
+
Returns:
|
|
389
|
+
uint256
|
|
390
|
+
"""
|
|
391
|
+
...
|
|
392
|
+
|
|
393
|
+
@overload
|
|
394
|
+
def allowance(self, key0: Union[Account, Address], key1: Union[Account, Address], *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["estimate"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> int:
|
|
395
|
+
"""
|
|
396
|
+
Args:
|
|
397
|
+
key0: address
|
|
398
|
+
key1: address
|
|
399
|
+
Returns:
|
|
400
|
+
uint256
|
|
401
|
+
"""
|
|
402
|
+
...
|
|
403
|
+
|
|
404
|
+
@overload
|
|
405
|
+
def allowance(self, key0: Union[Account, Address], key1: Union[Account, Address], *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["access_list"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Tuple[Dict[Address, List[int]], int]:
|
|
406
|
+
"""
|
|
407
|
+
Args:
|
|
408
|
+
key0: address
|
|
409
|
+
key1: address
|
|
410
|
+
Returns:
|
|
411
|
+
uint256
|
|
412
|
+
"""
|
|
413
|
+
...
|
|
414
|
+
|
|
415
|
+
@overload
|
|
416
|
+
def allowance(self, key0: Union[Account, Address], key1: Union[Account, Address], *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["tx"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> TransactionAbc[uint256]:
|
|
417
|
+
"""
|
|
418
|
+
Args:
|
|
419
|
+
key0: address
|
|
420
|
+
key1: address
|
|
421
|
+
Returns:
|
|
422
|
+
uint256
|
|
423
|
+
"""
|
|
424
|
+
...
|
|
425
|
+
|
|
426
|
+
def allowance(self, key0: Union[Account, Address], key1: Union[Account, Address], *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: RequestType = 'call', gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Union[uint256, TransactionAbc[uint256], int, Tuple[Dict[Address, List[int]], int]]:
|
|
427
|
+
"""
|
|
428
|
+
Args:
|
|
429
|
+
key0: address
|
|
430
|
+
key1: address
|
|
431
|
+
Returns:
|
|
432
|
+
uint256
|
|
433
|
+
"""
|
|
434
|
+
return self._execute(self.chain, request_type, "dd62ed3e", [key0, key1], True if request_type == "tx" else False, uint256, from_, to if to is not None else str(self.address), value, gas_limit, gas_price, max_fee_per_gas, max_priority_fee_per_gas, access_list, type, block, confirmations)
|
|
435
|
+
|
|
436
|
+
@overload
|
|
437
|
+
def nonces(self, key0: Union[Account, Address], *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["call"] = "call", gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> uint256:
|
|
438
|
+
"""
|
|
439
|
+
Args:
|
|
440
|
+
key0: address
|
|
441
|
+
Returns:
|
|
442
|
+
uint256
|
|
443
|
+
"""
|
|
444
|
+
...
|
|
445
|
+
|
|
446
|
+
@overload
|
|
447
|
+
def nonces(self, key0: Union[Account, Address], *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["estimate"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> int:
|
|
448
|
+
"""
|
|
449
|
+
Args:
|
|
450
|
+
key0: address
|
|
451
|
+
Returns:
|
|
452
|
+
uint256
|
|
453
|
+
"""
|
|
454
|
+
...
|
|
455
|
+
|
|
456
|
+
@overload
|
|
457
|
+
def nonces(self, key0: Union[Account, Address], *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["access_list"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Tuple[Dict[Address, List[int]], int]:
|
|
458
|
+
"""
|
|
459
|
+
Args:
|
|
460
|
+
key0: address
|
|
461
|
+
Returns:
|
|
462
|
+
uint256
|
|
463
|
+
"""
|
|
464
|
+
...
|
|
465
|
+
|
|
466
|
+
@overload
|
|
467
|
+
def nonces(self, key0: Union[Account, Address], *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["tx"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> TransactionAbc[uint256]:
|
|
468
|
+
"""
|
|
469
|
+
Args:
|
|
470
|
+
key0: address
|
|
471
|
+
Returns:
|
|
472
|
+
uint256
|
|
473
|
+
"""
|
|
474
|
+
...
|
|
475
|
+
|
|
476
|
+
def nonces(self, key0: Union[Account, Address], *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: RequestType = 'call', gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Union[uint256, TransactionAbc[uint256], int, Tuple[Dict[Address, List[int]], int]]:
|
|
477
|
+
"""
|
|
478
|
+
Args:
|
|
479
|
+
key0: address
|
|
480
|
+
Returns:
|
|
481
|
+
uint256
|
|
482
|
+
"""
|
|
483
|
+
return self._execute(self.chain, request_type, "7ecebe00", [key0], True if request_type == "tx" else False, uint256, from_, to if to is not None else str(self.address), value, gas_limit, gas_price, max_fee_per_gas, max_priority_fee_per_gas, access_list, type, block, confirmations)
|
|
484
|
+
|
|
485
|
+
@overload
|
|
486
|
+
def approve(self, spender: Union[Account, Address], amount: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["call"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> bool:
|
|
487
|
+
"""
|
|
488
|
+
Args:
|
|
489
|
+
spender: address
|
|
490
|
+
amount: uint256
|
|
491
|
+
Returns:
|
|
492
|
+
bool
|
|
493
|
+
"""
|
|
494
|
+
...
|
|
495
|
+
|
|
496
|
+
@overload
|
|
497
|
+
def approve(self, spender: Union[Account, Address], amount: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["estimate"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> int:
|
|
498
|
+
"""
|
|
499
|
+
Args:
|
|
500
|
+
spender: address
|
|
501
|
+
amount: uint256
|
|
502
|
+
Returns:
|
|
503
|
+
bool
|
|
504
|
+
"""
|
|
505
|
+
...
|
|
506
|
+
|
|
507
|
+
@overload
|
|
508
|
+
def approve(self, spender: Union[Account, Address], amount: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["access_list"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Tuple[Dict[Address, List[int]], int]:
|
|
509
|
+
"""
|
|
510
|
+
Args:
|
|
511
|
+
spender: address
|
|
512
|
+
amount: uint256
|
|
513
|
+
Returns:
|
|
514
|
+
bool
|
|
515
|
+
"""
|
|
516
|
+
...
|
|
517
|
+
|
|
518
|
+
@overload
|
|
519
|
+
def approve(self, spender: Union[Account, Address], amount: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["tx"] = "tx", gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> TransactionAbc[bool]:
|
|
520
|
+
"""
|
|
521
|
+
|
|
522
|
+
Args:
|
|
523
|
+
spender: address
|
|
524
|
+
amount: uint256
|
|
525
|
+
Returns:
|
|
526
|
+
bool
|
|
527
|
+
"""
|
|
528
|
+
...
|
|
529
|
+
|
|
530
|
+
def approve(self, spender: Union[Account, Address], amount: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: RequestType = 'tx', gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Union[bool, TransactionAbc[bool], int, Tuple[Dict[Address, List[int]], int]]:
|
|
531
|
+
"""
|
|
532
|
+
Args:
|
|
533
|
+
spender: address
|
|
534
|
+
amount: uint256
|
|
535
|
+
Returns:
|
|
536
|
+
bool
|
|
537
|
+
"""
|
|
538
|
+
return self._execute(self.chain, request_type, "095ea7b3", [spender, amount], True if request_type == "tx" else False, bool, from_, to if to is not None else str(self.address), value, gas_limit, gas_price, max_fee_per_gas, max_priority_fee_per_gas, access_list, type, block, confirmations)
|
|
539
|
+
|
|
540
|
+
@overload
|
|
541
|
+
def transfer(self, to_: Union[Account, Address], amount: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["call"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> bool:
|
|
542
|
+
"""
|
|
543
|
+
Args:
|
|
544
|
+
to_: address
|
|
545
|
+
amount: uint256
|
|
546
|
+
Returns:
|
|
547
|
+
bool
|
|
548
|
+
"""
|
|
549
|
+
...
|
|
550
|
+
|
|
551
|
+
@overload
|
|
552
|
+
def transfer(self, to_: Union[Account, Address], amount: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["estimate"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> int:
|
|
553
|
+
"""
|
|
554
|
+
Args:
|
|
555
|
+
to_: address
|
|
556
|
+
amount: uint256
|
|
557
|
+
Returns:
|
|
558
|
+
bool
|
|
559
|
+
"""
|
|
560
|
+
...
|
|
561
|
+
|
|
562
|
+
@overload
|
|
563
|
+
def transfer(self, to_: Union[Account, Address], amount: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["access_list"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Tuple[Dict[Address, List[int]], int]:
|
|
564
|
+
"""
|
|
565
|
+
Args:
|
|
566
|
+
to_: address
|
|
567
|
+
amount: uint256
|
|
568
|
+
Returns:
|
|
569
|
+
bool
|
|
570
|
+
"""
|
|
571
|
+
...
|
|
572
|
+
|
|
573
|
+
@overload
|
|
574
|
+
def transfer(self, to_: Union[Account, Address], amount: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["tx"] = "tx", gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> TransactionAbc[bool]:
|
|
575
|
+
"""
|
|
576
|
+
Args:
|
|
577
|
+
to_: address
|
|
578
|
+
amount: uint256
|
|
579
|
+
Returns:
|
|
580
|
+
bool
|
|
581
|
+
"""
|
|
582
|
+
...
|
|
583
|
+
|
|
584
|
+
def transfer(self, to_: Union[Account, Address], amount: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: RequestType = 'tx', gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Union[bool, TransactionAbc[bool], int, Tuple[Dict[Address, List[int]], int]]:
|
|
585
|
+
"""
|
|
586
|
+
Args:
|
|
587
|
+
to_: address
|
|
588
|
+
amount: uint256
|
|
589
|
+
Returns:
|
|
590
|
+
bool
|
|
591
|
+
"""
|
|
592
|
+
return self._execute(self.chain, request_type, "a9059cbb", [to_, amount], True if request_type == "tx" else False, bool, from_, to if to is not None else str(self.address), value, gas_limit, gas_price, max_fee_per_gas, max_priority_fee_per_gas, access_list, type, block, confirmations)
|
|
593
|
+
|
|
594
|
+
@overload
|
|
595
|
+
def transferFrom(self, from__: Union[Account, Address], to_: Union[Account, Address], amount: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["call"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> bool:
|
|
596
|
+
"""
|
|
597
|
+
Args:
|
|
598
|
+
from__: address
|
|
599
|
+
to_: address
|
|
600
|
+
amount: uint256
|
|
601
|
+
Returns:
|
|
602
|
+
bool
|
|
603
|
+
"""
|
|
604
|
+
...
|
|
605
|
+
|
|
606
|
+
@overload
|
|
607
|
+
def transferFrom(self, from__: Union[Account, Address], to_: Union[Account, Address], amount: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["estimate"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> int:
|
|
608
|
+
"""
|
|
609
|
+
Args:
|
|
610
|
+
from__: address
|
|
611
|
+
to_: address
|
|
612
|
+
amount: uint256
|
|
613
|
+
Returns:
|
|
614
|
+
bool
|
|
615
|
+
"""
|
|
616
|
+
...
|
|
617
|
+
|
|
618
|
+
@overload
|
|
619
|
+
def transferFrom(self, from__: Union[Account, Address], to_: Union[Account, Address], amount: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["access_list"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Tuple[Dict[Address, List[int]], int]:
|
|
620
|
+
"""
|
|
621
|
+
Args:
|
|
622
|
+
from__: address
|
|
623
|
+
to_: address
|
|
624
|
+
amount: uint256
|
|
625
|
+
Returns:
|
|
626
|
+
bool
|
|
627
|
+
"""
|
|
628
|
+
...
|
|
629
|
+
|
|
630
|
+
@overload
|
|
631
|
+
def transferFrom(self, from__: Union[Account, Address], to_: Union[Account, Address], amount: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["tx"] = "tx", gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> TransactionAbc[bool]:
|
|
632
|
+
"""
|
|
633
|
+
Args:
|
|
634
|
+
from__: address
|
|
635
|
+
to_: address
|
|
636
|
+
amount: uint256
|
|
637
|
+
Returns:
|
|
638
|
+
bool
|
|
639
|
+
"""
|
|
640
|
+
...
|
|
641
|
+
|
|
642
|
+
def transferFrom(self, from__: Union[Account, Address], to_: Union[Account, Address], amount: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: RequestType = 'tx', gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Union[bool, TransactionAbc[bool], int, Tuple[Dict[Address, List[int]], int]]:
|
|
643
|
+
"""
|
|
644
|
+
Args:
|
|
645
|
+
from__: address
|
|
646
|
+
to_: address
|
|
647
|
+
amount: uint256
|
|
648
|
+
Returns:
|
|
649
|
+
bool
|
|
650
|
+
"""
|
|
651
|
+
return self._execute(self.chain, request_type, "23b872dd", [from__, to_, amount], True if request_type == "tx" else False, bool, from_, to if to is not None else str(self.address), value, gas_limit, gas_price, max_fee_per_gas, max_priority_fee_per_gas, access_list, type, block, confirmations)
|
|
652
|
+
|
|
653
|
+
@overload
|
|
654
|
+
def permit(self, owner: Union[Account, Address], spender: Union[Account, Address], value_: uint256, deadline: uint256, v: uint8, r: bytes32, s: bytes32, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["call"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> None:
|
|
655
|
+
"""
|
|
656
|
+
Args:
|
|
657
|
+
owner: address
|
|
658
|
+
spender: address
|
|
659
|
+
value_: uint256
|
|
660
|
+
deadline: uint256
|
|
661
|
+
v: uint8
|
|
662
|
+
r: bytes32
|
|
663
|
+
s: bytes32
|
|
664
|
+
"""
|
|
665
|
+
...
|
|
666
|
+
|
|
667
|
+
@overload
|
|
668
|
+
def permit(self, owner: Union[Account, Address], spender: Union[Account, Address], value_: uint256, deadline: uint256, v: uint8, r: bytes32, s: bytes32, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["estimate"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> int:
|
|
669
|
+
"""
|
|
670
|
+
Args:
|
|
671
|
+
owner: address
|
|
672
|
+
spender: address
|
|
673
|
+
value_: uint256
|
|
674
|
+
deadline: uint256
|
|
675
|
+
v: uint8
|
|
676
|
+
r: bytes32
|
|
677
|
+
s: bytes32
|
|
678
|
+
"""
|
|
679
|
+
...
|
|
680
|
+
|
|
681
|
+
@overload
|
|
682
|
+
def permit(self, owner: Union[Account, Address], spender: Union[Account, Address], value_: uint256, deadline: uint256, v: uint8, r: bytes32, s: bytes32, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["access_list"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Tuple[Dict[Address, List[int]], int]:
|
|
683
|
+
"""
|
|
684
|
+
Args:
|
|
685
|
+
owner: address
|
|
686
|
+
spender: address
|
|
687
|
+
value_: uint256
|
|
688
|
+
deadline: uint256
|
|
689
|
+
v: uint8
|
|
690
|
+
r: bytes32
|
|
691
|
+
s: bytes32
|
|
692
|
+
"""
|
|
693
|
+
...
|
|
694
|
+
|
|
695
|
+
@overload
|
|
696
|
+
def permit(self, owner: Union[Account, Address], spender: Union[Account, Address], value_: uint256, deadline: uint256, v: uint8, r: bytes32, s: bytes32, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["tx"] = "tx", gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> TransactionAbc[None]:
|
|
697
|
+
"""
|
|
698
|
+
Args:
|
|
699
|
+
owner: address
|
|
700
|
+
spender: address
|
|
701
|
+
value_: uint256
|
|
702
|
+
deadline: uint256
|
|
703
|
+
v: uint8
|
|
704
|
+
r: bytes32
|
|
705
|
+
s: bytes32
|
|
706
|
+
"""
|
|
707
|
+
...
|
|
708
|
+
|
|
709
|
+
def permit(self, owner: Union[Account, Address], spender: Union[Account, Address], value_: uint256, deadline: uint256, v: uint8, r: bytes32, s: bytes32, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: RequestType = 'tx', gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Union[None, TransactionAbc[None], int, Tuple[Dict[Address, List[int]], int]]:
|
|
710
|
+
"""
|
|
711
|
+
Args:
|
|
712
|
+
owner: address
|
|
713
|
+
spender: address
|
|
714
|
+
value_: uint256
|
|
715
|
+
deadline: uint256
|
|
716
|
+
v: uint8
|
|
717
|
+
r: bytes32
|
|
718
|
+
s: bytes32
|
|
719
|
+
"""
|
|
720
|
+
return self._execute(self.chain, request_type, "d505accf", [owner, spender, value_, deadline, v, r, s], True if request_type == "tx" else False, NoneType, from_, to if to is not None else str(self.address), value, gas_limit, gas_price, max_fee_per_gas, max_priority_fee_per_gas, access_list, type, block, confirmations)
|
|
721
|
+
|
|
722
|
+
@overload
|
|
723
|
+
def DOMAIN_SEPARATOR(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["call"] = "call", gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> bytes32:
|
|
724
|
+
"""
|
|
725
|
+
Returns:
|
|
726
|
+
bytes32
|
|
727
|
+
"""
|
|
728
|
+
...
|
|
729
|
+
|
|
730
|
+
@overload
|
|
731
|
+
def DOMAIN_SEPARATOR(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["estimate"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> int:
|
|
732
|
+
"""
|
|
733
|
+
Returns:
|
|
734
|
+
bytes32
|
|
735
|
+
"""
|
|
736
|
+
...
|
|
737
|
+
|
|
738
|
+
@overload
|
|
739
|
+
def DOMAIN_SEPARATOR(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["access_list"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Tuple[Dict[Address, List[int]], int]:
|
|
740
|
+
"""
|
|
741
|
+
Returns:
|
|
742
|
+
bytes32
|
|
743
|
+
"""
|
|
744
|
+
...
|
|
745
|
+
|
|
746
|
+
@overload
|
|
747
|
+
def DOMAIN_SEPARATOR(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["tx"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> TransactionAbc[bytes32]:
|
|
748
|
+
"""
|
|
749
|
+
Returns:
|
|
750
|
+
bytes32
|
|
751
|
+
"""
|
|
752
|
+
...
|
|
753
|
+
|
|
754
|
+
def DOMAIN_SEPARATOR(self, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: RequestType = 'call', gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Union[bytes32, TransactionAbc[bytes32], int, Tuple[Dict[Address, List[int]], int]]:
|
|
755
|
+
"""
|
|
756
|
+
Returns:
|
|
757
|
+
bytes32
|
|
758
|
+
"""
|
|
759
|
+
return self._execute(self.chain, request_type, "3644e515", [], True if request_type == "tx" else False, bytes32, from_, to if to is not None else str(self.address), value, gas_limit, gas_price, max_fee_per_gas, max_priority_fee_per_gas, access_list, type, block, confirmations)
|
|
760
|
+
|
|
761
|
+
ERC20.name.selector = bytes4(b'\x06\xfd\xde\x03')
|
|
762
|
+
ERC20.symbol.selector = bytes4(b'\x95\xd8\x9bA')
|
|
763
|
+
ERC20.decimals.selector = bytes4(b'1<\xe5g')
|
|
764
|
+
ERC20.totalSupply.selector = bytes4(b'\x18\x16\r\xdd')
|
|
765
|
+
ERC20.balanceOf.selector = bytes4(b'p\xa0\x821')
|
|
766
|
+
ERC20.allowance.selector = bytes4(b'\xddb\xed>')
|
|
767
|
+
ERC20.nonces.selector = bytes4(b'~\xce\xbe\x00')
|
|
768
|
+
ERC20.approve.selector = bytes4(b'\t^\xa7\xb3')
|
|
769
|
+
ERC20.transfer.selector = bytes4(b'\xa9\x05\x9c\xbb')
|
|
770
|
+
ERC20.transferFrom.selector = bytes4(b'#\xb8r\xdd')
|
|
771
|
+
ERC20.permit.selector = bytes4(b'\xd5\x05\xac\xcf')
|
|
772
|
+
ERC20.DOMAIN_SEPARATOR.selector = bytes4(b'6D\xe5\x15')
|
|
773
|
+
class MockERC20(ERC20):
|
|
774
|
+
_abi = {'constructor': {'inputs': [{'internalType': 'string', 'name': '_name', 'type': 'string'}, {'internalType': 'string', 'name': '_symbol', 'type': 'string'}, {'internalType': 'uint8', 'name': '_decimals', 'type': 'uint8'}], 'stateMutability': 'nonpayable', 'type': 'constructor'}, b'\x91\xbe\xda$': {'inputs': [{'internalType': 'address', 'name': 'owner', 'type': 'address'}, {'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'internalType': 'uint256', 'name': 'allowance', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'InsufficientAllowance', 'type': 'error'}, b'\xdbB\x14M': {'inputs': [{'internalType': 'address', 'name': 'from', 'type': 'address'}, {'internalType': 'uint256', 'name': 'balance', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'InsufficientBalance', 'type': 'error'}, b'\x93\xea>\x04': {'inputs': [{'internalType': 'uint256', 'name': 'currentSupply', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'MintOverflow', 'type': 'error'}, b'\x8c[\xe1\xe5\xeb\xec}[\xd1OqB}\x1e\x84\xf3\xdd\x03\x14\xc0\xf7\xb2)\x1e[ \n\xc8\xc7\xc3\xb9%': {'anonymous': False, 'inputs': [{'indexed': True, 'internalType': 'address', 'name': 'owner', 'type': 'address'}, {'indexed': True, 'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'indexed': False, 'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'Approval', 'type': 'event'}, b'\xdd\xf2R\xad\x1b\xe2\xc8\x9bi\xc2\xb0h\xfc7\x8d\xaa\x95+\xa7\xf1c\xc4\xa1\x16(\xf5ZM\xf5#\xb3\xef': {'anonymous': False, 'inputs': [{'indexed': True, 'internalType': 'address', 'name': 'from', 'type': 'address'}, {'indexed': True, 'internalType': 'address', 'name': 'to', 'type': 'address'}, {'indexed': False, 'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'Transfer', 'type': 'event'}, b'6D\xe5\x15': {'inputs': [], 'name': 'DOMAIN_SEPARATOR', 'outputs': [{'internalType': 'bytes32', 'name': '', 'type': 'bytes32'}], 'stateMutability': 'view', 'type': 'function'}, b'\xddb\xed>': {'inputs': [{'internalType': 'address', 'name': '', 'type': 'address'}, {'internalType': 'address', 'name': '', 'type': 'address'}], 'name': 'allowance', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, b'\t^\xa7\xb3': {'inputs': [{'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'approve', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'nonpayable', 'type': 'function'}, b'p\xa0\x821': {'inputs': [{'internalType': 'address', 'name': '', 'type': 'address'}], 'name': 'balanceOf', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, b'\x9d\xc2\x9f\xac': {'inputs': [{'internalType': 'address', 'name': 'from', 'type': 'address'}, {'internalType': 'uint256', 'name': 'value', 'type': 'uint256'}], 'name': 'burn', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, b'1<\xe5g': {'inputs': [], 'name': 'decimals', 'outputs': [{'internalType': 'uint8', 'name': '', 'type': 'uint8'}], 'stateMutability': 'view', 'type': 'function'}, b'@\xc1\x0f\x19': {'inputs': [{'internalType': 'address', 'name': 'to', 'type': 'address'}, {'internalType': 'uint256', 'name': 'value', 'type': 'uint256'}], 'name': 'mint', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, b'\x06\xfd\xde\x03': {'inputs': [], 'name': 'name', 'outputs': [{'internalType': 'string', 'name': '', 'type': 'string'}], 'stateMutability': 'view', 'type': 'function'}, b'~\xce\xbe\x00': {'inputs': [{'internalType': 'address', 'name': '', 'type': 'address'}], 'name': 'nonces', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, b'\xd5\x05\xac\xcf': {'inputs': [{'internalType': 'address', 'name': 'owner', 'type': 'address'}, {'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'internalType': 'uint256', 'name': 'value', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'deadline', 'type': 'uint256'}, {'internalType': 'uint8', 'name': 'v', 'type': 'uint8'}, {'internalType': 'bytes32', 'name': 'r', 'type': 'bytes32'}, {'internalType': 'bytes32', 'name': 's', 'type': 'bytes32'}], 'name': 'permit', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, b'\x95\xd8\x9bA': {'inputs': [], 'name': 'symbol', 'outputs': [{'internalType': 'string', 'name': '', 'type': 'string'}], 'stateMutability': 'view', 'type': 'function'}, b'\x18\x16\r\xdd': {'inputs': [], 'name': 'totalSupply', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, b'\xa9\x05\x9c\xbb': {'inputs': [{'internalType': 'address', 'name': 'to', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'transfer', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'nonpayable', 'type': 'function'}, b'#\xb8r\xdd': {'inputs': [{'internalType': 'address', 'name': 'from', 'type': 'address'}, {'internalType': 'address', 'name': 'to', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'transferFrom', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'nonpayable', 'type': 'function'}}
|
|
775
|
+
_storage_layout = {"storage":[{"astId":47,"contract":"src/MockERC20.sol:MockERC20","label":"name","offset":0,"slot":0,"type":"t_string_storage"},{"astId":49,"contract":"src/MockERC20.sol:MockERC20","label":"symbol","offset":0,"slot":1,"type":"t_string_storage"},{"astId":53,"contract":"src/MockERC20.sol:MockERC20","label":"totalSupply","offset":0,"slot":2,"type":"t_uint256"},{"astId":57,"contract":"src/MockERC20.sol:MockERC20","label":"balanceOf","offset":0,"slot":3,"type":"t_mapping(t_address,t_uint256)"},{"astId":63,"contract":"src/MockERC20.sol:MockERC20","label":"allowance","offset":0,"slot":4,"type":"t_mapping(t_address,t_mapping(t_address,t_uint256))"},{"astId":71,"contract":"src/MockERC20.sol:MockERC20","label":"nonces","offset":0,"slot":5,"type":"t_mapping(t_address,t_uint256)"}],"types":{"t_address":{"encoding":"inplace","label":"address","numberOfBytes":20},"t_mapping(t_address,t_mapping(t_address,t_uint256))":{"encoding":"mapping","label":"mapping(address => mapping(address => uint256))","numberOfBytes":32,"key":"t_address","value":"t_mapping(t_address,t_uint256)"},"t_mapping(t_address,t_uint256)":{"encoding":"mapping","label":"mapping(address => uint256)","numberOfBytes":32,"key":"t_address","value":"t_uint256"},"t_string_storage":{"encoding":"bytes","label":"string","numberOfBytes":32},"t_uint256":{"encoding":"inplace","label":"uint256","numberOfBytes":32}}}
|
|
776
|
+
_creation_code = "60e060405234801561000f575f5ffd5b506040516120ad3803806120ad83398181016040528101906100319190610296565b828282825f9081610042919061052e565b508160019081610052919061052e565b508060ff1660808160ff16815250504660a0818152505061007761008960201b60201c565b60c08181525050505050505050610766565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f6040516100b99190610699565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc646306040516020016100f8959493929190610715565b60405160208183030381529060405280519060200120905090565b5f604051905090565b5f5ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6101728261012c565b810181811067ffffffffffffffff821117156101915761019061013c565b5b80604052505050565b5f6101a3610113565b90506101af8282610169565b919050565b5f67ffffffffffffffff8211156101ce576101cd61013c565b5b6101d78261012c565b9050602081019050919050565b8281835e5f83830152505050565b5f6102046101ff846101b4565b61019a565b9050828152602081018484840111156102205761021f610128565b5b61022b8482856101e4565b509392505050565b5f82601f83011261024757610246610124565b5b81516102578482602086016101f2565b91505092915050565b5f60ff82169050919050565b61027581610260565b811461027f575f5ffd5b50565b5f815190506102908161026c565b92915050565b5f5f5f606084860312156102ad576102ac61011c565b5b5f84015167ffffffffffffffff8111156102ca576102c9610120565b5b6102d686828701610233565b935050602084015167ffffffffffffffff8111156102f7576102f6610120565b5b61030386828701610233565b925050604061031486828701610282565b9150509250925092565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061036c57607f821691505b60208210810361037f5761037e610328565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026103e17fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826103a6565b6103eb86836103a6565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f61042f61042a61042584610403565b61040c565b610403565b9050919050565b5f819050919050565b61044883610415565b61045c61045482610436565b8484546103b2565b825550505050565b5f5f905090565b610473610464565b61047e81848461043f565b505050565b5b818110156104a1576104965f8261046b565b600181019050610484565b5050565b601f8211156104e6576104b781610385565b6104c084610397565b810160208510156104cf578190505b6104e36104db85610397565b830182610483565b50505b505050565b5f82821c905092915050565b5f6105065f19846008026104eb565b1980831691505092915050565b5f61051e83836104f7565b9150826002028217905092915050565b6105378261031e565b67ffffffffffffffff8111156105505761054f61013c565b5b61055a8254610355565b6105658282856104a5565b5f60209050601f831160018114610596575f8415610584578287015190505b61058e8582610513565b8655506105f5565b601f1984166105a486610385565b5f5b828110156105cb578489015182556001820191506020850194506020810190506105a6565b868310156105e857848901516105e4601f8916826104f7565b8355505b6001600288020188555050505b505050505050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f815461062581610355565b61062f81866105fd565b9450600182165f8114610649576001811461065e57610690565b60ff1983168652811515820286019350610690565b61066785610607565b5f5b8381101561068857815481890152600182019150602081019050610669565b838801955050505b50505092915050565b5f6106a48284610619565b915081905092915050565b5f819050919050565b6106c1816106af565b82525050565b6106d081610403565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6106ff826106d6565b9050919050565b61070f816106f5565b82525050565b5f60a0820190506107285f8301886106b8565b61073560208301876106b8565b61074260408301866106b8565b61074f60608301856106c7565b61075c6080830184610706565b9695505050505050565b60805160a05160c05161191d6107905f395f6107da01525f6107a601525f610781015261191d5ff3fe608060405234801561000f575f5ffd5b50600436106100e8575f3560e01c806370a082311161008a5780639dc29fac116100645780639dc29fac1461025e578063a9059cbb1461027a578063d505accf146102aa578063dd62ed3e146102c6576100e8565b806370a08231146101e05780637ecebe001461021057806395d89b4114610240576100e8565b806323b872dd116100c657806323b872dd14610158578063313ce567146101885780633644e515146101a657806340c10f19146101c4576100e8565b806306fdde03146100ec578063095ea7b31461010a57806318160ddd1461013a575b5f5ffd5b6100f46102f6565b60405161010191906110d1565b60405180910390f35b610124600480360381019061011f9190611182565b610381565b60405161013191906111da565b60405180910390f35b61014261046e565b60405161014f9190611202565b60405180910390f35b610172600480360381019061016d919061121b565b610474565b60405161017f91906111da565b60405180910390f35b61019061077f565b60405161019d9190611286565b60405180910390f35b6101ae6107a3565b6040516101bb91906112b7565b60405180910390f35b6101de60048036038101906101d99190611182565b6107ff565b005b6101fa60048036038101906101f591906112d0565b61080d565b6040516102079190611202565b60405180910390f35b61022a600480360381019061022591906112d0565b610822565b6040516102379190611202565b60405180910390f35b610248610837565b60405161025591906110d1565b60405180910390f35b61027860048036038101906102739190611182565b6108c3565b005b610294600480360381019061028f9190611182565b6108d1565b6040516102a191906111da565b60405180910390f35b6102c460048036038101906102bf919061134f565b610a63565b005b6102e060048036038101906102db91906113ec565b610d50565b6040516102ed9190611202565b60405180910390f35b5f805461030290611457565b80601f016020809104026020016040519081016040528092919081815260200182805461032e90611457565b80156103795780601f1061035057610100808354040283529160200191610379565b820191905f5260205f20905b81548152906001019060200180831161035c57829003601f168201915b505050505081565b5f8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161045c9190611202565b60405180910390a36001905092915050565b60025481565b5f5f60045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490505f60035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821461062d57838210156105a457853383866040517f91beda2400000000000000000000000000000000000000000000000000000000815260040161059b9493929190611496565b60405180910390fd5b83826105b09190611506565b60045f8873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b83811015610676578581856040517fdb42144d00000000000000000000000000000000000000000000000000000000815260040161066d93929190611539565b60405180910390fd5b83816106829190611506565b60035f8873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508360035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8660405161076a9190611202565b60405180910390a36001925050509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f7f000000000000000000000000000000000000000000000000000000000000000046146107d8576107d3610d70565b6107fa565b7f00000000000000000000000000000000000000000000000000000000000000005b905090565b6108098282610dfa565b5050565b6003602052805f5260405f205f915090505481565b6005602052805f5260405f205f915090505481565b6001805461084490611457565b80601f016020809104026020016040519081016040528092919081815260200182805461087090611457565b80156108bb5780601f10610892576101008083540402835291602001916108bb565b820191905f5260205f20905b81548152906001019060200180831161089e57829003601f168201915b505050505081565b6108cd8282610f11565b5050565b5f5f60035f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490508281101561095c573381846040517fdb42144d00000000000000000000000000000000000000000000000000000000815260040161095393929190611539565b60405180910390fd5b82816109689190611506565b60035f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508260035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051610a509190611202565b60405180910390a3600191505092915050565b42841015610aa6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9d906115b8565b60405180910390fd5b5f6001610ab16107a3565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98a8a8a60055f8f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050558b604051602001610b36969594939291906115d6565b60405160208183030381529060405280519060200120604051602001610b5d9291906116a9565b604051602081830303815290604052805190602001208585856040515f8152602001604052604051610b9294939291906116df565b6020604051602081039080840390855afa158015610bb2573d5f5f3e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015610c2557508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b610c64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5b9061176c565b60405180910390fd5b8560045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92587604051610d3f9190611202565b60405180910390a350505050505050565b6004602052815f5260405f20602052805f5260405f205f91509150505481565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f604051610da09190611826565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc64630604051602001610ddf95949392919061183c565b60405160208183030381529060405280519060200120905090565b5f81600254610e09919061188d565b9050600254811015610e5657600254826040517f93ea3e04000000000000000000000000000000000000000000000000000000008152600401610e4d9291906118c0565b60405180910390fd5b806002819055508160035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610f049190611202565b60405180910390a3505050565b5f60035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015610f9b578281836040517fdb42144d000000000000000000000000000000000000000000000000000000008152600401610f9293929190611539565b60405180910390fd5b8181610fa79190611506565b60035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508160025f82825403925050819055505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516110549190611202565b60405180910390a3505050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f6110a382611061565b6110ad818561106b565b93506110bd81856020860161107b565b6110c681611089565b840191505092915050565b5f6020820190508181035f8301526110e98184611099565b905092915050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61111e826110f5565b9050919050565b61112e81611114565b8114611138575f5ffd5b50565b5f8135905061114981611125565b92915050565b5f819050919050565b6111618161114f565b811461116b575f5ffd5b50565b5f8135905061117c81611158565b92915050565b5f5f60408385031215611198576111976110f1565b5b5f6111a58582860161113b565b92505060206111b68582860161116e565b9150509250929050565b5f8115159050919050565b6111d4816111c0565b82525050565b5f6020820190506111ed5f8301846111cb565b92915050565b6111fc8161114f565b82525050565b5f6020820190506112155f8301846111f3565b92915050565b5f5f5f60608486031215611232576112316110f1565b5b5f61123f8682870161113b565b93505060206112508682870161113b565b92505060406112618682870161116e565b9150509250925092565b5f60ff82169050919050565b6112808161126b565b82525050565b5f6020820190506112995f830184611277565b92915050565b5f819050919050565b6112b18161129f565b82525050565b5f6020820190506112ca5f8301846112a8565b92915050565b5f602082840312156112e5576112e46110f1565b5b5f6112f28482850161113b565b91505092915050565b6113048161126b565b811461130e575f5ffd5b50565b5f8135905061131f816112fb565b92915050565b61132e8161129f565b8114611338575f5ffd5b50565b5f8135905061134981611325565b92915050565b5f5f5f5f5f5f5f60e0888a03121561136a576113696110f1565b5b5f6113778a828b0161113b565b97505060206113888a828b0161113b565b96505060406113998a828b0161116e565b95505060606113aa8a828b0161116e565b94505060806113bb8a828b01611311565b93505060a06113cc8a828b0161133b565b92505060c06113dd8a828b0161133b565b91505092959891949750929550565b5f5f60408385031215611402576114016110f1565b5b5f61140f8582860161113b565b92505060206114208582860161113b565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061146e57607f821691505b6020821081036114815761148061142a565b5b50919050565b61149081611114565b82525050565b5f6080820190506114a95f830187611487565b6114b66020830186611487565b6114c360408301856111f3565b6114d060608301846111f3565b95945050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6115108261114f565b915061151b8361114f565b9250828203905081811115611533576115326114d9565b5b92915050565b5f60608201905061154c5f830186611487565b61155960208301856111f3565b61156660408301846111f3565b949350505050565b7f5045524d49545f444541444c494e455f455850495245440000000000000000005f82015250565b5f6115a260178361106b565b91506115ad8261156e565b602082019050919050565b5f6020820190508181035f8301526115cf81611596565b9050919050565b5f60c0820190506115e95f8301896112a8565b6115f66020830188611487565b6116036040830187611487565b61161060608301866111f3565b61161d60808301856111f3565b61162a60a08301846111f3565b979650505050505050565b5f81905092915050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f611673600283611635565b915061167e8261163f565b600282019050919050565b5f819050919050565b6116a361169e8261129f565b611689565b82525050565b5f6116b382611667565b91506116bf8285611692565b6020820191506116cf8284611692565b6020820191508190509392505050565b5f6080820190506116f25f8301876112a8565b6116ff6020830186611277565b61170c60408301856112a8565b61171960608301846112a8565b95945050505050565b7f494e56414c49445f5349474e45520000000000000000000000000000000000005f82015250565b5f611756600e8361106b565b915061176182611722565b602082019050919050565b5f6020820190508181035f8301526117838161174a565b9050919050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f81546117b281611457565b6117bc818661178a565b9450600182165f81146117d657600181146117eb5761181d565b60ff198316865281151582028601935061181d565b6117f485611794565b5f5b83811015611815578154818901526001820191506020810190506117f6565b838801955050505b50505092915050565b5f61183182846117a6565b915081905092915050565b5f60a08201905061184f5f8301886112a8565b61185c60208301876112a8565b61186960408301866112a8565b61187660608301856111f3565b6118836080830184611487565b9695505050505050565b5f6118978261114f565b91506118a28361114f565b92508282019050808211156118ba576118b96114d9565b5b92915050565b5f6040820190506118d35f8301856111f3565b6118e060208301846111f3565b939250505056fea2646970667358221220226cdfb48af44e510e231a6c3c585d06e20e6d5c487388fd5cba419d6368894064736f6c634300081e0033"
|
|
777
|
+
|
|
778
|
+
@overload
|
|
779
|
+
@classmethod
|
|
780
|
+
def deploy(cls, _name: str, _symbol: str, _decimals: uint8, *, from_: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, return_tx: Literal[False] = False, request_type: Literal["call"], chain: Optional[Chain] = None, gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> bytearray:
|
|
781
|
+
"""
|
|
782
|
+
Args:
|
|
783
|
+
_name: string
|
|
784
|
+
_symbol: string
|
|
785
|
+
_decimals: uint8
|
|
786
|
+
"""
|
|
787
|
+
...
|
|
788
|
+
|
|
789
|
+
@overload
|
|
790
|
+
@classmethod
|
|
791
|
+
def deploy(cls, _name: str, _symbol: str, _decimals: uint8, *, from_: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, return_tx: Literal[False] = False, request_type: Literal["tx"] = "tx", chain: Optional[Chain] = None, gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> MockERC20:
|
|
792
|
+
"""
|
|
793
|
+
Args:
|
|
794
|
+
_name: string
|
|
795
|
+
_symbol: string
|
|
796
|
+
_decimals: uint8
|
|
797
|
+
"""
|
|
798
|
+
...
|
|
799
|
+
|
|
800
|
+
@overload
|
|
801
|
+
@classmethod
|
|
802
|
+
def deploy(cls, _name: str, _symbol: str, _decimals: uint8, *, from_: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, return_tx: Literal[False] = False, request_type: Literal["estimate"], chain: Optional[Chain] = None, gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> int:
|
|
803
|
+
"""
|
|
804
|
+
Args:
|
|
805
|
+
_name: string
|
|
806
|
+
_symbol: string
|
|
807
|
+
_decimals: uint8
|
|
808
|
+
"""
|
|
809
|
+
...
|
|
810
|
+
|
|
811
|
+
@overload
|
|
812
|
+
@classmethod
|
|
813
|
+
def deploy(cls, _name: str, _symbol: str, _decimals: uint8, *, from_: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, return_tx: Literal[False] = False, request_type: Literal["access_list"], chain: Optional[Chain] = None, gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Tuple[Dict[Address, List[int]], int]:
|
|
814
|
+
"""
|
|
815
|
+
Args:
|
|
816
|
+
_name: string
|
|
817
|
+
_symbol: string
|
|
818
|
+
_decimals: uint8
|
|
819
|
+
"""
|
|
820
|
+
...
|
|
821
|
+
|
|
822
|
+
@overload
|
|
823
|
+
@classmethod
|
|
824
|
+
def deploy(cls, _name: str, _symbol: str, _decimals: uint8, *, from_: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, return_tx: Literal[True], request_type: Literal["tx"] = "tx", chain: Optional[Chain] = None, gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> TransactionAbc[MockERC20]:
|
|
825
|
+
"""
|
|
826
|
+
Args:
|
|
827
|
+
_name: string
|
|
828
|
+
_symbol: string
|
|
829
|
+
_decimals: uint8
|
|
830
|
+
"""
|
|
831
|
+
...
|
|
832
|
+
|
|
833
|
+
@classmethod
|
|
834
|
+
def deploy(cls, _name: str, _symbol: str, _decimals: uint8, *, from_: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, return_tx: bool = False, request_type: RequestType = "tx", chain: Optional[Chain] = None, gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Union[bytearray, MockERC20, int, Tuple[Dict[Address, List[int]], int], TransactionAbc[MockERC20]]:
|
|
835
|
+
"""
|
|
836
|
+
Args:
|
|
837
|
+
_name: string
|
|
838
|
+
_symbol: string
|
|
839
|
+
_decimals: uint8
|
|
840
|
+
"""
|
|
841
|
+
return cls._deploy(request_type, [_name, _symbol, _decimals], return_tx, MockERC20, from_, value, gas_limit, {}, chain, gas_price, max_fee_per_gas, max_priority_fee_per_gas, access_list, type, block, confirmations)
|
|
842
|
+
|
|
843
|
+
@classmethod
|
|
844
|
+
def get_creation_code(cls) -> bytes:
|
|
845
|
+
return cls._get_creation_code({})
|
|
846
|
+
|
|
847
|
+
@overload
|
|
848
|
+
def mint(self, to_: Union[Account, Address], value_: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["call"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> None:
|
|
849
|
+
"""
|
|
850
|
+
Args:
|
|
851
|
+
to_: address
|
|
852
|
+
value_: uint256
|
|
853
|
+
"""
|
|
854
|
+
...
|
|
855
|
+
|
|
856
|
+
@overload
|
|
857
|
+
def mint(self, to_: Union[Account, Address], value_: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["estimate"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> int:
|
|
858
|
+
"""
|
|
859
|
+
Args:
|
|
860
|
+
to_: address
|
|
861
|
+
value_: uint256
|
|
862
|
+
"""
|
|
863
|
+
...
|
|
864
|
+
|
|
865
|
+
@overload
|
|
866
|
+
def mint(self, to_: Union[Account, Address], value_: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["access_list"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Tuple[Dict[Address, List[int]], int]:
|
|
867
|
+
"""
|
|
868
|
+
Args:
|
|
869
|
+
to_: address
|
|
870
|
+
value_: uint256
|
|
871
|
+
"""
|
|
872
|
+
...
|
|
873
|
+
|
|
874
|
+
@overload
|
|
875
|
+
def mint(self, to_: Union[Account, Address], value_: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["tx"] = "tx", gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> TransactionAbc[None]:
|
|
876
|
+
"""
|
|
877
|
+
Args:
|
|
878
|
+
to_: address
|
|
879
|
+
value_: uint256
|
|
880
|
+
"""
|
|
881
|
+
...
|
|
882
|
+
|
|
883
|
+
def mint(self, to_: Union[Account, Address], value_: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: RequestType = 'tx', gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Union[None, TransactionAbc[None], int, Tuple[Dict[Address, List[int]], int]]:
|
|
884
|
+
"""
|
|
885
|
+
Args:
|
|
886
|
+
to_: address
|
|
887
|
+
value_: uint256
|
|
888
|
+
"""
|
|
889
|
+
return self._execute(self.chain, request_type, "40c10f19", [to_, value_], True if request_type == "tx" else False, NoneType, from_, to if to is not None else str(self.address), value, gas_limit, gas_price, max_fee_per_gas, max_priority_fee_per_gas, access_list, type, block, confirmations)
|
|
890
|
+
|
|
891
|
+
@overload
|
|
892
|
+
def burn(self, from__: Union[Account, Address], value_: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["call"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> None:
|
|
893
|
+
"""
|
|
894
|
+
Args:
|
|
895
|
+
from__: address
|
|
896
|
+
value_: uint256
|
|
897
|
+
"""
|
|
898
|
+
...
|
|
899
|
+
|
|
900
|
+
@overload
|
|
901
|
+
def burn(self, from__: Union[Account, Address], value_: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["estimate"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> int:
|
|
902
|
+
"""
|
|
903
|
+
Args:
|
|
904
|
+
from__: address
|
|
905
|
+
value_: uint256
|
|
906
|
+
"""
|
|
907
|
+
...
|
|
908
|
+
|
|
909
|
+
@overload
|
|
910
|
+
def burn(self, from__: Union[Account, Address], value_: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["access_list"], gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Tuple[Dict[Address, List[int]], int]:
|
|
911
|
+
"""
|
|
912
|
+
Args:
|
|
913
|
+
from__: address
|
|
914
|
+
value_: uint256
|
|
915
|
+
"""
|
|
916
|
+
...
|
|
917
|
+
|
|
918
|
+
@overload
|
|
919
|
+
def burn(self, from__: Union[Account, Address], value_: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: Literal["tx"] = "tx", gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> TransactionAbc[None]:
|
|
920
|
+
"""
|
|
921
|
+
Args:
|
|
922
|
+
from__: address
|
|
923
|
+
value_: uint256
|
|
924
|
+
"""
|
|
925
|
+
...
|
|
926
|
+
|
|
927
|
+
def burn(self, from__: Union[Account, Address], value_: uint256, *, from_: Optional[Union[Account, Address, str]] = None, to: Optional[Union[Account, Address, str]] = None, value: Union[int, str] = 0, gas_limit: Optional[Union[int, Literal["max"], Literal["auto"]]] = None, request_type: RequestType = 'tx', gas_price: Optional[Union[int, str]] = None, max_fee_per_gas: Optional[Union[int, str]] = None, max_priority_fee_per_gas: Optional[Union[int, str]] = None, access_list: Optional[Union[Dict[Union[Account, Address, str], List[int]], Literal["auto"]]] = None, type: Optional[int] = None, block: Optional[Union[int, Literal["latest"], Literal["pending"], Literal["earliest"], Literal["safe"], Literal["finalized"]]] = None, confirmations: Optional[int] = None) -> Union[None, TransactionAbc[None], int, Tuple[Dict[Address, List[int]], int]]:
|
|
928
|
+
"""
|
|
929
|
+
Args:
|
|
930
|
+
from__: address
|
|
931
|
+
value_: uint256
|
|
932
|
+
"""
|
|
933
|
+
return self._execute(self.chain, request_type, "9dc29fac", [from__, value_], True if request_type == "tx" else False, NoneType, from_, to if to is not None else str(self.address), value, gas_limit, gas_price, max_fee_per_gas, max_priority_fee_per_gas, access_list, type, block, confirmations)
|
|
934
|
+
|
|
935
|
+
MockERC20.mint.selector = bytes4(b'@\xc1\x0f\x19')
|
|
936
|
+
MockERC20.burn.selector = bytes4(b'\x9d\xc2\x9f\xac')
|
package/dist/wakeGenerator.d.ts
CHANGED
package/dist/wakeGenerator.js
CHANGED
|
@@ -118,6 +118,21 @@ def inspect_pytypes():
|
|
|
118
118
|
if not module_path.startswith("pytypes.src"):
|
|
119
119
|
continue
|
|
120
120
|
|
|
121
|
+
# Skip abstract-like pytypes that cannot deploy
|
|
122
|
+
creation_code_val = None
|
|
123
|
+
try:
|
|
124
|
+
creation_code = getattr(obj, "_creation_code", None)
|
|
125
|
+
if creation_code:
|
|
126
|
+
if isinstance(creation_code, (bytes, bytearray)):
|
|
127
|
+
creation_code_val = creation_code.hex()
|
|
128
|
+
else:
|
|
129
|
+
creation_code_val = str(creation_code)
|
|
130
|
+
except Exception:
|
|
131
|
+
creation_code_val = None
|
|
132
|
+
|
|
133
|
+
if not creation_code_val:
|
|
134
|
+
continue
|
|
135
|
+
|
|
121
136
|
# Determine mutable functions from _abi
|
|
122
137
|
mutable_functions = set()
|
|
123
138
|
if hasattr(obj, "_abi"):
|
|
@@ -128,12 +143,13 @@ def inspect_pytypes():
|
|
|
128
143
|
mutable_functions.add(item.get("name"))
|
|
129
144
|
except Exception:
|
|
130
145
|
pass
|
|
131
|
-
|
|
146
|
+
|
|
132
147
|
contract_info = {
|
|
133
148
|
"name": name,
|
|
134
149
|
"module": module_path,
|
|
135
150
|
"methods": [],
|
|
136
|
-
"deploy_args": []
|
|
151
|
+
"deploy_args": [],
|
|
152
|
+
"creation_code": creation_code_val
|
|
137
153
|
}
|
|
138
154
|
|
|
139
155
|
try:
|
|
@@ -196,6 +212,13 @@ class WakeGenerator {
|
|
|
196
212
|
this.foundryRoot = foundryRoot;
|
|
197
213
|
this.options = options;
|
|
198
214
|
}
|
|
215
|
+
isInterfaceLike(contract) {
|
|
216
|
+
var _a, _b;
|
|
217
|
+
const name = contract.name || '';
|
|
218
|
+
const interfaceNamePattern = /^I[A-Z].+/;
|
|
219
|
+
const inInterfacesModule = ((_a = contract.module) === null || _a === void 0 ? void 0 : _a.includes('.interfaces')) || ((_b = contract.module) === null || _b === void 0 ? void 0 : _b.includes('/interfaces'));
|
|
220
|
+
return interfaceNamePattern.test(name) || inInterfacesModule;
|
|
221
|
+
}
|
|
199
222
|
logDebug(message, obj) {
|
|
200
223
|
if (!this.options.debug)
|
|
201
224
|
return;
|
|
@@ -357,28 +380,48 @@ class WakeGenerator {
|
|
|
357
380
|
const introspection = await this.inspectPytypes();
|
|
358
381
|
const contracts = introspection.contracts;
|
|
359
382
|
this.logDebug('Discovered contracts from pytypes', contracts.map(c => c.name));
|
|
360
|
-
const filteredContracts =
|
|
383
|
+
const filteredContracts = [];
|
|
384
|
+
for (const c of contracts) {
|
|
385
|
+
const isInterface = this.isInterfaceLike(c);
|
|
386
|
+
const explicitlyIncluded = !!(this.options.include && (this.options.include.contractOnly.has(c.name) || this.options.include.functions.has(c.name)));
|
|
387
|
+
if (!explicitlyIncluded && isInterface) {
|
|
388
|
+
this.logDebug('Skipping interface-like contract', { contract: c.name, module: c.module });
|
|
389
|
+
continue;
|
|
390
|
+
}
|
|
391
|
+
const hasCreationCode = typeof c.creation_code === 'string' && c.creation_code.trim().length > 0;
|
|
392
|
+
if (!hasCreationCode) {
|
|
393
|
+
this.logDebug('Skipping contract without creation code (likely abstract)', { contract: c.name, module: c.module });
|
|
394
|
+
continue;
|
|
395
|
+
}
|
|
396
|
+
if (!this.isContractAllowed(c.name)) {
|
|
397
|
+
continue;
|
|
398
|
+
}
|
|
399
|
+
const keptMethods = c.methods.filter(m => this.isFunctionIncluded(c.name, m));
|
|
400
|
+
if (keptMethods.length === 0) {
|
|
401
|
+
this.logDebug('Skipping contract with no included mutable methods', { contract: c.name });
|
|
402
|
+
continue;
|
|
403
|
+
}
|
|
404
|
+
filteredContracts.push({ ...c, methods: keptMethods });
|
|
405
|
+
}
|
|
361
406
|
const contractFlows = new Map();
|
|
362
407
|
for (const contract of filteredContracts) {
|
|
363
408
|
const flows = [];
|
|
364
409
|
for (const method of contract.methods) {
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
actor = types_1.Actor.ADMIN;
|
|
373
|
-
}
|
|
410
|
+
// Check admin
|
|
411
|
+
const sig = `${method.name}(${method.args.map(a => a.type).join(',')})`;
|
|
412
|
+
let actor = types_1.Actor.ACTOR;
|
|
413
|
+
if (this.options.admin && this.options.admin.has(contract.name)) {
|
|
414
|
+
const adminSet = this.options.admin.get(contract.name);
|
|
415
|
+
if (this.matchesSignatureOrName(sig, adminSet)) {
|
|
416
|
+
actor = types_1.Actor.ADMIN;
|
|
374
417
|
}
|
|
375
|
-
flows.push({
|
|
376
|
-
contractName: contract.name,
|
|
377
|
-
method: method,
|
|
378
|
-
actor: actor,
|
|
379
|
-
mode: types_1.Mode.NORMAL
|
|
380
|
-
});
|
|
381
418
|
}
|
|
419
|
+
flows.push({
|
|
420
|
+
contractName: contract.name,
|
|
421
|
+
method: method,
|
|
422
|
+
actor: actor,
|
|
423
|
+
mode: types_1.Mode.NORMAL
|
|
424
|
+
});
|
|
382
425
|
}
|
|
383
426
|
if (flows.length > 0) {
|
|
384
427
|
contractFlows.set(contract.name, flows);
|
|
@@ -431,15 +474,27 @@ class WakeGenerator {
|
|
|
431
474
|
await this.ensureBuild();
|
|
432
475
|
await this.runWakeUp();
|
|
433
476
|
const introspection = await this.inspectPytypes();
|
|
434
|
-
const filtered = introspection.contracts
|
|
477
|
+
const filtered = introspection.contracts
|
|
478
|
+
.filter(c => {
|
|
479
|
+
const isInterface = this.isInterfaceLike(c);
|
|
480
|
+
const explicitlyIncluded = !!(this.options.include && (this.options.include.contractOnly.has(c.name) || this.options.include.functions.has(c.name)));
|
|
481
|
+
if (!explicitlyIncluded && isInterface) {
|
|
482
|
+
return false;
|
|
483
|
+
}
|
|
484
|
+
const hasCreationCode = typeof c.creation_code === 'string' && c.creation_code.trim().length > 0;
|
|
485
|
+
if (!hasCreationCode) {
|
|
486
|
+
return false;
|
|
487
|
+
}
|
|
488
|
+
return this.isContractAllowed(c.name);
|
|
489
|
+
})
|
|
490
|
+
.map(c => ({ ...c, methods: c.methods.filter(m => this.isFunctionIncluded(c.name, m)) }))
|
|
491
|
+
.filter(c => c.methods.length > 0);
|
|
435
492
|
console.log('Available contracts/functions (Wake):');
|
|
436
493
|
for (const c of filtered) {
|
|
437
494
|
console.log(`- ${c.name} (${c.module})`);
|
|
438
495
|
for (const m of c.methods) {
|
|
439
496
|
const sig = `${m.name}(${m.args.map(a => a.type).join(',')})`;
|
|
440
|
-
|
|
441
|
-
console.log(` • ${sig}`);
|
|
442
|
-
}
|
|
497
|
+
console.log(` • ${sig}`);
|
|
443
498
|
}
|
|
444
499
|
}
|
|
445
500
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "recon-generate",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"description": "CLI to scaffold Recon fuzzing suite inside Foundry projects",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "tsc -p .",
|
|
11
|
+
"postbuild": "node scripts/copy-builtins.js",
|
|
11
12
|
"prepare": "npm run build"
|
|
12
13
|
},
|
|
13
14
|
"license": "GPL-2.0",
|