Changelog#

0.8.0 (unreleased)#

Changed#

  • Added an explicit typing_extensions dependency. (PR_57)

  • Various boolean arguments are now keyword-only to prevent usage errors. (PR_57)

  • Field names clashing with Python built-ins (hash, type, id) are suffixed with an underscore. (PR_57)

  • AccountSigner takes LocalSigner specifically and not just any BaseSigner. (PR_62)

  • ClientSession.estimate_transact() and estimate_deploy() now require a sender_address parameter. (PR_62)

  • Switched to alysis from eth-tester for the backend of LocalProvider. (PR_70)

  • Bumped the minimum Python version to 3.10. (PR_72)

  • The entities are now dataclasses instead of namedtuples. (PR_75)

Added#

  • Client.transact() takes an optional return_events argument, allowing one to get “return values” from the transaction via events. (PR_52)

  • Exposed ClientSession, ConstructorCall, MethodCall, EventFilter, BoundConstructor, BoundConstructorCall, BoundMethod, BoundMethodCall, BoundEvent, BoundEventFilter from the top level. (PR_56)

  • Various methods that had a default Amount(0) for a parameter can now take None. (PR_57)

  • Support for overloaded methods via MultiMethod. (PR_59)

  • Expose HTTPProviderServer, LocalProvider, compile_contract_file that can be used for tests of Ethereum-using applications. These are gated behind optional features. (PR_54)

  • LocalProvider.take_snapshot() and revert_to_snapshot(). (PR_61)

  • AccountSigner.private_key property. (PR_62)

  • LocalProvider.add_account() method. (PR_62)

  • An optional sender_address parameter of ClientSession.eth_call(). (PR_62)

  • Expose Provider at the top level. (PR_63)

  • eth_getCode support (as ClientSession.eth_get_code()). (PR_64)

  • eth_getStorageAt support (as ClientSession.eth_get_storage_at()). (PR_64)

  • Support for the logs field in TxReceipt. (PR_68)

  • ClientSession.eth_get_logs() and eth_get_filter_logs(). (PR_68)

  • Support for a custom block number in gas estimation methods. (PR_70)

Fixed#

  • Process unnamed arguments in JSON entries correctly (as positional arguments). (PR_51)

  • More robust error handling in HTTP provider. (PR_63)

  • The transaction tip being set larger than the max gas price (which some providers don’t like). (PR_64)

  • Decoding error when fetching pending transactions. (PR_65)

  • Decoding error when fetching pending blocks. (PR_67)

  • Get the default nonce based on the pending block, not the latest one. (PR_68)

  • Using eth_getLogs instead of creating a filter in transact(). (PR_70)

  • Expect the block number to be non-null even for pending blocks, since that’s what providers return. (PR_70)

0.7.0 (09-07-2023)#

Changed#

  • ReadMethod and WriteMethod were merged into Method (with the corresponding merge of ContractABI routing objects and various bound calls). (PR_50)

Added#

  • Block.SAFE and Block.FINALIZED values. (PR_48)

  • FallbackProvider, two strategies for it (CycleFallback and PriorityFallback), and a framework for creating user-defined strategies (FallbackStrategy and FallbackStrategyFactory). (PR_49)

  • Mutability enum for defining contract method mutability. (PR_50)

0.6.0 (11-05-2023)#

Changed#

  • Parameter names and fields coinciding with Python keywords have _ appended to them on the creation of ABI objects. (PR_47)

Added#

  • Added support for Python 3.11. (PR_47)

Fixed#

  • Support the existence of outputs in the JSON ABI of a mutating method. (PR_47)

0.5.1 (14-11-2022)#

Fixed#

  • A bug in processing keyword arguments to contract calls. (PR_42)

0.5.0 (14-09-2022)#

Changed#

  • Bumped dependencies: eth-account>=0.6, eth-utils>=2, eth-abi>=3. (PR_40)

Fixed#

  • Return type of classmethods of Amount and Address now provides correct information to mypy in dependent projects. (PR_37)

0.4.2 (05-06-2022)#

Added#

  • __repr__/__eq__/__hash__ implementations for multiple entities. (PR_32)

  • eth_get_transaction_by_hash(), eth_block_number(), eth_get_block_by_hash(), eth_get_block_by_number() and corresponding entities. (PR_32)

  • eth_new_block_filter(), eth_new_pending_transaction_filter(), eth_new_filter(), eth_get_filter_changes() for low-level event filtering support. (PR_32)

  • iter_blocks(), iter_pending_transactions(), iter_events() for high-level event filtering support. (PR_32)

  • More fields in TxReceipt. (PR_32)

  • Error class for Contract ABI, and support of type="error" declarations in JSON ABI. (PR_33)

  • Error data parsing and matching it with known errors from the ABI when calling estimate_transact() and estimate_deploy(). (PR_33)

Fixed#

  • Removed TxReceipt export (making an exception here and not counting it as a breaking change, since nobody would have any use for creating one manually). (PR_32)

0.4.1 (01-05-2022)#

Added#

  • anyio support instead of just trio. (PR_27)

  • Raise ABIDecodingError on mismatch between the declared contract ABI and the bytestring returned from ethCall. (PR_29)

  • Support for gas overrides in transfer(), transact(), and deploy(). (PR_30)

0.4.0 (23-04-2022)#

Changed#

  • Added type/value checks when normalizing contract arguments. (PR_4)

  • Unpacking contract call results into specific types. (PR_4)

  • Address.as_checksum() renamed to Address.checksum (a cached property). (PR_5)

  • ContractABI and related types reworked. (PR_5)

Added#

  • Allowed one to declare ABI via Python calls instead of JSON. (PR_4)

  • Support for binding of contract arguments to named parameters. (PR_4)

  • An abi.struct() function to create struct types in contract definitions. (PR_5)

  • Hashing, more comparisons and arithmetic functions for Amount. (PR_5)

  • Hashing and equality for TxHash. (PR_5)

  • An empty nonpayable constructor is created for a contract if none is specified. (PR_5)

  • RemoteError and Unreachable exception types to report errors from client sessions in a standardized way. (PR_5)

0.3.0 (03-04-2022)#

Changed#

  • Merged SigningClient into Client, with the methods of the former now requiring an explicit Signer argument. (PR_1)

  • Exposed provider sessions via Client.session() context manager; all the client methods were moved to the returned session object. (PR_1)

Fixed#

  • Multiple fixes for typing of methods. (PR_1)

  • Fixed the handling of array-of-array ABI types. (PR_2)

  • Replaced assertions with more informative exceptions. (PR_3)

0.2.0 (19-03-2022)#

Initial release.