See README.md for more information.
/relay
endpoint expects following arguments:
txhash
(mandatory): The EVM transaction that contains theInitiateRequest
event from our target contract.reqId
(optional): It is required when a giventxHash
contains more than oneInitiateRequest
event (can happen if someone creates a bulk-registration contract on top).
# Install dependencies
bun install
# Create `.dev.vars` & Set your private key
cp .dev.vars.example .dev.vars
# [Optional] Edit `wrangler.toml` if needed
# [Optional] (Re)generate contract types from (Solidity & ink!)
bunx wagmi generate
bunx dedot typink -m /path/to/contract/metadata.json -o ./types/contract-name
# Run development server
bun run dev
# Build for production
bun run build
# Put your private key in the Cloudflare secrets manager
bunx wrangler secret put OG_PRIVATE_KEY --env <testnet|mainnet>
bunx wrangler secret put INFURA_API_KEY --env <testnet|mainnet>
bunx wrangler secret put EVM_RELAYER_PRIVATE_KEY --env <testnet|mainnet>
bunx wrangler secret put WASM_PRIVATE_KEY --env <testnet|mainnet>
# Deploy the worker
bunx wrangler deploy --env <testnet|mainnet>