Skip to content

Commit

Permalink
🚧 Fix failing main (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
janjakubnanista authored Dec 8, 2023
1 parent 12c2a6e commit 4a4a62f
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 16 deletions.
1 change: 0 additions & 1 deletion examples/oft/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"hardhat": "^2.19.2",
"hardhat-contract-sizer": "^2.10.0",
"hardhat-deploy": "^0.11.43",
"hardhat-deploy-ethers": "^0.4.1",
"prettier": "^3.1.0",
"solhint": "^4.0.0",
"ts-node": "^10.9.1",
Expand Down
1 change: 0 additions & 1 deletion packages/ua-utils-evm-hardhat-test/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'hardhat-deploy'
import 'hardhat-deploy-ethers'
import assert from 'assert'
import { withLayerZeroArtifacts } from '@layerzerolabs/utils-evm-hardhat'
import { EndpointId } from '@layerzerolabs/lz-definitions'
Expand Down
1 change: 0 additions & 1 deletion packages/ua-utils-evm-hardhat-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"ethers": "^5.7.0",
"hardhat": "^2.19.2",
"hardhat-deploy": "^0.11.22",
"hardhat-deploy-ethers": "^0.4.1",
"sinon": "^17.0.1",
"ts-node": "^10.9.1",
"typescript": "^5.2.2"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { describe } from 'mocha'
import { defaultExecutorConfig, defaultUlnConfig, setupDefaultEndpoint } from '../__utils__/endpoint'
import { getNetworkRuntimeEnvironment } from '@layerzerolabs/utils-evm-hardhat'
import { createContractFactory, getEidForNetworkName } from '@layerzerolabs/utils-evm-hardhat'
import hre from 'hardhat'
import { expect, assert } from 'chai'
import { expect } from 'chai'

describe('task: getDefaultConfig', () => {
beforeEach(async () => {
Expand All @@ -12,19 +12,21 @@ describe('task: getDefaultConfig', () => {
it('should return default configurations', async () => {
const networks = Object.keys(hre.userConfig.networks ?? {})
const getDefaultConfigTask = await hre.run('getDefaultConfig', { networks: networks.toString() })
const contractFactory = createContractFactory()

for (const localNetwork of networks) {
const localEid = getEidForNetworkName(localNetwork)

for (const remoteNetwork of networks) {
if (localNetwork === remoteNetwork) continue

const defaultConfig = getDefaultConfigTask[localNetwork][remoteNetwork]
const network = await getNetworkRuntimeEnvironment(localNetwork)
const sendUln302 = await network.ethers.getContract('SendUln302')
const receiveUln302 = await network.ethers.getContract('ReceiveUln302')
const sendUln302 = await contractFactory({ contractName: 'SendUln302', eid: localEid })
const receiveUln302 = await contractFactory({ contractName: 'ReceiveUln302', eid: localEid })

// verify defaultSendLibrary & defaultReceiveLibrary
expect(defaultConfig.defaultSendLibrary).to.eql(sendUln302.address)
expect(defaultConfig.defaultReceiveLibrary).to.eql(receiveUln302.address)
expect(defaultConfig.defaultSendLibrary).to.eql(sendUln302.contract.address)
expect(defaultConfig.defaultReceiveLibrary).to.eql(receiveUln302.contract.address)

// verify sendUln
expect(defaultConfig.sendExecutorConfig.maxMessageSize).to.eql(defaultExecutorConfig.maxMessageSize)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ActionType } from 'hardhat/types'
import { task } from 'hardhat/config'
import 'hardhat-deploy-ethers/internal/type-extensions'
import { createConnectedContractFactory, getEidForNetworkName } from '@layerzerolabs/utils-evm-hardhat'
import { Endpoint, Uln302 } from '@layerzerolabs/protocol-utils-evm'

Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6812,11 +6812,6 @@ hardhat-contract-sizer@^2.10.0:
cli-table3 "^0.6.0"
strip-ansi "^6.0.0"

hardhat-deploy-ethers@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/hardhat-deploy-ethers/-/hardhat-deploy-ethers-0.4.1.tgz#dd70b0cc413ed99e98994047b383a004cf1c14f8"
integrity sha512-RM6JUcD0dOCjemxnKLtK7XQQI7NWn+LxF5qicGYax0PtWayEUXAewOb4WIHZ/yearhj+s2t6dL0MnHyLTENwJg==

hardhat-deploy@^0.11.22, hardhat-deploy@^0.11.43:
version "0.11.43"
resolved "https://registry.npmjs.org/hardhat-deploy/-/hardhat-deploy-0.11.43.tgz"
Expand Down

0 comments on commit 4a4a62f

Please sign in to comment.