Add chain contracts
A Gora app can be off-chain only, but many apps also need a chain contract, gateway, program, or smart wallet. Use a chain contract when you need to:- verify a Gora result or attestation on-chain
- hold app state
- execute transfers or callbacks
- enforce replay protection
- connect mobile/user signatures to chain execution
Key rule
gora deploy deploys your Gora app package.
It does not deploy Base contracts, Solana programs, or Algorand applications.
Use gora contract ... for chain contract metadata:
Local developer vs node operator
If you are developing from your local computer, prefer--node:
--datadir.
Contract metadata endpoint
The Gora node exposes chain metadata at:base and solana entries report their local-devnet status.
Example Algorand response (live testnet values — gateway app 767488273):
token_included: false).
The CLI uses the same endpoint when you run gora contract deploy --node ....
Diagnose setup
Run doctor before deploying:Base/EVM
Build metadata:The separate Gora Base gateway is not deployed, so this metadata lookup returns
needs_deployment. Base Sepolia staking and managed-agent app writes are live;
deploy your own app contract and follow the
Base/Solana quickstart.Solana
Build metadata and default source scaffold:The separate Gora Solana gateway is not deployed, so this metadata lookup
returns
needs_deployment. Solana devnet staking and managed-agent app writes
are live; deploy your own program and follow the
Base/Solana quickstart.Algorand
Build gateway TEAL metadata:app_id from the node — on the public testnet that is gateway app 767488273 (see Connect to the testnet).
VM/operator direct deploy flow (local devnet only):
--datadir must point to a local Algorand Node/ directory containing algod.net and algod.token. It only works on the machine running that Algorand localnet.
Manual record-existing flow (live testnet values):
What linking writes
gora contract link --chain <chain> updates gora.app.json with a contract binding similar to:
Custom fulfillment contracts
For custom EVM contracts, prefer a gateway-mediated callback. The custom contract should accept calls only from the trusted Gora gateway and reject duplicate request ids. Minimal interface:- caller is the trusted gateway
- request id was not already fulfilled
- app id matches your app
- output hash matches the supplied result
- proof/attestation was accepted by the gateway
- decoded result satisfies your policy limits