Questions tagged [hedera-hashgraph]

Questions related to development on Hedera Hashgraph distributed ledger

Hedera () is an open-source, Distributed Ledger Technology that includes services for EVM-compatible smart contracts, file service, consensus service, token service, and a schedule service. Check out "What is Hedera?" for a an overview, and docs.hedera.com for developer documentation.

Hedera uses its own Hashgraph consensus to secure the network and its transactions, and it is a faster, more energy efficient, and more secure alternative to blockchain consensus mechanisms. Participation as a consensus node is currently permissioned by the Hedera Council, with an intention to transition to a permissionless network in the future.

128 questions
6
votes
1 answer

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 account which may be signed by either an ED25519 or…
Ryan Arndt
  • 148
  • 5
5
votes
1 answer

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 the token. const associateTransaction = await new…
5
votes
2 answers

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 convert a Hedera native address into an EVM address?".) How do I…
bguiz
  • 27,371
  • 47
  • 154
  • 243
5
votes
3 answers

“Gossip about gossip” protocols

Lately there is much rumor about the (patented) hashgraph consensus algorithm, which claims to have very good complexity measures. See the whitepaper: https://swirlds.com/downloads/SWIRLDS-TR-2016-01.pdf A central part of this appoach, is the so…
4
votes
1 answer

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 a condition in my code to ask the DApp’s user to…
bguiz
  • 27,371
  • 47
  • 154
  • 243
4
votes
1 answer

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.OperatorKey) This snippet to try and connect to…
CivilizedCrab
  • 63
  • 1
  • 5
4
votes
1 answer

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 example, I invoke the same smart contract with the…
bguiz
  • 27,371
  • 47
  • 154
  • 243
4
votes
1 answer

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 intermittently, roughly about 20% of the time. Their…
bguiz
  • 27,371
  • 47
  • 154
  • 243
4
votes
1 answer

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…
bguiz
  • 27,371
  • 47
  • 154
  • 243
4
votes
1 answer

Change Hedera NFT metadata after minting

Is there a way to change a Hedera NFT metadata after it has been minted? My goal is to implement similar NFT minting flow as is usually used in other NFT projects, which is to first have the prereveal metadata and on the day of reveal change it to…
Nal Luksic
  • 175
  • 6
3
votes
1 answer

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 eth_getTransactionByHash…
bguiz
  • 27,371
  • 47
  • 154
  • 243
3
votes
1 answer

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 error invoking RPC ​ I'm connecting using the following…
Defi Girl
  • 186
  • 4
3
votes
1 answer

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-Type: application/json' Based on the…
bguiz
  • 27,371
  • 47
  • 154
  • 243
3
votes
1 answer

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.TARGET_HEX_PRIVATE_KEY); Instead I would like to do…
bguiz
  • 27,371
  • 47
  • 154
  • 243
3
votes
1 answer

How can I pass a complex type when calling my smart contract on Hedera?

I have a basic contract that looks like this: // SPDX-License-Identifier: MIT pragma solidity ^0.8; pragma abicoder v2; contract testStruct { struct Example { uint256 number; address user; } Example public example; …
1
2 3
8 9