web3 7.0.0b4__py3-none-any.whl → 7.0.0b5__py3-none-any.whl

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.
web3/_utils/contracts.py CHANGED
@@ -75,7 +75,7 @@ from web3._utils.normalizers import (
75
75
  abi_string_to_text,
76
76
  )
77
77
  from web3.exceptions import (
78
- BlockNumberOutofRange,
78
+ BlockNumberOutOfRange,
79
79
  Web3TypeError,
80
80
  Web3ValidationError,
81
81
  Web3ValueError,
@@ -424,7 +424,7 @@ def parse_block_identifier(
424
424
  ):
425
425
  return w3.eth.get_block(block_identifier)["number"]
426
426
  else:
427
- raise BlockNumberOutofRange
427
+ raise BlockNumberOutOfRange
428
428
 
429
429
 
430
430
  def parse_block_identifier_int(w3: "Web3", block_identifier_int: int) -> BlockNumber:
@@ -434,7 +434,7 @@ def parse_block_identifier_int(w3: "Web3", block_identifier_int: int) -> BlockNu
434
434
  last_block = w3.eth.get_block("latest")["number"]
435
435
  block_num = last_block + block_identifier_int + 1
436
436
  if block_num < 0:
437
- raise BlockNumberOutofRange
437
+ raise BlockNumberOutOfRange
438
438
  return BlockNumber(block_num)
439
439
 
440
440
 
@@ -453,7 +453,7 @@ async def async_parse_block_identifier(
453
453
  requested_block = await async_w3.eth.get_block(block_identifier)
454
454
  return requested_block["number"]
455
455
  else:
456
- raise BlockNumberOutofRange
456
+ raise BlockNumberOutOfRange
457
457
 
458
458
 
459
459
  async def async_parse_block_identifier_int(
@@ -466,5 +466,5 @@ async def async_parse_block_identifier_int(
466
466
  last_block_num = last_block["number"]
467
467
  block_num = last_block_num + block_identifier_int + 1
468
468
  if block_num < 0:
469
- raise BlockNumberOutofRange
469
+ raise BlockNumberOutOfRange
470
470
  return BlockNumber(block_num)
web3/_utils/events.py CHANGED
@@ -340,8 +340,8 @@ is_not_indexed = complement(is_indexed)
340
340
 
341
341
  class BaseEventFilterBuilder:
342
342
  formatter = None
343
- _fromBlock = None
344
- _toBlock = None
343
+ _from_block = None
344
+ _to_block = None
345
345
  _address = None
346
346
  _immutable = False
347
347
 
@@ -361,30 +361,30 @@ class BaseEventFilterBuilder:
361
361
  self._ordered_arg_names = tuple(arg["name"] for arg in event_abi["inputs"])
362
362
 
363
363
  @property
364
- def fromBlock(self) -> BlockIdentifier:
365
- return self._fromBlock
364
+ def from_block(self) -> BlockIdentifier:
365
+ return self._from_block
366
366
 
367
- @fromBlock.setter
368
- def fromBlock(self, value: BlockIdentifier) -> None:
369
- if self._fromBlock is None and not self._immutable:
370
- self._fromBlock = value
367
+ @from_block.setter
368
+ def from_block(self, value: BlockIdentifier) -> None:
369
+ if self._from_block is None and not self._immutable:
370
+ self._from_block = value
371
371
  else:
372
372
  raise Web3ValueError(
373
- f"fromBlock is already set to {self._fromBlock!r}. "
373
+ f"from_block is already set to {self._from_block!r}. "
374
374
  "Resetting filter parameters is not permitted"
375
375
  )
376
376
 
377
377
  @property
378
- def toBlock(self) -> BlockIdentifier:
379
- return self._toBlock
378
+ def to_block(self) -> BlockIdentifier:
379
+ return self._to_block
380
380
 
381
- @toBlock.setter
382
- def toBlock(self, value: BlockIdentifier) -> None:
383
- if self._toBlock is None and not self._immutable:
384
- self._toBlock = value
381
+ @to_block.setter
382
+ def to_block(self, value: BlockIdentifier) -> None:
383
+ if self._to_block is None and not self._immutable:
384
+ self._to_block = value
385
385
  else:
386
386
  raise Web3ValueError(
387
- f"toBlock is already set to {self._toBlock!r}. "
387
+ f"toBlock is already set to {self._to_block!r}. "
388
388
  "Resetting filter parameters is not permitted"
389
389
  )
390
390
 
@@ -432,8 +432,8 @@ class BaseEventFilterBuilder:
432
432
  def filter_params(self) -> FilterParams:
433
433
  params = {
434
434
  "topics": self.topics,
435
- "fromBlock": self.fromBlock,
436
- "toBlock": self.toBlock,
435
+ "fromBlock": self.from_block,
436
+ "toBlock": self.to_block,
437
437
  "address": self.address,
438
438
  }
439
439
  return valfilter(lambda x: x is not None, params)
web3/_utils/filters.py CHANGED
@@ -73,8 +73,8 @@ def construct_event_filter_params(
73
73
  contract_address: Optional[ChecksumAddress] = None,
74
74
  argument_filters: Optional[Dict[str, Any]] = None,
75
75
  topics: Optional[Sequence[HexStr]] = None,
76
- fromBlock: Optional[BlockIdentifier] = None,
77
- toBlock: Optional[BlockIdentifier] = None,
76
+ from_block: Optional[BlockIdentifier] = None,
77
+ to_block: Optional[BlockIdentifier] = None,
78
78
  address: Optional[ChecksumAddress] = None,
79
79
  ) -> Tuple[List[List[Optional[HexStr]]], FilterParams]:
80
80
  filter_params: FilterParams = {}
@@ -121,11 +121,11 @@ def construct_event_filter_params(
121
121
  else:
122
122
  validate_address(filter_params["address"])
123
123
 
124
- if fromBlock is not None:
125
- filter_params["fromBlock"] = fromBlock
124
+ if from_block is not None:
125
+ filter_params["fromBlock"] = from_block
126
126
 
127
- if toBlock is not None:
128
- filter_params["toBlock"] = toBlock
127
+ if to_block is not None:
128
+ filter_params["toBlock"] = to_block
129
129
 
130
130
  data_filters_set = construct_event_data_set(event_abi, abi_codec, argument_filters)
131
131
 
@@ -32,8 +32,6 @@ from eth_utils.curried import (
32
32
  is_integer,
33
33
  is_null,
34
34
  is_string,
35
- remove_0x_prefix,
36
- text_if_str,
37
35
  to_checksum_address,
38
36
  to_list,
39
37
  to_tuple,
@@ -52,10 +50,6 @@ from hexbytes import (
52
50
  from web3._utils.abi import (
53
51
  is_length,
54
52
  )
55
- from web3._utils.encoding import (
56
- hexstr_if_str,
57
- to_hex,
58
- )
59
53
  from web3._utils.error_formatters_utils import (
60
54
  raise_contract_logic_error_on_revert,
61
55
  raise_transaction_indexing_error_if_indexing,
@@ -583,16 +577,6 @@ PYTHONIC_REQUEST_FORMATTERS: Dict[RPCEndpoint, Callable[..., Any]] = {
583
577
  RPC.eth_sendTransaction: apply_formatter_at_index(transaction_param_formatter, 0),
584
578
  RPC.eth_signTransaction: apply_formatter_at_index(transaction_param_formatter, 0),
585
579
  RPC.eth_getProof: apply_formatter_at_index(to_hex_if_integer, 2),
586
- # personal
587
- RPC.personal_importRawKey: apply_formatter_at_index(
588
- compose(remove_0x_prefix, hexstr_if_str(to_hex)),
589
- 0,
590
- ),
591
- RPC.personal_sign: apply_formatter_at_index(text_if_str(to_hex), 0),
592
- RPC.personal_ecRecover: apply_formatter_at_index(text_if_str(to_hex), 0),
593
- RPC.personal_sendTransaction: apply_formatter_at_index(
594
- transaction_param_formatter, 0
595
- ),
596
580
  # Snapshot and Revert
597
581
  RPC.evm_revert: apply_formatter_at_index(integer_to_hex, 0),
598
582
  # tracing
@@ -788,13 +772,6 @@ PYTHONIC_RESULT_FORMATTERS: Dict[RPCEndpoint, Callable[..., Any]] = {
788
772
  RPC.eth_signTransaction: apply_formatter_if(is_not_null, signed_tx_formatter),
789
773
  RPC.eth_signTypedData: HexBytes,
790
774
  RPC.eth_syncing: apply_formatter_if(is_not_false, syncing_formatter),
791
- # personal
792
- RPC.personal_importRawKey: to_checksum_address,
793
- RPC.personal_listAccounts: apply_list_to_array_formatter(to_checksum_address),
794
- RPC.personal_listWallets: apply_list_to_array_formatter(geth_wallets_formatter),
795
- RPC.personal_newAccount: to_checksum_address,
796
- RPC.personal_sendTransaction: to_hexbytes(32),
797
- RPC.personal_signTypedData: HexBytes,
798
775
  # Transaction Pool
799
776
  RPC.txpool_content: transaction_pool_content_formatter,
800
777
  RPC.txpool_inspect: transaction_pool_inspect_formatter,
@@ -5,9 +5,6 @@ from .eth_module import (
5
5
  from .go_ethereum_admin_module import (
6
6
  GoEthereumAdminModuleTest,
7
7
  )
8
- from .go_ethereum_personal_module import (
9
- GoEthereumPersonalModuleTest,
10
- )
11
8
  from .go_ethereum_txpool_module import (
12
9
  GoEthereumAsyncTxPoolModuleTest,
13
10
  GoEthereumTxPoolModuleTest,