Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions packages/regenesis-surgery/test/eoa.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,20 @@ describe('EOAs', () => {
})
})

// Does not exist on Kovan?
describe.skip('1inch deployer', () => {
// eslint-disable-next-line
describe('1inch deployer', function() {
let eoa: Account
before(() => {
// eslint-disable-next-line
before(function() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tested this? I think this would need to be an arrow function and the parent should be a "normal" function. Not 100% sure though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested it and it works, it will skip as expected when running on kovan

if (env.surgeryDataSources.configs.l2NetworkName === 'kovan') {
console.log('1inch deployer does not exist on optimistic kovan')
this.skip()
}

eoa = env.getAccountsByType(AccountType.ONEINCH_DEPLOYER)[0]
if (!eoa) {
throw new Error('Cannot find one inch deployer')
}
})

it('should not have any code', async () => {
Expand Down Expand Up @@ -104,13 +113,13 @@ describe('EOAs', () => {
eoa.address,
env.config.stateDumpHeight
)
expect(preNonce).to.not.eq(0)

// Nonce after can come from the latest block.
const postNonce = await env.postL2Provider.getTransactionCount(
eoa.address
)

expect(preNonce).to.deep.eq(postNonce)
expect(postNonce).to.deep.eq(0)
})
})
})