Created
May 13, 2022 00:30
-
-
Save cindywu/fd622b908cb4a701c9f54999730c1ba9 to your computer and use it in GitHub Desktop.
creating manual payout for experiment using console
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// find the project | |
p = Project.find [projectID] | |
// create and save the funds payout in db | |
po = Payout.new | |
po.project_id = p.id | |
po.credit_type = 0 | |
po.amount = [amount] | |
po.token = "[tokenID]" | |
po.user_id = [userID] (mine is 5) | |
po.save | |
//create and save the fees payout in db | |
po = Payout.new | |
po.project_id = p.id | |
po.credit_type = 1 | |
po.amount = [amount] | |
po.token = "[tokenID]" | |
po.user_id = [userID] (mine is 5) | |
po.save | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment