Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release first version #4

Merged
merged 29 commits into from
May 23, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
change file name
zhouop0 committed May 23, 2024
commit 47bb32da088e96675b86b8db11fe582ab56362cc
6 changes: 3 additions & 3 deletions internal/svc/svc.go
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ import (
"github.com/b2network/b2committer/pkg/beacon"
"github.com/b2network/b2committer/pkg/client"
"github.com/b2network/b2committer/pkg/contract/op"
"github.com/b2network/b2committer/pkg/ds"
"github.com/b2network/b2committer/pkg/log"
"github.com/b2network/b2committer/pkg/store"
"github.com/b2network/b2committer/pkg/unisat"
"github.com/ethereum-optimism/optimism/op-service/sources"
"github.com/ethereum/go-ethereum/common"
@@ -38,7 +38,7 @@ type ServiceContext struct {
SyncedBlobBlockNumber int64
SyncedBlobBlockHash common.Hash
OpCommitterClient *b2node.OpCommitterClient
DecentralizedStore ds.DecentralizedStore
DecentralizedStore store.DecentralizedStore
UnisatHTTPClient *unisat.UstHTTPClient
}

@@ -121,7 +121,7 @@ func NewServiceContext(cfg *types.Config, bitcoinCfg *types.BitcoinRPCConfig, b2
log.Panicf("[svc] init arweave wallet panic: %s\n", err)
}

svc.DecentralizedStore = ds.NewArWeave(w, arClient)
svc.DecentralizedStore = store.NewArWeave(w, arClient)
}

return svc
6 changes: 1 addition & 5 deletions pkg/ds/ds.go → pkg/store/arweave.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ds
package store

import (
"strconv"
@@ -7,10 +7,6 @@ import (
"github.com/everFinance/goar/types"
)

type DecentralizedStore interface {
StoreDetailsOnChain(txs []byte, chainID int64, proposalID uint64) (string, error)
QueryDetailsByTxID(txID string) ([]byte, error)
}
type ArWeave struct {
Client *goar.Client
Wallet *goar.Wallet
2 changes: 1 addition & 1 deletion pkg/ds/ds_test.go → pkg/store/arweave_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ds
package store

import (
"fmt"
6 changes: 6 additions & 0 deletions pkg/store/store.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package store

type DecentralizedStore interface {
StoreDetailsOnChain(txs []byte, chainID int64, proposalID uint64) (string, error)
QueryDetailsByTxID(txID string) ([]byte, error)
}