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.
cd move
sui move test
sui client switch --env testnet
sui client faucet
sui client publishCopy the package ID from the output into NEXT_PUBLIC_FLOE_PACKAGE_ID.
2. Create a Google OAuth client#
- In Google Cloud Console, create an OAuth client for a web application.
- Add these authorized redirect URIs:
http://localhost:3000/auth
https://<your domain>/auth- Copy the client ID into
NEXT_PUBLIC_GOOGLE_CLIENT_ID. - On the consent screen, use
/privacyand/termson your domain for the policy links, after adapting them to your deployment.
3. Set up Enoki#
In the Enoki Portal:
- Add your Google client ID.
- Create a public key with zkLogin enabled, for
NEXT_PUBLIC_ENOKI_API_KEY. - Create a private key with sponsored transactions enabled, for
ENOKI_SECRET_KEY. - Enable both keys on the network you use.
- Allow the call target
<package ID>::escrow::claim_escrow. - 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/claimhas 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
/claimwould capture the key.
5. Try a full payment#
- Create a small link from a testnet wallet.
- Open it in a private window and claim it with Google.
- Check that the dashboard shows it as claimed.
- On the account page, withdraw it to another address.
- Create a second link, and refund it.
- 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.