enableRip7212 does not seem to work #5910
Unanswered
gabspeck
asked this question in
Troubleshooting
Replies: 1 comment
-
Hey @gabspeck, I have not been able to reproduce this error. I used your input mentioned above to test directly from a Hardhat scripts: // ./scripts/run-rip.ts
import hre from "hardhat";
const main = async () => {
const provider = hre.network.provider;
// Define the target address and call data
const targetAddress = "0x0000000000000000000000000000000000000100";
const callData =
"0x729a9e0a20cd5bdd330b218859b3060f77d334c1095435183af69bf7a6793331b348debb5fb6abb399737e7406c65c8b6e8132d3e84a67c81bc53fef79a08a59b9554e5d724c6c1c916c4ba9c263c7deb98ffd2e37dc89ad00464bc77564285731d0c07399449965a9d2290436ea384f20cb4de04f33b2f8de5ed4de986227646484c7cbd8c6df1446adf0252529fc3d14bc83e0d1ebc72d1e653ee2100aceb1";
const result = await provider.request({
method: "eth_call",
params: [
{
to: targetAddress,
data: callData,
},
"latest",
],
});
console.log("The verifier result: ", result);
};
main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
}); Using this import type { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox-viem";
const config: HardhatUserConfig = {
solidity: "0.8.24",
networks: {
hardhat: {
enableRip7212: true,
},
},
};
export default config; This gives the output when run against a: npx hardhat run ./scripts/run-rip.ts
# The verifier result: 0x0000000000000000000000000000000000000000000000000000000000000001 The rip7212 precompile will return |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all, has anyone had success with calling the RIP-7212 precompile at address
0x0000000000000000000000000000000000000100
withenableRip7212: true
in hardhat.config?I have a hardhat.config.ts file like this:
But when running tests (
hardhat test
), the return value from thestaticcall
is empty (0x
). Enablinghardhat-tracer
shows that apparentlyaddress(0x100)
is not being picked up as a precompile address:For reference, this is the code that calls the precompile:
Beta Was this translation helpful? Give feedback.
All reactions