The backend which server the Renotion web3 app.
It checks on-chain state (from Polygon), and then fetches relevant metadata, and asserts Cloudflare Custom Domains registration.
Successful registrations are then forwarded to the Renotion CF Worker which proxies Notion pages based on blockchain state.
It relies on the deployed Renotion Smart Contract.
- First
cp .env.example .env
– and then setup your environment go run cmd/main.go
to run the fiber webapp
First, you need to setup the secrets for the fly.io app:
flyctl secrets set \
CF_API_TOKEN=$CF_API_TOKEN \
MORALIS_API_KEY=$MORALIS_API_KEY \
ZONE_NAME=$ZONE_NAME \
CHAIN=$CHAIN \
RPC_URL=$RPC_URL \
RENOTION_CONTRACT=$RENOTION_CONTRACT \
TOKEN_ADDRESS=$TOKEN_ADDRESS
flyctl deploy -a renotion-test
flyctl deploy
GET /api/tokens/:owner
Fetches page registrations owned by an accountGET /api/domains/:owner
Fetches page registrations from chain, and then asserts Cloudflare domain associations.GET /api/metadata/:tokenID
Reads metadata from chain, currently only hostname and an associated pageGET /api/domain/:tokenID
Fetches page registrations from chain, and then asserts Cloudflare domain association for the given registration.