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
function foo(uint256 fooBar) external;
would create the following Rust structure:
struct fooCall {
fooBar: U256,
}
But we might prefer it to create a structure that follows Rust's naming conventions
struct FooCall {
foo_bar: U256,
}
A serde-like #[rename(...)] attribute could be implemented here
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 functionwould create the following Rust structure:
But we might prefer it to create a structure that follows Rust's naming conventions
A serde-like
#[rename(...)]
attribute could be implemented hereAdditional context
No response