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

🎁 Testing ua-utils: Add ua-utils-test-v2 package [2/N] #15

Merged
merged 1 commit into from
Nov 15, 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: 2 additions & 0 deletions packages/ua-utils-test-v2/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
node_modules
1 change: 1 addition & 0 deletions packages/ua-utils-test-v2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cache
2 changes: 2 additions & 0 deletions packages/ua-utils-test-v2/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
node_modules/
27 changes: 27 additions & 0 deletions packages/ua-utils-test-v2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<p align="center">
<a href="https://layerzero.network">
<img alt="LayerZero" style="max-width: 500px" src="https://d3a2dpnnrypp5h.cloudfront.net/bridge-app/lz.png"/>
</a>
</p>

<h1 align="center">@layerzerolabs/hardhat-utils</h1>

<!-- The badges section -->
<p align="center">
<!-- Shields.io NPM published package version -->
<a href="https://www.npmjs.com/package/@layerzerolabs/hardhat-utils"><img alt="NPM Version" src="https://img.shields.io/npm/v/@layerzerolabs/hardhat-utils"/></a>
<!-- Shields.io NPM downloads -->
<a href="https://www.npmjs.com/package/@layerzerolabs/hardhat-utils"><img alt="Downloads" src="https://img.shields.io/npm/dm/@layerzerolabs/hardhat-utils"/></a>
<!-- Shields.io license badge -->
<a href="https://www.npmjs.com/package/@layerzerolabs/hardhat-utils"><img alt="NPM License" src="https://img.shields.io/npm/l/@layerzerolabs/hardhat-utils"/></a>
</p>

## Installation

```bash
yarn add @layerzerolabs/hardhat-utils

pnpm add @layerzerolabs/hardhat-utils

npm install @layerzerolabs/hardhat-utils
```
22 changes: 22 additions & 0 deletions packages/ua-utils-test-v2/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { withLayerZeroArtifacts } from "@layerzerolabs/hardhat-utils"
import { HardhatUserConfig } from "hardhat/types"

/**
* This is a dummy hardhat config that enables us to test
* hardhat functionality without mocking too much
*/
const config: HardhatUserConfig = {
networks: {
"ethereum-mainnet": {
url: "https://eth.llamarpc.com",
},
"bsc-testnet": {
url: "https://bsc-testnet.publicnode.com",
accounts: {
mnemonic: "test test test test test test test test test test test junk",
},
},
},
}

export default withLayerZeroArtifacts("@layerzerolabs/lz-evm-sdk-v2")(config)
40 changes: 40 additions & 0 deletions packages/ua-utils-test-v2/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "@layerzerolabs/ua-utils-test-v2",
"description": "Integration tests for ua-utils for V2",
"version": "0.0.1",
"license": "MIT",
"private": true,
"scripts": {
"lint": "npx eslint '**/*.{js,ts,json}'",
"test": "npx hardhat test"
},
"repository": {
"type": "git",
"url": "git+https://github.com/LayerZero-Labs/lz-utils.git",
"directory": "packages/ua-utils-test"
},
"devDependencies": {
"@ethersproject/abstract-signer": "^5.7.0",
"@ethersproject/providers": "^5.7.0",
"@ethersproject/wallet": "^5.7.0",
"@gnosis.pm/safe-core-sdk": "^2.0.0",
"@gnosis.pm/safe-core-sdk-types": "^1.0.0",
"@gnosis.pm/safe-ethers-lib": "^1.0.0",
"@gnosis.pm/safe-service-client": "1.1.1",
"@layerzerolabs/hardhat-utils": "~0.0.1",
"@layerzerolabs/lz-definitions": "~1.5.58",
"@layerzerolabs/lz-evm-sdk-v1": "~1.5.58",
"@layerzerolabs/lz-evm-sdk-v2": "~1.5.58",
"@layerzerolabs/ua-utils": "~0.0.15",
"@types/chai-as-promised": "^7.1.7",
"@nomiclabs/hardhat-ethers": "^2.2.3",
"ethers": "^5.7.0",
"chai": "^4.3.10",
"chai-as-promised": "^7.1.1",
"hardhat": "^2.9.9",
"hardhat-deploy": "^0.11.22",
"sinon": "^17.0.1",
"ts-node": "^10.9.1",
"typescript": "^5.2.2"
}
}
8 changes: 8 additions & 0 deletions packages/ua-utils-test-v2/test/config.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { expect } from "chai"
import { describe } from "mocha"

describe("config", () => {
it("should always succeed", () => {
expect(1).to.equal(1)
})
})
9 changes: 9 additions & 0 deletions packages/ua-utils-test-v2/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.json",
"exclude": ["dist", "node_modules"],
"include": ["src", "test", "*.config.ts"],
"compilerOptions": {
"module": "commonjs",
"types": ["node", "mocha"]
}
}
2 changes: 0 additions & 2 deletions packages/ua-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"@gnosis.pm/safe-ethers-lib": "^1.0.0",
"@gnosis.pm/safe-service-client": "1.1.1",
"@layerzerolabs/lz-definitions": "~1.5.58",
"@layerzerolabs/lz-sdk": "0.0.12",
"@nomiclabs/hardhat-ethers": "^2.2.3",
"@types/mocha": "^10.0.1",
"cli-ux": "^6.0.9",
Expand All @@ -45,7 +44,6 @@
"@gnosis.pm/safe-ethers-lib": "^1.0.0",
"@gnosis.pm/safe-service-client": "1.1.1",
"@layerzerolabs/lz-definitions": "~1.5.58",
"@layerzerolabs/lz-sdk": "0.0.12",
"@nomiclabs/hardhat-ethers": "^2.2.3",
"ethers": "^5.5.2",
"hardhat": "~2.12.5",
Expand Down
10 changes: 6 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -934,10 +934,12 @@
"@ethersproject/providers" "^5.7.2"
ethers "^5.7.2"

"@layerzerolabs/[email protected]":
version "0.0.12"
resolved "https://registry.npmjs.org/@layerzerolabs/lz-sdk/-/lz-sdk-0.0.12.tgz"
integrity sha512-ldf+H8SVUF9EtaQg9y7XzGDP95lH4T/UIYVglL2DrNBe5CBiWm5wkL/5SnGpTgbLHbw60eLaGxQH/wmO6txAiQ==
"@layerzerolabs/lz-evm-sdk-v2@~1.5.58":
version "1.5.60"
resolved "https://registry.yarnpkg.com/@layerzerolabs/lz-evm-sdk-v2/-/lz-evm-sdk-v2-1.5.60.tgz#d4905887e8475971ace4e191fff879a2cf2da0d2"
integrity sha512-Bt60PTdw/rNdZxNGF0xnk1JiIxy5k2kQCzPEe/ebyz9ZEDpaFEkOnwZi2yKQgyHuxOUfwOmRo0NUFfReyk8ioA==
dependencies:
ethers "^5.7.2"

"@manypkg/find-root@^1.1.0":
version "1.1.0"
Expand Down