Skip to content

Latest commit

 

History

History
243 lines (134 loc) · 11.4 KB

CHANGELOG.md

File metadata and controls

243 lines (134 loc) · 11.4 KB

Change log

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

  • Fixed generating Event and Function structs where the ABI has a tuple with more than 12 fields.

    The Event and Function structs in those situations will now render without Debug nor PartialEq support to allows for Rust to compile properly.

  • Fixed ABI generation, ambiguous 'as_ref' implementation when using alloy-primitive crate.
  • Bumped dependencies to substreams to 0.6 and prost to 0.13 (see Upgrade notes)
  • Fixed AbiGen when in presence of functions that was has leading underscores or casing differences.

    This was generating multiple Rust struct with the same name leading to compilation errors. Now, those cases will be de-duped and you will end up with N Rust struct all suffixed from 1 to N, like TotalSupply1 and TotalSupply2.

  • Fixed AbiGen generated Event#NAME and Function#Name static const in presence of multiple overloads.

    This was previously using the de-duped name but this was wrong as the intention was always to be the ABI's defined named.

  • Re-generated the Rust Ethereum bindings with latest Firehose Ethereum Protobuf definitions.
  • Added conversion from &pb::BigInt to substreams::scalar::BigInt.

  • Added conversion from &pb::BigInt to substreams::scalar::BigDecimal.

  • Re-generated the Rust Ethereum bindings with latest Firehose Ethereum Protobuf definitions.
  • Fixed generated ABI code and decoding when dealing with indexed dynamic event like event ContractDeployed(string indexed value). We introduced substreams_ethereum::IndexedDynamicValue<T> to hold the hash value which is equivalent to topic.
  • Fix bug where Int was not encoded properly in ABI generator
  • Blocks with DetailLevel set to Base now have transaction receipt information. Transaction successfulness is now supported.
  • Update block_view with updated ethereum block at https://github.com/streamingfast/firehose-ethereum/releases/download/v2.0.0/ethereum-v1.1.0.spkg with added field DetailLevel

    IMPORTANT:: Using blocks with DetailLevel set to Extended (the default level), block.transactions() returns only successful transactions. Blocks with DetailLevel set to Base does not have information about transaction successfulness. Note that a failed transaction will never have logs attached to it.

  • Generate ABI from bytes with method from_bytes of Abigen Example usage:
Abigen::from_bytes("Contract", content_bytes))?
            .generate()?
            .write_to_file("src/abi/contract.rs")?;
  • Fixed ABI code generator generating invalid code encode code when a function has a parameter of type tuple.
  • Added timestamp on Block type, returns a reference to the header's timestamp.

  • Re-generated Protobuf Block type using latest firehose-ethereum source, this brings in some missing BalanceChange#Reason enum values.

  • Added parent on CallView to retrieve the parent call of the current Call pointed to by CallView

  • Added logs_with_calls on TransactionTrace which iterates over the logs of the transaction (excluding those from call that were reverted) and yields each log as a tuple (&Log, CallView).

  • Fixed encoding of function when dealing with a bool referenced as a sub type (like in a function that accepts bool[]).

  • Added support for tuple in event in ABI generated code.

  • Fixed wrong handling of FixedArray when the array element's type is dynamic itself in ABI generated code.

  • Re-exporting block_view from substreams-ethereum-core
  • Fixed bug in ABI generation where uint was not properly handled
  • Bump substreams crate
  • Changing into() call when converting to BigInt in abi to call the proper signed or unsigned encoding
  • Adding into() method from BigInt to use unsigned_bytes_be
  • Bump substreams crate
  • Replacing EthBigInt and ethabi::Uint to only use substreams-rs scalar BigInt struct.
  • Made Windows target(s) able to run tests when depending on substreams-ethereum crate.

  • Adding allow attribute(s) to remove warnings for code generated by ABI generator (should be good now).

  • Bump substreams to 0.3.0.

  • Adding allow attribute(s) to remove warnings for code generated by ABI generator.

  • Bump substreams.
  • Fixed decoding of event where some indexed fields were intN (int8 to int256 by increment of 8).

  • Fixed decoding of event where some unindexed fields were fixed array with sub element being dynamic types (bytes[2]).

  • Fixed decoding of event where some unindexed fields were fixed bytes (bytes8 to bytes32).

  • Added RPC batching functionality and the RPCDecodable trait to allow decoding of RPC responses.

  • Breaking change
    • Replaced num_bigint with EthBigInt and BigInt from substreams-rs crate
  • Fixed issue when type of field was Vec of Uint and the underlying passed in value wasn't cloned. The clone only occurs when it is a Vec and not when the type is only a Uint.
  • Fixed issue with dependency with api generation. Semver reference for proper way of importing dependencies.
  • Adding ABI function generation first draft
  • Adding tests for decoding of different value types
  • Breaking Replaced substreams-ethereum/pb::eth::v1 to substreams-ethereum/pb::eth::v2 (perform a global replace of any references of substreams-ethereum/pb::eth::v1 to substreams-ethereum/pb::eth::v2 and don't forget to re-generate ABI bindings also which depends on substreams-ethereum/pb::eth::v1).

  • Breaking substreams-ethereum/pb::eth::rpc::RpcCall#method_signature is now named data.

  • Breaking Bumped prost to ^0.11.0 (will requires you to bump substreams = "~0.0.19").

  • Breaking Removed must_decode on ABI generated Event code. Instead, use if let Some(event) = <EventType>::match_and_decode(&log). For example, if you had the following code:

    if !abi::erc721::events::Transfer::match_log(log) {
      return None;
    }
    
    let transfer = abi::erc721::events::Transfer::must_decode(log);
    

    Replace it with

    if let Some(transfer) = abi::erc721::events::Transfer::match_and_decode(log) {
      // Do something
    }
    
  • Fixed packaging issue.

Skipped 0.1.8 by mistake

  • Bumped substreams version to 0.0.17
  • Bump versions in release and bump substreams create dependency
  • Adding helper functions for block handling (transactions, receipts and logs)
  • Rework of crate structure
  • Fix bug where underlying ethabi library was incorrectly decoding an int24 to an un-overflowing value. This resulted in always having a positive number. Switching to using BigInt, proper overflowing of int24 value makes it that we can have negative values.
  • Changed crate structure to separate substreams-ethereum-core from substreams-ethereum.
  • Added helpers to pb::Block and pb::TransactionTrace to facilitate iterating over events.
  • Removed Event::must_decode, use the new Event::match_and_decode instead.
  • Fixed bug when an ABI has multiple times the same Event's name but with a different signature.
  • Fixed bytes usage in Abigen (was generating address type).

  • Fixed bug on Abigen when event contains unindexed/indexed fields on certain ordering of them.

  • Improved generated code for ABI generator for events to Self wherever possible.

  • Bumped to Substreams 0.0.11.

  • substreams::init is now always defined and the actual getrandom custom registration is conditional based on the platform you compile to. This will enable non wasm32-unknown-unknown target to compile which is required for unit testing

  • Nothing
  • Added codegen API for ABI bindings that can be used instead of the macro for those who prefer that.

  • Added ABI bindings macro use_contract (restricted to Events for now).

  • Added NULL_ADDRESS constant that can be re-used by dependent projects.

  • StreamingFast Firehose Block generated Rust code is now included in this library directly.