'Go Ethereum Sending EIP155 Transaction
I am trying to send a EIP155 transaction using go but when signing i keep getting the error "transaction type not supported". I was wondering if i am doing something wrong?
tx := types.NewTx(&types.DynamicFeeTx{
ChainID: chainID,
GasFeeCap: maxGas,
Nonce: nonce,
To: &contractAddress,
Value: transactionValue,
Gas: gasPrice.Uint64(),
Data: data,
})
signedTx, err := types.SignTx(tx, types.NewEIP155Signer(chainID), privateKey)
if err != nil {
fmt.Println("Error signing transaction: ", err)
return
}
Solution 1:[1]
try NewLondonSigner instead of NewEIP155Signer
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Leafan.Chan |