Something wrong when contract call

I am a beginner and I want to learn how to call contract functions on Fuel.These contracts were not deployed by me.

When I call these contract functions, I receive the following error message, I cannot sign the tx:

_FuelError: Invalid transaction data: Validity(InputInvalidSignature { index: 2 })
at _FuelGraphqlSubscriber.next (E:\FileStore\Web3\Function_Script\Fuel_Testnet\node_modules@fuel-ts\account\dist\index.js:1235:17)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async _Provider.sendTransaction (E:\FileStore\Web3\Function_Script\Fuel_Testnet\node_modules@fuel-ts\account\dist\index.js:4299:41)
at async FunctionInvocationScope.call (E:\FileStore\Web3\Function_Script\Fuel_Testnet\node_modules@fuel-ts\program\dist\index.js:847:22)
at async E:\FileStore\Web3\Function_Script\Fuel_Testnet\Fuel_Learn.js:1475:22 {
VERSIONS: { FORC: ‘0.60.0’, FUEL_CORE: ‘0.30.0’, FUELS: ‘0.90.0’ },
metadata: {},
code: ‘invalid-request’
}

my simple code:

const provider = await Provider.create(URL);

      const my_wallet = Wallet.fromPrivateKey('xxxxxxx');
      const my_account = new Account(my_wallet.address, provider);

      const contract_1 = new Contract(contract_id_1, contract_abi_1, my_account);
      const contract_2 = new Contract(contract_id_2, contract_abi_2, my_account);

      const value  = await contract_1.functions.mint_something('test_mint', 1).addContracts([contract_2]).callParams({
        forward: {
          amount: 1000000,
          assetId: provider.getBaseAssetId()
        }
      }).txParams({
        gasLimit: 10000000,
        gasPrice: 1,
      }).call();
1 Like

HI @sssshello ,

Welcome to the Fuel community!

Can you please provide:

  1. The fuelup show results
  2. The address of the contract you are trying to call
  3. The URL to the tutorial or guide you are following
  4. The version of the typescript SDK you are using
  5. The entire code sample, snippet or github repo of the code you are trying to run

Once you provide these we can take a look.

2 Likes