fix: script name in package.json and readme

This commit is contained in:
Arseniy Klempner 2025-11-12 14:03:38 -08:00
parent 3c4c531e01
commit 1bd6a6d920
No known key found for this signature in database
GPG Key ID: 51653F18863BD24B
3 changed files with 10 additions and 5 deletions

View File

@ -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

View File

@ -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": {

View File

@ -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<Hash> {
if (!this.rpcClient.account) {