Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadkaouk committed May 23, 2024
1 parent f7ba5f4 commit f59d4d0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/suites/dev/moonbase/test-contract/test-eip-6780.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describeSuite({
"transaction that created the contract",
test: async function () {
// Get Code
const code = await context.polkadotJs().query.evm.accountCodes(contract);
const code = (await context.polkadotJs().query.evm.accountCodes(contract)).toHex();

// transfer some tokens to the contract
await context.createBlock(
Expand All @@ -47,8 +47,11 @@ describeSuite({
expectEVMResult(result!.events, "Succeed", "Suicided");

// Code should not be deleted
const postSuicideCode = await context.polkadotJs().query.evm.accountCodes(contract);
expect(postSuicideCode).toEqual(code);
const postSuicideCode = (
await context.polkadotJs().query.evm.accountCodes(contract)
).toHex();

expect(postSuicideCode).to.eq(code);

// Nonce should be one
expect((await context.polkadotJs().query.system.account(contract)).nonce.toBigInt()).to.eq(
Expand Down

0 comments on commit f59d4d0

Please sign in to comment.