Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/develop #549

Merged
merged 5 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion packages/erc3k/test/erc3k-data.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('ERC3000Data', function () {
beforeEach(async () => {
const ERC3000DataLibTest = (await ethers.getContractFactory(
'ERC3000DataLibTest'
)) as ERC3000DataLibTest__factory
)) as unknown as ERC3000DataLibTest__factory

erc3kDataLib = await ERC3000DataLibTest.deploy()
chainId = (await ethers.provider.getNetwork()).chainId
Expand Down
2 changes: 1 addition & 1 deletion packages/erc3k/test/erc3k-exec.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('ERC3000 Executor', function () {
beforeEach(async () => {
const ERC3000Executor = (await ethers.getContractFactory(
'ERC3000ExecutorMock'
)) as ERC3000ExecutorMock__factory
)) as unknown as ERC3000ExecutorMock__factory
erc3kExec = await ERC3000Executor.deploy()
})
})
2 changes: 1 addition & 1 deletion packages/erc3k/test/erc3k.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('ERC3000', function () {
beforeEach(async () => {
const ERC3000 = (await ethers.getContractFactory(
'ERC3000Mock'
)) as ERC3000Mock__factory
)) as unknown as ERC3000Mock__factory
erc3k = await ERC3000.deploy()
})
})
4 changes: 2 additions & 2 deletions packages/govern-console/src/utils/ipfs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ const MIME_TYPES = ['text/plain'];
function createIpfs() {
if (!ipfs) {
ipfs = create({
url: 'https://ipfs-0.aragon.network/api/v0',
url: 'https://prod.ipfs.aragon.network',
headers: {
'X-API-KEY': 'yRERPRwFAb5ZiV94XvJdgvDKoGEeFerfFsAQ65',
'X-API-KEY': 'b477RhECf8s8sdM7XrkLBs2wHc4kCMwpbcFC55Kt',
},
});
}
Expand Down
2 changes: 1 addition & 1 deletion packages/govern-contract-utils/test/acl.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('ACL', function () {
})

beforeEach(async () => {
const ACL = (await ethers.getContractFactory('ACL')) as ACL__factory
const ACL = (await ethers.getContractFactory('ACL')) as unknown as ACL__factory
acl = await ACL.deploy(root)
aclNotRoot = await acl.connect(signers[1])
})
Expand Down
4 changes: 2 additions & 2 deletions packages/govern-contract-utils/test/adaptive-erc165.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ describe('AdaptiveErc165', function () {
signers = await ethers.getSigners()
const Adaptive = (await ethers.getContractFactory(
'AdaptiveERC165Mock'
)) as AdaptiveERC165Mock__factory
)) as unknown as AdaptiveERC165Mock__factory
const AdaptiveHelper = (await ethers.getContractFactory(
'AdaptiveERC165MockHelper'
)) as AdaptiveERC165MockHelper__factory
)) as unknown as AdaptiveERC165MockHelper__factory

adaptive = await Adaptive.deploy()
adaptiveHelper = await AdaptiveHelper.deploy(adaptive.address)
Expand Down
2 changes: 1 addition & 1 deletion packages/govern-contract-utils/test/address-utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('AddressUtils', function () {
beforeEach(async () => {
const AddressUtilsMock = (await ethers.getContractFactory(
'AddressUtilsMock'
)) as AddressUtilsMock__factory
)) as unknown as AddressUtilsMock__factory
addressUtils = await AddressUtilsMock.deploy()
owner = await (await ethers.getSigners())[0].getAddress()
})
Expand Down
2 changes: 1 addition & 1 deletion packages/govern-contract-utils/test/bitmaplib.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('Bitmap', function () {
beforeEach(async () => {
const BitmapLib = (await ethers.getContractFactory(
'BitmapLibMock'
)) as BitmapLibMock__factory
)) as unknown as BitmapLibMock__factory
lib = await BitmapLib.deploy()
})

Expand Down
6 changes: 3 additions & 3 deletions packages/govern-contract-utils/test/deposit-lib.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('DepositLib', function () {
before(async () => {
const DepositLibMockFactory = (await ethers.getContractFactory(
'DepositLibMock'
)) as DepositLibMock__factory
)) as unknown as DepositLibMock__factory
depositLibMock = await DepositLibMockFactory.deploy()

owner = await (await ethers.getSigners())[0].getAddress()
Expand All @@ -37,7 +37,7 @@ describe('DepositLib', function () {
before(async () => {
const GoodTokenFactory = (await ethers.getContractFactory(
'GoodToken'
)) as GoodToken__factory
)) as unknown as GoodToken__factory
goodToken = await GoodTokenFactory.deploy()
})

Expand Down Expand Up @@ -84,7 +84,7 @@ describe('DepositLib', function () {
before(async () => {
const GoodTokenFactory = (await ethers.getContractFactory(
'GoodToken'
)) as GoodToken__factory
)) as unknown as GoodToken__factory
goodToken = await GoodTokenFactory.deploy()
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('ERC1167ProxyFactory', () => {
owner = await signers[0].getAddress()
const CloneFactoryMock = (await ethers.getContractFactory(
'CloneFactoryMock'
)) as CloneFactoryMock__factory
)) as unknown as CloneFactoryMock__factory
factory = await CloneFactoryMock.deploy()
})

Expand All @@ -34,7 +34,7 @@ describe('ERC1167ProxyFactory', () => {
'ClonedContract',
clonedContractAddress,
signers[0]
)) as ClonedContract
)) as unknown as ClonedContract

expect(await clonedContract.getRandomString()).to.be.equal('NO INIT')
})
Expand All @@ -47,7 +47,7 @@ describe('ERC1167ProxyFactory', () => {
'ClonedContractWithInit',
clonedContractAddress,
signers[0]
)) as ClonedContractWithInit
)) as unknown as ClonedContractWithInit

expect(await clonedContract.randomString()).to.be.equal('INIT DATA')
})
Expand All @@ -62,7 +62,7 @@ describe('ERC1167ProxyFactory', () => {
'ClonedContract',
clonedContractAddress,
signers[0]
)) as ClonedContract
)) as unknown as ClonedContract

expect(await clonedContract.getRandomString()).to.be.equal('NO INIT')
})
Expand All @@ -75,7 +75,7 @@ describe('ERC1167ProxyFactory', () => {
'ClonedContractWithInit',
clonedContractAddress,
signers[0]
)) as ClonedContractWithInit
)) as unknown as ClonedContractWithInit

expect(await clonedContract.randomString()).to.be.equal('INIT DATA')
})
Expand Down
2 changes: 1 addition & 1 deletion packages/govern-contract-utils/test/initializable.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('Initializable', function () {
beforeEach(async () => {
const Initializable = (await ethers.getContractFactory(
'InitializableMock'
)) as InitializableMock__factory
)) as unknown as InitializableMock__factory
init = await Initializable.deploy()
})

Expand Down
8 changes: 4 additions & 4 deletions packages/govern-contract-utils/test/safe-erc20.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,24 @@ describe('SafeERC20', function () {
beforeEach(async () => {
const safeERCMock = (await ethers.getContractFactory(
'SafeERC20Mock'
)) as SafeERC20Mock__factory
)) as unknown as SafeERC20Mock__factory
safeERC20 = await safeERCMock.deploy()

const BadToken = (await ethers.getContractFactory(
'BadToken'
)) as BadToken__factory
)) as unknown as BadToken__factory
badToken = await BadToken.deploy()
badToken.setBalanceTo(safeERC20.address, balanceAmount)

const GoodToken = (await ethers.getContractFactory(
'GoodToken'
)) as GoodToken__factory
)) as unknown as GoodToken__factory
goodToken = await GoodToken.deploy()
goodToken.setBalanceTo(safeERC20.address, balanceAmount)

const WorstToken = (await ethers.getContractFactory(
'WorstToken'
)) as WorstToken__factory
)) as unknown as WorstToken__factory
worstToken = await WorstToken.deploy()
worstToken.setBalanceTo(safeERC20.address, balanceAmount)

Expand Down
6 changes: 3 additions & 3 deletions packages/govern-core/test/govern-registry.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ describe('GovernRegistry', function () {
beforeEach(async () => {
const ERC3000Mock = (await ethers.getContractFactory(
'ERC3000Mock'
)) as ERC3000Mock__factory
)) as unknown as ERC3000Mock__factory

const ERC3000ExecutorMock = (await ethers.getContractFactory(
'ERC3000ExecutorMock'
)) as ERC3000ExecutorMock__factory
)) as unknown as ERC3000ExecutorMock__factory

const GovernRegistry = (await ethers.getContractFactory(
'GovernRegistry'
)) as GovernRegistry__factory
)) as unknown as GovernRegistry__factory

erc3kExec = await ERC3000ExecutorMock.deploy()

Expand Down
2 changes: 1 addition & 1 deletion packages/govern-core/test/govern.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('Govern', function () {

beforeEach(async () => {
const Govern = await ethers.getContractFactory('Govern')
govern = (await Govern.deploy(owner)) as Govern
govern = (await Govern.deploy(owner)) as unknown as Govern
governNotOwner = await govern.connect(signers[1])
})

Expand Down
18 changes: 9 additions & 9 deletions packages/govern-core/test/pipelines/govern-queue.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ describe('Govern Queue', function () {
const createArbitratorMock = async () => {
const ArbitratorMock = (await ethers.getContractFactory(
'ArbitratorMock'
)) as ArbitratorMock__factory
)) as unknown as ArbitratorMock__factory
const arbitratorMock = (await ArbitratorMock.deploy(
testToken.address
)) as ArbitratorMock
Expand All @@ -121,7 +121,7 @@ describe('Govern Queue', function () {
// add tokens for schedule, challenge and fee amounts from arbitrator
const TestToken = (await ethers.getContractFactory(
'TestToken'
)) as TestToken__factory
)) as unknown as TestToken__factory
testToken = (await TestToken.deploy(ownerAddr)) as TestToken
await testToken.mint(ownerAddr, 1000000)

Expand All @@ -140,13 +140,13 @@ describe('Govern Queue', function () {
// add ERC3000 executor
const ERC3000ExecutorMock = (await ethers.getContractFactory(
'ERC3000ExecutorMock'
)) as ERC3000ExecutorMock__factory
)) as unknown as ERC3000ExecutorMock__factory
executor = await ERC3000ExecutorMock.deploy()
container.payload.executor = executor.address

const GQ = (await ethers.getContractFactory(
'GovernQueue'
)) as GovernQueue__factory
)) as unknown as GovernQueue__factory

gq = (await GQ.deploy(ownerAddr, container.config)) as GovernQueue

Expand Down Expand Up @@ -437,7 +437,7 @@ describe('Govern Queue', function () {
it('reverts when arbitrator subject does not match the queue address', async () => {
const ArbitratorMock = (await ethers.getContractFactory(
'ArbitratorWrongSubjectMock'
)) as ArbitratorWrongSubjectMock__factory
)) as unknown as ArbitratorWrongSubjectMock__factory
const arbitratorMock = await ArbitratorMock.deploy(testToken.address)
container.config.resolver = arbitratorMock.address

Expand Down Expand Up @@ -519,7 +519,7 @@ describe('Govern Queue', function () {
const eventContract = new Contract(
gq.address,
unlockedEventAbi,
gq.provider
// gq.provider
)

await expect(gq.resolve(container, disputeId))
Expand Down Expand Up @@ -579,7 +579,7 @@ describe('Govern Queue', function () {
const eventContract = new Contract(
gq.address,
unlockedEventAbi,
gq.provider
// gq.provider
)

await expect(gq.veto(container, '0x02'))
Expand Down Expand Up @@ -608,7 +608,7 @@ describe('Govern Queue', function () {

const ArbitratorMock = (await ethers.getContractFactory(
'ArbitratorMock'
)) as ArbitratorMock__factory
)) as unknown as ArbitratorMock__factory
const arbitratorMock = await ArbitratorMock.deploy(testToken.address)
container.config.resolver = arbitratorMock.address

Expand All @@ -625,7 +625,7 @@ describe('Govern Queue', function () {
const eventContract = new Contract(
gq.address,
unlockedEventAbi,
gq.provider
// gq.provider
)
await expect(gq.veto(container, '0x02'))
.to.emit(eventContract, EVENTS.UNLOCK)
Expand Down
8 changes: 4 additions & 4 deletions packages/govern-create/test/govern-base-factory-e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,22 +148,22 @@ describe('Govern Base Factory with the real contracts(NO MOCKs)', function () {
governRegistry = (await ethers.getContractAt(
'GovernRegistry',
(await deployments.get('GovernRegistry')).address
)) as GovernRegistry
)) as unknown as GovernRegistry

governQueueFactory = (await ethers.getContractAt(
'GovernRegistry',
(await deployments.get('GovernQueueFactory')).address
)) as GovernRegistry
)) as unknown as GovernRegistry

governTokenFactory = (await ethers.getContractAt(
'GovernRegistry',
(await deployments.get('GovernTokenFactory')).address
)) as GovernRegistry
)) as unknown as GovernRegistry

governFactory = (await ethers.getContractAt(
'GovernRegistry',
(await deployments.get('GovernFactory')).address
)) as GovernRegistry
)) as unknown as GovernRegistry


const { abi, baseFactoryBytecode } = await getMergedABI();
Expand Down
10 changes: 5 additions & 5 deletions packages/govern-create/test/govern-base-factory-unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,24 @@ describe('Govern Base Factory with mocked contracts', function () {
// Deploy Mocks
GovernQueueFactoryMock = await ((await ethers.getContractFactory(
'GovernQueueFactoryMock'
)) as GovernQueueFactoryMock__factory).deploy()
)) as unknown as GovernQueueFactoryMock__factory).deploy()

GovernTokenFactoryMock = await ((await ethers.getContractFactory(
'GovernTokenFactoryMock'
)) as GovernTokenFactoryMock__factory).deploy()
)) as unknown as GovernTokenFactoryMock__factory).deploy()

GovernFactoryMock = await ((await ethers.getContractFactory(
'GovernFactoryMock'
)) as GovernFactoryMock__factory).deploy()
)) as unknown as GovernFactoryMock__factory).deploy()

GovernRegistryMock = await ((await ethers.getContractFactory(
'GovernRegistryMock'
)) as GovernRegistryMock__factory).deploy()
)) as unknown as GovernRegistryMock__factory).deploy()

// Deploy the GovernBaseFactory
GovernBaseFactory = await ((await ethers.getContractFactory(
'GovernBaseFactory'
)) as GovernBaseFactory__factory).deploy(
)) as unknown as GovernBaseFactory__factory).deploy(
GovernRegistryMock.address,
GovernFactoryMock.address,
GovernQueueFactoryMock.address,
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9301,7 +9301,7 @@ concat-stream@^1.5.0, concat-stream@^1.5.1, concat-stream@~1.6.2:

concat-stream@^2.0.0, "concat-stream@github:hugomrdias/concat-stream#feat/smaller":
version "2.0.0"
resolved "https://codeload.github.com/hugomrdias/concat-stream/tar.gz/057bc7b5d6d8df26c8cf00a3f151b6721a0a8034"
resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34"
dependencies:
inherits "^2.0.3"
readable-stream "^3.0.2"
Expand Down
Loading