-
Notifications
You must be signed in to change notification settings - Fork 254
Add sierra for predeployed contracts #4275
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
Open
franciszekjob
wants to merge
202
commits into
master
Choose a base branch
from
3433-add-predeployed-contracts-sierra
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 195 commits
Commits
Show all changes
202 commits
Select commit
Hold shift + click to select a range
0cd9024
Add ETH and STRK CASM from starkgate v3.0.0
franciszekjob 5cac3a0
Update changelog
franciszekjob b649253
Update links
franciszekjob 3e0ecfb
Update class hashes
franciszekjob ae31eeb
Update changelog
franciszekjob 16963ed
Add developer notes
franciszekjob 850ffa4
Make self review
franciszekjob c10bf19
Formatting
franciszekjob 65991bb
Update tokens CASM
franciszekjob 03017cc
Update CASM
franciszekjob 56a6c51
Delete crates/cheatnet/src/data/predeployed_contracts/eth/casm.json
franciszekjob 75ca034
Delete crates/cheatnet/src/data/predeployed_contracts/strk/casm.json
franciszekjob 6443de4
Restore CASM
franciszekjob b7c99c8
Update docs
franciszekjob f7b3376
Update docs
franciszekjob 2c60518
Rename contract dirs
franciszekjob ca20987
Merge branch 'master' of https://github.com/foundry-rs/starknet-found…
franciszekjob dd1d4f6
Remove newline
franciszekjob b84f0b0
Fix lint
franciszekjob 6e3392c
Merge branch 'franciszekjob/fix-lint' of https://github.com/foundry-r…
franciszekjob 44a6ea4
Fix lint
franciszekjob b9b39ce
Merge branch 'franciszekjob/fix-lint' of https://github.com/foundry-r…
franciszekjob c189f32
Merge branch 'master' of https://github.com/foundry-rs/starknet-found…
franciszekjob 6de53dc
Merge branch 'franciszekjob/fix-lint' of https://github.com/foundry-r…
franciszekjob 8666561
Fix lint
franciszekjob f5ce405
Merge branch 'franciszekjob/fix-lint' of https://github.com/foundry-r…
franciszekjob 051f050
Fix lint
franciszekjob 446c791
Fix lint
franciszekjob 75bf661
Fix formatting
franciszekjob fbcbea7
Merge branch 'franciszekjob/fix-lint' of https://github.com/foundry-r…
franciszekjob f85b1d4
Add sierra for predeployed contracts
franciszekjob 2f25fbe
Update `load_predeployed_contracts` to overwrite class hashes
franciszekjob 67afe20
Update sierra
franciszekjob 3cf01e5
Add tests
franciszekjob cd6ae64
Fix cairo formatting
franciszekjob c483687
Update changelog
franciszekjob e835b67
Fix imports
franciszekjob 96f3074
Change expect message
franciszekjob 01625db
Remove scarb 2.10 snaphots
franciszekjob 10f06d2
Make self-review
franciszekjob db9f931
Restore casm
franciszekjob 9861d4a
Delete crates/cheatnet/src/data/predeployed_contracts/STRK directory
franciszekjob 581f6dd
Delete crates/cheatnet/src/data/predeployed_contracts/ETH directory
franciszekjob 458e8ef
Add sierra
franciszekjob 1d58ceb
Fix paths
franciszekjob d3aa232
Fix imports
franciszekjob 7a0bf52
Updte sierra to the one generated with scarb 2.15.1
franciszekjob d75b66b
Simplify `load_predeployed_contracts`
franciszekjob 60db4c5
Use sierra generated with debug info and backtrace settings
franciszekjob 58af381
Revert "Simplify `load_predeployed_contracts`"
franciszekjob 18ea10b
Fix lint
franciszekjob f03b1c1
Refactor loading contracts
franciszekjob f0889e3
Update artifacts
franciszekjob 96c0eeb
Remove changes in snapshots
franciszekjob eda50a2
Fix compilation errors + rename consts
franciszekjob d37b341
Final touches
franciszekjob 3aff163
Fix contract names
franciszekjob 0e0660a
Fix contract names
franciszekjob bbf7fc8
Update docs
franciszekjob 3f5361e
Update comment
franciszekjob e650722
Fix snapshots
franciszekjob 18741bb
Fix lint
franciszekjob 1be4b89
Change `allow` -> `expect`
franciszekjob 415b8fd
Fix lint
franciszekjob bad3d5e
Fix lint
franciszekjob b12cd9e
Rename `save_sierra_file_to_cache` -> `maybe_cache_contract_sierra`
franciszekjob acae17b
Fix lint; Add comment
franciszekjob d70f426
Bump `starknet` in `debugging_predeployed_contract`
franciszekjob 97cf486
Make self review
franciszekjob 485697c
Make self review
franciszekjob 757eaee
Merge branch 'master' into update-predeployed-contracts-casm
franciszekjob 9a57684
Merge branch 'master' of https://github.com/foundry-rs/starknet-found…
franciszekjob 167942b
Add sierra for predeployed contracts
franciszekjob 92bd010
Update `load_predeployed_contracts` to overwrite class hashes
franciszekjob 030979b
Update sierra
franciszekjob fb704eb
Add tests
franciszekjob cc42970
Fix cairo formatting
franciszekjob 6eb6780
Update changelog
franciszekjob 7db8f32
Fix imports
franciszekjob 70a9b7c
Change expect message
franciszekjob a0d25ee
Remove scarb 2.10 snaphots
franciszekjob 4a7c2b0
Make self-review
franciszekjob ba83754
Restore casm
franciszekjob ab5bc9e
Delete crates/cheatnet/src/data/predeployed_contracts/STRK directory
franciszekjob 3d1b64b
Delete crates/cheatnet/src/data/predeployed_contracts/ETH directory
franciszekjob dda8f63
Add sierra
franciszekjob 52bb56d
Fix paths
franciszekjob 7a31965
Fix imports
franciszekjob 92c2ca3
Updte sierra to the one generated with scarb 2.15.1
franciszekjob 9a44a6e
Simplify `load_predeployed_contracts`
franciszekjob 7c3a5ab
Use sierra generated with debug info and backtrace settings
franciszekjob cf15732
Revert "Simplify `load_predeployed_contracts`"
franciszekjob ee63790
Fix lint
franciszekjob 93064f5
Refactor loading contracts
franciszekjob ab7f142
Update artifacts
franciszekjob 8529f87
Remove changes in snapshots
franciszekjob cfa02f3
Fix compilation errors + rename consts
franciszekjob cca32cc
Final touches
franciszekjob 9463b18
Fix contract names
franciszekjob 3c8a013
Fix contract names
franciszekjob f47a639
Update docs
franciszekjob 6251477
Update comment
franciszekjob 8ab435e
Fix snapshots
franciszekjob 9d851e7
Fix lint
franciszekjob 2764a64
Change `allow` -> `expect`
franciszekjob 52796d3
Fix lint
franciszekjob c4dc341
Rename `save_sierra_file_to_cache` -> `maybe_cache_contract_sierra`
franciszekjob d0a5419
Fix lint; Add comment
franciszekjob 2e8db70
Bump `starknet` in `debugging_predeployed_contract`
franciszekjob b43eaec
Make self review
franciszekjob 2ce8f5f
Make self review
franciszekjob 93bc29a
Merge branch '3433-add-predeployed-contracts-sierra' of https://githu…
franciszekjob 28cc1c8
Merge branch 'update-predeployed-contracts-casm' of https://github.co…
franciszekjob 3374eb6
Merge branch 'update-predeployed-contracts-casm' of https://github.co…
franciszekjob 008d16e
Fix formatting
franciszekjob 1564824
Merge branch 'master' of https://github.com/foundry-rs/starknet-found…
franciszekjob 082c34b
Merge branch 'update-predeployed-contracts-casm' of https://github.co…
franciszekjob 116034d
Fix lint
franciszekjob 7768ea8
Merge branch 'update-predeployed-contracts-casm' of https://github.co…
franciszekjob 3154fa8
Zip predeployed contracts artifacts
franciszekjob d70cf28
Add ETH and STRK CASM from starkgate v3.0.0
franciszekjob 6e251b2
Update changelog
franciszekjob 3a35e8f
Update links
franciszekjob 0eb3126
Update class hashes
franciszekjob c386e6f
Add developer notes
franciszekjob 522fd04
Make self review
franciszekjob 4598484
Formatting
franciszekjob be87758
Update tokens CASM
franciszekjob 4f6b67e
Update CASM
franciszekjob 092bb24
Delete crates/cheatnet/src/data/predeployed_contracts/eth/casm.json
franciszekjob 69c78c4
Delete crates/cheatnet/src/data/predeployed_contracts/strk/casm.json
franciszekjob cddace5
Restore CASM
franciszekjob cde8368
Update docs
franciszekjob 2aa779b
Update docs
franciszekjob 61d80af
Rename contract dirs
franciszekjob e86e760
Remove newline
franciszekjob 4b4b69e
Fix lint
franciszekjob 6e577a9
Fix formatting
franciszekjob 9e61729
Fix lint
franciszekjob 3823ec1
Fix lint
franciszekjob 27f91c0
Remove unnecessary changes
franciszekjob 65d2dba
Change `TryFromHexStr` to `ContractAddress`
franciszekjob 815565e
Merge branch 'update-predeployed-contracts-casm' of https://github.co…
franciszekjob 7cb76bc
Fix imports
franciszekjob 5fb3743
Fix corrupted predeployed Sierra gzip artifacts
franciszekjob 063eedc
Apply review suggestions
franciszekjob c9c3525
Merge branch 'update-predeployed-contracts-casm' of https://github.co…
franciszekjob 435c860
Improve docs; Apply review suggestion
franciszekjob 0a0a7bf
Merge branch 'update-predeployed-contracts-casm' of https://github.co…
franciszekjob 4eca951
Fix typos
franciszekjob 4735f78
Merge branch 'update-predeployed-contracts-casm' of https://github.co…
franciszekjob 56da33e
Merge branch 'master' of https://github.com/foundry-rs/starknet-found…
franciszekjob e6efcab
Delete crates/cheatnet/src/data/predeployed_contracts/ERC20Lockable/c…
franciszekjob 286eed2
Delete casm of `ERC20Mintable`
franciszekjob d8df3d4
Add zipping-related changes
franciszekjob 992bc5e
Share predeployed contracts data between packages
franciszekjob eb9b374
Pass cache dir to predeployed contracts loader
franciszekjob f0b1514
Update comment
franciszekjob cffb6e6
Refactor predeployed contract setup in `ExtendedStateReader`
franciszekjob 5dfef14
Remove `(predeployed contract)` suffix
franciszekjob 939eec4
Add fork tests
franciszekjob 76110cc
Add fork tests
franciszekjob c98050f
Merge branch 'master' of https://github.com/foundry-rs/starknet-found…
franciszekjob 45ec40d
Merge branch '3433-add-predeployed-contracts-sierra' of https://githu…
franciszekjob 1fbe52e
Partial self review
franciszekjob 8476e34
Fix value of ETH permitted minter
franciszekjob a388777
Update changelog
franciszekjob 313be6e
Fix lint
franciszekjob 86edafa
Update snapshots
franciszekjob 8548a57
Update block number in tests
franciszekjob fe13934
Fix `debugging_predeployed_contract` test
franciszekjob 7ed51af
Refactor `PredeploymentMode`
franciszekjob ccd038d
Use contract names with ` Token` suffix
franciszekjob 8ec40b1
Remove old snap
franciszekjob b3d9d3a
Small change in docs
franciszekjob d315ea5
Update wording in changelog
franciszekjob 1620d6f
Fix lint
franciszekjob 35bb4a8
Refactor `load_contract` macro argument order
franciszekjob 7c6422b
Fix changing eth address in `class_hashes_to_change`
franciszekjob 940b9b4
Merge branch 'master' of https://github.com/foundry-rs/starknet-found…
franciszekjob 1b34371
Refactor predeployed contracts artifacts generation
franciszekjob 3ac950d
Update job name
franciszekjob 6b799ef
Fix tests
franciszekjob 592578c
Apply suggestion
franciszekjob ae49e38
Update docs
franciszekjob 1fa2aa7
Add todo
franciszekjob ebaf71c
Update docs
franciszekjob c29bca5
Make review of `setup_predeployed_contracts.sh`
franciszekjob af3b565
Remove comment
franciszekjob 10a508c
Simplify `setup_predeployed_contracts.sh`
franciszekjob ee6dd42
Apply review suhggestions
franciszekjob 4c4f868
Merge branch 'master' of https://github.com/foundry-rs/starknet-found…
franciszekjob 6642332
Fix CI
franciszekjob 04eca19
Run predeployed contracts setup from cheatnet build script
franciszekjob 3fae94e
Revert "Run predeployed contracts setup from cheatnet build script"
franciszekjob cfaf132
Reapply "Run predeployed contracts setup from cheatnet build script"
franciszekjob 91697f4
Add asdf actions usage
franciszekjob eba5bdd
Add more asdf actions usage
franciszekjob 548d618
Add asdf action usage in `build-test-forge-nextest-archive-native`
franciszekjob e4e9dea
Fix `build-test-forge-nextest-archive-native`
franciszekjob e3dab34
Add missing asdf usages
franciszekjob 12426f1
Change `asdf-vm/actions/install` to `asdf-vm/actions/setup`
franciszekjob File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| name: Restore predeployed contracts | ||
| description: Download generated predeployed contract artifacts into the location expected by cheatnet. | ||
|
|
||
| inputs: | ||
| artifact-name: | ||
| description: Name of the uploaded artifact containing predeployed contracts. | ||
| required: false | ||
| default: predeployed-contracts | ||
| path: | ||
| description: Destination directory for restored predeployed contracts. | ||
| required: false | ||
| default: crates/cheatnet/src/data/predeployed_contracts | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - uses: actions/download-artifact@v6 | ||
| with: | ||
| name: ${{ inputs.artifact-name }} | ||
| path: ${{ inputs.path }} | ||
|
|
||
| - name: Validate restored predeployed contracts | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||
| required_files=( | ||
| "ERC20Lockable/casm.json.gz" | ||
| "ERC20Lockable/sierra.json.gz" | ||
| "ERC20Mintable/casm.json.gz" | ||
| "ERC20Mintable/sierra.json.gz" | ||
| ) | ||
|
|
||
| for relative_path in "${required_files[@]}"; do | ||
| full_path="${{ inputs.path }}/${relative_path}" | ||
| if [[ ! -f "${full_path}" ]]; then | ||
| echo "Missing restored predeployed contract artifact: ${full_path}" >&2 | ||
| exit 1 | ||
| fi | ||
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| name: Prepare predeployed contracts | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| artifact-name: | ||
| required: false | ||
| type: string | ||
| default: predeployed-contracts | ||
|
|
||
| jobs: | ||
| prepare-predeployed-contracts: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - uses: asdf-vm/actions/setup@b7bcd026f18772e44fe1026d729e1611cc435d47 | ||
|
|
||
| - name: Restore predeployed contracts cache | ||
| id: cache-predeployed-contracts | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: crates/cheatnet/src/data/predeployed_contracts | ||
| key: predeployed-contracts-${{ runner.os }}-${{ hashFiles('scripts/setup_predeployed_contracts.sh') }} | ||
|
|
||
| - name: Generate predeployed contracts | ||
| if: steps.cache-predeployed-contracts.outputs.cache-hit != 'true' | ||
| run: ./scripts/setup_predeployed_contracts.sh | ||
|
|
||
| - name: Upload predeployed contracts | ||
| uses: actions/upload-artifact@v5 | ||
| with: | ||
| name: ${{ inputs.artifact-name }} | ||
| path: crates/cheatnet/src/data/predeployed_contracts | ||
| if-no-files-found: error | ||
| compression-level: 0 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: Intentional, because files are already stored as
*.json.gz.