Skip to content

Commit 56585c4

Browse files
Update module name
1 parent 1548bc5 commit 56585c4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+121
-121
lines changed

.golangci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ linters-settings:
2020
sections:
2121
- standard
2222
- default
23-
- prefix(github.com/poanetwork/tokenbridge-monitor)
23+
- prefix(github.com/omni/tokenbridge-monitor)
2424
funlen:
2525
lines: 60
2626
statements: 40

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ docker-compose -f docker-compose.dev.yml up monitor
6464
For final deployment, you will need a VM with a static IP and a DNS domain name attached to that IP.
6565
SSL certificates will be managed by a Traefik and Let's Encrypt automatically.
6666
```bash
67-
git clone https://github.com/poanetwork/tokenbridge-monitor.git
67+
git clone https://github.com/omni/tokenbridge-monitor.git
6868
cd tokenbridge-monitor
6969

7070
cp .env.example .env

cmd/fix_block_timestamps/main.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ import (
77

88
"github.com/sirupsen/logrus"
99

10-
"github.com/poanetwork/tokenbridge-monitor/config"
11-
"github.com/poanetwork/tokenbridge-monitor/db"
12-
"github.com/poanetwork/tokenbridge-monitor/entity"
13-
"github.com/poanetwork/tokenbridge-monitor/ethclient"
14-
"github.com/poanetwork/tokenbridge-monitor/logging"
15-
"github.com/poanetwork/tokenbridge-monitor/repository"
10+
"github.com/omni/tokenbridge-monitor/config"
11+
"github.com/omni/tokenbridge-monitor/db"
12+
"github.com/omni/tokenbridge-monitor/entity"
13+
"github.com/omni/tokenbridge-monitor/ethclient"
14+
"github.com/omni/tokenbridge-monitor/logging"
15+
"github.com/omni/tokenbridge-monitor/repository"
1616
)
1717

1818
func main() {

cmd/monitor/main.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import (
88

99
"github.com/prometheus/client_golang/prometheus/promhttp"
1010

11-
"github.com/poanetwork/tokenbridge-monitor/config"
12-
"github.com/poanetwork/tokenbridge-monitor/db"
13-
"github.com/poanetwork/tokenbridge-monitor/ethclient"
14-
"github.com/poanetwork/tokenbridge-monitor/logging"
15-
"github.com/poanetwork/tokenbridge-monitor/monitor"
16-
"github.com/poanetwork/tokenbridge-monitor/presenter"
17-
"github.com/poanetwork/tokenbridge-monitor/repository"
11+
"github.com/omni/tokenbridge-monitor/config"
12+
"github.com/omni/tokenbridge-monitor/db"
13+
"github.com/omni/tokenbridge-monitor/ethclient"
14+
"github.com/omni/tokenbridge-monitor/logging"
15+
"github.com/omni/tokenbridge-monitor/monitor"
16+
"github.com/omni/tokenbridge-monitor/presenter"
17+
"github.com/omni/tokenbridge-monitor/repository"
1818
)
1919

2020
func main() {

cmd/reprocess_block_range/main.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import (
88

99
"github.com/sirupsen/logrus"
1010

11-
"github.com/poanetwork/tokenbridge-monitor/config"
12-
"github.com/poanetwork/tokenbridge-monitor/db"
13-
"github.com/poanetwork/tokenbridge-monitor/ethclient"
14-
"github.com/poanetwork/tokenbridge-monitor/logging"
15-
"github.com/poanetwork/tokenbridge-monitor/monitor"
16-
"github.com/poanetwork/tokenbridge-monitor/repository"
11+
"github.com/omni/tokenbridge-monitor/config"
12+
"github.com/omni/tokenbridge-monitor/db"
13+
"github.com/omni/tokenbridge-monitor/ethclient"
14+
"github.com/omni/tokenbridge-monitor/logging"
15+
"github.com/omni/tokenbridge-monitor/monitor"
16+
"github.com/omni/tokenbridge-monitor/repository"
1717
)
1818

1919
var (

config.schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://json-schema.org/draft/2020-12/schema",
3-
"$id": "https://github.com/poanetwork/tokenbridge-monitor/blob/master/config.schema.json",
3+
"$id": "https://github.com/omni/tokenbridge-monitor/blob/master/config.schema.json",
44
"title": "AMB monitor config",
55
"type": "object",
66
"properties": {

config/config_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/sirupsen/logrus"
1010
"github.com/stretchr/testify/require"
1111

12-
"github.com/poanetwork/tokenbridge-monitor/config"
12+
"github.com/omni/tokenbridge-monitor/config"
1313
)
1414

1515
const testCfg = `

contract/abi/abi.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
gethabi "github.com/ethereum/go-ethereum/accounts/abi"
99
"github.com/ethereum/go-ethereum/common"
1010

11-
"github.com/poanetwork/tokenbridge-monitor/entity"
11+
"github.com/omni/tokenbridge-monitor/entity"
1212
)
1313

1414
type ABI struct {

contract/abi/abi_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010
"github.com/ethereum/go-ethereum/crypto"
1111
"github.com/stretchr/testify/require"
1212

13-
"github.com/poanetwork/tokenbridge-monitor/contract/abi"
14-
"github.com/poanetwork/tokenbridge-monitor/entity"
13+
"github.com/omni/tokenbridge-monitor/contract/abi"
14+
"github.com/omni/tokenbridge-monitor/entity"
1515
)
1616

1717
//go:embed test_abi.json

contract/bridge_contract.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import (
77

88
"github.com/ethereum/go-ethereum/common"
99

10-
"github.com/poanetwork/tokenbridge-monitor/config"
11-
"github.com/poanetwork/tokenbridge-monitor/contract/abi"
12-
"github.com/poanetwork/tokenbridge-monitor/contract/bridgeabi"
13-
"github.com/poanetwork/tokenbridge-monitor/ethclient"
10+
"github.com/omni/tokenbridge-monitor/config"
11+
"github.com/omni/tokenbridge-monitor/contract/abi"
12+
"github.com/omni/tokenbridge-monitor/contract/bridgeabi"
13+
"github.com/omni/tokenbridge-monitor/ethclient"
1414
)
1515

1616
type BridgeContract struct {

contract/bridgeabi/bridge_abi.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/ethereum/go-ethereum/common"
88
"github.com/ethereum/go-ethereum/crypto"
99

10-
"github.com/poanetwork/tokenbridge-monitor/contract/abi"
10+
"github.com/omni/tokenbridge-monitor/contract/abi"
1111
)
1212

1313
//go:embed amb.json

contract/bridgeabi/bridge_abi_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55

66
"github.com/stretchr/testify/require"
77

8-
"github.com/poanetwork/tokenbridge-monitor/contract/bridgeabi"
8+
"github.com/omni/tokenbridge-monitor/contract/bridgeabi"
99
)
1010

1111
func TestEventSignatures(t *testing.T) {

contract/contract.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"github.com/ethereum/go-ethereum"
88
"github.com/ethereum/go-ethereum/common"
99

10-
"github.com/poanetwork/tokenbridge-monitor/contract/abi"
11-
"github.com/poanetwork/tokenbridge-monitor/ethclient"
10+
"github.com/omni/tokenbridge-monitor/contract/abi"
11+
"github.com/omni/tokenbridge-monitor/ethclient"
1212
)
1313

1414
type Contract struct {

db/db.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"github.com/jmoiron/sqlx"
1717
_ "github.com/lib/pq"
1818

19-
"github.com/poanetwork/tokenbridge-monitor/config"
19+
"github.com/omni/tokenbridge-monitor/config"
2020
)
2121

2222
type DB struct {

docker-compose.prod.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ services:
8383
restart: unless-stopped
8484
monitor:
8585
container_name: monitor
86-
image: ghcr.io/poanetwork/tokenbridge-monitor:v0.1.4
86+
image: ghcr.io/omni/tokenbridge-monitor:v0.1.4
8787
env_file:
8888
- .env
8989
volumes:
@@ -96,15 +96,15 @@ services:
9696
restart: unless-stopped
9797
fix_block_timestamps:
9898
container_name: fix_block_timestamps
99-
image: ghcr.io/poanetwork/tokenbridge-monitor:v0.1.4
99+
image: ghcr.io/omni/tokenbridge-monitor:v0.1.4
100100
entrypoint: [ "./fix_block_timestamps" ]
101101
env_file:
102102
- .env
103103
volumes:
104104
- ./config.yml:/app/config.yml
105105
reprocess_block_range:
106106
container_name: fix_block_timestamps
107-
image: ghcr.io/poanetwork/tokenbridge-monitor:v0.1.4
107+
image: ghcr.io/omni/tokenbridge-monitor:v0.1.4
108108
entrypoint: [ "./reprocess_block_range" ]
109109
env_file:
110110
- .env

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/poanetwork/tokenbridge-monitor
1+
module github.com/omni/tokenbridge-monitor
22

33
go 1.17
44

monitor/alerts/alert_manager.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"fmt"
66
"time"
77

8-
"github.com/poanetwork/tokenbridge-monitor/config"
9-
"github.com/poanetwork/tokenbridge-monitor/db"
10-
"github.com/poanetwork/tokenbridge-monitor/logging"
8+
"github.com/omni/tokenbridge-monitor/config"
9+
"github.com/omni/tokenbridge-monitor/db"
10+
"github.com/omni/tokenbridge-monitor/logging"
1111
)
1212

1313
type AlertManager struct {

monitor/alerts/db_alerts_provider.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/ethereum/go-ethereum/common"
1010
"github.com/lib/pq"
1111

12-
"github.com/poanetwork/tokenbridge-monitor/db"
12+
"github.com/omni/tokenbridge-monitor/db"
1313
)
1414

1515
type DBAlertsProvider struct {

monitor/alerts/job.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/prometheus/client_golang/prometheus"
1212
"github.com/sirupsen/logrus"
1313

14-
"github.com/poanetwork/tokenbridge-monitor/logging"
14+
"github.com/omni/tokenbridge-monitor/logging"
1515
)
1616

1717
type AlertJobParams struct {

monitor/contract_monitor.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ import (
1515
"github.com/prometheus/client_golang/prometheus"
1616
"github.com/sirupsen/logrus"
1717

18-
"github.com/poanetwork/tokenbridge-monitor/config"
19-
"github.com/poanetwork/tokenbridge-monitor/contract"
20-
"github.com/poanetwork/tokenbridge-monitor/db"
21-
"github.com/poanetwork/tokenbridge-monitor/entity"
22-
"github.com/poanetwork/tokenbridge-monitor/ethclient"
23-
"github.com/poanetwork/tokenbridge-monitor/logging"
24-
"github.com/poanetwork/tokenbridge-monitor/repository"
25-
"github.com/poanetwork/tokenbridge-monitor/utils"
18+
"github.com/omni/tokenbridge-monitor/config"
19+
"github.com/omni/tokenbridge-monitor/contract"
20+
"github.com/omni/tokenbridge-monitor/db"
21+
"github.com/omni/tokenbridge-monitor/entity"
22+
"github.com/omni/tokenbridge-monitor/ethclient"
23+
"github.com/omni/tokenbridge-monitor/logging"
24+
"github.com/omni/tokenbridge-monitor/repository"
25+
"github.com/omni/tokenbridge-monitor/utils"
2626
)
2727

2828
const (

monitor/decoders.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/ethereum/go-ethereum/common"
88
"github.com/ethereum/go-ethereum/crypto"
99

10-
"github.com/poanetwork/tokenbridge-monitor/entity"
10+
"github.com/omni/tokenbridge-monitor/entity"
1111
)
1212

1313
func unmarshalMessage(bridgeID string, direction entity.Direction, encodedData []byte) *entity.Message {

monitor/handlers.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import (
88
"github.com/ethereum/go-ethereum/common"
99
"github.com/ethereum/go-ethereum/crypto"
1010

11-
"github.com/poanetwork/tokenbridge-monitor/config"
12-
"github.com/poanetwork/tokenbridge-monitor/contract/bridgeabi"
13-
"github.com/poanetwork/tokenbridge-monitor/db"
14-
"github.com/poanetwork/tokenbridge-monitor/entity"
15-
"github.com/poanetwork/tokenbridge-monitor/ethclient"
16-
"github.com/poanetwork/tokenbridge-monitor/repository"
11+
"github.com/omni/tokenbridge-monitor/config"
12+
"github.com/omni/tokenbridge-monitor/contract/bridgeabi"
13+
"github.com/omni/tokenbridge-monitor/db"
14+
"github.com/omni/tokenbridge-monitor/entity"
15+
"github.com/omni/tokenbridge-monitor/ethclient"
16+
"github.com/omni/tokenbridge-monitor/repository"
1717
)
1818

1919
type EventHandler func(ctx context.Context, log *entity.Log, data map[string]interface{}) error

monitor/monitor.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import (
44
"context"
55
"fmt"
66

7-
"github.com/poanetwork/tokenbridge-monitor/config"
8-
"github.com/poanetwork/tokenbridge-monitor/contract/bridgeabi"
9-
"github.com/poanetwork/tokenbridge-monitor/db"
10-
"github.com/poanetwork/tokenbridge-monitor/ethclient"
11-
"github.com/poanetwork/tokenbridge-monitor/logging"
12-
"github.com/poanetwork/tokenbridge-monitor/monitor/alerts"
13-
"github.com/poanetwork/tokenbridge-monitor/repository"
7+
"github.com/omni/tokenbridge-monitor/config"
8+
"github.com/omni/tokenbridge-monitor/contract/bridgeabi"
9+
"github.com/omni/tokenbridge-monitor/db"
10+
"github.com/omni/tokenbridge-monitor/ethclient"
11+
"github.com/omni/tokenbridge-monitor/logging"
12+
"github.com/omni/tokenbridge-monitor/monitor/alerts"
13+
"github.com/omni/tokenbridge-monitor/repository"
1414
)
1515

1616
type Monitor struct {

monitor/types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"errors"
55
"math"
66

7-
"github.com/poanetwork/tokenbridge-monitor/entity"
7+
"github.com/omni/tokenbridge-monitor/entity"
88
)
99

1010
var ErrWrongArgumentType = errors.New("argument has unexpected type")

monitor/types_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55

66
"github.com/stretchr/testify/require"
77

8-
"github.com/poanetwork/tokenbridge-monitor/entity"
9-
"github.com/poanetwork/tokenbridge-monitor/monitor"
8+
"github.com/omni/tokenbridge-monitor/entity"
9+
"github.com/omni/tokenbridge-monitor/monitor"
1010
)
1111

1212
func TestSplitBlockRange(t *testing.T) {

presenter/http/middleware/filter.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010
"github.com/ethereum/go-ethereum/common"
1111
"github.com/go-chi/chi/v5"
1212

13-
"github.com/poanetwork/tokenbridge-monitor/config"
14-
"github.com/poanetwork/tokenbridge-monitor/presenter/http/render"
13+
"github.com/omni/tokenbridge-monitor/config"
14+
"github.com/omni/tokenbridge-monitor/presenter/http/render"
1515
)
1616

1717
type ctxKey int

presenter/http/middleware/logger.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/go-chi/chi/v5/middleware"
88
"github.com/sirupsen/logrus"
99

10-
"github.com/poanetwork/tokenbridge-monitor/logging"
10+
"github.com/omni/tokenbridge-monitor/logging"
1111
)
1212

1313
func NewLoggerMiddleware(logger logging.Logger) func(next http.Handler) http.Handler {

presenter/http/middleware/recoverer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package middleware
33
import (
44
"net/http"
55

6-
"github.com/poanetwork/tokenbridge-monitor/logging"
6+
"github.com/omni/tokenbridge-monitor/logging"
77
)
88

99
func Recoverer(next http.Handler) http.Handler {

presenter/http/render/render.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"net/http"
77
"strconv"
88

9-
"github.com/poanetwork/tokenbridge-monitor/logging"
9+
"github.com/omni/tokenbridge-monitor/logging"
1010
)
1111

1212
func JSON(w http.ResponseWriter, r *http.Request, status int, res interface{}) {

presenter/presenter.go

+10-10
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ import (
1313
"github.com/go-chi/chi/v5"
1414
chimiddleware "github.com/go-chi/chi/v5/middleware"
1515

16-
"github.com/poanetwork/tokenbridge-monitor/config"
17-
"github.com/poanetwork/tokenbridge-monitor/contract"
18-
"github.com/poanetwork/tokenbridge-monitor/db"
19-
"github.com/poanetwork/tokenbridge-monitor/entity"
20-
"github.com/poanetwork/tokenbridge-monitor/ethclient"
21-
"github.com/poanetwork/tokenbridge-monitor/logging"
22-
"github.com/poanetwork/tokenbridge-monitor/presenter/http/middleware"
23-
"github.com/poanetwork/tokenbridge-monitor/presenter/http/render"
24-
"github.com/poanetwork/tokenbridge-monitor/repository"
25-
"github.com/poanetwork/tokenbridge-monitor/utils"
16+
"github.com/omni/tokenbridge-monitor/config"
17+
"github.com/omni/tokenbridge-monitor/contract"
18+
"github.com/omni/tokenbridge-monitor/db"
19+
"github.com/omni/tokenbridge-monitor/entity"
20+
"github.com/omni/tokenbridge-monitor/ethclient"
21+
"github.com/omni/tokenbridge-monitor/logging"
22+
"github.com/omni/tokenbridge-monitor/presenter/http/middleware"
23+
"github.com/omni/tokenbridge-monitor/presenter/http/render"
24+
"github.com/omni/tokenbridge-monitor/repository"
25+
"github.com/omni/tokenbridge-monitor/utils"
2626
)
2727

2828
var (

0 commit comments

Comments
 (0)