aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/bind/auth.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-11-14 17:52:02 +0800
committerGitHub <noreply@github.com>2016-11-14 17:52:02 +0800
commitca73dea3b9bcdf3b5424b5c48c70817439e2e304 (patch)
tree670e2833878e72555644fbbd81db6c5a1b44493f /accounts/abi/bind/auth.go
parent21701190ac0a838e347f31b7a918bb0a60c1e8c1 (diff)
parent648bd22427000b6e20a5e1a9c397005aa1ad4f9b (diff)
downloaddexon-ca73dea3b9bcdf3b5424b5c48c70817439e2e304.tar
dexon-ca73dea3b9bcdf3b5424b5c48c70817439e2e304.tar.gz
dexon-ca73dea3b9bcdf3b5424b5c48c70817439e2e304.tar.bz2
dexon-ca73dea3b9bcdf3b5424b5c48c70817439e2e304.tar.lz
dexon-ca73dea3b9bcdf3b5424b5c48c70817439e2e304.tar.xz
dexon-ca73dea3b9bcdf3b5424b5c48c70817439e2e304.tar.zst
dexon-ca73dea3b9bcdf3b5424b5c48c70817439e2e304.zip
Merge pull request #3179 from obscuren/eip-158
EIP158 & 160 Hardfork
Diffstat (limited to 'accounts/abi/bind/auth.go')
-rw-r--r--accounts/abi/bind/auth.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/accounts/abi/bind/auth.go b/accounts/abi/bind/auth.go
index cd6adc746..a20852fca 100644
--- a/accounts/abi/bind/auth.go
+++ b/accounts/abi/bind/auth.go
@@ -48,15 +48,15 @@ func NewKeyedTransactor(key *ecdsa.PrivateKey) *TransactOpts {
keyAddr := crypto.PubkeyToAddress(key.PublicKey)
return &TransactOpts{
From: keyAddr,
- Signer: func(address common.Address, tx *types.Transaction) (*types.Transaction, error) {
+ Signer: func(signer types.Signer, address common.Address, tx *types.Transaction) (*types.Transaction, error) {
if address != keyAddr {
return nil, errors.New("not authorized to sign this account")
}
- signature, err := crypto.SignEthereum(tx.SigHash().Bytes(), key)
+ signature, err := crypto.SignEthereum(signer.Hash(tx).Bytes(), key)
if err != nil {
return nil, err
}
- return tx.WithSignature(signature)
+ return tx.WithSignature(signer, signature)
},
}
}