Skip to content

Commit

Permalink
Feature/#725 remove ger sovereign chain (#730)
Browse files Browse the repository at this point in the history
* remove EthBlockByNumber

* db migration 15

* implemented

* linter

* fix synchronizer unit test

* disable readyforclaim flag for deposits

* remove ger e2e

* v9.0.0-rc.4-pp contracts

* local bridge contract

* linter

* fix e2e
  • Loading branch information
ARR552 authored Jan 16, 2025
1 parent c6f53d7 commit 6dd530a
Show file tree
Hide file tree
Showing 32 changed files with 4,083 additions and 287 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ test-e2ecompress: build-docker stop run-multi-single-bridge ## Runs all tests ch
trap '$(STOP)' EXIT; MallocNanoZone=0 go test -v -failfast -race -p 1 -timeout 2400s ./test/e2e/... -count 1 -tags='e2ecompress'

.PHONY: test-sovereignchain
test-sovereignchain: build-docker stop run-multi-single-bridge ## Runs all tests checking race conditions
test-sovereignchain: build-docker stop run-sovereign-chain ## Runs all tests checking race conditions
sleep 3
trap '$(STOP)' EXIT; MallocNanoZone=0 go test -v -failfast -race -p 1 -timeout 2400s ./test/e2e/... -count 1 -tags='sovereignchain'

Expand Down
8 changes: 4 additions & 4 deletions autoclaimservice/blockchainmanager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"path/filepath"

"github.com/0xPolygonHermez/zkevm-bridge-service/etherman/smartcontracts/claimcompressor"
"github.com/0xPolygonHermez/zkevm-bridge-service/etherman/smartcontracts/polygonzkevmbridgev2"
"github.com/0xPolygonHermez/zkevm-bridge-service/log"
zkevmtypes "github.com/0xPolygonHermez/zkevm-node/config/types"
"github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevmbridge"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/accounts/keystore"
"github.com/ethereum/go-ethereum/common"
Expand All @@ -31,7 +31,7 @@ const (
// Client is a simple implementation of EtherMan.
type Client struct {
EtherClient *ethclient.Client
PolygonBridge *polygonzkevmbridge.Polygonzkevmbridge
PolygonBridge *polygonzkevmbridgev2.Polygonzkevmbridgev2
ClaimCompressor *claimcompressor.Claimcompressor
NetworkID uint32
cfg *Config
Expand All @@ -49,7 +49,7 @@ func NewClient(ctx context.Context, cfg *Config) (*Client, error) {
return nil, err
}
// Create smc clients
bridge, err := polygonzkevmbridge.NewPolygonzkevmbridge(cfg.PolygonBridgeAddress, ethClient)
bridge, err := polygonzkevmbridgev2.NewPolygonzkevmbridgev2(cfg.PolygonBridgeAddress, ethClient)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -143,7 +143,7 @@ func (bm *Client) SendClaim(leafType, origNet uint32,
if leafType == LeafTypeAsset {
tx, err = bm.PolygonBridge.ClaimAsset(bm.auth, smtProof, smtRollupProof, globalIndex, mainnetExitRoot, rollupExitRoot, origNet, origAddr, destNet, destAddr, amount, metadata)
if err != nil {
a, _ := polygonzkevmbridge.PolygonzkevmbridgeMetaData.GetAbi()
a, _ := polygonzkevmbridgev2.Polygonzkevmbridgev2MetaData.GetAbi()
input, err3 := a.Pack("claimAsset", smtProof, smtRollupProof, globalIndex, mainnetExitRoot, rollupExitRoot, origNet, origAddr, destNet, destAddr, amount, metadata)
if err3 != nil {
bm.logger.Error("error packing call. Error: ", err3)
Expand Down
19 changes: 19 additions & 0 deletions db/pgstorage/migrations/0015.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-- +migrate Up

CREATE TABLE IF NOT EXISTS sync.remove_exit_root(
id BIGSERIAL,
block_id BIGINT REFERENCES sync.block (id) ON DELETE CASCADE,
global_exit_root BYTEA,
network_id BIGINT,
PRIMARY KEY (id)
);

ALTER TABLE sync.exit_root ADD COLUMN IF NOT EXISTS allowed BOOLEAN NOT NULL DEFAULT true;



-- +migrate Down

DROP TABLE IF EXISTS sync.remove_exit_root;

ALTER TABLE sync.exit_root DROP COLUMN IF EXISTS allowed;
94 changes: 94 additions & 0 deletions db/pgstorage/migrations/0015_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
package migrations_test

import (
"database/sql"
"testing"

"github.com/ethereum/go-ethereum/common"
"github.com/lib/pq"
"github.com/stretchr/testify/assert"
)

type migrationTest0015 struct{}

func (m migrationTest0015) InsertData(db *sql.DB) error {
block := "INSERT INTO sync.block (id, block_num, block_hash, parent_hash, network_id, received_at) VALUES(69, 2803824, decode('27474F16174BBE50C294FE13C190B92E42B2368A6D4AEB8A4A015F52816296C3','hex'), decode('C9B5033799ADF3739383A0489EFBE8A0D4D5E4478778A4F4304562FD51AE4C07','hex'), 0, '0001-01-01 01:00:00.000');"
if _, err := db.Exec(block); err != nil {
return err
}
block2 := "INSERT INTO sync.block (id, block_num, block_hash, parent_hash, network_id, received_at) VALUES(70, 2803824, decode('27474F16174BBE50C294FE13C190B92E42B2368A6D4AEB8A4A015F52816296C4','hex'), decode('C9B5033799ADF3739383A0489EFBE8A0D4D5E4478778A4F4304562FD51AE4C08','hex'), 1, '0001-01-01 01:00:00.000');"
if _, err := db.Exec(block2); err != nil {
return err
}
const gerSQL = `
INSERT INTO sync.exit_root
(id, block_id, global_exit_root, exit_roots, network_id)
VALUES(1, 69, decode('717E05DE47A87A7D1679E183F1C224150675F6302B7DA4EAAB526B2B91AE0761','hex'), '{decode(''5C7830303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030'',''hex''),decode(''5C7832376165356261303864373239316339366338636264646363313438626634386136643638633739373462393433353666353337353465663631373164373537'',''hex'')}', 0);
INSERT INTO sync.exit_root
(id, block_id, global_exit_root, exit_roots, network_id)
VALUES(2, 70, decode('717E05DE47A87A7D1679E183F1C224150675F6302B7DA4EAAB526B2B91AE0761','hex'), '{decode(''5C7830303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030'',''hex''),decode(''5C7832376165356261303864373239316339366338636264646363313438626634386136643638633739373462393433353666353337353465663631373164373537'',''hex'')}', 1);
`
if _, err := db.Exec(gerSQL); err != nil {
return err
}
return nil
}

func (m migrationTest0015) RunAssertsAfterMigrationUp(t *testing.T, db *sql.DB) {
selectGER := `SELECT allowed FROM sync.exit_root limit 1;`
var allowed bool
err := db.QueryRow(selectGER).Scan(&allowed)
assert.NoError(t, err)

const gerSQL = `
INSERT INTO sync.exit_root
(id, block_id, global_exit_root, exit_roots, network_id, allowed)
VALUES(3, 69, decode('26C7509B1B6E04162FD30850A046A59A725F31FBF2CA43C0A7A015D667F3CFFD','hex'), '{decode(''5C7835626130303233323962353363313161326631646665393062313165303331373731383432303536636632313235623433646138313033633139396463643766'',''hex''),decode(''5C7832376165356261303864373239316339366338636264646363313438626634386136643638633739373462393433353666353337353465663631373164373537'',''hex'')}', 0, true);
INSERT INTO sync.exit_root
(id, block_id, global_exit_root, exit_roots, network_id, allowed)
VALUES(4, 70, decode('26C7509B1B6E04162FD30850A046A59A725F31FBF2CA43C0A7A015D667F3CFFD','hex'), '{decode(''5C7835626130303233323962353363313161326631646665393062313165303331373731383432303536636632313235623433646138313033633139396463643766'',''hex''),decode(''5C7832376165356261303864373239316339366338636264646363313438626634386136643638633739373462393433353666353337353465663631373164373537'',''hex'')}', 1, false);`
_, err = db.Exec(gerSQL)
assert.NoError(t, err)

selectGER = `SELECT allowed FROM sync.exit_root where id = 1;`
err = db.QueryRow(selectGER).Scan(&allowed)
assert.NoError(t, err)
assert.Equal(t, true, allowed)

selectGER = `SELECT allowed FROM sync.exit_root where id = 3;`
err = db.QueryRow(selectGER).Scan(&allowed)
assert.NoError(t, err)
assert.Equal(t, true, allowed)

selectGER = `SELECT allowed FROM sync.exit_root where id = 4;`
err = db.QueryRow(selectGER).Scan(&allowed)
assert.NoError(t, err)
assert.Equal(t, false, allowed)
}

func (m migrationTest0015) RunAssertsAfterMigrationDown(t *testing.T, db *sql.DB) {
var (
id uint64
blockID uint64
globalExitRoot common.Hash
exitRoots [][]byte
networkID uint32
allowed bool
)
selectGER := `SELECT allowed FROM sync.exit_root limit 1;`
err := db.QueryRow(selectGER).Scan(&allowed)
assert.Error(t, err)

selectGER = `SELECT id, block_id, global_exit_root, exit_roots, network_id FROM sync.exit_root where id = 4;`
err = db.QueryRow(selectGER).Scan(&id, &blockID, &globalExitRoot, pq.Array(&exitRoots), &networkID)
assert.NoError(t, err)
assert.Equal(t, uint64(4), id)
assert.Equal(t, uint64(70), blockID)
assert.Equal(t, common.HexToHash("0x26c7509b1b6e04162fd30850a046a59a725f31fbf2ca43c0a7a015d667f3cffd"), globalExitRoot)
assert.NotEqual(t, 0, len(exitRoots))
assert.Equal(t, uint32(1), networkID)
}

func TestMigration0015(t *testing.T) {
runMigrationTest(t, 15, migrationTest0015{})
}
91 changes: 78 additions & 13 deletions db/pgstorage/pgstorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"math"
"math/big"
"strings"
"time"
Expand Down Expand Up @@ -104,7 +105,7 @@ func (p *PostgresStorage) AddBlock(ctx context.Context, block *etherman.Block, d

// AddGlobalExitRoot adds a new ExitRoot to the db.
func (p *PostgresStorage) AddGlobalExitRoot(ctx context.Context, exitRoot *etherman.GlobalExitRoot, dbTx pgx.Tx) error {
const addExitRootSQL = "INSERT INTO sync.exit_root (block_id, global_exit_root, exit_roots, network_id) VALUES ($1, $2, $3, $4)"
const addExitRootSQL = "INSERT INTO sync.exit_root (block_id, global_exit_root, exit_roots, network_id, allowed) VALUES ($1, $2, $3, $4, true)"
exitRoots := [][]byte{}
if len(exitRoot.ExitRoots) != 0 {
exitRoots = [][]byte{exitRoot.ExitRoots[0][:], exitRoot.ExitRoots[1][:]}
Expand Down Expand Up @@ -195,8 +196,8 @@ func (p *PostgresStorage) GetNumberDeposits(ctx context.Context, networkID uint3
// AddTrustedGlobalExitRoot adds new global exit root which comes from the trusted sequencer.
func (p *PostgresStorage) AddTrustedGlobalExitRoot(ctx context.Context, trustedExitRoot *etherman.GlobalExitRoot, dbTx pgx.Tx) (bool, error) {
const addTrustedGerSQL = `
INSERT INTO sync.exit_root (block_id, global_exit_root, exit_roots, network_id)
VALUES (0, $1, $2, $3)
INSERT INTO sync.exit_root (block_id, global_exit_root, exit_roots, network_id, allowed)
VALUES (0, $1, $2, $3, true)
ON CONFLICT ON CONSTRAINT UC DO NOTHING;`
res, err := p.getExecQuerier(dbTx).Exec(ctx, addTrustedGerSQL, trustedExitRoot.GlobalExitRoot, pq.Array([][]byte{trustedExitRoot.ExitRoots[0][:], trustedExitRoot.ExitRoots[1][:]}), trustedExitRoot.NetworkID)
return res.RowsAffected() > 0, err
Expand Down Expand Up @@ -273,7 +274,7 @@ func (p *PostgresStorage) GetLatestL1SyncedExitRoot(ctx context.Context, dbTx pg
ger etherman.GlobalExitRoot
exitRoots [][]byte
)
const getLatestL1SyncedExitRootSQL = "SELECT block_id, global_exit_root, exit_roots FROM sync.exit_root WHERE block_id > 0 AND network_id = 0 ORDER BY id DESC LIMIT 1"
const getLatestL1SyncedExitRootSQL = "SELECT block_id, global_exit_root, exit_roots FROM sync.exit_root WHERE allowed = true AND block_id > 0 AND network_id = 0 ORDER BY id DESC LIMIT 1"
err := p.getExecQuerier(dbTx).QueryRow(ctx, getLatestL1SyncedExitRootSQL).Scan(&ger.BlockID, &ger.GlobalExitRoot, pq.Array(&exitRoots))
if err != nil {
if errors.Is(err, pgx.ErrNoRows) {
Expand All @@ -285,13 +286,13 @@ func (p *PostgresStorage) GetLatestL1SyncedExitRoot(ctx context.Context, dbTx pg
return &ger, nil
}

// GetExitRootByGER gets the latest L1 synced global exit root.
func (p *PostgresStorage) GetExitRootByGER(ctx context.Context, ger common.Hash, dbTx pgx.Tx) (*etherman.GlobalExitRoot, error) {
// GetL1ExitRootByGER gets the latest L1 synced global exit root.
func (p *PostgresStorage) GetL1ExitRootByGER(ctx context.Context, ger common.Hash, dbTx pgx.Tx) (*etherman.GlobalExitRoot, error) {
var (
gerData etherman.GlobalExitRoot
exitRoots [][]byte
)
const getSyncedExitRootSQL = "SELECT block_id, global_exit_root, exit_roots FROM sync.exit_root WHERE block_id > 0 AND global_exit_root = $1 AND network_id = 0 ORDER BY id DESC LIMIT 1"
const getSyncedExitRootSQL = "SELECT block_id, global_exit_root, exit_roots FROM sync.exit_root WHERE allowed = true AND block_id > 0 AND global_exit_root = $1 AND network_id = 0 ORDER BY id DESC LIMIT 1"
err := p.getExecQuerier(dbTx).QueryRow(ctx, getSyncedExitRootSQL, ger).Scan(&gerData.BlockID, &gerData.GlobalExitRoot, pq.Array(&exitRoots))
if err != nil {
if errors.Is(err, pgx.ErrNoRows) {
Expand All @@ -303,9 +304,9 @@ func (p *PostgresStorage) GetExitRootByGER(ctx context.Context, ger common.Hash,
return &gerData, nil
}

// GetL2ExitRootsByGER gets the global exit roots in al the L2 networks.
// GetL2ExitRootsByGER gets the global exit roots in all the L2 networks.
func (p *PostgresStorage) GetL2ExitRootsByGER(ctx context.Context, ger common.Hash, dbTx pgx.Tx) ([]etherman.GlobalExitRoot, error) {
const getL2ExitRootsByGERSQL = "SELECT block_id, global_exit_root, network_id, id FROM sync.exit_root WHERE block_id > 0 AND global_exit_root = $1 AND network_id != 0 AND cardinality(exit_roots) = 0 ORDER BY id DESC"
const getL2ExitRootsByGERSQL = "SELECT block_id, global_exit_root, network_id, id FROM sync.exit_root WHERE allowed = true AND block_id > 0 AND global_exit_root = $1 AND network_id != 0 AND cardinality(exit_roots) = 0 ORDER BY id DESC"
rows, err := p.getExecQuerier(dbTx).Query(ctx, getL2ExitRootsByGERSQL, ger)
if err != nil {
if errors.Is(err, pgx.ErrNoRows) {
Expand Down Expand Up @@ -343,8 +344,8 @@ func (p *PostgresStorage) GetLatestTrustedExitRoot(ctx context.Context, networkI
ger etherman.GlobalExitRoot
exitRoots [][]byte
)
const getLatestTrustedExitRootSQL = "SELECT global_exit_root, exit_roots FROM sync.exit_root WHERE network_id = $1 ORDER BY id DESC LIMIT 1"
err := p.getExecQuerier(dbTx).QueryRow(ctx, getLatestTrustedExitRootSQL, networkID).Scan(&ger.GlobalExitRoot, pq.Array(&exitRoots))
const getLatestTrustedExitRootSQL = "SELECT global_exit_root, exit_roots, block_id, network_id, id FROM sync.exit_root WHERE network_id = $1 AND allowed = true ORDER BY id DESC LIMIT 1"
err := p.getExecQuerier(dbTx).QueryRow(ctx, getLatestTrustedExitRootSQL, networkID).Scan(&ger.GlobalExitRoot, pq.Array(&exitRoots), &ger.BlockID, &ger.NetworkID, &ger.ID)
if err != nil {
if errors.Is(err, pgx.ErrNoRows) {
return nil, gerror.ErrStorageNotFound
Expand All @@ -355,7 +356,7 @@ func (p *PostgresStorage) GetLatestTrustedExitRoot(ctx context.Context, networkI
ger.ExitRoots = []common.Hash{common.BytesToHash(exitRoots[0]), common.BytesToHash(exitRoots[1])}
} else {
// Query to look for the missing values
l1GER, err := p.GetExitRootByGER(ctx, ger.GlobalExitRoot, dbTx)
l1GER, err := p.GetL1ExitRootByGER(ctx, ger.GlobalExitRoot, dbTx)
if err != nil {
if errors.Is(err, pgx.ErrNoRows) {
log.Error("Missing L1Ger for the L2Ger entry")
Expand Down Expand Up @@ -649,7 +650,7 @@ func (p *PostgresStorage) GetDepositsFromOtherL2ToClaim(ctx context.Context, des

// GetLatestTrustedGERByDeposit return the latest trusted ger for an specific deposit
func (p *PostgresStorage) GetLatestTrustedGERByDeposit(ctx context.Context, depositCnt, networkID, destinationNetwork uint32, dbTx pgx.Tx) (common.Hash, error) {
const getLatestTrustedGERByDeposit = `SELECT sync.exit_root.global_exit_root FROM sync.deposit inner join mt.root on mt.root.deposit_id = sync.deposit.id inner join mt.rollup_exit on mt.rollup_exit.leaf = mt.root.root inner join sync.exit_root on sync.exit_root.exit_roots[2]= mt.rollup_exit.root where deposit_cnt = $1 and sync.deposit.network_id = $2 and dest_net = $3 and mt.rollup_exit.rollup_id = $2 and sync.exit_root.network_id = sync.deposit.dest_net order by sync.exit_root.id desc limit 1`
const getLatestTrustedGERByDeposit = `SELECT sync.exit_root.global_exit_root FROM sync.deposit inner join mt.root on mt.root.deposit_id = sync.deposit.id inner join mt.rollup_exit on mt.rollup_exit.leaf = mt.root.root inner join sync.exit_root on sync.exit_root.exit_roots[2]= mt.rollup_exit.root where sync.exit_root.allowed = true and deposit_cnt = $1 and sync.deposit.network_id = $2 and dest_net = $3 and mt.rollup_exit.rollup_id = $2 and sync.exit_root.network_id = sync.deposit.dest_net order by sync.exit_root.id desc limit 1`
var ger common.Hash
err := p.getExecQuerier(dbTx).QueryRow(ctx, getLatestTrustedGERByDeposit, depositCnt, networkID, destinationNetwork).Scan(&ger)
if errors.Is(err, pgx.ErrNoRows) {
Expand Down Expand Up @@ -745,6 +746,70 @@ func (p *PostgresStorage) GetPendingDepositsToClaim(ctx context.Context, destAdd
return deposits, totalCount, nil
}

func (p *PostgresStorage) AddRemoveL2GER(ctx context.Context, globalExitRoot etherman.GlobalExitRoot, dbTx pgx.Tx) error {
const insertRemoveGERSQL = `INSERT INTO sync.remove_exit_root
(block_id, global_exit_root, network_id)
VALUES ($1, $2, $3)`
_, err := p.getExecQuerier(dbTx).Exec(ctx, insertRemoveGERSQL, globalExitRoot.BlockID, globalExitRoot.GlobalExitRoot, globalExitRoot.NetworkID)
if err != nil {
return err
}

// Modify the allowed column in the exit_root table for this globalExitRoot
const updateGERStatusSQL = "UPDATE sync.exit_root SET allowed = false WHERE global_exit_root = $1 AND network_id = $2 RETURNING id;"
var gerID uint64
err = p.getExecQuerier(dbTx).QueryRow(ctx, updateGERStatusSQL, globalExitRoot.GlobalExitRoot, globalExitRoot.NetworkID).Scan(&gerID)
if err != nil {
return err
}

// Look for the deposits where the ready for claim flag needs to be modified
getPreviousGERSQL := "SELECT global_exit_root FROM sync.exit_root WHERE network_id = $1 AND id < $2 ORDER BY id DESC LIMIT 1"
var prevGer common.Hash
err = p.getExecQuerier(dbTx).QueryRow(ctx, getPreviousGERSQL, globalExitRoot.NetworkID, gerID).Scan(&prevGer)
if err != nil {
return err
}
prevDepositID, _, err := p.GetDepositCountByGER(ctx, prevGer, globalExitRoot.NetworkID, false, dbTx)
if errors.Is(err, gerror.ErrStorageNotFound) {
log.Warnf("No previous deposit found using this prevGER: %s in L1, NetworkID: %d, currentGER: %s", prevGer.String(), globalExitRoot.NetworkID, globalExitRoot.GlobalExitRoot.String())
prevDepositID = 0
} else if err != nil {
return err
}
CurrentDepositID, _, err := p.GetDepositCountByGER(ctx, globalExitRoot.GlobalExitRoot, globalExitRoot.NetworkID, false, dbTx)
if errors.Is(err, gerror.ErrStorageNotFound) {
log.Warnf("No deposit found for this GER: %s in L1, NetworkID: %d", globalExitRoot.GlobalExitRoot.String(), globalExitRoot.NetworkID)
CurrentDepositID = math.MaxUint64
} else if err != nil {
return err
}
// Disable the ready for claim flag for this deposits
const updateDepositsFlagSQL = `UPDATE sync.deposit SET ready_for_claim = false WHERE id > $1 AND id <= $2 AND network_id = 0 AND dest_net = $3`
_, err = p.getExecQuerier(dbTx).Exec(ctx, updateDepositsFlagSQL, prevDepositID, CurrentDepositID, globalExitRoot.NetworkID)
return err
}

// GetDepositCountByGER gets the deposit count by the GER.
func (p *PostgresStorage) GetDepositCountByGER(ctx context.Context, ger common.Hash, network uint32, rollupsTree bool, dbTx pgx.Tx) (uint64, uint32, error) {
var (
depositID uint64
depositCnt, rootNetwork uint32
)
arrayIndex := 1
if rollupsTree {
arrayIndex = 2
rootNetwork = network
}

const getDepositCountByGERSQL = "SELECT sync.deposit.id, sync.deposit.deposit_cnt FROM sync.deposit INNER JOIN mt.root ON sync.deposit.id = mt.root.deposit_id inner join sync.exit_root on mt.root.root = sync.exit_root.exit_roots[$1] WHERE sync.exit_root.global_exit_root = $2 and sync.exit_root.network_id = $3 AND mt.root.network = $4"
err := p.getExecQuerier(dbTx).QueryRow(ctx, getDepositCountByGERSQL, arrayIndex, ger, network, rootNetwork).Scan(&depositID, &depositCnt)
if errors.Is(err, pgx.ErrNoRows) {
return 0, 0, gerror.ErrStorageNotFound
}
return depositID, depositCnt, err
}

// UpdateDepositsStatusForTesting updates the ready_for_claim status of all deposits for testing.
func (p *PostgresStorage) UpdateDepositsStatusForTesting(ctx context.Context, dbTx pgx.Tx) error {
const updateDepositsStatusSQL = "UPDATE sync.deposit SET ready_for_claim = true;"
Expand Down
Loading

0 comments on commit 6dd530a

Please sign in to comment.