forked from ethers-io/ethers.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main'
- Loading branch information
Showing
1,704 changed files
with
186,955 additions
and
1,157 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,81 @@ | ||
name: "Bug Report v5 (legacy)" | ||
description: "Open an issue for a bug in Ethers v5 (legacy)" | ||
title: "Add Bug Title Here" | ||
labels: [ "investigate", "v5" ] | ||
assignees: | ||
- ricmoo | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
**READ THIS FIRST** and follow all instructions, please. `:)` | ||
Thank you for taking the time to report an issue. This form is for reporting **bugs within ethers**, specifically for the legacy v5 branch. | ||
If you are **new to ethers** or *uncertain* whether this is a bug in ethers, a bug in another framework or a bug in your own code, please [start a discussion](https://github.com/ethers-io/ethers.js/discussions) first. | ||
- type: input | ||
id: version | ||
attributes: | ||
label: Ethers Version | ||
description: What version of ethers are you using? Before opening an issue, please make sure you are up to date. | ||
placeholder: 5.y.z | ||
validations: | ||
required: true | ||
- type: input | ||
id: search-terms | ||
attributes: | ||
label: Search Terms | ||
description: Have you searched for answers [in the documentation](https://docs.ethers.org), through [the issues](https://github.com/ethers-io/ethers.js/issues) and [on the discusions](https://github.com/ethers-io/ethers.js/discussions)? Please include the search terms you have tried. This helps us add more keywords where needed. | ||
placeholder: e.g. abi, network, utf8 | ||
- type: textarea | ||
id: about-the-bug | ||
attributes: | ||
label: Describe the Problem | ||
description: Please describe what you expected to happen vs what did happen? | ||
placeholder: What happened? | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: code-snippet | ||
attributes: | ||
label: Code Snippet | ||
description: If possible, please include a **short and concise** code snippets that can reproduce this issue. Ideally code that can be pasted into the [Ethers Playground](https://playground.ethers.org). | ||
placeholder: e.g. provider.getBlockNumber() | ||
render: shell | ||
- type: textarea | ||
id: contract-abi | ||
attributes: | ||
label: Contract ABI | ||
description: If this involves a contract, please include any **concise and relevant** ABI fragments. | ||
placeholder: e.g. [ 'function balanceOf(address owner) view returns (uint)' ] | ||
render: shell | ||
- type: textarea | ||
id: errors | ||
attributes: | ||
label: Errors | ||
description: If there is an error, please include the **entire error** (redacting any sensitive information). | ||
placeholder: "e.g. Error: invalid name (code='INVALID_ARGUMENT, ...)" | ||
render: shell | ||
- type: dropdown | ||
id: environment | ||
attributes: | ||
label: Environment | ||
description: What environment, platforms or frameworks are you using? Select all that apply. | ||
multiple: true | ||
options: | ||
- Ethereum (mainnet/ropsten/rinkeby/goerli) | ||
- Altcoin - Please specify (e.g. Polygon) | ||
- node.js (v12 or newer) | ||
- node.js (older than v12) | ||
- Browser (Chrome, Safari, etc) | ||
- React Native/Expo/JavaScriptCore | ||
- Hardhat | ||
- Geth | ||
- Parity | ||
- Ganache | ||
- Other (please specify) | ||
- type: input | ||
id: other-envrionment | ||
attributes: | ||
label: Environment (Other) | ||
placeholder: anything else? |
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,48 @@ | ||
name: Generate Documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "src.ts/**" | ||
- "docs.wrm/**" | ||
|
||
jobs: | ||
docs: | ||
name: Generate Documentation | ||
|
||
runs-on: ubuntu-latest | ||
|
||
environment: ethers-tests | ||
env: | ||
FAUCET_PRIVATEKEY: ${{ secrets.FAUCET_PRIVATEKEY }} | ||
|
||
steps: | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: "0" | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Install Flatworm | ||
run: npm install --no-save 'https://github.com/ricmoo/flatworm.git#tsdocs' | ||
|
||
- name: Build Documentation | ||
run: node node_modules/flatworm/lib/cli-test ./docs.wrm/config.mjs | ||
|
||
- name: Upload documentation to to docs.ethers.org | ||
uses: ethers-io/sync-s3-action@main | ||
with: | ||
aws_access_key_id: ${{ secrets.DOCS_AWS_ACCESS_KEY_ID }} | ||
aws_secret_access_key: ${{ secrets.DOCS_AWS_SECRET_ACCESS_KEY}} | ||
aws_s3_bucket: ethers.org | ||
source_folder: 'output/docs/' | ||
destination_prefix: 'docs/' | ||
aws_cloudfront_id: ${{ secrets.DOCS_AWS_CLOUDFRONT_ID }} |
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,46 @@ | ||
name: Browser Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "src.ts/**" | ||
- "lib.esm/**" | ||
- "lib.commonjs/**" | ||
- "misc/test-browser/**" | ||
|
||
jobs: | ||
test-browser: | ||
name: Run Browser Tests | ||
|
||
runs-on: ubuntu-latest | ||
|
||
environment: ethers-tests | ||
|
||
strategy: | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Install Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Install and run Geth | ||
uses: ethers-io/run-geth-action@main | ||
|
||
- name: Insall Chrome | ||
run: wget -q 'https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb' && sudo dpkg --install google-chrome-stable_current_amd64.deb | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build browser bundles (from TypeScript) | ||
run: npm run build-dist | ||
|
||
- name: Run tests | ||
run: npm run test-browser |
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,109 @@ | ||
name: CI Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "src.ts/**" | ||
- "lib.esm/**" | ||
- "lib.commonjs/**" | ||
|
||
jobs: | ||
|
||
test-node: | ||
#if: ${{ false }} # disable for now | ||
|
||
name: Run Node.js Tests | ||
|
||
runs-on: ubuntu-latest | ||
|
||
environment: ethers-tests | ||
env: | ||
FAUCET_PRIVATEKEY: ${{ secrets.FAUCET_PRIVATEKEY }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node-version: [ 18.x, 20.x ] | ||
test-type: [ esm, commonjs ] | ||
|
||
steps: | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install and run Geth | ||
uses: ethers-io/run-geth-action@main | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build ESM and CommonJS (from TypeScript) | ||
run: npm run build-all | ||
|
||
- name: Run tests (${{ matrix.test-type }}) | ||
run: npm run test-${{ matrix.test-type }} | ||
|
||
|
||
coverage: | ||
#if: ${{ false }} # disable for now | ||
|
||
name: Generate Coverage Report | ||
|
||
runs-on: ubuntu-latest | ||
|
||
environment: ethers-tests | ||
env: | ||
FAUCET_PRIVATEKEY: ${{ secrets.FAUCET_PRIVATEKEY }} | ||
|
||
continue-on-error: true | ||
|
||
steps: | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Install and run Geth | ||
uses: ethers-io/run-geth-action@main | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build ESM (from TypeScript) | ||
run: npm run build | ||
|
||
- name: Run coverage tests | ||
run: npm run test-coverage | ||
|
||
- name: Store coverage summary artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: coverage-summary | ||
path: ./output/summary.txt | ||
|
||
- name: Tar coverage files | ||
run: tar -cvf ./output/coverage.tar ./output/lcov-report/ | ||
|
||
- name: Store full coverage artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: coverage-complete | ||
path: ./output/coverage.tar | ||
|
||
- name: Upload coverage to to build.ethers.org | ||
uses: ethers-io/sync-s3-action@main | ||
with: | ||
aws_access_key_id: ${{ secrets.BUILD_AWS_ACCESS_KEY_ID }} | ||
aws_secret_access_key: ${{ secrets.BUILD_AWS_SECRET_ACCESS_KEY}} | ||
aws_s3_bucket: ethers.org | ||
source_folder: 'output/' | ||
destination_prefix: 'build/output/' | ||
aws_cloudfront_id: ${{ secrets.BUILD_AWS_CLOUDFRONT_ID }} |
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,86 @@ | ||
name: Environment Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
|
||
test-tsc-env: | ||
name: Test TypeScript Environments | ||
|
||
runs-on: ubuntu-latest | ||
|
||
env: | ||
npm_config_registry: http://localhost:8043 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
tsModuleResolution: [ "node", "node16", "nodenext" ] | ||
tsModule: [ "commonjs", "es2020" ] | ||
|
||
steps: | ||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
path: "faux_modules/ethers" | ||
|
||
- name: Copy tests to working directory | ||
run: cp -r faux_modules/ethers/testcases/test-env/test-tsc/* . | ||
|
||
- name: Prepare setup moduleResolution=${{ matrix.tsModuleResolution }} module=${{ matrix.tsModule }} | ||
run: node prepare.cjs ${{ matrix.tsModuleResolution }} ${{ matrix.tsModule }} | ||
|
||
- name: Dump Config | ||
run: cat package.json tsconfig.json | ||
|
||
- name: Install and run Faux Registry | ||
uses: ethers-io/hijack-npm-action@main | ||
|
||
- name: Install packages | ||
run: npm install | ||
|
||
- name: Dump Faux Logs | ||
run: cat .fauxNpm.log | ||
|
||
- name: Run tests | ||
run: npm test | ||
|
||
test-angular: | ||
name: Test Angular Environment | ||
|
||
runs-on: ubuntu-latest | ||
|
||
env: | ||
npm_config_registry: http://localhost:8043 | ||
|
||
steps: | ||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
path: "faux_modules/ethers" | ||
|
||
- name: Copy tests to working directory | ||
run: cp -r faux_modules/ethers/testcases/test-env/angular/* . | ||
|
||
- name: Install and run Faux Registry | ||
uses: ethers-io/hijack-npm-action@main | ||
|
||
- name: Install packages | ||
run: npm install | ||
|
||
- name: Build project | ||
run: npm run build | ||
|
Oops, something went wrong.