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

zcash integration #7487

Merged
merged 44 commits into from
Oct 22, 2020
Merged

zcash integration #7487

merged 44 commits into from
Oct 22, 2020

Conversation

thelostone-mc
Copy link
Member

@thelostone-mc thelostone-mc commented Sep 21, 2020

Description
  • migrate /new to vue with validation checks
  • hide zcash grant behind admin flag
  • remove dead code
  • build foundation for txn explorer base
  • wire in zcash contribution sync
  • new endpoint for cross chain contributions

Endpoint:
POST localhost:8000/grants/v1/api/contribute

{
    "contributions": [
        {
            "grant_id": 1387,
            "contributor_address": "t1ZDfyfwNkyhYzQiRF7iE3wiob1vMp2VR1D",
            "token_symbol": "ZEC",
            "tenant": "ZCASH",
            "comment": "hi this will not pass",
            "amount_per_period": "2",
        },
        {
            "grant_id": 1386,
            "contributor_address": "t1ZDfyfwNkyhYzQiRF7iE3wiob1vMp2VR1D",
            "token_symbol": "ZEC",
            "tenant": "ZCASH",
            "comment": "hi this will pass works.",
            "amount_per_period": "0.2"
        },
       {
            "grant_id": 1388,
            "contributor_address": "t1ZDfyfwNkyhYzQiRF7iE3wiob1vMp2VR1D",
            "token_symbol": "ZEC",
            "tenant": "ZCASH",
            "comment": "hi this will pass works.",
            "amount_per_period": "0.2",
            "tx_id" : "ac470156cad45583b1a887d84a8cf3577014b1c85b9e40509ba109c85936d53c" # optional 
        }
    ]
}
Refers/Fixes
  • PR should not break existing grants flow
  • None of the new features added for cross chain would be visible to the end user until the other pieces are built out
Note

TokenName: ZEC
Decimals: 8
ChainId: (NA ?)
Address: (NA ?)

BUGS

  • add multiple team members doesn't work in creation

Pending

  • Adding to sidecart with ZEC tokens
  • view checkout with ZEC grants + and checkout

@thelostone-mc thelostone-mc changed the title Zcash zcash integration Sep 21, 2020
@thelostone-mc thelostone-mc force-pushed the zcash branch 4 times, most recently from f736ac3 to 308023a Compare September 22, 2020 08:00
@thelostone-mc thelostone-mc force-pushed the zcash branch 3 times, most recently from bff0faa to 0d3f777 Compare September 28, 2020 05:24
- migrate new to vue + add zcash support
- update details view
- backend wiring
@thelostone-mc
Copy link
Member Author

If all contributions are successful

Response
{
    "status": 204,
    "success_contributions": [1387, 1386, 1388],
   "message": "grant contributions recorded"
}

If mandatory param is missing in any of them

Response
{
    "status": 400,
   "success_contributions": [1388],
    "invalid_contributions": [
        {
            "grant_id": 1387,
            "message": "error: token_symbol is mandatory param"
        },
        {
            "grant_id": 1386,
            "message": "error: contributor_address is mandatory param"
        }
    ],
    "failed_contributions": []
}

If a 500 happens while processing 1 contribution

Response
{
    "status": 500,
   "success_contributions": [1386],
    "failed_contributions": [
        {
            "grant_id": 1387,
            "message": "grant contribution not recorded",
            "error": <str>
        },

    ],
    "invalid_contributions": []
}

@octavioamu octavioamu marked this pull request as ready for review October 21, 2020 23:21
@octavioamu octavioamu changed the base branch from master to stable October 21, 2020 23:22
@octavioamu octavioamu merged commit ed55611 into stable Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants