NethermindEth/starknet.go

Specific return type for BlockWithTxs and BlockWithTxHashes methods

Aberta

#355 aberto em 22 de set. de 2023

 (1 comentário) (0 reação) (0 responsável)Go (140 forks)auto 404
help wanted

Métricas do repositório

Stars
 (177 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

In https://github.com/NethermindEth/starknet.go/pull/354 a new type for blocks with only transaction hashes was created as requested on #347.

However, BlockWithTxs and BlockWithTxHashes methods still have as return type interface{} as these can return either a Block or a Pending Block in both cases. The idea is to replace interface{} with an specific type and do something similar as in TransactionByHash method (see here) with adaptTransaction

Guia do colaborador