From 1bd6a6d92090b6428ff86a9dd9d528931314f122 Mon Sep 17 00:00:00 2001 From: Arseniy Klempner Date: Wed, 12 Nov 2025 14:03:38 -0800 Subject: [PATCH] fix: script name in package.json and readme --- packages/rln/README.md | 8 ++++++-- packages/rln/package.json | 2 +- packages/rln/src/contract/rln_base_contract.ts | 5 +++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/rln/README.md b/packages/rln/README.md index 526bc05e9c..653cf4e998 100644 --- a/packages/rln/README.md +++ b/packages/rln/README.md @@ -14,12 +14,16 @@ npm install @waku/rln ## Smart Contract Type Generation -We use `wagmi` to generate TypeScript bindings for interacting with the RLN smart contracts. When changes are pushed to the `waku-rlnv2-contract` repository, run the following script to fetch and build the latest contracts and generate the TypeScript bindings: +We use `wagmi` to generate TypeScript bindings for interacting with the RLN smart contracts. + +When changes are pushed to the `waku-rlnv2-contract` repository, run the following script to fetch and build the latest contracts and generate the TypeScript bindings: ``` -./generate_contract_abi.sh +npm run setup:contract-abi ``` +Note that we commit/bundle the generated typings, so it's not necessary to run this script unless the contracts are updated. + ## Usage ```typescript diff --git a/packages/rln/package.json b/packages/rln/package.json index 71fbc8f957..393475635a 100644 --- a/packages/rln/package.json +++ b/packages/rln/package.json @@ -44,7 +44,7 @@ "watch:test": "mocha --watch", "prepublish": "npm run build", "reset-hard": "git clean -dfx -e .idea && git reset --hard && npm i && npm run build", - "setup:contract-abi": "./setup-contract-abi.sh", + "setup:contract-abi": "./generate_contract_abi.sh", "generate:contract": "npx wagmi generate" }, "engines": { diff --git a/packages/rln/src/contract/rln_base_contract.ts b/packages/rln/src/contract/rln_base_contract.ts index 8537bc2753..760aa903b4 100644 --- a/packages/rln/src/contract/rln_base_contract.ts +++ b/packages/rln/src/contract/rln_base_contract.ts @@ -320,9 +320,10 @@ export class RLNBaseContract { } /** - * Withdraw deposited tokens after membership is erased + * Withdraw deposited tokens after membership is erased. + * The smart contract validates that the sender is the holder of the membership, + * and will only send tokens to that address. * @param token - Token address to withdraw - * NOTE: Funds are sent to msg.sender (the walletClient's address) */ public async withdraw(token: string): Promise { if (!this.rpcClient.account) {