Lint imports
This commit is contained in:
parent
9270c9911c
commit
b3cc0be853
|
@ -4,14 +4,15 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
"tokenbridge-monitor/config"
|
|
||||||
"tokenbridge-monitor/db"
|
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
"tokenbridge-monitor/ethclient"
|
|
||||||
"tokenbridge-monitor/logging"
|
|
||||||
"tokenbridge-monitor/repository"
|
|
||||||
|
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/config"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/db"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/ethclient"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/logging"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/repository"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
|
@ -5,15 +5,16 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"tokenbridge-monitor/config"
|
|
||||||
"tokenbridge-monitor/db"
|
|
||||||
"tokenbridge-monitor/ethclient"
|
|
||||||
"tokenbridge-monitor/logging"
|
|
||||||
"tokenbridge-monitor/monitor"
|
|
||||||
"tokenbridge-monitor/presenter"
|
|
||||||
"tokenbridge-monitor/repository"
|
|
||||||
|
|
||||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/config"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/db"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/ethclient"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/logging"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/monitor"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/presenter"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/repository"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
|
@ -3,11 +3,12 @@ package contract
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"tokenbridge-monitor/config"
|
|
||||||
"tokenbridge-monitor/contract/abi"
|
|
||||||
"tokenbridge-monitor/ethclient"
|
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/config"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/contract/abi"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/ethclient"
|
||||||
)
|
)
|
||||||
|
|
||||||
type BridgeContract struct {
|
type BridgeContract struct {
|
||||||
|
|
|
@ -3,12 +3,13 @@ package contract
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
"tokenbridge-monitor/ethclient"
|
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum"
|
"github.com/ethereum/go-ethereum"
|
||||||
"github.com/ethereum/go-ethereum/accounts/abi"
|
"github.com/ethereum/go-ethereum/accounts/abi"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/ethclient"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Contract struct {
|
type Contract struct {
|
||||||
|
|
|
@ -2,10 +2,11 @@ package contract
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts/abi"
|
"github.com/ethereum/go-ethereum/accounts/abi"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Indexed(args abi.Arguments) abi.Arguments {
|
func Indexed(args abi.Arguments) abi.Arguments {
|
||||||
|
|
3
db/db.go
3
db/db.go
|
@ -6,7 +6,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"tokenbridge-monitor/config"
|
|
||||||
|
|
||||||
"github.com/golang-migrate/migrate/v4"
|
"github.com/golang-migrate/migrate/v4"
|
||||||
_ "github.com/golang-migrate/migrate/v4/database/pgx"
|
_ "github.com/golang-migrate/migrate/v4/database/pgx"
|
||||||
|
@ -14,6 +13,8 @@ import (
|
||||||
_ "github.com/jackc/pgx/v4/stdlib"
|
_ "github.com/jackc/pgx/v4/stdlib"
|
||||||
"github.com/jmoiron/sqlx"
|
"github.com/jmoiron/sqlx"
|
||||||
_ "github.com/lib/pq"
|
_ "github.com/lib/pq"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DB struct {
|
type DB struct {
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
||||||
module tokenbridge-monitor
|
module github.com/poanetwork/tokenbridge-monitor
|
||||||
|
|
||||||
go 1.17
|
go 1.17
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,10 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
"tokenbridge-monitor/config"
|
|
||||||
"tokenbridge-monitor/db"
|
"github.com/poanetwork/tokenbridge-monitor/config"
|
||||||
"tokenbridge-monitor/logging"
|
"github.com/poanetwork/tokenbridge-monitor/db"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/logging"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlertManager struct {
|
type AlertManager struct {
|
||||||
|
|
|
@ -4,11 +4,12 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
"tokenbridge-monitor/db"
|
|
||||||
|
|
||||||
sq "github.com/Masterminds/squirrel"
|
sq "github.com/Masterminds/squirrel"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/lib/pq"
|
"github.com/lib/pq"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/db"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DBAlertsProvider struct {
|
type DBAlertsProvider struct {
|
||||||
|
|
|
@ -6,11 +6,12 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
"tokenbridge-monitor/logging"
|
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/logging"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlertJobParams struct {
|
type AlertJobParams struct {
|
||||||
|
|
|
@ -8,14 +8,6 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
"tokenbridge-monitor/config"
|
|
||||||
"tokenbridge-monitor/contract"
|
|
||||||
"tokenbridge-monitor/db"
|
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
"tokenbridge-monitor/ethclient"
|
|
||||||
"tokenbridge-monitor/logging"
|
|
||||||
"tokenbridge-monitor/repository"
|
|
||||||
"tokenbridge-monitor/utils"
|
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum"
|
"github.com/ethereum/go-ethereum"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
@ -23,6 +15,15 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/ethereum/go-ethereum/crypto"
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/config"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/contract"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/db"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/ethclient"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/logging"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/repository"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
const defaultSyncedThreshold = 10
|
const defaultSyncedThreshold = 10
|
||||||
|
|
|
@ -3,10 +3,11 @@ package monitor
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/ethereum/go-ethereum/crypto"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
)
|
)
|
||||||
|
|
||||||
func unmarshalMessage(bridgeID string, direction entity.Direction, encodedData []byte) *entity.Message {
|
func unmarshalMessage(bridgeID string, direction entity.Direction, encodedData []byte) *entity.Message {
|
||||||
|
|
|
@ -5,15 +5,16 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/big"
|
"math/big"
|
||||||
"tokenbridge-monitor/config"
|
|
||||||
"tokenbridge-monitor/contract/abi"
|
|
||||||
"tokenbridge-monitor/db"
|
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
"tokenbridge-monitor/ethclient"
|
|
||||||
"tokenbridge-monitor/repository"
|
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/ethereum/go-ethereum/crypto"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/config"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/contract/abi"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/db"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/ethclient"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/repository"
|
||||||
)
|
)
|
||||||
|
|
||||||
type EventHandler func(ctx context.Context, log *entity.Log, data map[string]interface{}) error
|
type EventHandler func(ctx context.Context, log *entity.Log, data map[string]interface{}) error
|
||||||
|
|
|
@ -3,13 +3,14 @@ package monitor
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"tokenbridge-monitor/config"
|
|
||||||
"tokenbridge-monitor/contract/abi"
|
"github.com/poanetwork/tokenbridge-monitor/config"
|
||||||
"tokenbridge-monitor/db"
|
"github.com/poanetwork/tokenbridge-monitor/contract/abi"
|
||||||
"tokenbridge-monitor/ethclient"
|
"github.com/poanetwork/tokenbridge-monitor/db"
|
||||||
"tokenbridge-monitor/logging"
|
"github.com/poanetwork/tokenbridge-monitor/ethclient"
|
||||||
"tokenbridge-monitor/monitor/alerts"
|
"github.com/poanetwork/tokenbridge-monitor/logging"
|
||||||
"tokenbridge-monitor/repository"
|
"github.com/poanetwork/tokenbridge-monitor/monitor/alerts"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/repository"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Monitor struct {
|
type Monitor struct {
|
||||||
|
|
|
@ -2,9 +2,10 @@ package monitor
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"math"
|
"math"
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
)
|
)
|
||||||
|
|
||||||
type BlocksRange struct {
|
type BlocksRange struct {
|
||||||
|
|
|
@ -2,10 +2,11 @@ package monitor_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
"tokenbridge-monitor/monitor"
|
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/monitor"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSplitBlockRange(t *testing.T) {
|
func TestSplitBlockRange(t *testing.T) {
|
||||||
|
|
|
@ -4,10 +4,11 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
"tokenbridge-monitor/logging"
|
|
||||||
|
|
||||||
"github.com/go-chi/chi/v5/middleware"
|
"github.com/go-chi/chi/v5/middleware"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/logging"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewRequestLogger(logger logging.Logger) func(next http.Handler) http.Handler {
|
func NewRequestLogger(logger logging.Logger) func(next http.Handler) http.Handler {
|
||||||
|
|
|
@ -8,15 +8,16 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"tokenbridge-monitor/config"
|
|
||||||
"tokenbridge-monitor/db"
|
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
"tokenbridge-monitor/logging"
|
|
||||||
"tokenbridge-monitor/repository"
|
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
"github.com/go-chi/chi/v5/middleware"
|
"github.com/go-chi/chi/v5/middleware"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/config"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/db"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/logging"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/repository"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Presenter struct {
|
type Presenter struct {
|
||||||
|
|
|
@ -2,10 +2,11 @@ package presenter
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
"github.com/ethereum/go-ethereum/common/hexutil"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
)
|
)
|
||||||
|
|
||||||
type MessageInfo struct {
|
type MessageInfo struct {
|
||||||
|
|
|
@ -2,7 +2,8 @@ package presenter
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
)
|
)
|
||||||
|
|
||||||
var formats = map[string]string{
|
var formats = map[string]string{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package postgres
|
package postgres
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"tokenbridge-monitor/db"
|
"github.com/poanetwork/tokenbridge-monitor/db"
|
||||||
)
|
)
|
||||||
|
|
||||||
type basePostgresRepo struct {
|
type basePostgresRepo struct {
|
||||||
|
|
|
@ -5,10 +5,11 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"tokenbridge-monitor/db"
|
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
|
|
||||||
sq "github.com/Masterminds/squirrel"
|
sq "github.com/Masterminds/squirrel"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/db"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
)
|
)
|
||||||
|
|
||||||
type blockTimestampsRepo basePostgresRepo
|
type blockTimestampsRepo basePostgresRepo
|
||||||
|
|
|
@ -5,11 +5,12 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"tokenbridge-monitor/db"
|
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
|
|
||||||
sq "github.com/Masterminds/squirrel"
|
sq "github.com/Masterminds/squirrel"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/db"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
)
|
)
|
||||||
|
|
||||||
type bridgeValidatorsRepo basePostgresRepo
|
type bridgeValidatorsRepo basePostgresRepo
|
||||||
|
|
|
@ -5,11 +5,12 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"tokenbridge-monitor/db"
|
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
|
|
||||||
sq "github.com/Masterminds/squirrel"
|
sq "github.com/Masterminds/squirrel"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/db"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
)
|
)
|
||||||
|
|
||||||
type collectedMessagesRepo basePostgresRepo
|
type collectedMessagesRepo basePostgresRepo
|
||||||
|
|
|
@ -5,11 +5,12 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"tokenbridge-monitor/db"
|
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
|
|
||||||
sq "github.com/Masterminds/squirrel"
|
sq "github.com/Masterminds/squirrel"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/db"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ercToNativeMessagesRepo basePostgresRepo
|
type ercToNativeMessagesRepo basePostgresRepo
|
||||||
|
|
|
@ -5,11 +5,12 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"tokenbridge-monitor/db"
|
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
|
|
||||||
sq "github.com/Masterminds/squirrel"
|
sq "github.com/Masterminds/squirrel"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/db"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
)
|
)
|
||||||
|
|
||||||
type executedInformationRequestsRepo basePostgresRepo
|
type executedInformationRequestsRepo basePostgresRepo
|
||||||
|
|
|
@ -5,11 +5,12 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"tokenbridge-monitor/db"
|
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
|
|
||||||
sq "github.com/Masterminds/squirrel"
|
sq "github.com/Masterminds/squirrel"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/db"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
)
|
)
|
||||||
|
|
||||||
type executedMessagesRepo basePostgresRepo
|
type executedMessagesRepo basePostgresRepo
|
||||||
|
|
|
@ -5,11 +5,12 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"tokenbridge-monitor/db"
|
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
|
|
||||||
sq "github.com/Masterminds/squirrel"
|
sq "github.com/Masterminds/squirrel"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/db"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
)
|
)
|
||||||
|
|
||||||
type informationRequestsRepo basePostgresRepo
|
type informationRequestsRepo basePostgresRepo
|
||||||
|
|
|
@ -3,11 +3,12 @@ package postgres
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"tokenbridge-monitor/db"
|
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
|
|
||||||
sq "github.com/Masterminds/squirrel"
|
sq "github.com/Masterminds/squirrel"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/db"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
)
|
)
|
||||||
|
|
||||||
type logsRepo basePostgresRepo
|
type logsRepo basePostgresRepo
|
||||||
|
|
|
@ -5,11 +5,12 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"tokenbridge-monitor/db"
|
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
|
|
||||||
sq "github.com/Masterminds/squirrel"
|
sq "github.com/Masterminds/squirrel"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/db"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
)
|
)
|
||||||
|
|
||||||
type logsCursorsRepo basePostgresRepo
|
type logsCursorsRepo basePostgresRepo
|
||||||
|
|
|
@ -5,11 +5,12 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"tokenbridge-monitor/db"
|
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
|
|
||||||
sq "github.com/Masterminds/squirrel"
|
sq "github.com/Masterminds/squirrel"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/db"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
)
|
)
|
||||||
|
|
||||||
type messagesRepo basePostgresRepo
|
type messagesRepo basePostgresRepo
|
||||||
|
|
|
@ -5,11 +5,12 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"tokenbridge-monitor/db"
|
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
|
|
||||||
sq "github.com/Masterminds/squirrel"
|
sq "github.com/Masterminds/squirrel"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/db"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
)
|
)
|
||||||
|
|
||||||
type sentInformationRequestsRepo basePostgresRepo
|
type sentInformationRequestsRepo basePostgresRepo
|
||||||
|
|
|
@ -5,11 +5,12 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"tokenbridge-monitor/db"
|
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
|
|
||||||
sq "github.com/Masterminds/squirrel"
|
sq "github.com/Masterminds/squirrel"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/db"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
)
|
)
|
||||||
|
|
||||||
type sentMessagesRepo basePostgresRepo
|
type sentMessagesRepo basePostgresRepo
|
||||||
|
|
|
@ -5,11 +5,12 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"tokenbridge-monitor/db"
|
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
|
|
||||||
sq "github.com/Masterminds/squirrel"
|
sq "github.com/Masterminds/squirrel"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/db"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
)
|
)
|
||||||
|
|
||||||
type signedInformationRequestsRepo basePostgresRepo
|
type signedInformationRequestsRepo basePostgresRepo
|
||||||
|
|
|
@ -5,11 +5,12 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"tokenbridge-monitor/db"
|
|
||||||
"tokenbridge-monitor/entity"
|
|
||||||
|
|
||||||
sq "github.com/Masterminds/squirrel"
|
sq "github.com/Masterminds/squirrel"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/db"
|
||||||
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
)
|
)
|
||||||
|
|
||||||
type signedMessagesRepo basePostgresRepo
|
type signedMessagesRepo basePostgresRepo
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package repository
|
package repository
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"tokenbridge-monitor/db"
|
"github.com/poanetwork/tokenbridge-monitor/db"
|
||||||
"tokenbridge-monitor/entity"
|
"github.com/poanetwork/tokenbridge-monitor/entity"
|
||||||
"tokenbridge-monitor/repository/postgres"
|
"github.com/poanetwork/tokenbridge-monitor/repository/postgres"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Repo struct {
|
type Repo struct {
|
||||||
|
|
Loading…
Reference in New Issue