Skip to content

Commit 07d2a79

Browse files
authored
Merge pull request #33 from keep-network/fix-call-opts-from
Fixed from address for contract call options from address in call options for contract binding should be set to the address of the signer. contractAddress is supposed to be a destination of the call.
2 parents a336ffc + e24eeb9 commit 07d2a79

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

tools/generators/ethereum/contract.go.tmpl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ func New{{.Class}}(
4545
transactionMutex *sync.Mutex,
4646
) (*{{.Class}}, error) {
4747
callerOptions := &bind.CallOpts{
48-
From: contractAddress,
48+
From: accountKey.Address,
4949
}
50+
5051
transactorOptions := bind.NewKeyedTransactor(
5152
accountKey.PrivateKey,
5253
)

tools/generators/ethereum/contract_template_content.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ func New{{.Class}}(
4848
transactionMutex *sync.Mutex,
4949
) (*{{.Class}}, error) {
5050
callerOptions := &bind.CallOpts{
51-
From: contractAddress,
51+
From: accountKey.Address,
5252
}
53+
5354
transactorOptions := bind.NewKeyedTransactor(
5455
accountKey.PrivateKey,
5556
)

0 commit comments

Comments
 (0)