-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Move endpoint & uln stuff to protocol-utils & protocol-utils-evm
- Loading branch information
1 parent
5368a59
commit 55889d4
Showing
39 changed files
with
287 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dist | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dist/ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<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/utils-evm</h1> | ||
|
||
<!-- The badges section --> | ||
<p align="center"> | ||
<!-- Shields.io NPM published package version --> | ||
<a href="https://www.npmjs.com/package/@layerzerolabs/utils-evm"><img alt="NPM Version" src="https://img.shields.io/npm/v/@layerzerolabs/utils-evm"/></a> | ||
<!-- Shields.io NPM downloads --> | ||
<a href="https://www.npmjs.com/package/@layerzerolabs/utils-evm"><img alt="Downloads" src="https://img.shields.io/npm/dm/@layerzerolabs/utils-evm"/></a> | ||
<!-- Shields.io license badge --> | ||
<a href="https://www.npmjs.com/package/@layerzerolabs/utils-evm"><img alt="NPM License" src="https://img.shields.io/npm/l/@layerzerolabs/utils-evm"/></a> | ||
</p> | ||
|
||
Utilities for working with LayerZero EVM contracts. | ||
|
||
## Installation | ||
|
||
```bash | ||
yarn add @layerzerolabs/utils-evm | ||
|
||
pnpm add @layerzerolabs/utils-evm | ||
|
||
npm install @layerzerolabs/utils-evm | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/** @type {import('ts-jest').JestConfigWithTsJest} */ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
moduleNameMapper: { | ||
'^@/(.*)$': '<rootDir>/src/$1', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
"name": "@layerzerolabs/protocol-utils-evm", | ||
"version": "0.0.1", | ||
"private": true, | ||
"description": "Utilities for LayerZero EVM projects", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/LayerZero-Labs/lz-utils.git", | ||
"directory": "packages/protocol-utils-evm" | ||
}, | ||
"license": "MIT", | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"require": "./dist/index.js", | ||
"import": "./dist/index.mjs" | ||
}, | ||
"./*": { | ||
"types": "./dist/*.d.ts", | ||
"require": "./dist/*.js", | ||
"import": "./dist/*.mjs" | ||
} | ||
}, | ||
"main": "./dist/index.js", | ||
"module": "./dist/index.mjs", | ||
"types": "./dist/index.d.ts", | ||
"files": [ | ||
"./dist/index.*" | ||
], | ||
"scripts": { | ||
"prebuild": "npx tsc --noEmit -p tsconfig.build.json", | ||
"build": "npx tsup", | ||
"clean": "rm -rf dist", | ||
"dev": "npx tsup --watch", | ||
"lint": "npx eslint '**/*.{js,ts,json}'", | ||
"test": "jest --passWithNoTests" | ||
}, | ||
"dependencies": { | ||
"p-memoize": "~4.0.1" | ||
}, | ||
"devDependencies": { | ||
"@ethersproject/abstract-provider": "^5.7.0", | ||
"@ethersproject/abstract-signer": "^5.7.0", | ||
"@ethersproject/contracts": "^5.7.0", | ||
"@ethersproject/providers": "^5.7.0", | ||
"@layerzerolabs/lz-definitions": "~1.5.68", | ||
"@layerzerolabs/protocol-utils": "~0.0.1", | ||
"@layerzerolabs/test-utils": "~0.0.1", | ||
"@layerzerolabs/utils": "~0.0.1", | ||
"@layerzerolabs/utils-evm": "~0.0.1", | ||
"@types/jest": "^29.5.10", | ||
"fast-check": "^3.14.0", | ||
"jest": "^29.7.0", | ||
"ts-jest": "^29.1.1", | ||
"ts-node": "^10.9.1", | ||
"tsup": "~8.0.1", | ||
"typescript": "^5.2.2" | ||
}, | ||
"peerDependencies": { | ||
"@ethersproject/abstract-provider": "^5.7.0", | ||
"@ethersproject/abstract-signer": "^5.7.0", | ||
"@ethersproject/contracts": "^5.7.0", | ||
"@ethersproject/providers": "^5.7.0", | ||
"@layerzerolabs/lz-definitions": "~1.5.68", | ||
"@layerzerolabs/protocol-utils": "~0.0.1", | ||
"@layerzerolabs/utils": "~0.0.1", | ||
"@layerzerolabs/utils-evm": "~0.0.1" | ||
} | ||
} |
File renamed without changes.
8 changes: 3 additions & 5 deletions
8
packages/utils-evm/src/endpoint/sdk.ts → ...es/protocol-utils-evm/src/endpoint/sdk.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './endpoint' | ||
export * from './uln302' |
File renamed without changes.
7 changes: 3 additions & 4 deletions
7
packages/utils-evm/src/uln302/sdk.ts → ...ages/protocol-utils-evm/src/uln302/sdk.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"exclude": ["node_modules", "dist", "test"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"exclude": ["dist", "node_modules"], | ||
"include": ["src", "test", "*.config.ts"], | ||
"compilerOptions": { | ||
"types": ["node", "jest"], | ||
"paths": { | ||
"@/*": ["./src/*"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { defineConfig } from 'tsup' | ||
|
||
export default defineConfig([ | ||
{ | ||
entry: ['src/index.ts'], | ||
outDir: './dist', | ||
clean: true, | ||
dts: true, | ||
sourcemap: true, | ||
splitting: false, | ||
treeshake: true, | ||
format: ['esm', 'cjs'], | ||
}, | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.turbo | ||
dist | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "../../.eslintrc.json" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<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/protocol-utils</h1> | ||
|
||
<!-- The badges section --> | ||
<p align="center"> | ||
<!-- Shields.io NPM published package version --> | ||
<a href="https://www.npmjs.com/package/@layerzerolabs/protocol-utils"><img alt="NPM Version" src="https://img.shields.io/npm/v/@layerzerolabs/protocol-utils"/></a> | ||
<!-- Shields.io NPM downloads --> | ||
<a href="https://www.npmjs.com/package/@layerzerolabs/protocol-utils"><img alt="Downloads" src="https://img.shields.io/npm/dm/@layerzerolabs/protocol-utils"/></a> | ||
<!-- Shields.io license badge --> | ||
<a href="https://www.npmjs.com/package/@layerzerolabs/protocol-utils"><img alt="NPM License" src="https://img.shields.io/npm/l/@layerzerolabs/protocol-utils"/></a> | ||
</p> | ||
|
||
## Installation | ||
|
||
```bash | ||
npm install --save @layerzerolabs/protocol-utils | ||
``` | ||
|
||
```bash | ||
yarn install @layerzerolabs/protocol-utils | ||
``` | ||
|
||
```bash | ||
pnpm install @layerzerolabs/protocol-utils | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/** @type {import('ts-jest').JestConfigWithTsJest} */ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
moduleNameMapper: { | ||
'^@/(.*)$': '<rootDir>/src/$1', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"name": "@layerzerolabs/protocol-utils", | ||
"version": "0.0.1", | ||
"private": true, | ||
"description": "Utilities for working with LayerZero protocol contracts", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/LayerZero-Labs/lz-utils.git", | ||
"directory": "packages/protocol-utils" | ||
}, | ||
"license": "MIT", | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"require": "./dist/index.js", | ||
"import": "./dist/index.mjs" | ||
} | ||
}, | ||
"main": "dist/index.js", | ||
"module": "dist/index.mjs", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"dist/", | ||
"LICENSE" | ||
], | ||
"scripts": { | ||
"prebuild": "tsc -noEmit", | ||
"build": "npx tsup", | ||
"clean": "rm -rf dist", | ||
"lint": "npx eslint '**/*.{js,ts,json}'", | ||
"test": "jest --passWithNoTests" | ||
}, | ||
"devDependencies": { | ||
"@layerzerolabs/lz-definitions": "~1.5.68", | ||
"@layerzerolabs/test-utils": "~0.0.1", | ||
"@layerzerolabs/utils": "~0.0.1", | ||
"@types/jest": "^29.5.10", | ||
"fast-check": "^3.14.0", | ||
"jest": "^29.7.0", | ||
"ts-jest": "^29.1.1", | ||
"ts-node": "^10.9.1", | ||
"tslib": "~2.6.2", | ||
"tsup": "~8.0.1", | ||
"typescript": "^5.2.2", | ||
"zod": "^3.22.4" | ||
}, | ||
"peerDependencies": { | ||
"@layerzerolabs/lz-definitions": "~1.5.68", | ||
"@layerzerolabs/utils": "~0.0.1", | ||
"zod": "^3.22.4" | ||
} | ||
} |
3 changes: 1 addition & 2 deletions
3
packages/utils/src/endpoint/config.ts → ...ges/protocol-utils/src/endpoint/config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 1 addition & 3 deletions
4
packages/utils/src/endpoint/types.ts → ...ages/protocol-utils/src/endpoint/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './endpoint' | ||
export * from './uln302' |
3 changes: 1 addition & 2 deletions
3
packages/utils/src/uln302/config.ts → packages/protocol-utils/src/uln302/config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 1 addition & 3 deletions
4
packages/utils/src/uln302/types.ts → packages/protocol-utils/src/uln302/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"exclude": ["dist", "node_modules"], | ||
"include": ["src", "test"], | ||
"compilerOptions": { | ||
"types": ["node", "jest"], | ||
"paths": { | ||
"@/*": ["./src/*"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { defineConfig } from 'tsup' | ||
|
||
export default defineConfig({ | ||
entry: ['src/index.ts'], | ||
outDir: './dist', | ||
clean: true, | ||
dts: true, | ||
sourcemap: true, | ||
splitting: false, | ||
treeshake: true, | ||
format: ['esm', 'cjs'], | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/ua-utils-evm-hardhat-test/test/endpoint/config.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.