Closed piotrMocz closed 1 year ago
As simple as the title suggests. Instead of loading the .wasm blob and the .json metadata separately, you can now load the whole .contract file using one of:
.wasm
.json
.contract
ContractFile::load("some/path/to/your.contract") local_contract_file!()
And pass them to the methods that work with bundles, which would be one of:
deploy_contract
deploy_contract_and
load_contract
load_contract_and
So, all in all, what you do in your tests is:
use drink::{ local_contract_file, session::{ContractFile, Session}}; let contract = ContractFile::load("path/to/your.contract"); Session::<MinimalRuntime>::new()?.deploy_contract_and(contract, "new", NO_ARGS, vec![], None) /* ... */ // or: Session::<MinimalRuntime>::new()?.deploy_contract_and(local_contract_file!(), "new", NO_ARGS, vec![], None) /* ... */
As simple as the title suggests. Instead of loading the
.wasm
blob and the.json
metadata separately, you can now load the whole.contract
file using one of:And pass them to the methods that work with bundles, which would be one of:
deploy_contract
deploy_contract_and
load_contract
load_contract_and
So, all in all, what you do in your tests is: