Skip to content

Commit

Permalink
Merge pull request #732 from bcnmy/chore/commitizen
Browse files Browse the repository at this point in the history
build(package.json): add commitizen and conventional changelogs
  • Loading branch information
TheDivic authored Oct 25, 2024
2 parents 8e06562 + be83cb2 commit 90aa1a4
Show file tree
Hide file tree
Showing 7 changed files with 627 additions and 36 deletions.
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#### 2024-10-25

##### Build System / Dependencies

* **package.json:** add commitizen and conventional changelogs (950a0582)

##### Chores

* **EPv0.7.0:** :rocket: Allow Base Mainnet transactions (6d224305)
* **admin:** :wastebasket: cleanup (bead9291)
* remove unused weight (bac25c32)
* add empty values.yaml to run "helm lint" (4cfb467a)
* set CPU request to 2CPU, remove CPU limit (df39dbda)

##### New Features

* **admin:** :sparkles: Cancel relayer transaction admin API (8297ad2f)
* **integrations:**
* :sparkles: Lisk Mainnet integration (5cabc50a)
* :sparkles: Metal L2 Mainnet & Lisk Testnet (09254289)
* :sparkles: Metal L2 Testnet integration (e11b5637)
* :sparkles: Kakarot Sepolia Testnet integration (0d9042be)
* :sparkles: Boba Mainnet integration (eac054d4)
* :sparkles: Boba Sepolia Testnet integration (2b1c3dc8)
* :sparkles: 5irechain mainnet integration (e691f387)
* **config:** :poop: allow disabling fee validation for specific chains requested by TW (79fe70f1)
* add antiAffinity to deploy sts in separate ndoes (4e0f0622)
* enable-tolerations-affinity (cb472aef)

##### Bug Fixes

* **transaction-service:** :bug: Fix transactions stuck in Linea mempool (ec400d4d)
* make logging async (6ac59160)
* remove podAffinityTerm (d17a8d0b)
* wrap topologyKey value (c5f69cc3)
* comment out weight in requiredDuringSchedulingIgnoredDuringExecution (f68fc086)
* handle nil case for CPU limit (22c245bd)
* **integrations:**
* :bug: Increase Sei Mainnet funding amount (e4f8fa18)
* :bug: Fix 5irechain integration parameters (1c859618)
* **admin:** :bug: Make healthchecks less sensitive to balance changes (27e8559a)
* **tw:** :bug: Fix opBNB baseFeePerGas returning 0 (151f27ca)

##### Other Changes

* instead of @ for image tag (e4bfa49e)
* bcnmy/bundler into fix/cancel-stuck-transactions (be3ac232)
* EntryPoint v0.7 support" (4c3010f7)
* EntryPoint v0.7 support (c05eb936)
21 changes: 4 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
# Bundler
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

Biconomy ERC-4337 bundler-as-a-service implementation.

## Workflow best practices

This project has two _important_ branches:

- `master`: Production branch. This is code that's currently in production.
- `staging`: Staging branch. This represents what will be deployed to staging and included in the next release after it's been tested.

To write quality commit messages we (try to) follow the [Conventional Commits Standard](https://www.conventionalcommits.org/en/v1.0.0/).

## Local Development Environment
To write quality commit messages we follow the [Conventional Commits Standard](https://www.conventionalcommits.org/en/v1.0.0/).

There are 2 ways to run the service and it's dependencies locally:
To commit use `yarn commit`.

1. **Manually**: follow the instructions in the [Bundler Local Setup](https://www.notion.so/biconomy/Local-setup-858695240f3a4c19b6c96cbb3f235b0a?pvs=4) Notion page.
2. **Docker (recommended)**: follow the instructions below.
## Local Development Environment

## Using the Docker development environment
1. Install Docker, Docker compose and `ts-node` on your local machine
2. Follow the [First setup instructions](src/config/CONFIG.md#👶🏻-first-setup-instructions) to configure the Bundler before running it.
3. Run `docker compose up` and the server and all of it's dependencies should run in the current terminal session without throwing any errors.
Expand All @@ -30,10 +24,3 @@ Other useful commands:
- `docker compose up -d`: runs the containers in the background without blocking the current terminal sessions.
- 💡 `docker compose build server`: run this whenever you add a new package to `package.json` or it won't be reflected in the container.
- `docker compose build --no-cache <service_name>`: build without cache if you suspect caching problems.


### NOTES for DEVOPS
When adding a new chain integration make sure to add the new charin id
to all relevant config deployment files, in the `supportedNetworks`
e.g. `config/staging.json` or the bunlder will not start that network
even thouh is supported.
14 changes: 14 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"scripts": {
"commit": "cz",
"changelog": "npx generate-changelog",
"lint": "eslint . --ext .ts",
"format": "eslint 'src' --ext .ts --fix",
"prepare": "husky install",
Expand Down Expand Up @@ -73,6 +75,8 @@
"@typescript-eslint/eslint-plugin": "^5.40.0",
"@typescript-eslint/parser": "^5.40.0",
"babel-jest": "^29.1.2",
"commitizen": "^4.3.1",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.25.0",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^9.1.0",
Expand All @@ -83,5 +87,15 @@
"prettier": "^3.1.1",
"ts-jest": "^29.0.3",
"ts-node": "^10.9.1"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"husky": {
"hooks": {
"prepare-commit-msg": "exec < /dev/tty && npx cz --hook || true"
}
}
}
1 change: 1 addition & 0 deletions src/decrypt-config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
import crypto from "crypto-js";
import fs, { existsSync } from "fs";

Expand Down
1 change: 1 addition & 0 deletions src/server/api/v2/eth_sendUserOperation/handler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ async function saveUserOperation(
userOperationData: InitialUserOperationDataType,
): Promise<void> {
// console.log(`Nonce: ${otherNumber}`);
// eslint-disable-next-line no-console
console.log(JSON.stringify(userOperationData, null, 2));
userOperationDaoSaveMock(chainIdd, userOperationData);
}
Expand Down
4 changes: 2 additions & 2 deletions src/server/api/v3/eth_estimateUserOperationGas/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ export const estimateUserOperationGas = async (req: Request, res: Response) => {
const { chainId, apiKey } = req.params;

// create a child logger so all important tracing info is logged with each call
let log = filenameLogger.child({
const log = filenameLogger.child({
chainId,
requestId: id,
apiKey: apiKey,
apiKey,
});

log.info(
Expand Down
Loading

0 comments on commit 90aa1a4

Please sign in to comment.