TaifoonTAIFOON
Start with one call

Guide · Contracts

Build a contract

One forge package gives a contract the Taifoon modules' interfaces, the payment scheme's fee rule and leg check, the envelope digests of the coord pipe, and where each module is deployed. It is generated from the coord layer's sources and MIT licensed: taifoon-io/taifoon-contracts.

Start

A forge project with the agent-job example, wired to the chain it is deployed on:

shell
npx @taifoon/cli new --contracts my-agent-job   # once the next CLI release is out; until then:
forge init my-agent-job && cd my-agent-job
forge install taifoon-io/taifoon-contracts --no-git
echo 'taifoon-contracts/=lib/taifoon-contracts/' >> remappings.txt
forge build

In a contract, fail clearly where a module is not deployed:

solidity
import {TaifoonAddresses} from "taifoon-contracts/src/coord/sdk/TaifoonAddresses.sol";
import {TaifoonCoord} from "taifoon-contracts/src/coord/sdk/TaifoonCoord.sol";

address verifier = TaifoonAddresses.requireLive(block.chainid, TaifoonAddresses.Module.Verifier); // reverts NotLive elsewhere
uint256 listPrice = TaifoonCoord.listPriceOf(sellerPrice, 49, 18953); // the fee rule; bps and floor from /v1/fees/quote

Where each piece is deployed

The economy modules have one address on every EVM chain; this is where each has been deployed. The package's TaifoonAddresses.isLive answers the same on chain.

ChainVerifierAnchorPayment channelWorkflowAssurance hookJev V5Jev log
Gnosis 100yesyesyesyes———
Monad 143yesyesyesyesyes—yes
Robinhood Chain 4663yesyesyesyesyes——
Arc 5042yesyesyesyesyes—yes
Base 8453yesyesyesyesyesyesyes
Taifoon devnet 36927yesyesyesyes———
Arbitrum One 42161————yes—yes
Taifoon mainnet 3692781yesyesyesyes———

The agent-job example

StepWhat it does
postThe buyer pays the seller price, the reseller markup and our fee by the scheme’s rule; TaifoonCoord.checkLegs checks the legs sum to the price, to the unit.
releaseOnJevPays the legs once Jev’s decision on the job is in the Jev decision log, recorded by Jev’s recorder, at the confidence the job asked for.
releaseOnProofOr pays once the verifier proves the job’s order is delivered under the superroot.
refundAfter the deadline, returns the escrow to the buyer.

Its tests run against Base: BASE_RPC_URL=https://mainnet.base.org forge test --match-contract AgentJobBaseForkTest records a verdict in the live Jev log on a fork and checks the USDC legs land. The off-chain half reads the same job through the API: examples/agent-job.

The API next to it

A free key for the coordination API, which reads and streams the same jobs, proofs and envelopes:

shell
curl -X POST https://coord.taifoon.dev/v1/register