We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 deploy the contract both in this evm and remix:
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.7.4; contract C { function test() public pure returns (uint, uint, bytes32, bytes20, address) { bytes32 kec = keccak256("abc"); // bytes32 sha = sha256("abc"); this evm not supports the sha256 bytes20 rip = ripemd160("abc"); uint add = addmod(10, 6, 9); uint mul = mulmod(4, 4, 9); bytes32 hash = 0x5cc4cee58087de1a2ea481fe9c65c92adc27cff464b7f00a486dc9bf6bb8efb3; bytes32 r = 0x32573a0b258f251971a4ec35511c018a7e7bf75a5886534b48d12e47263048a2; bytes32 s = 0xfe6e03543955255e235388b224704555fd036a954d3ee6dd030d9d1fea1830d7; uint8 v = 0x1c; address addr = ecrecover(hash, v, r, s); return (add, mul, kec, rip, addr); } }
bytes32 sha = sha256("abc"); this line can be called in remix, but can't be called in this evm:
bytes32 sha = sha256("abc");
trapped explicitly: Revert(Reverted)
after delete this line, everything is ok
The text was updated successfully, but these errors were encountered:
And ripemd160, ecrecover, can call successfully, but return the all zero bytes
ripemd160
ecrecover
Sorry, something went wrong.
here is a good example to impl precompiles: https://github.com/axonweb3/axon/tree/main/core/executor/src/precompiles solved.
No branches or pull requests
I deploy the contract both in this evm and remix:
bytes32 sha = sha256("abc");
this line can be called in remix, but can't be called in this evm:after delete this line, everything is ok
The text was updated successfully, but these errors were encountered: