Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Rename attribute for structures generated through the sol! macro #570

Open
makcandrov opened this issue Mar 13, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@makcandrov
Copy link

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

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

Additional context

No response

@makcandrov makcandrov added the enhancement New feature or request label Mar 13, 2024
@linear linear bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 13, 2024
@DaniPopes DaniPopes reopened this Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants