Skip to content

Commit 31b8d32

Browse files
committed
fix: script name in package.json and readme
1 parent 2cda197 commit 31b8d32

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

packages/rln/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,16 @@ npm install @waku/rln
1414

1515
## Smart Contract Type Generation
1616

17-
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:
17+
We use `wagmi` to generate TypeScript bindings for interacting with the RLN smart contracts.
18+
19+
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:
1820

1921
```
20-
./generate_contract_abi.sh
22+
npm run setup:contract-abi
2123
```
2224

25+
Note that we commit/bundle the generated typings, so it's not necessary to run this script unless the contracts are updated.
26+
2327
## Usage
2428

2529
```typescript

packages/rln/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"watch:test": "mocha --watch",
4545
"prepublish": "npm run build",
4646
"reset-hard": "git clean -dfx -e .idea && git reset --hard && npm i && npm run build",
47-
"setup:contract-abi": "./setup-contract-abi.sh",
47+
"setup:contract-abi": "./generate_contract_abi.sh",
4848
"generate:contract": "npx wagmi generate"
4949
},
5050
"engines": {

packages/rln/src/contract/rln_base_contract.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,10 @@ export class RLNBaseContract {
320320
}
321321

322322
/**
323-
* Withdraw deposited tokens after membership is erased
323+
* Withdraw deposited tokens after membership is erased.
324+
* The smart contract validates that the sender is the holder of the membership,
325+
* and will only send tokens to that address.
324326
* @param token - Token address to withdraw
325-
* NOTE: Funds are sent to msg.sender (the walletClient's address)
326327
*/
327328
public async withdraw(token: string): Promise<Hash> {
328329
if (!this.rpcClient.account) {

0 commit comments

Comments
 (0)