Skip to Content
Symmio Trading-SDK — the SDK surface for builders on Arbitrum
CoreInstantLayerinitiateRevokeDelegation

initiateRevokeDelegation

Schedule the revocation of a delegated signer’s authority. This is the first of the Instant Layer’s two revocation steps.

import { getSessionKeySelectors, initiateRevokeDelegation } from "@symmio/trading-core"; const hash = await initiateRevokeDelegation(config, { account: { addr: subAccount, isPartyB: false }, delegate: sessionKeyAddress, selectors: getSessionKeySelectors(config, { chainId }), });

This write cannot be relayed, and takes no gasless option. The relay signs Instant Layer operations, and _verifyOperation sends every operation whose target is the Instant Layer itself to _verifyGrantOperation, which rejects any selector other than grantDelegation / grantDelegations. A relayed revocation would always revert. Budget native gas for this call — including when the delegate revokes itself.

Who may call it

The contract accepts a revocation from the account owner, from the delegate itself, or from a holder of REVOKER_ROLE. A session key can therefore retire its own authority without an owner prompt, provided that key holds native gas.

The cooldown, and what it means for security

This call only schedules the revocation. It stamps pendingRevocationEta = block.timestamp + revocationCooldown (read it with getRevocationCooldown) and silently skips any selector that is not currently active.

Because it leaves the delegations mapping untouched, none of the “is it active?” reads change when this lands — the key keeps signing and keeps reporting as ready. Read getPendingRevocationEtas to show the revocation as pending, and to know when it becomes finalizable.

Until that ETA passes the delegate keeps signing. Revocation is not an instant kill switch: budget for the cooldown when you plan an incident response. Once the ETA passes, enforcement stops honoring the delegation, and finalizeRevokeDelegation clears the stored grant.

Parameters

accountInstantLayerAccountrequired

The account the delegation was granted under.

delegateAddressrequired

The delegated signer whose authority is being revoked.

selectorsreadonly Hex[]required

Function selectors (bytes4[]) to revoke. Selectors that are not active are skipped.

chainIdnumberoptional

Optional chain override.

fromAddressoptional

Signer override passed to the wallet-client resolver.

simulateBeforeWritebooleanoptional

Dry-run the call first. Defaults to the config’s setting.

Returns

Hash
The submitted transaction hash. The caller waits on the receipt.

Mutation options

import { initiateRevokeDelegationMutationOptions } from "@symmio/trading-core"; import { useMutation } from "@tanstack/react-query"; useMutation(initiateRevokeDelegationMutationOptions(config));

The React binding is useInitiateRevokeDelegation.

Last updated on