Skip to content

Conversation

zemse
Copy link
Contributor

@zemse zemse commented Jul 25, 2025

Motivation

let uint = U256::ZERO;
let address = Address::ZERO;
let word = B256::ZERO;

input(uint); // works
input(address); // works
input(word); // the trait bound `dynamic::value::DynSolValue: std::convert::From<alloy_primitives::FixedBytes<32>>` is not satisfied

fn input(v: impl Into<DynSolValue>) {}

Solution

Implemented conversion from Word for DynSolValue.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

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

Thanks!

@github-project-automation github-project-automation bot moved this to Reviewed in Alloy Jul 25, 2025
@DaniPopes DaniPopes merged commit ed65dc3 into alloy-rs:main Jul 25, 2025
31 checks passed
@github-project-automation github-project-automation bot moved this from Reviewed to Done in Alloy Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants