Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

422
Vistas
How to resolve EIP version conflict between network and client?

I started the local Hardhat network (for testing smart contracts), connected to it using Nethereum, and when I try to start any transaction, the exception ChainId required for TransactionType 0X02 EIP1559 is thrown. Then I changed the network to Ganache, but the error remained the same. For example (F# code):

open System

type Account = 
    { Address : string
      PrivateKey: string }

[<EntryPoint>]
let main argv =
    
    let accounts =
        [| { Address = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"; PrivateKey = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" }
           { Address = "0x70997970c51812dc3a010c7d01b50e0d17dc79c8"; PrivateKey = "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d" } 
           { Address = "0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc"; PrivateKey = "0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a" } |]
        |> Seq.map (fun a -> Nethereum.Web3.Accounts.Account(a.PrivateKey))
    
    let client = Seq.head accounts
    
    let web3 = new Nethereum.Web3.Web3(client, "http://localhost:8545")
    web3.Eth.Accounts.SendRequestAsync().Result // This works currectly
    |> Seq.iter (fun a -> printfn "%s" a) // and prints all network addresses
    let tx = web3.Eth.GetEtherTransferService().TransferEtherAndWaitForReceiptAsync("0x70997970c51812dc3a010c7d01b50e0d17dc79c8", 10m).Result // Here throws exception: localhost:8545 ChainId required for TransactionType 0X02 EIP1559)
    let balance = web3.Eth.GetBalance.SendRequestAsync("0x70997970c51812dc3a010c7d01b50e0d17dc79c8").Result
    0

I think I should wait until the Nethereum developers implement the support of EIP-1559 because there are no alternatives in the .NET world. Is it possible to somehow disable this requirement for transactions, or change the version of the actual standard? I didn't find a similar function in the Hardhat and Ganache documentation, but maybe there are networks for developers who have this function?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

The solution is pretty simple: I needed to specify the ChainId when creating an account. For Hardhat, this value is 31337.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda