Skip to content

Commit

Permalink
uncomment sendHttp
Browse files Browse the repository at this point in the history
  • Loading branch information
rjman-self committed Mar 16, 2021
1 parent 4db454c commit 34466a2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion accounts/abi/bind/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func (c *BoundContract) transact(opts *TransactOpts, contract *common.Address, i
}
} else {
nonce = opts.Nonce.Uint64()
fmt.Printf("nonce is %v\n", nonce)
//fmt.Printf("nonce is %v\n", nonce)
}
// Figure out the gas allowance and gas price values
gasPrice := opts.GasPrice
Expand Down Expand Up @@ -254,6 +254,7 @@ func (c *BoundContract) transact(opts *TransactOpts, contract *common.Address, i
} else {
rawTx = types.NewTransaction(nonce, c.address, value, gasLimit, gasPrice, input)
}

if opts.Signer == nil {
return nil, errors.New("no signer to authorize the transaction with")
}
Expand All @@ -263,6 +264,12 @@ func (c *BoundContract) transact(opts *TransactOpts, contract *common.Address, i
return nil, err
}

from, err := common.EthToPlaton(opts.From[:])
to, err := common.EthToPlaton(c.address[:])

fmt.Printf("from is %v\n", from)
fmt.Printf("to is %v\n", to)

if err := c.transactor.SendTransaction(ensureContext(opts.Context), signedTx); err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions ethclient/ethclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,8 @@ func toCallArg(msg ethereum.CallMsg) interface{} {
"to": platonTo,
}

fmt.Printf("toCallArg: from is %v\n", msg.From)
fmt.Printf("toCallArg: to is %v\n", msg.To)
//fmt.Printf("toCallArg: from is %v\n", msg.From)
//fmt.Printf("toCallArg: to is %v\n", msg.To)

if len(msg.Data) > 0 {
arg["data"] = hexutil.Bytes(msg.Data)
Expand Down

0 comments on commit 34466a2

Please sign in to comment.