{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "mainnet-data",
            "type": "go",
            "request": "launch",
            "mode": "auto",
            "program": "${workspaceFolder}/main.go",
            "args": [
                "-race" // tells Go to report race conditions
            ],
            "env": {
                "PORT": "8080",
                "GCP_PROJECT": "wormhole-315720",
                "BIGTABLE_INSTANCE": "wormhole-mainnet",
                "CACHE_BUCKET": "cloud-function-cache-mainnet",
                "TOKEN_ALLOWLIST": "token-allowlist-mainnet.json",
                "GOOGLE_APPLICATION_CREDENTIALS": "/home/you/path/to/your/service-account.json",
                // LOAD_CACHE sets whether or not previously computed results should be loaded and used in calculations
                // can be set to false to effectively rebuild the cache
                // "LOAD_CACHE": "true",
                // CoinGecko API key if you have one. will work without - rate limit is lower.
                // "COINGECKO_API_KEY": "your-key-here",
                // SolanaBeach API key if you have one. will work without - rate limit is lower.
                // "SOLANABEACH_API_KEY": "your-key-here",
                // if you'd like run local functions triggered by Pub/Sub messages, uncomment the following
                // "PUBSUB_NEW_VAA_TOPIC": "new-vaa-devnet-${env:USERNAME}",
                // "PUBSUB_NEW_VAA_SUBSCRIPTION": "extract-payload-devnet-${env:USERNAME}",
                // "PUBSUB_TOKEN_TRANSFER_DETAILS_TOPIC": "create-token-transfer-details-${env:USERNAME}",
                // "PUBSUB_TOKEN_TRANSFER_DETAILS_SUBSCRIPTION": "calculate-transfer-data-devnet-${env:USERNAME}",
            },
        },
        {
            "name": "devnet-emulators",
            "type": "go",
            "request": "launch",
            "mode": "auto",
            "program": "${workspaceFolder}/main.go",
            "args": [
                "-race"
            ],
            "env": {
                // Tilt devnet values, set in devnet/bigtable.yaml
                "GCP_PROJECT": "local-dev",
                "BIGTABLE_INSTANCE": "wormhole",
                "BIGTABLE_EMULATOR_HOST": "localhost:8086",
                "PUBSUB_EMULATOR_HOST": "localhost:8085",
                "PUBSUB_NEW_VAA_TOPIC": "new-vaa-devnet",
                "PUBSUB_NEW_VAA_SUBSCRIPTION": "extract-payload-devnet",
                "PUBSUB_TOKEN_TRANSFER_DETAILS_TOPIC": "create-token-transfer-details-devnet",
                "PUBSUB_TOKEN_TRANSFER_DETAILS_SUBSCRIPTION": "calculate-transfer-data-devnet",
                "CACHE_BUCKET": "cloud-function-cache-devnet",
                "TOKEN_ALLOWLIST": "token-allowlist-devnet.json",
            },
        },
    ]
}
