Skip to content

Commit

Permalink
fix: use correct bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Aug 30, 2024
1 parent 8c86a57 commit db32f45
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions op-proposer-go/proposer/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ import (
"github.com/ethereum/go-ethereum/ethclient"
"github.com/ethereum/go-ethereum/log"

"github.com/ethereum-optimism/optimism/op-proposer/bindings"
// Original Optimism Bindings
opbindings "github.com/ethereum-optimism/optimism/op-proposer/bindings"
// OP Succinct Contract Bindings
opsuccinctbindings "github.com/succinctlabs/op-succinct-go/bindings"

"github.com/ethereum-optimism/optimism/op-proposer/metrics"
"github.com/ethereum-optimism/optimism/op-service/dial"
"github.com/ethereum-optimism/optimism/op-service/eth"
Expand Down Expand Up @@ -84,7 +88,7 @@ type L2OutputSubmitter struct {
l2ooContract L2OOContract
l2ooABI *abi.ABI

dgfContract *bindings.DisputeGameFactoryCaller
dgfContract *opbindings.DisputeGameFactoryCaller
dgfABI *abi.ABI

db db.ProofDB
Expand Down Expand Up @@ -112,7 +116,7 @@ func NewL2OutputSubmitter(setup DriverSetup) (_ *L2OutputSubmitter, err error) {
}

func newL2OOSubmitter(ctx context.Context, cancel context.CancelFunc, setup DriverSetup) (*L2OutputSubmitter, error) {
l2ooContract, err := bindings.NewL2OutputOracleCaller(*setup.Cfg.L2OutputOracleAddr, setup.L1Client)
l2ooContract, err := opsuccinctbindings.NewZKL2OutputOracleCaller(*setup.Cfg.L2OutputOracleAddr, setup.L1Client)
if err != nil {
cancel()
return nil, fmt.Errorf("failed to create L2OO at address %s: %w", setup.Cfg.L2OutputOracleAddr, err)
Expand All @@ -127,7 +131,7 @@ func newL2OOSubmitter(ctx context.Context, cancel context.CancelFunc, setup Driv
}
log.Info("Connected to L2OutputOracle", "address", setup.Cfg.L2OutputOracleAddr, "version", version)

parsed, err := bindings.L2OutputOracleMetaData.GetAbi()
parsed, err := opsuccinctbindings.ZKL2OutputOracleMetaData.GetAbi()
if err != nil {
cancel()
return nil, err
Expand All @@ -153,7 +157,7 @@ func newL2OOSubmitter(ctx context.Context, cancel context.CancelFunc, setup Driv

// Create a new submitter for the DisputeGameFactory. Note: This is unused in OP-Succinct.
func newDGFSubmitter(ctx context.Context, cancel context.CancelFunc, setup DriverSetup) (*L2OutputSubmitter, error) {
dgfCaller, err := bindings.NewDisputeGameFactoryCaller(*setup.Cfg.DisputeGameFactoryAddr, setup.L1Client)
dgfCaller, err := opbindings.NewDisputeGameFactoryCaller(*setup.Cfg.DisputeGameFactoryAddr, setup.L1Client)
if err != nil {
cancel()
return nil, fmt.Errorf("failed to create DGF at address %s: %w", setup.Cfg.DisputeGameFactoryAddr, err)
Expand All @@ -168,7 +172,7 @@ func newDGFSubmitter(ctx context.Context, cancel context.CancelFunc, setup Drive
}
log.Info("Connected to DisputeGameFactory", "address", setup.Cfg.DisputeGameFactoryAddr, "version", version)

parsed, err := bindings.DisputeGameFactoryMetaData.GetAbi()
parsed, err := opbindings.DisputeGameFactoryMetaData.GetAbi()
if err != nil {
cancel()
return nil, err
Expand Down

0 comments on commit db32f45

Please sign in to comment.