diff --git a/accounts/abi/bind/auth.go b/accounts/abi/bind/auth.go index 8f993c6cca2b3..5ed3786064aa1 100644 --- a/accounts/abi/bind/auth.go +++ b/accounts/abi/bind/auth.go @@ -118,7 +118,7 @@ func NewKeyStoreTransactorWithChainID(keystore *keystore.KeyStore, account accou if chainID == nil { return nil, ErrNoChainID } - signer := types.NewEIP155Signer(chainID) + signer := types.LatestSignerForChainID(chainID) return &TransactOpts{ From: account.Address, Signer: func(address common.Address, tx *types.Transaction) (*types.Transaction, error) { @@ -141,7 +141,7 @@ func NewKeyedTransactorWithChainID(key *ecdsa.PrivateKey, chainID *big.Int) (*Tr if chainID == nil { return nil, ErrNoChainID } - signer := types.NewEIP155Signer(chainID) + signer := types.LatestSignerForChainID(chainID) return &TransactOpts{ From: keyAddr, Signer: func(address common.Address, tx *types.Transaction) (*types.Transaction, error) { diff --git a/accounts/keystore/keystore.go b/accounts/keystore/keystore.go index bc8b8d980a6ca..1f46bce34b05c 100644 --- a/accounts/keystore/keystore.go +++ b/accounts/keystore/keystore.go @@ -319,7 +319,6 @@ func (ks *KeyStore) SignTxWithPassphrase(a accounts.Account, passphrase string, return nil, err } defer zeroKey(key.PrivateKey) - // Depending on the presence of the chain ID, sign with or without replay protection. signer := types.LatestSignerForChainID(chainID) return types.SignTx(tx, signer, key.PrivateKey) diff --git a/accounts/scwallet/wallet.go b/accounts/scwallet/wallet.go index 17c089474a5a8..60f1d55b5df2e 100644 --- a/accounts/scwallet/wallet.go +++ b/accounts/scwallet/wallet.go @@ -699,7 +699,7 @@ func (w *Wallet) SignHash(account accounts.Account, hash []byte) ([]byte, error) // the needed details via SignTxWithPassphrase, or by other means (e.g. unlock // the account in a keystore). func (w *Wallet) SignTx(account accounts.Account, tx *types.Transaction, chainID *big.Int) (*types.Transaction, error) { - signer := types.NewEIP155Signer(chainID) + signer := types.LatestSignerForChainID(chainID) hash := signer.Hash(tx) sig, err := w.SignHash(account, hash[:]) if err != nil {