[Feature] Rename attribute for structures generated through the `sol!` macro
- Lingua principale
- Rust
- Stelle
- 966
- Fork
- 274
- Merge medio
- 1g 21h
- PR unite (30g)
- 15
Descrizione
### Component
sol! macro
### Describe the feature you would like
Currently, the structures generated through the `sol!` macro use the exact same naming as in the Solidity code, but it follows different naming conventions than Rust. For example, a Solidity function
```solidity
function foo(uint256 fooBar) external;
```
would create the following Rust structure:
```rust
struct fooCall {
fooBar: U256,
}
```
But we might prefer it to create a structure that follows Rust's naming conventions
```rust
struct FooCall {
foo_bar: U256,
}
```
A serde-like `#[rename(...)]` attribute could be implemented here
### Additional context
_No response_
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.