Use chain aware signer in simulated backend
This commit is contained in:
parent
3f2e39d525
commit
38d7194a2a
|
@ -0,0 +1,14 @@
|
|||
diff --git i/accounts/abi/bind/backends/simulated.go w/accounts/abi/bind/backends/simulated.go
|
||||
index bd342a8cb..2ce30e2fa 100644
|
||||
--- i/accounts/abi/bind/backends/simulated.go
|
||||
+++ w/accounts/abi/bind/backends/simulated.go
|
||||
@@ -295,8 +295,7 @@ func (b *SimulatedBackend) callContract(ctx context.Context, call ethereum.CallM
|
||||
func (b *SimulatedBackend) SendTransaction(ctx context.Context, tx *types.Transaction) error {
|
||||
b.mu.Lock()
|
||||
defer b.mu.Unlock()
|
||||
-
|
||||
- sender, err := types.Sender(types.HomesteadSigner{}, tx)
|
||||
+ sender, err := types.Sender(types.NewEIP155Signer(tx.ChainId()), tx)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("invalid transaction: %v", err))
|
||||
}
|
|
@ -295,8 +295,7 @@ func (b *SimulatedBackend) callContract(ctx context.Context, call ethereum.CallM
|
|||
func (b *SimulatedBackend) SendTransaction(ctx context.Context, tx *types.Transaction) error {
|
||||
b.mu.Lock()
|
||||
defer b.mu.Unlock()
|
||||
|
||||
sender, err := types.Sender(types.HomesteadSigner{}, tx)
|
||||
sender, err := types.Sender(types.NewEIP155Signer(tx.ChainId()), tx)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("invalid transaction: %v", err))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue