Operate

Deploy

Publish the contract, connect Google and Enoki, and host the app.

On this page

1. Publish the contract#

Run the tests first, then publish with an account that has testnet SUI.

Terminal
cd move
sui move test

sui client switch --env testnet
sui client faucet
sui client publish

Copy the package ID from the output into NEXT_PUBLIC_FLOE_PACKAGE_ID.

2. Create a Google OAuth client#

  1. In Google Cloud Console, create an OAuth client for a web application.
  2. Add these authorized redirect URIs:
Redirect URIs
http://localhost:3000/auth
https://<your domain>/auth
  1. Copy the client ID into NEXT_PUBLIC_GOOGLE_CLIENT_ID.
  2. On the consent screen, use /privacy and /terms on your domain for the policy links, after adapting them to your deployment.

3. Set up Enoki#

In the Enoki Portal:

  1. Add your Google client ID.
  2. Create a public key with zkLogin enabled, for NEXT_PUBLIC_ENOKI_API_KEY.
  3. Create a private key with sponsored transactions enabled, for ENOKI_SECRET_KEY.
  4. Enable both keys on the network you use.
  5. Allow the call target <package ID>::escrow::claim_escrow.
  6. Check the gas budget.

4. Host the app#

Import the repository into Vercel, add the environment variables and deploy. Any host that runs Next.js 15 with server routes works.

  • Serve it over HTTPS. Clipboard access and login need it.
  • Redeploy after changing a NEXT_PUBLIC_ variable.
  • /api/claim has no rate limit of its own. Add one at your host, and set a budget in Enoki.
  • Think twice before adding analytics or error tracking. A script that records the full page address on /claim would capture the key.

5. Try a full payment#

  1. Create a small link from a testnet wallet.
  2. Open it in a private window and claim it with Google.
  3. Check that the dashboard shows it as claimed.
  4. On the account page, withdraw it to another address.
  5. Create a second link, and refund it.
  6. If the roundup was on, find its transfer to the treasury in the claim transaction.

Going to mainnet#

  • Have the contract audited.
  • Run a Walrus publisher if you want gifts. There is no public one on mainnet, so protect yours from abuse.
  • Decide how people who hold only $LOFI will pay to withdraw it. If you sponsor that, limit it so it can’t drain your gas budget.
  • Publish it on mainnet, and set the network, node and package ID together.
  • Create mainnet Enoki keys and fund sponsorship.
  • Have a lawyer review the terms and privacy policy for where you operate. Moving money for other people can be regulated.