wormhole-explorer/analytics
Mariano ce1b7707fb
[WORMSCAN-API-1225] Add new endpoint for fetching x-chain-activity tops data (#1342)
* add 2 new tasks for collecting chain activity every day and hour

* making progress

* change query 2

* add query by month and year

* changes on task

* more changes

* change to 1d

* add 1d

* fix query

* adjust queryies

* change the way the query is executed

* changes on query

* making more progress

* fix per year query

* add a second group of tasks for downsampling

* add app_id

* update swagger docs

* optimize new tasks

* fix W

* fix W

* start using the new measurement

* change endpoint signature

* update endpoint name

* fix indents

* code review changes

* remove unnecessary break
2024-04-26 15:03:02 -03:00
..
cmd Handle unproccessable response from vaa-payload-parser (#1250) 2024-03-26 11:53:11 -03:00
config Integrating blockchain watcher data into mongodb (#820) 2023-11-27 12:31:35 -03:00
consumer Handle unproccessable response from vaa-payload-parser (#1250) 2024-03-26 11:53:11 -03:00
http Integrating blockchain watcher data into mongodb (#820) 2023-11-27 12:31:35 -03:00
internal/metrics Handle unproccessable response from vaa-payload-parser (#1250) 2024-03-26 11:53:11 -03:00
metric Ignore vaa older than 30 days for vaa_count metric (#1212) 2024-03-12 12:21:13 -03:00
parser Fix and refactor of analytics (#376) 2023-06-01 16:32:00 -03:00
prices Fix use correct date to obtain prices (#983) 2024-01-12 12:32:31 -03:00
queue Handle unproccessable response from vaa-payload-parser (#1250) 2024-03-26 11:53:11 -03:00
scripts [WORMSCAN-API-1225] Add new endpoint for fetching x-chain-activity tops data (#1342) 2024-04-26 15:03:02 -03:00
support Fix and refactor of analytics (#376) 2023-06-01 16:32:00 -03:00
.env.example Fix and refactor of analytics (#376) 2023-06-01 16:32:00 -03:00
.gitignore Fix and refactor of analytics (#376) 2023-06-01 16:32:00 -03:00
Dockerfile Fix and refactor of analytics (#376) 2023-06-01 16:32:00 -03:00
Makefile Fix and refactor of analytics (#376) 2023-06-01 16:32:00 -03:00
README.md Fix and refactor of analytics (#376) 2023-06-01 16:32:00 -03:00
go.mod Add W token for ethereum, arbitrum, optimism and base (#1358) 2024-04-25 17:06:14 -03:00
go.sum Add W token for ethereum, arbitrum, optimism and base (#1358) 2024-04-25 17:06:14 -03:00

README.md

Config sns topic

aws --profile localstack --endpoint-url=http://localhost:4566 sns create-topic --name vaas-pipeline.fifo --attributes FifoTopic=true,ContentBasedDeduplication=false

Config SQS FIFO with dead letter queue localstack

aws --profile localstack --endpoint-url=http://localhost:4566 sqs create-queue --queue-name=wormhole-vaa-analytic-dlq-queue.fifo --attributes "FifoQueue=true"

aws --profile localstack --endpoint-url=http://localhost:4566 sqs create-queue --queue-name=wormhole-vaa-analytic-queue.fifo --attributes FifoQueue=true,MessageRetentionPeriod=3600,ReceiveMessageWaitTimeSeconds=5,VisibilityTimeout=20,RedrivePolicy=""{\"deadLetterTargetArn\":\"arn:aws:sqs:us-east-1:000000000000:wormhole-vaa-analytic-dlq-queue.fifo\",\"maxReceiveCount\":\"2\"}""

Subscribe SQS FIFO to vaas-pipeline.fifo topic

aws --profile localstack --endpoint-url=http://localhost:4566 sns subscribe --topic-arn arn:aws:sns:us-east-1:000000000000:vaas-pipeline.fifo --protocol sqs --notification-endpoint http://localhost:4566/000000000000/wormhole-vaa-analytic-queue.fifo

Check message in the dead letter queue localstack

aws --profile localstack --endpoint-url=http://localhost:4566 sqs receive-message --queue-url=http://localhost:4566/000000000000/wormhole-vaa-analytic-dlq-queue.fifo