Template: https://github.com/thodges-gh/CL-EA-NodeJS-Template
githubUserId
: The GraphQL Node ID of the GitHub user trying to registerethAddress
: The ETH address the user wants to connect to (as a decimal representation)
{
"jobRunID": 0,
"data": {
"result": 'address name'
},
"result": 'address name',
"statusCode": 200
}
githubUserId
: The GraphQL Node ID of the GitHub user trying to claim the bountyissueId
: The GrapQL node ID of the issue
{
"jobRunID": 0,
"data": {
"result": true
},
"result": true,
"statusCode": 200
}
githubUserId
: The GraphQL Node ID of the GitHub userrepoOrgId
: The GrapQL node ID of the repository or organization
{
"jobRunID": 0,
"data": {
"result": true
},
"result": true,
"statusCode": 200
}
nodeId
: The GitHub GrapQL node IDnodeType
: The GitHub GrapQL node typenodePath
: The GitHub GrapQL node path
{
"jobRunID": 0,
"data": {
"node": {
"repository": {
"stargazers": {
"totalCount": 100
}
},
},
"result": 100
},
"result": 100,
"statusCode": 200
}
payment_to
: The repo, issue, or user you want to fund.ie: PatrickAlphaC
payment_from
: The Github user who is funding.ie: PatrickAlphaC
amount
: The amount of the current you want to send.ie: 1
currency
: The currency you want to send.ie: LINK
{
{"jobRunID":0,
"data":{
...
},
"result":756549810,
"statusCode":201}
}
GITHUB_PERSONAL_ACCESS_TOKEN=
MAX_PULL_REQUEST_MERGE_AGE=99999
TWITTER_API_KEY=
TWITTER_API_SECRET=
TWITTER_APP_ACCESS_TOKEN=
TWITTER_APP_SECRET=
TWITTER_APP_BEARER_TOKEN=
OCTOBAY_ORG=opintester
OCTOBAY_REPO=opintest
NOTIFICATIONS_ISSUE_NUMBER=1
OPIN_TOKEN=...
OPIN_USERNAME=...
Clone and install dependencies:
git clone https://github.com/octobay/chainlink-adapters octobay-chainlink-adapters
cd octobay-chainlink-adapters
yarn
Run the local tests:
yarn test
git pull
yarn
Check .env.sample
for possible new env vars you need to set.
Natively run the application (defaults to port 8080):
yarn start
# register
# Note that the ethAddress is passed as an integer.
curl -X POST -H "content-type:application/json" "http://localhost:8080/register" --data '{ "id": 0, "data": { "githubUserId": "MDQ6VXNlcjY3OTI1Nzg=", "ethAddress": "1234..." } }'
# claim
curl -X POST -H "content-type:application/json" "http://localhost:8080/claim" --data '{ "id": 0, "data": { "githubUserId": "MDQ6VXNlcjY3OTI1Nzg=", "issueId": "MDExOlB..." } }'
# graphql
curl -X POST -H "content-type:application/json" "http://localhost:8080/graphql" --data '{ "id": 0, "data": { "nodeId": "MDExOlB...", "nodeType": "Issue", "nodePath": "repository.stargazers.totalCount" } }'
# notify
curl -X POST -H "content-type:application/json" "http://localhost:8080/notify" --data '{ "id": 0, "data": { "payment_to":"PatrickAlphaC", "payment_from": "opintester", "amount": 1, "currency": "LINK" } }'