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

Data providers tests for Achainable, Nodereal, Discord, Litentry, and Twitter #2434

Merged
merged 70 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
dfb6095
revert data-provider-tests
0xverin Jan 15, 2024
d924341
fix CorePrimitivesIdentity imports
0xverin Jan 18, 2024
f09fef4
Restore the data-provider test.
0xverin Jan 24, 2024
cc54692
Merge branch 'dev' into vip3-vc-tests
0xverin Jan 24, 2024
5603473
remove vipp3 test file
0xverin Jan 24, 2024
f884970
debug vcPayloadJson
0xverin Jan 24, 2024
23e886c
refactor credential definitions
0xverin Jan 25, 2024
934de08
format
0xverin Jan 25, 2024
568f336
add event listening
0xverin Jan 25, 2024
c6504e2
complete vip3 tests
0xverin Jan 25, 2024
6738c79
fix vip3MembershipCardSliver
0xverin Jan 25, 2024
d2ec757
add to ci.yml
0xverin Jan 26, 2024
c654917
Merge branch 'dev' into vip3-vc-tests
0xverin Jan 26, 2024
e51c132
fix ci
0xverin Jan 26, 2024
248fb0a
extract and reuse function
0xverin Jan 26, 2024
ed722f2
test cli
0xverin Jan 26, 2024
41b613a
format
0xverin Jan 26, 2024
e5dd23b
remove client config
0xverin Jan 26, 2024
79feee1
format
0xverin Jan 26, 2024
4a945ee
random substrate wallet
0xverin Jan 26, 2024
f76265a
test client
0xverin Jan 26, 2024
24a4787
fix cli issue
0xverin Jan 26, 2024
9d37fc2
fix cli path
0xverin Jan 26, 2024
3b0d09c
Merge branch 'dev' into vip3-vc-tests
0xverin Jan 26, 2024
53843ae
env example
0xverin Jan 26, 2024
10292b5
debug local
0xverin Jan 26, 2024
fb88115
format
0xverin Jan 26, 2024
cd91504
fix cli path
0xverin Jan 26, 2024
1ffd66d
test mock address
0xverin Jan 26, 2024
70f825c
withdraw account test.
0xverin Jan 26, 2024
0411ac4
modefy into json file
0xverin Jan 29, 2024
a9e8e19
delete ts file
0xverin Jan 29, 2024
0376100
format
0xverin Jan 29, 2024
772fd21
Merge branch 'dev' into vip3-vc-tests
0xverin Jan 29, 2024
9de66fc
add achainable json
0xverin Jan 29, 2024
dfac634
improve logic
0xverin Jan 29, 2024
5da02c2
fix comments
0xverin Jan 30, 2024
190cac3
Merge branch 'vip3-vc-tests' into achainable-vc-tests
0xverin Jan 30, 2024
dd86c4f
Merge branch 'dev' into achainable-vc-tests
0xverin Jan 30, 2024
519657e
complete achainable test
0xverin Jan 30, 2024
07be764
step description
0xverin Jan 30, 2024
405c4a9
test token-holding-amount-amp
0xverin Jan 30, 2024
d2208f0
Merge branch 'dev' into achainable-vc-tests
0xverin Jan 30, 2024
18aee66
add litentry spaceId discord
0xverin Jan 30, 2024
86d3903
add twitter
0xverin Jan 30, 2024
9545897
f ix ndoereal tests
0xverin Jan 31, 2024
66e7d4b
add matic
0xverin Jan 31, 2024
359c89e
Json data Integration Testing
0xverin Jan 31, 2024
d466bb1
Merge branch 'dev' into achainable-vc-tests
0xverin Jan 31, 2024
ee7e71d
assert desc
0xverin Feb 1, 2024
75b747f
add yml
0xverin Feb 1, 2024
7f01fac
add GHA for data-provider-tests
0xverin Feb 1, 2024
ac80b20
add shell
0xverin Feb 1, 2024
97a104d
chmod shell
0xverin Feb 1, 2024
e6dc020
add agrument
0xverin Feb 1, 2024
8d0c473
fix shell
0xverin Feb 1, 2024
52131b2
rename
0xverin Feb 1, 2024
bc338b3
add dc account
0xverin Feb 1, 2024
0e73614
fix bab
0xverin Feb 1, 2024
bab2a43
fix yml
0xverin Feb 1, 2024
eb1dd48
format
0xverin Feb 1, 2024
85e12c9
remove Mirror
0xverin Feb 1, 2024
9605d15
Merge branch 'dev' into achainable-vc-tests
0xverin Feb 1, 2024
2bac241
fix typo
0xverin Feb 1, 2024
8e99ae5
order of json
0xverin Feb 2, 2024
9d4aa80
remove A20 from ci.yml
0xverin Feb 2, 2024
b46cdae
rebase A20 test
0xverin Feb 2, 2024
5315701
Merge branch 'dev' into achainable-vc-tests
kziemianek Feb 2, 2024
2c5a745
Merge branch 'dev' into achainable-vc-tests
0xverin Feb 5, 2024
d73f93d
Merge branch 'dev' into achainable-vc-tests
0xverin Feb 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ jobs:
- name: bitacross-worker enclave-runtime fmt check
working-directory: ./bitacross-worker/enclave-runtime
run: |
cargo fmt --all -- --check
cargo fmt --all -- --check

- name: Enable corepack and pnpm
run: corepack enable && corepack enable pnpm
Expand Down Expand Up @@ -311,7 +311,7 @@ jobs:
- set-condition
- sequentialise
if: needs.set-condition.outputs.rebuild_bitacross == 'true'
# todo: we might want to change this image in the future
# todo: we might want to change this image in the future
container: "litentry/litentry-tee-dev:latest"
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -705,7 +705,6 @@ jobs:
- test_name: lit-parentchain-nonce
- test_name: lit-ii-batch-test
- test_name: lit-test-stress-script
- test_name: lit-data-providers-test
steps:
- uses: actions/checkout@v4

Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/verify-correctness-of-vc-content-.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Verify the correctness of VC content

on:
workflow_dispatch:
inputs:
docker-tag:
description: "client tag(e.g. p1.2.0-9701-w0.0.1-101)"
required: true
default: "latest"
jobs:
test-data-provider:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set ENV
run: |
# extracting parachain version and worker version from release tag
echo "PARACHAIN_TAG=$(echo ${{inputs.docker-tag}} | sed 's/p/v/;s/\(.*\)-w.*/\1/')" >> $GITHUB_ENV
echo "WORKER_TAG=$(echo ${{inputs.docker-tag}} | sed 's/.*\(w.*\)/\1/;s/w/v/')" >> $GITHUB_ENV

- name: Pull litentry image optionally
run: |
docker pull parity/polkadot
docker pull litentry/litentry-worker:$WORKER_TAG
docker pull litentry/litentry-cli:$WORKER_TAG
docker pull litentry/litentry-parachain:$PARACHAIN_TAG

- name: Re-tag docker image
run: |
docker tag litentry/litentry-worker:$WORKER_TAG litentry/litentry-worker:latest
docker tag litentry/litentry-cli:$WORKER_TAG litentry/litentry-cli:latest
docker tag litentry/litentry-parachain:$PARACHAIN_TAG litentry/litentry-parachain:latest

- run: docker images --all

- name: Enable corepack and pnpm
run: corepack enable && corepack enable pnpm

- name: Generate parachain artefacts
run: |
./tee-worker/scripts/litentry/generate_parachain_artefacts.sh

- name: Build litentry parachain docker images
run: |
cd tee-worker/docker
docker compose -f litentry-parachain.build.yml build

- name: Run data-provider-test
run: |
cd tee-worker/docker
docker compose -f docker-compose.yml -f lit-data-provider-test.yml up --no-build --exit-code-from lit-data-provider-test lit-data-provider-test

- name: Stop docker containers
run: |
cd tee-worker/docker
docker compose -f docker-compose.yml -f lit-data-provider-test.yml stop

- name: Collect Docker Logs
continue-on-error: true
if: always()
uses: jwalton/gh-docker-logs@v2
with:
tail: all
dest: logs

- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: logs-lit-data-provider-test
path: logs
if-no-files-found: ignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
lit-data-providers-test:
lit-data-provider-test:
image: litentry/litentry-cli:latest
container_name: litentry-data-providers-test
container_name: litentry-data-provider-test
volumes:
- ../ts-tests:/ts-tests
- ../client-api:/client-api
Expand All @@ -17,7 +17,7 @@ services:
condition: service_healthy
networks:
- litentry-test-network
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_integration_test.sh test-data-providers 2>&1' "
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_integration_test.sh test-data-provider 2>&1' "
restart: "no"
networks:
litentry-test-network:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
[
{
"id": "bab-holder",
"name": "Trustworthy Binance user",
"description": "You are holding a Binance Account Bound(BAB) token",
"assertion": {
"id": "Achainable",
"payload": {
"Basic": {
"name": "BAB token holder",
"chain": "Bsc"
}
}
},
"dataProvider": "achainable",
"network": "ethereum",
"mockDid": "litentry:evm:0xdB01C6a38E780a2644b3B26961b14313b019714a",
"mockWeb3Network": "bsc,ethereum",
"expectedCredentialValue": true
},
{
"id": "uniswap-v2-v3-user",
"name": "Uniswap V2/V3 User",
"description": "You are a trader or liquidity provider of Uniswap V2 or V3\nUniswap V2 Factory Contract: 0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f\nUniswap V3 Factory Contract: 0x1f98431c8ad98523631ae4a59f267346ea31f984",
"assertion": {
"id": "Achainable",
"payload": {
"Basic": {
"name": "Uniswap V2/V3 user",
"chain": "Ethereum"
}
}
},
"dataProvider": "achainable",
"network": "ethereum",
"mockDid": "litentry:evm:0x7031a420603a83EFBE85503e5A4BF562121A85ab",
"mockWeb3Network": "bsc,ethereum",
"expectedCredentialValue": true
},
{
"id": "dot-holder",
"name": "DOT Holding Time",
"description": "The length of time a user continues to hold DOT token (threshold DOT > 5)",
"assertion": {
"id": "A7",
"payload": "5"
},
"dataProvider": "achainable",
"network": "polkadot",
"mockDid": "litentry:substrate:0xbf6e312fd006908b0152da113ec73b9ffc9983f9b848698180b9b43c5ad44681",
"mockWeb3Network": "litentry,polkadot",
"expectedCredentialValue": true
},
{
"id": "eth-holder",
"name": "ETH Holding Time",
"description": "The length of time a user continues to hold ETH token (threshold ETH > 0.01)",
"assertion": {
"id": "A11",
"payload": "0.01"
},
"dataProvider": "achainable",
"network": "ethereum",
"mockDid": "litentry:evm:0x6887246668a3b87F54DeB3b94Ba47a6f63F32985",
"mockWeb3Network": "bsc,ethereum",
"expectedCredentialValue": false
},
{
"id": "wbtc-holder",
"name": "WBTC Holding Time",
"description": "The length of time a user continues to hold WBTC token (threshold WBTC > 0.001)",
"assertion": {
"id": "A10",
"payload": 0.001
},
"dataProvider": "achainable",
"network": "ethereum",
"mockDid": "litentry:evm:0x5680b3FcBB64FB161adbD347BC92e8DDEDA97008",
"mockWeb3Network": "bsc,ethereum",
"expectedCredentialValue": true
},
{
"id": "lit-holder",
"name": "LIT Holding Time",
"description": "The length of time a user continues to hold LIT token (threshold LIT > 10)",
"assertion": {
"id": "A4",
"payload": "10"
},
"dataProvider": "achainable",
"network": "litentry",
"mockDid": "litentry:substrate:0x6c7fdb8b8eaad1af9faaf918493606e1a3e8c20f9d852773ab5ebfbb93bd1948",
"mockWeb3Network": "litentry,polkadot",
"expectedCredentialValue": true
},
{
"id": "ethereum-account-class-of-year",
"name": "Ethereum Account Class of Year",
"description": "The class of year that your Ethereum account was created (must have on-chain records)",
"assertion": {
"id": "achainable",
"payload": {
"ClassOfYear": {
"name": "Account created between {dates}",
"chain": "Ethereum"
}
}
},
"dataProvider": "achainable",
"network": "ethereum",
"mockDid": "litentry:evm:0x3D66aF7cBeb2d9c6b4497a2269F7e3fcd9996524",
"mockWeb3Network": "bsc,ethereum",
"expectedCredentialValue": true
},
{
"id": "evm-transaction-count",
"name": "ETH Transaction Count",
"description": "Your total transaction amount on these EVM networks: Ethereum",
"assertion": {
"id": "A8",
"payload": ["Ethereum"]
},
"dataProvider": "achainable",
"network": "ethereum",
"mockDid": "litentry:evm:0xb144EeFd29B2E448419fd8dD6Cd6c7EB258D4715",
"mockWeb3Network": "bsc,ethereum",
"expectedCredentialValue": false
},
{
"id": "litentry-transaction-count",
"name": "LIT Transaction Count",
"description": "Your total transaction amount on these Substrate networks: Litentry, Litmus, Ethereum.",
"assertion": {
"id": "A8",
"payload": ["Litentry", "Litmus", "Ethereum"]
},
"dataProvider": "achainable",
"network": "litentry",
"mockDid": "litentry:substrate:0xcacb83fc3d36caa4d03a80c0669aa19b38ffd1a9bb54d78b719fac1942816b40",
"mockWeb3Network": "litentry,polkadot",
"expectedCredentialValue": true
},
{
"id": "polkadot-governance-participation",
"name": "Polkadot Governance Participation Proof",
"description": "You have ever participated in any Polkadot on-chain governance events. This credential is counting: Technical Committee Proposals, Democracy Proposals, Council Proposals, Proposal Seconds, Proposal Votes, Democracy Votes, Council Votes, Treasury Spend Proposals.",
"assertion": {
"id": "A14",
"payload": []
},
"dataProvider": "achainable",
"network": "litentry",
"mockDid": "litentry:substrate:0x5FeEE1E799015A22EbD216d43484FCB3BA88de20",
"mockWeb3Network": "litentry,polkadot",
"expectedCredentialValue": true
},
{
"id": "contract-creator",
"name": "Ethereum Contract Creator",
"description": "You are a deployer of a smart contract on these networks: Ethereum",
"assertion": {
"id": "Achainable",
"payload": {
"Amount": {
"name": "Created over {amount} contracts",
"chain": "Ethereum",
"amount": "0"
}
}
},
"dataProvider": "achainable",
"network": "ethereum",
"mockDid": "litentry:evm:0x11fBffc1F3dF23E7219e2B3036fe2A12C10cD3AD",
"mockWeb3Network": "bsc,ethereum",
"expectedCredentialValue": true
},
{
"id": "token-holder-dot",
"name": "DOT Holder",
"description": "The number of DOT tokens you hold > 0",
"assertion": {
"id": "Achainable",
"payload": {
"Amount": {
"name": "Balance over {amount}",
"chain": "Polkadot",
"amount": "0"
}
}
},
"dataProvider": "achainable",
"network": "litentry",
"mockDid": "litentry:substrate:0x0d584a4cbbfd9a4878d816512894e65918e54fae13df39a6f520fc90caea2fb0",
"mockWeb3Network": "litentry,polkadot",
"expectedCredentialValue": true
},
{
"id": "token-holder-eth",
"name": "ETH Holder",
"description": "The number of ETH tokens you hold > 0",
"assertion": {
"id": "Achainable",
"payload": {
"Amount": {
"name": "Balance over {amount}",
"chain": "Ethereum",
"amount": "0"
}
}
},
"dataProvider": "achainable",
"network": "litentry",
"mockDid": "litentry:evm:0x66485bB62896Bd7bE54dE8E2050cc8746a50E0b2",
"mockWeb3Network": "bsc,ethereum",
"expectedCredentialValue": true
},
{
"id": "token-holder-lit",
"name": "LIT Holder",
"description": "The number of LIT tokens you hold > 0",
"assertion": {
"id": "Achainable",
"payload": {
"Amount": {
"name": "Balance over {amount}",
"chain": "Litentry",
"amount": "0"
}
}
},
"dataProvider": "achainable",
"network": "litentry",
"mockDid": "litentry:substrate:0xc0103c4b56ce752d05b16a88260e3a9e2c44306602a74c5edd1cd4ff56356f7c",
"mockWeb3Network": "litentry,polkadot",
"expectedCredentialValue": true
},
{
"id": "token-holding-amount-btcs",
"name": "BTCS Holding Time",
"description": "The number of BTCS tokens you hold > 0",
"assertion": {
"id": "Brc20AmountHolder",
"payload": []
},
"dataProvider": "achainable",
"network": "litentry",
"mockDid": "litentry:bitcoin:0x030b0998ea7d5052e3016bd8c83f920f452f6102c06e91a2880556b91db68bce90",
"mockWeb3Network": "BitcoinP2tr",
"expectedCredentialValue": null
}
]
Loading