From c5cd71580bcb518bdd48b779f7e71491ebc87435 Mon Sep 17 00:00:00 2001 From: Andrew Fleming Date: Tue, 8 Oct 2024 16:48:50 -0400 Subject: [PATCH] Add declare script for presets (#1118) * start declare script * fix fmt * fix fmt * update Scarb * finish declare script * fix fmt * update scarb * move max_fee to const * fix const * add readme to declare script * tidy up * bump version * move scripts to root * add foundry items to gitignore * Apply suggestions from code review Co-authored-by: immrsd <103599616+immrsd@users.noreply.github.com> * fix var * change to v0.1 * remove dir * update scarb.lock --------- Co-authored-by: immrsd <103599616+immrsd@users.noreply.github.com> --- .gitignore | 2 + sncast_scripts/README.md | 32 +++++++ sncast_scripts/Scarb.lock | 104 +++++++++++++++++++++++ sncast_scripts/Scarb.toml | 25 ++++++ sncast_scripts/src/declare_presets.cairo | 47 ++++++++++ sncast_scripts/src/lib.cairo | 1 + 6 files changed, 211 insertions(+) create mode 100644 sncast_scripts/README.md create mode 100644 sncast_scripts/Scarb.lock create mode 100644 sncast_scripts/Scarb.toml create mode 100644 sncast_scripts/src/declare_presets.cairo create mode 100644 sncast_scripts/src/lib.cairo diff --git a/.gitignore b/.gitignore index 2956e1b18..7c5877656 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,8 @@ target/ # Starknet Foundry .snfoundry_cache/ +*-sepolia_state.json +snfoundry.toml # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/sncast_scripts/README.md b/sncast_scripts/README.md new file mode 100644 index 000000000..5c8b496b2 --- /dev/null +++ b/sncast_scripts/README.md @@ -0,0 +1,32 @@ +# Starknet Foundry Cast Scripts + +This crate provides scripts using Starknet Foundry's Cast package. + +## Prerequisites + +Running these scripts will likely require an already-deployed account with funds to execute. +This crate can also be tested with [starknet-devnet](https://github.com/0xSpaceShard/starknet-devnet-rs). + +## Usage + +`cd` into the `sncast_scripts/` directory. +Run the command: + +```bash +sncast script run