Skip to content

Commit

Permalink
chore: tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
joepegler committed Jan 17, 2025
1 parent e8f9b68 commit 595f42f
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 6 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@

A utility package that performs simulation and estimations of all ERC-4337 User Operation gas limits.

## Quickstart:

```sh
bun add @biconomy/gas-estimations viem
```

## Usage

### Create a Gas Estimator
You can create the gas estimator for you chain of choice in multiple ways.

Expand Down Expand Up @@ -155,3 +162,23 @@ This will publish a canary version to npm with a temporary version number. The o
[Canary Release](https://www.npmjs.com/package/@biconomy/gas-estimations)

**Note:** You need to have appropriate npm permissions to publish the package.

## Linking & Developing

To link the package to your project, run:

```sh
bun run dev
```

Then in your linked project, update your package.json dependencies to point to the local SDK:

```json
{
"dependencies": {
"@biconomy/gas-estimations": "file:../../entry-point-gas-estimations"
}
}
```

This will run the package in watch mode, and will automatically update the package in your linked project.
2 changes: 1 addition & 1 deletion TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Here's how to setup & run a E2E for a selected network.
> 💡 For the purpose of this example we will assume we are testing Base Sepolia (84532)
1. **Create a `test.json` file in the `config` directory**: You can use `test-example.json` as a reference.
- `bun run init:testConfig` will create and saturate the `test.json` file with API keys from environment variables.
- `bun run init:tests` will create and saturate the `test.json` file with API keys from environment variables.
2. **Get a private RPC URL from one of the providers**: E2E tests require proper private RPC URLs and usually don't work with public RPC URLs because they don't support RPC features such as state overrides or trace calls. **Alchemy** is a good first choice.
3. **Add the private RPC URL to the `test.json` file:** The config should look something like this:
```json
Expand Down
Binary file modified bun.lockb
Binary file not shown.
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,24 @@
}
},
"scripts": {
"dev": "bun link && bun run build:types && bun run build:watch",
"format": "biome format . --write",
"lint": "biome check .",
"lint:fix": "bun run lint --apply",
"build": "bun run build:types && bun run build:js",
"build:types": "tsc --emitDeclarationOnly",
"build:js": "tsup src/index.ts --format esm,cjs --dts --outDir dist --clean",
"build:watch": "tsup src/index.ts --format esm,cjs --dts --outDir dist --watch",
"test": "vitest --run --reporter=verbose",
"test:coverage": "vitest --run --reporter=verbose --coverage",
"test": "vitest -c ./vitest.config.ts --run --reporter=verbose",
"test:coverage": "CI=true vitest -c ./vitest.config.ts --run --reporter=verbose --coverage",
"changeset": "changeset",
"changeset:release": "bun run build && changeset publish",
"changeset:version": "changeset version && bun install --lockfile-only",
"changeset:release:canary": "original_name=$(bun run scripts/publish:canary.ts | grep ORIGINAL_NAME | cut -d'=' -f2) && npm publish && git checkout package.json && git tag -l '*-canary.*' | xargs git tag -d && git fetch --tags && git reset --hard && git clean -fd && echo \"Published canary version of $original_name as latest\"",
"docs": "typedoc --tsconfig ./tsconfig.json",
"docs:deploy": "bun run docs && gh-pages -d docs",
"size": "size-limit",
"init:testConfig": "bun run scripts/populate:testConfig.ts"
"init:tests": "bun run scripts/init:tests.ts"
},
"dependencies": {
"zod": "^3.24.1",
Expand Down Expand Up @@ -64,7 +65,7 @@
"vitest": "^3.0.1"
},
"peerDependencies": {
"viem": "^2.22.8"
"viem": "^2.22.9"
},
"commitlint": {
"extends": [
Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { join } from "node:path"
import { defineConfig } from "vitest/config"
import { config } from "dotenv"

config()

export default defineConfig({
test: {
Expand Down

0 comments on commit 595f42f

Please sign in to comment.