Skip to content

Commit 9d09926

Browse files
committed
chore: up
1 parent 9605853 commit 9d09926

File tree

8 files changed

+159
-2
lines changed

8 files changed

+159
-2
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: "Install dependencies"
2+
description: "Prepare repository and all dependencies"
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- name: Set up foundry
8+
uses: foundry-rs/foundry-toolchain@v1
9+
with:
10+
version: nightly
11+
12+
- name: Set up Bun
13+
uses: oven-sh/setup-bun@v2

.github/workflows/changesets.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Changesets
2+
on:
3+
push:
4+
branches: [main]
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
verify:
12+
name: Verify
13+
uses: ./.github/workflows/verify.yml
14+
secrets: inherit
15+
16+
changesets:
17+
name: Changesets
18+
needs: verify
19+
permissions:
20+
contents: write
21+
id-token: write
22+
pull-requests: write
23+
runs-on: ubuntu-latest
24+
timeout-minutes: 5
25+
26+
steps:
27+
- name: Clone repository
28+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
29+
with:
30+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
31+
fetch-depth: 0
32+
submodules: 'recursive'
33+
34+
- name: Install dependencies
35+
uses: ./.github/actions/install-dependencies
36+
37+
- name: PR or publish
38+
uses: changesets/action@06245a4e0a36c064a573d4150030f5ec548e4fcc
39+
with:
40+
title: 'chore: version packages'
41+
commit: 'chore: version packages'
42+
createGithubReleases: ${{ github.ref == 'refs/heads/main' }}
43+
publish: bun changeset:publish
44+
version: bun changeset:version
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
48+
49+
- name: Publish preview release
50+
run: bunx pkg-pr-new publish

.github/workflows/pull-request.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Pull Request
2+
on:
3+
pull_request:
4+
types: [opened, reopened, synchronize, ready_for_review]
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
verify:
12+
name: Verify
13+
uses: ./.github/workflows/verify.yml
14+
secrets: inherit

.github/workflows/verify.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Verify
2+
on:
3+
workflow_call:
4+
workflow_dispatch:
5+
6+
jobs:
7+
checks:
8+
name: Checks
9+
runs-on: ubuntu-latest
10+
timeout-minutes: 5
11+
12+
steps:
13+
- name: Clone repository
14+
uses: actions/checkout@v4
15+
with:
16+
submodules: 'recursive'
17+
18+
- name: Install dependencies
19+
uses: ./.github/actions/install-dependencies
20+
21+
- name: Check code
22+
run: bun check
23+
24+
- name: Check types
25+
run: bun check:types
26+
27+
test:
28+
name: Test Runtime
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Clone repository
32+
uses: actions/checkout@v4
33+
with:
34+
submodules: 'recursive'
35+
36+
- name: Install dependencies
37+
uses: ./.github/actions/install-dependencies
38+
39+
- name: Run tests
40+
run: bun test

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,9 @@ bun test # Run tests
163163

164164
## Community
165165

166-
Check out the following places for more Ox-related content:
166+
Check out the following places for more content:
167167

168168
- Follow [@wevm_dev](https://x.com/wevm_dev), [@jxom](https://x.com/_jxom), and [@awkweb](https://x.com/awkweb) on Twitter for project updates
169-
- Join the [discussions on GitHub](https://github.com/wevm/ox/discussions)
170169

171170
## Support
172171

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"scripts": {
77
"build": "zshy --project tsconfig.build.json",
88
"check": "biome check . --write --unsafe",
9+
"check:types": "tsc --noEmit",
910
"gen": "forge build --config-path ./contracts/foundry.toml && bun run scripts/generateTypedArtifacts.ts",
1011
"test": "bun test src"
1112
},

src/Signature.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@ import * as Constants from './Constants.ts'
33

44
const abiCoder = ethers.AbiCoder.defaultAbiCoder()
55

6+
/**
7+
* Verifies a `signature` for a given `address` and `digest`.
8+
*
9+
* @deprecated Use `verifyHash` from `viem/actions` instead.
10+
*
11+
* @param provider - The ethers.AbstractProvider to use for verification.
12+
* @param address - The address of the signer.
13+
* @param digest - The digest to verify.
14+
* @param signature - The signature to verify.
15+
* @returns Whether the signature is valid.
16+
*/
617
export async function verifyHash(
718
provider: ethers.AbstractProvider,
819
address: string,
@@ -23,6 +34,17 @@ export async function verifyHash(
2334
return verifyEcdsa(address, digest, signature)
2435
}
2536

37+
/**
38+
* Verifies a `signature` for a given `address` and `message`.
39+
*
40+
* @deprecated Use `verifyMessage` from `viem/actions` instead.
41+
*
42+
* @param provider - The ethers.AbstractProvider to use for verification.
43+
* @param address - The address of the signer.
44+
* @param message - The message to verify.
45+
* @param signature - The signature to verify.
46+
* @returns Whether the signature is valid.
47+
*/
2648
export async function verifyMessage(
2749
provider: ethers.AbstractProvider,
2850
address: string,
@@ -33,6 +55,19 @@ export async function verifyMessage(
3355
return verifyHash(provider, address, digest, signature)
3456
}
3557

58+
/**
59+
* Verifies a `signature` for a given `address` and `typedData`.
60+
*
61+
* @deprecated Use `verifyTypedData` from `viem/actions` instead.
62+
*
63+
* @param provider - The ethers.AbstractProvider to use for verification.
64+
* @param address - The address of the signer.
65+
* @param domain - The domain of the typed data.
66+
* @param types - The types of the typed data.
67+
* @param value - The value of the typed data.
68+
* @param signature - The signature to verify.
69+
* @returns Whether the signature is valid.
70+
*/
3671
export async function verifyTypedData(
3772
provider: ethers.AbstractProvider,
3873
address: string,

src/VerifyProvider.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ export namespace Provider {
2626
}
2727
}
2828

29+
/**
30+
* Wraps an `ethers.AbstractProvider` with the `VerifyProvider` interface.
31+
*
32+
* @deprecated Use `createPublicClient` from `viem` instead.
33+
*/
2934
export function wrap<provider extends ethers.AbstractProvider>(
3035
provider: provider,
3136
): Provider<provider> {

0 commit comments

Comments
 (0)