Skip to content
This repository was archived by the owner on Jul 4, 2022. It is now read-only.
Closed
Prev Previous commit
Next Next commit
Fixed some code that causes some tests to fail:
* Event NewAccount is only creates a new account with 0 amount of money,
and is moved to system/frame_system. In the test, NewAccount(who, amount)
is now split into NewAccount(who) and Endow(who, amount)
  • Loading branch information
roy-powerfinance committed Feb 27, 2020
commit dcb159a6bd7d6fe0b385bdd25e256d3d0cc2ca7c
21 changes: 20 additions & 1 deletion frame/contracts/src/doughnut_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -598,12 +598,21 @@ fn delegated_contract_to_runtime_call_executes_with_verifiable_doughnut() {
assert_eq!(
System::events(),
vec![
// Events from `Balances::deposit_creating`.
EventRecord {
phase: Phase::ApplyExtrinsic(0),
event: MetaEvent::system(frame_system::RawEvent::NewAccount(ALICE)),
topics: vec![],
},
EventRecord {
phase: Phase::ApplyExtrinsic(0),
event: MetaEvent::pallet_balances(pallet_balances::RawEvent::Endowed(ALICE, 1_000_000)),
topics: vec![],
},
EventRecord {
phase: Phase::ApplyExtrinsic(0),
event: MetaEvent::system(frame_system::RawEvent::NewAccount(DJANGO)),
topics: vec![],
},
EventRecord {
phase: Phase::ApplyExtrinsic(0),
event: MetaEvent::pallet_balances(pallet_balances::RawEvent::Endowed(DJANGO, 1_000_000)),
Expand All @@ -618,6 +627,11 @@ fn delegated_contract_to_runtime_call_executes_with_verifiable_doughnut() {
},

// Contract::instantiate
EventRecord {
phase: Phase::ApplyExtrinsic(0),
event: MetaEvent::system(frame_system::RawEvent::NewAccount(BOB)),
topics: vec![],
},
EventRecord {
phase: Phase::ApplyExtrinsic(0),
event: MetaEvent::pallet_balances(pallet_balances::RawEvent::Endowed(BOB, 100)),
Expand All @@ -635,6 +649,11 @@ fn delegated_contract_to_runtime_call_executes_with_verifiable_doughnut() {
},

// Dispatching the call.
EventRecord {
phase: Phase::ApplyExtrinsic(0),
event: MetaEvent::system(frame_system::RawEvent::NewAccount(CHARLIE)),
topics: vec![],
},
EventRecord {
phase: Phase::ApplyExtrinsic(0),
event: MetaEvent::pallet_balances(pallet_balances::RawEvent::Endowed(CHARLIE, 50)),
Expand Down