Skip to content
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

dev: add to tests end-to-end a new solidity contract: keccak for testing keccak step/builtin consumption #1092

Open
6 tasks
Tracked by #1091
Eikix opened this issue Apr 10, 2024 · 1 comment

Comments

@Eikix
Copy link
Member

Eikix commented Apr 10, 2024

Tasks

Note: you can modify the sol contract to store the hash instead of emitting an event, your choice.

Keccak.sol:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract KeccakTransaction {
    // Event declaration for logging the hash and sender
    event HashComputed(address indexed sender, bytes32 hash);

    // Function to compute and store the keccak256 hash of a given input
    function computeAndStoreHash(string memory input) public {
        bytes32 hash = keccak256(abi.encodePacked(input));
        // Emitting an event with the sender and the hash
        emit HashComputed(msg.sender, hash);
    }
}
@Eikix Eikix changed the title dev: add to test-end-to-end a new solidity contract: keccak dev: add to tests end-to-end a new solidity contract: keccak for testing keccak step/builtin consumption Apr 10, 2024
@ClementWalter
Copy link
Member

See #1071 before

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 Backlog
Development

No branches or pull requests

2 participants