Questions tagged [hedera-hashgraph]

Questions related to development on Hedera Hashgraph distributed ledger

Filter by
Sorted by
Tagged with
1 vote
1 answer
33 views

Deploying Solidity smart contract on Hedera Hashgraph

Hi Everyone I have write smart contract for ERC-20 and deploy it to ethereum network. Can I use the same smart contract to deploy Hedera network with out any code change. So I can use by existing ...
Soumyajit Ghosh's user avatar
0 votes
1 answer
23 views

how can I force a query to Hedera to be directed to a mirror node?

When I call a smart contract view function on the Hedera Testnet, I have to pay in HBAR for the response. My understanding is that Queries should go to mirror nodes but in my case this does not happen....
Micha Roon's user avatar
  • 3,957
0 votes
0 answers
29 views

I am deploying smart contract of 23 kb on Hedera Previewnet, But it gives error "HardhatError: HH110: Invalid JSON-RPC response received"

I am having an issue in deploying the smart contract with a size of 23.4 kb on Hedera Preview net using hardhat. Below is the error HardhatError: HH110: Invalid JSON-RPC response received: 502 Server ...
Sanju's user avatar
  • 1
2 votes
1 answer
29 views

How to Associate/Dissociate an HTS token using Hashgraph JS SDK

I have created a new token on HTS using the JavaScript SDK: // Create an HTS Fungible Token async function createFungibleToken( client, treasuryAccountId, treasuryAccountPrivateKey, ) { // ...
Abi's user avatar
  • 356
2 votes
1 answer
37 views

How to check if an account is associated with an HTS token using the Hashgraph JS SDK

Using the SDK, I was able to obtain a “TokenBalanceMap” using the following code: const accountBalance = await new AccountBalanceQuery() .setAccountId(accountId) .setTokenIds([tokenId]) .execute(...
Abi's user avatar
  • 356
6 votes
1 answer
67 views

How do you Associate/Dissociate an HTS token using EVM transaction?

Before I can receive an HTS token I need to first associate with the token ID. If I were using the JS SDK I know to do the following where the accountId is the account that I want to associate with ...
Alfredo Gutierrez's user avatar
6 votes
1 answer
47 views

Is it possible to create an account on Hedera that has both Ed25519 keys and ECDSA keys?

When visiting the Hedera portal, it generates 2 sets of keys for me: an ED25519 key and an ECDSA key. However, these correspond to different accounts. ​ I would like to be able to operate a single ...
Ryan Arndt's user avatar
2 votes
2 answers
47 views

Hedera removes the contract after deployment

I am trying to deploy a contract. I get the contract address without errors. Immediately after deploy, the contract is deleted. Although it is possible to transfer funds to the contract address ...
Pavel's user avatar
  • 21
0 votes
0 answers
14 views

how can I integrate hedara hashgraph and flutter?

I want to create Mobile Dapp . I want to build the front end through dart Flutter . How can I integrate it wiith the Hedara hashgraph? I couldnt find any resource for this online. I could have gone ...
Vaishnav Tayal's user avatar
5 votes
2 answers
95 views

How to convert a Hedera native address into a non-long-zero EVM address?

Using Hedera SDK JS, I can convert an Account ID to "long-zero" format EVM address. e.g. 0.0.3996280 --> 0x00000000000000000000000000000000003cfa78 (See related question: "How to ...
bguiz's user avatar
  • 27.4k
4 votes
1 answer
63 views

How to get updated remaining HTS fungible token allowance on Hedera?

I have a DApp with a contract that has an approved allowance to spend HTS fungible tokens on behalf of a user. However, the contract keeps reverting with SPENDER_DOES_NOT_HAVE_ALLOWANCE error. I have ...
bguiz's user avatar
  • 27.4k
0 votes
1 answer
19 views

How can I encode and decode an image for use with the Hedera file service?

I want to store images on the Hedera file service but I have no idea on how to get started. I don't know how I should encode my image and how to decode it. The documentation is extremely vague and ...
samuelnihoul's user avatar
4 votes
1 answer
418 views

Golang hedera sdk testnet "Client received GoAway with error code ..."

I am trying to connect to hedera test net. I followed the docs and created a account and used hederaClient := hederaSdk.ClientForTestnet() hederaClient.SetOperator(cfg.Hedera.OperatorID, cfg.Hedera....
CivilizedCrab's user avatar
1 vote
0 answers
19 views

How far into the future can a transaction be scheduled with `scheduled transaction`

in the documentation about the scheduled transaction there is no mention as to the limit (if any) to the value of the expirationTime parameter. I have two questions: what is the maximum value for the ...
Micha Roon's user avatar
  • 3,957
1 vote
0 answers
26 views

Hedera transfer token between accounts - recipent paying transaction fees

I want to transfer tokens (fungible) from account A to account B, but I want the transaction to be submitted by account B and consequently account B pays the transaction fees. Is this possible in ...
cardosojc's user avatar
1 vote
1 answer
48 views

Error when trying to compile my solidity smart contract using hardhat.config.js on hedera network using Arkhia JSON-RPC relay

HardhatError: HH8: There's one or more errors in your config file: Invalid account: #0 for network: hedera - private key too short, expected 32 bytes I keep getting this error when I use the DER ...
Ogolo Prince's user avatar
2 votes
1 answer
45 views

What is a Delegate Contract ID in Hedera

The concept of Delegate Contract ID is touched upon in the documentation but I don't understand it. I was not able to find examples or further explanations. Can someone point me to more details?
Micha Roon's user avatar
  • 3,957
2 votes
0 answers
24 views

Hedera Rust SDK unable to encoded transaction

Hy everyone, I am trying to create freeze TransferTrasnaction using Rust SDK. I now it's still in development process but I was wondering if there is a way. What I want to do is create transaction on ...
perkan11's user avatar
1 vote
1 answer
24 views

Submit Token and Smart Contract related Transactions on UI and listen on Server

What set up do I need for submitting transactions on client, but listen for execution on the server like a webhook? I want to listen on server to change status of records in my own database. Do I need ...
Vishal's user avatar
  • 345
1 vote
0 answers
73 views

Hedera chain Unable to connect to Network using @hashgraph/sdk

Im following the official documentation and trying to play around wit Hedera Chain, I'm not able to execute any query it just gives timeOut error. //Verify the account balance const client = ...
cryptoKTM's user avatar
  • 2,603
1 vote
0 answers
50 views

How do i create Account on hedera testnet?

I am having issues creating account on Hedera testnet. below is the error message C:\Users\OJI\Documents\Hedera-test\node_modules@hashgraph\sdk\lib\Executable.cjs:666 throw new Error(max attempts of $...
Oji's user avatar
  • 11
2 votes
1 answer
22 views

Can I control which consensus node I want to submit my transaction to from the client?

I'm using Javascript SDK. Currently it seems random. I'm wanting to submit to a specific node to reduce latency
Defi Girl's user avatar
  • 196
4 votes
1 answer
85 views

Why does `eth_estimateGas` on Hedera return an unexpectedly high value?

I am aware that eth_estimateGas is not intended to be exact, but currently, I'm getting actual gasUsed values that are approximately 6% of the value returned by eth_estimateGas. In the following ...
bguiz's user avatar
  • 27.4k
2 votes
1 answer
64 views

Large discrepancy in `gasUsed` values in near-identical transactions on Hedera - why?

I have noticed that there is a discrepancy between the amount of gas used by a transaction is almost identical: I'm making a call to a smart contract, with the same parameters twice in a row, and the ...
bguiz's user avatar
  • 27.4k
3 votes
1 answer
121 views

How can I use a transaction hash from Hashscan in a JSON-RPC query, on Hedera?

I'm looking at a transaction on Hashscan Its transaction hash is: 0x89eb7e219df6f8b3b3406c8a3698d5b484a4945059af643861c878e41ffc161b2589cc82ff40b4392ceb53856c5252c1 ... which does not work with the ...
bguiz's user avatar
  • 27.4k
1 vote
1 answer
87 views

How can I obtain a block number programmatically on Hedera?

I understand from HIP-415: Introduction Of Blocks, that Hedera now has blocks, and they're based on timestamps of the transactions being grouped together into "record files" which are an ...
bguiz's user avatar
  • 27.4k
2 votes
1 answer
262 views

How to convert a Hedera native address into an EVM address? ​

How can I convert a Hedera-native address to an EVM address (and vice versa)? ​ Let's say I have the following: a Hedera-native account, with an address like 0.0.12345 an EVM account on Hedera, with ...
Ryan Arndt's user avatar
1 vote
3 answers
196 views

How can I connect to Hedera Testnet using web3.js or ethers.js?

​ I would like to interact with the Hedera Testnet using web3.js or ethers.js. How can I do this? ​ I have previously interacted with Hedera Testnet using hedera-sdk-js, for example using the ...
Defi Girl's user avatar
  • 196
3 votes
1 answer
210 views

How can I connect to Hedera Testnet over RPC? ​

I am unable to connect to a Hedera Testnet RPC endpoints over HTTP, reliably, I get the following "Unknown error" intermittently: ​ [Request ID: fe7b9928-a23f-0d72-61a1-b7cd23658c01] Unknown ...
Defi Girl's user avatar
  • 196
3 votes
1 answer
80 views

How to get the HBAR balance of an account on Hedera at a specific time in the past?

I can query the current balance from the mirror node using this request: curl --request GET \ 'https://testnet.mirrornode.hedera.com/api/v1/balances?account.id=0.0.3996280' \ --header 'Content-...
bguiz's user avatar
  • 27.4k
1 vote
0 answers
111 views

"Unkown error: Receipt Status Error" for a Smart Contract deployed on Hedera

I'm following this Hedera tutorial for transferring hbars with a smart contract. After trying to run the code provided in the tutorial, I get the following error: ReceiptStatusError: receipt for ...
Defi Girl's user avatar
  • 196
1 vote
2 answers
78 views

What is the "full unit" of the native coin (HBAR) on Hedera?

In my smart contract, I would like to accept exactly 1 full HBAR unit in a payable function. The following code would work in Ethereum, by specifying 1 ether. pragma solidity 0.8.18; contract Example ...
Defi Girl's user avatar
  • 196
4 votes
1 answer
976 views

How to resolve intermittent "nonce has already been used" error when deploying multiple smart contracts to Hedera Testnet?

When I deploy 2 smart contracts at the same time to Hedera Testnet, I get the following error: nonce has already been used [ See: https://links.ethers.org/v5-errors-NONCE_EXPIRED ] This occurs ...
bguiz's user avatar
  • 27.4k
4 votes
1 answer
111 views

When running "hedera-json-rpc-relay", how to configure a connection to Hedera Testnet?

I'm following the instructions on hedera-json-rpc-relay: Specifically docs/configuration.md, attempting to run the RPC relay connecting to Hedera Testnet: HEDERA_NETWORK=TESTNET OPERATOR_ID_MAIN=0.0....
bguiz's user avatar
  • 27.4k
1 vote
1 answer
118 views

How do I configure "hedera-local-node" to to connect to hedera testnet?

I'm trying to run a Hedera local node locally, and I'm following the docker set up instructions followed by these instructions to set up a localhost network, but then hoping to change the connection ...
bguiz's user avatar
  • 27.4k
0 votes
0 answers
30 views

How to send a payment request on Hedera with a recipient address and an amount?

I hope you are doing well. Can someone advise me on the best method to send a payment request on Hedera with a recipient address and an amount? I am trying to create a QR code for a web app that can ...
Pathorn Teng's user avatar
1 vote
0 answers
38 views

How do I query a transaction receipt and confirm that the transaction is executed successfully on Hedera network?

I have a completed transaction and I have its transaction ID. I am trying to query that transaction using the following code: const transactionQueryExecuteTx = await new TransactionReceiptQuery() ...
Pathorn Teng's user avatar
1 vote
0 answers
125 views

I am getting an error when trying to sign a transaction using HashPack with Hedera Javascript SDK

I am attempting to sign a transaction on the front end and send the signed bytes to the backend for transaction execution. However, I am encountering difficulty in signing the transaction. I have ...
Pathorn Teng's user avatar
0 votes
0 answers
41 views

How to get "Request ID" for hedera transactions that are not errors?

When sending transactions using ethers.js to the Hedera testnet, and one errors, I can catch it like so: } catch (error) { if (error instanceof Error) console.log(error.message); ...
bguiz's user avatar
  • 27.4k
0 votes
0 answers
14 views

How do I query transactions receipts from the mirror using SDK?

I've got this code. const client = Client.forTestnet().setOperator(operatorId, operatorKey) const recipt = new TransactionReceiptQuery() .setTransactionId(transactionId) .execute(client) ...
Pathorn Teng's user avatar
1 vote
1 answer
56 views

How do I send a transaction to HashPack for signing?

I am trying to sign a transaction on the frontend and send the signed bytes to the backend to execute the transaction. However, I am having difficulty signing the transaction. I have a HashConnect ...
Pathorn Teng's user avatar
1 vote
2 answers
123 views

INVALID_FULL_PREFIX_SIGNATURE_FOR_PRECOMPILE error when trying to create a token on Hedera via a smart contract

I am encountering an error message INVALID_FULL_PREFIX_SIGNATURE_FOR_PRECOMPILE while attempting to create a Hedera Token through a smart contract. The function in question is designed to call the ...
Pathorn Teng's user avatar
0 votes
1 answer
66 views

I am getting error message SPENDER_DOES_NOT_HAVE_ALLOWANCE while attempting to transfer HTS tokens via a smart contract

I am encountering an error message SPENDER_DOES_NOT_HAVE_ALLOWANCE while attempting to transfer HTS tokens from my wallet using a smart contract. Although I deployed my smart contract some time ago on ...
Pathorn Teng's user avatar
0 votes
1 answer
51 views

I am getting an INSUFFICIENT_TX_FEE error when trying to call a Solidity function that mints an HTS token

I have a question regarding an INSUFFICIENT_TX_FEE error that I am getting for the following cases. First, some background: I have a contract that is supposed to act as a treasury. Prior to the ...
Pathorn Teng's user avatar
0 votes
1 answer
64 views

How do I get the transaction id after I transfer Hbar using the following code?

I am following this tutorial and writing code to send hbar from my account to another account. https://docs.hedera.com/hedera/getting-started/transfer-hbar const sendHbar = await new ...
Pathorn Teng's user avatar
0 votes
1 answer
20 views

Is there a way to extend the transaction validity over 180 seconds?

Currently, my strategy involves creating a Transaction object (e.g., TransferTransaction) that is configured to meet the necessary requirements, including specifying the required signatures. Next, I ...
Pathorn Teng's user avatar
1 vote
1 answer
73 views

How to get balance of a token or account for a specific timestamp?

I'm currently working in a project where I need to get balance of a token and accounts balances. I was wondering if you can retrieve the balance for yesterday or any other point in time, bot for ...
Mulders Michiel's user avatar
3 votes
1 answer
158 views

How can I use Hedera JS SDK to generate a set of ECDSA key-pairs based on a BIP-39 seed phrase and a custom derivation path?

I'm currently using the Hedera JS SDK to generate a single ECDSA key-pair using a private key directly as an input, like so: const privateKey = PrivateKey.fromStringECDSA(process.env....
bguiz's user avatar
  • 27.4k
0 votes
1 answer
31 views

Where is hedera token / topic metadata housed?

If I were to pass in a JSON object with metadata (ie. key=value pairs) to hedera's token / topic creation API, would a mirror node consume these metadata values as part of the transactions it captures ...
DBHomey97's user avatar
0 votes
1 answer
41 views

TransactionReceipt has empty children array for PrivateKey.fromStringECDSA() but not for PrivateKey.generateECDSA()

When I run the code example for transfer-using-evm-address.js, unmodified, it works. However, when I change this line: const privateKey = PrivateKey.generateECDSA(); to this: const privateKey ...
bguiz's user avatar
  • 27.4k