Home > Software design >  Troubles when trying to build and sign a transaction with web3
Troubles when trying to build and sign a transaction with web3

Time:01-05

I'm watching the tutorial of freeCodeCamp.org, Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial (enter image description here

Change values accordingly in your code.

Also change create trasaction code to this

transaction = SimpleStorage.constructor().buildTransaction(
    {
        "chainId": chain_id,
        "gasPrice": w3.eth.gas_price,
        "from": my_address,
        "nonce": nonce,
    }
)

Doing these 2 steps should fix your problem. I just did it for myself.

  •  Tags:  
  • Related