* fix(BREAKING): return Option for txs/receipts/blocks
Otherwise if a user asks for a transaction hash or block that does not exist yet they'll get an Error
* test: ensure that unmined txs return None receipts
* test: fix remaining tests
* chore: re-enable sparkpool gas oracle
* chore: fix celo tests
* fix: run the non-existing data against infura
* fix: fix etherscan gas oracle tests
* Implement Multicall functionality for batched calls
* Documentation, some modifications as suggested in the review
* (Abigen) handle single input arg and set output irrespective of mutability
* implement send functionality and allow clearing calls
* Fix detokenization, dont require pre-processing anymore
* panic when more than supported number of calls are pushed
* add doc for panics in case of add_call
* (multicall) eth_balance support, update bindings
* refactor: move multicall to its own directory
* fix: add infura api key
* ci: ensure CI runs on PRs from forks
* test(multicall): re-use aggregate call
* contract: make multicall docs compile and remove redundant clones
* ci: add public etherscan API key so that forks don't get rate limited
* chore: adjust test contract naming
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
* test(tokens): ensure nested tuples tokenize properly
* test(contract): add failing test with 2 args
This happens because the args are serialized as Token::Tuple, while instead they should be just a vector
* fix(tokens): add token flattening method to fix non-nested tuples
* fix: do not export the flatten function
* feat(provider): allow specifying a default polling interval param
This parameter is going to be used for all subsequent client calls by default. It can still be overriden with the internal
`interval` calls
* feat(contract): replace reference to Client with Arc
* feat(abigen): adjusts codegen to use Arcs
* fix(ethers): adjust examples to new apis
* fix(provider): return TxHash instead of PendingTransaction on tx submission
Returning a PendingTransaction allowed us to have nice ethers.js-like syntax where you submit
a transaction and then can immediately await it. Unfortunately, now that we use Arcs and not lifetimes
this meant that we would need to bind the function call in a variable, and then await on it, which is pretty
bad UX.
To fix this, we revert back to returning a TxHash and introduce a convenience method on the provider and the
contract which takes a tx_hash and returns a PendingTransaction object. The syntax ends up being slightly
more verbose (although more explicit), but the issue is fixed.
* feat(types): add optional Celo support
* feat: add Celo feature flags to all crates
* test(provider): add get_transaction celo test
* test(signer): add send_transaction celo test
* test(contract): add deploy and call contract function celo test
* feat(provider): implement Streamed logs
This utilizes eth_getFilterChanges. The stream struct must be instantiated with a factory that yields logs/hashes.
Consumers are expected to use the `FilterStream` trait in order to simplify their type definitions
* feat(provider): expose streaming methods
* test(provider): add new blocks/pending txs test
* feat(contract): allow events to be streamed
* test(contract): add integration test for streaming event logs
* perf(contract-factory): take abi and bytecode by value instead of reference
The abi, bytecode and the factory's deploy method now consume the structs instead of being passed by reference. While this means that
consumers might need to clone before using them, this gives us some more flexiblity around factories inside helper functions
* refactor(contract): use test helpers to reduce code dup
* chore: make clippy happy