Update README and env example

This commit is contained in:
stubbsta 2025-06-30 09:13:08 +02:00
parent 975775f91e
commit 3a8b10fe59
No known key found for this signature in database
2 changed files with 16 additions and 6 deletions

View File

@ -2,11 +2,19 @@
# e.g. https://linea-sepolia.infura.io/v3/123aa110320f4aec179150fba1e1b1b1
RLN_RELAY_ETH_CLIENT_ADDRESS=https://linea-sepolia.infura.io/v3/<key>
# Private key of testnet where you have sepolia ETH that would be staked into RLN contract.
# Account of testnet where you have Linea Sepolia ETH that would be staked into RLN contract.
ETH_TESTNET_ACCOUNT=<YOUR_TESTNET_ACCOUNT_ADDRESS_HERE>
# Private key of testnet where you have Linea Sepolia ETH that would be staked into RLN contract.
# Note: make sure you don't use the '0x' prefix.
# e.g. 0116196e9a8abed42dd1a22eb63fa2a5a17b0c27d716b87ded2c54f1bf192a0b
ETH_TESTNET_KEY=<YOUR_TESTNET_PRIVATE_KEY_HERE>
# Address of the RLN contract on Linea Sepolia.
RLN_CONTRACT_ADDRESS=0xB9cd878C90E49F797B4431fBF4fb333108CB90e6
# Address of the RLN Membership Token contract on Linea Sepolia used to pay for membership.
TOKEN_CONTRACT_ADDRESS=0x185A0015aC462a0aECb81beCc0497b649a64B9ea
# Password you would like to use to protect your RLN membership.
RLN_RELAY_CRED_PASSWORD="my_secure_keystore_password"

View File

@ -12,7 +12,9 @@ Ready to use docker-compose to run your own [nwaku](https://github.com/waku-org/
You need:
* Linea Sepolia HTTP endpoint. Get one free from [Infura](https://www.infura.io/).
* Linea Sepolia account with some balance <0.01 Eth. You can get some Ethereum Sepolia or Linea Sepolia [here](https://www.infura.io/faucet/sepolia) and Ethereum Sepolia can be bridged to Linea Sepolia [here](https://bridge.linea.build/native-bridge).
* Linea Sepolia account with some balance <0.01 Eth.
* You can get some Ethereum Sepolia or Linea Sepolia [here](https://www.infura.io/faucet/sepolia)
* If you have Ethereum Sepolia, it can be bridged to Linea Sepolia [here](https://bridge.linea.build/native-bridge).
* A password to protect your rln membership.
`docker-compose` [will read the `./.env` file](https://docs.docker.com/compose/environment-variables/set-environment-variables/#additional-information-3) from the filesystem. There is `.env.example` available for you as a template to use for providing the above values. The process when working with `.env` files is to copy the `.env.example`, store it as `.env` and edit the values there.
@ -48,14 +50,14 @@ curl -L https://foundry.paradigm.xyz | bash
foundryup
```
Mint the token from your Linea Sepolia account:
Mint the token used to pay for RLN Membership registration from your Linea Sepolia account (This is a generic ERC20 token used for testnet only):
```
cast send 0x185A0015aC462a0aECb81beCc0497b649a64B9ea "mint(address,uint256)" <Your Linea Sepolia Account Address> 5000000000000000000 --private-key $PRIVATE_KEY --rpc-url https://sepolia.infura.io/v3/<key>
cast send $TOKEN_CONTRACT_ADDRESS "mint(address,uint256)" $ETH_TESTNET_ACCOUNT 5000000000000000000 --private-key $ETH_TESTNET_KEY --rpc-url $RLN_RELAY_ETH_CLIENT_ADDRESS
```
Approve the RLN contract to spend your tokens:
Approve the RLN contract to spend tokens on behalf of your account:
```
cast send 0x185A0015aC462a0aECb81beCc0497b649a64B9ea "approve(address,uint256)" 0xB9cd878C90E49F797B4431fBF4fb333108CB90e6 5000000000000000000 --private-key $PRIVATE_KEY --rpc-url https://sepolia.infura.io/v3/<key>
cast send $TOKEN_CONTRACT_ADDRESS "approve(address,uint256)" $RLN_RELAY-ETH-CONTRACT-ADDRESS 5000000000000000000 --private-key $ETH_TESTNET_KEY --rpc-url $RLN_RELAY_ETH_CLIENT_ADDRESS
```
This command will register your membership and store it in `keystore/keystore.json`.