Team member signing a multisig transaction on laptop, other team members visible on video call, remote work collaboration moment.
Protocols

Safe Transaction Failure Modes and GS0XX Error Diagnostics

Comprehensive catalog of Safe-specific revert reasons including the GS0XX error code family. Explains what each code means, common root causes, and how to debug using block explorers, Tenderly, or trace-level RPC calls.
introduction
Safe Transaction Failure Modes and GS0XX Error Diagnostics

Introduction

A technical reference for diagnosing reverted Safe transactions using the GS0XX error code family and trace-level debugging.

Safe smart accounts enforce strict execution invariants through a family of custom revert reasons prefixed with GS. These error codes, ranging from GS000 to GS031, are the primary diagnostic signal when a multi-signature transaction fails on-chain. Unlike generic EVM reverts, each GS0XX code maps to a specific precondition violation within the Safe's execTransaction flow, such as insufficient gas (GS000), incorrect owner ordering (GS020), or a mismatched threshold (GS030). For operations teams, wallet integrators, and custodian engineers, the ability to decode these errors is essential to maintaining reliable transaction execution.

The root cause of a GS0XX error is often not the transaction that reverted, but a preceding state change or a flaw in the off-chain signature construction. A GS026 (Invalid owner provided) may indicate a stale owner set in the proposing interface, while a GS022 (Invalid nonce) can point to a pending transaction blocking the queue. Debugging these failures requires correlating the revert reason with the Safe's on-chain state at the block of execution, including the current owner array, nonce, threshold, and the approvedHashes mapping. Tools like Tenderly simulations, debug_traceCall RPC methods, and Safe Transaction Service API queries are necessary to reconstruct the failure context.

This page catalogs the complete GS0XX error code family, explains the operational conditions that trigger each code, and provides a structured debugging workflow for stuck or reverted transactions. Teams managing high-frequency Safes, DAO treasuries, or automated custody flows should integrate these diagnostics into their monitoring and alerting systems to detect pre-execution risks before a transaction is submitted on-chain. Chainscore Labs provides incident response and root-cause analysis for complex Safe transaction failures, including trace-level investigation and remediation planning for institutional operators.

GS0XX ERROR DIAGNOSTICS

Quick Facts

Reference table mapping Safe-specific revert codes to root causes, affected actors, and immediate diagnostic actions for operations teams troubleshooting failed multisig transactions.

Error CodeRoot CauseWho is affectedDiagnostic Action

GS000

Gas required exceeds allowance or gas limit too low

Executors, relayers, wallet integrators

Verify gas estimation logic; check if refundReceiver is set correctly; simulate with higher gas limit

GS001

Threshold not met; insufficient owner confirmations

Signers, custodian teams, DAO operators

Audit approvedHashes mapping on-chain; confirm off-chain signature collection completed; verify signer set against current owner list

GS002

Transaction hash already executed or nonce already used

Automated systems, trading bots, treasury managers

Check execution history for duplicate nonce; verify nonce queue is not blocked by pending transaction

GS003

Invalid owner signature or signature ordering mismatch

MPC providers, HSM integrators, wallet teams

Validate EIP-712 domain separator values; confirm signature r/s/v concatenation order; check for signer address mismatch

GS004

Module or guard reverted execution

Module developers, Safe admins, security engineers

Trace module or guard revert reason via Tenderly; verify module is not paused or deprecated; check guard state conditions

GS005

Delegatecall to non-self address or untrusted module

Module developers, protocol architects

Confirm Operation enum is set to DelegateCall only for self-calls or explicitly allowed modules; review guard logic

GS006

Fallback handler misconfigured or incompatible

Safe admins upgrading handlers, ERC-4337 integrators

Verify fallback handler address matches canonical deployment for Safe version; test token callback and ERC-4337 compatibility

GS007

Contract call reverted during execution

DeFi protocol operators, treasury managers

Simulate transaction against target contract; check for slippage, access control, or state-change revert; verify target contract is not paused

technical-context
SAFE REVERT REASON REFERENCE

GS0XX Error Code Catalog

A comprehensive catalog of Safe-specific GS0XX revert codes, their root causes, and diagnostic procedures for operations teams troubleshooting failed multisig transactions.

The GS0XX family of custom revert reasons is the primary diagnostic tool for understanding why a Safe transaction reverted on-chain. These error codes are emitted by the Safe singleton contract during execTransaction and related flows, providing granular feedback on failures ranging from incorrect owner signatures (GS020–GS026) to gas accounting mismatches (GS000) and module authorization violations (GS100). Unlike generic EVM reverts, GS0XX codes allow operators to pinpoint the exact validation step that failed without replaying the transaction in a local fork, making them essential for debugging stuck or reverted multisig operations in production environments.

Each code maps to a specific assertion in the Safe contract logic. For example, GS000 indicates that the gas provided is insufficient to cover the required gasleft() check, often caused by underestimating the gas cost of complex multi-step delegatecalls or external contract interactions. GS020 signals that the msg.sender is not an owner, while GS026 confirms an invalid owner signature format. Codes in the GS030–GS031 range relate to execTransactionFromModule failures, where a module attempts an operation it is not authorized to perform. Understanding this taxonomy is critical for wallet integrators, custodian teams, and DAO operators who need to build reliable error-handling logic and user-facing diagnostics.

Diagnosing a GS0XX revert requires trace-level RPC access or a tool like Tenderly that can decode custom error data from a failed transaction receipt. The Safe Transaction Service API may report a generic failure, but the on-chain trace contains the exact revert reason. Operators should correlate the code with the transaction's parameters—checking the signatures bytes for GS02X errors, verifying the gasPrice and baseGas values for GS000, or auditing the module's authorization for GS10X errors. Chainscore Labs provides incident response and root-cause analysis for transaction failures, helping teams decode complex revert traces, model gas requirements for high-value executions, and implement robust error-handling pipelines that prevent stuck queues in production Safe deployments.

WHO NEEDS TO ACT ON GS0XX ERROR DIAGNOSTICS

Affected Actors

Wallet and Frontend Teams

Wallet interfaces are the first line of defense against GS0XX errors. When a transaction reverts with a GS code, the wallet must surface a human-readable reason rather than a raw hex revert string.

Immediate actions:

  • Map all GS0XX revert codes to user-facing error messages in your transaction confirmation flow.
  • For GS000 (gas required exceeds allowance), prompt the user to increase the gas limit before resubmission.
  • For GS020 (invalid owner signature), highlight which specific owner signature failed verification.
  • For GS025 (invalid contract signature location), flag EIP-1271 signature issues and suggest the signer verify their contract wallet state.

Operational risk: A wallet that silently fails or shows "transaction reverted" without the GS code leaves operators blind. Chainscore can audit your error-mapping layer and signing flow to ensure every failure mode is properly surfaced.

implementation-impact
DIAGNOSTIC TOOLKIT

Debugging Workflow and Tools

A structured approach and toolset for diagnosing Safe transaction failures, from initial error identification to root-cause analysis using block explorers, simulation platforms, and trace-level RPC calls.

01

Systematic Failure Diagnosis Workflow

Begin by capturing the exact GS0XX revert reason from the failed transaction trace on a block explorer. Cross-reference the error code with the official Safe error catalog to identify the failure category (e.g., gas accounting, signature threshold, module guard). Next, reproduce the transaction parameters in a local or forked environment using the Safe CLI or SDK to isolate the failing condition. This structured workflow prevents time wasted on misdiagnosed root causes.

02

Trace-Level Debugging with Tenderly

Use Tenderly's transaction simulator to replay a failed Safe transaction against a forked mainnet state. This provides a full stack trace, event log, and state diff, pinpointing the exact opcode and contract state that triggered the GS0XX revert. For complex multi-step operations or delegatecalls, Tenderly's debugger is essential for visualizing internal execution context and identifying issues like unexpected storage overwrites or context hijacking.

03

RPC-Based Diagnostics with debug_traceCall

For programmatic debugging, use an archive node's debug_traceCall or debug_traceTransaction RPC methods to get a structured call trace. This is critical for automated monitoring systems that need to parse failure reasons without a UI. The trace output reveals the exact sub-call, gas consumption, and return data that caused the top-level execTransaction to revert, enabling integration with custom alerting and reporting pipelines.

04

Safe CLI and SDK for Local Reproduction

The Safe CLI and Safe{Core} SDK allow you to programmatically recreate a failing transaction's parameters—including the safeTxGas, data, and operation—and simulate it locally against a forked node. This is the most reliable method for debugging complex gas accounting errors like GS000, as you can iteratively adjust gas limits and observe the exact point of failure without spending real ETH on repeated reverts.

GS0XX ERROR DIAGNOSTICS

Common Root Cause Patterns and Mitigations

Recurring failure patterns observed in Safe transactions, their typical root causes, and the operational teams that must coordinate to resolve them.

Failure PatternCommon Root CauseAffected TeamsMitigation and Verification

GS000: Gas required exceeds allowance

Insufficient gas limit specified for a multi-step operation or complex module interaction. The gas sent with the transaction is lower than what the Safe's execTransaction logic requires.

Treasury operators, DAO tooling teams, relayers

Simulate the transaction via Tenderly or a trace-level RPC call to determine the actual gas used. Increase the safeTxGas parameter and re-submit. Chainscore can model gas requirements for complex execution paths.

GS013: Transaction hash already executed

A nonce has been reused, or a previously executed transaction payload is being re-submitted. Often occurs when multiple signers independently trigger execution.

Custodians, multi-sig coordinators, automated bots

Verify the current nonce via the Safe contract. Implement a coordination mechanism to ensure only one party submits the final execution. Review off-chain confirmation logic to prevent race conditions.

GS020: Invalid owner provided in transaction

The signature verification logic failed because the recovered signer address is not a current owner of the Safe, or the owner set changed between signature collection and execution.

Wallet integrators, governance tooling, key management teams

Re-query the live owner set from the contract before execution. Ensure signature-collection pipelines invalidate cached owner lists after any AddOwner or RemoveOwner event. Chainscore can audit signature-verification pipelines.

GS022: Threshold not met at execution time

The number of valid unique signatures collected is below the required threshold. This can happen if an owner is removed after signing, or if a packed signature contains duplicates.

Multi-sig coordinators, DAO operations, custody platforms

Monitor for quorum changes between signature collection and execution. Validate the uniqueness of signatures in the packed bytes before broadcasting. Implement pre-execution threshold checks.

GS025: Invalid contract signature location

An EIP-1271 contract signature was provided, but the signature bytes point to an invalid location or the contract returned an unexpected magic value. Common with misconfigured smart contract wallets.

Module developers, smart contract wallet teams, protocol integrators

Verify that the signing contract correctly implements isValidSignature and returns the EIP-1271 magic value. Test the contract signature path in isolation. Chainscore can review EIP-1271 implementations.

GS026: Fallback handler is not set

A transaction targets the Safe itself with a data payload intended for a fallback handler, but the fallback handler address is set to the zero address.

Safe administrators, deployment tooling, protocol operators

Verify the fallback handler configuration via getFallbackHandler(). If required for token callbacks or ERC-4337, set it to the correct canonical handler address. Chainscore can audit fallback handler configurations.

GS031: Module transaction execution failed

An operation initiated by an enabled module reverted. The root cause is internal to the module's logic, not the Safe's core execution path.

Module developers, treasury operators, risk teams

Debug the module's internal transaction using the original failure reason from the inner call. Isolate the module's state and permissions. Chainscore can perform root-cause analysis on module execution failures.

Delegatecall context corruption

A delegatecall operation to an untrusted or misconfigured contract modified the Safe's storage layout unexpectedly, causing subsequent calls to fail or behave erratically.

Security engineers, module developers, protocol architects

Restrict delegatecall targets to self-calls or rigorously audited modules. Simulate all delegatecall paths in a forked environment. Chainscore can review delegatecall patterns for context hijacking risks.

GS0XX DIAGNOSTIC AND REMEDIATION WORKFLOW

Incident Response Checklist for Stuck Transactions

A structured operational checklist for teams responding to a Safe transaction that is failing to execute or is blocked in the pending queue. This guide maps specific GS0XX revert codes to diagnostic steps, containment actions, and remediation procedures to minimize downtime for critical multisig operations.

What to check: The raw revert data from the failed transaction, either via a block explorer's internal transaction trace, a Tenderly simulation, or an eth_call trace.

Why it matters: Safe's execTransaction function uses a specific error encoding (GS0XX) that immediately categorizes the failure. Guessing the cause without the code leads to wasted time and potentially dangerous state changes.

Signal that confirms readiness: You have isolated a specific GS0XX code (e.g., GS000, GS020, GS026) and have not confused it with a generic EVM revert (e.g., out-of-gas, arithmetic underflow) or a revert from the target contract itself. Use cast run <tx_hash> --trace or a Tenderly simulation to isolate the exact revert opcode.

Chains We Build On

Looking to build on a specific blockchain?

We build smart contracts, DeFi applications, wallets, tokenization platforms, and blockchain infrastructure across the major ecosystems teams choose today. That includes Ethereum, Arbitrum, Optimism, Polygon, Avalanche, Solana, Sui, Aptos, Hedera, Stellar, and NEAR, with support for additional EVM and non-EVM networks based on your product requirements.

EVM ecosystems

  • Ethereum logo
    Ethereum
  • Arbitrum logo
    Arbitrum
  • Optimism logo
    Optimism
  • Polygon logo
    Polygon
  • Avalanche logo
    Avalanche
  • Cronos logo
    Cronos

Non-EVM ecosystems

  • Solana logo
    Solana
  • Sui logo
    Sui
  • Aptos logo
    Aptos
  • Hedera logo
    Hedera
  • Stellar logo
    Stellar
  • NEAR logo
    NEAR

Additional ecosystems

  • Polkadot logo
    Polkadot
  • Cosmos logo
    Cosmos
  • TON logo
    TON
  • Cardano logo
    Cardano
  • Algorand logo
    Algorand
  • Tempo logo
    Tempo

Also available for Base, appchains, custom EVM networks, and cross-chain product architecture.

GS0XX ERROR DIAGNOSTICS

Frequently Asked Questions

Common questions from operations teams debugging reverted Safe transactions. Each answer provides a diagnostic path and actionable remediation steps.

GS000: Gas required exceeds allowance

This is the most common Safe revert. It means the safeTxGas parameter in the transaction is insufficient to cover the actual gas used by the sub-operation.

Root causes:

  • The safeTxGas was set too low for a complex multi-step operation.
  • The target contract's state changed between simulation and execution, altering the execution path.
  • A delegatecall to a module consumed more gas than anticipated.

Diagnostic steps:

  1. Re-simulate the transaction against the current block using Tenderly or a trace-level RPC call.
  2. Compare the simulated gas consumption against the safeTxGas in the reverted transaction.
  3. Check if the target contract's storage state differs from when the transaction was proposed.

Remediation:

  • Propose a new transaction with a higher safeTxGas value. Add a 20-30% buffer above the simulated gas usage.
  • For delegatecall operations, ensure the module's gas consumption is well-understood before setting limits.

Chainscore can perform execution-path gas modeling for high-value Safes to prevent GS000 failures in production.

Trusted by Industry Leaders

Delivering blockchain solutions for 5+ years.

We have partnered with 50+ leading DeFi protocols, NFT ecosystems, and fintech innovators to build secure, scalable, and capital-efficient blockchain products.

Selected Partners & Clients

ChainVote logo
Reax logo
Sokail logo
Swapsicle logo
SyntheX logo
Tekika logo
Telos logo
Zexe logo
ChainVote logo
Reax logo
Sokail logo
Swapsicle logo
SyntheX logo
Tekika logo
Telos logo
Zexe logo
ChainVote logo
Reax logo
Sokail logo
Swapsicle logo
SyntheX logo
Tekika logo
Telos logo
Zexe logo
ChainVote logo
Reax logo
Sokail logo
Swapsicle logo
SyntheX logo
Tekika logo
Telos logo
Zexe logo
I've been working with Chainscore Labs for last 3+ years, they've consistently delivered with strong ownership across multiple projects. The team is reliable and detail-oriented.
L
Lee Erswell
CEO, Telos Foundation
how to get started

How to get started?

If you're looking for blockchain integration, ChainScore Labs has 5+ years of experience helping teams build and integrate exchanges, wallets, smart contracts, tokenization solutions, and protocol-connected products, we can help you choose the right path, integrate securely, and get to production faster. Our team consists of experienced blockchain developers and architects who can help you with your blockchain integration needs.

01

Exploration & Strategy

Define your product goals and choose the right blockchain architecture for your use case.

02

Architecture & Design

Design the smart contracts, tokenomics, and security parameters of your system.

03

Development & Integration

Build and integrate with wallets, oracles, and front-end dApps for a seamless experience.

04

Security & Launch

Comprehensive audits followed by a risk-managed mainnet deployment to protect your users.

Start a build

Need a blockchain engineering team?

Send the project context and we will respond with next steps, scope questions, and a practical path to delivery.