Skip to content

Commit

Permalink
fix dry-running
Browse files Browse the repository at this point in the history
  • Loading branch information
pgherveou committed Mar 7, 2024
1 parent e3a836d commit e4ffaf1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions examples/dry-running/Cargo.lock

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

9 changes: 5 additions & 4 deletions examples/dry-running/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ mod counter {
mod tests {
use drink::{
frame_support::sp_runtime::ModuleError,
minimal::RuntimeCall,
pallet_balances,
runtime::{minimal::RuntimeCall, MinimalSandbox},
sandbox::prelude::*,
session::{Session, NO_ARGS, NO_ENDOWMENT, NO_SALT},
AccountId32, DispatchError, MinimalRuntime, Sandbox, SandboxConfig,
AccountId32, DispatchError,
};

#[drink::contract_bundle_provider]
Expand Down Expand Up @@ -87,7 +88,7 @@ mod tests {

#[test]
fn we_can_dry_run_normal_runtime_transaction() {
let mut sandbox = Sandbox::<MinimalRuntime>::new().expect("Failed to create sandbox");
let mut sandbox = MinimalSandbox::default();

// Bob will be the recipient of the transfer.
let bob = AccountId32::new([2u8; 32]);
Expand All @@ -103,7 +104,7 @@ mod tests {
dest: bob.clone().into(),
value: 100,
}),
Some(MinimalRuntime::default_actor()),
Some(MinimalSandbox::default_actor()),
)
.expect("Failed to execute a call")
});
Expand Down

0 comments on commit e4ffaf1

Please sign in to comment.