unionlabs/union · error · Error

simulation result not found

Error message

simulation result not found

What it means

Thrown by simulateSimpleTransaction when the Aptos SDK's transaction.simulate.simple returns no first element or a result whose success flag is falsy. Simulation executes the transaction against the current ledger state without submitting it, so this error means the Move code would abort if submitted (or the node returned an empty simulation array).

Source

Thrown at typescript-sdk/src/aptos/transfer.ts:97

    args.aptos.transaction.submit.simple({
      transaction: args.transaction,
      senderAuthenticator: args.accountAuthenticator,
    }),
  error => new Error(`Submit simple transaction failed`, { cause: error }),
)

const simulateSimpleTransaction: (args: {
  aptos: Aptos
  signerPublicKey: PublicKey
  transaction: AnyRawTransaction
}) => ResultAsync<UserTransactionResponse, Error> = ResultAsync.fromThrowable(
  async args => {
    const [simulationResult] = await args.aptos.transaction.simulate.simple({
      transaction: args.transaction,
      signerPublicKey: args.signerPublicKey,
    })
    if (!simulationResult?.success) {
      throw new Error("simulation result not found")
    }
    return simulationResult
  },
  error => new Error(`Simulate simple transaction failed`, { cause: error }),
)

export const transferAssetFromAptos: (args: AptosTransferParams) => ResultAsync<string, Error> =
  ResultAsync.fromThrowable(
    async parameters => {
      const payload = {
        function: `${parameters.relayContractAddress}::ibc::send`,
        typeArguments: [],
        functionArguments: [
          parameters.sourceChannel,
          isValidBech32Address(parameters.receiver)
            ? bech32AddressToHex({ address: parameters.receiver })
            : parameters.receiver,
          [parameters.denomAddress],

View on GitHub (pinned to 031785bb6d)

Solutions

  1. Inspect the simulation result's vm_status (log the full array returned by simulate.simple) to find the abort reason
  2. Make sure the simulated signer has the asset and gas balance the real signer would have
  3. Check the payload's function path, typeArguments, and argument order against the deployed contract
  4. Point the client at a healthy fullnode (https://fullnode.mainnet.aptoslabs.com/v1 or a paid provider)
Defensive patterns

Strategy: try-catch

Validate before calling

const [simulation] = await aptos.transaction.simulate.simple({
  transaction,
  signerPublicKey,
})
if (!simulation?.success) {
  console.warn("simulation aborted:", simulation?.vm_status ?? "no result")
  // fix payload/balance before signing the real transaction
}

Try / catch

try {
  await simulateTransfer(params).toPromise()
} catch (error) {
  if ((error as Error).message.includes("simulation result not found")) {
    // run a raw simulate.simple to read vm_status and correct arguments/balance
  }
  throw error
}

Prevention

When it happens

Trigger: Simulating a transfer payload (e.g. relayContractAddress::ibc::send or fungible transfer) where execution aborts: wrong argument types/counts, insufficient balance, resource errors, or an unreachable/legacy RPC node that returns an empty simulation result.

Common situations: Cross-chain transfer previews that simulate before signing; a signer public key that does not match the funding account; denom address with no fungible store for the signer; testnet/fullnode endpoints that behave differently than mainnet.

Related errors


AI-assisted analysis of unionlabs/union@031785bb6d (2026-08-16). Data as JSON: /api/errors/64d5ff3ec2dd32ac. Report an issue: GitHub.