transaction type not supported. Arbitrum getBlockByNumber. Golang

134 Views Asked by At

Please help me, this method works well in Binance Smart Chain, but not in Arbitrum.

func (bn *BlockManager) getTrxByBlockNumber() *types.Transactions {
    op := "decoder.tx.GetTransactionsByBlockNumber "
    var err error = nil
    var block *types.Block

    client, err := ethclient.Dial("https://go.getblock.io/b3d301d")
    if err != nil {
        log.Fatal(err)
    }

    for {
        block, err = client.BlockByNumber(
            context.Background(),
            bn.Block,
        )
        if err == nil {
            break
        }
        fmt.Println(err)
        bn.Log.Info(op + " " + "Switch web3 client")
    }

    transactions := block.Transactions()
    return &transactions
}

Error

transaction type not supported

How to solve this problem?

0

There are 0 best solutions below