-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Hedera Hashgraph #4429
Comments
Hi @stefan-stefanooov, I'm checking the issue and I have a question: is the GitHub gist that you shared correct? I see a lot of code that I cannot understand, see screenshot: |
Apologies Sir @ChristopherDedominici , I'll also add it here. Thank you for checking this out :) |
Hey @stefan-stefanooov, I can confirm that your transaction is reverting, but that doesn't necessarily mean there's a bug in Hardhat. If you think this is happening because the code assumes that some precompile exist, then the problem is that the Hardhat network only has Ethereum's standard precompiles. If you want to simulate those, then you need to have some bytecode in those addresses with the same functionality (you can use I'm tentatively closing this, but I can re-open it if there's indeed a problem on our side. |
I think what's going on here. This code: (bool success, bytes memory result) = precompileAddress.call(
abi.encodeWithSelector(IHederaTokenService.cryptoTransfer.selector, tokenTransfers));
responseCode = success ? abi.decode(result, (int32)) : HederaResponseCodes.UNKNOWN; is making a call to an address (0x167) that doesn't have bytecode. But low-level calls (done with (bool success, bytes memory result) = precompileAddress.call(
abi.encodeWithSelector(IHederaTokenService.cryptoTransfer.selector, tokenTransfers));
console.log(success);
console.logBytes(result);
responseCode = success ? abi.decode(result, (int32)) : HederaResponseCodes.UNKNOWN; So you are doing |
Version of Hardhat
^2.17.3
What happened?
Hello everyone,
I am working on the Hedera Hashgraph project.
We are trying to integrate with your wonderful project for obvious reasons :)
In Hedera we have a thing called system contracts that allow the network to expose native service implementations on top of the EVM through smart contracts.
They are called from a predefined address. ("0x167" for example)
If we create a smart contract, that uses this address and write a test for it with your tool, we get the following error:
A little something from the "--show-stack-traces" flag ...
Can you please have a look?
We would really like for you to support our project.
Please let me know if I can do anything else to help US solve this.
Best of wishes,
Stefan
Minimal reproduction steps
npm install --save-dev hardhat
npx hardhat init
--- use TypeScriptSearch terms
hedera hashgraph hardhat precompile address code-coverage
The text was updated successfully, but these errors were encountered: