-
Notifications
You must be signed in to change notification settings - Fork 229
Update sncast scripts #3076
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
Merged
franciszekjob
merged 70 commits into
franciszekjob/2490-rpc-0.8.0
from
franciszekjob/2490-2-fix-sncast-scripts
Mar 25, 2025
Merged
Update sncast scripts #3076
Changes from all commits
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
2d56362
Refactor `FeeSettings` in `sncast_std`
franciszekjob c837366
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob a8d115e
Add rpc changes to sncast_std
franciszekjob cce8b24
Update script tests
franciszekjob 4f9ee06
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob 35ee0b0
Fix some script tests
franciszekjob 755b27c
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob c4daa26
Fix linting
franciszekjob 8321f05
Add todos and fix tests
franciszekjob 8a69532
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob caadc34
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob 3b3c2a9
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob ce77091
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob f0467b0
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob c3d6a4a
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob 470116e
Add todos
franciszekjob f6d479b
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob bf482bc
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob 210421b
Update changelog
franciszekjob f840464
Fix `test_wrong_calldata`
franciszekjob f2e3a8e
Fix `test_wrong_function_name`
franciszekjob 5324b2a
Add todo
franciszekjob 11b9877
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob 515995a
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob f7188ec
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob 4f08b2c
Remove docs snippets fix
franciszekjob 47b68e1
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob 7b7500b
Merge branch 'franciszekjob/2490-rpc-0.8.0' into franciszekjob/2490-2…
franciszekjob da757eb
Fix cast script errors (#3099)
cptartur e4e3093
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob 4a55e31
Merge branch 'franciszekjob/2490-2-fix-sncast-scripts' of https://git…
franciszekjob 77ee07f
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob a9bb361
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob fc0f8cf
Add todo
franciszekjob ee1c151
Merge branch 'franciszekjob/2490-rpc-0.8.0' into franciszekjob/2490-2…
franciszekjob 53ae32a
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob 30f26ad
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob 325ee9e
Merge branch 'franciszekjob/2490-2-fix-sncast-scripts' of https://git…
franciszekjob 17d78db
Fix sncast docs snippets tests (#3101)
franciszekjob 44c63a3
Merge branch 'franciszekjob/2490-2-fix-sncast-scripts' of https://git…
franciszekjob f476f34
Add todos
franciszekjob f2de231
Fix todos
franciszekjob f452e23
Restore previous test content
franciszekjob b95a793
Restore previous test content
franciszekjob 607e62e
Restore `invalid_calldata` script content
franciszekjob 30cc127
Fix asserted stdout content in `test_call_invalid_calldata` script test
franciszekjob 5f5d7ea
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob 9e0533d
Add `FeeSettingsImpl`; Adjust script tests
franciszekjob 29eb163
Add fee settings section in docs
franciszekjob a9452b6
Update changelog
franciszekjob 1faa439
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob 219080c
Remove `pub` from `FeeSettings` fields; Update docs
franciszekjob 393c20a
Update todos
franciszekjob 41feb72
Fix linting
franciszekjob 13dd39a
Remove changes from last two commits; Update todos
franciszekjob 8444414
Fix typos
franciszekjob 6995ec7
Apply code review suggestions
franciszekjob da9c4a4
Fix docs
franciszekjob c80ec6d
Remove print
franciszekjob 044e8fa
Apply code review suggestions
franciszekjob bafd15a
Update docs
franciszekjob bfae5e6
Update changelog
franciszekjob b5c6063
Update changelog
franciszekjob 6dfd37f
Apply code review suggestion
franciszekjob 00aab06
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob ead34c9
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob d606788
Update changelog
franciszekjob 119b677
Merge branch 'franciszekjob/2490-rpc-0.8.0' of https://github.com/fou…
franciszekjob feca05b
Fix `FeeSettingsTrait` in sncast_std
franciszekjob 88c10ab
Apply code review sugestion
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
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
17 changes: 6 additions & 11 deletions
17
crates/sncast/tests/data/scripts/declare/src/fee_settings.cairo
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 |
---|---|---|
@@ -1,18 +1,13 @@ | ||
use sncast_std::{ | ||
get_nonce, declare, DeclareResult, ScriptCommandError, ProviderError, StarknetError, FeeSettings | ||
get_nonce, declare, DeclareResult, ScriptCommandError, ProviderError, StarknetError, | ||
FeeSettingsTrait | ||
}; | ||
|
||
fn main() { | ||
let fee_settings = FeeSettingsTrait::resource_bounds( | ||
100000, 10000000000000, 1000000000, 100000000000000000000, 100000, 10000000000000, | ||
); | ||
let declare_nonce = get_nonce('latest'); | ||
declare( | ||
"Mapa", | ||
FeeSettings { | ||
max_gas: Option::Some(99999), | ||
max_gas_unit_price: Option::Some(999999999999), | ||
max_fee: Option::None | ||
}, | ||
Option::Some(declare_nonce) | ||
) | ||
.expect('declare failed'); | ||
declare("Mapa", fee_settings, Option::Some(declare_nonce)).expect('declare failed'); | ||
println!("success"); | ||
} |
21 changes: 10 additions & 11 deletions
21
crates/sncast/tests/data/scripts/declare/src/insufficient_account_balance.cairo
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
12 changes: 3 additions & 9 deletions
12
crates/sncast/tests/data/scripts/declare/src/no_contract.cairo
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 |
---|---|---|
@@ -1,16 +1,10 @@ | ||
use sncast_std::{ | ||
declare, DeclareResult, ScriptCommandError, ProviderError, StarknetError, FeeSettings, | ||
declare, DeclareResult, ScriptCommandError, ProviderError, StarknetError, FeeSettingsTrait, | ||
}; | ||
|
||
fn main() { | ||
let declare_result = declare( | ||
"Mapaaaa", | ||
FeeSettings { | ||
max_fee: Option::None, max_gas: Option::None, max_gas_unit_price: Option::None | ||
}, | ||
Option::None | ||
) | ||
.unwrap_err(); | ||
let fee_settings = FeeSettingsTrait::estimate(); | ||
let declare_result = declare("Mapaaaa", fee_settings, Option::None).unwrap_err(); | ||
println!("{:?}", declare_result); | ||
} | ||
|
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
17 changes: 6 additions & 11 deletions
17
crates/sncast/tests/data/scripts/declare/src/time_out.cairo
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 |
---|---|---|
@@ -1,19 +1,14 @@ | ||
use sncast_std::{ | ||
get_nonce, declare, DeclareResult, ScriptCommandError, ProviderError, StarknetError, FeeSettings | ||
get_nonce, declare, DeclareResult, ScriptCommandError, ProviderError, StarknetError, | ||
FeeSettingsTrait | ||
}; | ||
|
||
fn main() { | ||
let max_fee = 99999999999999999; | ||
|
||
let fee_settings = FeeSettingsTrait::resource_bounds( | ||
100000, 10000000000000, 1000000000, 100000000000000000000, 100000, 10000000000000, | ||
); | ||
let declare_nonce = get_nonce('latest'); | ||
let declare_result = declare( | ||
"Mapa", | ||
FeeSettings { | ||
max_fee: Option::Some(max_fee), max_gas: Option::None, max_gas_unit_price: Option::None | ||
}, | ||
Option::Some(declare_nonce) | ||
) | ||
.unwrap_err(); | ||
let declare_result = declare("Mapa", fee_settings, Option::Some(declare_nonce)).unwrap_err(); | ||
|
||
println!("{:?}", declare_result); | ||
} |
15 changes: 5 additions & 10 deletions
15
crates/sncast/tests/data/scripts/declare/src/with_invalid_max_fee.cairo
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
17 changes: 6 additions & 11 deletions
17
crates/sncast/tests/data/scripts/declare/src/with_invalid_nonce.cairo
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
16 changes: 5 additions & 11 deletions
16
crates/sncast/tests/data/scripts/deploy/src/fee_settings.cairo
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.
Uh oh!
There was an error while loading. Please reload this page.