1234567891011121314151617import {expect, itEth, usingEthPlaygrounds} from './util/index.js';18import type {IKeyringPair} from '@polkadot/types/types';1920describe('Helpers sanity check', () => {21 let donor: IKeyringPair;2223 before(async function() {24 await usingEthPlaygrounds(async (_helper, privateKey) => {25 donor = await privateKey({url: import.meta.url});26 });27 });2829 itEth('Contract owner is recorded', async ({helper}) => {30 const owner = await helper.eth.createAccountWithBalance(donor);3132 const flipper = await helper.eth.deployFlipper(owner);3334 expect(await (await helper.ethNativeContract.contractHelpers(owner)).methods.contractOwner(flipper.options.address).call()).to.be.equal(owner);35 });3637 itEth('Flipper is working', async ({helper}) => {38 const owner = await helper.eth.createAccountWithBalance(donor);3940 const flipper = await helper.eth.deployFlipper(owner);4142 expect(await flipper.methods.getValue().call()).to.be.false;43 await flipper.methods.flip().send({from: owner});44 expect(await flipper.methods.getValue().call()).to.be.true;45 });46});