Skip to content

Commit

Permalink
feat: Bumping template to use fuels v0.48.0 (#5181)
Browse files Browse the repository at this point in the history
## Description
- Bump harness template to v0.48.0 for [intro-to-sway
guide](FuelLabs/docs-hub#55)
- Used auto loading [storage slots
](FuelLabs/fuels-rs#1120)

## Checklist

- [x] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [x] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [x] I have added tests that prove my fix is effective or that my
feature works.
- [x] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [x] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [x] I have requested a review from the relevant team or maintainers.

Co-authored-by: Igor Rončević <[email protected]>
  • Loading branch information
calldelegation and ironcev authored Oct 11, 2023
1 parent 5406057 commit 376ddc6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion templates/sway-test-rs/template/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors = ["{{authors}}"]
license = "Apache-2.0"

[dev-dependencies]
fuels = { version = "0.47", features = ["fuel-core-lib"] }
fuels = { version = "0.48", features = ["fuel-core-lib"] }
tokio = { version = "1.12", features = ["rt", "macros"] }

[[test]]
Expand Down
7 changes: 1 addition & 6 deletions templates/sway-test-rs/template/tests/harness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@ async fn get_contract_instance() -> (MyContract<WalletUnlocked>, ContractId) {
.await;
let wallet = wallets.pop().unwrap();

let storage_config =
StorageConfiguration::load_from("out/debug/{{project-name}}-storage_slots.json").unwrap();

let load_config = LoadConfiguration::default().with_storage_configuration(storage_config);

let id = Contract::load_from("./out/debug/{{project-name}}.bin", load_config)
let id = Contract::load_from("./out/debug/{{project-name}}.bin", LoadConfiguration::default())
.unwrap()
.deploy(&wallet, TxParameters::default())
.await
Expand Down

0 comments on commit 376ddc6

Please sign in to comment.