diff options
author | gary rong <garyrong0905@gmail.com> | 2019-07-04 03:54:59 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2019-07-04 03:54:59 +0800 |
commit | 68147971734ea1f89f7899b1ca595c2c57e67079 (patch) | |
tree | 7fdd84eeb011a1e01947af30400c9363b8236149 /contracts/checkpointoracle/oracle.go | |
parent | 59a31983829ee542682b842e5b9b12b4cdac193d (diff) | |
download | go-tangerine-68147971734ea1f89f7899b1ca595c2c57e67079.tar go-tangerine-68147971734ea1f89f7899b1ca595c2c57e67079.tar.gz go-tangerine-68147971734ea1f89f7899b1ca595c2c57e67079.tar.bz2 go-tangerine-68147971734ea1f89f7899b1ca595c2c57e67079.tar.lz go-tangerine-68147971734ea1f89f7899b1ca595c2c57e67079.tar.xz go-tangerine-68147971734ea1f89f7899b1ca595c2c57e67079.tar.zst go-tangerine-68147971734ea1f89f7899b1ca595c2c57e67079.zip |
accounts, cmd, contracts, les: integrate clef for transaction signing (#19783)
* accounts, cmd, contracts, les: integrate clef for transaction signing
* accounts, cmd/checkpoint-admin, signer/core: minor fixups
Diffstat (limited to 'contracts/checkpointoracle/oracle.go')
-rw-r--r-- | contracts/checkpointoracle/oracle.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/contracts/checkpointoracle/oracle.go b/contracts/checkpointoracle/oracle.go index 702e27d95..13ff236f2 100644 --- a/contracts/checkpointoracle/oracle.go +++ b/contracts/checkpointoracle/oracle.go @@ -20,7 +20,6 @@ package checkpointoracle //go:generate abigen --sol contract/oracle.sol --pkg contract --out contract/oracle.go import ( - "crypto/ecdsa" "errors" "math/big" @@ -73,7 +72,7 @@ func (oracle *CheckpointOracle) LookupCheckpointEvents(blockLogs [][]*types.Log, // // Notably all signatures given should be transformed to "ethereum style" which transforms // v from 0/1 to 27/28 according to the yellow paper. -func (oracle *CheckpointOracle) RegisterCheckpoint(key *ecdsa.PrivateKey, index uint64, hash []byte, rnum *big.Int, rhash [32]byte, sigs [][]byte) (*types.Transaction, error) { +func (oracle *CheckpointOracle) RegisterCheckpoint(opts *bind.TransactOpts, index uint64, hash []byte, rnum *big.Int, rhash [32]byte, sigs [][]byte) (*types.Transaction, error) { var ( r [][32]byte s [][32]byte @@ -87,5 +86,5 @@ func (oracle *CheckpointOracle) RegisterCheckpoint(key *ecdsa.PrivateKey, index s = append(s, common.BytesToHash(sigs[i][32:64])) v = append(v, sigs[i][64]) } - return oracle.contract.SetCheckpoint(bind.NewKeyedTransactor(key), rnum, rhash, common.BytesToHash(hash), index, v, r, s) + return oracle.contract.SetCheckpoint(opts, rnum, rhash, common.BytesToHash(hash), index, v, r, s) } |