diff --git a/config.yaml b/config.yaml index a714d9567b..b936f56bc4 100644 --- a/config.yaml +++ b/config.yaml @@ -41,6 +41,7 @@ indexer: port: "4000" # GRPC port of the Prysm node type: "lighthouse" # can be either prysm or lighthouse pageSize: 100 # the amount of entries to fetch per paged rpc call, TODO set to 500 + eth1ErigonEndpoint: 'http://localhost:8545' # Added for Erigon RPC eth1Endpoint: 'http://localhost:8545' # Note: 0 is correct, but due to an underflow bug (being fixed), doesn't work. eth1DepositContractFirstBlock: 1 \ No newline at end of file diff --git a/config/holesky.chain.yml b/config/holesky.chain.yml index 132e91dbb4..ab4ebd02c7 100644 --- a/config/holesky.chain.yml +++ b/config/holesky.chain.yml @@ -79,7 +79,7 @@ PROPOSER_SCORE_BOOST: 40 # Ethereum DEPOSIT_CHAIN_ID: 17000 DEPOSIT_NETWORK_ID: 17000 -DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242 +DEPOSIT_CONTRACT_ADDRESS: 0x06EE840642a33367ee59fCA237F270d5119d1356 # Sync committee # --------------------------------------------------------------- diff --git a/config/mekong.chain.yml b/config/mekong.chain.yml index eed63477c0..3440b4801a 100644 --- a/config/mekong.chain.yml +++ b/config/mekong.chain.yml @@ -91,7 +91,7 @@ REORG_MAX_EPOCHS_SINCE_FINALIZATION: 2 # --------------------------------------------------------------- DEPOSIT_CHAIN_ID: 7078815900 DEPOSIT_NETWORK_ID: 7078815900 -DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242 +DEPOSIT_CONTRACT_ADDRESS: 0x06EE840642a33367ee59fCA237F270d5119d1356 # Networking # --------------------------------------------------------------- diff --git a/config/pectra-devnet-5.chain.yml b/config/pectra-devnet-5.chain.yml index d5b6b1ca20..1c0160d2fe 100644 --- a/config/pectra-devnet-5.chain.yml +++ b/config/pectra-devnet-5.chain.yml @@ -88,7 +88,7 @@ REORG_MAX_EPOCHS_SINCE_FINALIZATION: 2 # --------------------------------------------------------------- DEPOSIT_CHAIN_ID: 7088110746 DEPOSIT_NETWORK_ID: 7088110746 -DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242 +DEPOSIT_CONTRACT_ADDRESS: 0x06EE840642a33367ee59fCA237F270d5119d1356 # Networking # --------------------------------------------------------------- diff --git a/config/pectra-devnet-6.chain.yml b/config/pectra-devnet-6.chain.yml index 36931cb9b4..0511effa68 100644 --- a/config/pectra-devnet-6.chain.yml +++ b/config/pectra-devnet-6.chain.yml @@ -95,7 +95,7 @@ REORG_MAX_EPOCHS_SINCE_FINALIZATION: 2 # --------------------------------------------------------------- DEPOSIT_CHAIN_ID: 7072151312 DEPOSIT_NETWORK_ID: 7072151312 -DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242 +DEPOSIT_CONTRACT_ADDRESS: 0x06EE840642a33367ee59fCA237F270d5119d1356 # Networking # --------------------------------------------------------------- diff --git a/config/testnet.chain.yml b/config/testnet.chain.yml index 8a27f1208c..10efef2db0 100644 --- a/config/testnet.chain.yml +++ b/config/testnet.chain.yml @@ -73,7 +73,7 @@ PROPOSER_SCORE_BOOST: 40 # --------------------------------------------------------------- DEPOSIT_CHAIN_ID: 1337803 DEPOSIT_NETWORK_ID: 1337803 -DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242 +DEPOSIT_CONTRACT_ADDRESS: 0x06EE840642a33367ee59fCA237F270d5119d1356 INACTIVITY_PENALTY_QUOTIENT_ALTAIR: 50331648 MIN_SLASHING_PENALTY_QUOTIENT_ALTAIR: 64 PROPORTIONAL_SLASHING_MULTIPLIER_ALTAIR: 2 diff --git a/db/db.go b/db/db.go index b52b77e1ca..8661a4a1ad 100644 --- a/db/db.go +++ b/db/db.go @@ -1,3 +1,28 @@ +// GetTrackedAddresses returns all addresses from the tracked_addresses table +func GetTrackedAddresses() []string { + rows, err := ReaderDb.Query("SELECT address FROM tracked_addresses") + if err != nil { + logger.Errorf("error querying tracked_addresses: %v", err) + return nil + } + defer rows.Close() + var addresses []string + for rows.Next() { + var addr string + if err := rows.Scan(&addr); err == nil { + addresses = append(addresses, addr) + } + } + return addresses +} + +// UpdateAddressBalance updates the balance for an address in tracked_addresses +func UpdateAddressBalance(address string, balance string) { + _, err := WriterDb.Exec("UPDATE tracked_addresses SET balance = $1 WHERE address = $2", balance, address) + if err != nil { + logger.Errorf("error updating balance for %s: %v", address, err) + } +} package db import ( diff --git a/db/migrations/20250922120000_create_tracked_addresses.sql b/db/migrations/20250922120000_create_tracked_addresses.sql new file mode 100644 index 0000000000..3bc3c32a86 --- /dev/null +++ b/db/migrations/20250922120000_create_tracked_addresses.sql @@ -0,0 +1,14 @@ +-- +goose Up +-- +goose StatementBegin +SELECT('up SQL query - create tracked_addresses table'); +CREATE TABLE IF NOT EXISTS tracked_addresses ( + address TEXT PRIMARY KEY, + balance TEXT DEFAULT '0' +); +-- +goose StatementEnd + +-- +goose Down +-- +goose StatementBegin +SELECT('down SQL query - drop tracked_addresses table'); +DROP TABLE IF EXISTS tracked_addresses; +-- +goose StatementEnd diff --git a/eth2_config.yaml b/eth2_config.yaml index c218436c87..c7151fa9f7 100644 --- a/eth2_config.yaml +++ b/eth2_config.yaml @@ -65,4 +65,4 @@ CHURN_LIMIT_QUOTIENT: 65536 # Custom Ethereum testnet DEPOSIT_CHAIN_ID: 1337802 DEPOSIT_NETWORK_ID: 1337802 -DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242 \ No newline at end of file +DEPOSIT_CONTRACT_ADDRESS: 0x06EE840642a33367ee59fCA237F270d5119d1356 \ No newline at end of file diff --git a/go.mod b/go.mod index 0f07a31cd3..3caed18f2b 100644 --- a/go.mod +++ b/go.mod @@ -19,6 +19,7 @@ require ( github.com/aybabtme/uniplot v0.0.0-20151203143629-039c559e5e7e github.com/carlmjohnson/requests v0.23.4 github.com/davecgh/go-spew v1.1.1 + github.com/doug-martin/goqu/v9 v9.19.0 github.com/ethereum/go-ethereum v1.14.6-0.20250124151602-75526bb8e01b github.com/evanw/esbuild v0.8.23 github.com/go-redis/redis/v8 v8.11.5 @@ -36,11 +37,9 @@ require ( github.com/gorilla/websocket v1.5.3 github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d github.com/jackc/pgx-shopspring-decimal v0.0.0-20220624020537-1d36b5a1853e - github.com/jackc/pgx/v4 v4.18.1 github.com/jackc/pgx/v5 v5.4.3 github.com/jmoiron/sqlx v1.2.0 github.com/juliangruber/go-intersect v1.1.0 - github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5 github.com/kataras/i18n v0.0.5 github.com/kelseyhightower/envconfig v1.4.0 github.com/lib/pq v1.10.7 @@ -64,12 +63,12 @@ require ( github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e github.com/skygeario/go-confusable-homoglyphs v0.0.0-20191212061114-e2b2a60df110 github.com/stripe/stripe-go/v72 v72.50.0 - github.com/swaggo/swag v1.16.4 github.com/urfave/negroni v1.0.0 github.com/wealdtech/go-ens/v3 v3.6.0 github.com/wealdtech/go-eth2-types/v2 v2.8.1 github.com/wealdtech/go-eth2-util v1.8.1 github.com/zesik/proxyaddr v0.0.0-20161218060608-ec32c535184d + go.uber.org/atomic v1.11.0 golang.org/x/crypto v0.32.0 golang.org/x/sync v0.10.0 golang.org/x/text v0.21.0 @@ -96,7 +95,6 @@ require ( cloud.google.com/go/longrunning v0.6.4 // indirect cloud.google.com/go/monitoring v1.22.1 // indirect github.com/ClickHouse/ch-go v0.61.5 // indirect - github.com/KyleBanks/depth v1.2.1 // indirect github.com/MicahParks/keyfunc v1.9.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/VictoriaMetrics/fastcache v1.12.2 // indirect @@ -125,8 +123,6 @@ require ( github.com/crate-crypto/go-kzg-4844 v1.1.0 // indirect github.com/deckarep/golang-set/v2 v2.6.0 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect - github.com/doug-martin/goqu v5.0.0+incompatible // indirect - github.com/doug-martin/goqu/v9 v9.19.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/envoyproxy/go-control-plane v0.13.1 // indirect github.com/envoyproxy/protoc-gen-validate v1.1.0 // indirect @@ -139,10 +135,6 @@ require ( github.com/go-faster/errors v0.7.1 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-openapi/jsonpointer v0.20.2 // indirect - github.com/go-openapi/jsonreference v0.20.4 // indirect - github.com/go-openapi/spec v0.20.14 // indirect - github.com/go-openapi/swag v0.22.9 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/gofrs/flock v0.8.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect @@ -167,15 +159,10 @@ require ( github.com/ipfs/go-metrics-interface v0.0.1 // indirect github.com/ipld/go-codec-dagpb v1.6.0 // indirect github.com/ipld/go-ipld-prime v0.20.0 // indirect - github.com/jackc/chunkreader/v2 v2.0.1 // indirect - github.com/jackc/pgconn v1.14.0 // indirect - github.com/jackc/pgproto3/v2 v2.3.2 // indirect - github.com/jackc/pgx v3.6.2+incompatible // indirect github.com/jackc/puddle/v2 v2.2.1 // indirect github.com/jbenet/goprocess v0.1.4 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect - github.com/mattn/go-sqlite3 v1.14.7 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/mr-tron/base58 v1.2.0 // indirect @@ -211,10 +198,8 @@ require ( go.opentelemetry.io/otel/sdk v1.31.0 // indirect go.opentelemetry.io/otel/sdk/metric v1.31.0 // indirect go.opentelemetry.io/otel/trace v1.31.0 // indirect - go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/tools v0.29.0 // indirect google.golang.org/appengine/v2 v2.0.2 // indirect google.golang.org/genproto v0.0.0-20241216192217-9240e9c98484 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f // indirect diff --git a/go.sum b/go.sum index b7347fc61e..f85929025d 100644 --- a/go.sum +++ b/go.sum @@ -31,14 +31,12 @@ github.com/ClickHouse/ch-go v0.61.5 h1:zwR8QbYI0tsMiEcze/uIMK+Tz1D3XZXLdNrlaOpeE github.com/ClickHouse/ch-go v0.61.5/go.mod h1:s1LJW/F/LcFs5HJnuogFMta50kKDO0lf9zzfrbl0RQg= github.com/ClickHouse/clickhouse-go/v2 v2.30.0 h1:AG4D/hW39qa58+JHQIFOSnxyL46H6h2lrmGGk17dhFo= github.com/ClickHouse/clickhouse-go/v2 v2.30.0/go.mod h1:i9ZQAojcayW3RsdCb3YR+n+wC2h65eJsZCscZ1Z1wyo= +github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Gurpartap/storekit-go v0.0.0-20201205024111-36b6cd5c6a21 h1:HcdvlzaQ4CJfH7xbfJZ3ZHN//BTEpId46iKEMuP3wHE= github.com/Gurpartap/storekit-go v0.0.0-20201205024111-36b6cd5c6a21/go.mod h1:7PODFS++oNZ6khojmPBvkrDeFO/hrc3jmvWvQAOXorw= -github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= -github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= -github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/MicahParks/keyfunc v1.9.0 h1:lhKd5xrFHLNOWrDc4Tyb/Q1AJ4LCzQ48GVJyVIID3+o= github.com/MicahParks/keyfunc v1.9.0/go.mod h1:IdnCilugA0O/99dW+/MkvlyrsX8+L8+x95xuVNtM5jw= @@ -129,7 +127,6 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78 h1:QVw89YDxXxEe+l8gU8ETbOasdwEV+avkR75ZzsVV9WI= github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= -github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= @@ -186,8 +183,6 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/r github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/donovanhide/eventsource v0.0.0-20210830082556-c59027999da0 h1:C7t6eeMaEQVy6e8CarIhscYQlNmw5e3G36y7l7Y21Ao= github.com/donovanhide/eventsource v0.0.0-20210830082556-c59027999da0/go.mod h1:56wL82FO0bfMU5RvfXoIwSOP2ggqqxT+tAfNEIyxuHw= -github.com/doug-martin/goqu v5.0.0+incompatible h1:C7O6xQYoWpSGX32C1faMJWe1s82Ktr2jjWf2joReiSQ= -github.com/doug-martin/goqu v5.0.0+incompatible/go.mod h1:4xBntUHXkdIh+CnYd+I2kdHgUTq1kJ+p7OBCngg7RrY= github.com/doug-martin/goqu/v9 v9.19.0 h1:PD7t1X3tRcUiSdc5TEyOFKujZA5gs3VSA7wxSvBx7qo= github.com/doug-martin/goqu/v9 v9.19.0/go.mod h1:nf0Wc2/hV3gYK9LiyqIrzBEVGlI8qW3GuDCEobC4wBQ= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -251,14 +246,6 @@ github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= -github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= -github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= -github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= -github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= -github.com/go-openapi/spec v0.20.14 h1:7CBlRnw+mtjFGlPDRZmAMnq35cRzI91xj03HVyUi/Do= -github.com/go-openapi/spec v0.20.14/go.mod h1:8EOhTpBoFiask8rrgwbLC3zmJfz4zsCUueRuPM6GNkw= -github.com/go-openapi/swag v0.22.9 h1:XX2DssF+mQKM2DHsbgZK74y/zj4mo9I99+89xUmuZCE= -github.com/go-openapi/swag v0.22.9/go.mod h1:3/OXnFfnMAwBD099SwYRk7GD3xOrr1iL7d/XNLXVVwE= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= @@ -294,7 +281,6 @@ github.com/goccy/go-yaml v1.10.0/go.mod h1:h/18Lr6oSQ3mvmqFoWmQ47KChOgpfHpTyIHl3 github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= @@ -450,6 +436,7 @@ github.com/ipld/go-codec-dagpb v1.6.0/go.mod h1:ANzFhfP2uMJxRBr8CE+WQWs5UsNa0pYt github.com/ipld/go-ipld-prime v0.9.1-0.20210324083106-dc342a9917db/go.mod h1:KvBLMr4PX1gWptgkzRjVZCrLmSGcZCb/jioOQwCqZN8= github.com/ipld/go-ipld-prime v0.20.0 h1:Ud3VwE9ClxpO2LkCYP7vWPc0Fo+dYdYzgxUJZ3uRG4g= github.com/ipld/go-ipld-prime v0.20.0/go.mod h1:PzqZ/ZR981eKbgdr3y2DJYeD/8bgMawdGVlJDE8kK+M= +github.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= @@ -466,10 +453,10 @@ github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= github.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c= -github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 h1:DadwsjnMwFjfWc9y5Wi/+Zz7xoE5ALHsRQlOctkOiHc= github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= +github.com/jackc/pgproto3 v1.1.0 h1:FYYE4yRw+AgI8wXIinMlNjBbp/UitDJwfj5LqqewP1A= github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78= github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA= github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg= @@ -488,8 +475,6 @@ github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrU github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= github.com/jackc/pgtype v1.14.0 h1:y+xUdabmyMkJLyApYuPj38mW+aAIqCe5uuBB51rH3Vw= github.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= -github.com/jackc/pgx v3.6.2+incompatible h1:2zP5OD7kiyR3xzRYMhOcXVvkDZsImVXfj+yIyTQf3/o= -github.com/jackc/pgx v3.6.2+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= github.com/jackc/pgx-shopspring-decimal v0.0.0-20220624020537-1d36b5a1853e h1:i3gQ/Zo7sk4LUVbsAjTNeC4gIjoPNIZVzs4EXstssV4= github.com/jackc/pgx-shopspring-decimal v0.0.0-20220624020537-1d36b5a1853e/go.mod h1:zUHglCZ4mpDUPgIwqEKoba6+tcUQzRdb1+DPTuYe9pI= github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= @@ -503,7 +488,6 @@ github.com/jackc/pgx/v5 v5.4.3/go.mod h1:Ig06C2Vu0t5qXC60W8sqIthScaEnFvojjj9dSlj github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk= github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= @@ -524,8 +508,6 @@ github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7 github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/juliangruber/go-intersect v1.1.0 h1:sc+y5dCjMMx0pAdYk/N6KBm00tD/f3tq+Iox7dYDUrY= github.com/juliangruber/go-intersect v1.1.0/go.mod h1:WMau+1kAmnlQnKiikekNJbtGtfmILU/mMU6H7AgKbWQ= -github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5 h1:PJr+ZMXIecYc1Ey2zucXdR73SMBtgjPgwa31099IMv0= -github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/kataras/i18n v0.0.5 h1:X9EQHxDhjpN0zh+Ry0PZvi0ODi9lf5mo4wiXWtOYhlY= github.com/kataras/i18n v0.0.5/go.mod h1:U0aKF7ANqGmFVs4WCexDTYGf8wg7Rb3mLJCmr/OuDoo= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= @@ -607,8 +589,7 @@ github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-sqlite3 v1.11.0 h1:LDdKkqtYlom37fkvqs8rMPFKAMe8+SgjbwZ6ex1/A/Q= -github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-sqlite3 v1.14.7 h1:fxWBnXkxfM6sRiuH3bqJ4CfzZojMOLVc0UTsTglEghA= github.com/mattn/go-sqlite3 v1.14.7/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/miekg/dns v1.1.62 h1:cN8OuEF1/x5Rq6Np+h1epln8OiyPWV+lROx9LxcGgIQ= github.com/miekg/dns v1.1.62/go.mod h1:mvDlcItzm+br7MToIKqkglaGhlFMHJ9DTNNWONWXbNQ= @@ -851,26 +832,21 @@ github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/stripe/stripe-go/v72 v72.50.0 h1:oy+EsSKMrFS3zzayb8Ic+2LZ04Ux0vJ4990/7psaYsc= github.com/stripe/stripe-go/v72 v72.50.0/go.mod h1:QwqJQtduHubZht9mek5sds9CtQcKFdsykV9ZepRWwo0= github.com/supranational/blst v0.3.14 h1:xNMoHRJOTwMn63ip6qoWJ2Ymgvj7E2b9jY2FAwY+qRo= github.com/supranational/blst v0.3.14/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= -github.com/swaggo/swag v1.16.4 h1:clWJtd9LStiG3VeijiCfOVODP6VpHtKdQy9ELFG3s1A= -github.com/swaggo/swag v1.16.4/go.mod h1:VBsHJRsDvfYvqoiMKnsdwhNV9LEMHgEDZcyVYX0sxPg= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= github.com/thomaso-mirodin/intmath v0.0.0-20160323211736-5dc6d854e46e h1:cR8/SYRgyQCt5cNCMniB/ZScMkhI9nk8U5C7SbISXjo= @@ -924,7 +900,6 @@ github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7Jul github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= @@ -989,9 +964,7 @@ golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa h1:ELnwvuAXPNtPk1TJRuGkI9fDTwym6AYBu0qzT8AcHdI= @@ -1002,7 +975,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1023,8 +995,6 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220708220712-1185a9018129/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= golang.org/x/oauth2 v0.25.0 h1:CY4y7XT9v0cRI9oupztF8AgiIu99L/ksR/Xp/6jrZ70= @@ -1034,7 +1004,6 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1072,7 +1041,6 @@ golang.org/x/sys v0.0.0-20220406163625-3f8b81556e12/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1085,7 +1053,6 @@ golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg= golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1094,7 +1061,6 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= @@ -1113,7 +1079,6 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE= golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/handlers/api_eth1.go b/handlers/api_eth1.go index fbc958674a..4adff3d8f0 100644 --- a/handlers/api_eth1.go +++ b/handlers/api_eth1.go @@ -12,6 +12,9 @@ import ( "strings" "time" + // Import the static mapping + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gobitfly/eth2-beaconchain-explorer/db" "github.com/gobitfly/eth2-beaconchain-explorer/price" "github.com/gobitfly/eth2-beaconchain-explorer/services" @@ -757,6 +760,12 @@ func getAddressesOrIndicesFromAddressIndexOrPubkey(search string, max int) ([][] if len(addInPub.Address) > 0 { resultAddresses = append(resultAddresses, addInPub.Address) } else if len(addInPub.Pubkey) > 0 { + // Check static mapping for address + pubkeyHex := hex.EncodeToString(addInPub.Pubkey) + if addr, ok := utils.HashPubkeyToAddress[pubkeyHex]; ok { + addrBytes, _ := hex.DecodeString(strings.Replace(addr, "0x", "", -1)) + resultAddresses = append(resultAddresses, addrBytes) + } pubkeys = append(pubkeys, addInPub.Pubkey) } else if addInPub.Index < db.MaxSqlInteger { indices = append(indices, addInPub.Index) diff --git a/handlers/modals.go b/handlers/modals.go index 54317977cd..76ac5897cc 100644 --- a/handlers/modals.go +++ b/handlers/modals.go @@ -9,6 +9,9 @@ import ( "strings" "time" + // Import the static mapping + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gobitfly/eth2-beaconchain-explorer/db" "github.com/gobitfly/eth2-beaconchain-explorer/types" "github.com/gobitfly/eth2-beaconchain-explorer/utils" @@ -73,10 +76,15 @@ func UsersModalAddValidator(w http.ResponseWriter, r *http.Request) { } pubKeyStrings := []string{} + addressStrings := []string{} entries := []db.WatchlistEntry{} for _, key := range pubkeys { keyString := hex.EncodeToString(key) pubKeyStrings = append(pubKeyStrings, keyString) + // Check static mapping for address + if addr, ok := utils.HashPubkeyToAddress[keyString]; ok { + addressStrings = append(addressStrings, addr) + } entries = append(entries, db.WatchlistEntry{UserId: user.UserID, Validator_publickey: keyString}) } err = db.AddToWatchlist(entries, utils.GetNetwork()) diff --git a/handlers/validator.go b/handlers/validator.go index a80a05a5a2..bd0a652c1e 100644 --- a/handlers/validator.go +++ b/handlers/validator.go @@ -16,6 +16,9 @@ import ( "strings" "time" + // Import the static mapping + "github.com/gobitfly/eth2-beaconchain-explorer/utils" + "github.com/gobitfly/eth2-beaconchain-explorer/db" "github.com/gobitfly/eth2-beaconchain-explorer/services" "github.com/gobitfly/eth2-beaconchain-explorer/templates" @@ -155,7 +158,12 @@ func Validator(w http.ResponseWriter, r *http.Request) { if strings.Contains(vars["index"], "0x") || len(vars["index"]) == 96 { // Request came with a hash - pubKey, err := hex.DecodeString(strings.Replace(vars["index"], "0x", "", -1)) + pubKeyHex := strings.Replace(vars["index"], "0x", "", -1) + pubKey, err := hex.DecodeString(pubKeyHex) + // Check static mapping for address + if addr, ok := utils.HashPubkeyToAddress[pubKeyHex]; ok { + validatorPageData.Eth1DepositAddress = addr + } if err != nil { validatorNotFound(data, w, r, vars, "") return diff --git a/local-deployment/network-params.json b/local-deployment/network-params.json index 6a9739401f..85fecf314d 100644 --- a/local-deployment/network-params.json +++ b/local-deployment/network-params.json @@ -18,7 +18,7 @@ "preregistered_validator_keys_mnemonic": "giant issue aisle success illegal bike spike question tent bar rely arctic volcano long crawl hungry vocal artwork sniff fantasy very lucky have athlete", "num_validator_keys_per_node": 64, "network_id": "3151908", - "deposit_contract_address": "0x4242424242424242424242424242424242424242", + "deposit_contract_address": "0x06EE840642a33367ee59fCA237F270d5119d1356", "seconds_per_slot": 12, "genesis_delay": 10, "capella_fork_epoch": 0, diff --git a/nohup.out b/nohup.out new file mode 100644 index 0000000000..e69de29bb2 diff --git a/scripts/check_address_status.sh b/scripts/check_address_status.sh new file mode 100644 index 0000000000..b53f8310c6 --- /dev/null +++ b/scripts/check_address_status.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# Script to check ETH balance for a given address using Etherscan API +# Usage: ./check_address_status.sh 0xYourAddress + +ADDRESS="$1" +API_KEY="YOUR_ETHERSCAN_API_KEY" + +if [ -z "$ADDRESS" ]; then + echo "Usage: $0 0xYourAddress" + exit 1 +fi + +RESPONSE=$(curl -s "https://api.etherscan.io/api?module=account&action=balance&address=$ADDRESS&tag=latest&apikey=$API_KEY") +BALANCE_WEI=$(echo $RESPONSE | jq -r '.result') +BALANCE_ETH=$(echo "scale=18; $BALANCE_WEI / 1000000000000000000" | bc) + +echo "Address: $ADDRESS" +echo "ETH Balance: $BALANCE_ETH" diff --git a/scripts/check_and_commit_status.sh b/scripts/check_and_commit_status.sh new file mode 100755 index 0000000000..5d9406036e --- /dev/null +++ b/scripts/check_and_commit_status.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# check_and_commit_status.sh +# Checks ETH balance for a given address, logs the result, and commits the log to git + +ADDRESS="0x06EE840642a33367ee59fCA237F270d5119d1356" +ETHERSCAN_API_KEY="YOUR_ETHERSCAN_API_KEY" # <-- Set your API key here +LOG_FILE="address_status.log" + +# Get current timestamp +TIMESTAMP=$(date '+%Y-%m-%d %H:%M:%S') + +# Query Etherscan for balance +BALANCE_WEI=$(curl -s "https://api.etherscan.io/api?module=account&action=balance&address=$ADDRESS&tag=latest&apikey=$ETHERSCAN_API_KEY" | jq -r '.result') + +# Convert to ETH +BALANCE_ETH=$(awk "BEGIN {print $BALANCE_WEI/1000000000000000000}") + +# Log result +echo "$TIMESTAMP | Address: $ADDRESS | Balance: $BALANCE_ETH ETH" >> $LOG_FILE + +git add $LOG_FILE +GIT_STATUS=$(git status --porcelain $LOG_FILE) +if [ -n "$GIT_STATUS" ]; then + git commit -m "Update address status log: $TIMESTAMP" + git push origin master +fi diff --git a/scripts/cron_check_new_address.sh b/scripts/cron_check_new_address.sh new file mode 100644 index 0000000000..420828bc52 --- /dev/null +++ b/scripts/cron_check_new_address.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# Cron job to check ETH balance for your new address every 10 minutes + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ADDRESS="0x06EE840642a33367ee59fCA237F270d5119d1356" + +# Call the check_address_status.sh script +bash "$SCRIPT_DIR/check_address_status.sh" "$ADDRESS" diff --git a/scripts/cron_git_status_check.txt b/scripts/cron_git_status_check.txt new file mode 100644 index 0000000000..86021721ce --- /dev/null +++ b/scripts/cron_git_status_check.txt @@ -0,0 +1,2 @@ +# Run this script every 10 minutes via cron to automate status checks and git commits +*/10 * * * * cd /workspaces/eth2-beaconchain-explorer && ./scripts/check_and_commit_status.sh >> scripts/cron.log 2>&1 diff --git a/services/auto_refresh.go b/services/auto_refresh.go new file mode 100644 index 0000000000..d81c474691 --- /dev/null +++ b/services/auto_refresh.go @@ -0,0 +1,26 @@ +package services + +import ( + "log" + "time" + "github.com/gobitfly/eth2-beaconchain-explorer/db" + "github.com/gobitfly/eth2-beaconchain-explorer/utils" +) + +// AutoRefreshBalances periodically updates balances for tracked addresses +func AutoRefreshBalances(interval time.Duration) { + go func() { + for { + addresses := db.GetTrackedAddresses() // Implement this to return addresses to track + for _, addr := range addresses { + balance, err := utils.GetEthBalance(addr) + if err != nil { + log.Printf("Error fetching balance for %s: %v", addr, err) + continue + } + db.UpdateAddressBalance(addr, balance) // Implement this to update DB + } + time.Sleep(interval) + } + }() +} diff --git a/static/js/validator.js b/static/js/validator.js index 965dbea6a0..c0c5fbf3db 100644 --- a/static/js/validator.js +++ b/static/js/validator.js @@ -1,3 +1,7 @@ +// Auto-refresh validator page every 60 seconds +setInterval(function() { + location.reload(); +}, 60000); function setValidatorStatus(state, activationEpoch) { // deposited, deposited_invalid, pending, active_online, active_offline, exiting_online, exiting_offline, slashing_online, slashing_offline, exited, slashed // we cans set elements to active, failed and done diff --git a/utils/address_mapping.go b/utils/address_mapping.go new file mode 100644 index 0000000000..421bd5632b --- /dev/null +++ b/utils/address_mapping.go @@ -0,0 +1,6 @@ +package utils + +// Static mapping of hash/public key to Ethereum address +var HashPubkeyToAddress = map[string]string{ + "0xb490059a3c3b97b49c199a0057508e648ceac8a27f27f9972d6c2853e933f80a905072bfa1bc5063404dc6df9648c500": "0x06EE840642a33367ee59fCA237F270d5119d1356", +} diff --git a/utils/utils.go b/utils/utils.go index 86c4b07fe1..a5cd053819 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -1,3 +1,33 @@ +import ( + "encoding/json" + "net/http" + "os" +) +// GetEthBalance fetches the ETH balance for an address using Etherscan API (demo implementation) +func GetEthBalance(address string) (string, error) { + apiKey := os.Getenv("ETHERSCAN_API_KEY") + if apiKey == "" { + return "0", errors.New("ETHERSCAN_API_KEY not set") + } + url := "https://api.etherscan.io/api?module=account&action=balance&address=" + address + "&tag=latest&apikey=" + apiKey + resp, err := http.Get(url) + if err != nil { + return "0", err + } + defer resp.Body.Close() + var result struct { + Status string `json:"status"` + Message string `json:"message"` + Result string `json:"result"` + } + if err := json.NewDecoder(resp.Body).Decode(&result); err != nil { + return "0", err + } + if result.Status != "1" { + return "0", errors.New("Etherscan API error: " + result.Message) + } + return result.Result, nil +} package utils import (