Skip to content

joeblau/action-worker

Repository files navigation

Para + Cloudflare Workers

This is a simple cloudflare worker using Para, but it doens't work.

Development

set the env variable in .env.local

PARA_API_KEY_BETA=<beta-api-key>

Testing

You will need to psot the following body to the endpoint:

endpoint: http://localhost:3000/send

{
    "to": "0x1234567890123456789012345678901234567890",
    "value": "1",
    "contractAddress": "0x1234567890123456789012345678901234567890",
    "serializedSession": "...",
    "decimals": 18
}

Run the worker locally

bun run dev

If you run, you will see the error below. which is due Sentry.

⎔ Starting local server...
[wrangler:err] TypeError: this.enable is not a function
    at new InstrumentationBase (file:///Users/joeblau/Developer/joeblau/src/action-worker/node_modules/@opentelemetry/instrumentation-http/node_modules/@opentelemetry/instrumentation/src/platform/browser/instrumentation.ts:38:12)
    at new HttpInstrumentation (file:///Users/joeblau/Developer/joeblau/src/action-worker/node_modules/@opentelemetry/instrumentation-http/src/http.ts:109:5)
    at null.<anonymous> (file:///Users/joeblau/Developer/joeblau/src/action-worker/node_modules/@sentry/node/src/integrations/http/index.ts:115:5)
    at Object.assign.id (file:///Users/joeblau/Developer/joeblau/src/action-worker/node_modules/@sentry/node/src/otel/instrument.ts:25:31)
    at Object.setupOnce (file:///Users/joeblau/Developer/joeblau/src/action-worker/node_modules/@sentry/node/src/integrations/http/index.ts:151:5)
    at setupIntegration (file:///Users/joeblau/Developer/joeblau/src/action-worker/node_modules/@sentry/core/src/integration.ts:107:105)
    at null.<anonymous> (file:///Users/joeblau/Developer/joeblau/src/action-worker/node_modules/@sentry/core/src/integration.ts:78:7)
    at [object Object]
    at setupIntegrations (file:///Users/joeblau/Developer/joeblau/src/action-worker/node_modules/@sentry/core/src/integration.ts:75:16)
    at NodeClient._setupIntegrations (file:///Users/joeblau/Developer/joeblau/src/action-worker/node_modules/@sentry/core/src/client.ts:799:20)
[wrangler:inf] POST /send 500 Internal Server Error (179ms)
⎔ Reloading local server...

About

🛠️ test project with para + cloudflare worker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published