您最多能選擇 25 個主題 主題必須以字母或數字為開頭,可包含連接號「-」且最長為 35 個字元。
此存儲庫已封存。您可以查看檔案及 Clone 此存儲庫,但不能推送、建立問題及發出合併請求。
 
 
 
 
移至檔案
lza_menace cd40c7a51d
add links to post from mods view
2 年前
suchwow add links to post from mods view 2 年前
.gitignore document and improve repo a bit 3 年前
LICENSE.txt document and improve repo a bit 3 年前
README.md document and improve repo a bit 3 年前
crontab.txt adding sample crontab file for tracking 4 年前
env-example document and improve repo a bit 3 年前
manage.sh document and improve repo a bit 3 年前
requirements.txt document and improve repo a bit 3 年前
run_wallets.sh document and improve repo a bit 3 年前

README.md

SuchWow!

Yo. This is a goofy little CRUD app that interacts with wownero-wallet-rpc to allow people to post memes and get tipped in WOW. It uses Wownero's SSO & Identity service as an authentication backend.

It's lacking a lot of advanced functionality and features....but is pretty rock solid in operation. I rarely have to interact w/ my VPS, it just goes...

It was created haphazardly and drunkenly (at varying times). It (hopefully) stays true to the core ethos of Wownero (I feel) which is, "fuck it, lgtm, ship it". Rough around the edges but overall works great. Was fun to whip together and a blast to see it grow with a community behind it! Thanks all!

Design

Using the "account" mechanism in the wallets (not subaddresses). Every post gets it's own Wownero account within that running wallet RPC process and is mapped to it. Funds go into the account when tipped. The payout script just checks the balances of each account on an interval and sends funds to the user associated with the artwork associated with said account.

Setup

There are quite a few prerequisites to run the web service:

  • register your app on Wownero SSO
  • install Wownero binaries/software
  • setup secrets and config
  • initialize new Wownero wallet and retain seed
  • run the wownero-wallet-rpc process
  • install local system Python dependencies
  • initialize new sqlite db
  • setup scheduled tasks to run payouts

I like to ship with Docker, adjust how you'd prefer.

# setup secrets in env file outside of git
cp env-example .env

# register on wownero sso
# https://login.wownero.com/developer/register

# inject generated keys into suchwow config
# create new secrets for new wallet, flask server, data, etc
vim .env  

# install docker
sudo apt-get install docker.io docker-compose -y
usermod -aG docker ubuntu
sudo -u ubuntu bash # login w/ new group perms

# run wownero wallets via docker - store seed, ensure rpc running `docker ps`
./run_wallets.sh

# install python dependencies locally
sudo apt-get install python3-venv -y
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

# initialize a new sqlite db
./manage.sh init

# setup recurring payouts
# see crontab.txt for cron syntax example
crontab -e

# run a dev server
./manage.sh run  # access on localhost:5000 - flask local dev, not for prod

# run a prod server
./manage.sh prod # run gunicorn on loopback - pass to nginx reverse proxy

# kill prod server
pkill -e -f gunicorn

Operational Tasks

You'll want to promote a user as a moderator to review posts:

./manage.sh add_admin lza_menace

or remove them:

./manage.sh remove_admin lza_menace

Wallets bug out fairly often. Sometimes you might need to punch in a new daemon or restart a wallet:

docker stop suchwow-wallet-rpc
docker rm suchwow-wallet-rpc
vim .env
# modify DAEMON_URI
./run_wallets.sh

Manually run a payout:

./manage.py payout_users

There's other shit, but this is the most common. You'll get the hang of it.