Generalised ChainClient - #8843
Conversation
|
I see that you haven't updated any CHANGELOG files. Would it make sense to do so? |
… into txm/BCI-1159/use_generics
… into txm/BCI-1159/use_generics
| } | ||
|
|
||
| func (ec *EthConfirmer[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) getMinedTransactionCount(ctx context.Context, from ADDR) (nonce uint64, err error) { | ||
| func (ec *EthConfirmer[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) getMinedTransactionCount(ctx context.Context, from ADDR) (nonce evmtypes.Nonce, err error) { |
There was a problem hiding this comment.
Huh, this function name is totally misleading.
Could you rename it to: getMinedSequenceForAddress()
Split HASH into TXHASH and BLOCKHASH in generic interface + test fixes Fixing tests Fixing tests SequenceAt mock returns evmtypes.Nonce LINKBalance in client interface Fixing LINKBalance test
| func (c *SimulatedBackendClient) FilterEvents(ctx context.Context, q ethereum.FilterQuery) (logs []types.Log, err error) { | ||
| return c.b.FilterLogs(ctx, q) | ||
| } | ||
|
|
There was a problem hiding this comment.
Why do we keep both FilterEvents and FilterLogs if they are identical?
There was a problem hiding this comment.
If i remember correctly, we are trying to use the more generic naming Events rather than Logs
so in the generic interface there is only FilterEvents so we wrap FilterLogs into FilterEvents to conform to the interface
There was a problem hiding this comment.
Yep, I tried shifting to the FilterEvents same as we did with nonce -> sequence across the code base, but it's actually too large of a change for this PR, so I limited it to only conforming to the generic interface for now.
| func (c *SimulatedBackendClient) FilterEvents(ctx context.Context, q ethereum.FilterQuery) (logs []types.Log, err error) { | ||
| return c.b.FilterLogs(ctx, q) | ||
| } | ||
|
|
There was a problem hiding this comment.
If i remember correctly, we are trying to use the more generic naming Events rather than Logs
so in the generic interface there is only FilterEvents so we wrap FilterLogs into FilterEvents to conform to the interface


No description provided.