-
-
Notifications
You must be signed in to change notification settings - Fork 775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(WIP -- jasonrhaas) Standard bounties integration #140
(WIP -- jasonrhaas) Standard bounties integration #140
Conversation
Nice web UI for looking at Postgres tables.
StandardBounties only supports Mainnet and Rinkeby.
This way we can run Django outside of the docker container if we need to.
docker-compose.yml
Outdated
@@ -22,6 +33,10 @@ services: | |||
- db | |||
stdin_open: true | |||
tty: true | |||
testrpc: | |||
image: trufflesuite/ganache-cli |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏
Codecov Report
@@ Coverage Diff @@
## master #140 +/- ##
=========================================
Coverage ? 12.09%
=========================================
Files ? 66
Lines ? 3149
Branches ? 346
=========================================
Hits ? 381
Misses ? 2768
Partials ? 0
Continue to review full report at Codecov.
|
Lots of updates here: - Add new Django helper to pull data from GitHub API - Add new Django url route to do the Github API pull - Add new HTML element and CSS to match - Add new JS function to modify the description textform - Add new description field that gets sent to StandardBounties
timezone.now() is UTC time with a timezone field, and self.expires_date was a naive time but in MST.
Standard Bounties does not support rejecting fulfillments. You just select the one that you want to accept from the pool.
Happy to report that all comments and features and been implemented or accounted for. Ready for testing again! 👍 It's deployed on https://stage.gitcoin.co |
TODO: code the metamask module to work within stdbounties http://bits.owocki.com/0Q1s0m2r042K/Image%202018-01-15%20at%2010.29.19%20AM.png |
whats is the most viable migration plan for the current gitcoin bounties over to stdbounties? i think we
@mbeacom @jasonrhaas any thoughts on the above? |
how do we want to handle multiple bounties per github issue URL? right now, via the current stdbounties UI... someone can submit mulitiple bounties on the same GH URL. this is confusing because while standardbounties supports it.. the gitcoin UI does not.. maybe we add a validation step if someone tries to enter a currently active bounty into |
on https://stage.gitcoin.co/funding/fulfill if i try to fulfill a bounty that does not exist (ex: https://github.com/gitcoinco/web/pull/140/files ) ... it just spins forever.. we should handle this and present the user with an error |
i get a 'gas limit set dangerously high' message when i try to fulfill a bounty.. http://bits.owocki.com/3A2t0R3j3m3D/Screen%20Shot%202018-01-15%20at%2010.52.57%20AM.png i think we need to apply an and probably for all other web3 interactions too.. |
mark, we will need to figure out how to massage the 'express interest' functionality into this PR.. is it better if we create one integration branch and merge them all together? im thinking itd be nice if we can all be committing to the same branch and very quickly turning around any and all issues |
also, this tx 'throw()'ed and the frontend thought that it succeeded and updated the bounty anyway. https://rinkeby.etherscan.io/tx/0x1a546bd7296113658b91d5b3badeb98cb11487fe9891eab3726a4c873117bb12 |
parent: 'right_actions', | ||
color: enabled ? 'darkBlue' : 'darkGrey', | ||
extraClass: enabled ? '' : 'disabled', | ||
title: enabled ? 'Claim an issue when you sincerely intend to work on it.\n\n It is not necessary to have started work when you claim an issue, but please (1) comment on the github thread after you claim it, (2) claim an issue only if you plan to start work within the next 12 hours & (3) only claim it if you feel like you understand the scope and can see it to completion. ' : 'Can only be performed if you are not the funder.', | ||
title: enabled ? '' : 'Can only be performed if you are the funder.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the title if enabled:
This will kill the bounty and return the funds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok i guess ill just do this
// bounty is a web3.js eth.contract address | ||
// The Ethereum network requires using ether to do stuff on it | ||
// issueAndActivateBounty is a method definied in the StandardBounties solidity contract. | ||
var bountyIndex = bounty.issueAndActivateBounty( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think that the issueAndActivateBounty should be wrapped in an .estimateGas()
method... so that way we know what gas / gaslimit to pass into metamask... no?
estimategas returns errors, gas
, where gas will be an integer we can use to do this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is actually really important for making new issue submissions as cheap as possible gas-wise.
if(localStorage['issueURL']){ | ||
$('input[name=issueURL]').val(localStorage['issueURL']); | ||
} | ||
// if(localStorage['issueURL']){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id love to get this uncommented out and then reissue the fetchTitle()
and related calls IFF (localStorage['issueURL']
is not falsy
closing this as it's been moved over to standard_bounties_integration |
https://github.com/gitcoinco/web/tree/standard_bounties_integration Is there any PR for tracking what's left? |
@abitrolly we are tracking the remainder of the project here => https://github.com/gitcoinco/web/projects/1 |
👍 Is there any way to subscribe for updates? |
@abitrolly You can track changes at: #240 |
Description
This is a continuation of PR #48. This PR will be updated with new information going forward.
Create new bounty
Create new bounty from Gitcoin, and then issue + activate it on the bounties network. If successful, this should show up in the BountiesFactory explorer.
Fulfill bounty
Standard Bounties has the ability for multiple people to submit work for a bounty. This functionality could be implemented in the Gitcoin interface or we can just use the bounties network.
Accept fulfillment
Acceptance can be from the creator. Adding an arbiter and transferring the bounty will be added in the future.
Kill Bounty
Bounties can be killed and funds can be clawed back in any stated except
accepted
.accepted
dead
, which is a bounty after it has been killedBonus Round
It would be nice if we could code into the bounty the ability to pay out the bounty automatically once the Github Pull Request is merged in.
Testing
These are the instructions to test out the integration of Gitcoin and Standard Bounties on the rinkeby network. It uses the Gitcoin Web App and the Bounties Factory App.
git clone [email protected]:jasonrhaas/web.git
git clone [email protected]:ConsenSys/BountiesFactory.git
cd BountiesFactory
npm install
npm start
. This should load up the Bounties Factory page. In metamask, make sure you switch to the rinkeby network.cd web
git checkout standard_bounties_integration
docker-compose pull && docker-compose up -d --build
. This will run the web app and the database inside docker containers.Funding a New Issue on GitCoin
Open up a new browser window and navigate to
localhost:8000/funding/new
Copy/Paste a github issue for funding, such as funded issue links are long and clunky #201
Click the Advanced drop down menu and make sure that the Title and Description are populated.
Click the Fund Issue button. A metamask popup should come up verifying that you want to make the transaction. Click Submit.
You will be directed to the Details page and you will see a blue banner until the transaction is confirmed on web3.
After you see the Github details on that page, go to
localhost:3000
(Bounties Network) and verify that the bounty has been posted.Fulfilling an issue on GitCoin
Navigate to
localhost:8000/explorer
and find the issue that you just posted.Notice that you are not able to "Fulfill" the issue since you are the one who posted it. Verify that is says Mine by the issue.
Switch to a different Rinkey Account in MetaMask.
Refresh the explorer page and click on the bounty we have been using.
Click the "Fulfill" button, and enter any appropriate fields such as
github username
Click the "Fulfill Bounty" button and do the metamask thing. You should be directed back to the details page.
Navigate again to
localhost:3000
and refresh the page.Click on your bounty, scroll down, and verify that you have submitted a Fulfillment from your other account.
Accepting Fulfillment via GitCoin
accepted
, and you should see the correct information in the details page.Killing a Bounty via GitCoin
Any bounty is "killable" in any state except for the
accepted
state.dead
and the funds have been returned to the issuer (you).🍰 👯