Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I am getting OUT OF ENERGY Error #509

Closed
Emirhan-Cavusoglu-sftw opened this issue May 1, 2024 · 1 comment
Closed

I am getting OUT OF ENERGY Error #509

Emirhan-Cavusoglu-sftw opened this issue May 1, 2024 · 1 comment

Comments

@Emirhan-Cavusoglu-sftw
Copy link

Emirhan-Cavusoglu-sftw commented May 1, 2024

this is my code I have faced this error before and fixed it with changing isConstant to false but now I am getting the same error

async function createTSD(proofName, proofDescription, ipfsUrl) {
    try {
      const result = await tronWeb.transactionBuilder.triggerSmartContract(
        tsdFactoryAddress,
        "createTSD(string,string,string,string)",
        { _isConstant: false },
        [
          {
            type: "string",
            value: "EC",
          },
          {
            type: "string",
            value: proofName,
          },
          {
            type: "string",
            value: proofDescription,
          },
          {
            type: "string",
            value: ipfsUrl,
          },
        ]
      );
      console.log(result);
      const signedTransaction = await sign(result);
      const transaction = await sendRawTransaction(signedTransaction);
      console.log(transaction);
    } catch (error) {
      console.log(error);
    }

    setresult(result);
  }
@laurenceja
Copy link

@Emirhan-Cavusoglu-sftw For out of energy issue, please set a larger feelimit, and ensure the account has enough TRX or energy. Energy can be obtained by staking TRX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants