From cf7239aa0b1b1fd1016fcce7a4e042eaeb9e230e Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Tue, 22 Nov 2022 06:02:59 +0000 Subject: [PATCH] add example create user and change user tier commands --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1778b8e8..837e596a 100644 --- a/README.md +++ b/README.md @@ -70,13 +70,30 @@ $ websocat ws://127.0.0.1:8544 You can copy `config/example.toml` to `config/production-$CHAINNAME.toml` and then run `docker-compose up --build -d` start proxies for many chains. +### Run migrations + +This is only really useful during development. The migrations run on application start. -Run migrations (useful during development. in production, the migrations run on application start) ``` cd migration cargo run up ``` +### Create a user: + +``` +web3_proxy_cli --db-url ... create_user --address 0x0000000000000000000000000000000000000000 --email infra@llamanodes.com --description "..." +``` + +### Give a user unlimited requests per second: + +Copy the ULID key (or UUID key) out of the above command, and put it into the following command. + +``` +web3_proxy_cli --db-url ... change_user_tier_by_key "$RPC_ULID_KEY_FROM_PREV_COMMAND" "Unlimited" +``` + + ## Database entities This command only needs to be run during development. Production should use the already generated entities.