diff --git a/e2e-tests/endpoints/kusama/index.ts b/e2e-tests/endpoints/kusama/index.ts index cfca2a334..789c39e92 100644 --- a/e2e-tests/endpoints/kusama/index.ts +++ b/e2e-tests/endpoints/kusama/index.ts @@ -1,9 +1,11 @@ import { kusamaAccountsEndpoints } from './accounts'; import { kusamaBlockEndpoints } from './blocks'; +import { kusamaParasEndpoints } from './paras'; import { kusamaRuntimeEndpoints } from './runtime'; export const kusamaEndpoints = { blocks: kusamaBlockEndpoints, accounts: kusamaAccountsEndpoints, + paras: kusamaParasEndpoints, runtime: kusamaRuntimeEndpoints, }; diff --git a/e2e-tests/endpoints/kusama/paras/auctions-current/8400000.json b/e2e-tests/endpoints/kusama/paras/auctions-current/8400000.json new file mode 100644 index 000000000..640602063 --- /dev/null +++ b/e2e-tests/endpoints/kusama/paras/auctions-current/8400000.json @@ -0,0 +1,21 @@ +{ + "at": { + "hash": "0xd04190fb7b5e6ad66b7f5e218f41a3706fd19426ae9176fee64c777a232a1030", + "height": "8400000" + }, + "beginEnd": "8351750", + "finishEnd": "8423750", + "phase": "endPeriod", + "auctionIndex": "5", + "leasePeriods": [ + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20" + ], + "winning": null +} diff --git a/e2e-tests/endpoints/kusama/paras/auctions-current/9828507.json b/e2e-tests/endpoints/kusama/paras/auctions-current/9828507.json new file mode 100644 index 000000000..efb6d8c2e --- /dev/null +++ b/e2e-tests/endpoints/kusama/paras/auctions-current/9828507.json @@ -0,0 +1,21 @@ +{ + "at": { + "hash": "0x0d3f41f12acb57a080f7907fc03b5ff99d7cbc1c1a7302f69f2830a38c9c68bb", + "height": "9828507" + }, + "beginEnd": "9833873", + "finishEnd": "9905873", + "phase": "startPeriod", + "auctionIndex": "12", + "leasePeriods": [ + "17", + "18", + "19", + "20", + "21", + "22", + "23", + "24" + ], + "winning": null +} diff --git a/e2e-tests/endpoints/kusama/paras/auctions-current/index.ts b/e2e-tests/endpoints/kusama/paras/auctions-current/index.ts new file mode 100644 index 000000000..59288eedd --- /dev/null +++ b/e2e-tests/endpoints/kusama/paras/auctions-current/index.ts @@ -0,0 +1,13 @@ +import parasAuctionsCurrent8400000 from './8400000.json'; +import parasAuctionsCurrent9828507 from './9828507.json'; + +export const parasAuctionsCurrentEndpoints = [ + [ + '/experimental/paras/auctions/current?at=8400000', + JSON.stringify(parasAuctionsCurrent8400000), + ], + [ + '/experimental/paras/auctions/current?at=9828507', + JSON.stringify(parasAuctionsCurrent9828507), + ], +]; diff --git a/e2e-tests/endpoints/kusama/paras/crowdloan-info/8367200.json b/e2e-tests/endpoints/kusama/paras/crowdloan-info/8367200.json new file mode 100644 index 000000000..d3aa08fa7 --- /dev/null +++ b/e2e-tests/endpoints/kusama/paras/crowdloan-info/8367200.json @@ -0,0 +1,32 @@ +{ + "at": { + "hash": "0xae928763687168ef54906f186f76d4e45b6f47e94406c07e3bf9e3013651a4be", + "height": "8367200" + }, + "fundInfo": { + "depositor": "FFuCbRwsDTkj1cc2w6dvBmXvumyoZR6QgfAv1LwL3kBgmbX", + "verifier": { + "sr25519": "0x6c79c2c862124697baf6d0562055a50f3b0eac3c895c23bb16e8d1e2da341549" + }, + "deposit": "9999999900000", + "raised": "205935011120809976", + "end": "8467200", + "cap": "1000000000000000000", + "lastContribution": { + "ending": "8123536" + }, + "firstPeriod": "13", + "lastPeriod": "20", + "trieIndex": "2" + }, + "leasePeriods": [ + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20" + ] +} diff --git a/e2e-tests/endpoints/kusama/paras/crowdloan-info/9000000.json b/e2e-tests/endpoints/kusama/paras/crowdloan-info/9000000.json new file mode 100644 index 000000000..ddf84e8fc --- /dev/null +++ b/e2e-tests/endpoints/kusama/paras/crowdloan-info/9000000.json @@ -0,0 +1,30 @@ +{ + "at": { + "hash": "0x4cead84882586ab41fc299d10e1a873cd19aeb3c9cf3dda2e663f183bef030ab", + "height": "9000000" + }, + "fundInfo": { + "depositor": "Eo2YWNA49Uhqu3rVawFUjhm19H72XeuNinmAHBGbKpHasNH", + "verifier": null, + "deposit": "9999999900000", + "raised": "0", + "end": "8467200", + "cap": "135000000000000000", + "lastContribution": { + "preEnding": "43" + }, + "firstPeriod": "13", + "lastPeriod": "20", + "trieIndex": "12" + }, + "leasePeriods": [ + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20" + ] +} diff --git a/e2e-tests/endpoints/kusama/paras/crowdloan-info/9810000.json b/e2e-tests/endpoints/kusama/paras/crowdloan-info/9810000.json new file mode 100644 index 000000000..0447e12ca --- /dev/null +++ b/e2e-tests/endpoints/kusama/paras/crowdloan-info/9810000.json @@ -0,0 +1,30 @@ +{ + "at": { + "hash": "0x6eb8910da088f091e43cb31489bdb2a6980a02d88b95313266135244408aa682", + "height": "9810000" + }, + "fundInfo": { + "depositor": "Eo2YWNA49Uhqu3rVawFUjhm19H72XeuNinmAHBGbKpHasNH", + "verifier": null, + "deposit": "9999999900000", + "raised": "1706827230863411", + "end": "10113719", + "cap": "42000000000000000000", + "lastContribution": { + "preEnding": "49" + }, + "firstPeriod": "17", + "lastPeriod": "24", + "trieIndex": "41" + }, + "leasePeriods": [ + "17", + "18", + "19", + "20", + "21", + "22", + "23", + "24" + ] +} diff --git a/e2e-tests/endpoints/kusama/paras/crowdloan-info/index.ts b/e2e-tests/endpoints/kusama/paras/crowdloan-info/index.ts new file mode 100644 index 000000000..6afcb7040 --- /dev/null +++ b/e2e-tests/endpoints/kusama/paras/crowdloan-info/index.ts @@ -0,0 +1,18 @@ +import parasCrowdloanInfo8367200 from './8367200.json'; +import parasCrowdloanInfo9000000 from './9000000.json'; +import parasCrowdloanInfo9810000 from './9810000.json'; + +export const parasCrowdloanInfoEndpoints = [ + [ + '/experimental/paras/2023/crowdloan-info?at=8367200', + JSON.stringify(parasCrowdloanInfo8367200), + ], + [ + '/experimental/paras/2077/crowdloan-info?at=9000000', + JSON.stringify(parasCrowdloanInfo9000000), + ], + [ + '/experimental/paras/2077/crowdloan-info?at=9810000', + JSON.stringify(parasCrowdloanInfo9810000), + ], +]; diff --git a/e2e-tests/endpoints/kusama/paras/crowdloans/8200000.json b/e2e-tests/endpoints/kusama/paras/crowdloans/8200000.json new file mode 100644 index 000000000..63bd22989 --- /dev/null +++ b/e2e-tests/endpoints/kusama/paras/crowdloans/8200000.json @@ -0,0 +1,265 @@ +{ + "at": { + "hash": "0x6cdf2b4c9d7aa5e5f0a6217def7ca53b46691300853f40b3be4e5d9df36f0044", + "height": "8200000" + }, + "funds": [ + { + "paraId": "2009", + "fundInfo": { + "depositor": "Hss64YRSDjDAbikNatbaQJeq1kCa7Dc6SrDhtW8zah4eKS8", + "verifier": null, + "deposit": "9999999900000", + "raised": "17556246303864331", + "end": "8467200", + "cap": "1000000000000000000", + "lastContribution": { + "ending": "8199559" + }, + "firstPeriod": "13", + "lastPeriod": "20", + "trieIndex": "4" + } + }, + { + "paraId": "2021", + "fundInfo": { + "depositor": "EmKDCmxqHbmY4fsNSvM1fWX1z3jSGYKEekxtBqFsxzHW96E", + "verifier": null, + "deposit": "9999999900000", + "raised": "8838989728440653", + "end": "8467200", + "cap": "200000000000000000", + "lastContribution": { + "ending": "8199901" + }, + "firstPeriod": "13", + "lastPeriod": "20", + "trieIndex": "13" + } + }, + { + "paraId": "2001", + "fundInfo": { + "depositor": "GLiebiQp5f6G5vNcc7BgRE9T3hrZSYDwP6evERn3hEczdaM", + "verifier": null, + "deposit": "9999999900000", + "raised": "34348017193957943", + "end": "8467200", + "cap": "1000000000000000000", + "lastContribution": { + "ending": "8199973" + }, + "firstPeriod": "13", + "lastPeriod": "20", + "trieIndex": "9" + } + }, + { + "paraId": "2008", + "fundInfo": { + "depositor": "FPjQ5Rb5cdyt1LXXTrRwMFbXmf3pTca8XHtdZwaLrtjfMTy", + "verifier": null, + "deposit": "9999999900000", + "raised": "137110998999000", + "end": "8467200", + "cap": "1000000000000000000", + "lastContribution": { + "ending": "8191400" + }, + "firstPeriod": "13", + "lastPeriod": "20", + "trieIndex": "10" + } + }, + { + "paraId": "2000", + "fundInfo": { + "depositor": "Gq2No2gcF6s4DLfzzuB53G5opWCoCtK9tZeVGRGcmkSDGoK", + "verifier": null, + "deposit": "9999999900000", + "raised": "501137661910050505", + "end": "8467200", + "cap": "1500000000000000000", + "lastContribution": { + "preEnding": "20" + }, + "firstPeriod": "13", + "lastPeriod": "20", + "trieIndex": "1" + } + }, + { + "paraId": "2077", + "fundInfo": { + "depositor": "Eo2YWNA49Uhqu3rVawFUjhm19H72XeuNinmAHBGbKpHasNH", + "verifier": null, + "deposit": "9999999900000", + "raised": "7393449309369177", + "end": "8467200", + "cap": "135000000000000000", + "lastContribution": { + "ending": "8199980" + }, + "firstPeriod": "13", + "lastPeriod": "20", + "trieIndex": "12" + } + }, + { + "paraId": "2024", + "fundInfo": { + "depositor": "G5PCG13D3dGMaak3GuPAFw5TW3B9nNiWNpzZE8Rp5g4WDzc", + "verifier": null, + "deposit": "9999999900000", + "raised": "4752991753783741", + "end": "8467200", + "cap": "1000000000000000000", + "lastContribution": { + "ending": "8199708" + }, + "firstPeriod": "13", + "lastPeriod": "20", + "trieIndex": "11" + } + }, + { + "paraId": "2018", + "fundInfo": { + "depositor": "J1JkbmLGaGz69VADfbtZubFE5dtYxNRhn6HNYz6VV1Vk5PM", + "verifier": null, + "deposit": "9999999900000", + "raised": "278759999995000", + "end": "8467200", + "cap": "1000000000000000000", + "lastContribution": { + "ending": "8196573" + }, + "firstPeriod": "13", + "lastPeriod": "20", + "trieIndex": "8" + } + }, + { + "paraId": "2004", + "fundInfo": { + "depositor": "DaEJPYPCJQnKeHGfV6SSF8WPWtLg9zggbWwAwCZRWVPeWvv", + "verifier": null, + "deposit": "9999999900000", + "raised": "40619141528745618", + "end": "8467200", + "cap": "1000000000000000000", + "lastContribution": { + "ending": "8199973" + }, + "firstPeriod": "13", + "lastPeriod": "20", + "trieIndex": "6" + } + }, + { + "paraId": "2019", + "fundInfo": { + "depositor": "Eax1EEpQt2yhEACJcY8gXA55YEKyQFp5pdYdTt9AeymyqBB", + "verifier": null, + "deposit": "9999999900000", + "raised": "1100000000000", + "end": "8467200", + "cap": "1000000000000000000", + "lastContribution": { + "ending": "8199976" + }, + "firstPeriod": "13", + "lastPeriod": "20", + "trieIndex": "14" + } + }, + { + "paraId": "2007", + "fundInfo": { + "depositor": "Ekf4HssuTpYjmUEvzy9AAFuqpUcNm9AAkrMF1stTU6Mo1hR", + "verifier": null, + "deposit": "9999999900000", + "raised": "136020871615303070", + "end": "8467200", + "cap": "1000000000000000000", + "lastContribution": { + "ending": "8199997" + }, + "firstPeriod": "13", + "lastPeriod": "20", + "trieIndex": "0" + } + }, + { + "paraId": "2016", + "fundInfo": { + "depositor": "DPpEXDQVyLxN1Qprq3aEcyaBP7jvcaGdo2ts6nfo7wHAgFm", + "verifier": null, + "deposit": "9999999900000", + "raised": "4379935461196055", + "end": "8467200", + "cap": "1000000000000000000", + "lastContribution": { + "ending": "8197824" + }, + "firstPeriod": "13", + "lastPeriod": "20", + "trieIndex": "7" + } + }, + { + "paraId": "2023", + "fundInfo": { + "depositor": "FFuCbRwsDTkj1cc2w6dvBmXvumyoZR6QgfAv1LwL3kBgmbX", + "verifier": { + "sr25519": "0x6c79c2c862124697baf6d0562055a50f3b0eac3c895c23bb16e8d1e2da341549" + }, + "deposit": "9999999900000", + "raised": "205935011120809976", + "end": "8467200", + "cap": "1000000000000000000", + "lastContribution": { + "ending": "8123536" + }, + "firstPeriod": "13", + "lastPeriod": "20", + "trieIndex": "2" + } + }, + { + "paraId": "2012", + "fundInfo": { + "depositor": "F2fjhcks69mYK7QuMp2AgCEcZbYzpH82cvk8FcDeCfXXF6P", + "verifier": null, + "deposit": "9999999900000", + "raised": "6943540883090060", + "end": "8467200", + "cap": "1000000000000000000", + "lastContribution": { + "ending": "8195465" + }, + "firstPeriod": "13", + "lastPeriod": "20", + "trieIndex": "3" + } + }, + { + "paraId": "2006", + "fundInfo": { + "depositor": "CoxPmsXK24q3QB6jHSxwTxEHJ5375Mo4kPfUZYfKQMxXqZ9", + "verifier": null, + "deposit": "9999999900000", + "raised": "2797610958211726", + "end": "8467200", + "cap": "1000000000000000000", + "lastContribution": { + "ending": "8199300" + }, + "firstPeriod": "13", + "lastPeriod": "20", + "trieIndex": "5" + } + } + ] +} diff --git a/e2e-tests/endpoints/kusama/paras/crowdloans/9800000.json b/e2e-tests/endpoints/kusama/paras/crowdloans/9800000.json new file mode 100644 index 000000000..7e41620e4 --- /dev/null +++ b/e2e-tests/endpoints/kusama/paras/crowdloans/9800000.json @@ -0,0 +1,282 @@ +{ + "at": { + "hash": "0x5f22672199192356a85649e5d803d72d98ae5b9dcce0bdd3fc2f5eedef39a546", + "height": "9800000" + }, + "funds": [ + { + "paraId": "2096", + "fundInfo": { + "depositor": "Ff9JGfDpZ9TjLh7C2NXSUNAd3rAFNFqefxWE35vjCFyXKr4", + "verifier": null, + "deposit": "9999999900000", + "raised": "16369779521828772", + "end": "10281600", + "cap": "222222000000000000", + "lastContribution": { + "preEnding": "49" + }, + "firstPeriod": "17", + "lastPeriod": "24", + "trieIndex": "39" + } + }, + { + "paraId": "2086", + "fundInfo": { + "depositor": "DM5jFFrjW6TQWBBz7UAL7GssDVP94wGhhwLcJnHiY1EFfCY", + "verifier": null, + "deposit": "9999999900000", + "raised": "219999925637796185", + "end": "9676800", + "cap": "220000000000000000", + "lastContribution": { + "preEnding": "43" + }, + "firstPeriod": "15", + "lastPeriod": "22", + "trieIndex": "25" + } + }, + { + "paraId": "2085", + "fundInfo": { + "depositor": "CrDdFXV729K1ipSRmuyv4ux5uGzmwjEvihvmL29f4T8AScQ", + "verifier": null, + "deposit": "9999999900000", + "raised": "202793430047076832", + "end": "9676800", + "cap": "400000000000000000", + "lastContribution": { + "ending": "9534738" + }, + "firstPeriod": "15", + "lastPeriod": "22", + "trieIndex": "28" + } + }, + { + "paraId": "2001", + "fundInfo": { + "depositor": "GLiebiQp5f6G5vNcc7BgRE9T3hrZSYDwP6evERn3hEczdaM", + "verifier": null, + "deposit": "9999999900000", + "raised": "136817795155232030", + "end": "8467200", + "cap": "1000000000000000000", + "lastContribution": { + "ending": "8423745" + }, + "firstPeriod": "13", + "lastPeriod": "20", + "trieIndex": "9" + } + }, + { + "paraId": "2084", + "fundInfo": { + "depositor": "FzHWXZ2GXMHAYBKQYinNDkRFAAHm8sHFKpMss473e2FTfxL", + "verifier": null, + "deposit": "9999999900000", + "raised": "218246646131614552", + "end": "9676800", + "cap": "300000000000000000", + "lastContribution": { + "ending": "9233477" + }, + "firstPeriod": "15", + "lastPeriod": "22", + "trieIndex": "27" + } + }, + { + "paraId": "2000", + "fundInfo": { + "depositor": "Gq2No2gcF6s4DLfzzuB53G5opWCoCtK9tZeVGRGcmkSDGoK", + "verifier": null, + "deposit": "9999999900000", + "raised": "501137661910050505", + "end": "8467200", + "cap": "1500000000000000000", + "lastContribution": { + "preEnding": "20" + }, + "firstPeriod": "13", + "lastPeriod": "20", + "trieIndex": "1" + } + }, + { + "paraId": "2077", + "fundInfo": { + "depositor": "Eo2YWNA49Uhqu3rVawFUjhm19H72XeuNinmAHBGbKpHasNH", + "verifier": null, + "deposit": "9999999900000", + "raised": "1296710961433411", + "end": "10113719", + "cap": "42000000000000000000", + "lastContribution": { + "preEnding": "49" + }, + "firstPeriod": "17", + "lastPeriod": "24", + "trieIndex": "41" + } + }, + { + "paraId": "2092", + "fundInfo": { + "depositor": "GFtEbQbXqUVL9wqhvA8vuj7o9vxPA9MrrujXD64HqGELwKo", + "verifier": null, + "deposit": "9999999900000", + "raised": "199999927966344003", + "end": "9676800", + "cap": "200000000000000000", + "lastContribution": { + "preEnding": "47" + }, + "firstPeriod": "15", + "lastPeriod": "22", + "trieIndex": "34" + } + }, + { + "paraId": "2015", + "fundInfo": { + "depositor": "EZwaNLfEwAMYcEdbp7uKYFCjnsn43S85pm6BumT5UwvZQvB", + "verifier": null, + "deposit": "9999999900000", + "raised": "7249290905274104", + "end": "10281600", + "cap": "200000000000000000", + "lastContribution": { + "preEnding": "49" + }, + "firstPeriod": "17", + "lastPeriod": "24", + "trieIndex": "38" + } + }, + { + "paraId": "2004", + "fundInfo": { + "depositor": "DaEJPYPCJQnKeHGfV6SSF8WPWtLg9zggbWwAwCZRWVPeWvv", + "verifier": null, + "deposit": "9999999900000", + "raised": "132280745655359053", + "end": "8467200", + "cap": "1000000000000000000", + "lastContribution": { + "ending": "8323562" + }, + "firstPeriod": "13", + "lastPeriod": "20", + "trieIndex": "6" + } + }, + { + "paraId": "2007", + "fundInfo": { + "depositor": "Ekf4HssuTpYjmUEvzy9AAFuqpUcNm9AAkrMF1stTU6Mo1hR", + "verifier": null, + "deposit": "9999999900000", + "raised": "138457862936184160", + "end": "8467200", + "cap": "1000000000000000000", + "lastContribution": { + "ending": "8223513" + }, + "firstPeriod": "13", + "lastPeriod": "20", + "trieIndex": "0" + } + }, + { + "paraId": "2087", + "fundInfo": { + "depositor": "J93MdZPvP1RnQj5va1TaqZNm45t4zvvVEhFJ4MChyerR95b", + "verifier": null, + "deposit": "9999999900000", + "raised": "50632193906606602", + "end": "10113719", + "cap": "200000000000000000", + "lastContribution": { + "preEnding": "49" + }, + "firstPeriod": "17", + "lastPeriod": "24", + "trieIndex": "37" + } + }, + { + "paraId": "2090", + "fundInfo": { + "depositor": "FcbeWvFfqsNj6D8F3gg45pHYRAAsFAdCApCnRUJ5TX71mPg", + "verifier": null, + "deposit": "9999999900000", + "raised": "222221915331441358", + "end": "9676800", + "cap": "222222000000000000", + "lastContribution": { + "preEnding": "45" + }, + "firstPeriod": "15", + "lastPeriod": "22", + "trieIndex": "35" + } + }, + { + "paraId": "2023", + "fundInfo": { + "depositor": "FFuCbRwsDTkj1cc2w6dvBmXvumyoZR6QgfAv1LwL3kBgmbX", + "verifier": { + "sr25519": "0x6c79c2c862124697baf6d0562055a50f3b0eac3c895c23bb16e8d1e2da341549" + }, + "deposit": "9999999900000", + "raised": "205935011120809976", + "end": "8467200", + "cap": "1000000000000000000", + "lastContribution": { + "ending": "8123536" + }, + "firstPeriod": "13", + "lastPeriod": "20", + "trieIndex": "2" + } + }, + { + "paraId": "2012", + "fundInfo": { + "depositor": "F2fjhcks69mYK7QuMp2AgCEcZbYzpH82cvk8FcDeCfXXF6P", + "verifier": null, + "deposit": "9999999900000", + "raised": "316280165303774", + "end": "10281600", + "cap": "200000000000000000", + "lastContribution": { + "preEnding": "49" + }, + "firstPeriod": "17", + "lastPeriod": "24", + "trieIndex": "40" + } + }, + { + "paraId": "2088", + "fundInfo": { + "depositor": "EmKDCmxqHbmY4fsNSvM1fWX1z3jSGYKEekxtBqFsxzHW96E", + "verifier": null, + "deposit": "9999999900000", + "raised": "187835176744644782", + "end": "9676800", + "cap": "200000000000000000", + "lastContribution": { + "ending": "9434013" + }, + "firstPeriod": "15", + "lastPeriod": "22", + "trieIndex": "31" + } + } + ] +} diff --git a/e2e-tests/endpoints/kusama/paras/crowdloans/index.ts b/e2e-tests/endpoints/kusama/paras/crowdloans/index.ts new file mode 100644 index 000000000..1f08c3528 --- /dev/null +++ b/e2e-tests/endpoints/kusama/paras/crowdloans/index.ts @@ -0,0 +1,13 @@ +import parasCrowdloans8200000 from './8200000.json'; +import parasCrowdloans9800000 from './9800000.json'; + +export const parasCrowdloansEndpoints = [ + [ + '/experimental/paras/crowdloans?at=8200000', + JSON.stringify(parasCrowdloans8200000), + ], + [ + '/experimental/paras/crowdloans?at=9800000', + JSON.stringify(parasCrowdloans9800000), + ], +]; diff --git a/e2e-tests/endpoints/kusama/paras/index.ts b/e2e-tests/endpoints/kusama/paras/index.ts new file mode 100644 index 000000000..c63ddbf7e --- /dev/null +++ b/e2e-tests/endpoints/kusama/paras/index.ts @@ -0,0 +1,15 @@ +import { parasAuctionsCurrentEndpoints } from './auctions-current'; +import { parasCrowdloanInfoEndpoints } from './crowdloan-info'; +import { parasCrowdloansEndpoints } from './crowdloans'; +import { parasLeaseInfoEndpoints } from './lease-info'; +import { parasLeasesCurrentEndpoints } from './leases-current'; +import { parasParasEndpoints } from './paras'; + +export const kusamaParasEndpoints = [ + ...parasAuctionsCurrentEndpoints, + ...parasCrowdloanInfoEndpoints, + ...parasCrowdloansEndpoints, + ...parasLeaseInfoEndpoints, + ...parasLeasesCurrentEndpoints, + ...parasParasEndpoints, +]; diff --git a/e2e-tests/endpoints/kusama/paras/lease-info/8500000.json b/e2e-tests/endpoints/kusama/paras/lease-info/8500000.json new file mode 100644 index 000000000..49fb2f3fc --- /dev/null +++ b/e2e-tests/endpoints/kusama/paras/lease-info/8500000.json @@ -0,0 +1,44 @@ +{ + "at": { + "hash": "0x9d95763d4119488779991da8d1b16874687a3308ffcf9f89284d0382e8ccd161", + "height": "8500000" + }, + "paraLifecycle": "Parachain", + "leases": [ + { + "leasePeriodIndex": "14", + "account": "F3opxRbN5ZZRfqouvKtkA1JU9HcQVTorV9NUA9uJUpdasw9", + "deposit": "137023971757623070" + }, + { + "leasePeriodIndex": "15", + "account": "F3opxRbN5ZZRfqouvKtkA1JU9HcQVTorV9NUA9uJUpdasw9", + "deposit": "137023971757623070" + }, + { + "leasePeriodIndex": "16", + "account": "F3opxRbN5ZZRfqouvKtkA1JU9HcQVTorV9NUA9uJUpdasw9", + "deposit": "137023971757623070" + }, + { + "leasePeriodIndex": "17", + "account": "F3opxRbN5ZZRfqouvKtkA1JU9HcQVTorV9NUA9uJUpdasw9", + "deposit": "137023971757623070" + }, + { + "leasePeriodIndex": "18", + "account": "F3opxRbN5ZZRfqouvKtkA1JU9HcQVTorV9NUA9uJUpdasw9", + "deposit": "137023971757623070" + }, + { + "leasePeriodIndex": "19", + "account": "F3opxRbN5ZZRfqouvKtkA1JU9HcQVTorV9NUA9uJUpdasw9", + "deposit": "137023971757623070" + }, + { + "leasePeriodIndex": "20", + "account": "F3opxRbN5ZZRfqouvKtkA1JU9HcQVTorV9NUA9uJUpdasw9", + "deposit": "137023971757623070" + } + ] +} diff --git a/e2e-tests/endpoints/kusama/paras/lease-info/9000000.json b/e2e-tests/endpoints/kusama/paras/lease-info/9000000.json new file mode 100644 index 000000000..5a5072ac8 --- /dev/null +++ b/e2e-tests/endpoints/kusama/paras/lease-info/9000000.json @@ -0,0 +1,44 @@ +{ + "at": { + "hash": "0x4cead84882586ab41fc299d10e1a873cd19aeb3c9cf3dda2e663f183bef030ab", + "height": "9000000" + }, + "paraLifecycle": "Parachain", + "leases": [ + { + "leasePeriodIndex": "14", + "account": "F3opxRbN5ZZRfqouvHzYyCBggZECckghnZocZM44hhXhLJm", + "deposit": "491752906100722948" + }, + { + "leasePeriodIndex": "15", + "account": "F3opxRbN5ZZRfqouvHzYyCBggZECckghnZocZM44hhXhLJm", + "deposit": "491752906100722948" + }, + { + "leasePeriodIndex": "16", + "account": "F3opxRbN5ZZRfqouvHzYyCBggZECckghnZocZM44hhXhLJm", + "deposit": "491752906100722948" + }, + { + "leasePeriodIndex": "17", + "account": "F3opxRbN5ZZRfqouvHzYyCBggZECckghnZocZM44hhXhLJm", + "deposit": "491752906100722948" + }, + { + "leasePeriodIndex": "18", + "account": "F3opxRbN5ZZRfqouvHzYyCBggZECckghnZocZM44hhXhLJm", + "deposit": "491752906100722948" + }, + { + "leasePeriodIndex": "19", + "account": "F3opxRbN5ZZRfqouvHzYyCBggZECckghnZocZM44hhXhLJm", + "deposit": "491752906100722948" + }, + { + "leasePeriodIndex": "20", + "account": "F3opxRbN5ZZRfqouvHzYyCBggZECckghnZocZM44hhXhLJm", + "deposit": "491752906100722948" + } + ] +} diff --git a/e2e-tests/endpoints/kusama/paras/lease-info/9800000.json b/e2e-tests/endpoints/kusama/paras/lease-info/9800000.json new file mode 100644 index 000000000..9b60ebe07 --- /dev/null +++ b/e2e-tests/endpoints/kusama/paras/lease-info/9800000.json @@ -0,0 +1,34 @@ +{ + "at": { + "hash": "0x5f22672199192356a85649e5d803d72d98ae5b9dcce0bdd3fc2f5eedef39a546", + "height": "9800000" + }, + "paraLifecycle": "Parachain", + "leases": [ + { + "leasePeriodIndex": "16", + "account": "F3opxRbN5ZZRfqouvQEcaiiG46mjM5odEBXHF9GhgpHtisw", + "deposit": "174068691689530387" + }, + { + "leasePeriodIndex": "17", + "account": "F3opxRbN5ZZRfqouvQEcaiiG46mjM5odEBXHF9GhgpHtisw", + "deposit": "174068691689530387" + }, + { + "leasePeriodIndex": "18", + "account": "F3opxRbN5ZZRfqouvQEcaiiG46mjM5odEBXHF9GhgpHtisw", + "deposit": "174068691689530387" + }, + { + "leasePeriodIndex": "19", + "account": "F3opxRbN5ZZRfqouvQEcaiiG46mjM5odEBXHF9GhgpHtisw", + "deposit": "174068691689530387" + }, + { + "leasePeriodIndex": "20", + "account": "F3opxRbN5ZZRfqouvQEcaiiG46mjM5odEBXHF9GhgpHtisw", + "deposit": "174068691689530387" + } + ] +} diff --git a/e2e-tests/endpoints/kusama/paras/lease-info/index.ts b/e2e-tests/endpoints/kusama/paras/lease-info/index.ts new file mode 100644 index 000000000..e8fb583fc --- /dev/null +++ b/e2e-tests/endpoints/kusama/paras/lease-info/index.ts @@ -0,0 +1,18 @@ +import parasLeaseInfo8500000 from './8500000.json'; +import parasLeaseInfo9000000 from './9000000.json'; +import parasLeaseInfo9800000 from './9800000.json'; + +export const parasLeaseInfoEndpoints = [ + [ + '/experimental/paras/2007/lease-info?at=8500000', + JSON.stringify(parasLeaseInfo8500000), + ], + [ + '/experimental/paras/2000/lease-info?at=9000000', + JSON.stringify(parasLeaseInfo9000000), + ], + [ + '/experimental/paras/2023/lease-info?at=9800000', + JSON.stringify(parasLeaseInfo9800000), + ], +]; diff --git a/e2e-tests/endpoints/kusama/paras/leases-current/8200000.json b/e2e-tests/endpoints/kusama/paras/leases-current/8200000.json new file mode 100644 index 000000000..100c68baf --- /dev/null +++ b/e2e-tests/endpoints/kusama/paras/leases-current/8200000.json @@ -0,0 +1,13 @@ +{ + "at": { + "hash": "0x6cdf2b4c9d7aa5e5f0a6217def7ca53b46691300853f40b3be4e5d9df36f0044", + "height": "8200000" + }, + "leasePeriodIndex": "13", + "endOfLeasePeriod": "8467200", + "currentLeaseHolders": [ + "2000", + "1000", + "2023" + ] +} diff --git a/e2e-tests/endpoints/kusama/paras/leases-current/9000000.json b/e2e-tests/endpoints/kusama/paras/leases-current/9000000.json new file mode 100644 index 000000000..3ba37fd7c --- /dev/null +++ b/e2e-tests/endpoints/kusama/paras/leases-current/9000000.json @@ -0,0 +1,16 @@ +{ + "at": { + "hash": "0x4cead84882586ab41fc299d10e1a873cd19aeb3c9cf3dda2e663f183bef030ab", + "height": "9000000" + }, + "leasePeriodIndex": "14", + "endOfLeasePeriod": "9072000", + "currentLeaseHolders": [ + "2001", + "2000", + "2004", + "2007", + "1000", + "2023" + ] +} diff --git a/e2e-tests/endpoints/kusama/paras/leases-current/9800000.json b/e2e-tests/endpoints/kusama/paras/leases-current/9800000.json new file mode 100644 index 000000000..314cf3369 --- /dev/null +++ b/e2e-tests/endpoints/kusama/paras/leases-current/9800000.json @@ -0,0 +1,22 @@ +{ + "at": { + "hash": "0x5f22672199192356a85649e5d803d72d98ae5b9dcce0bdd3fc2f5eedef39a546", + "height": "9800000" + }, + "leasePeriodIndex": "16", + "endOfLeasePeriod": "10281600", + "currentLeaseHolders": [ + "2086", + "2085", + "2001", + "2084", + "2000", + "2092", + "2004", + "2007", + "1000", + "2090", + "2023", + "2088" + ] +} diff --git a/e2e-tests/endpoints/kusama/paras/leases-current/index.ts b/e2e-tests/endpoints/kusama/paras/leases-current/index.ts new file mode 100644 index 000000000..08ce73057 --- /dev/null +++ b/e2e-tests/endpoints/kusama/paras/leases-current/index.ts @@ -0,0 +1,18 @@ +import parasLeasesCurrent8200000 from './8200000.json'; +import parasLeasesCurrent9000000 from './9000000.json'; +import parasLeasesCurrent9800000 from './9800000.json'; + +export const parasLeasesCurrentEndpoints = [ + [ + '/experimental/paras/leases/current?at=8200000', + JSON.stringify(parasLeasesCurrent8200000), + ], + [ + '/experimental/paras/leases/current?at=9000000', + JSON.stringify(parasLeasesCurrent9000000), + ], + [ + '/experimental/paras/leases/current?at=9800000', + JSON.stringify(parasLeasesCurrent9800000), + ], +]; diff --git a/e2e-tests/endpoints/kusama/paras/paras/8400000.json b/e2e-tests/endpoints/kusama/paras/paras/8400000.json new file mode 100644 index 000000000..2b370c76c --- /dev/null +++ b/e2e-tests/endpoints/kusama/paras/paras/8400000.json @@ -0,0 +1,92 @@ +{ + "at": { + "hash": "0xd04190fb7b5e6ad66b7f5e218f41a3706fd19426ae9176fee64c777a232a1030", + "height": "8400000" + }, + "paras": [ + { + "paraId": "2009", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2082", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2021", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2001", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2080", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2008", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2000", + "paraLifecycle": "Parachain" + }, + { + "paraId": "2077", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2024", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2015", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2018", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2004", + "paraLifecycle": "Parachain" + }, + { + "paraId": "2019", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2007", + "paraLifecycle": "Parachain" + }, + { + "paraId": "1000", + "paraLifecycle": "Parachain" + }, + { + "paraId": "2016", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2023", + "paraLifecycle": "Parachain" + }, + { + "paraId": "2012", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2078", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2006", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2013", + "paraLifecycle": "Parathread" + } + ] +} diff --git a/e2e-tests/endpoints/kusama/paras/paras/9400000.json b/e2e-tests/endpoints/kusama/paras/paras/9400000.json new file mode 100644 index 000000000..8fff1b20e --- /dev/null +++ b/e2e-tests/endpoints/kusama/paras/paras/9400000.json @@ -0,0 +1,124 @@ +{ + "at": { + "hash": "0x66fd644728104f00737bc9699a0d991031b0ccd8e1d1cc11922997a5f3673987", + "height": "9400000" + }, + "paras": [ + { + "paraId": "2094", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2009", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2086", + "paraLifecycle": "Parachain" + }, + { + "paraId": "2021", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2085", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2001", + "paraLifecycle": "Parachain" + }, + { + "paraId": "2089", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2084", + "paraLifecycle": "Parachain" + }, + { + "paraId": "2080", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2008", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2000", + "paraLifecycle": "Parachain" + }, + { + "paraId": "2077", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2092", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2024", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2015", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2018", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2004", + "paraLifecycle": "Parachain" + }, + { + "paraId": "2019", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2007", + "paraLifecycle": "Parachain" + }, + { + "paraId": "1000", + "paraLifecycle": "Parachain" + }, + { + "paraId": "2087", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2016", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2090", + "paraLifecycle": "Parachain" + }, + { + "paraId": "2023", + "paraLifecycle": "Parachain" + }, + { + "paraId": "2012", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2078", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2088", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2006", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2013", + "paraLifecycle": "Parathread" + } + ] +} diff --git a/e2e-tests/endpoints/kusama/paras/paras/9800000.json b/e2e-tests/endpoints/kusama/paras/paras/9800000.json new file mode 100644 index 000000000..6a1960f54 --- /dev/null +++ b/e2e-tests/endpoints/kusama/paras/paras/9800000.json @@ -0,0 +1,132 @@ +{ + "at": { + "hash": "0x5f22672199192356a85649e5d803d72d98ae5b9dcce0bdd3fc2f5eedef39a546", + "height": "9800000" + }, + "paras": [ + { + "paraId": "2096", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2094", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2009", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2086", + "paraLifecycle": "Parachain" + }, + { + "paraId": "2021", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2085", + "paraLifecycle": "Parachain" + }, + { + "paraId": "2001", + "paraLifecycle": "Parachain" + }, + { + "paraId": "2089", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2084", + "paraLifecycle": "Parachain" + }, + { + "paraId": "2080", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2008", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2000", + "paraLifecycle": "Parachain" + }, + { + "paraId": "2077", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2092", + "paraLifecycle": "Parachain" + }, + { + "paraId": "2024", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2015", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2018", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2004", + "paraLifecycle": "Parachain" + }, + { + "paraId": "2019", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2007", + "paraLifecycle": "Parachain" + }, + { + "paraId": "2095", + "paraLifecycle": "Parathread" + }, + { + "paraId": "1000", + "paraLifecycle": "Parachain" + }, + { + "paraId": "2087", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2016", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2090", + "paraLifecycle": "Parachain" + }, + { + "paraId": "2023", + "paraLifecycle": "Parachain" + }, + { + "paraId": "2012", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2078", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2088", + "paraLifecycle": "Parachain" + }, + { + "paraId": "2006", + "paraLifecycle": "Parathread" + }, + { + "paraId": "2013", + "paraLifecycle": "Parathread" + } + ] +} diff --git a/e2e-tests/endpoints/kusama/paras/paras/index.ts b/e2e-tests/endpoints/kusama/paras/paras/index.ts new file mode 100644 index 000000000..8edde20f7 --- /dev/null +++ b/e2e-tests/endpoints/kusama/paras/paras/index.ts @@ -0,0 +1,9 @@ +import parasParas8400000 from './8400000.json'; +import parasParas9400000 from './9400000.json'; +import parasParas9800000 from './9800000.json'; + +export const parasParasEndpoints = [ + ['/experimental/paras?at=8400000', JSON.stringify(parasParas8400000)], + ['/experimental/paras?at=9400000', JSON.stringify(parasParas9400000)], + ['/experimental/paras?at=9800000', JSON.stringify(parasParas9800000)], +]; diff --git a/e2e-tests/endpoints/polkadot/index.ts b/e2e-tests/endpoints/polkadot/index.ts index 37497ef52..ba9022b36 100644 --- a/e2e-tests/endpoints/polkadot/index.ts +++ b/e2e-tests/endpoints/polkadot/index.ts @@ -5,5 +5,6 @@ import { polkadotRuntimeEndpoints } from './runtime'; export const polkadotEndpoints = { blocks: polkadotBlockEndpoints, accounts: polkadotAccountsEndpoints, + paras: [], runtime: polkadotRuntimeEndpoints, }; diff --git a/e2e-tests/endpoints/statemine/index.ts b/e2e-tests/endpoints/statemine/index.ts index 73fc6b46a..02da6ac37 100644 --- a/e2e-tests/endpoints/statemine/index.ts +++ b/e2e-tests/endpoints/statemine/index.ts @@ -5,5 +5,6 @@ import { statemineRuntimeEndpoints } from './runtime'; export const statemineEndpoints = { accounts: statemineAccountAssetEndpoints, blocks: statemineBlockEndpoints, + paras: [], runtime: statemineRuntimeEndpoints, }; diff --git a/e2e-tests/endpoints/westend/index.ts b/e2e-tests/endpoints/westend/index.ts index 86a1af759..3227ddab7 100644 --- a/e2e-tests/endpoints/westend/index.ts +++ b/e2e-tests/endpoints/westend/index.ts @@ -5,5 +5,6 @@ import { westendRuntimeEndpoints } from './runtime'; export const westendEndpoints = { blocks: westendBlockEndpoints, accounts: westendAccountsEndpoints, + paras: [], runtime: westendRuntimeEndpoints, }; diff --git a/e2e-tests/runtimeTests.spec.ts b/e2e-tests/runtimeTests.spec.ts index 0ad78b255..7b062d9be 100644 --- a/e2e-tests/runtimeTests.spec.ts +++ b/e2e-tests/runtimeTests.spec.ts @@ -15,7 +15,7 @@ const config = JSON.parse( const chain = config.chain as ChainSpec; -const { blocks, accounts, runtime } = endpoints[chain]; +const { blocks, accounts, runtime, paras } = endpoints[chain]; describe('Runtime Tests for blocks', () => { /** @@ -73,3 +73,23 @@ describe('Runtime Tests for `/runtime/*`', () => { } ); }); + +describe('Runtime Tests for `/experimental/paras/*`', () => { + /** + * Allows a timeout of 30 seconds for each response. + */ + jest.setTimeout(30000); + + if (paras.length) { + test.each(paras)( + 'Given path %p, it should return the correct JSON response', + async (runtimePath, runtimeResponse) => { + const res = await request(runtimePath, HOST, PORT); + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + const responseJson = JSON.parse(res); + + expect(responseJson).toStrictEqual(JSON.parse(runtimeResponse)); + } + ); + } +}); diff --git a/e2e-tests/types/chainSpec.ts b/e2e-tests/types/chainSpec.ts index 9b8853c0c..80c31f0cc 100644 --- a/e2e-tests/types/chainSpec.ts +++ b/e2e-tests/types/chainSpec.ts @@ -6,7 +6,7 @@ export type ChainSpec = 'polkadot' | 'kusama' | 'westend' | 'statemine'; /** * Sidecar endpoints that are supported */ -export type EndpointSpec = 'blocks' | 'accounts' | 'runtime'; +export type EndpointSpec = 'blocks' | 'accounts' | 'runtime' | 'paras'; /** * Chain object and the associated endpoints