Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
225 commits
Select commit Hold shift + click to select a range
64b4b47
finished getL2HashForDepositTx
wilsoncusack Aug 19, 2023
56cfd8f
better handling of to
wilsoncusack Aug 19, 2023
f9cc632
add comments
wilsoncusack Aug 19, 2023
44c28e8
add client
wilsoncusack Aug 19, 2023
4431dfb
re-org, extend viem client
wilsoncusack Aug 19, 2023
0c7eb13
update params in publicOpStackClient
wilsoncusack Aug 19, 2023
428e9d2
fix
wilsoncusack Aug 19, 2023
74cb9ce
readme
wilsoncusack Aug 19, 2023
58693bc
remove op stack client, prefer just decorator
wilsoncusack Aug 19, 2023
6089a29
Merge pull request #1 from wilsoncusack/wilson/remove-client
wilsoncusack Aug 19, 2023
47b42a0
use named args for getSourceHash and add test
wilsoncusack Aug 19, 2023
84225c3
remove hook code, not needed in this repo
wilsoncusack Aug 19, 2023
9d40b3e
Return all hashes from deposit tx (#2)
wilsoncusack Aug 19, 2023
d50ea1a
update getDepositEventInfoFromTxReceipt doc string
wilsoncusack Aug 19, 2023
2c71da9
remove unneeded test
wilsoncusack Aug 19, 2023
323f447
test naming
wilsoncusack Aug 19, 2023
d1b2070
:sparkles: feat: Add bridge way of calling contracts (#3)
roninjin10 Aug 20, 2023
483a542
add more tests, deleted unneeded files, use dicts for args (#4)
wilsoncusack Aug 20, 2023
839a1b3
:safety_vest: fix: Better types (#9)
roninjin10 Aug 22, 2023
4e8f381
unsafeDepositTx (#7)
wilsoncusack Aug 22, 2023
5eb2aef
updated wallet decorator, added live test, fixed zero data issue (#12)
wilsoncusack Aug 22, 2023
cff9d18
add workflow to run tests (#13)
wilsoncusack Aug 23, 2023
bfb4606
Add writeDepositERC20 and writeDepositETH (#15)
zencephalon Aug 24, 2023
188a989
add more tests for writeUnsafeDepositTransaction (#16)
wilsoncusack Aug 25, 2023
967eb83
hashMessageHash
wilsoncusack Aug 26, 2023
2ceb3a2
add method to getWithdrawalMessages from a transaciton (#21)
wilsoncusack Aug 27, 2023
6c37f3e
formatting (#22)
wilsoncusack Aug 27, 2023
ffaaf01
add getProof
wilsoncusack Aug 27, 2023
c849ff3
proof of concept get prove args
wilsoncusack Aug 27, 2023
730fe45
checkin
wilsoncusack Aug 27, 2023
bcc673d
working in test, need to improve ergonomics
wilsoncusack Aug 28, 2023
811035a
cleaned up: getOutputForL2Block
wilsoncusack Aug 28, 2023
1a00d43
added comments
wilsoncusack Aug 28, 2023
8f3b0a5
fix types for unsafeDeposit and add test (#24)
wilsoncusack Aug 28, 2023
7295e2c
Merge pull request #23 from base-org/wilson/proof
zencephalon Aug 28, 2023
941565b
Refactor types without decorator (#32)
zencephalon Aug 29, 2023
c87feb0
First pass at benchmarks (#33)
wilsoncusack Aug 29, 2023
c481a35
Add simulateDepositEth and simulateDepositERC20 (#34)
zencephalon Aug 30, 2023
8c06655
refactor folders and decorators to be L1 and L2 specific (#40)
wilsoncusack Aug 31, 2023
9314e3e
FIX: Computing wrong L2 hash (#44)
wilsoncusack Sep 1, 2023
e34ef3d
Improve function APIs with better generics (#42)
wilsoncusack Sep 2, 2023
8dbef06
formatting
wilsoncusack Sep 2, 2023
fd4ecdb
Flesh out docs (#41)
zencephalon Sep 3, 2023
f4cc0dd
small fix
wilsoncusack Sep 3, 2023
ffc2422
remove site node modules
wilsoncusack Sep 3, 2023
741705f
Switch lint and formatting to dprint (#48)
wilsoncusack Sep 3, 2023
2ecdee8
simplify naming, and better ergonomics (#49)
wilsoncusack Sep 3, 2023
d4983b0
update site package
wilsoncusack Sep 3, 2023
599e583
fix site (#50)
wilsoncusack Sep 4, 2023
a1b571b
make viem a peer dep (#52)
wilsoncusack Sep 5, 2023
c03e50c
Re work APIs: OpStackChain type, L1 chains live in OpConfig (#53)
wilsoncusack Sep 8, 2023
8a532ca
check in with estimateRelayMessageGas, going to remove
wilsoncusack Sep 8, 2023
4806b14
wrote docs
wilsoncusack Sep 8, 2023
f6595e8
Rename opStack contracts to be shorter and match actual contract name…
wilsoncusack Sep 8, 2023
517aaeb
added more docs and cleaned up some things as a result (#60)
wilsoncusack Sep 8, 2023
47b50b1
use `to` versions of deposit functions (#61)
wilsoncusack Sep 8, 2023
2a15aac
add withdrawalERC20 (#62)
wilsoncusack Sep 8, 2023
aea8c76
remove imports of viem/dist (#64)
wilsoncusack Sep 9, 2023
31121dd
fix getL2HashFromL1DepositInfo bench (#68)
wilsoncusack Sep 12, 2023
b32a561
match viem tsconfig and build settings, ready to try publishing (#65)
wilsoncusack Sep 13, 2023
fa7d382
Feat: writeWithdrawETH (#71)
wilsoncusack Sep 14, 2023
57d3e42
Export decorators and actions + some type fixes (#72)
wilsoncusack Sep 14, 2023
2061f7b
writeOpStackL2 (#73)
wilsoncusack Sep 14, 2023
9d2f0a5
L1 withdraw functions (#75)
wilsoncusack Sep 15, 2023
f66c3fe
getSecondsToNextL2Output (#76)
wilsoncusack Sep 15, 2023
9c2e6a3
Add more docs (#77)
zencephalon Sep 15, 2023
d8a848b
getSecondsToFinalizable (#78)
wilsoncusack Sep 15, 2023
5c39d5c
add commit hook (#80)
wilsoncusack Sep 15, 2023
fc1f154
add changeset (#81)
wilsoncusack Sep 15, 2023
95cb569
writeFinalizeWithdrawalTransaction (#83)
wilsoncusack Sep 16, 2023
836856f
Wilson/release (#84)
wilsoncusack Sep 16, 2023
ca2ee92
doc mode (#85)
wilsoncusack Sep 16, 2023
e7ebdda
Fix chain resolution (#88)
wilsoncusack Sep 16, 2023
fa49872
minGasLimit should always be number, as is uint32 (#95)
wilsoncusack Sep 16, 2023
1aec607
📝 docs: Update license and contributing docs links (#98)
duckception Sep 16, 2023
35beb53
feat: readFinalizedWithdrawals (#94)
Sabnock01 Sep 16, 2023
826fea8
allow getL2HashesForDepositTx to take tx receipt (#96)
wilsoncusack Sep 16, 2023
7a21a29
changeset (#100)
wilsoncusack Sep 16, 2023
48a8412
Add zora network (#99)
iainnash Sep 16, 2023
022489d
fix output root proof version issue (#101)
wilsoncusack Sep 17, 2023
f853852
export writeFinalizeWithdrawalTransaction (#102)
wilsoncusack Sep 17, 2023
9e11eaa
add examples (#104)
wilsoncusack Sep 17, 2023
c66f570
fix version (#103)
wilsoncusack Sep 17, 2023
670e45c
:memo: docs: organize config.mts
Sabnock01 Sep 18, 2023
2e3d044
:test_tube: ci: Add coverage
Sep 16, 2023
f778aff
chore: Add only-allow (#114)
roninjin10 Sep 19, 2023
24e4c51
add read proven withdrawal bench (#89)
wilsoncusack Sep 19, 2023
47a92fb
📝 docs: Fix typo in Wilson's Twitter link (#97)
duckception Sep 19, 2023
0441437
chore: add .npmrc for npm workspace (#113)
roninjin10 Sep 19, 2023
2b64eb7
:memo: nit: fix CONTRIBUTING index (#110)
Sabnock01 Sep 19, 2023
a7129b0
stash
Sabnock01 Sep 19, 2023
ecc937e
:white_check_mark: chore: add `resolveL1OpStackContractAddress` test …
Sabnock01 Sep 20, 2023
17776c4
:wrench: Fix CHANGELOG (#107)
Sabnock01 Sep 20, 2023
548c233
:memo: docs: organize config.mts (#108)
Sabnock01 Sep 20, 2023
745a65a
Fix getTransactionHash to use un-decorated function for better tree s…
kyscott18 Sep 20, 2023
1bc857d
📝 docs: add `read*` functions with cleanup (#105)
Sabnock01 Sep 20, 2023
86f8263
Remove "unsafe" from depositTransaction (#118)
wilsoncusack Sep 21, 2023
6938582
readFinalizedWithdrawals on decorator + changeset (#119)
wilsoncusack Sep 21, 2023
24934f6
alpha.7 release (#120)
wilsoncusack Sep 21, 2023
a68c8ff
writeContractDeposit
wilsoncusack Sep 16, 2023
0cb225a
updated to also take contract address, and add natspec
wilsoncusack Sep 16, 2023
5bc0167
update to use writeDepositTransaction
wilsoncusack Sep 24, 2023
56196dc
add withdrawal terms
Sabnock01 Sep 24, 2023
d11817c
make formatter happy
Sabnock01 Sep 24, 2023
a08a4da
Merge branch 'main' into sabnock/add-withdrawal-types
Sabnock01 Sep 24, 2023
d5079b8
remove old file changes
Sabnock01 Sep 24, 2023
30c76e1
Merge branch 'sabnock/add-withdrawal-types' of https://github.com/Sab…
Sabnock01 Sep 24, 2023
ef72a1d
Merge pull request #87 from roninjin10/09-15-ci_Add_coverage
zencephalon Sep 28, 2023
4c99687
added smart contract wallet check, still need tests
wilsoncusack Sep 30, 2023
93d2cb3
Update site/docs/glossary/types.md
Sabnock01 Oct 3, 2023
5a4980a
:construction_worker: ci: Add changesets workflow (#86)
roninjin10 Oct 3, 2023
c0533e5
:sparkles: feat: Add gas estimation actions
Sep 12, 2023
f03b269
export BlockOptions
Oct 2, 2023
dc74ca0
address
Oct 2, 2023
ca4bb91
delete more types and export everything
Oct 3, 2023
9c69161
fix(release): Add nvmrc
Oct 6, 2023
b7d1842
Merge pull request #129 from roninjin10/10-05-fix_release_Add_nvmrc
zencephalon Oct 6, 2023
da79b3b
Exported wrong type
roninjin10 Oct 6, 2023
c1691f9
:bug: fix: Export simulateDepositEth correctly
Oct 6, 2023
0a55a16
docs: update language for withdrawals
Sabnock01 Oct 6, 2023
5e0712e
Merge branch 'sabnock/add-withdrawal-types' of https://github.com/Sab…
Sabnock01 Oct 6, 2023
ee7dfb0
finish up adding writeContractDeposit, still need simulate and docs b…
wilsoncusack Oct 10, 2023
61db213
update writeDepositETH
lukasrosario Oct 10, 2023
7cffc26
add test for no account
wilsoncusack Oct 10, 2023
1cedfab
add changeset
wilsoncusack Oct 10, 2023
b86493f
Merge pull request #91 from base-org/wilson/writeContractDeposit
zencephalon Oct 10, 2023
f8c0056
Merge pull request #130 from roninjin10/10-05-fix_Export_simulateDepo…
zencephalon Oct 10, 2023
ff2b488
Update site/docs/glossary/types.md
Sabnock01 Oct 10, 2023
78dc45f
Merge pull request #115 from Sabnock01/sabnock/add-withdrawal-types
zencephalon Oct 10, 2023
2de766d
add test, use writeDepositTransaction
lukasrosario Oct 10, 2023
69a88d6
lint
lukasrosario Oct 10, 2023
bd7b047
update cov
lukasrosario Oct 10, 2023
b9f1b8b
Merge pull request #135 from base-org/lukas/update-write-deposit-eth
zencephalon Oct 10, 2023
2f5a5ac
Merge pull request #67 from roninjin10/09-12-feat_Add_gas_estimation_…
zencephalon Oct 12, 2023
3ca860b
Refactor getSecondsToFinalizable
zencephalon Oct 12, 2023
df669c8
Format
zencephalon Oct 12, 2023
12e85ef
Fix typos
zencephalon Oct 12, 2023
5d9449a
Refactor getOutputForL2Block
zencephalon Oct 12, 2023
85b3e4b
Format
zencephalon Oct 12, 2023
182e743
Refactor getSecondsToNextL2Output
zencephalon Oct 12, 2023
c5d64e0
Format
zencephalon Oct 12, 2023
0397dad
Refactor readFinalizedWithdrawals
zencephalon Oct 12, 2023
df2fc57
Format
zencephalon Oct 12, 2023
51b7b8d
Refactor readProvenWithdrawals
zencephalon Oct 12, 2023
840b551
Format
zencephalon Oct 12, 2023
ee78863
Refactor Chain id types
zencephalon Oct 12, 2023
7a9e648
Format
zencephalon Oct 12, 2023
b0c0840
Refactor simulateDepositETH and simulateDepositERC20
zencephalon Oct 12, 2023
f05143b
Refactor simulateFinalizeWithdrawalTransaction
zencephalon Oct 12, 2023
a434c76
Refactor simulateProveWithdrawalTransaction
zencephalon Oct 12, 2023
ab17430
Fix type errors
zencephalon Oct 12, 2023
efd99a8
Refactor writeContractDeposit
zencephalon Oct 12, 2023
497b4e0
Fix typecheck
zencephalon Oct 12, 2023
d4ffb8e
Refactor writeDepositETH
zencephalon Oct 12, 2023
999e295
Refactor writeFinalizeWithdrawalTransaction
zencephalon Oct 12, 2023
01ca7ab
Refactor writeProveWithdrawlTransaction
zencephalon Oct 12, 2023
d6e8622
Refactor writeSendMessage
zencephalon Oct 12, 2023
ae09d47
Add chain addresses and fix type errors
zencephalon Oct 12, 2023
a2bacb9
Rip out resolveL1OpStackContractAddress
zencephalon Oct 12, 2023
c721255
Simplifying types
zencephalon Oct 12, 2023
46947ad
Simplifying types
zencephalon Oct 12, 2023
3dbf666
Update error when unable to resolve address
zencephalon Oct 12, 2023
e39b5d5
Try removing account from failing test
zencephalon Oct 12, 2023
8163db8
Put it back the way it was
zencephalon Oct 12, 2023
08f1a62
Simplify L1WriteActionBaseType
zencephalon Oct 13, 2023
e764fa1
optimismPortal -> portal
zencephalon Oct 13, 2023
cf98ed0
Fix the flaky withdraw test
zencephalon Oct 13, 2023
7d16f9b
Add major change
zencephalon Oct 13, 2023
b60d7a9
Import Address type from Viem ala Will
zencephalon Oct 17, 2023
33a90b5
Remove opStackChain
zencephalon Oct 17, 2023
69c0872
Fix tests and types
zencephalon Oct 17, 2023
493f958
Remove writeOpStackL1
zencephalon Oct 17, 2023
3f11607
Remove readOpStackL1
zencephalon Oct 17, 2023
4bee10f
Rermove writeOpStackL2
zencephalon Oct 17, 2023
34bc1cf
Don't bump us out of alpha yet ; update coverage thresholds
zencephalon Oct 17, 2023
92f1b66
Update coverage thresholds
zencephalon Oct 17, 2023
64be79a
Merge pull request #138 from base-org/refactor-chain-config-api
zencephalon Oct 19, 2023
7772e9d
Set snapshot action to release environment so it can access secret
zencephalon Oct 19, 2023
231392b
Merge pull request #139 from base-org/fix-snapshot-action-environment
zencephalon Oct 19, 2023
bdccff4
Fix TS2742: The inferred type of 'serializeEip1559Transaction' cannot…
zencephalon Oct 19, 2023
de18179
Merge pull request #140 from base-org/fix-typescript-inference-error
zencephalon Oct 19, 2023
9c5bbc1
Version Packages (alpha)
github-actions[bot] Oct 19, 2023
1c1e286
Merge pull request #134 from base-org/changeset-release/main
zencephalon Oct 20, 2023
407a151
[fix] use latest proposed l2 block for withdrawal proofs
lukasrosario Oct 20, 2023
62986df
undo unintentional change
lukasrosario Oct 20, 2023
363d9b9
lint
lukasrosario Oct 20, 2023
5024f6b
Merge pull request #141 from base-org/lukas/use-latest-proposed-l2-bl…
zencephalon Oct 20, 2023
44e4d96
Add license to package.json so it shows up properly on npm
zencephalon Oct 24, 2023
78c58bb
Fix type definitions not outputting in build
zencephalon Oct 24, 2023
bcd74b5
Merge pull request #142 from base-org/add-license-to-package-json
zencephalon Oct 24, 2023
04d7600
Merge pull request #143 from base-org/fix-type-exports-build
zencephalon Oct 24, 2023
1e59eaa
Remove stray references to the old l2chain API
zencephalon Oct 24, 2023
d010260
Change prelease and release environments, skip snapshots for now
zencephalon Oct 24, 2023
5c7718a
Completely remove snapshot workflow
zencephalon Oct 24, 2023
20a9e74
Merge pull request #145 from base-org/chore/simplify-releases
zencephalon Oct 24, 2023
811472e
Merge pull request #144 from base-org/chore/update-docs-remove-l2chain
zencephalon Oct 24, 2023
6bf465a
Remove simulateOpStackL1, leftover from old API
zencephalon Oct 24, 2023
2ae0358
Update coverage thresholds
zencephalon Oct 24, 2023
884a40f
Merge pull request #146 from base-org/chore/remove-simulate-op-stack-l1
zencephalon Oct 24, 2023
b70b00f
Remove old contract cruft
zencephalon Oct 24, 2023
c7cd0e3
Remove OpStackL1ChainContracts enum from index
zencephalon Oct 24, 2023
41196a9
Add simulateDepositTransaction
zencephalon Oct 24, 2023
d163b7c
Add simulateDepositTransaction to index and decorators
zencephalon Oct 24, 2023
50ffdb2
Merge pull request #147 from base-org/add-simulate-deposit-transaction
zencephalon Oct 24, 2023
f374394
Fix doc links on RawOrContractAddress type
zencephalon Oct 26, 2023
30a99e8
Add writeContractDeposit docs
zencephalon Oct 26, 2023
e0c0fb2
Merge pull request #151 from base-org/add-write-contract-deposit-docs
zencephalon Oct 26, 2023
8468358
Update documentation example
zencephalon Oct 26, 2023
a9f0fd6
Merge pull request #152 from base-org/update-docs
zencephalon Oct 26, 2023
59c710d
Update documentation example
zencephalon Oct 26, 2023
133c854
Merge pull request #153 from base-org/update-docs
zencephalon Oct 26, 2023
679bb1d
Add JSDocs to missing actions
zencephalon Oct 26, 2023
0911e86
Merge pull request #154 from base-org/update-docs
zencephalon Oct 26, 2023
6e93a91
Add mint arg to writeDepositTransaction to disambiguate from 'value'
zencephalon Oct 26, 2023
47cc5c1
Throw error in latestL2BlockNumber if the latestBlock from l1 oracle …
zencephalon Oct 26, 2023
878f603
Clean up APIs
zencephalon Oct 26, 2023
5099d6a
Fix tests, bump major version
zencephalon Oct 26, 2023
f0e13b4
Merge pull request #155 from base-org/api-updates
zencephalon Oct 30, 2023
7bce2e6
Exit pre-release mode
zencephalon Oct 30, 2023
39d3180
Merge pull request #156 from base-org/exit-prerelease
zencephalon Oct 30, 2023
3645e4f
Version Packages
github-actions[bot] Oct 30, 2023
38dc096
Merge pull request #148 from base-org/changeset-release/main
zencephalon Oct 30, 2023
6c98631
Fix changelog formating
zencephalon Oct 30, 2023
26deae0
Merge pull request #157 from base-org/fix-lint
zencephalon Oct 30, 2023
4d46b8b
:construction_worker: chore: Remove prerelease workflow
Nov 1, 2023
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
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
7 changes: 7 additions & 0 deletions .github/actions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# .github/actions

Reusable actions that are used in other actions are here

## setup

Setups forge pnpm node and caches node modules
28 changes: 28 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Setup
runs:
using: composite
steps:
- uses: pnpm/action-setup@v2
with:
version: 8.6.0

- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
registry-url: https://registry.npmjs.org
cache: pnpm

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

# Workaround for parallel building with forge:
# https://github.com/foundry-rs/foundry/issues/4736
- name: Setup forge hack
shell: bash
run: forge build

- name: Install node modules
run: pnpm install --frozen-lockfile
shell: bash
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Version 🔖

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
version:
name: Release
runs-on: ubuntu-latest
environment: release
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- name: "Setup"
uses: ./.github/actions/setup

- name: Build
shell: bash
run: pnpm build

- name: Set deployment token
run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"

# https://github.com/changesets/action#with-publishing
- name: Handle Release Pull Request or Publish to npm
id: changesets
if: steps.check_files.outputs.files_exists == 'false'
uses: changesets/action@v1
with:
title: "chore: version packages 🔖"
commit: "chore: version packages 🔖"
publish: pnpm release:publish
version: pnpm release:version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

99 changes: 99 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Verify
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Set up node
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: 18

- name: Install dependencies
run: pnpm install

- name: Lint code
run: pnpm format:check && pnpm lint

types:
name: Types
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Set up node
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: 18

- name: Install dependencies
run: pnpm install

- name: Check types
run: pnpm typecheck

test:
name: Test
runs-on: ubuntu-latest
environment: verify

steps:
- name: Set up foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Checkout code
uses: actions/checkout@v3

- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Set up node
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: 18

- name: Install dependencies
run: pnpm install

- name: Run tests
run: pnpm test:ci
env:
VITE_ANVIL_FORK_URL: ${{ secrets.VITE_ANVIL_FORK_URL }}

- name: 'Report Coverage'
if: always() # Also generate the report if tests are failing
uses: davelosert/vitest-coverage-report-action@v2
with:
name: "op-viem"
working-directory: "."
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
node_modules
/.pnp
.pnp.js

Expand All @@ -21,3 +21,10 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
bench
dist
cache
node_modules
tsconfig*.tsbuildinfo
*.tgz
vitest.config.ts.timestamp*
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ignore-workspace-root-check=true

1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.12.1
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"editor.defaultFormatter": "dprint.dprint",
"editor.formatOnSave": true,
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"editor.codeActionsOnSave": {
"source.organizeImports.biome": true
},
"[typescript]": {
"editor.defaultFormatter": "dprint.dprint"
}
}
Loading