wormhole/event_database/cloud_functions
Csongor Kiss 7e212fa739
terra/nft_bridge: Implement nft-bridge for terra (#698)
commit-id:0b547fa5
2022-01-07 16:47:33 +01:00
..
.vscode BigTable: PubSub trigger after decoding payload 2021-12-20 16:56:56 +01:00
cmd BigTable: get solana address from token account 2021-12-20 16:56:56 +01:00
.gcloudignore BigTable: flat file cache + cumulative endpoints 2021-12-20 16:56:56 +01:00
.gitignore BigTable: misc code cleanup and log improvements 2021-12-20 16:56:56 +01:00
Dockerfile devnet: simplify cloud function setup 2021-12-14 17:47:14 -05:00
README.md PubSub infra for bigtable data enrichment 2021-12-20 16:56:56 +01:00
addresses-transferred-to-cumulative.go BigTable: flat file cache + cumulative endpoints 2021-12-20 16:56:56 +01:00
addresses-transferred-to.go BigTable: flat file cache + cumulative endpoints 2021-12-20 16:56:56 +01:00
bigtable-endpoints.md BigTable historical queries 2021-10-13 16:20:10 +00:00
external-data.go BigTable: get solana address from token account 2021-12-20 16:56:56 +01:00
findvalues.go BigTable: new endpoint to query by cell value 2021-12-20 16:56:56 +01:00
go.mod BigTable: flat file cache + cumulative endpoints 2021-12-20 16:56:56 +01:00
go.sum BigTable: flat file cache + cumulative endpoints 2021-12-20 16:56:56 +01:00
nfts.go BigTable: endpoint for NFT transfer stats 2021-12-20 16:56:56 +01:00
notional-transferred-to-cumulative.go BigTable: flat file cache + cumulative endpoints 2021-12-20 16:56:56 +01:00
notional-transferred-to.go BigTable: flat file cache + cumulative endpoints 2021-12-20 16:56:56 +01:00
notional-transferred.go BigTable: consistent keys in notional response 2021-12-20 16:56:56 +01:00
process-transfer.go BigTable: misc code cleanup and log improvements 2021-12-20 16:56:56 +01:00
process-vaa.go terra/nft_bridge: Implement nft-bridge for terra (#698) 2022-01-07 16:47:33 +01:00
readrow.go BigTable: query optimizations and return payloads 2021-12-20 16:56:56 +01:00
recent.go remove SignedVAA from /recent response 2021-11-09 19:13:10 +00:00
shared.go BigTable: endpoint for NFT transfer stats 2021-12-20 16:56:56 +01:00
totals.go BigTable: flat file cache + cumulative endpoints 2021-12-20 16:56:56 +01:00
transaction.go BigTable: query optimizations and return payloads 2021-12-20 16:56:56 +01:00

README.md

Google Cloud function for reading BigTable

This is a reference implementaion for getting data out of BigTable.

deploying

First deploy (creation) must include all the flags to configure the environment:

gcloud functions --project your-project deploy testnet --region europe-west3 --entry-point Entry --runtime go116 --trigger-http --allow-unauthenticated --service-account=your-readonly@your-project.iam.gserviceaccount.com --update-env-vars GCP_PROJECT=your-project,BIGTABLE_INSTANCE=wormhole-testnet

gcloud functions --project your-project deploy processvaa-testnet --region europe-west3 --entry-point ProcessVAA --runtime go116 --trigger-topic new-vaa-testnet --service-account=your-readonly@your-project.iam.gserviceaccount.com --update-env-vars GCP_PROJECT=your-project,BIGTABLE_INSTANCE=wormhole-testnet

Subsequent deploys (updates) only need include flags to indentify the resource for updating: project, region, name.

gcloud functions --project your-project deploy testnet --region europe-west3 --entry-point Entry

gcloud functions --project your-project deploy processvaa-testnet --region europe-west3 --entry-point ProcessVAA

invocation

All routes accept their input(s) as query parameters, or request body. Just two different ways of querying:

GET

curl "https://region-project-id.cloudfunctions.net/testnet/readrow?emitterChain=2&emitterAddress=000000000000000000000000e982e462b094850f12af94d21d470e21be9d0e9c&sequence=0000000000000006"

POST

curl -X POST  https://region-project-id.cloudfunctions.net/testnet/readrow \
-H "Content-Type:application/json" \
-d \
'{"emitterChain":"2", "emitterAddress":"000000000000000000000000e982e462b094850f12af94d21d470e21be9d0e9c", "sequence":"0000000000000006"}'

See ./bigtable-endpoints.md for API patterns