Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion node/validator/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/scroll-tech/go-ethereum"
"github.com/scroll-tech/go-ethereum/accounts/abi/bind"
ethtypes "github.com/scroll-tech/go-ethereum/core/types"
"github.com/scroll-tech/go-ethereum/crypto"
"github.com/scroll-tech/go-ethereum/ethclient"
"github.com/scroll-tech/go-ethereum/log"
tmlog "github.com/tendermint/tendermint/libs/log"
Expand Down Expand Up @@ -67,7 +68,14 @@ func (v *Validator) ChallengeState(batchIndex uint64) error {
}
opts.GasPrice = gasPrice
opts.NoSend = true
tx, err := v.contract.ChallengeState(opts, batchIndex)
publicKey := v.privateKey.Public()
publicKeyECDSA, ok := publicKey.(*ecdsa.PublicKey)
if !ok {
log.Error("cannot assert type: publicKey is not of type *ecdsa.PublicKey")
}

receiver := crypto.PubkeyToAddress(*publicKeyECDSA)
tx, err := v.contract.ChallengeState(opts, batchIndex, receiver)
if err != nil {
return err
}
Expand Down