Migrate MerkleProof tests among other testing utilities (#4689)

This commit is contained in:
Hadrien Croubois
2023-10-23 20:24:46 +02:00
committed by GitHub
parent 149e1b79fe
commit 7c8b7a2728
17 changed files with 257 additions and 322 deletions

View File

@ -4,8 +4,7 @@ const { getAddressInSlot, ImplementationSlot, AdminSlot } = require('../../helpe
const { expectRevertCustomError } = require('../../helpers/customError');
const { expect } = require('chai');
const { web3 } = require('hardhat');
const { computeCreateAddress } = require('../../helpers/create');
const { ethers, web3 } = require('hardhat');
const { impersonate } = require('../../helpers/account');
const Implementation1 = artifacts.require('Implementation1');
@ -27,7 +26,7 @@ module.exports = function shouldBehaveLikeTransparentUpgradeableProxy(createProx
const proxy = await createProxy(logic, initData, opts);
// Expect proxy admin to be the first and only contract created by the proxy
const proxyAdminAddress = computeCreateAddress(proxy.address, 1);
const proxyAdminAddress = ethers.getCreateAddress({ from: proxy.address, nonce: 1 });
await impersonate(proxyAdminAddress);
return {