alloy-rs / alloy-rs/core

[Feature] Generate enum that represents the selectors of a call

未關閉
#1,031 2 則留言 0 個 reaction 已指派 1 人 已被 @frankudoags 認領 在 GitHub 檢視
enhancement
主要語言
Rust
星號
967
分支
274
平均合併
1 天 21 小時
30 天內合併 PR
15

描述

### Component

sol! macro

### Describe the feature you would like

we generate a list of all selectors:

https://github.com/alloy-rs/core/blob/f7d4a85a089bdab78f122de18492533589df5254/crates/sol-macro-expander/src/expand/contract.rs#L921-L928

it would be nice to have an enum representation for those as well, that match to the functions, similar to functions

https://github.com/alloy-rs/core/blob/f7d4a85a089bdab78f122de18492533589df5254/crates/sol-macro-expander/src/expand/contract.rs#L187-L194

## TODO
* generate a selector enum that supports try_from[u8; 4] etc..

maybe @frankudoags ?

### Additional context

_No response_

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。