Execution error code 100: Execution failed:\ncomputation limited exceeded: 10

Hi, I am currently building the frontend of my dapp mostly starting off from fcl-demo repo of the week 4 lecture.

The transaction is as follows.

import FlowToken from 0x01cf0e2f2f715450

// This transaction configures an account to store and receive tokens defined by
// the FlowToken contract.
transaction {
  var address: Address
  // var receiverRef: [&FlowToken.Vault{FlowToken.Receiver}]

  prepare(acct: AuthAccount) {
    self.address = acct.address
    // Create a new empty Vault object
    let vaultA <- FlowToken.createEmptyVault()
      
    // Store the vault in the account storage
    acct.save<@FlowToken.Vault>(<-vaultA, to: /storage/FlowVault)

    log("Empty Vault stored")

    // Create a public Receiver capability to the Vault
    acct.link<&FlowToken.Vault{FlowToken.Receiver, FlowToken.Balance}>(/public/FlowReceiver, target: /storage/FlowVault)

    log("References created")
  }
}

When I run this transaction via Go SDK, it seems working fine.

However, when I send the transaction with following using js-sdk using the account created by the dammy wallet, I get the error in the title.

      const { transactionId } = await fcl.send([
        fcl.transaction(simpleTransaction),
        fcl.proposer(fcl.currentUser().authorization),
        fcl.authorizations([
          fcl.currentUser().authorization,
        ]),
        fcl.payer(fcl.currentUser().authorization),
        fcl.ref(block.id)
      ])

The code is at https://github.com/makoto/alley-oop/blob/master/src/dex/SetupVault.js

Hey @makoto

I got this same error earlier today
In fcl.send() add sdk.limit(100)
I’m not sure about this but I guess it’s a gas limit exceeded error and the gas limit is set 10 by default.

1 Like

Ok, that worked. Thanks.

1 Like

That is correct.

1 Like