Skip to content

Commit

Permalink
add InterchainToken bytecode check
Browse files Browse the repository at this point in the history
  • Loading branch information
milapsheth committed Mar 21, 2024
1 parent b4b0759 commit 826c0b3
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion test/InterchainToken.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ const { ethers } = require('hardhat');
const {
constants: { AddressZero, HashZero, MaxUint256 },
getContractAt,
utils: { keccak256 },
} = ethers;
const { expect } = require('chai');
const { getRandomBytes32, expectRevert } = require('./utils');
const { getRandomBytes32, expectRevert, getEVMVersion } = require('./utils');
const { deployContract } = require('../scripts/deploy');

describe('InterchainToken', () => {
Expand Down Expand Up @@ -138,4 +139,18 @@ describe('InterchainToken', () => {
expect(finalAllowance).to.eq(initialAllowance);
});
});

describe.only('Bytecode checks [ @skip-on-coverage ]', () => {

Check failure on line 143 in test/InterchainToken.js

View workflow job for this annotation

GitHub Actions / lint (18.x, ubuntu-latest)

Unexpected exclusive mocha test
it('Should preserve the same bytecode', async () => {
const contract = await ethers.getContractFactory('InterchainToken', owner);
const contractBytecode = contract.bytecode;
const contractBytecodeHash = keccak256(contractBytecode);

const expected = {
london: '0xa01cf28b0b6ce6dc3b466e995585d69486400d671fce0ea8d06beba583e6f3bb',
}[getEVMVersion()];

expect(contractBytecodeHash).to.be.equal(expected);
});
});
});

0 comments on commit 826c0b3

Please sign in to comment.