Skip to content

feat: add KECCAK256_EMPTY from revm::primitives #931

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

Merged
merged 3 commits into from
Apr 17, 2025

Conversation

zerosnacks
Copy link
Member

@zerosnacks zerosnacks commented Apr 17, 2025

Motivation

From: https://github.com/bluealloy/revm/blob/main/crates/primitives/src/constants.rs

This constant is used quite a bit in Foundry and now requires revm::primitives whereas all other primitives are better imported from alloy::primitives directly leaving this one as an exception currently.

Solution

Adds KECCAK256_EMPTY constant

Checked using chisel:

chisel
Welcome to Chisel! Type `!help` to show available commands.
➜ keccak256("")
Type: bytes32
└ Data: 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems appropriate

@github-project-automation github-project-automation bot moved this to In Progress in Alloy Apr 17, 2025
@zerosnacks zerosnacks requested a review from mattsse April 17, 2025 13:14
@zerosnacks zerosnacks force-pushed the zerosnacks/add-keccak256-empty-constant branch from 39fe166 to a74d394 Compare April 17, 2025 13:16
@zerosnacks zerosnacks changed the title chore: add KECCAK256_EMPTY from revm::primitives feat: add KECCAK256_EMPTY from revm::primitives Apr 17, 2025
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, pending @DaniPopes

@github-project-automation github-project-automation bot moved this from In Progress to Reviewed in Alloy Apr 17, 2025
@zerosnacks zerosnacks merged commit 74717c0 into main Apr 17, 2025
42 of 60 checks passed
@zerosnacks zerosnacks deleted the zerosnacks/add-keccak256-empty-constant branch April 17, 2025 14:05
@github-project-automation github-project-automation bot moved this from Reviewed to Done in Alloy Apr 17, 2025
@zerosnacks zerosnacks self-assigned this Apr 22, 2025
@grandizzy grandizzy moved this from Done to Completed in Alloy Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

3 participants