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

Support proc macro attributes on module item impl #1532

Closed
maciektr opened this issue Aug 22, 2024 · 0 comments · Fixed by #1556
Closed

Support proc macro attributes on module item impl #1532

maciektr opened this issue Aug 22, 2024 · 0 comments · Fixed by #1556
Assignees
Labels
bug Something isn't working

Comments

@maciektr
Copy link
Contributor

Reproduction:

#[starknet::contract]
mod one {
    use starknet::storage::{StoragePointerReadAccess, StoragePointerWriteAccess};
    use starknet::get_contract_address;
    use super::{IInc, IIncDispatcher, IIncDispatcherTrait};

    #[storage]
    struct Storage {
        counter: u128
    }

    #[abi(embed_v0)]
    impl IncImpl of IInc<ContractState> {
        #[nonreentrant]
        fn infinite_inc(ref self: ContractState) {
            self.counter.write(self.counter.read() + 1);
            IIncDispatcher { contract_address: get_contract_address() }.infinite_inc();
        }
    }
}

The nonreentrant macro on infinite_inc is not run.

@maciektr maciektr added this to Scarb Aug 22, 2024
@maciektr maciektr self-assigned this Aug 22, 2024
@maciektr maciektr converted this from a draft issue Aug 22, 2024
@maciektr maciektr added the bug Something isn't working label Aug 22, 2024
@maciektr maciektr added this to the Procedural macros milestone Aug 22, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Scarb Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant