Was nach dem Deploy gesendet wird
Diese Seite beschreibt, was gesendet wird, sobald der Safe existiert. Dazu gehören die neueste Konfiguration für Chains, die noch zurückliegen, eine neu angelegte Order für einen Token, der Burn und Änderungen der Owner. Ein Burn nimmt immer den ganzen USDC-Bestand des Safes auf einer Quell-Chain und schickt ihn über Circle zum Safe auf der Ziel-Chain.
Der Leitfaden unten steht auf Englisch, weil wir ihn unverändert aus dem Repository der SDKs übernehmen.
Applying, re-arming and burning
What an integrator sends after the Safe exists: the newest configuration on each chain, a re-armed token, a burn, the burn as a plain Safe transaction, and owner changes. Index:
README.md. Before this page: documents.md. Related:
status.md, recovery.md.
Every builder here returns transactions and sends none. Anyone may send them: an apply, a re-arm, a burn, or a Safe transaction the owners have signed. Order does not matter, with one exception: a source chain is armed only once the target chain's Safe is deployed and configured. Whoever sends a transaction pays its gas (costs.md).
Apply the newest message everywhere
The message stays valid until its validUntil, at most 180 days after a chain accepts it, so a chain that was never sent it keeps the
seq it holds and goes on acting on it until then; after that end the sweep waits and burn
reverts (ConfigurationExpired) until the owners sign and apply a new message. buildApply
takes the newest signed message, reads on each chain the seq the store holds and the seq
the sweep module's documents belong to. It reports the lag and builds the transactions that close it.
const signed = { configuration: build.configuration, signatures: combined.signatures, verifyingContract: combined.verifyingContract };const applied = await sdk.buildApply({ signed, chains: [8453, 42161] });// applied.lag: one entry per chain; applied.steps: the transactions, the target chain's first
final signed = SignedConfiguration( configuration: build.configuration, signatures: combined.signatures, verifyingContract: combined.verifyingContract,);final applied = await sdk.buildApply(ApplyInput(signed: signed, chains: [8453, 42161]));
| Lag state | Meaning | Transaction |
|---|---|---|
apply |
the chain's stored seq is below the message's |
applyConfiguration of the sweep module, with the message and the signatures
|
sync |
the store holds the message's seq and only the documents lag |
the sweep module's sync(safe) |
current |
nothing to do | none |
undeployed |
the Safe has no code on the chain |
none: buildDeploy builds its deploy, and buildFirstApply the apply that follows it (setup.md)
|
module-not-enabled |
the sweep module is not enabled on the Safe there, so the call would revert | none |
The refusals:
| Refusal | Meaning |
|---|---|
stale-configuration |
a chain holds a seq above the message's; applying the older message would put that chain on a configuration the owners replaced. Build apply with the newest signed message.
|
unknown-store |
no release record names the store of the message |
source-before-target |
a source chain is to be armed before the target chain is ready. Build the target first with chains: [targetChainId].
|
signature-mismatch |
the signatures are not the owners' on a chain; this is where an owner rotated on one chain only shows up |
After each new message, send apply to each chain that lags. A chain left on an older message keeps acting on it.
Re-arm a token
A token's conditional order can be gone while the Safe still holds the token (status says
dropped, status.md). buildArm builds
arm(safe, token) only when the contract would take it at the block read: the token is listed by the row's oracle, not excluded, above the dust limit, and its order is not live.
const tx = await sdk.buildArm({ chainId: 42161, safe, token });
final tx = await sdk.buildArm(ArmInput(chainId: 42161, safe: safe, token: token));
Anything else is a refusal with the contract's own reason: module-not-enabled, not-configured,
row-off, token-excluded, token-not-listed, order-live,
below-dust. buildArm is also refused as handler-replaced when the Safe's fallback handler is no release's router, because a new order is verified through the router (limits.md).
The burn takes the whole USDC balance
Every burn takes the Safe's whole USDC balance on a source chain (SDK-REQ-022). A source chain is not a place to hold USDC: once the balance reaches the row's smallest burn, anyone can start the transfer, and the whole balance goes. Excluding USDC does not stop it. The owners keep the USDC on a source chain with the bridge choice of their message set to off (bridge-off
below; the sweep there still sells supported tokens for USDC, apart from the carrier slice), or by turning the chain off (which also stops every sale on it). A smallest burn above the balance holds the USDC only until the balance reaches it, and once the message's window has ended the burn is refused too (configuration-expired
below), and the sweep waits with it.
An op of the owners that spends USDC in the same settlement as the burn hook may find its USDC gone. The order book of CoW Protocol decides the order of the two hooks in one settlement. If the op runs first, both run. If the burn runs first, the op's USDC transfer fails and its nonce is spent. The USDC is not lost: it is minted into the same Safe on the target chain, less Circle's fee. The fork test is
test_TheBurnHookBeforeAnOwnersOpTakesTheUsdcTheOpWasToSendAndTheOpFirstRunsBoth. The SDK states both facts to the owners in the disclosure (power.whole-balance,
power.op-race). An app that lets the owners spend USDC on a chain that sends it away must say so too. Send the owners' own USDC ops when no burn is due: when
status with transfers shows no held entry with an empty burnRefusal
on that chain (status.md). The status is read at one block, and a sale that settles after it can still start a burn.
buildBurn builds burn(safe) of the bridge module, on request. It builds the call only when the module would burn at the block it read. That spares the sender a call that reverts or does nothing, unless the state changes before it lands (another burn first, for example).
const tx = await sdk.buildBurn({ chainId: 42161, safe });
final tx = await sdk.buildBurn(BurnInput(chainId: 42161, safe: safe));
The refusals are the module's own: module-not-enabled, not-configured, row-off,
burn-on-target-chain (nothing is burnt on the target chain), target-not-forwardable,
below-min-burn, max-fee-zero, max-fee-not-below-amount, and the two that read the owners' signed message:
bridge-off (its bridge choice is off, so the owners keep the USDC on this chain) and configuration-expired
(the latest block's time is after the message's validUntil). The window is judged against the latest block's time, never the device clock, and a burn at exactly
validUntil is still built, as the module lets it pass. A burn uses a row as soon as the store accepts it, even before
sync has brought the documents up to date.
A burn the module accepts can still fail at Circle: the balance above Circle's per-message limit (10,000,000
USDC on each chain on 2026-12-03), a paused minter or transmitter, the Safe on the deny list, or a minimum fee above the signed
maxFee. While it fails, a carrier slice is still sold at least once in every 30-minute bucket and again at every change of the oracle's answer inside it (from a few times to more than a hundred times the old figure of one a bucket, by chain, measured on 2026-12-03; the residual has the figures and the costs, which are ceilings) and nothing is burnt.
status with transfers names the causes a public view shows, and status.md
says what an app shows the owners: the burn is failing, a slice is still sold at least every 30 minutes and as often as the oracle's answer changes, switching the bridge off stops it.
The burn runs by itself as the post-hook of a sale. When the hook does not run (a solver skips it, or the gas the document declares for it is too low on the chain), the USDC waits in the Safe and the next burn takes it; anyone's later
burn(safe) sends the proceeds on to the Safe on the target chain, which is why a too-low hook limit is a delay and not a loss (docs/gas.md, "What the tables show").
status with transfers shows such USDC as held (status.md). An integrator that wants it moved sooner sends
buildBurn.
The burn as a plain Safe transaction
buildFallbackBurn builds the burn as a Safe transaction for the owners to sign on their devices, with the two calls of the bridge module argument for argument (the approval, then the burn). It needs no module, no session key, no delegated signer, no background sender and no server of ours.
buildFallbackBurnExecution builds the execTransaction call that sends it once signed; anyone may send it. It takes the Safe's whole USDC balance as well. It is held to the rules of the burn above, with the same named refusals,
bridge-off and configuration-expired among them: the owners' own transaction is not built for a chain where their message keeps the USDC, or after its window ended.
A signed fallback burn is judged when it is built and never when it is sent. The refusals above are made at the latest block when
buildFallbackBurn runs. The Safe transaction it returns has no deadline, and nothing on chain checks the owners' bridge choice or window on this path: it calls USDC and Circle's
TokenMessengerV2 directly, not the bridge module. buildFallbackBurnExecution
takes only the build and the signatures and reads no chain. So once the owners have signed, the burn stays sendable by anyone until the Safe's nonce moves, also after the owners switch the bridge off or after
validUntil. To cancel a signed burn, the owners use the Safe's nonce for another transaction: any transaction of the Safe executed at that nonce makes the signed burn unusable. An app that lets owners sign a fallback burn should send it soon, or tell them how to cancel it. The cost of a burn sent late is one Circle fee and the USDC moved against their latest choice, to their own Safe on the target chain.
const burn = await sdk.buildFallbackBurn({ chainId: 42161, safe });// each owner signs burn.walletTypedData (eth_signTypedData_v4)const exec = await sdk.buildFallbackBurnExecution({ burn, signatures });
final burn = await sdk.buildFallbackBurn(BurnInput(chainId: 42161, safe: safe));final exec = await sdk.buildFallbackBurnExecution( FallbackExecutionInput(burn: burn, signatures: signatures),);
The step is checked as a whole: a burn whose typed data is not its calls', or a signature that is not an owner's, is refused. The fork test is
test_TheFallbackBurnBurnsTheWholeBalanceThroughTheRealSafeAndCircleWithTheOwnersSignature.
Owner changes
Owners and the threshold live in each chain's Safe, and a key rotated out on one chain only still signs on the others.
buildOwnerChange takes the whole list of owners and the threshold the Safe shall have and builds, for every configured chain where the Safe is deployed, the one Safe transaction (typed data, hash, wallet form) that takes it there with Safe's own owner management, signed by that chain's owners as they stand. Owners or thresholds that differ between chains now are a warning (owners-differ,
threshold-differs), and the transactions bring the chains level. A chain without the Safe is a warning too (undeployed-chain): run the change again once it is deployed.
The owners a chain reports come from your RPC, which can leave an owner out: that owner is then never removed, and the build still says the Safe will have
owners. Give currentOwners, the whole list the Safe has now as you know it, and each chain where the Safe is deployed must report exactly those owners, or the build is refused as
owners-mismatch (naming the chain, the owners you gave that it does not report and the owners it reports that you did not give) and nothing is built. The build then carries a
description naming every owner removed, kept and added, for the owners to read before they sign. Left out, the change is built from the reports as before; use that form for a Safe whose chains differ on purpose, and read the
owners-differ warning.
const change = await sdk.buildOwnerChange({ safe, owners: newOwners, threshold: newThreshold, currentOwners });for (const step of change.steps) { // one step per chain: that chain's owners sign step.walletTypedData, and the step is sent on that chain const exec = await sdk.buildSafeTransactionExecution({ step, signatures: signaturesOf(step) });}
final change = await sdk.buildOwnerChange( OwnerChangeInput( safe: safe, owners: newOwners, threshold: newThreshold, currentOwners: currentOwners, ),);for (final step in change.steps) { final exec = await sdk.buildSafeTransactionExecution( SafeExecutionInput(step: step, signatures: signaturesOf(step)), );}
// on the device that signs a step another device built: show what its calls do, never what the step says it doesconst described = sdk.describeStep(step); // { kind: 'owner-change', operations } | { kind: 'migration', ... } | { kind: 'burn', ... }sdk.verifyStep(step); // the description the step carries must be the one its calls give
// on the device that signs a step another device built: show what its calls do, never what the step says it doesfinal described = sdk.describeStep(step); // OwnerChangeStepDescription | MigrationStepDescription | BurnStepDescriptionsdk.verifyStep(step); // the description the step carries must be the one its calls give
A step is its calls, and the owners sign the Safe transaction that holds them, not the step's operations
(or a migration's removedOrders, disabled, enabled and fallbackHandler), which are data next to it.
describeStep reads the calls back and admits only the shapes the owner-change, migration and fallback-burn builders make: Safe's own owner and module management on the Safe itself, ComposableCoW's
remove and the modules and router of the chain's release records, and the burn's two calls to USDC and TokenMessengerV2, each a plain call with no value and no byte after its arguments.
verifyStep also requires the description the step carries to be the one its calls give, as a whole. Anything else is
invalid-input, and buildSafeTransactionExecution runs the check before it builds the call to send, so a step that says "swap owner" over a token transfer is refused whatever its signatures.
The refusals: owner-not-allowed (an address a Safe refuses as an owner, or an owner listed twice, in
owners or in currentOwners), owner-threshold-out-of-range, safe-not-deployed,
owners-mismatch (with currentOwners), and an owner to add that is a contract, a passkey or a Safe. A signature made for another chain's step is refused. The fork test is
test_TheSdksOwnerChangesAreAcceptedByTheRealSafeAndLeaveExactlyTheOwnersAndThresholdAskedFor. After an owner change, the next configuration message is signed by the new owners;
combineConfigurationSignatures checks them against the Safe on each chain.