Update module name

This commit is contained in:
Kirill Fedoseev 2022-08-28 15:31:28 +04:00
parent 1548bc5990
commit 56585c4ac6
48 changed files with 121 additions and 121 deletions

View File

@ -20,7 +20,7 @@ linters-settings:
sections:
- standard
- default
- prefix(github.com/poanetwork/tokenbridge-monitor)
- prefix(github.com/omni/tokenbridge-monitor)
funlen:
lines: 60
statements: 40

View File

@ -64,7 +64,7 @@ docker-compose -f docker-compose.dev.yml up monitor
For final deployment, you will need a VM with a static IP and a DNS domain name attached to that IP.
SSL certificates will be managed by a Traefik and Let's Encrypt automatically.
```bash
git clone https://github.com/poanetwork/tokenbridge-monitor.git
git clone https://github.com/omni/tokenbridge-monitor.git
cd tokenbridge-monitor
cp .env.example .env

View File

@ -7,12 +7,12 @@ import (
"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"
"github.com/omni/tokenbridge-monitor/config"
"github.com/omni/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/ethclient"
"github.com/omni/tokenbridge-monitor/logging"
"github.com/omni/tokenbridge-monitor/repository"
)
func main() {

View File

@ -8,13 +8,13 @@ import (
"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"
"github.com/omni/tokenbridge-monitor/config"
"github.com/omni/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/ethclient"
"github.com/omni/tokenbridge-monitor/logging"
"github.com/omni/tokenbridge-monitor/monitor"
"github.com/omni/tokenbridge-monitor/presenter"
"github.com/omni/tokenbridge-monitor/repository"
)
func main() {

View File

@ -8,12 +8,12 @@ import (
"github.com/sirupsen/logrus"
"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/repository"
"github.com/omni/tokenbridge-monitor/config"
"github.com/omni/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/ethclient"
"github.com/omni/tokenbridge-monitor/logging"
"github.com/omni/tokenbridge-monitor/monitor"
"github.com/omni/tokenbridge-monitor/repository"
)
var (

View File

@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/poanetwork/tokenbridge-monitor/blob/master/config.schema.json",
"$id": "https://github.com/omni/tokenbridge-monitor/blob/master/config.schema.json",
"title": "AMB monitor config",
"type": "object",
"properties": {

View File

@ -9,7 +9,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/require"
"github.com/poanetwork/tokenbridge-monitor/config"
"github.com/omni/tokenbridge-monitor/config"
)
const testCfg = `

View File

@ -8,7 +8,7 @@ import (
gethabi "github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/common"
"github.com/poanetwork/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/entity"
)
type ABI struct {

View File

@ -10,8 +10,8 @@ import (
"github.com/ethereum/go-ethereum/crypto"
"github.com/stretchr/testify/require"
"github.com/poanetwork/tokenbridge-monitor/contract/abi"
"github.com/poanetwork/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/contract/abi"
"github.com/omni/tokenbridge-monitor/entity"
)
//go:embed test_abi.json

View File

@ -7,10 +7,10 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/poanetwork/tokenbridge-monitor/config"
"github.com/poanetwork/tokenbridge-monitor/contract/abi"
"github.com/poanetwork/tokenbridge-monitor/contract/bridgeabi"
"github.com/poanetwork/tokenbridge-monitor/ethclient"
"github.com/omni/tokenbridge-monitor/config"
"github.com/omni/tokenbridge-monitor/contract/abi"
"github.com/omni/tokenbridge-monitor/contract/bridgeabi"
"github.com/omni/tokenbridge-monitor/ethclient"
)
type BridgeContract struct {

View File

@ -7,7 +7,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/poanetwork/tokenbridge-monitor/contract/abi"
"github.com/omni/tokenbridge-monitor/contract/abi"
)
//go:embed amb.json

View File

@ -5,7 +5,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/poanetwork/tokenbridge-monitor/contract/bridgeabi"
"github.com/omni/tokenbridge-monitor/contract/bridgeabi"
)
func TestEventSignatures(t *testing.T) {

View File

@ -7,8 +7,8 @@ import (
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/common"
"github.com/poanetwork/tokenbridge-monitor/contract/abi"
"github.com/poanetwork/tokenbridge-monitor/ethclient"
"github.com/omni/tokenbridge-monitor/contract/abi"
"github.com/omni/tokenbridge-monitor/ethclient"
)
type Contract struct {

View File

@ -16,7 +16,7 @@ import (
"github.com/jmoiron/sqlx"
_ "github.com/lib/pq"
"github.com/poanetwork/tokenbridge-monitor/config"
"github.com/omni/tokenbridge-monitor/config"
)
type DB struct {

View File

@ -83,7 +83,7 @@ services:
restart: unless-stopped
monitor:
container_name: monitor
image: ghcr.io/poanetwork/tokenbridge-monitor:v0.1.4
image: ghcr.io/omni/tokenbridge-monitor:v0.1.4
env_file:
- .env
volumes:
@ -96,7 +96,7 @@ services:
restart: unless-stopped
fix_block_timestamps:
container_name: fix_block_timestamps
image: ghcr.io/poanetwork/tokenbridge-monitor:v0.1.4
image: ghcr.io/omni/tokenbridge-monitor:v0.1.4
entrypoint: [ "./fix_block_timestamps" ]
env_file:
- .env
@ -104,7 +104,7 @@ services:
- ./config.yml:/app/config.yml
reprocess_block_range:
container_name: fix_block_timestamps
image: ghcr.io/poanetwork/tokenbridge-monitor:v0.1.4
image: ghcr.io/omni/tokenbridge-monitor:v0.1.4
entrypoint: [ "./reprocess_block_range" ]
env_file:
- .env

2
go.mod
View File

@ -1,4 +1,4 @@
module github.com/poanetwork/tokenbridge-monitor
module github.com/omni/tokenbridge-monitor
go 1.17

View File

@ -5,9 +5,9 @@ import (
"fmt"
"time"
"github.com/poanetwork/tokenbridge-monitor/config"
"github.com/poanetwork/tokenbridge-monitor/db"
"github.com/poanetwork/tokenbridge-monitor/logging"
"github.com/omni/tokenbridge-monitor/config"
"github.com/omni/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/logging"
)
type AlertManager struct {

View File

@ -9,7 +9,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/lib/pq"
"github.com/poanetwork/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/db"
)
type DBAlertsProvider struct {

View File

@ -11,7 +11,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/sirupsen/logrus"
"github.com/poanetwork/tokenbridge-monitor/logging"
"github.com/omni/tokenbridge-monitor/logging"
)
type AlertJobParams struct {

View File

@ -15,14 +15,14 @@ import (
"github.com/prometheus/client_golang/prometheus"
"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"
"github.com/omni/tokenbridge-monitor/config"
"github.com/omni/tokenbridge-monitor/contract"
"github.com/omni/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/ethclient"
"github.com/omni/tokenbridge-monitor/logging"
"github.com/omni/tokenbridge-monitor/repository"
"github.com/omni/tokenbridge-monitor/utils"
)
const (

View File

@ -7,7 +7,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/poanetwork/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/entity"
)
func unmarshalMessage(bridgeID string, direction entity.Direction, encodedData []byte) *entity.Message {

View File

@ -8,12 +8,12 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/poanetwork/tokenbridge-monitor/config"
"github.com/poanetwork/tokenbridge-monitor/contract/bridgeabi"
"github.com/poanetwork/tokenbridge-monitor/db"
"github.com/poanetwork/tokenbridge-monitor/entity"
"github.com/poanetwork/tokenbridge-monitor/ethclient"
"github.com/poanetwork/tokenbridge-monitor/repository"
"github.com/omni/tokenbridge-monitor/config"
"github.com/omni/tokenbridge-monitor/contract/bridgeabi"
"github.com/omni/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/ethclient"
"github.com/omni/tokenbridge-monitor/repository"
)
type EventHandler func(ctx context.Context, log *entity.Log, data map[string]interface{}) error

View File

@ -4,13 +4,13 @@ import (
"context"
"fmt"
"github.com/poanetwork/tokenbridge-monitor/config"
"github.com/poanetwork/tokenbridge-monitor/contract/bridgeabi"
"github.com/poanetwork/tokenbridge-monitor/db"
"github.com/poanetwork/tokenbridge-monitor/ethclient"
"github.com/poanetwork/tokenbridge-monitor/logging"
"github.com/poanetwork/tokenbridge-monitor/monitor/alerts"
"github.com/poanetwork/tokenbridge-monitor/repository"
"github.com/omni/tokenbridge-monitor/config"
"github.com/omni/tokenbridge-monitor/contract/bridgeabi"
"github.com/omni/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/ethclient"
"github.com/omni/tokenbridge-monitor/logging"
"github.com/omni/tokenbridge-monitor/monitor/alerts"
"github.com/omni/tokenbridge-monitor/repository"
)
type Monitor struct {

View File

@ -4,7 +4,7 @@ import (
"errors"
"math"
"github.com/poanetwork/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/entity"
)
var ErrWrongArgumentType = errors.New("argument has unexpected type")

View File

@ -5,8 +5,8 @@ import (
"github.com/stretchr/testify/require"
"github.com/poanetwork/tokenbridge-monitor/entity"
"github.com/poanetwork/tokenbridge-monitor/monitor"
"github.com/omni/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/monitor"
)
func TestSplitBlockRange(t *testing.T) {

View File

@ -10,8 +10,8 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/go-chi/chi/v5"
"github.com/poanetwork/tokenbridge-monitor/config"
"github.com/poanetwork/tokenbridge-monitor/presenter/http/render"
"github.com/omni/tokenbridge-monitor/config"
"github.com/omni/tokenbridge-monitor/presenter/http/render"
)
type ctxKey int

View File

@ -7,7 +7,7 @@ import (
"github.com/go-chi/chi/v5/middleware"
"github.com/sirupsen/logrus"
"github.com/poanetwork/tokenbridge-monitor/logging"
"github.com/omni/tokenbridge-monitor/logging"
)
func NewLoggerMiddleware(logger logging.Logger) func(next http.Handler) http.Handler {

View File

@ -3,7 +3,7 @@ package middleware
import (
"net/http"
"github.com/poanetwork/tokenbridge-monitor/logging"
"github.com/omni/tokenbridge-monitor/logging"
)
func Recoverer(next http.Handler) http.Handler {

View File

@ -6,7 +6,7 @@ import (
"net/http"
"strconv"
"github.com/poanetwork/tokenbridge-monitor/logging"
"github.com/omni/tokenbridge-monitor/logging"
)
func JSON(w http.ResponseWriter, r *http.Request, status int, res interface{}) {

View File

@ -13,16 +13,16 @@ import (
"github.com/go-chi/chi/v5"
chimiddleware "github.com/go-chi/chi/v5/middleware"
"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/presenter/http/middleware"
"github.com/poanetwork/tokenbridge-monitor/presenter/http/render"
"github.com/poanetwork/tokenbridge-monitor/repository"
"github.com/poanetwork/tokenbridge-monitor/utils"
"github.com/omni/tokenbridge-monitor/config"
"github.com/omni/tokenbridge-monitor/contract"
"github.com/omni/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/ethclient"
"github.com/omni/tokenbridge-monitor/logging"
"github.com/omni/tokenbridge-monitor/presenter/http/middleware"
"github.com/omni/tokenbridge-monitor/presenter/http/render"
"github.com/omni/tokenbridge-monitor/repository"
"github.com/omni/tokenbridge-monitor/utils"
)
var (

View File

@ -6,9 +6,9 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/poanetwork/tokenbridge-monitor/config"
"github.com/poanetwork/tokenbridge-monitor/contract/bridgeabi"
"github.com/poanetwork/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/config"
"github.com/omni/tokenbridge-monitor/contract/bridgeabi"
"github.com/omni/tokenbridge-monitor/entity"
)
type MessageInfo struct {

View File

@ -1,7 +1,7 @@
package postgres
import (
"github.com/poanetwork/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/db"
)
type basePostgresRepo struct {

View File

@ -6,8 +6,8 @@ import (
sq "github.com/Masterminds/squirrel"
"github.com/poanetwork/tokenbridge-monitor/db"
"github.com/poanetwork/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/entity"
)
type blockTimestampsRepo basePostgresRepo

View File

@ -7,8 +7,8 @@ import (
sq "github.com/Masterminds/squirrel"
"github.com/ethereum/go-ethereum/common"
"github.com/poanetwork/tokenbridge-monitor/db"
"github.com/poanetwork/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/entity"
)
type bridgeValidatorsRepo basePostgresRepo

View File

@ -7,8 +7,8 @@ import (
sq "github.com/Masterminds/squirrel"
"github.com/ethereum/go-ethereum/common"
"github.com/poanetwork/tokenbridge-monitor/db"
"github.com/poanetwork/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/entity"
)
type collectedMessagesRepo basePostgresRepo

View File

@ -7,8 +7,8 @@ import (
sq "github.com/Masterminds/squirrel"
"github.com/ethereum/go-ethereum/common"
"github.com/poanetwork/tokenbridge-monitor/db"
"github.com/poanetwork/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/entity"
)
type ercToNativeMessagesRepo basePostgresRepo

View File

@ -7,8 +7,8 @@ import (
sq "github.com/Masterminds/squirrel"
"github.com/ethereum/go-ethereum/common"
"github.com/poanetwork/tokenbridge-monitor/db"
"github.com/poanetwork/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/entity"
)
type executedInformationRequestsRepo basePostgresRepo

View File

@ -7,8 +7,8 @@ import (
sq "github.com/Masterminds/squirrel"
"github.com/ethereum/go-ethereum/common"
"github.com/poanetwork/tokenbridge-monitor/db"
"github.com/poanetwork/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/entity"
)
type executedMessagesRepo basePostgresRepo

View File

@ -7,8 +7,8 @@ import (
sq "github.com/Masterminds/squirrel"
"github.com/ethereum/go-ethereum/common"
"github.com/poanetwork/tokenbridge-monitor/db"
"github.com/poanetwork/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/entity"
)
type informationRequestsRepo basePostgresRepo

View File

@ -7,8 +7,8 @@ import (
sq "github.com/Masterminds/squirrel"
"github.com/poanetwork/tokenbridge-monitor/db"
"github.com/poanetwork/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/entity"
)
type logsRepo basePostgresRepo

View File

@ -7,8 +7,8 @@ import (
sq "github.com/Masterminds/squirrel"
"github.com/ethereum/go-ethereum/common"
"github.com/poanetwork/tokenbridge-monitor/db"
"github.com/poanetwork/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/entity"
)
type logsCursorsRepo basePostgresRepo

View File

@ -7,8 +7,8 @@ import (
sq "github.com/Masterminds/squirrel"
"github.com/ethereum/go-ethereum/common"
"github.com/poanetwork/tokenbridge-monitor/db"
"github.com/poanetwork/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/entity"
)
type messagesRepo basePostgresRepo

View File

@ -7,8 +7,8 @@ import (
sq "github.com/Masterminds/squirrel"
"github.com/ethereum/go-ethereum/common"
"github.com/poanetwork/tokenbridge-monitor/db"
"github.com/poanetwork/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/entity"
)
type sentInformationRequestsRepo basePostgresRepo

View File

@ -7,8 +7,8 @@ import (
sq "github.com/Masterminds/squirrel"
"github.com/ethereum/go-ethereum/common"
"github.com/poanetwork/tokenbridge-monitor/db"
"github.com/poanetwork/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/entity"
)
type sentMessagesRepo basePostgresRepo

View File

@ -7,8 +7,8 @@ import (
sq "github.com/Masterminds/squirrel"
"github.com/ethereum/go-ethereum/common"
"github.com/poanetwork/tokenbridge-monitor/db"
"github.com/poanetwork/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/entity"
)
type signedInformationRequestsRepo basePostgresRepo

View File

@ -7,8 +7,8 @@ import (
sq "github.com/Masterminds/squirrel"
"github.com/ethereum/go-ethereum/common"
"github.com/poanetwork/tokenbridge-monitor/db"
"github.com/poanetwork/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/entity"
)
type signedMessagesRepo basePostgresRepo

View File

@ -4,10 +4,10 @@ import (
"context"
"fmt"
"github.com/poanetwork/tokenbridge-monitor/config"
"github.com/poanetwork/tokenbridge-monitor/db"
"github.com/poanetwork/tokenbridge-monitor/entity"
"github.com/poanetwork/tokenbridge-monitor/repository/postgres"
"github.com/omni/tokenbridge-monitor/config"
"github.com/omni/tokenbridge-monitor/db"
"github.com/omni/tokenbridge-monitor/entity"
"github.com/omni/tokenbridge-monitor/repository/postgres"
)
type Repo struct {

View File

@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/poanetwork/tokenbridge-monitor/utils"
"github.com/omni/tokenbridge-monitor/utils"
)
func TestContextSleep(t *testing.T) {