Commit graph

61 commits

Author SHA1 Message Date
Daniel Liu
8bc1887564
ethclient/gethclient: add block overrides to eth_call #26414 (#1377) 2025-08-22 16:48:17 +08:00
Daniel Liu
5311a890fa
ethclient: ensure returned subscription is nil on error #26976 (#1376)
Co-authored-by: norwnd <112318969+norwnd@users.noreply.github.com>
2025-08-22 16:47:37 +08:00
Daniel Liu
0e6d2f4b94
ethclient: fix panic when requesting missing blocks #26817 (#1375) 2025-08-22 16:46:55 +08:00
Daniel Liu
9acddd1792
ethclient/gethclient: ensure getProof keys parameter is not null #26409 (#1374) 2025-08-22 16:46:18 +08:00
Daniel Liu
cf6c595dd0
eth/filters, ethclient/gethclient: add fullTx option to pending tx filter #25186 #26189 (#1372)
* eth/filters, ethclient/gethclient: add fullTx option to pending tx filter #25186

This PR adds a way to subscribe to the _full_ pending transactions, as opposed to just being notified about hashes.

In use cases where client subscribes to newPendingTransactions and gets txhashes only to then request the actual transaction, the caller can now shortcut that flow and obtain the transactions directly.

Co-authored-by: Felix Lange <fjl@twurst.com>

* ethclient: docs, fix misleading comment #26189

---------

Co-authored-by: lmittmann <lmittmann@users.noreply.github.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
2025-08-22 16:44:51 +08:00
Daniel Liu
fc9c5bebe7
ethclient/gethclient: fix bugs in override object encoding #25616 (#1371) 2025-08-22 16:44:06 +08:00
Daniel Liu
aa88fe1d86
ethclient: add PeerCount method #24849 (#1370) 2025-08-22 16:43:26 +08:00
Daniel Liu
1bf181eda6
ethclient: return storage proofs in GetProof #24697 (#1369) 2025-08-22 16:42:46 +08:00
Daniel Liu
34073a1925
ethclient: add CallContractAtHash #24355 (#1368) 2025-08-22 16:42:06 +08:00
Daniel Liu
cf714776ba
ethclient: fix unmarshaling of ethereum.SyncProgress #24199 (#1367) 2025-08-22 16:41:28 +08:00
Daniel Liu
b96310ebe7
ethclient: fix tx sender cache miss detection #23877 (#1366) 2025-08-21 13:43:52 +08:00
Daniel Liu
992e931623
ethclient: add BlockNumber method #21500 #21565 (#1365) 2025-08-21 13:43:12 +08:00
Daniel Liu
f214dd6d51
ethclient: serialize negative block number as "pending" #21177 (#1364) 2025-08-21 13:42:29 +08:00
Daniel Liu
917baceda8
ethclient, internal/ethapi: add support for EIP-695 (eth_chainId) #19694 #23778 (#1362)
* ethclient, internal/ethapi: add support for EIP-695 (eth_chainId) #19694

* ethclient: fix typo #23778
2025-08-21 13:40:35 +08:00
Daniel Liu
e6f85271a3
ethclient: ensure tx json is not nil before accessing it #19653 (#1359) 2025-08-20 14:49:43 +08:00
Daniel Liu
9ad6312396
ethclient: fix RPC parse error of Parity response #16924 (#1358) 2025-08-20 14:37:33 +08:00
Daniel Liu
df837a0c8b
ethclient: add DialContext and Close #16318 (#1357) 2025-08-20 14:36:52 +08:00
Daniel Liu
71608abda8
ethclient: fix parity compatibility on newHeads #16454 (#1356) 2025-08-20 14:36:01 +08:00
Daniel Liu
9d24f95126
ethclient: include block hash from FilterQuery #17996 (#1354) 2025-08-20 14:33:49 +08:00
Daniel Liu
b628212d8e
rpc: change BlockNumber constant values to match ethclient #27219 (#992) 2025-04-28 10:59:34 +08:00
Daniel Liu
df87605355 api/bind: add CallOpts.BlockHash to allow calling contracts at a specific block hash (#28084)
* api/bind: Add CallOpts.BlockHash to allow calling contracts at a specific block hash.

* ethclient: Add BalanceAtHash, NonceAtHash and StorageAtHash functions
2025-01-24 16:54:12 +08:00
Daniel Liu
28739d7863 common: remove usage of deprecated function (#21610) 2024-12-28 09:06:30 +08:00
colin
bb55c1044b ethclient: apply accessList field in toCallArg (#28832)
Co-authored-by: Felix Lange <fjl@twurst.com>
2024-11-01 11:36:53 +08:00
Daniel Liu
4340e7b6f4 ethclient: fix forwarding 1559 gas fields (#28462) 2024-11-01 11:36:53 +08:00
Daniel Liu
9535b3ade5 ethclient: add FeeHistory support (#25403) 2024-11-01 11:36:53 +08:00
Daniel Liu
e94a0a91d8 ethclient/gethclient: RPC client wrapper for geth-specific API (#22977) 2024-11-01 11:36:52 +08:00
Daniel Liu
dbdca11501 accounts/abi/bind: fix bounded contracts and sim backend for 1559 (#23038) 2024-11-01 11:36:52 +08:00
Daniel Liu
1329edfe5f XDPoSChain, ethclient: fix staticcheck warning ST1012: rename NotFound to ErrNotFound 2024-10-30 21:07:05 +08:00
Daniel Liu
464a89074b all: use unified emptyRootHash and emptyCodeHash (#26718) 2024-10-21 17:55:16 +08:00
Daniel Liu
3e9bd359df ethclient: serialize negative block number as "pending" (#21177) 2024-06-20 15:52:32 +08:00
JukLee0ira
2d89951e5b all: use errrors.New instead of empty fmt.Errorf 2024-06-14 19:19:21 +08:00
JukLee0ira
c928c79d95 ethapi: implement eth_getBlockReceipts (#27702) 2024-05-21 18:03:15 +08:00
Daniel Liu
01e1728a94 all: add support for EIP-2718, EIP-2930 transactions (#21502) 2024-05-14 23:15:35 +08:00
olumuyiwadad
b5abbfed79 new EVM Upgrade
- Solidity Upgraded up to v0.8.0
-  Fixed and Added eth_chainId
- Fix error in TransactionRecipet
- Reward halving issue fixed
2021-09-21 16:53:46 +05:30
olumuyiwadad
571c41f891 FIx Bad block error. 2021-09-17 17:59:06 +05:30
tamirms
b16cc501a8 ethclient: include block hash from FilterQuery (#17996)
ethereum/go-ethereum#16734 introduced BlockHash to the FilterQuery
struct. However, ethclient was not updated to include BlockHash in the actual
RPC request.
2018-11-08 13:26:47 +01:00
Steven Roose
69c52bde3f ethclient: fix RPC parse error of Parity response (#16924)
The error produced when using a Parity RPC was the following:

ERROR: transaction did not get mined: failed to get tx for txid 0xbdeb094b3278019383c8da148ff1cb5b5dbd61bf8731bc2310ac1b8ed0235226: json: cannot unmarshal non-string into Go struct field txExtraInfo.blockHash of type common.Hash
2018-06-11 10:41:09 +03:00
Lorenzo Manacorda
b15eb665ee ethclient: add DialContext and Close (#16318)
DialContext allows users to pass a Context object for cancellation.
Close closes the underlying RPC connection.
2018-04-19 15:36:33 +02:00
Ivo Georgiev
315b9b18df ethclient: remove empty object in newHeads subscription call (#16454) 2018-04-09 12:40:58 +02:00
Péter Szilágyi
6f69cdd109
all: switch gas limits from big.Int to uint64 2018-01-03 14:45:35 +02:00
Felix Lange
d78ad226c2 ethclient, mobile: add TransactionSender (#15127)
* core/types: make Signer derive address instead of public key

There are two reasons to do this now: The upcoming ethclient signer
doesn't know the public key, just the address. EIP 208 will introduce a
new signer which derives the 'entry point' address for transactions with
zero signature. The entry point has no public key.

Other changes to the interface ease the path make to moving signature
crypto out of core/types later.

* ethclient, mobile: add TransactionSender

The new method can get the right signer without any crypto, and without
knowledge of the signature scheme that was used when the transaction was
included.
2017-10-01 11:03:28 +02:00
Jim McDonald
bc0e6a5e68 ethclient: add NetworkID method (#14791)
There is currently no simple way to obtain the network ID from a Client. 
This adds a NetworkID method that wraps the net_version JSON-RPC call.
2017-08-01 10:59:46 +02:00
Péter Szilágyi
a56f3dc0d9 core, ethclient: implement Metropolis EIP 98 (#14750)
Implements ethereum/EIPs#98
2017-07-17 10:34:53 +02:00
Jim McDonald
60e27b51bc ethclient: fix TransactionByHash pending return value. (#14663)
As per #14661 TransactionByHash always returns false for pending.
This uses blockNumber rather than blockHash to ensure that it returns
the correct value for pending and will not suffer side-effects if
eth_getTransactionByHash is fixed in future.
2017-06-21 09:53:50 +02:00
Felix Lange
c213fd1fd8 all: import "context" instead of "golang.org/x/net/context"
There is no need to depend on the old context package now that the
minimum Go version is 1.7. The move to "context" eliminates our weird
vendoring setup. Some vendored code still uses golang.org/x/net/context
and it is now vendored in the normal way.

This change triggered new vet checks around context.WithTimeout which
didn't fire with golang.org/x/net/context.
2017-03-22 20:49:15 +01:00
Felix Lange
7731061903 core/vm: move Log to core/types
This significantly reduces the dependency closure of ethclient, which no
longer depends on core/vm as of this change.

All uses of vm.Logs are replaced by []*types.Log. NewLog is gone too,
the constructor simply returned a literal.
2017-01-06 14:15:22 +01:00
Péter Szilágyi
1ca74aba6f Merge pull request #3505 from bas-vk/txinblock
ethclient: hex encode request args for TransactionInBlock
2017-01-04 12:43:27 +02:00
Bas van Kervel
8bc545be2a
ethclient: hex encode request args for TransactionInBlock 2017-01-03 14:46:00 +01:00
Bas van Kervel
021177ca9b ethclient: pass ptr when parsing eth_getTransactionByHash result 2016-12-22 14:45:01 +01:00
Felix Lange
3bc0fe1ee3 ethclient, ethereum: add NotFound, split transactions out of ChainReader
ethclient now returns ethereum.NotFound if the server returns null and
no error while accessing blockchain data.

The light client cannot provide arbitrary transactions. The change to
split transaction access into its own interface emphasizes that
transactions should not be relied on and recommends use of logs.
2016-12-05 10:57:11 +01:00