Skip to content

Commit

Permalink
docs: Fixing quickstart tests (#78)
Browse files Browse the repository at this point in the history
* Resolving new example

* Bump to v0.48.0

* Formatting

* Fixing formatting before committing again

* Generating contracts temp

* Generating contracts temp

* formatting

* Ready to merge once sway file has been updated
  • Loading branch information
calldelegation authored Oct 12, 2023
1 parent e1ae516 commit 8ba20ca
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 33 deletions.
28 changes: 14 additions & 14 deletions docs/guides/examples/quickstart/counter-contract/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors = ["Fuel Labs <[email protected]>"]
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
16 changes: 8 additions & 8 deletions docs/guides/examples/quickstart/counter-contract/Forc.lock
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[[package]]
name = 'core'
source = 'path+from-root-63B5D95B29B128A3'
name = "core"
source = "path+from-root-AD80769CAE44474A"

[[package]]
name = 'counter-contract'
source = 'member'
dependencies = ['std']
name = "counter-contract"
source = "member"
dependencies = ["std"]

[[package]]
name = 'std'
source = 'git+https://github.com/fuellabs/sway?tag=v0.45.0#92dc9f361a9508a940c0d0708130f26fa044f6b3'
dependencies = ['core']
name = "std"
source = "git+https://github.com/fuellabs/sway?tag=v0.46.0#e75f14b03636bc96751a6760304a1a6d3eb5937d"
dependencies = ["core"]
18 changes: 8 additions & 10 deletions docs/guides/examples/quickstart/counter-contract/tests/harness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,14 @@ async fn get_contract_instance() -> (MyContract<WalletUnlocked>, ContractId) {
.await;
let wallet = wallets.pop().unwrap();

let storage_config =
StorageConfiguration::load_from("out/debug/counter-contract-storage_slots.json").unwrap();

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

let id = Contract::load_from("./out/debug/counter-contract.bin", load_config)
.unwrap()
.deploy(&wallet, TxParameters::default())
.await
.unwrap();
let id = Contract::load_from(
"./out/debug/counter-contract.bin",
LoadConfiguration::default(),
)
.unwrap()
.deploy(&wallet, TxParameters::default())
.await
.unwrap();

let instance = MyContract::new(id.clone(), wallet);

Expand Down

0 comments on commit 8ba20ca

Please sign in to comment.