mirror of
https://github.com/logos-messaging/logos-messaging-nim-compose.git
synced 2026-01-02 14:03:11 +00:00
Update to explain the TOken minting and approval process for RLN membership
This commit is contained in:
parent
82411844b5
commit
b95b426c48
@ -1,6 +1,6 @@
|
||||
# RPC URL for accessing testnet via HTTP.
|
||||
# e.g. https://sepolia.infura.io/v3/123aa110320f4aec179150fba1e1b1b1
|
||||
RLN_RELAY_ETH_CLIENT_ADDRESS=https://sepolia.infura.io/v3/<key>
|
||||
# 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.
|
||||
# Note: make sure you don't use the '0x' prefix.
|
||||
|
||||
23
README.md
23
README.md
@ -11,8 +11,9 @@ Ready to use docker-compose to run your own [nwaku](https://github.com/waku-org/
|
||||
### 📝 0. Prerequisites
|
||||
|
||||
You need:
|
||||
* Linea Sepolia account with some balance <0.01 Eth. Get some [here](https://www.infura.io/faucet/sepolia).
|
||||
* Then go to https://rln.waku.org/ and follow the instructions to create your membership and export the keystore.
|
||||
* 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).
|
||||
* 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.
|
||||
|
||||
@ -39,6 +40,24 @@ The script is experimental, feedback and pull requests are welcome.
|
||||
The RLN membership is your access key to The Waku Network. Its registration is done onchain, and allows your nwaku node to publish messages in a decentralized and private way, respecting some [rate limits](https://rfc.vac.dev/spec/64/#rate-limit-exceeded).
|
||||
Messages exceeding the rate limit won't be relayed by other peers.
|
||||
|
||||
Before registering you need to mint and approve the tokens to pay for the registration.
|
||||
The simplest way is using Foundry's [cast](https://getfoundry.sh/) tool, which you can install with:
|
||||
|
||||
```
|
||||
curl -L https://foundry.paradigm.xyz | bash
|
||||
foundryup
|
||||
|
||||
```
|
||||
Mint the token from your Linea Sepolia account:
|
||||
```
|
||||
cast send 0x185A0015aC462a0aECb81beCc0497b649a64B9ea "mint(address,uint256)" <Your Linea Sepolia Account Address> 5000000000000000000 --private-key $PRIVATE_KEY --rpc-url https://sepolia.infura.io/v3/<key>
|
||||
```
|
||||
|
||||
Approve the RLN contract to spend your tokens:
|
||||
```
|
||||
cast send 0x185A0015aC462a0aECb81beCc0497b649a64B9ea "approve(address,uint256)" 0xB9cd878C90E49F797B4431fBF4fb333108CB90e6 5000000000000000000 --private-key $PRIVATE_KEY --rpc-url https://sepolia.infura.io/v3/<key>
|
||||
```
|
||||
|
||||
This command will register your membership and store it in `keystore/keystore.json`.
|
||||
Note that if you just want to relay traffic (not publish), you don't need one.
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ if test -n "${ETH_CLIENT_ADDRESS}"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker run -v "$(pwd)/keystore":/keystore/:Z wakuorg/nwaku:v0.35.1 generateRlnKeystore \
|
||||
docker run -v "$(pwd)/keystore":/keystore/:Z wakuorg/nwaku:v0.36.0 generateRlnKeystore \
|
||||
--rln-relay-eth-client-address=${RLN_RELAY_ETH_CLIENT_ADDRESS} \
|
||||
--rln-relay-eth-private-key=${ETH_TESTNET_KEY} \
|
||||
--rln-relay-eth-contract-address=0xB9cd878C90E49F797B4431fBF4fb333108CB90e6 \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user