Skip to content

Commit

Permalink
complete merge changes
Browse files Browse the repository at this point in the history
  • Loading branch information
frisitano committed Oct 8, 2021
1 parent bb9e5ae commit 788de61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion runtime/src/benchmarking/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fn deploy_contract(caller: AccountId) -> Result<H160, DispatchError> {
EVM::create(Origin::signed(caller), contract, 0, 1000000000, 1000000000)
.map_or_else(|e| Err(e.error), |_| Ok(()))?;

if let Event::Evm(module_evm::Event::Created(address)) = System::events().iter().last().unwrap().event {
if let Event::EVM(module_evm::Event::Created(address)) = System::events().iter().last().unwrap().event {
Ok(address)
} else {
Err("deploy_contract failed".into())
Expand Down
6 changes: 3 additions & 3 deletions runtime/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ fn deploy_contract(account: AccountId) -> Result<H160, DispatchError> {
EVM::create(Origin::signed(account), contract, 0, 1000000000, 1000000000)
.map_or_else(|e| Err(e.error), |_| Ok(()))?;

if let Event::Evm(module_evm::Event::Created(address)) = System::events().iter().last().unwrap().event {
if let Event::EVM(module_evm::Event::Created(address)) = System::events().iter().last().unwrap().event {
Ok(address)
} else {
Err("deploy_contract failed".into())
Expand Down Expand Up @@ -452,15 +452,15 @@ fn test_evm_module() {
let bob_address = EvmAccounts::eth_address(&bob());

let contract = deploy_contract(alice_account_id()).unwrap();
let event = Event::Evm(module_evm::Event::Created(contract));
let event = Event::EVM(module_evm::Event::Created(contract));
assert_eq!(last_event(), event);

assert_ok!(EVM::transfer_maintainer(
Origin::signed(alice_account_id()),
contract,
bob_address
));
let event = Event::Evm(module_evm::Event::TransferredMaintainer(contract, bob_address));
let event = Event::EVM(module_evm::Event::TransferredMaintainer(contract, bob_address));
assert_eq!(last_event(), event);

// test EvmAccounts Lookup
Expand Down

0 comments on commit 788de61

Please sign in to comment.