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

Add Backfill Storage #106

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
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
18 changes: 18 additions & 0 deletions v2/cmd/backfill/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,17 @@ import (
promoteeTypes "github.com/KyberNetwork/tradelogs/v2/pkg/storage/promotees"
"github.com/KyberNetwork/tradelogs/v2/pkg/storage/state"
"github.com/KyberNetwork/tradelogs/v2/pkg/storage/tradelogs"
bebopStorage "github.com/KyberNetwork/tradelogs/v2/pkg/storage/tradelogs/bebop"
hashflowv3Storage "github.com/KyberNetwork/tradelogs/v2/pkg/storage/tradelogs/hashflow_v3"
kyberswapStorage "github.com/KyberNetwork/tradelogs/v2/pkg/storage/tradelogs/kyberswap"
kyberswaprfqStorage "github.com/KyberNetwork/tradelogs/v2/pkg/storage/tradelogs/kyberswap_rfq"
oneinchv6Storage "github.com/KyberNetwork/tradelogs/v2/pkg/storage/tradelogs/oneinch_v6"
pancakeswapStorage "github.com/KyberNetwork/tradelogs/v2/pkg/storage/tradelogs/pancakeswap"
paraswapStorage "github.com/KyberNetwork/tradelogs/v2/pkg/storage/tradelogs/paraswap"
storageTypes "github.com/KyberNetwork/tradelogs/v2/pkg/storage/tradelogs/types"
uniswapxStorage "github.com/KyberNetwork/tradelogs/v2/pkg/storage/tradelogs/uniswapx"
zxotcStorage "github.com/KyberNetwork/tradelogs/v2/pkg/storage/tradelogs/zxotc"
zxrfqv3Storage "github.com/KyberNetwork/tradelogs/v2/pkg/storage/tradelogs/zxrfqv3"
"github.com/KyberNetwork/tradelogs/v2/pkg/storage/zerox_deployment"
"github.com/KyberNetwork/tradinglib/pkg/dbutil"
"github.com/ethereum/go-ethereum/common"
Expand Down Expand Up @@ -76,7 +85,16 @@ func run(c *cli.Context) error {

// trade log manager
storages := []storageTypes.Storage{
kyberswapStorage.New(l, db),
zxotcStorage.New(l, db),
paraswapStorage.New(l, db),
kyberswaprfqStorage.New(l, db),
hashflowv3Storage.New(l, db),
oneinchv6Storage.New(l, db),
uniswapxStorage.New(l, db),
bebopStorage.New(l, db),
zxrfqv3Storage.New(l, db),
pancakeswapStorage.New(l, db),
}
manager := tradelogs.NewManager(l, storages)

Expand Down
2 changes: 2 additions & 0 deletions v2/cmd/migrations/00011_update_backfilled_block.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- backfill 1inchV6 from current block
update backfill set backfilled_block = 0 where exchange = '1inchV6';
Loading