Skip to content

Commit

Permalink
fix: typo in OPStack clientcontroller (ethereum-optimism#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
gusin13 authored Jun 19, 2024
1 parent c8d7d87 commit 1f0ceb7
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions clientcontroller/opstackl2/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const (
var _ api.ConsumerController = &OPStackL2ConsumerController{}

type OPStackL2ConsumerController struct {
bbnClient *cwclient.Client
cwClient *cwclient.Client
opl2Client *ethclient.Client
cfg *fpcfg.OPStackL2Config
logger *zap.Logger
Expand All @@ -48,17 +48,17 @@ func NewOPStackL2ConsumerController(
}

bbnEncodingCfg := bbnapp.GetEncodingConfig()
wasmdEncodingCfg := wasmdparams.EncodingConfig{
cwEncodingCfg := wasmdparams.EncodingConfig{
InterfaceRegistry: bbnEncodingCfg.InterfaceRegistry,
Codec: bbnEncodingCfg.Codec,
TxConfig: bbnEncodingCfg.TxConfig,
Amino: bbnEncodingCfg.Amino,
}

bbnClient, err := cwclient.New(
cwClient, err := cwclient.New(
&cwConfig,
BabylonChainName,
wasmdEncodingCfg,
cwEncodingCfg,
logger,
)
if err != nil {
Expand All @@ -74,7 +74,7 @@ func NewOPStackL2ConsumerController(
}

return &OPStackL2ConsumerController{
bbnClient,
cwClient,
opl2Client,
opl2Cfg,
logger,
Expand All @@ -83,7 +83,7 @@ func NewOPStackL2ConsumerController(

func (cc *OPStackL2ConsumerController) ExecuteContract(payload []byte) (*provider.RelayerTxResponse, error) {
execMsg := &wasmtypes.MsgExecuteContract{
Sender: cc.bbnClient.MustGetAddr(),
Sender: cc.cwClient.MustGetAddr(),
Contract: cc.cfg.OPFinalityGadgetAddress,
Msg: payload,
}
Expand All @@ -101,7 +101,7 @@ func (cc *OPStackL2ConsumerController) reliablySendMsg(msg sdk.Msg, expectedErrs
}

func (cc *OPStackL2ConsumerController) reliablySendMsgs(msgs []sdk.Msg, expectedErrs []*sdkErr.Error, unrecoverableErrs []*sdkErr.Error) (*provider.RelayerTxResponse, error) {
return cc.bbnClient.ReliablySendMsgs(
return cc.cwClient.ReliablySendMsgs(
context.Background(),
msgs,
expectedErrs,
Expand Down Expand Up @@ -132,7 +132,7 @@ func (cc *OPStackL2ConsumerController) CommitPubRandList(
return nil, err
}
execMsg := &wasmtypes.MsgExecuteContract{
Sender: cc.bbnClient.MustGetAddr(),
Sender: cc.cwClient.MustGetAddr(),
Contract: cc.cfg.OPFinalityGadgetAddress,
Msg: payload,
}
Expand Down Expand Up @@ -173,7 +173,7 @@ func (cc *OPStackL2ConsumerController) SubmitFinalitySig(
return nil, err
}
execMsg := &wasmtypes.MsgExecuteContract{
Sender: cc.bbnClient.MustGetAddr(),
Sender: cc.cwClient.MustGetAddr(),
Contract: cc.cfg.OPFinalityGadgetAddress,
Msg: payload,
}
Expand Down Expand Up @@ -218,7 +218,7 @@ func (cc *OPStackL2ConsumerController) SubmitBatchFinalitySigs(
return nil, err
}
execMsg := &wasmtypes.MsgExecuteContract{
Sender: cc.bbnClient.MustGetAddr(),
Sender: cc.cwClient.MustGetAddr(),
Contract: cc.cfg.OPFinalityGadgetAddress,
Msg: payload,
}
Expand Down Expand Up @@ -292,5 +292,5 @@ func (ec *OPStackL2ConsumerController) QueryLastCommittedPublicRand(fpPk *btcec.

func (cc *OPStackL2ConsumerController) Close() error {
cc.opl2Client.Close()
return cc.bbnClient.Stop()
return cc.cwClient.Stop()
}

0 comments on commit 1f0ceb7

Please sign in to comment.