Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

c-atts/evm-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

catts-evm-proxy

Runs a Cloudflare Worker that proxies requests to the Alchemy API. The worker is written in Rust, compiled to WebAssembly, and deployed to Cloudflare's edge infrastructure.

Pre-requisites

The worker is configured using the following environment variables:

  • ALCHEMY_API_KEY: The API key to use when making requests to The Graph API.

Development

1. Configure

  • Create a .dev.vars file in the root of the project.
  • Add the following content to the file:
ALCHEMY_API_KEY=<API_KEY>

2. Run

npm i
npm run dev

Production

1. Configure

Set the environment variable using:

npx wrangler secret put ALCHEMY_API_KEY

2. Deploy

npm run deploy

Wrangler

Wrangler is used to develop, deploy, and configure your Worker via CLI.

Further documentation for Wrangler can be found here.

WebAssembly

workers-rs (the Rust SDK for Cloudflare Workers) is meant to be executed as compiled WebAssembly, and as such so must all the code you write and depend upon. All crates and modules used in Rust-based Workers projects have to compile to the wasm32-unknown-unknown triple.

Read more about this on the workers-rs project README.

About

Proxy requests to Alchemy EVM RPC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published