alloy-rs / alloy-rs/core

[Feature] Add json path as const field of `sol!` generated mod

未關閉
#962 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
enhancement
主要語言
Rust
星號
966
分支
274
平均合併
1 天 21 小時
30 天內合併 PR
15

描述

### Component

sol! macro

### Describe the feature you would like

Say we have the following macro invocation:

```rust
alloy::sol!(
#[sol(abi)]
UniswapV2Reader,
"src/abis/UniswapV2Reader.json"
);
```

There is no way to recover `"src/abis/UniswapV2Reader.json"` from `UniswapV2Reader`. It would be nice to be able to access the path to the json file that generated a given module.

### Additional context

_No response_

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

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

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