Skip to content
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

GITC-112: tezos crosschain | bounties/hackathons #9182

Merged
merged 21 commits into from
Jul 1, 2021

Conversation

chibie
Copy link
Contributor

@chibie chibie commented Jun 22, 2021

Description

Integrate Tezos chain into Gitcoin platform so that users would be allowed to use XTZ for bounties and hackathons

Bounties Integration

Frontend

  • Add chain to bounty creation + hack form form (staff flag)
  • Funder should be able to create bounty with tezos
  • User should be able to start / stop / submit work with tezos
  • Funder should be able to payout using Beacon wallet

Backend

  • Add in chain sync logic
  • Update cron to retry pending txn
  • Testing

Refers/Fixes

closes #8995

Testing

create bounty, start/submit work - https://www.loom.com/share/9007ec9dca534e4fbd42376238241c62
payout bounty / verify transaction - https://www.loom.com/share/ebd24255e88e4edbab906d44d883a864

@thelostone-mc thelostone-mc added this to Engineering-Review in PR Review Board Jun 28, 2021
@thelostone-mc thelostone-mc moved this from Engineering-Review to Waiting on contributor in PR Review Board Jun 28, 2021
@chibie chibie moved this from Waiting on contributor to Engineering-Review in PR Review Board Jun 28, 2021
@chibie chibie changed the title tezos crosschain | bounties/hackathons GITC-112: tezos crosschain | bounties/hackathons Jun 29, 2021
@@ -32,10 +32,10 @@ const makeMenu = (navbarEl) => {
};

// pull computedRootStyles from shared.js or compute here
const computedRootStyles = (window.hasOwnProperty('computedRootStyles') ? window.computedRootStyles : getComputedStyle(document.documentElement));
const computedRootStyles = (Object.prototype.hasOwnProperty.call(window, 'computedRootStyles') ? window.computedRootStyles : getComputedStyle(document.documentElement));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this needed? I think this will break the nav as I remember @gdixon doing some changes to window instead because the bundle.
Anyway not sure this should be part of this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@octavioamu i was unable to push cause of eslint pre-commit hook... it kept throwing an error and that was the fix

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok now is fixed on stable and master, just fixed the conflicts on this one also.

Copy link
Contributor

@octavioamu octavioamu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good Chibie, left a few comments, let me know if need clarifications on something.

Comment on lines +53 to +58
payout_type: 'tezos_ext',
tenant: 'TEZOS',
amount: amount,
token_name: token_name,
funder_address: from_address,
payout_tx_id: txn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are some variables not sure where are defined as are not function parameters. As I understand there is a mistake and amount need to be txn.amount for example, but not 100% suer as don't know what wallet.sendO... returns

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@octavioamu amount and token_name vars are defined in L3 & L4 respectively

app/assets/v2/js/pages/bounty_details2.js Show resolved Hide resolved
app/assets/v2/js/pages/fulfill_bounty/index.js Outdated Show resolved Hide resolved
app/assets/v2/js/pages/new_bounty.js Show resolved Hide resolved
Comment on lines +134 to +135
if (!isNervosValid && !vm.form.funderAddress.toLowerCase().startsWith('0x')) {
isValid = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this still confused me, didn't test but I believe will be always false as first is checking ckb at the first part of the string

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed here #9182 (comment)

fulfillment.payout_status = 'done'
fulfillment.accepted_on = timezone.now()
fulfillment.accepted = True
record_payout_activity(fulfillment)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider: celery task for this

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm maybe when we refactor em all ! right now this barely takes time

@thelostone-mc thelostone-mc merged commit 8a534c4 into master Jul 1, 2021
PR Review Board automation moved this from Engineering-Review to Done Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

gpg - crosschain/tezos/bounties
4 participants