foundry-rs / starknet-foundry

Blazing fast toolkit for developing Starknet contracts.
https://foundry-rs.github.io/starknet-foundry/
MIT License
280 stars 139 forks source link

Use executable attribute to mark main script function #2154

Closed THenry14 closed 1 month ago

THenry14 commented 1 month ago

Which components does the task require to be changed? (think hard pls)

sncast

Description

At the moment we require users to have a main function in their script, so we are able to determine what to run. Lately scarb has added an executable attribute that can be used to mark functions. We should start using that, so we can get rid of this hard coded function name, but are still able to run scripts.