wormhole-explorer/analytic
agodnic c25ebcb6fc
New endpoint: top chain pairs by number of transfers (#307)
### Summary

Tracking issue: https://github.com/wormhole-foundation/wormhole-explorer/issues/275

This pull request implements the endpoint `GET /api/v1/top-chain-pairs-by-num-transfers`, which returns the chain pairs that have the most transfers.Internally, the endpoint uses data summarized daily to speed up query execution times.

This endpoint has a mandatory query parameter named timerange, which must be set to `7d`, `15d` or `30d`.
2023-05-12 13:05:18 -03:00
..
cmd Add summarization data for tx_count endpoint (#296) 2023-05-10 18:18:32 -03:00
config Add summarization data for tx_count endpoint (#296) 2023-05-10 18:18:32 -03:00
consumer Avoid process pyth message in analytic (#235) 2023-04-14 12:11:47 -03:00
http/infrastructure
metric Add summarization data for tx_count endpoint (#296) 2023-05-10 18:18:32 -03:00
queue
scripts New endpoint: top chain pairs by number of transfers (#307) 2023-05-12 13:05:18 -03:00
.env.example
.gitignore Add 24h volume to scorecards (#274) 2023-05-04 20:17:03 -03:00
Dockerfile [API/PARSER] Chain activity and last transaction endpoints (#175) 2023-03-07 16:25:42 -03:00
Makefile
README.md
go.mod 297 contract watchertx trackeranalyticfly change access to use iam role (#306) 2023-05-10 15:49:40 -03:00
go.sum 297 contract watchertx trackeranalyticfly change access to use iam role (#306) 2023-05-10 15:49:40 -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