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

feat: stop using @Array<T> in snforge_std and use Span<T> instead #2392

Open
enitrat opened this issue Aug 26, 2024 · 10 comments · May be fixed by #2396
Open

feat: stop using @Array<T> in snforge_std and use Span<T> instead #2392

enitrat opened this issue Aug 26, 2024 · 10 comments · May be fixed by #2396

Comments

@enitrat
Copy link
Contributor

enitrat commented Aug 26, 2024

Which component is your feature related to?

Forge

Feature Request

    fn deploy_at(
        self: @ContractClass,
        constructor_calldata: @Array::<felt252>,
        contract_address: ContractAddress
    ) -> SyscallResult<(ContractAddress, Span<felt252>)>;

This should not take @Array<felt252> as argument for the constructor calldata, but Span<felt252>. Span has more methods, it is convertible from a fixed-size array, and with the visibility attributes from the latest releases, we cant convert a span to @Array. There are other functions that need to be changed as well.

Copy link

onlydustapp bot commented Aug 26, 2024

Hey @ScottyDavies!
Thanks for showing interest.
We've created an application for you to contribute to Starknet Foundry2.
Go check it out on OnlyDust!

Copy link

onlydustapp bot commented Aug 26, 2024

Hey @ScottyDavies!
Thanks for showing interest.
We've created an application for you to contribute to Starknet Foundry.
Go check it out on OnlyDust!

@enitrat enitrat linked a pull request Aug 26, 2024 that will close this issue
5 tasks
@foundry-rs foundry-rs deleted a comment from Lxx-c Aug 26, 2024
Copy link

onlydustapp bot commented Aug 26, 2024

The maintainer Arcticae has assigned ScottyDavies to this issue via OnlyDust Platform.
Good luck!

@Arcticae
Copy link
Contributor

@ScottyDavies unassigning since there is a PR ready

@cptartur cptartur moved this from Triage to New in Starknet foundry Aug 29, 2024
@casweeney
Copy link

casweeney commented Oct 22, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a software engineer with strong technical skills and expertise in writing complex scalable applications. I have written and tested some advanced Cairo and Solidity smart contracts like building and testing the Synthetix staking contract using Cairo: https://github.com/casweeney/cairo-synthentix-staking. I have also built some great tools with Rust.

I have contributed to some groundbreaking protocols like Hyperbridge: https://github.com/polytope-labs/hyperbridge/graphs/contributors and my GitHub account has a lot of proof of work.

Leveraging on my skills and experience, I am confident in my ability to tackle new challenges and also solve complex technical issues.

How I plan on tackling this issue

I have already traced the underlying deploy_at function in the deploy.rs file and I can see that it takes an argument calldata of type &[felt252].

I will further study the codebase to fully understand where the deploy_at function is used and I will make necessary modifications for it to use Span<T> instead of Array<T>.

@Arcticae
Copy link
Contributor

@casweeney we are waiting with those changes for some bigger upgrade
cc @cptartur what's our strategy on this one?

@enitrat
Copy link
Contributor Author

enitrat commented Oct 22, 2024

it's done in #2396 already

@casweeney
Copy link

it's done in #2396 already

Alright, thanks.

@PedroRosalba
Copy link

Can I tackle this one?

@hannahredler
Copy link

Hey! I'm Hannah, a full stack developer with 6+ years experience but new to the starknet ecosystem. I would love to give this a go if its available!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Triage
Development

Successfully merging a pull request may close this issue.

7 participants