Closed lukeskinner closed 3 years ago
This will ask OT Hub for jobs which you are eligible for a payout. From there it will ask your node to payout the jobs via the OT node api. You need to do the setup steps on your node for this to work.
Please note that you will need to do this separately for each identity you want to use it on. Most likely due to current ETH gas prices you will only want to set this up once for the xDai identity.
offersToPayout=$(curl -X GET "https://v5api.othub.info/api/Payouts/getofferidsforpayout/ENTERIDENTITYHERE" -H "accept: text/plain")
for offerID in ${offersToPayout//\\n/ }
do
echo "Asking node to pay out offer ID $offerID"
docker exec otnode curl -s -X GET "http://127.0.0.1:8900/api/latest/payout?offer_id=$offerID"
done
bash dopayouts
In the future you just need to do step 6 to repeat the process.
New API call to return jobs which could be payed out. Look at the amount paid out in the DB and compare to the total, use that for if present or not - also check litigation is not failed.
Return a new offer id on each line. No JSON, no XML.
Think about some level of support with cosmic overlay? Think about a script to read this and run
docker exec otnode curl -s -X GET http://127.0.0.1:8900/api/latest/payout?offer_id=XXXXX