alloy-rs / alloy

Transports, Middleware, and Networks for the Alloy project
https://alloy.rs
Apache License 2.0
664 stars 239 forks source link

[Feature] a function that convert solidity function signature to selector #1565

Closed Confucian-e closed 1 month ago

Confucian-e commented 1 month ago

Component

other

Describe the feature you would like

I've encountered an issue where I can't easily convert a function signature (type: &str) to a selector (type: Selector), like viem's toFunctionSelector or foundry's cast sig.

Additional context

Do you think it would be necessary to add this function? If so, I'd be willing to submit a PR.

Confucian-e commented 1 month ago

Well, I think I should open this issue in core repo. So I close this one and open https://github.com/alloy-rs/core/issues/785