-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #157 from ensdomains/feat/strict-param
feat: add strict/gatewayUrls param + getRecords tweaks
- Loading branch information
Showing
33 changed files
with
4,073 additions
and
2,228 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 |
---|---|---|
|
@@ -10,15 +10,15 @@ jobs: | |
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [16] | ||
node-version: [18] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.release.target_commitish }} | ||
|
||
- uses: pnpm/[email protected] | ||
with: | ||
version: 7.8.0 | ||
version: 8.14.0 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
|
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 |
---|---|---|
|
@@ -14,7 +14,7 @@ jobs: | |
|
||
- uses: pnpm/[email protected] | ||
with: | ||
version: 7.8.0 | ||
version: 8.14.0 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
|
@@ -34,7 +34,7 @@ jobs: | |
|
||
- uses: pnpm/[email protected] | ||
with: | ||
version: 7.8.0 | ||
version: 8.14.0 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
|
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
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,21 @@ | ||
import type { ClientWithEns } from '../../contracts/consts.js' | ||
import _getAbi from './_getAbi.js' | ||
|
||
it('does not propagate error when strict is false', async () => { | ||
const result = await _getAbi.decode({} as ClientWithEns, '0x1234', { | ||
strict: false, | ||
}) | ||
expect(result).toBeNull() | ||
}) | ||
|
||
it('propagates error when strict is true', async () => { | ||
await expect(_getAbi.decode({} as ClientWithEns, '0x1234', { strict: true })) | ||
.rejects.toThrowErrorMatchingInlineSnapshot(` | ||
"Data size of 2 bytes is too small for given parameters. | ||
Params: (uint256, bytes) | ||
Data: 0x1234 (2 bytes) | ||
Version: [email protected]" | ||
`) | ||
}) |
Oops, something went wrong.