lawyerWario
lawyerWario

Reputation: 41

Runtime Call Error - API Error 1002 Execution Aborted

GM,

Im trying to call an extrinsic on a custom pallet to create a nft with 4 string inputs but I get this error:

RpcError: 1002: Verification Error: Runtime error: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed
WASM backtrace:
error while executing at wasm backtrace:
    0: 0x39abdc - <unknown>!rust_begin_unwind
    1: 0x9f2b - <unknown>!core::panicking::panic_fmt::hf7c25cb489ef9658
    2: 0x225dc1 - <unknown>!TaggedTransactionQueue_validate_transaction: RuntimeApi, Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\nWASM backtrace:\nerror while executing at wasm backtrace:\n    0: 0x39abdc - <unknown>!rust_begin_unwind\n    1: 0x9f2b 

This is my function to call the extrinsic:

   const api = await ApiPromise.create({ 
    provider: wsProvider
  });

    await web3Enable("custom-chain");
 
  
    const addr = selectedAccount.address;
  
    const injector = await web3FromAddress(addr);
    if (!injector?.signer) {
      throw new Error("No signer found");
    }

    api.setSigner(injector.signer as any);

    const tx = await api.tx.ipPallet.mintNft(
      "test",
      "test",
      "test",
      "test"
    ).signAndSend(addr, {signer:injector.signer as any})

Any help on how to solve this is welcome.

Upvotes: 0

Views: 58

Answers (0)

Related Questions