Log type with logId '10098701174489624218' doesn't exist in the ABI

I am trying to call a script on fuel and pass it some tokens as well. But I am getting this error, even when I don’t have any log in script.


  const scriptInstance = new MyScript(wallet);
  const tx = await scriptInstance.functions
    .main(0)
    .callParams({
    })
    .txParams({
      gasLimit: 1000000,
      maxFee: 100000,
    })
    .getTransactionRequest();

  const coin = {
    amount: 1000000000,
    assetId:
      "0x000",
  };
  const coinResponse = await wallet.getCoins(coin.assetId);

  tx.addCoinInput(coinResponse.coins[0]);

  const chainInfo = await wallet.provider.getChain();
  const minGas = tx.calculateMinGas(chainInfo);
  const maxGas = tx.calculateMaxGas(chainInfo, minGas);

  tx.maxFee = maxGas.mul(1.1);
  tx.addContractInputAndOutput(
    Address.fromString(
      "0x00.."
    )
  );

  const txCost = await wallet.getTransactionCost(tx);

  const transactionFee = txCost.maxGas;
  tx.gasLimit = transactionFee;


Can someone help me with this issue?

1 Like

Hey @etherhood, I assume your script is calling a contract, hence you’ve added the contract input? Use the addContracts method, and it’ll also add the ABI with the contracts log IDs.

API reference and inter-contract call docs will help.

Any program that is being added in the script, we should also add it’s ABI to the transaction so it has full context.

1 Like

Thank you, do I need full abi of that contract, even if I am not using extra function or methods?
Also the guy above Bailey is scammer, he tried redirecting me to some other site when I asked question for rust sdk thing

1 Like

In theory you only need the logs from the ABI, but you need the full ABI to instantiate the contracts and pass it to addContracts.

And ty, we’ve banned them.

1 Like