From 868f8e21dc9e0c72ab72b22b67f7bd7fdabcf5b1 Mon Sep 17 00:00:00 2001 From: dexturr Date: Fri, 24 Mar 2023 12:08:16 +0000 Subject: [PATCH 01/23] chore: update tranches Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- apps/static/src/assets/mainnet-tranches.json | 114 +++++++++++++------ 1 file changed, 80 insertions(+), 34 deletions(-) diff --git a/apps/static/src/assets/mainnet-tranches.json b/apps/static/src/assets/mainnet-tranches.json index 06695bab6..e0cd1187f 100644 --- a/apps/static/src/assets/mainnet-tranches.json +++ b/apps/static/src/assets/mainnet-tranches.json @@ -448,7 +448,7 @@ "tranche_end": "2023-04-06T00:00:00.000Z", "total_added": "14099", "total_removed": "123.82076687438", - "locked_amount": "5795.7870627986847584", + "locked_amount": "5682.47498319892523905", "deposits": [ { "amount": "30", @@ -3212,7 +3212,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "86666.297", "total_removed": "0", - "locked_amount": "60724.2046685250778505185", + "locked_amount": "60665.047555726309619496", "deposits": [ { "amount": "86666.297", @@ -3278,7 +3278,7 @@ "tranche_end": "2023-06-01T00:00:00.000Z", "total_added": "2500", "total_removed": "0", - "locked_amount": "944.27766966829475", + "locked_amount": "940.855368589743625", "deposits": [ { "amount": "2500", @@ -3399,7 +3399,7 @@ "tranche_end": "2023-09-01T00:00:00.000Z", "total_added": "17500", "total_removed": "0", - "locked_amount": "15288.09647368156125", + "locked_amount": "15264.4007586050715", "deposits": [ { "amount": "12500", @@ -3666,7 +3666,7 @@ "tranche_end": "2023-08-01T00:00:00.000Z", "total_added": "37500", "total_removed": "4333.837380825", - "locked_amount": "26880.54164748312", + "locked_amount": "26828.9235151933725", "deposits": [ { "amount": "7500", @@ -3931,7 +3931,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "129999.45", "total_removed": "0", - "locked_amount": "60668.801472377465776395", + "locked_amount": "60609.698333000689209225", "deposits": [ { "amount": "129999.45", @@ -3997,7 +3997,7 @@ "tranche_end": "2023-09-03T00:00:00.000Z", "total_added": "62600", "total_removed": "0", - "locked_amount": "27911.61024226281404", + "locked_amount": "27868.88042237443354", "deposits": [ { "amount": "10000", @@ -4190,7 +4190,7 @@ "tranche_end": "2023-09-17T00:00:00.000Z", "total_added": "5000", "total_removed": "0", - "locked_amount": "2421.142662354135", + "locked_amount": "2417.7297374429225", "deposits": [ { "amount": "5000", @@ -4401,7 +4401,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "97499.58", "total_removed": "0", - "locked_amount": "2732.64431281988066826408", + "locked_amount": "2674.66963879773578446164", "deposits": [ { "amount": "97499.58", @@ -4434,7 +4434,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "135173.4239508", "total_removed": "98230.390980249184455396", - "locked_amount": "3735.0530042653700851292816472", + "locked_amount": "3655.811633787019966627377444", "deposits": [ { "amount": "135173.4239508", @@ -4480,7 +4480,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "32499.86", "total_removed": "0", - "locked_amount": "1149.57627216016711597184", + "locked_amount": "1125.187327968122418173", "deposits": [ { "amount": "32499.86", @@ -4513,7 +4513,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "10833.29", "total_removed": "0", - "locked_amount": "374.1759213640386884894", + "locked_amount": "366.23755669424026702586", "deposits": [ { "amount": "10833.29", @@ -4546,7 +4546,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "22749.93", "total_removed": "4720.860935375", - "locked_amount": "1398.7531647414908909613", + "locked_amount": "1369.0777846040576210034", "deposits": [ { "amount": "6500", @@ -4698,7 +4698,7 @@ "tranche_end": "2023-05-01T00:00:00.000Z", "total_added": "22500", "total_removed": "5870.8788942", - "locked_amount": "4691.860900092081", + "locked_amount": "4660.89002071823295", "deposits": [ { "amount": "7500", @@ -5083,7 +5083,7 @@ "tranche_end": "2023-06-02T00:00:00.000Z", "total_added": "1939928.38", "total_removed": "928642.9598472029154", - "locked_amount": "370677.339230840227894438", + "locked_amount": "369353.1732520262449008556", "deposits": [ { "amount": "1852091.69", @@ -6394,7 +6394,7 @@ "tranche_start": "2021-09-05T00:00:00.000Z", "tranche_end": "2022-09-30T00:00:00.000Z", "total_added": "60916.66666633337", - "total_removed": "39354.939349357864974364", + "total_removed": "41621.606016024534974364", "locked_amount": "0", "deposits": [ { @@ -6499,6 +6499,11 @@ "user": "0x832cfD8fD4a1791b5eF5BD18a677beb7731Aa18E", "tx": "0x98f1e1e3dd3a0ef2fe25ccb9e7222b29c1a5136b52255a1b492b330adbfc6b66" }, + { + "amount": "2266.66666666667", + "user": "0xb14025f7eB7717cFF43e7a33b66d86eaBd6bC7d7", + "tx": "0xef8ce06531f6f6e7013f0da7a7810fbb9f43f36a9718a144003290dce2461a74" + }, { "amount": "3395.631843574", "user": "0xa0fF757077B5D796259582b2b9Db99c906277007", @@ -7172,10 +7177,17 @@ "tx": "0x9cb4b7fe8f0e02758942b72d9e27fc372dc96d7777484af884af1bfec0beaa9c" } ], - "withdrawals": [], + "withdrawals": [ + { + "amount": "2266.66666666667", + "user": "0xb14025f7eB7717cFF43e7a33b66d86eaBd6bC7d7", + "tranche_id": 13, + "tx": "0xef8ce06531f6f6e7013f0da7a7810fbb9f43f36a9718a144003290dce2461a74" + } + ], "total_tokens": "2266.66666666667", - "withdrawn_tokens": "0", - "remaining_tokens": "2266.66666666667" + "withdrawn_tokens": "2266.66666666667", + "remaining_tokens": "0" }, { "address": "0xa787A56c43847A3B5a0110d0B5E004E47F57B22e", @@ -7495,7 +7507,7 @@ "tranche_start": "2021-09-05T00:00:00.000Z", "tranche_end": "2021-09-05T00:00:00.000Z", "total_added": "10750", - "total_removed": "8650", + "total_removed": "9050", "locked_amount": "0", "deposits": [ { @@ -7595,6 +7607,11 @@ } ], "withdrawals": [ + { + "amount": "400", + "user": "0xb14025f7eB7717cFF43e7a33b66d86eaBd6bC7d7", + "tx": "0x4556da7162d753457aa752421dedd3bd322c51a55c4b6a25e44f6f3d68271bee" + }, { "amount": "2500", "user": "0xDFaF6D0a0102ea5e4688F95Eb22Dc353751a7563", @@ -7902,10 +7919,17 @@ "tx": "0xba1f27b434cae9a43f7040ed184b85944b995cf034e2c58542fb4d10c3d8c2a8" } ], - "withdrawals": [], + "withdrawals": [ + { + "amount": "400", + "user": "0xb14025f7eB7717cFF43e7a33b66d86eaBd6bC7d7", + "tranche_id": 14, + "tx": "0x4556da7162d753457aa752421dedd3bd322c51a55c4b6a25e44f6f3d68271bee" + } + ], "total_tokens": "400", - "withdrawn_tokens": "0", - "remaining_tokens": "400" + "withdrawn_tokens": "400", + "remaining_tokens": "0" }, { "address": "0xa787A56c43847A3B5a0110d0B5E004E47F57B22e", @@ -38717,7 +38741,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "3732368.4671", "total_removed": "700133.348465855088393", - "locked_amount": "594103.338984773529531250813", + "locked_amount": "592068.462374248167568388128", "deposits": [ { "amount": "1998.95815", @@ -40098,8 +40122,8 @@ "tranche_start": "2022-06-05T00:00:00.000Z", "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "15870102.715470999700000001", - "total_removed": "809371.09849506346247952", - "locked_amount": "7406339.8806006379597424087390267326858611", + "total_removed": "810192.49096623640785452", + "locked_amount": "7399124.3387912804369045826020892101081373", "deposits": [ { "amount": "16249.93", @@ -40673,6 +40697,11 @@ "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", "tx": "0x3f6601148f443f36af0053f3de6db76410e94a4597e4ef2d315ff13f02d600ed" }, + { + "amount": "821.392471172945375", + "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", + "tx": "0xb99c431c031e6842ae2b4c1c9de525db71584c587af717a2c9785a10aaf0876a" + }, { "amount": "827.191309560501875", "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", @@ -42640,6 +42669,12 @@ "tranche_id": 2, "tx": "0x3f6601148f443f36af0053f3de6db76410e94a4597e4ef2d315ff13f02d600ed" }, + { + "amount": "821.392471172945375", + "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", + "tranche_id": 2, + "tx": "0xb99c431c031e6842ae2b4c1c9de525db71584c587af717a2c9785a10aaf0876a" + }, { "amount": "827.191309560501875", "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", @@ -43956,8 +43991,8 @@ } ], "total_tokens": "259998.8875", - "withdrawn_tokens": "137915.118093302356125", - "remaining_tokens": "122083.769406697643875" + "withdrawn_tokens": "138736.5105644753015", + "remaining_tokens": "121262.3769355246985" }, { "address": "0x89051CAb67Bc7F8CC44F7e270c6EDaf1EC57676c", @@ -46302,8 +46337,8 @@ "tranche_start": "2021-11-05T00:00:00.000Z", "tranche_end": "2023-05-05T00:00:00.000Z", "total_added": "14597706.0446472999", - "total_removed": "5741287.052339708549890506", - "locked_amount": "1116040.46155356151405766963859435", + "total_removed": "5742425.939266423675267256", + "locked_amount": "1109379.119426833578204379265526483", "deposits": [ { "amount": "129284.449", @@ -46557,6 +46592,11 @@ "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", "tx": "0x36626f456dde1810dbd9499b2ec50666d2ea0fee2870eb7d6aee3a34a6ca17d8" }, + { + "amount": "1138.88692671512537675", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tx": "0x65c9680ce66174f33508046f521d97e062dc8271e6147afc600aab7cd3752fbe" + }, { "amount": "1147.2913244855584015", "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", @@ -49691,6 +49731,12 @@ "tranche_id": 3, "tx": "0x36626f456dde1810dbd9499b2ec50666d2ea0fee2870eb7d6aee3a34a6ca17d8" }, + { + "amount": "1138.88692671512537675", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tranche_id": 3, + "tx": "0x65c9680ce66174f33508046f521d97e062dc8271e6147afc600aab7cd3752fbe" + }, { "amount": "1147.2913244855584015", "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", @@ -52309,8 +52355,8 @@ } ], "total_tokens": "359123.469575", - "withdrawn_tokens": "330632.652903643461293", - "remaining_tokens": "28490.816671356538707" + "withdrawn_tokens": "331771.53983035858666975", + "remaining_tokens": "27351.92974464141333025" }, { "address": "0xBdd412797c1B78535Afc5F71503b91fAbD0160fB", @@ -53702,7 +53748,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "5778205.3912159303", "total_removed": "3381706.364737906998719578", - "locked_amount": "124050.932576147867629933320815002", + "locked_amount": "121418.9960144161457304798995585079", "deposits": [ { "amount": "552496.6455", @@ -55830,7 +55876,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "472355.6199999996", "total_removed": "38626.7020917017949", - "locked_amount": "94139.070101605092207961151395212", + "locked_amount": "93816.632270816782448561628209016", "deposits": [ { "amount": "3000", From 82148586853ad2c54c54736115577436e9169524 Mon Sep 17 00:00:00 2001 From: Sam Keen Date: Fri, 24 Mar 2023 14:56:56 +0000 Subject: [PATCH 02/23] feat(governance): lp vote now reflected on proposal cards (#3256) --- .../src/integration/flow/proposal-forms.cy.ts | 2 +- .../governance/src/i18n/translations/dev.json | 5 +- .../proposal-votes-table.spec.tsx | 4 +- .../proposals-list-item-details.spec.tsx | 76 +++++++++++++++++++ .../proposals-list-item-details.tsx | 31 +++++++- .../components/vote-details/vote-details.tsx | 22 ++++++ 6 files changed, 131 insertions(+), 9 deletions(-) diff --git a/apps/governance-e2e/src/integration/flow/proposal-forms.cy.ts b/apps/governance-e2e/src/integration/flow/proposal-forms.cy.ts index 1fdee286a..2f9df3041 100644 --- a/apps/governance-e2e/src/integration/flow/proposal-forms.cy.ts +++ b/apps/governance-e2e/src/integration/flow/proposal-forms.cy.ts @@ -341,7 +341,7 @@ context( 'Currently expected to pass' ); getProposalInformationFromTable('Expected to pass') - .contains('👍 by Token vote') + .contains('👍 by token vote') .should('be.visible'); }); diff --git a/apps/governance/src/i18n/translations/dev.json b/apps/governance/src/i18n/translations/dev.json index 997a23218..239b02022 100644 --- a/apps/governance/src/i18n/translations/dev.json +++ b/apps/governance/src/i18n/translations/dev.json @@ -221,8 +221,9 @@ "votePending": "Casting vote", "voteError": "Something went wrong, and your vote was not seen by the network", "back": "back", - "byTokenVote": "by Token vote", - "byLiquidityVote": "by Liquidity vote", + "byTokenVote": "by token vote", + "byLiquidityVote": "by liquidity vote", + "byLPVote": "by LP vote", "youDidNotVote": "Voting has ended. You did not vote", "voteState_Yes": "For", "voteState_No": "Against", diff --git a/apps/governance/src/routes/proposals/components/proposal-votes-table/proposal-votes-table.spec.tsx b/apps/governance/src/routes/proposals/components/proposal-votes-table/proposal-votes-table.spec.tsx index 0286d3e94..2ee8764df 100644 --- a/apps/governance/src/routes/proposals/components/proposal-votes-table/proposal-votes-table.spec.tsx +++ b/apps/governance/src/routes/proposals/components/proposal-votes-table/proposal-votes-table.spec.tsx @@ -86,7 +86,7 @@ describe('Proposal Votes Table', () => { it('displays if an update market proposal will pass by token vote', () => { renderComponent(updateMarketProposal, updateMarketProposalType); - expect(screen.getByText('👍 by Token vote')).toBeInTheDocument(); + expect(screen.getByText('👍 by token vote')).toBeInTheDocument(); }); it('displays if an update market proposal will pass by LP vote', () => { @@ -110,6 +110,6 @@ describe('Proposal Votes Table', () => { }), updateMarketProposalType ); - expect(screen.getByText('👍 by Liquidity vote')).toBeInTheDocument(); + expect(screen.getByText('👍 by liquidity vote')).toBeInTheDocument(); }); }); diff --git a/apps/governance/src/routes/proposals/components/proposals-list-item/proposals-list-item-details.spec.tsx b/apps/governance/src/routes/proposals/components/proposals-list-item/proposals-list-item-details.spec.tsx index 81d353ca8..7bbdbe608 100644 --- a/apps/governance/src/routes/proposals/components/proposals-list-item/proposals-list-item-details.spec.tsx +++ b/apps/governance/src/routes/proposals/components/proposals-list-item/proposals-list-item-details.spec.tsx @@ -136,6 +136,82 @@ describe('Proposals list item details', () => { ); }); + it('Renders proposal state: Update market proposal - set to pass by LP vote', () => { + renderComponent( + generateProposal({ + state: ProposalState.STATE_OPEN, + terms: { + change: { + __typename: 'UpdateMarket', + }, + }, + votes: { + yes: { + ...generateYesVotes(0), + totalEquityLikeShareWeight: '1000', + }, + no: { + ...generateNoVotes(0), + totalEquityLikeShareWeight: '0', + }, + }, + }) + ); + expect(screen.getByTestId('vote-status')).toHaveTextContent( + 'Set to pass by LP vote' + ); + }); + + it('Renders proposal state: Update market proposal - set to pass by token vote', () => { + renderComponent( + generateProposal({ + state: ProposalState.STATE_OPEN, + terms: { + change: { + __typename: 'UpdateMarket', + }, + }, + votes: { + yes: { + ...generateYesVotes(1000, 1000), + totalEquityLikeShareWeight: '0', + }, + no: { + ...generateNoVotes(0), + totalEquityLikeShareWeight: '0', + }, + }, + }) + ); + expect(screen.getByTestId('vote-status')).toHaveTextContent( + 'Set to pass by token vote' + ); + }); + + it('Renders proposal state: Update market proposal - set to fail', () => { + renderComponent( + generateProposal({ + state: ProposalState.STATE_OPEN, + terms: { + change: { + __typename: 'UpdateMarket', + }, + }, + votes: { + yes: { + ...generateYesVotes(0), + totalEquityLikeShareWeight: '0', + }, + no: { + ...generateNoVotes(0), + totalEquityLikeShareWeight: '0', + }, + }, + }) + ); + expect(screen.getByTestId('vote-status')).toHaveTextContent('Set to fail'); + }); + it('Renders proposal state: Open - 5 minutes left to vote', () => { renderComponent( generateProposal({ diff --git a/apps/governance/src/routes/proposals/components/proposals-list-item/proposals-list-item-details.tsx b/apps/governance/src/routes/proposals/components/proposals-list-item/proposals-list-item-details.tsx index 0c17acd97..181d58efd 100644 --- a/apps/governance/src/routes/proposals/components/proposals-list-item/proposals-list-item-details.tsx +++ b/apps/governance/src/routes/proposals/components/proposals-list-item/proposals-list-item-details.tsx @@ -41,12 +41,22 @@ export const ProposalsListItemDetails = ({ proposal: ProposalFieldsFragment | ProposalQuery['proposal']; }) => { const state = proposal?.state; - const { willPassByTokenVote, majorityMet, participationMet } = - useVoteInformation({ - proposal, - }); + const { + willPassByTokenVote, + willPassByLPVote, + majorityMet, + participationMet, + } = useVoteInformation({ + proposal, + }); const { t } = useTranslation(); const { voteState } = useUserVote(proposal?.id); + const isUpdateMarket = proposal?.terms.change.__typename === 'UpdateMarket'; + const updateMarketWillPass = willPassByTokenVote || willPassByLPVote; + const updateMarketVotePassMethod = willPassByTokenVote + ? t('byTokenVote') + : t('byLPVote'); + let proposalStatus: ReactNode; let voteDetails: ReactNode; let voteStatus: ReactNode; @@ -128,6 +138,19 @@ export const ProposalsListItemDetails = ({ ); voteStatus = + (isUpdateMarket && + (updateMarketWillPass ? ( + <> + {t('Set to')}{' '} + + {t('pass')} {updateMarketVotePassMethod} + + + ) : ( + <> + {t('Set to')} {t('fail')} + + ))) || (!participationMet && ) || (!majorityMet && ) || (willPassByTokenVote ? ( diff --git a/apps/governance/src/routes/proposals/components/vote-details/vote-details.tsx b/apps/governance/src/routes/proposals/components/vote-details/vote-details.tsx index 9a96f3c9e..db91ea186 100644 --- a/apps/governance/src/routes/proposals/components/vote-details/vote-details.tsx +++ b/apps/governance/src/routes/proposals/components/vote-details/vote-details.tsx @@ -32,6 +32,7 @@ export const VoteDetails = ({ totalTokensPercentage, participationMet, totalTokensVoted, + totalLPTokensPercentage, noPercentage, noLPPercentage, yesPercentage, @@ -41,6 +42,8 @@ export const VoteDetails = ({ requiredMajorityPercentage, requiredMajorityLPPercentage, requiredParticipation, + requiredParticipationLP, + participationLPMet, } = useVoteInformation({ proposal }); const { t } = useTranslation(); @@ -101,6 +104,25 @@ export const VoteDetails = ({ + +

+ {t('participation')} + {': '} + {participationLPMet ? ( + {t('met')} + ) : ( + {t('notMet')} + )}{' '} + {formatNumber(totalLPTokensPercentage, defaultDecimals)}% + + {requiredParticipationLP && ( + <> + ({formatNumber(requiredParticipationLP, defaultDecimals)}%{' '} + {t('governanceRequired')}) + + )} + +

)}
From 19f8fa909e09482fd9fad4fc20df317157ab8251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20M=C5=82odzikowski?= Date: Fri, 24 Mar 2023 16:42:33 +0100 Subject: [PATCH 03/23] feat(explorer,trading,governance): use nx to know which apps needs building (#3267) --- .dockerignore | 4 ++ .github/workflows/cypress-run.yml | 2 + .../{cypress-pr.yml => pr-trigger.yml} | 53 ++++++++++++------- .../workflows/publish-docker-containers.yml | 29 +++++----- dockerfiles/Dockerfile => Dockerfile | 14 ++--- docker-build.sh | 10 ++++ entrypoint.sh | 6 ++- 7 files changed, 80 insertions(+), 38 deletions(-) rename .github/workflows/{cypress-pr.yml => pr-trigger.yml} (51%) rename dockerfiles/Dockerfile => Dockerfile (83%) create mode 100755 docker-build.sh diff --git a/.dockerignore b/.dockerignore index 0916c8ecc..6ba1a3dc0 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,3 +3,7 @@ apps/**/node_modules/* tmp/* .dockerignore dockerfiles +node_modules +.git +.github +.vscode diff --git a/.github/workflows/cypress-run.yml b/.github/workflows/cypress-run.yml index 4c5481b76..15f1f896e 100644 --- a/.github/workflows/cypress-run.yml +++ b/.github/workflows/cypress-run.yml @@ -1,3 +1,4 @@ +name: Cypress Run on: workflow_call: inputs: @@ -17,6 +18,7 @@ jobs: fail-fast: false matrix: project: ${{ fromJSON(inputs.projects) }} + name: ${{ matrix.project }} runs-on: self-hosted-runner timeout-minutes: 30 steps: diff --git a/.github/workflows/cypress-pr.yml b/.github/workflows/pr-trigger.yml similarity index 51% rename from .github/workflows/cypress-pr.yml rename to .github/workflows/pr-trigger.yml index dc37d3e3a..b31bd618d 100644 --- a/.github/workflows/cypress-pr.yml +++ b/.github/workflows/pr-trigger.yml @@ -1,4 +1,4 @@ -name: Cypress tests - PR +name: PR Validations on: push: @@ -20,14 +20,16 @@ jobs: with: fetch-depth: 0 + - name: Check node version + id: node-version + run: | + npmVersion=$(cat .nvmrc | head -n 1) + echo ::set-output name=npmVersion::${npmVersion} + - name: Setup node uses: actions/setup-node@v3 - - - name: Remove package.json & yarn.lock to avoid installing everything - run: rm package.json yarn.lock - - - name: Install nx - run: yarn add nx + with: + node-version: ${{ steps.node-version.outputs.npmVersion }} # Check SHAs - name: Derive appropriate SHAs for base and head for `nx affected` commands @@ -39,38 +41,51 @@ jobs: # See affected apps - name: See affected apps run: | + nx_version=$(cat package.json | grep '"nx"' | cut -d ':' -f 2 | tr -d '",[:space:]') + rm package.json yarn.lock + yarn add nx@$nx_version affected=$(yarn nx print-affected --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }} --select=projects) echo -n "Affected projects: $affected" - projects="" - if [[ $affected == *"governance"* ]]; then projects+='"governance-e2e" '; fi - if [[ $affected == *"trading"* ]]; then projects+='"trading-e2e" '; fi - if [[ $affected == *"explorer"* ]]; then projects+='"explorer-e2e" '; fi - if [[ -z "$projects" ]]; then projects+='"governance-e2e" "trading-e2e" "explorer-e2e" '; fi - projects=${projects%?} - projects=[${projects// /,}] - echo PROJECTS=$projects >> $GITHUB_ENV + projects_e2e="" + if [[ $affected == *"governance"* ]]; then projects_e2e+='"governance-e2e" '; fi + if [[ $affected == *"trading"* ]]; then projects_e2e+='"trading-e2e" '; fi + if [[ $affected == *"explorer"* ]]; then projects_e2e+='"explorer-e2e" '; fi + if [[ -z "$projects_e2e" ]]; then projects_e2e+='"governance-e2e" "trading-e2e" "explorer-e2e" '; fi + projects_e2e=${projects_e2e%?} + projects_e2e=[${projects_e2e// /,}] + echo PROJECTS_E2E=$projects_e2e >> $GITHUB_ENV + echo PROJECTS=$(echo $projects_e2e | sed 's|-e2e||g') >> $GITHUB_ENV outputs: projects: ${{ env.PROJECTS }} + projects-e2e: ${{ env.PROJECTS_E2E }} - run: + run-cypress: needs: pr if: ${{ needs.pr.outputs.projects != '[]' }} uses: ./.github/workflows/cypress-run.yml secrets: inherit with: - projects: ${{ needs.pr.outputs.projects }} + projects: ${{ needs.pr.outputs.projects-e2e }} tags: '@smoke @regression' + run-docker-build: + needs: pr + if: ${{ needs.pr.outputs.projects != '[]' }} + uses: ./.github/workflows/publish-docker-containers.yml + secrets: inherit + with: + projects: ${{ needs.pr.outputs.projects }} + # Report single result at the end, to avoid mess with required checks in PR result: if: ${{ always() }} - needs: run + needs: run-cypress runs-on: ubuntu-latest name: Cypress result steps: - run: | - result="${{ needs.run.result }}" + result="${{ needs.run-cypress.result }}" if [[ $result == "success" || $result == "skipped" ]]; then exit 0 else diff --git a/.github/workflows/publish-docker-containers.yml b/.github/workflows/publish-docker-containers.yml index d1bed4b58..3797feaf6 100644 --- a/.github/workflows/publish-docker-containers.yml +++ b/.github/workflows/publish-docker-containers.yml @@ -1,16 +1,19 @@ -name: Publish docker containers +name: Docker build -'on': - pull_request: +on: + workflow_call: + inputs: + projects: + required: true + type: string jobs: master: strategy: fail-fast: false - # to be replaced by nix: https://github.com/vegaprotocol/frontend-monorepo/blob/develop/tools/ipfs-deploy.js#L106-L108 matrix: - app: ${{ fromJson('["explorer"]') }} - name: Build the ${{ matrix.app }} image + app: ${{ fromJSON(inputs.projects) }} + name: ${{ matrix.app }} runs-on: ubuntu-latest steps: - name: Check out code @@ -45,13 +48,10 @@ jobs: - name: Build and export to local Docker uses: docker/build-push-action@v3 with: - context: . - push: false - file: dockerfiles/Dockerfile + load: true build-args: | APP=${{ matrix.app }} NODE_VERSION=${{ steps.tags.outputs.npmVersion }} - load: true tags: | ghcr.io/vegaprotocol/frontend/${{ matrix.app }}:local @@ -75,9 +75,7 @@ jobs: id: docker_build uses: docker/build-push-action@v3 with: - context: . push: true - file: dockerfiles/Dockerfile build-args: | APP=${{ matrix.app }} NODE_VERSION=${{ steps.tags.outputs.npmVersion }} @@ -85,5 +83,12 @@ jobs: ghcr.io/vegaprotocol/frontend/${{ matrix.app }}:latest ghcr.io/vegaprotocol/frontend/${{ matrix.app }}:${{ steps.tags.outputs.version }} + - name: Add preview label + uses: actions-ecosystem/action-add-labels@v1 + if: ${{ github.event_name == 'pull_request' }} + with: + labels: ${{ matrix.app }}-preview + number: ${{ github.event.number }} + - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/dockerfiles/Dockerfile b/Dockerfile similarity index 83% rename from dockerfiles/Dockerfile rename to Dockerfile index 68be661e6..326e7958d 100644 --- a/dockerfiles/Dockerfile +++ b/Dockerfile @@ -4,13 +4,15 @@ FROM --platform=amd64 node:${NODE_VERSION}-alpine3.16 as build WORKDIR /app # Argument to allow building of different apps ARG APP -ENV PATH /app/node_modules/.bin:$PATH -COPY package.json ./ -COPY yarn.lock ./ +RUN apk add --update --no-cache \ + python3 \ + make \ + gcc \ + g++ COPY . ./ -RUN apk add python3 make gcc g++ RUN yarn --network-timeout 100000 --pure-lockfile -RUN yarn nx build ${APP} --network-timeout 100000 --pure-lockfile +# work around for different build process in trading +RUN sh ./docker-build.sh # Server environment # if this fails you need to docker pull nginx:1.23-alpine and pin new SHA @@ -25,7 +27,7 @@ CMD ["/entrypoint.sh"] # Copy dist WORKDIR /usr/share/nginx/html -COPY --from=build /app/dist/apps/${APP} /usr/share/nginx/html COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf +COPY --from=build /app/dist/apps/${APP} /usr/share/nginx/html COPY ./apps/${APP}/.env .env RUN ipfs init && echo "$(ipfs add -rQ .)" > ipfs-hash diff --git a/docker-build.sh b/docker-build.sh new file mode 100755 index 000000000..2a4772948 --- /dev/null +++ b/docker-build.sh @@ -0,0 +1,10 @@ +#!/bin/sh -eux +export PATH="/app/node_modules/.bin:$PATH" +if [ "${APP}" = "trading" ]; then + yarn nx export ${APP} --network-timeout 100000 --pure-lockfile + mv /app/dist/apps/trading/exported/ /app/tmp + rm -rf /app/dist/apps/trading + mv /app/tmp /app/dist/apps/trading +else + yarn nx build ${APP} --network-timeout 100000 --pure-lockfile +fi diff --git a/entrypoint.sh b/entrypoint.sh index c6b1bd5b1..d0923b6eb 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -7,6 +7,10 @@ mkdir -p $(dirname $env_file) rm -rf $env_file || echo "no file to delete" touch $env_file +env_vars_file=/usr/share/nginx/html/.env +sed -i '/^#/d' $env_vars_file # remove comment lines +sed -i '/^$/d' $env_vars_file # remove empty lines + # Add assignment echo "window._env_ = {" >> $env_file @@ -29,7 +33,7 @@ do if [ ! -z "$varname" ]; then echo " $varname: \"$value\"," >> $env_file fi -done < /usr/share/nginx/html/.env +done < $env_vars_file echo "}" >> $env_file From 4c850ecead0bf9afaa65549f8ecacc5cbc096758 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20G=C5=82ownia?= Date: Fri, 24 Mar 2023 17:57:59 +0100 Subject: [PATCH 04/23] fix(trading): change etherscan link label on toast (#3262) --- .../lib/hooks/use-ethereum-transaction-toasts.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/trading/lib/hooks/use-ethereum-transaction-toasts.tsx b/apps/trading/lib/hooks/use-ethereum-transaction-toasts.tsx index a4bc75b9a..168879cef 100644 --- a/apps/trading/lib/hooks/use-ethereum-transaction-toasts.tsx +++ b/apps/trading/lib/hooks/use-ethereum-transaction-toasts.tsx @@ -103,7 +103,9 @@ const EthTxPendingToastContent = ({ tx }: EthTxToastContentProps) => { <> {t('Awaiting confirmation')}

{t('Please wait for your transaction to be confirmed.')}

- {tx.txHash && } + {tx.txHash && ( + {t('View on Etherscan')} + )} ); @@ -131,7 +133,9 @@ const EthTxConfirmedToastContent = ({ tx }: EthTxToastContentProps) => { <> {t('Transaction confirmed')}

{t('Your transaction has been confirmed.')}

- {tx.txHash && } + {tx.txHash && ( + {t('View on Etherscan')} + )} ); @@ -148,7 +152,9 @@ const EthTxCompletedToastContent = ({ tx }: EthTxToastContentProps) => { {t('Your transaction has been completed.')}{' '} {isDeposit && t('Waiting for deposit confirmation.')}

- {tx.txHash && } + {tx.txHash && ( + {t('View on Etherscan')} + )} ); From 1f7117075bd915ad726513832e7d09459448254e Mon Sep 17 00:00:00 2001 From: dexturr Date: Fri, 24 Mar 2023 18:09:07 +0000 Subject: [PATCH 05/23] chore: update tranches Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- apps/static/src/assets/mainnet-tranches.json | 70 +++++++++++++------- 1 file changed, 46 insertions(+), 24 deletions(-) diff --git a/apps/static/src/assets/mainnet-tranches.json b/apps/static/src/assets/mainnet-tranches.json index e0cd1187f..7d562e094 100644 --- a/apps/static/src/assets/mainnet-tranches.json +++ b/apps/static/src/assets/mainnet-tranches.json @@ -3,12 +3,34 @@ "tranche_id": 55, "tranche_start": "2023-09-01T00:00:00.000Z", "tranche_end": "2024-03-01T00:00:00.000Z", - "total_added": "0", + "total_added": "5000", "total_removed": "0", - "locked_amount": "0", - "deposits": [], + "locked_amount": "5000", + "deposits": [ + { + "amount": "5000", + "user": "0xbCDBCC3Ff54D659f2CC737bEf49B10D92dF3FDbf", + "tx": "0x6efa10fb97388526382cf9e557833a63c6ce0bcabc4934afc4d1b2d6a12c6659" + } + ], "withdrawals": [], - "users": [] + "users": [ + { + "address": "0xbCDBCC3Ff54D659f2CC737bEf49B10D92dF3FDbf", + "deposits": [ + { + "amount": "5000", + "user": "0xbCDBCC3Ff54D659f2CC737bEf49B10D92dF3FDbf", + "tranche_id": 55, + "tx": "0x6efa10fb97388526382cf9e557833a63c6ce0bcabc4934afc4d1b2d6a12c6659" + } + ], + "withdrawals": [], + "total_tokens": "5000", + "withdrawn_tokens": "0", + "remaining_tokens": "5000" + } + ] }, { "tranche_id": 54, @@ -448,7 +470,7 @@ "tranche_end": "2023-04-06T00:00:00.000Z", "total_added": "14099", "total_removed": "123.82076687438", - "locked_amount": "5682.47498319892523905", + "locked_amount": "5568.50490815412167935", "deposits": [ { "amount": "30", @@ -3212,7 +3234,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "86666.297", "total_removed": "0", - "locked_amount": "60665.047555726309619496", + "locked_amount": "60605.5469216463046930675", "deposits": [ { "amount": "86666.297", @@ -3278,7 +3300,7 @@ "tranche_end": "2023-06-01T00:00:00.000Z", "total_added": "2500", "total_removed": "0", - "locked_amount": "940.855368589743625", + "locked_amount": "937.4131944444445", "deposits": [ { "amount": "2500", @@ -3399,7 +3421,7 @@ "tranche_end": "2023-09-01T00:00:00.000Z", "total_added": "17500", "total_removed": "0", - "locked_amount": "15264.4007586050715", + "locked_amount": "15240.5674441425125", "deposits": [ { "amount": "12500", @@ -3666,7 +3688,7 @@ "tranche_end": "2023-08-01T00:00:00.000Z", "total_added": "37500", "total_removed": "4333.837380825", - "locked_amount": "26828.9235151933725", + "locked_amount": "26777.00563996316625", "deposits": [ { "amount": "7500", @@ -3931,7 +3953,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "129999.45", "total_removed": "0", - "locked_amount": "60609.698333000689209225", + "locked_amount": "60550.2519857626155446325", "deposits": [ { "amount": "129999.45", @@ -3997,7 +4019,7 @@ "tranche_end": "2023-09-03T00:00:00.000Z", "total_added": "62600", "total_removed": "0", - "locked_amount": "27868.88042237443354", + "locked_amount": "27825.902473363776362", "deposits": [ { "amount": "10000", @@ -4190,7 +4212,7 @@ "tranche_end": "2023-09-17T00:00:00.000Z", "total_added": "5000", "total_removed": "0", - "locked_amount": "2417.7297374429225", + "locked_amount": "2414.2969939117198", "deposits": [ { "amount": "5000", @@ -4401,7 +4423,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "97499.58", "total_removed": "0", - "locked_amount": "2674.66963879773578446164", + "locked_amount": "2616.35830983492408848394", "deposits": [ { "amount": "97499.58", @@ -4434,7 +4456,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "135173.4239508", "total_removed": "98230.390980249184455396", - "locked_amount": "3655.811633787019966627377444", + "locked_amount": "3576.1101141258293357293164912", "deposits": [ { "amount": "135173.4239508", @@ -4480,7 +4502,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "32499.86", "total_removed": "0", - "locked_amount": "1125.187327968122418173", + "locked_amount": "1100.6567588562576310942", "deposits": [ { "amount": "32499.86", @@ -4513,7 +4535,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "10833.29", "total_removed": "0", - "locked_amount": "366.23755669424026702586", + "locked_amount": "358.2530944873368448792", "deposits": [ { "amount": "10833.29", @@ -4546,7 +4568,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "22749.93", "total_removed": "4720.860935375", - "locked_amount": "1369.0777846040576210034", + "locked_amount": "1339.2300815772250825845", "deposits": [ { "amount": "6500", @@ -4698,7 +4720,7 @@ "tranche_end": "2023-05-01T00:00:00.000Z", "total_added": "22500", "total_removed": "5870.8788942", - "locked_amount": "4660.89002071823295", + "locked_amount": "4629.739295580111675", "deposits": [ { "amount": "7500", @@ -5083,7 +5105,7 @@ "tranche_end": "2023-06-02T00:00:00.000Z", "total_added": "1939928.38", "total_removed": "928642.9598472029154", - "locked_amount": "369353.1732520262449008556", + "locked_amount": "368021.317932537977046898", "deposits": [ { "amount": "1852091.69", @@ -38741,7 +38763,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "3732368.4671", "total_removed": "700133.348465855088393", - "locked_amount": "592068.462374248167568388128", + "locked_amount": "590021.958977682773959664884", "deposits": [ { "amount": "1998.95815", @@ -40123,7 +40145,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "15870102.715470999700000001", "total_removed": "810192.49096623640785452", - "locked_amount": "7399124.3387912804369045826020892101081373", + "locked_amount": "7391867.56914513543573139808414748469991885", "deposits": [ { "amount": "16249.93", @@ -46338,7 +46360,7 @@ "tranche_end": "2023-05-05T00:00:00.000Z", "total_added": "14597706.0446472999", "total_removed": "5742425.939266423675267256", - "locked_amount": "1109379.119426833578204379265526483", + "locked_amount": "1102679.716024424027206047775020354", "deposits": [ { "amount": "129284.449", @@ -53748,7 +53770,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "5778205.3912159303", "total_removed": "3381706.364737906998719578", - "locked_amount": "121418.9960144161457304798995585079", + "locked_amount": "118772.0212124693022954158157082682", "deposits": [ { "amount": "552496.6455", @@ -55876,7 +55898,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "472355.6199999996", "total_removed": "38626.7020917017949", - "locked_amount": "93816.632270816782448561628209016", + "locked_amount": "93492.35210931880898404222678842", "deposits": [ { "amount": "3000", From 3e594a783a08468c4fe3783f8e3a484d1f25840b Mon Sep 17 00:00:00 2001 From: Penny Andrews <47143694+pennyandrews@users.noreply.github.com> Date: Fri, 24 Mar 2023 23:55:22 +0000 Subject: [PATCH 06/23] chore(ci): add release issue template (#3272) --- .github/ISSUE_TEMPLATE/release | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/release diff --git a/.github/ISSUE_TEMPLATE/release b/.github/ISSUE_TEMPLATE/release new file mode 100644 index 000000000..336052ddd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/release @@ -0,0 +1,22 @@ +--- +name: Release +about: + A template to outline the steps needed to for a successful release of our frontend apps +title: 'Release [add dapp version]-core-[add core version]' +labels: +assignees: '' +--- + +### Tasks + +- [ ] Review [link to core release](xxx) +- [ ] Tag frontend-monorepo +- [ ] Create release and generate release notes +- [ ] Run `@smoke` tests +- [ ] Run `@regression` tests +- [ ] Run `@slow` tests +- [ ] Explorative testing of key flows +- [ ] Set `release/[network]` to tagged commit +- [ ] Verify builds (on Netlify and Fleek) are successful +- [ ] Verify build has been deployed +- [ ] Smoke testing on deployed app From e8adff25c4b85035c1736455034544189005ed4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20G=C5=82ownia?= Date: Sat, 25 Mar 2023 00:57:00 +0100 Subject: [PATCH 07/23] fix(trading): handle lack of approval in trading deposit flow (#3278) --- libs/deposits/src/lib/approve-notification.tsx | 6 ++++-- libs/deposits/src/lib/deposit-form.tsx | 14 +++++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/libs/deposits/src/lib/approve-notification.tsx b/libs/deposits/src/lib/approve-notification.tsx index a3141f5a9..afe713d2a 100644 --- a/libs/deposits/src/lib/approve-notification.tsx +++ b/libs/deposits/src/lib/approve-notification.tsx @@ -16,6 +16,7 @@ interface ApproveNotificationProps { balances: DepositBalances | null; amount: string; approveTxId: number | null; + intent?: Intent; } export const ApproveNotification = ({ @@ -26,6 +27,7 @@ export const ApproveNotification = ({ balances, approved, approveTxId, + intent = Intent.Warning, }: ApproveNotificationProps) => { const tx = useEthTransactionStore((state) => { return state.transactions.find((t) => t?.id === approveTxId); @@ -46,7 +48,7 @@ export const ApproveNotification = ({ const approvePrompt = (
store.open); const { isActive, account } = useWeb3React(); const { pubKey, pubKeys: _pubKeys } = useVegaWallet(); + const [approveNotificationIntent, setApproveNotificationIntent] = + useState(Intent.Warning); const { register, handleSubmit, @@ -103,8 +105,10 @@ export const DepositForm = ({ if (!selectedAsset || selectedAsset.source.__typename !== 'ERC20') { throw new Error('Invalid asset'); } - if (!approved) throw new Error('Deposits not approved'); - + if (!approved) { + setApproveNotificationIntent(Intent.Danger); + return; + } submitDeposit({ assetSource: selectedAsset.source.contractAddress, amount: fields.amount, @@ -355,9 +359,13 @@ export const DepositForm = ({ isActive={isActive} approveTxId={approveTxId} selectedAsset={selectedAsset} - onApprove={submitApprove} + onApprove={() => { + submitApprove(); + setApproveNotificationIntent(Intent.Warning); + }} balances={balances} approved={approved} + intent={approveNotificationIntent} amount={amount} /> From 58c6652e2996befc1d8545495f412325590fe7f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20G=C5=82ownia?= Date: Sat, 25 Mar 2023 01:01:12 +0100 Subject: [PATCH 08/23] feat(trading): use mini scroll in deal ticket, market info for and landing dialog (#3269) --- .../welcome-dialog/welcome-landing-dialog.tsx | 8 +- .../components/deal-ticket/deal-ticket.tsx | 265 +++++++++--------- libs/market-depth/src/lib/orderbook.tsx | 9 +- .../components/market-info/info-market.tsx | 5 +- libs/ui-toolkit/src/components/index.ts | 1 + .../src/components/tiny-scroll/index.tsx | 1 + .../tiny-scroll/tiny-scroll.module.scss} | 0 .../components/tiny-scroll/tiny-scroll.tsx | 20 ++ 8 files changed, 169 insertions(+), 140 deletions(-) create mode 100644 libs/ui-toolkit/src/components/tiny-scroll/index.tsx rename libs/{market-depth/src/lib/orderbook.module.scss => ui-toolkit/src/components/tiny-scroll/tiny-scroll.module.scss} (100%) create mode 100644 libs/ui-toolkit/src/components/tiny-scroll/tiny-scroll.tsx diff --git a/apps/trading/components/welcome-dialog/welcome-landing-dialog.tsx b/apps/trading/components/welcome-dialog/welcome-landing-dialog.tsx index b65f0cbe3..32e93258b 100644 --- a/apps/trading/components/welcome-dialog/welcome-landing-dialog.tsx +++ b/apps/trading/components/welcome-dialog/welcome-landing-dialog.tsx @@ -2,7 +2,7 @@ import React, { useCallback } from 'react'; import { useMarketList } from '@vegaprotocol/market-list'; import { t } from '@vegaprotocol/i18n'; import { useAssetDetailsDialogStore } from '@vegaprotocol/assets'; -import { Link as UILink } from '@vegaprotocol/ui-toolkit'; +import { Link as UILink, TinyScroll } from '@vegaprotocol/ui-toolkit'; import type { OnCellClickHandler } from '../select-market'; import type { MarketMaybeWithDataAndCandles } from '@vegaprotocol/market-list'; import { @@ -55,8 +55,8 @@ export const SelectMarketLandingTable = ({ const showProposed = (markets?.length || 0) <= 5; return ( <> -

@@ -78,7 +78,7 @@ export const SelectMarketLandingTable = ({ ))} -

+
- ( - { - if (type === OrderType.TYPE_NETWORK) return; - update({ - type, - // when changing type also update the tif to what was last used of new type - timeInForce: lastTIF[type] || order.timeInForce, - expiresAt: undefined, - }); - clearErrors('expiresAt'); - }} - market={market} - marketData={marketData} - errorMessage={errors.type?.message} - /> - )} - /> - ( - { - update({ side }); - }} - /> - )} - /> - - ( - { - update({ timeInForce }); - // Set tif value for the given order type, so that when switching - // types we know the last used TIF for the given order type - setLastTIF((curr) => ({ - ...curr, - [order.type]: timeInForce, - expiresAt: undefined, - })); - clearErrors('expiresAt'); - }} - market={market} - marketData={marketData} - errorMessage={errors.timeInForce?.message} - /> - )} - /> - {order.type === Schema.OrderType.TYPE_LIMIT && - order.timeInForce === Schema.OrderTimeInForce.TIME_IN_FORCE_GTT && ( - ( - - update({ - expiresAt: expiresAt || undefined, - }) - } - errorMessage={errors.expiresAt?.message} - /> - )} - /> - )} - - = 1 || isReadOnly} - variant={order.side === Schema.Side.SIDE_BUY ? 'ternary' : 'secondary'} - /> - - + +
+ ( + { + if (type === OrderType.TYPE_NETWORK) return; + update({ + type, + // when changing type also update the tif to what was last used of new type + timeInForce: lastTIF[type] || order.timeInForce, + expiresAt: undefined, + }); + clearErrors('expiresAt'); + }} + market={market} + marketData={marketData} + errorMessage={errors.type?.message} + /> + )} + /> + ( + { + update({ side }); + }} + /> + )} + /> + + ( + { + update({ timeInForce }); + // Set tif value for the given order type, so that when switching + // types we know the last used TIF for the given order type + setLastTIF((curr) => ({ + ...curr, + [order.type]: timeInForce, + expiresAt: undefined, + })); + clearErrors('expiresAt'); + }} + market={market} + marketData={marketData} + errorMessage={errors.timeInForce?.message} + /> + )} + /> + {order.type === Schema.OrderType.TYPE_LIMIT && + order.timeInForce === Schema.OrderTimeInForce.TIME_IN_FORCE_GTT && ( + ( + + update({ + expiresAt: expiresAt || undefined, + }) + } + errorMessage={errors.expiresAt?.message} + /> + )} + /> + )} + + = 1 || isReadOnly} + variant={ + order.side === Schema.Side.SIDE_BUY ? 'ternary' : 'secondary' + } + /> + + +
); }; diff --git a/libs/market-depth/src/lib/orderbook.tsx b/libs/market-depth/src/lib/orderbook.tsx index 40d01cfa2..2f677a234 100644 --- a/libs/market-depth/src/lib/orderbook.tsx +++ b/libs/market-depth/src/lib/orderbook.tsx @@ -1,4 +1,3 @@ -import styles from './orderbook.module.scss'; import colors from 'tailwindcss/colors'; import { useEffect, useRef, useState, useCallback, Fragment } from 'react'; import classNames from 'classnames'; @@ -14,7 +13,7 @@ import { import * as Schema from '@vegaprotocol/types'; import { OrderbookRow } from './orderbook-row'; import { createRow } from './orderbook-data'; -import { Checkbox, Icon, Splash } from '@vegaprotocol/ui-toolkit'; +import { Checkbox, Icon, Splash, TinyScroll } from '@vegaprotocol/ui-toolkit'; import type { OrderbookData, OrderbookRowData } from './orderbook-data'; interface OrderbookProps extends OrderbookData { @@ -547,8 +546,8 @@ export const Orderbook = ({ {t('Cumulative vol')}
-
)} -
+
{data ? ( - onSelect?.(id)} /> + + onSelect?.(id)} /> + ) : (

{t('Could not load market')}

diff --git a/libs/ui-toolkit/src/components/index.ts b/libs/ui-toolkit/src/components/index.ts index 95fddfd41..897d3ee59 100644 --- a/libs/ui-toolkit/src/components/index.ts +++ b/libs/ui-toolkit/src/components/index.ts @@ -40,6 +40,7 @@ export * from './tabs'; export * from './text-area'; export * from './theme-switcher'; export * from './thumbs'; +export * from './tiny-scroll'; export * from './toast'; export * from './toggle'; export * from './tooltip'; diff --git a/libs/ui-toolkit/src/components/tiny-scroll/index.tsx b/libs/ui-toolkit/src/components/tiny-scroll/index.tsx new file mode 100644 index 000000000..06e4bbd13 --- /dev/null +++ b/libs/ui-toolkit/src/components/tiny-scroll/index.tsx @@ -0,0 +1 @@ +export * from './tiny-scroll'; diff --git a/libs/market-depth/src/lib/orderbook.module.scss b/libs/ui-toolkit/src/components/tiny-scroll/tiny-scroll.module.scss similarity index 100% rename from libs/market-depth/src/lib/orderbook.module.scss rename to libs/ui-toolkit/src/components/tiny-scroll/tiny-scroll.module.scss diff --git a/libs/ui-toolkit/src/components/tiny-scroll/tiny-scroll.tsx b/libs/ui-toolkit/src/components/tiny-scroll/tiny-scroll.tsx new file mode 100644 index 000000000..a03600164 --- /dev/null +++ b/libs/ui-toolkit/src/components/tiny-scroll/tiny-scroll.tsx @@ -0,0 +1,20 @@ +import styles from './tiny-scroll.module.scss'; +import { forwardRef } from 'react'; +import classNames from 'classnames'; +import type { HTMLAttributes, ReactNode } from 'react'; + +export interface Props extends HTMLAttributes { + children: ReactNode; +} + +export const TinyScroll = forwardRef( + ({ children, className, ...props }, ref) => ( +
+ {children} +
+ ) +); From 8693f3bfd87c2e547726a3c4192527554f8b2ffe Mon Sep 17 00:00:00 2001 From: Matthew Russell Date: Fri, 24 Mar 2023 17:06:22 -0700 Subject: [PATCH 09/23] chore(trading): dont show faucet button until connected (#3251) --- libs/deposits/src/lib/deposit-form.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/deposits/src/lib/deposit-form.tsx b/libs/deposits/src/lib/deposit-form.tsx index b7de29db6..df9f1701b 100644 --- a/libs/deposits/src/lib/deposit-form.tsx +++ b/libs/deposits/src/lib/deposit-form.tsx @@ -223,7 +223,7 @@ export const DepositForm = ({ {errors.asset.message} )} - {isFaucetable && selectedAsset && ( + {isActive && isFaucetable && selectedAsset && ( {t(`Get ${selectedAsset.symbol}`)} From 806ea74f7edaa8d2b48b96153b1d2a59615a397d Mon Sep 17 00:00:00 2001 From: dexturr Date: Sat, 25 Mar 2023 00:14:18 +0000 Subject: [PATCH 10/23] chore: update tranches Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- apps/static/src/assets/mainnet-tranches.json | 57 ++++++++++++-------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/apps/static/src/assets/mainnet-tranches.json b/apps/static/src/assets/mainnet-tranches.json index 7d562e094..53ee5e152 100644 --- a/apps/static/src/assets/mainnet-tranches.json +++ b/apps/static/src/assets/mainnet-tranches.json @@ -470,7 +470,7 @@ "tranche_end": "2023-04-06T00:00:00.000Z", "total_added": "14099", "total_removed": "123.82076687438", - "locked_amount": "5568.50490815412167935", + "locked_amount": "5453.16620258363147857", "deposits": [ { "amount": "30", @@ -3234,7 +3234,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "86666.297", "total_removed": "0", - "locked_amount": "60605.5469216463046930675", + "locked_amount": "60545.3317633013395734761", "deposits": [ { "amount": "86666.297", @@ -3300,7 +3300,7 @@ "tranche_end": "2023-06-01T00:00:00.000Z", "total_added": "2500", "total_removed": "0", - "locked_amount": "937.4131944444445", + "locked_amount": "933.92968432030925", "deposits": [ { "amount": "2500", @@ -3421,7 +3421,7 @@ "tranche_end": "2023-09-01T00:00:00.000Z", "total_added": "17500", "total_removed": "0", - "locked_amount": "15240.5674441425125", + "locked_amount": "15216.447922956924", "deposits": [ { "amount": "12500", @@ -3688,7 +3688,7 @@ "tranche_end": "2023-08-01T00:00:00.000Z", "total_added": "37500", "total_removed": "4333.837380825", - "locked_amount": "26777.00563996316625", + "locked_amount": "26724.46429941682125", "deposits": [ { "amount": "7500", @@ -3953,7 +3953,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "129999.45", "total_removed": "0", - "locked_amount": "60550.2519857626155446325", + "locked_amount": "60490.0917661730847372285", "deposits": [ { "amount": "129999.45", @@ -4019,7 +4019,7 @@ "tranche_end": "2023-09-03T00:00:00.000Z", "total_added": "62600", "total_removed": "0", - "locked_amount": "27825.902473363776362", + "locked_amount": "27782.40841577879386", "deposits": [ { "amount": "10000", @@ -4212,7 +4212,7 @@ "tranche_end": "2023-09-17T00:00:00.000Z", "total_added": "5000", "total_removed": "0", - "locked_amount": "2414.2969939117198", + "locked_amount": "2410.8230276509385", "deposits": [ { "amount": "5000", @@ -4423,7 +4423,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "97499.58", "total_removed": "0", - "locked_amount": "2616.35830983492408848394", + "locked_amount": "2557.34673859553573473728", "deposits": [ { "amount": "97499.58", @@ -4456,7 +4456,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "135173.4239508", "total_removed": "98230.390980249184455396", - "locked_amount": "3576.1101141258293357293164912", + "locked_amount": "3495.45148416433867921917354", "deposits": [ { "amount": "135173.4239508", @@ -4502,7 +4502,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "32499.86", "total_removed": "0", - "locked_amount": "1100.6567588562576310942", + "locked_amount": "1075.8316099111711168956", "deposits": [ { "amount": "32499.86", @@ -4535,7 +4535,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "10833.29", "total_removed": "0", - "locked_amount": "358.2530944873368448792", + "locked_amount": "350.1727494032538755829", "deposits": [ { "amount": "10833.29", @@ -4568,7 +4568,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "22749.93", "total_removed": "4720.860935375", - "locked_amount": "1339.2300815772250825845", + "locked_amount": "1309.02394694044393126098", "deposits": [ { "amount": "6500", @@ -4720,7 +4720,7 @@ "tranche_end": "2023-05-01T00:00:00.000Z", "total_added": "22500", "total_removed": "5870.8788942", - "locked_amount": "4629.739295580111675", + "locked_amount": "4598.214491252301075", "deposits": [ { "amount": "7500", @@ -5105,7 +5105,7 @@ "tranche_end": "2023-06-02T00:00:00.000Z", "total_added": "1939928.38", "total_removed": "928642.9598472029154", - "locked_amount": "368021.317932537977046898", + "locked_amount": "366673.4687844475326789554", "deposits": [ { "amount": "1852091.69", @@ -38763,7 +38763,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "3732368.4671", "total_removed": "700133.348465855088393", - "locked_amount": "590021.958977682773959664884", + "locked_amount": "587950.784108299416043149456", "deposits": [ { "amount": "1998.95815", @@ -40145,7 +40145,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "15870102.715470999700000001", "total_removed": "810192.49096623640785452", - "locked_amount": "7391867.56914513543573139808414748469991885", + "locked_amount": "7384523.31604044041973296912390612782211413", "deposits": [ { "amount": "16249.93", @@ -46360,7 +46360,7 @@ "tranche_end": "2023-05-05T00:00:00.000Z", "total_added": "14597706.0446472999", "total_removed": "5742425.939266423675267256", - "locked_amount": "1102679.716024424027206047775020354", + "locked_amount": "1095899.548451667627082263273712485", "deposits": [ { "amount": "129284.449", @@ -53770,7 +53770,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "5778205.3912159303", "total_removed": "3381706.364737906998719578", - "locked_amount": "118772.0212124693022954158157082682", + "locked_amount": "116093.1359983610765717016929850321", "deposits": [ { "amount": "552496.6455", @@ -55897,8 +55897,8 @@ "tranche_start": "2022-06-05T00:00:00.000Z", "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "472355.6199999996", - "total_removed": "38626.7020917017949", - "locked_amount": "93492.35210931880898404222678842", + "total_removed": "38647.6469927697949", + "locked_amount": "93164.16261192472745633452765092", "deposits": [ { "amount": "3000", @@ -62607,6 +62607,11 @@ "user": "0xdF99e2a50f8a5568Ff66ce4639810d346C29f6be", "tx": "0x9f3057fbc86a61fcb4211ca7a2062673f759fb529a30e545c8d8404cd57afa9e" }, + { + "amount": "20.944901068", + "user": "0x7C8D2D8BcFffcD48dBcb65C5Bb7588B66dcD22bb", + "tx": "0x31aa4c19d0ccd6e4584678574dc74419a619970449ec65d15f232dcd880d1f5e" + }, { "amount": "129.867928716", "user": "0x09996E1a67c371400bD5f52DF841f77B1741eB9d", @@ -76908,6 +76913,12 @@ } ], "withdrawals": [ + { + "amount": "20.944901068", + "user": "0x7C8D2D8BcFffcD48dBcb65C5Bb7588B66dcD22bb", + "tranche_id": 5, + "tx": "0x31aa4c19d0ccd6e4584678574dc74419a619970449ec65d15f232dcd880d1f5e" + }, { "amount": "34.404414004", "user": "0x7C8D2D8BcFffcD48dBcb65C5Bb7588B66dcD22bb", @@ -76952,8 +76963,8 @@ } ], "total_tokens": "400", - "withdrawn_tokens": "299.949606796", - "remaining_tokens": "100.050393204" + "withdrawn_tokens": "320.894507864", + "remaining_tokens": "79.105492136" }, { "address": "0xc56F9f1d5f124655FA9CB8f85C7701E13a2fBF4D", From cb6b9884665d1d8420ac36d3a932b163ac6a2f62 Mon Sep 17 00:00:00 2001 From: dexturr Date: Sat, 25 Mar 2023 06:09:33 +0000 Subject: [PATCH 11/23] chore: update tranches Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- apps/static/src/assets/mainnet-tranches.json | 40 ++++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/apps/static/src/assets/mainnet-tranches.json b/apps/static/src/assets/mainnet-tranches.json index 53ee5e152..43dde9f30 100644 --- a/apps/static/src/assets/mainnet-tranches.json +++ b/apps/static/src/assets/mainnet-tranches.json @@ -470,7 +470,7 @@ "tranche_end": "2023-04-06T00:00:00.000Z", "total_added": "14099", "total_removed": "123.82076687438", - "locked_amount": "5453.16620258363147857", + "locked_amount": "5340.9648192951022219", "deposits": [ { "amount": "30", @@ -3234,7 +3234,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "86666.297", "total_removed": "0", - "locked_amount": "60545.3317633013395734761", + "locked_amount": "60486.7545144252968043078", "deposits": [ { "amount": "86666.297", @@ -3300,7 +3300,7 @@ "tranche_end": "2023-06-01T00:00:00.000Z", "total_added": "2500", "total_removed": "0", - "locked_amount": "933.92968432030925", + "locked_amount": "930.540928978428875", "deposits": [ { "amount": "2500", @@ -3421,7 +3421,7 @@ "tranche_end": "2023-09-01T00:00:00.000Z", "total_added": "17500", "total_removed": "0", - "locked_amount": "15216.447922956924", + "locked_amount": "15192.984475644122", "deposits": [ { "amount": "12500", @@ -3688,7 +3688,7 @@ "tranche_end": "2023-08-01T00:00:00.000Z", "total_added": "37500", "total_removed": "4333.837380825", - "locked_amount": "26724.46429941682125", + "locked_amount": "26673.3521332105575", "deposits": [ { "amount": "7500", @@ -3953,7 +3953,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "129999.45", "total_removed": "0", - "locked_amount": "60490.0917661730847372285", + "locked_amount": "60431.567961666161758575", "deposits": [ { "amount": "129999.45", @@ -4019,7 +4019,7 @@ "tranche_end": "2023-09-03T00:00:00.000Z", "total_added": "62600", "total_removed": "0", - "locked_amount": "27782.40841577879386", + "locked_amount": "27740.09743784880546", "deposits": [ { "amount": "10000", @@ -4212,7 +4212,7 @@ "tranche_end": "2023-09-17T00:00:00.000Z", "total_added": "5000", "total_removed": "0", - "locked_amount": "2410.8230276509385", + "locked_amount": "2407.443556570269", "deposits": [ { "amount": "5000", @@ -4423,7 +4423,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "97499.58", "total_removed": "0", - "locked_amount": "2557.34673859553573473728", + "locked_amount": "2499.94033811323278964236", "deposits": [ { "amount": "97499.58", @@ -4456,7 +4456,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "135173.4239508", "total_removed": "98230.390980249184455396", - "locked_amount": "3495.45148416433867921917354", + "locked_amount": "3416.9868455066189314186493928", "deposits": [ { "amount": "135173.4239508", @@ -4502,7 +4502,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "32499.86", "total_removed": "0", - "locked_amount": "1075.8316099111711168956", + "locked_amount": "1051.6817285837783498602", "deposits": [ { "amount": "32499.86", @@ -4535,7 +4535,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "10833.29", "total_removed": "0", - "locked_amount": "350.1727494032538755829", + "locked_amount": "342.3121973760895785756", "deposits": [ { "amount": "10833.29", @@ -4568,7 +4568,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "22749.93", "total_removed": "4720.860935375", - "locked_amount": "1309.02394694044393126098", + "locked_amount": "1279.63944784031527056942", "deposits": [ { "amount": "6500", @@ -4720,7 +4720,7 @@ "tranche_end": "2023-05-01T00:00:00.000Z", "total_added": "22500", "total_removed": "5870.8788942", - "locked_amount": "4598.214491252301075", + "locked_amount": "4567.54719152854395", "deposits": [ { "amount": "7500", @@ -5105,7 +5105,7 @@ "tranche_end": "2023-06-02T00:00:00.000Z", "total_added": "1939928.38", "total_removed": "928642.9598472029154", - "locked_amount": "366673.4687844475326789554", + "locked_amount": "365362.2824126915261888734", "deposits": [ { "amount": "1852091.69", @@ -38763,7 +38763,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "3732368.4671", "total_removed": "700133.348465855088393", - "locked_amount": "587950.784108299416043149456", + "locked_amount": "585935.947161518754243873612", "deposits": [ { "amount": "1998.95815", @@ -40145,7 +40145,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "15870102.715470999700000001", "total_removed": "810192.49096623640785452", - "locked_amount": "7384523.31604044041973296912390612782211413", + "locked_amount": "7377378.8335920530435233742615921318058935", "deposits": [ { "amount": "16249.93", @@ -46360,7 +46360,7 @@ "tranche_end": "2023-05-05T00:00:00.000Z", "total_added": "14597706.0446472999", "total_removed": "5742425.939266423675267256", - "locked_amount": "1095899.548451667627082263273712485", + "locked_amount": "1089303.807873268334685923262124887", "deposits": [ { "amount": "129284.449", @@ -53770,7 +53770,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "5778205.3912159303", "total_removed": "3381706.364737906998719578", - "locked_amount": "116093.1359983610765717016929850321", + "locked_amount": "113487.1190051282633534558840554409", "deposits": [ { "amount": "552496.6455", @@ -55898,7 +55898,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "472355.6199999996", "total_removed": "38647.6469927697949", - "locked_amount": "93164.16261192472745633452765092", + "locked_amount": "92844.900180408328706499814104528", "deposits": [ { "amount": "3000", From 333a7d620699fa646e43346809d39f975106e731 Mon Sep 17 00:00:00 2001 From: dexturr Date: Sat, 25 Mar 2023 12:10:21 +0000 Subject: [PATCH 12/23] chore: update tranches Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- apps/static/src/assets/mainnet-tranches.json | 95 +++++++++++--------- 1 file changed, 53 insertions(+), 42 deletions(-) diff --git a/apps/static/src/assets/mainnet-tranches.json b/apps/static/src/assets/mainnet-tranches.json index 43dde9f30..8a3129e2a 100644 --- a/apps/static/src/assets/mainnet-tranches.json +++ b/apps/static/src/assets/mainnet-tranches.json @@ -470,7 +470,7 @@ "tranche_end": "2023-04-06T00:00:00.000Z", "total_added": "14099", "total_removed": "123.82076687438", - "locked_amount": "5340.9648192951022219", + "locked_amount": "5227.0052721774194458", "deposits": [ { "amount": "30", @@ -3234,7 +3234,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "86666.297", "total_removed": "0", - "locked_amount": "60486.7545144252968043078", + "locked_amount": "60427.2593766857944383273", "deposits": [ { "amount": "86666.297", @@ -3300,7 +3300,7 @@ "tranche_end": "2023-06-01T00:00:00.000Z", "total_added": "2500", "total_removed": "0", - "locked_amount": "930.540928978428875", + "locked_amount": "927.09907280219775", "deposits": [ { "amount": "2500", @@ -3421,7 +3421,7 @@ "tranche_end": "2023-09-01T00:00:00.000Z", "total_added": "17500", "total_removed": "0", - "locked_amount": "15192.984475644122", + "locked_amount": "15169.1533627717405", "deposits": [ { "amount": "12500", @@ -3688,7 +3688,7 @@ "tranche_end": "2023-08-01T00:00:00.000Z", "total_added": "37500", "total_removed": "4333.837380825", - "locked_amount": "26673.3521332105575", + "locked_amount": "26621.4390538674", "deposits": [ { "amount": "7500", @@ -3953,7 +3953,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "129999.45", "total_removed": "0", - "locked_amount": "60431.567961666161758575", + "locked_amount": "60372.12710575388096349", "deposits": [ { "amount": "129999.45", @@ -4019,7 +4019,7 @@ "tranche_end": "2023-09-03T00:00:00.000Z", "total_added": "62600", "total_removed": "0", - "locked_amount": "27740.09743784880546", + "locked_amount": "27697.12345890410856", "deposits": [ { "amount": "10000", @@ -4212,7 +4212,7 @@ "tranche_end": "2023-09-17T00:00:00.000Z", "total_added": "5000", "total_removed": "0", - "locked_amount": "2407.443556570269", + "locked_amount": "2404.0111301369865", "deposits": [ { "amount": "5000", @@ -4423,7 +4423,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "97499.58", "total_removed": "0", - "locked_amount": "2499.94033811323278964236", + "locked_amount": "2441.63439562947198183852", "deposits": [ { "amount": "97499.58", @@ -4456,7 +4456,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "135173.4239508", "total_removed": "98230.390980249184455396", - "locked_amount": "3416.9868455066189314186493928", + "locked_amount": "3337.292688232358210523304716", "deposits": [ { "amount": "135173.4239508", @@ -4502,7 +4502,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "32499.86", "total_removed": "0", - "locked_amount": "1051.6817285837783498602", + "locked_amount": "1027.1534254706333954782", "deposits": [ { "amount": "32499.86", @@ -4535,7 +4535,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "10833.29", "total_removed": "0", - "locked_amount": "342.3121973760895785756", + "locked_amount": "334.32847272977939392164", "deposits": [ { "amount": "10833.29", @@ -4568,7 +4568,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "22749.93", "total_removed": "4720.860935375", - "locked_amount": "1279.63944784031527056942", + "locked_amount": "1249.7945019797122741485", "deposits": [ { "amount": "6500", @@ -4720,7 +4720,7 @@ "tranche_end": "2023-05-01T00:00:00.000Z", "total_added": "22500", "total_removed": "5870.8788942", - "locked_amount": "4567.54719152854395", + "locked_amount": "4536.3993439226526", "deposits": [ { "amount": "7500", @@ -5105,7 +5105,7 @@ "tranche_end": "2023-06-02T00:00:00.000Z", "total_added": "1939928.38", "total_removed": "928642.9598472029154", - "locked_amount": "365362.2824126915261888734", + "locked_amount": "364030.5501226541659266872", "deposits": [ { "amount": "1852091.69", @@ -10571,10 +10571,15 @@ "tranche_id": 11, "tranche_start": "2021-09-03T00:00:00.000Z", "tranche_end": "2022-09-03T00:00:00.000Z", - "total_added": "57058.000000000000000003", + "total_added": "57093.000000000000000003", "total_removed": "48157.21518131551", "locked_amount": "0", "deposits": [ + { + "amount": "35", + "user": "0xf9c6C5F942B94Db9dedC550956865cf99D743959", + "tx": "0x9ab57768a7d30d87e35284719202ce92878929d34e12c307010406874a7692ea" + }, { "amount": "150", "user": "0xEb01fF124D71b6C7E6613fd6E0A86c28C733F008", @@ -22219,6 +22224,33 @@ } ], "users": [ + { + "address": "0xf9c6C5F942B94Db9dedC550956865cf99D743959", + "deposits": [ + { + "amount": "35", + "user": "0xf9c6C5F942B94Db9dedC550956865cf99D743959", + "tranche_id": 11, + "tx": "0x9ab57768a7d30d87e35284719202ce92878929d34e12c307010406874a7692ea" + }, + { + "amount": "20", + "user": "0xf9c6C5F942B94Db9dedC550956865cf99D743959", + "tranche_id": 11, + "tx": "0x94ed5d3d59ce96109b2ab2616e4871c17772a8fd8fb634d97f0dd6bdef6e12e8" + }, + { + "amount": "20", + "user": "0xf9c6C5F942B94Db9dedC550956865cf99D743959", + "tranche_id": 11, + "tx": "0x2d658ba8dc7bccaef7e341be32f899f4e25b3cfc29a8732e652346f76a53f137" + } + ], + "withdrawals": [], + "total_tokens": "75", + "withdrawn_tokens": "0", + "remaining_tokens": "75" + }, { "address": "0xEb01fF124D71b6C7E6613fd6E0A86c28C733F008", "deposits": [ @@ -24945,27 +24977,6 @@ "withdrawn_tokens": "0", "remaining_tokens": "25" }, - { - "address": "0xf9c6C5F942B94Db9dedC550956865cf99D743959", - "deposits": [ - { - "amount": "20", - "user": "0xf9c6C5F942B94Db9dedC550956865cf99D743959", - "tranche_id": 11, - "tx": "0x94ed5d3d59ce96109b2ab2616e4871c17772a8fd8fb634d97f0dd6bdef6e12e8" - }, - { - "amount": "20", - "user": "0xf9c6C5F942B94Db9dedC550956865cf99D743959", - "tranche_id": 11, - "tx": "0x2d658ba8dc7bccaef7e341be32f899f4e25b3cfc29a8732e652346f76a53f137" - } - ], - "withdrawals": [], - "total_tokens": "40", - "withdrawn_tokens": "0", - "remaining_tokens": "40" - }, { "address": "0x871203d701855E9cb85183aa426761caD7Dd7b22", "deposits": [ @@ -38763,7 +38774,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "3732368.4671", "total_removed": "700133.348465855088393", - "locked_amount": "585935.947161518754243873612", + "locked_amount": "583889.538291669156008501676", "deposits": [ { "amount": "1998.95815", @@ -40145,7 +40156,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "15870102.715470999700000001", "total_removed": "810192.49096623640785452", - "locked_amount": "7377378.8335920530435233742615921318058935", + "locked_amount": "7370122.3991315733424690756111284825182482", "deposits": [ { "amount": "16249.93", @@ -46360,7 +46371,7 @@ "tranche_end": "2023-05-05T00:00:00.000Z", "total_added": "14597706.0446472999", "total_removed": "5742425.939266423675267256", - "locked_amount": "1089303.807873268334685923262124887", + "locked_amount": "1082604.713912124270690380222129973", "deposits": [ { "amount": "129284.449", @@ -53770,7 +53781,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "5778205.3912159303", "total_removed": "3381706.364737906998719578", - "locked_amount": "113487.1190051282633534558840554409", + "locked_amount": "110840.2664652980237472149251575589", "deposits": [ { "amount": "552496.6455", @@ -55898,7 +55909,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "472355.6199999996", "total_removed": "38647.6469927697949", - "locked_amount": "92844.900180408328706499814104528", + "locked_amount": "92520.63499720882964367632876712", "deposits": [ { "amount": "3000", From af5e666d5ecc15d4cb2c05f1b6aa021bdf48a29b Mon Sep 17 00:00:00 2001 From: dexturr Date: Sat, 25 Mar 2023 18:09:35 +0000 Subject: [PATCH 13/23] chore: update tranches Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- apps/static/src/assets/mainnet-tranches.json | 57 ++++++++++++-------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/apps/static/src/assets/mainnet-tranches.json b/apps/static/src/assets/mainnet-tranches.json index 8a3129e2a..03d85a274 100644 --- a/apps/static/src/assets/mainnet-tranches.json +++ b/apps/static/src/assets/mainnet-tranches.json @@ -470,7 +470,7 @@ "tranche_end": "2023-04-06T00:00:00.000Z", "total_added": "14099", "total_removed": "123.82076687438", - "locked_amount": "5227.0052721774194458", + "locked_amount": "5113.5510655615286429", "deposits": [ { "amount": "30", @@ -3234,7 +3234,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "86666.297", "total_removed": "0", - "locked_amount": "60427.2593766857944383273", + "locked_amount": "60368.0280632902763077756", "deposits": [ { "amount": "86666.297", @@ -3300,7 +3300,7 @@ "tranche_end": "2023-06-01T00:00:00.000Z", "total_added": "2500", "total_removed": "0", - "locked_amount": "927.09907280219775", + "locked_amount": "923.672479141229", "deposits": [ { "amount": "2500", @@ -3421,7 +3421,7 @@ "tranche_end": "2023-09-01T00:00:00.000Z", "total_added": "17500", "total_removed": "0", - "locked_amount": "15169.1533627717405", + "locked_amount": "15145.427926227858", "deposits": [ { "amount": "12500", @@ -3688,7 +3688,7 @@ "tranche_end": "2023-08-01T00:00:00.000Z", "total_added": "37500", "total_removed": "4333.837380825", - "locked_amount": "26621.4390538674", + "locked_amount": "26569.756177102515", "deposits": [ { "amount": "7500", @@ -3953,7 +3953,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "129999.45", "total_removed": "0", - "locked_amount": "60372.12710575388096349", + "locked_amount": "60312.949833479059907295", "deposits": [ { "amount": "129999.45", @@ -4019,7 +4019,7 @@ "tranche_end": "2023-09-03T00:00:00.000Z", "total_added": "62600", "total_removed": "0", - "locked_amount": "27697.12345890410856", + "locked_amount": "27654.3400431253147", "deposits": [ { "amount": "10000", @@ -4212,7 +4212,7 @@ "tranche_end": "2023-09-17T00:00:00.000Z", "total_added": "5000", "total_removed": "0", - "locked_amount": "2404.0111301369865", + "locked_amount": "2400.593924403856", "deposits": [ { "amount": "5000", @@ -4423,7 +4423,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "97499.58", "total_removed": "0", - "locked_amount": "2441.63439562947198183852", + "locked_amount": "2383.5870041401516613892", "deposits": [ { "amount": "97499.58", @@ -4456,7 +4456,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "135173.4239508", "total_removed": "98230.390980249184455396", - "locked_amount": "3337.292688232358210523304716", + "locked_amount": "3257.9519255305221640435540884", "deposits": [ { "amount": "135173.4239508", @@ -4502,7 +4502,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "32499.86", "total_removed": "0", - "locked_amount": "1027.1534254706333954782", + "locked_amount": "1002.73389029590478862682", "deposits": [ { "amount": "32499.86", @@ -4535,7 +4535,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "10833.29", "total_removed": "0", - "locked_amount": "334.32847272977939392164", + "locked_amount": "326.38015099196576633265", "deposits": [ { "amount": "10833.29", @@ -4568,7 +4568,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "22749.93", "total_removed": "4720.860935375", - "locked_amount": "1249.7945019797122741485", + "locked_amount": "1220.081900098167470007", "deposits": [ { "amount": "6500", @@ -4720,7 +4720,7 @@ "tranche_end": "2023-05-01T00:00:00.000Z", "total_added": "22500", "total_removed": "5870.8788942", - "locked_amount": "4536.3993439226526", + "locked_amount": "4505.38961786372115", "deposits": [ { "amount": "7500", @@ -5105,7 +5105,7 @@ "tranche_end": "2023-06-02T00:00:00.000Z", "total_added": "1939928.38", "total_removed": "928642.9598472029154", - "locked_amount": "364030.5501226541659266872", + "locked_amount": "362704.7232462544338886854", "deposits": [ { "amount": "1852091.69", @@ -38774,7 +38774,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "3732368.4671", "total_removed": "700133.348465855088393", - "locked_amount": "583889.538291669156008501676", + "locked_amount": "581852.109459817953467793082", "deposits": [ { "amount": "1998.95815", @@ -40156,7 +40156,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "15870102.715470999700000001", "total_removed": "810192.49096623640785452", - "locked_amount": "7370122.3991315733424690756111284825182482", + "locked_amount": "7362897.80730926398419425903669269168505006", "deposits": [ { "amount": "16249.93", @@ -46370,8 +46370,8 @@ "tranche_start": "2021-11-05T00:00:00.000Z", "tranche_end": "2023-05-05T00:00:00.000Z", "total_added": "14597706.0446472999", - "total_removed": "5742425.939266423675267256", - "locked_amount": "1082604.713912124270690380222129973", + "total_removed": "5779888.686370635362792996", + "locked_amount": "1075935.016871221908748202486920344", "deposits": [ { "amount": "129284.449", @@ -46580,6 +46580,11 @@ } ], "withdrawals": [ + { + "amount": "37462.74710421168752574", + "user": "0x66827bCD635f2bB1779d68c46aEB16541bCA6ba8", + "tx": "0x4eb2ed2540197b432b08d7ed69ab17a69909e2055f645ce8a0922c1a29ffeec8" + }, { "amount": "755.482067130393772", "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", @@ -52619,6 +52624,12 @@ } ], "withdrawals": [ + { + "amount": "37462.74710421168752574", + "user": "0x66827bCD635f2bB1779d68c46aEB16541bCA6ba8", + "tranche_id": 3, + "tx": "0x4eb2ed2540197b432b08d7ed69ab17a69909e2055f645ce8a0922c1a29ffeec8" + }, { "amount": "80421.5336580481619385", "user": "0x66827bCD635f2bB1779d68c46aEB16541bCA6ba8", @@ -52951,8 +52962,8 @@ } ], "total_tokens": "1266324.603486", - "withdrawn_tokens": "1135136.99412579103610352", - "remaining_tokens": "131187.60936020896389648" + "withdrawn_tokens": "1172599.74123000272362926", + "remaining_tokens": "93724.86225599727637074" }, { "address": "0xC5d9221EB9c28A69859264c0A2Fe0d3272228296", @@ -53781,7 +53792,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "5778205.3912159303", "total_removed": "3381706.364737906998719578", - "locked_amount": "110840.2664652980237472149251575589", + "locked_amount": "108205.0288264454680579669707200531", "deposits": [ { "amount": "552496.6455", @@ -55909,7 +55920,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "472355.6199999996", "total_removed": "38647.6469927697949", - "locked_amount": "92520.63499720882964367632876712", + "locked_amount": "92197.792752362325100793071334328", "deposits": [ { "amount": "3000", From 051e3da366f5014088403f3fee4f2d4d280040f4 Mon Sep 17 00:00:00 2001 From: dexturr Date: Sun, 26 Mar 2023 00:17:44 +0000 Subject: [PATCH 14/23] chore: update tranches Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- apps/static/src/assets/mainnet-tranches.json | 40 ++++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/apps/static/src/assets/mainnet-tranches.json b/apps/static/src/assets/mainnet-tranches.json index 03d85a274..7017fef93 100644 --- a/apps/static/src/assets/mainnet-tranches.json +++ b/apps/static/src/assets/mainnet-tranches.json @@ -470,7 +470,7 @@ "tranche_end": "2023-04-06T00:00:00.000Z", "total_added": "14099", "total_removed": "123.82076687438", - "locked_amount": "5113.5510655615286429", + "locked_amount": "4997.2806384408606547", "deposits": [ { "amount": "30", @@ -3234,7 +3234,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "86666.297", "total_removed": "0", - "locked_amount": "60368.0280632902763077756", + "locked_amount": "60307.3264788110685875381", "deposits": [ { "amount": "86666.297", @@ -3300,7 +3300,7 @@ "tranche_end": "2023-06-01T00:00:00.000Z", "total_added": "2500", "total_removed": "0", - "locked_amount": "923.672479141229", + "locked_amount": "920.16082875457875", "deposits": [ { "amount": "2500", @@ -3421,7 +3421,7 @@ "tranche_end": "2023-09-01T00:00:00.000Z", "total_added": "17500", "total_removed": "0", - "locked_amount": "15145.427926227858", + "locked_amount": "15121.113564311594", "deposits": [ { "amount": "12500", @@ -3688,7 +3688,7 @@ "tranche_end": "2023-08-01T00:00:00.000Z", "total_added": "37500", "total_removed": "4333.837380825", - "locked_amount": "26569.756177102515", + "locked_amount": "26516.790400552485", "deposits": [ { "amount": "7500", @@ -3953,7 +3953,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "129999.45", "total_removed": "0", - "locked_amount": "60312.949833479059907295", + "locked_amount": "60252.3036315579345939315", "deposits": [ { "amount": "129999.45", @@ -4019,7 +4019,7 @@ "tranche_end": "2023-09-03T00:00:00.000Z", "total_added": "62600", "total_removed": "0", - "locked_amount": "27654.3400431253147", + "locked_amount": "27610.49463470319346", "deposits": [ { "amount": "10000", @@ -4212,7 +4212,7 @@ "tranche_end": "2023-09-17T00:00:00.000Z", "total_added": "5000", "total_removed": "0", - "locked_amount": "2400.593924403856", + "locked_amount": "2397.091894977169", "deposits": [ { "amount": "5000", @@ -4423,7 +4423,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "97499.58", "total_removed": "0", - "locked_amount": "2383.5870041401516613892", + "locked_amount": "2324.09872950477467044146", "deposits": [ { "amount": "97499.58", @@ -4456,7 +4456,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "135173.4239508", "total_removed": "98230.390980249184455396", - "locked_amount": "3257.9519255305221640435540884", + "locked_amount": "3176.6417243261343152810671776", "deposits": [ { "amount": "135173.4239508", @@ -4502,7 +4502,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "32499.86", "total_removed": "0", - "locked_amount": "1002.73389029590478862682", + "locked_amount": "977.7082004643572522096", "deposits": [ { "amount": "32499.86", @@ -4535,7 +4535,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "10833.29", "total_removed": "0", - "locked_amount": "326.38015099196576633265", + "locked_amount": "318.23453179534308075186", "deposits": [ { "amount": "10833.29", @@ -4568,7 +4568,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "22749.93", "total_removed": "4720.860935375", - "locked_amount": "1220.081900098167470007", + "locked_amount": "1189.63175624999905208625", "deposits": [ { "amount": "6500", @@ -4720,7 +4720,7 @@ "tranche_end": "2023-05-01T00:00:00.000Z", "total_added": "22500", "total_removed": "5870.8788942", - "locked_amount": "4505.38961786372115", + "locked_amount": "4473.61015193370225", "deposits": [ { "amount": "7500", @@ -5105,7 +5105,7 @@ "tranche_end": "2023-06-02T00:00:00.000Z", "total_added": "1939928.38", "total_removed": "928642.9598472029154", - "locked_amount": "362704.7232462544338886854", + "locked_amount": "361345.9859917694439511248", "deposits": [ { "amount": "1852091.69", @@ -38774,7 +38774,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "3732368.4671", "total_removed": "700133.348465855088393", - "locked_amount": "581852.109459817953467793082", + "locked_amount": "579764.297888457857002013823", "deposits": [ { "amount": "1998.95815", @@ -40156,7 +40156,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "15870102.715470999700000001", "total_removed": "810192.49096623640785452", - "locked_amount": "7362897.80730926398419425903669269168505006", + "locked_amount": "7355494.56152753534275504610713881858637467", "deposits": [ { "amount": "16249.93", @@ -46371,7 +46371,7 @@ "tranche_end": "2023-05-05T00:00:00.000Z", "total_added": "14597706.0446472999", "total_removed": "5779888.686370635362792996", - "locked_amount": "1075935.016871221908748202486920344", + "locked_amount": "1069100.387635702134052055505604893", "deposits": [ { "amount": "129284.449", @@ -53792,7 +53792,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "5778205.3912159303", "total_removed": "3381706.364737906998719578", - "locked_amount": "108205.0288264454680579669707200531", + "locked_amount": "105504.6254799983571440892675777232", "deposits": [ { "amount": "552496.6455", @@ -55920,7 +55920,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "472355.6199999996", "total_removed": "38647.6469927697949", - "locked_amount": "92197.792752362325100793071334328", + "locked_amount": "91866.96707444055133734514155252", "deposits": [ { "amount": "3000", From 96af8035d0825d90477deb46708f3cf16acbf019 Mon Sep 17 00:00:00 2001 From: dexturr Date: Sun, 26 Mar 2023 06:07:03 +0000 Subject: [PATCH 15/23] chore: update tranches Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- apps/static/src/assets/mainnet-tranches.json | 84 +++++++++++++++----- 1 file changed, 62 insertions(+), 22 deletions(-) diff --git a/apps/static/src/assets/mainnet-tranches.json b/apps/static/src/assets/mainnet-tranches.json index 7017fef93..79bb532dd 100644 --- a/apps/static/src/assets/mainnet-tranches.json +++ b/apps/static/src/assets/mainnet-tranches.json @@ -36,10 +36,20 @@ "tranche_id": 54, "tranche_start": "2023-04-06T00:00:00.000Z", "tranche_end": "2023-05-06T00:00:00.000Z", - "total_added": "2589", + "total_added": "2682", "total_removed": "0", - "locked_amount": "2589", + "locked_amount": "2682", "deposits": [ + { + "amount": "33", + "user": "0xb5e340788922791727C240c33D27060157845291", + "tx": "0xcfe671a77edfb88442fa10e0da70625e2dee1c36815c0f82671219e2ff8d6bde" + }, + { + "amount": "60", + "user": "0x4081455DB9Ec3B9b66f370Fa12161E6763c40779", + "tx": "0xdddd6b792f32b56f79670e6aa195907eca065edd21ab4d4d9f8cb065f54577cd" + }, { "amount": "111", "user": "0x268070d5EEd5b24E34a5F4C17B5482178b18089D", @@ -123,6 +133,36 @@ ], "withdrawals": [], "users": [ + { + "address": "0xb5e340788922791727C240c33D27060157845291", + "deposits": [ + { + "amount": "33", + "user": "0xb5e340788922791727C240c33D27060157845291", + "tranche_id": 54, + "tx": "0xcfe671a77edfb88442fa10e0da70625e2dee1c36815c0f82671219e2ff8d6bde" + } + ], + "withdrawals": [], + "total_tokens": "33", + "withdrawn_tokens": "0", + "remaining_tokens": "33" + }, + { + "address": "0x4081455DB9Ec3B9b66f370Fa12161E6763c40779", + "deposits": [ + { + "amount": "60", + "user": "0x4081455DB9Ec3B9b66f370Fa12161E6763c40779", + "tranche_id": 54, + "tx": "0xdddd6b792f32b56f79670e6aa195907eca065edd21ab4d4d9f8cb065f54577cd" + } + ], + "withdrawals": [], + "total_tokens": "60", + "withdrawn_tokens": "0", + "remaining_tokens": "60" + }, { "address": "0x268070d5EEd5b24E34a5F4C17B5482178b18089D", "deposits": [ @@ -470,7 +510,7 @@ "tranche_end": "2023-04-06T00:00:00.000Z", "total_added": "14099", "total_removed": "123.82076687438", - "locked_amount": "4997.2806384408606547", + "locked_amount": "4886.9479622162483516", "deposits": [ { "amount": "30", @@ -3234,7 +3274,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "86666.297", "total_removed": "0", - "locked_amount": "60307.3264788110685875381", + "locked_amount": "60249.7248303737276333672", "deposits": [ { "amount": "86666.297", @@ -3300,7 +3340,7 @@ "tranche_end": "2023-06-01T00:00:00.000Z", "total_added": "2500", "total_removed": "0", - "locked_amount": "920.16082875457875", + "locked_amount": "916.82851292226275", "deposits": [ { "amount": "2500", @@ -3421,7 +3461,7 @@ "tranche_end": "2023-09-01T00:00:00.000Z", "total_added": "17500", "total_removed": "0", - "locked_amount": "15121.113564311594", + "locked_amount": "15098.0408992552335", "deposits": [ { "amount": "12500", @@ -3688,7 +3728,7 @@ "tranche_end": "2023-08-01T00:00:00.000Z", "total_added": "37500", "total_removed": "4333.837380825", - "locked_amount": "26516.790400552485", + "locked_amount": "26466.52950429711375", "deposits": [ { "amount": "7500", @@ -3953,7 +3993,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "129999.45", "total_removed": "0", - "locked_amount": "60252.3036315579345939315", + "locked_amount": "60194.754537377079512025", "deposits": [ { "amount": "129999.45", @@ -4019,7 +4059,7 @@ "tranche_end": "2023-09-03T00:00:00.000Z", "total_added": "62600", "total_removed": "0", - "locked_amount": "27610.49463470319346", + "locked_amount": "27568.88834348046737", "deposits": [ { "amount": "10000", @@ -4212,7 +4252,7 @@ "tranche_end": "2023-09-17T00:00:00.000Z", "total_added": "5000", "total_removed": "0", - "locked_amount": "2397.091894977169", + "locked_amount": "2393.7687087772702", "deposits": [ { "amount": "5000", @@ -4423,7 +4463,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "97499.58", "total_removed": "0", - "locked_amount": "2324.09872950477467044146", + "locked_amount": "2267.64842905396328013372", "deposits": [ { "amount": "97499.58", @@ -4456,7 +4496,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "135173.4239508", "total_removed": "98230.390980249184455396", - "locked_amount": "3176.6417243261343152810671776", + "locked_amount": "3099.4839093476814766983303324", "deposits": [ { "amount": "135173.4239508", @@ -4502,7 +4542,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "32499.86", "total_removed": "0", - "locked_amount": "977.7082004643572522096", + "locked_amount": "953.96053390924807095284", "deposits": [ { "amount": "32499.86", @@ -4535,7 +4575,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "10833.29", "total_removed": "0", - "locked_amount": "318.23453179534308075186", + "locked_amount": "310.50489677355653588642", "deposits": [ { "amount": "10833.29", @@ -4568,7 +4608,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "22749.93", "total_removed": "4720.860935375", - "locked_amount": "1189.63175624999905208625", + "locked_amount": "1160.7366541557599685873", "deposits": [ { "amount": "6500", @@ -4720,7 +4760,7 @@ "tranche_end": "2023-05-01T00:00:00.000Z", "total_added": "22500", "total_removed": "5870.8788942", - "locked_amount": "4473.61015193370225", + "locked_amount": "4443.45361418047815", "deposits": [ { "amount": "7500", @@ -5105,7 +5145,7 @@ "tranche_end": "2023-06-02T00:00:00.000Z", "total_added": "1939928.38", "total_removed": "928642.9598472029154", - "locked_amount": "361345.9859917694439511248", + "locked_amount": "360056.637347528030894374", "deposits": [ { "amount": "1852091.69", @@ -38774,7 +38814,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "3732368.4671", "total_removed": "700133.348465855088393", - "locked_amount": "579764.297888457857002013823", + "locked_amount": "577783.017925778319687112262", "deposits": [ { "amount": "1998.95815", @@ -40156,7 +40196,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "15870102.715470999700000001", "total_removed": "810192.49096623640785452", - "locked_amount": "7355494.56152753534275504610713881858637467", + "locked_amount": "7348469.0699902058806497806804541823736145", "deposits": [ { "amount": "16249.93", @@ -46371,7 +46411,7 @@ "tranche_end": "2023-05-05T00:00:00.000Z", "total_added": "14597706.0446472999", "total_removed": "5779888.686370635362792996", - "locked_amount": "1069100.387635702134052055505604893", + "locked_amount": "1062614.498706625905831745359093105", "deposits": [ { "amount": "129284.449", @@ -53792,7 +53832,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "5778205.3912159303", "total_removed": "3381706.364737906998719578", - "locked_amount": "105504.6254799983571440892675777232", + "locked_amount": "102942.0115377905602694462944703395", "deposits": [ { "amount": "552496.6455", @@ -55920,7 +55960,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "472355.6199999996", "total_removed": "38647.6469927697949", - "locked_amount": "91866.96707444055133734514155252", + "locked_amount": "91553.021938874865792954637544388", "deposits": [ { "amount": "3000", From 2fdebbd694237d1a5b869124854e6346e85be98e Mon Sep 17 00:00:00 2001 From: dexturr Date: Sun, 26 Mar 2023 12:10:22 +0000 Subject: [PATCH 16/23] chore: update tranches Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- apps/static/src/assets/mainnet-tranches.json | 40 ++++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/apps/static/src/assets/mainnet-tranches.json b/apps/static/src/assets/mainnet-tranches.json index 79bb532dd..d98490771 100644 --- a/apps/static/src/assets/mainnet-tranches.json +++ b/apps/static/src/assets/mainnet-tranches.json @@ -510,7 +510,7 @@ "tranche_end": "2023-04-06T00:00:00.000Z", "total_added": "14099", "total_removed": "123.82076687438", - "locked_amount": "4886.9479622162483516", + "locked_amount": "4772.19355660095543706", "deposits": [ { "amount": "30", @@ -3274,7 +3274,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "86666.297", "total_removed": "0", - "locked_amount": "60249.7248303737276333672", + "locked_amount": "60189.8147189264986193052", "deposits": [ { "amount": "86666.297", @@ -3340,7 +3340,7 @@ "tranche_end": "2023-06-01T00:00:00.000Z", "total_added": "2500", "total_removed": "0", - "locked_amount": "916.82851292226275", + "locked_amount": "913.362650081400175", "deposits": [ { "amount": "2500", @@ -3461,7 +3461,7 @@ "tranche_end": "2023-09-01T00:00:00.000Z", "total_added": "17500", "total_removed": "0", - "locked_amount": "15098.0408992552335", + "locked_amount": "15074.043566324477", "deposits": [ { "amount": "12500", @@ -3728,7 +3728,7 @@ "tranche_end": "2023-08-01T00:00:00.000Z", "total_added": "37500", "total_removed": "4333.837380825", - "locked_amount": "26466.52950429711375", + "locked_amount": "26414.25433548189", "deposits": [ { "amount": "7500", @@ -3993,7 +3993,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "129999.45", "total_removed": "0", - "locked_amount": "60194.754537377079512025", + "locked_amount": "60134.899086368363315205", "deposits": [ { "amount": "129999.45", @@ -4059,7 +4059,7 @@ "tranche_end": "2023-09-03T00:00:00.000Z", "total_added": "62600", "total_removed": "0", - "locked_amount": "27568.88834348046737", + "locked_amount": "27525.614624556060258", "deposits": [ { "amount": "10000", @@ -4252,7 +4252,7 @@ "tranche_end": "2023-09-17T00:00:00.000Z", "total_added": "5000", "total_removed": "0", - "locked_amount": "2393.7687087772702", + "locked_amount": "2390.3123414510402", "deposits": [ { "amount": "5000", @@ -4463,7 +4463,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "97499.58", "total_removed": "0", - "locked_amount": "2267.64842905396328013372", + "locked_amount": "2208.93580740188571634446", "deposits": [ { "amount": "97499.58", @@ -4496,7 +4496,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "135173.4239508", "total_removed": "98230.390980249184455396", - "locked_amount": "3099.4839093476814766983303324", + "locked_amount": "3019.2338918605521062388712272", "deposits": [ { "amount": "135173.4239508", @@ -4542,7 +4542,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "32499.86", "total_removed": "0", - "locked_amount": "953.96053390924807095284", + "locked_amount": "929.2611478929606920796", "deposits": [ { "amount": "32499.86", @@ -4575,7 +4575,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "10833.29", "total_removed": "0", - "locked_amount": "310.50489677355653588642", + "locked_amount": "302.4654863024234565008", "deposits": [ { "amount": "10833.29", @@ -4608,7 +4608,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "22749.93", "total_removed": "4720.860935375", - "locked_amount": "1160.7366541557599685873", + "locked_amount": "1130.6835422447636932623", "deposits": [ { "amount": "6500", @@ -4760,7 +4760,7 @@ "tranche_end": "2023-05-01T00:00:00.000Z", "total_added": "22500", "total_removed": "5870.8788942", - "locked_amount": "4443.45361418047815", + "locked_amount": "4412.08851289134345", "deposits": [ { "amount": "7500", @@ -5145,7 +5145,7 @@ "tranche_end": "2023-06-02T00:00:00.000Z", "total_added": "1939928.38", "total_removed": "928642.9598472029154", - "locked_amount": "360056.637347528030894374", + "locked_amount": "358715.6163339561390214884", "deposits": [ { "amount": "1852091.69", @@ -38814,7 +38814,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "3732368.4671", "total_removed": "700133.348465855088393", - "locked_amount": "577783.017925778319687112262", + "locked_amount": "575722.335521845859496773078", "deposits": [ { "amount": "1998.95815", @@ -40196,7 +40196,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "15870102.715470999700000001", "total_removed": "810192.49096623640785452", - "locked_amount": "7348469.0699902058806497806804541823736145", + "locked_amount": "7341162.0224943190264878128686500338794269", "deposits": [ { "amount": "16249.93", @@ -46411,7 +46411,7 @@ "tranche_end": "2023-05-05T00:00:00.000Z", "total_added": "14597706.0446472999", "total_removed": "5779888.686370635362792996", - "locked_amount": "1062614.498706625905831745359093105", + "locked_amount": "1055868.67911436206532421074668294", "deposits": [ { "amount": "129284.449", @@ -53832,7 +53832,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "5778205.3912159303", "total_removed": "3381706.364737906998719578", - "locked_amount": "102942.0115377905602694462944703395", + "locked_amount": "100276.697418509697207783072181993", "deposits": [ { "amount": "552496.6455", @@ -55960,7 +55960,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "472355.6199999996", "total_removed": "38647.6469927697949", - "locked_amount": "91553.021938874865792954637544388", + "locked_amount": "91226.495032608991327825823642832", "deposits": [ { "amount": "3000", From bd1bd94ee7f0467124a16d4f7abe25e9a1cea46f Mon Sep 17 00:00:00 2001 From: dexturr Date: Sun, 26 Mar 2023 18:07:12 +0000 Subject: [PATCH 17/23] chore: update tranches Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- apps/static/src/assets/mainnet-tranches.json | 403 ++++++++++++------- 1 file changed, 256 insertions(+), 147 deletions(-) diff --git a/apps/static/src/assets/mainnet-tranches.json b/apps/static/src/assets/mainnet-tranches.json index d98490771..d045ea8e1 100644 --- a/apps/static/src/assets/mainnet-tranches.json +++ b/apps/static/src/assets/mainnet-tranches.json @@ -36,9 +36,9 @@ "tranche_id": 54, "tranche_start": "2023-04-06T00:00:00.000Z", "tranche_end": "2023-05-06T00:00:00.000Z", - "total_added": "2682", + "total_added": "2970", "total_removed": "0", - "locked_amount": "2682", + "locked_amount": "2970", "deposits": [ { "amount": "33", @@ -50,6 +50,11 @@ "user": "0x4081455DB9Ec3B9b66f370Fa12161E6763c40779", "tx": "0xdddd6b792f32b56f79670e6aa195907eca065edd21ab4d4d9f8cb065f54577cd" }, + { + "amount": "288", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tx": "0x09d3e968eb8dbd6851f47b36f7bb9e7d25a078c5c1b23ce5341a66ce19578e65" + }, { "amount": "111", "user": "0x268070d5EEd5b24E34a5F4C17B5482178b18089D", @@ -163,6 +168,21 @@ "withdrawn_tokens": "0", "remaining_tokens": "60" }, + { + "address": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "deposits": [ + { + "amount": "288", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tranche_id": 54, + "tx": "0x09d3e968eb8dbd6851f47b36f7bb9e7d25a078c5c1b23ce5341a66ce19578e65" + } + ], + "withdrawals": [], + "total_tokens": "288", + "withdrawn_tokens": "0", + "remaining_tokens": "288" + }, { "address": "0x268070d5EEd5b24E34a5F4C17B5482178b18089D", "deposits": [ @@ -509,8 +529,8 @@ "tranche_start": "2023-03-06T00:00:00.000Z", "tranche_end": "2023-04-06T00:00:00.000Z", "total_added": "14099", - "total_removed": "123.82076687438", - "locked_amount": "4772.19355660095543706", + "total_removed": "143.78419653368", + "locked_amount": "4659.49736073775400386", "deposits": [ { "amount": "30", @@ -1274,6 +1294,11 @@ } ], "withdrawals": [ + { + "amount": "19.9634296593", + "user": "0x47e6217C1667e2B1fD177Ab8fD89037bCEC7dc6C", + "tx": "0xc68a9a71f6a8a296e8c90bc748307ce197c444e3ca18129a189b7b462a60eceb" + }, { "amount": "14.85013776876", "user": "0x6F32AA5A6198329c16e438512F992a0548C856f9", @@ -2826,10 +2851,17 @@ "tx": "0x819f57b15fef080ab898405133d798a683e5fd805682901e160f5c0187c5fb16" } ], - "withdrawals": [], + "withdrawals": [ + { + "amount": "19.9634296593", + "user": "0x47e6217C1667e2B1fD177Ab8fD89037bCEC7dc6C", + "tranche_id": 53, + "tx": "0xc68a9a71f6a8a296e8c90bc748307ce197c444e3ca18129a189b7b462a60eceb" + } + ], "total_tokens": "30", - "withdrawn_tokens": "0", - "remaining_tokens": "30" + "withdrawn_tokens": "19.9634296593", + "remaining_tokens": "10.0365703407" }, { "address": "0xA7f89FF809549F4577993de3d1B3017241a53F40", @@ -3274,7 +3306,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "86666.297", "total_removed": "0", - "locked_amount": "60189.8147189264986193052", + "locked_amount": "60130.9791420469568418967", "deposits": [ { "amount": "86666.297", @@ -3340,7 +3372,7 @@ "tranche_end": "2023-06-01T00:00:00.000Z", "total_added": "2500", "total_removed": "0", - "locked_amount": "913.362650081400175", + "locked_amount": "909.95895019332525", "deposits": [ { "amount": "2500", @@ -3461,7 +3493,7 @@ "tranche_end": "2023-09-01T00:00:00.000Z", "total_added": "17500", "total_removed": "0", - "locked_amount": "15074.043566324477", + "locked_amount": "15050.47664427335", "deposits": [ { "amount": "12500", @@ -3727,8 +3759,8 @@ "tranche_start": "2023-02-01T00:00:00.000Z", "tranche_end": "2023-08-01T00:00:00.000Z", "total_added": "37500", - "total_removed": "4333.837380825", - "locked_amount": "26414.25433548189", + "total_removed": "4492.78075095", + "locked_amount": "26362.91676258441", "deposits": [ { "amount": "7500", @@ -3742,6 +3774,11 @@ } ], "withdrawals": [ + { + "amount": "158.943370125", + "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", + "tx": "0x9b76b93c59157b6740b91496e48037b239a6ca6db5758804aba9894e02a7eb69" + }, { "amount": "92.587476975", "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", @@ -3850,6 +3887,12 @@ } ], "withdrawals": [ + { + "amount": "158.943370125", + "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", + "tranche_id": 34, + "tx": "0x9b76b93c59157b6740b91496e48037b239a6ca6db5758804aba9894e02a7eb69" + }, { "amount": "92.587476975", "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", @@ -3960,8 +4003,8 @@ } ], "total_tokens": "7500", - "withdrawn_tokens": "2058.724198125", - "remaining_tokens": "5441.275801875" + "withdrawn_tokens": "2217.66756825", + "remaining_tokens": "5282.33243175" }, { "address": "0x0B4e6fcE839B01ef43DA6F890FAC7B1Afb004600", @@ -3993,7 +4036,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "129999.45", "total_removed": "0", - "locked_amount": "60134.899086368363315205", + "locked_amount": "60076.117189549757867235", "deposits": [ { "amount": "129999.45", @@ -4059,7 +4102,7 @@ "tranche_end": "2023-09-03T00:00:00.000Z", "total_added": "62600", "total_removed": "0", - "locked_amount": "27525.614624556060258", + "locked_amount": "27483.117053526129722", "deposits": [ { "amount": "10000", @@ -4252,7 +4295,7 @@ "tranche_end": "2023-09-17T00:00:00.000Z", "total_added": "5000", "total_removed": "0", - "locked_amount": "2390.3123414510402", + "locked_amount": "2386.91796676813785", "deposits": [ { "amount": "5000", @@ -4463,7 +4506,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "97499.58", "total_removed": "0", - "locked_amount": "2208.93580740188571634446", + "locked_amount": "2151.27624240420409202184", "deposits": [ { "amount": "97499.58", @@ -4496,7 +4539,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "135173.4239508", "total_removed": "98230.390980249184455396", - "locked_amount": "3019.2338918605521062388712272", + "locked_amount": "2940.423221017337458852045356", "deposits": [ { "amount": "135173.4239508", @@ -4542,7 +4585,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "32499.86", "total_removed": "0", - "locked_amount": "929.2611478929606920796", + "locked_amount": "905.00476462586406524202", "deposits": [ { "amount": "32499.86", @@ -4575,7 +4618,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "10833.29", "total_removed": "0", - "locked_amount": "302.4654863024234565008", + "locked_amount": "294.5702689273558724211", "deposits": [ { "amount": "10833.29", @@ -4608,7 +4651,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "22749.93", "total_removed": "4720.860935375", - "locked_amount": "1130.6835422447636932623", + "locked_amount": "1101.16945633180629128958", "deposits": [ { "amount": "6500", @@ -4759,8 +4802,8 @@ "tranche_start": "2022-11-01T00:00:00.000Z", "tranche_end": "2023-05-01T00:00:00.000Z", "total_added": "22500", - "total_removed": "5870.8788942", - "locked_amount": "4412.08851289134345", + "total_removed": "6029.8222644", + "locked_amount": "4381.2859691528541", "deposits": [ { "amount": "7500", @@ -4774,6 +4817,11 @@ } ], "withdrawals": [ + { + "amount": "158.9433702", + "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", + "tx": "0x4fa181368c0dc03d6e81dfb94e9b00edc7a4b5b44ea1354dcd03db1e58a060a6" + }, { "amount": "92.593232025", "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", @@ -4937,6 +4985,12 @@ } ], "withdrawals": [ + { + "amount": "158.9433702", + "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", + "tranche_id": 33, + "tx": "0x4fa181368c0dc03d6e81dfb94e9b00edc7a4b5b44ea1354dcd03db1e58a060a6" + }, { "amount": "92.593232025", "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", @@ -5119,8 +5173,8 @@ } ], "total_tokens": "7500", - "withdrawn_tokens": "5870.8788942", - "remaining_tokens": "1629.1211058" + "withdrawn_tokens": "6029.8222644", + "remaining_tokens": "1470.1777356" }, { "address": "0x2539b51EbDE65a75672aBcfE9439a706a99D18D1", @@ -5145,7 +5199,7 @@ "tranche_end": "2023-06-02T00:00:00.000Z", "total_added": "1939928.38", "total_removed": "928642.9598472029154", - "locked_amount": "358715.6163339561390214884", + "locked_amount": "357398.647578012965715466", "deposits": [ { "amount": "1852091.69", @@ -10611,7 +10665,7 @@ "tranche_id": 11, "tranche_start": "2021-09-03T00:00:00.000Z", "tranche_end": "2022-09-03T00:00:00.000Z", - "total_added": "57093.000000000000000003", + "total_added": "57188.000000000000000003", "total_removed": "48157.21518131551", "locked_amount": "0", "deposits": [ @@ -10620,6 +10674,16 @@ "user": "0xf9c6C5F942B94Db9dedC550956865cf99D743959", "tx": "0x9ab57768a7d30d87e35284719202ce92878929d34e12c307010406874a7692ea" }, + { + "amount": "20", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tx": "0xf6c1bfbe1cef84d279f408a3f90f5e684308f7ccd0b9c1401aa16295f0838ae7" + }, + { + "amount": "75", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tx": "0x971e9bcaace01278dc20ecd83d5de588d15be22c1797f4934cfd2ffb357a95ef" + }, { "amount": "150", "user": "0xEb01fF124D71b6C7E6613fd6E0A86c28C733F008", @@ -22291,6 +22355,123 @@ "withdrawn_tokens": "0", "remaining_tokens": "75" }, + { + "address": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "deposits": [ + { + "amount": "20", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tranche_id": 11, + "tx": "0xf6c1bfbe1cef84d279f408a3f90f5e684308f7ccd0b9c1401aa16295f0838ae7" + }, + { + "amount": "75", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tranche_id": 11, + "tx": "0x971e9bcaace01278dc20ecd83d5de588d15be22c1797f4934cfd2ffb357a95ef" + }, + { + "amount": "10", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tranche_id": 11, + "tx": "0xa925b6e68d020e0229435b0315d1600a7f1a0979047a8fdd5ce68be4e3133bff" + }, + { + "amount": "20", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tranche_id": 11, + "tx": "0xd7900f21b16a662d7b52528abfcfd530fa2a36837ba03aa4508f0d7470d41851" + }, + { + "amount": "20", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tranche_id": 11, + "tx": "0x2535a7ad6185978f693d9836c4fdf02e9f67b622142ae6e218e512e0410e20c8" + }, + { + "amount": "15", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tranche_id": 11, + "tx": "0x54683260e4cfefbbd4b19a8e973cb8e0bfca6a87455d5eafc10e61a1cf89705b" + }, + { + "amount": "35", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tranche_id": 11, + "tx": "0xa648509884bf256ec83b34ab58cbea958da2bf0e70d69e2cf059f9e924c35cf1" + }, + { + "amount": "25", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tranche_id": 11, + "tx": "0x5007620d4335f224e07ebabc48404e47fb8951053c9f4512544cc1b4ac33655c" + }, + { + "amount": "70", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tranche_id": 11, + "tx": "0x2d3199ebbb0ae7103561e872185835d65cd07fe9ca3bce74e04427730cc4cbc7" + }, + { + "amount": "20", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tranche_id": 11, + "tx": "0x5d82589c472077619ddf78fda7159380ab6aa1a55e970240e4fc98a604a787a9" + }, + { + "amount": "40", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tranche_id": 11, + "tx": "0x3f246c6fd3c2d384af26f7cf79fe4fac06dcf302437497e1811bf1bdacc3be9f" + }, + { + "amount": "30", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tranche_id": 11, + "tx": "0x60efa9a39a6aaeedeb9f53bbe8ccb3a740f927f49bb4bd5098464ea6871cbb7e" + }, + { + "amount": "30", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tranche_id": 11, + "tx": "0xbf9559ff78c35913a0e6cf66c3047e7db10581b9ae053e974e5316511a3597a3" + }, + { + "amount": "10", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tranche_id": 11, + "tx": "0x2181c9e667a9ced6e635bf55d6baf99c618a074c8396dfa9babc188d117bd52e" + }, + { + "amount": "25", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tranche_id": 11, + "tx": "0x33adca302b3a2de09970750557f5e8f334c8687aad15a6edeb73c6f87e825666" + }, + { + "amount": "5", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tranche_id": 11, + "tx": "0x0175bbc619a914aa3fd3a251b94f274e4ea35fb61b3db0b6f692dcc94ecab33d" + }, + { + "amount": "10", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tranche_id": 11, + "tx": "0x385a9cdbafcf70b921cdf6d719ec2656e84a3809da3bb92e581599793db196b1" + }, + { + "amount": "12", + "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", + "tranche_id": 11, + "tx": "0xa61e5231fed98c0cd79e7d4b6a5436b4d1e2276c85e73b86ac161b2b07271e2b" + } + ], + "withdrawals": [], + "total_tokens": "472", + "withdrawn_tokens": "0", + "remaining_tokens": "472" + }, { "address": "0xEb01fF124D71b6C7E6613fd6E0A86c28C733F008", "deposits": [ @@ -26270,111 +26451,6 @@ "withdrawn_tokens": "511", "remaining_tokens": "0" }, - { - "address": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", - "deposits": [ - { - "amount": "10", - "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", - "tranche_id": 11, - "tx": "0xa925b6e68d020e0229435b0315d1600a7f1a0979047a8fdd5ce68be4e3133bff" - }, - { - "amount": "20", - "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", - "tranche_id": 11, - "tx": "0xd7900f21b16a662d7b52528abfcfd530fa2a36837ba03aa4508f0d7470d41851" - }, - { - "amount": "20", - "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", - "tranche_id": 11, - "tx": "0x2535a7ad6185978f693d9836c4fdf02e9f67b622142ae6e218e512e0410e20c8" - }, - { - "amount": "15", - "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", - "tranche_id": 11, - "tx": "0x54683260e4cfefbbd4b19a8e973cb8e0bfca6a87455d5eafc10e61a1cf89705b" - }, - { - "amount": "35", - "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", - "tranche_id": 11, - "tx": "0xa648509884bf256ec83b34ab58cbea958da2bf0e70d69e2cf059f9e924c35cf1" - }, - { - "amount": "25", - "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", - "tranche_id": 11, - "tx": "0x5007620d4335f224e07ebabc48404e47fb8951053c9f4512544cc1b4ac33655c" - }, - { - "amount": "70", - "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", - "tranche_id": 11, - "tx": "0x2d3199ebbb0ae7103561e872185835d65cd07fe9ca3bce74e04427730cc4cbc7" - }, - { - "amount": "20", - "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", - "tranche_id": 11, - "tx": "0x5d82589c472077619ddf78fda7159380ab6aa1a55e970240e4fc98a604a787a9" - }, - { - "amount": "40", - "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", - "tranche_id": 11, - "tx": "0x3f246c6fd3c2d384af26f7cf79fe4fac06dcf302437497e1811bf1bdacc3be9f" - }, - { - "amount": "30", - "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", - "tranche_id": 11, - "tx": "0x60efa9a39a6aaeedeb9f53bbe8ccb3a740f927f49bb4bd5098464ea6871cbb7e" - }, - { - "amount": "30", - "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", - "tranche_id": 11, - "tx": "0xbf9559ff78c35913a0e6cf66c3047e7db10581b9ae053e974e5316511a3597a3" - }, - { - "amount": "10", - "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", - "tranche_id": 11, - "tx": "0x2181c9e667a9ced6e635bf55d6baf99c618a074c8396dfa9babc188d117bd52e" - }, - { - "amount": "25", - "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", - "tranche_id": 11, - "tx": "0x33adca302b3a2de09970750557f5e8f334c8687aad15a6edeb73c6f87e825666" - }, - { - "amount": "5", - "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", - "tranche_id": 11, - "tx": "0x0175bbc619a914aa3fd3a251b94f274e4ea35fb61b3db0b6f692dcc94ecab33d" - }, - { - "amount": "10", - "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", - "tranche_id": 11, - "tx": "0x385a9cdbafcf70b921cdf6d719ec2656e84a3809da3bb92e581599793db196b1" - }, - { - "amount": "12", - "user": "0xE9F41a0090fcc7eaf626037003AAD44B17098E7C", - "tranche_id": 11, - "tx": "0xa61e5231fed98c0cd79e7d4b6a5436b4d1e2276c85e73b86ac161b2b07271e2b" - } - ], - "withdrawals": [], - "total_tokens": "377", - "withdrawn_tokens": "0", - "remaining_tokens": "377" - }, { "address": "0x0436E2E4EA467f9958403dc56635404EE1bb1E94", "deposits": [ @@ -38814,7 +38890,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "3732368.4671", "total_removed": "700133.348465855088393", - "locked_amount": "575722.335521845859496773078", + "locked_amount": "573698.6130637825973761852", "deposits": [ { "amount": "1998.95815", @@ -40195,8 +40271,8 @@ "tranche_start": "2022-06-05T00:00:00.000Z", "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "15870102.715470999700000001", - "total_removed": "810192.49096623640785452", - "locked_amount": "7341162.0224943190264878128686500338794269", + "total_removed": "811190.94573738377022952", + "locked_amount": "7333986.0325934272424217304166262435293323", "deposits": [ { "amount": "16249.93", @@ -40700,6 +40776,11 @@ } ], "withdrawals": [ + { + "amount": "998.454771147362375", + "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", + "tx": "0x58aa740f4eaf17c0c60c22587b34db0dfd670c968d3affb614fee9b917f0b53c" + }, { "amount": "545.4204142199725", "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", @@ -42688,6 +42769,12 @@ } ], "withdrawals": [ + { + "amount": "998.454771147362375", + "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", + "tranche_id": 2, + "tx": "0x58aa740f4eaf17c0c60c22587b34db0dfd670c968d3affb614fee9b917f0b53c" + }, { "amount": "545.4204142199725", "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", @@ -44064,8 +44151,8 @@ } ], "total_tokens": "259998.8875", - "withdrawn_tokens": "138736.5105644753015", - "remaining_tokens": "121262.3769355246985" + "withdrawn_tokens": "139734.965335622663875", + "remaining_tokens": "120263.922164377336125" }, { "address": "0x89051CAb67Bc7F8CC44F7e270c6EDaf1EC57676c", @@ -46410,8 +46497,8 @@ "tranche_start": "2021-11-05T00:00:00.000Z", "tranche_end": "2023-05-05T00:00:00.000Z", "total_added": "14597706.0446472999", - "total_removed": "5779888.686370635362792996", - "locked_amount": "1055868.67911436206532421074668294", + "total_removed": "5781272.031584311406488996", + "locked_amount": "1049243.851056986557877293880821272", "deposits": [ { "amount": "129284.449", @@ -46625,6 +46712,11 @@ "user": "0x66827bCD635f2bB1779d68c46aEB16541bCA6ba8", "tx": "0x4eb2ed2540197b432b08d7ed69ab17a69909e2055f645ce8a0922c1a29ffeec8" }, + { + "amount": "1383.345213676043696", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tx": "0xab861da5aece3737a3d6b9d8ac61fd11f864aefa410287e00357497f1c859081" + }, { "amount": "755.482067130393772", "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", @@ -49755,6 +49847,12 @@ } ], "withdrawals": [ + { + "amount": "1383.345213676043696", + "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", + "tranche_id": 3, + "tx": "0xab861da5aece3737a3d6b9d8ac61fd11f864aefa410287e00357497f1c859081" + }, { "amount": "755.482067130393772", "user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b", @@ -52433,8 +52531,8 @@ } ], "total_tokens": "359123.469575", - "withdrawn_tokens": "331771.53983035858666975", - "remaining_tokens": "27351.92974464141333025" + "withdrawn_tokens": "333154.88504403463036575", + "remaining_tokens": "25968.58453096536963425" }, { "address": "0xBdd412797c1B78535Afc5F71503b91fAbD0160fB", @@ -53832,7 +53930,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "5778205.3912159303", "total_removed": "3381706.364737906998719578", - "locked_amount": "100276.697418509697207783072181993", + "locked_amount": "97659.187786413891315382891271454", "deposits": [ { "amount": "552496.6455", @@ -55959,8 +56057,8 @@ "tranche_start": "2022-06-05T00:00:00.000Z", "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "472355.6199999996", - "total_removed": "38647.6469927697949", - "locked_amount": "91226.495032608991327825823642832", + "total_removed": "38667.5655620217949", + "locked_amount": "90905.824641038114971752598274976", "deposits": [ { "amount": "3000", @@ -62579,6 +62677,11 @@ } ], "withdrawals": [ + { + "amount": "19.918569252", + "user": "0xcB555C5602cC0b2434A27d277e14Cb5C7bF4Ead1", + "tx": "0x9d4c99fdeee2d95caee8d6725f6796f8e02f8a9fd2d911a8e151b2665e192ebc" + }, { "amount": "154.812094114", "user": "0x27e2254A2A8c9c9D1321E5Fe64cAD88e7A4f0ba7", @@ -81188,6 +81291,12 @@ } ], "withdrawals": [ + { + "amount": "19.918569252", + "user": "0xcB555C5602cC0b2434A27d277e14Cb5C7bF4Ead1", + "tranche_id": 5, + "tx": "0x9d4c99fdeee2d95caee8d6725f6796f8e02f8a9fd2d911a8e151b2665e192ebc" + }, { "amount": "19.74474886", "user": "0xcB555C5602cC0b2434A27d277e14Cb5C7bF4Ead1", @@ -81220,8 +81329,8 @@ } ], "total_tokens": "400", - "withdrawn_tokens": "302.857825976", - "remaining_tokens": "97.142174024" + "withdrawn_tokens": "322.776395228", + "remaining_tokens": "77.223604772" }, { "address": "0x3738bec36216eA2F11B954891C65AAd1Bc852156", From 48a9998441221a0f0c76dfd1e7edac962d5efdb4 Mon Sep 17 00:00:00 2001 From: dexturr Date: Mon, 27 Mar 2023 00:16:27 +0000 Subject: [PATCH 18/23] chore: update tranches Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- apps/static/src/assets/mainnet-tranches.json | 40 ++++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/apps/static/src/assets/mainnet-tranches.json b/apps/static/src/assets/mainnet-tranches.json index d045ea8e1..e17b73ef5 100644 --- a/apps/static/src/assets/mainnet-tranches.json +++ b/apps/static/src/assets/mainnet-tranches.json @@ -530,7 +530,7 @@ "tranche_end": "2023-04-06T00:00:00.000Z", "total_added": "14099", "total_removed": "143.78419653368", - "locked_amount": "4659.49736073775400386", + "locked_amount": "4542.87424805854272585", "deposits": [ { "amount": "30", @@ -3306,7 +3306,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "86666.297", "total_removed": "0", - "locked_amount": "60130.9791420469568418967", + "locked_amount": "60070.0934301610173462076", "deposits": [ { "amount": "86666.297", @@ -3372,7 +3372,7 @@ "tranche_end": "2023-06-01T00:00:00.000Z", "total_added": "2500", "total_removed": "0", - "locked_amount": "909.95895019332525", + "locked_amount": "906.43664784289785", "deposits": [ { "amount": "2500", @@ -3493,7 +3493,7 @@ "tranche_end": "2023-09-01T00:00:00.000Z", "total_added": "17500", "total_removed": "0", - "locked_amount": "15050.47664427335", + "locked_amount": "15026.088529086152", "deposits": [ { "amount": "12500", @@ -3760,7 +3760,7 @@ "tranche_end": "2023-08-01T00:00:00.000Z", "total_added": "37500", "total_removed": "4492.78075095", - "locked_amount": "26362.91676258441", + "locked_amount": "26309.79032381829", "deposits": [ { "amount": "7500", @@ -4036,7 +4036,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "129999.45", "total_removed": "0", - "locked_amount": "60076.117189549757867235", + "locked_amount": "60015.287028214976373657", "deposits": [ { "amount": "129999.45", @@ -4102,7 +4102,7 @@ "tranche_end": "2023-09-03T00:00:00.000Z", "total_added": "62600", "total_removed": "0", - "locked_amount": "27483.117053526129722", + "locked_amount": "27439.138647894468438", "deposits": [ { "amount": "10000", @@ -4295,7 +4295,7 @@ "tranche_end": "2023-09-17T00:00:00.000Z", "total_added": "5000", "total_removed": "0", - "locked_amount": "2386.91796676813785", + "locked_amount": "2383.4053145611367", "deposits": [ { "amount": "5000", @@ -4506,7 +4506,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "97499.58", "total_removed": "0", - "locked_amount": "2151.27624240420409202184", + "locked_amount": "2091.6075207206349734454", "deposits": [ { "amount": "97499.58", @@ -4539,7 +4539,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "135173.4239508", "total_removed": "98230.390980249184455396", - "locked_amount": "2940.423221017337458852045356", + "locked_amount": "2858.866379850941044001374998", "deposits": [ { "amount": "135173.4239508", @@ -4585,7 +4585,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "32499.86", "total_removed": "0", - "locked_amount": "905.00476462586406524202", + "locked_amount": "879.90316383729300309056", "deposits": [ { "amount": "32499.86", @@ -4618,7 +4618,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "10833.29", "total_removed": "0", - "locked_amount": "294.5702689273558724211", + "locked_amount": "286.39994145084382756514", "deposits": [ { "amount": "10833.29", @@ -4651,7 +4651,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "22749.93", "total_removed": "4720.860935375", - "locked_amount": "1101.16945633180629128958", + "locked_amount": "1070.6269474149204615219", "deposits": [ { "amount": "6500", @@ -4803,7 +4803,7 @@ "tranche_end": "2023-05-01T00:00:00.000Z", "total_added": "22500", "total_removed": "6029.8222644", - "locked_amount": "4381.2859691528541", + "locked_amount": "4349.410105893186375", "deposits": [ { "amount": "7500", @@ -5199,7 +5199,7 @@ "tranche_end": "2023-06-02T00:00:00.000Z", "total_added": "1939928.38", "total_removed": "928642.9598472029154", - "locked_amount": "357398.647578012965715466", + "locked_amount": "356035.7888369267325999386", "deposits": [ { "amount": "1852091.69", @@ -38890,7 +38890,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "3732368.4671", "total_removed": "700133.348465855088393", - "locked_amount": "573698.6130637825973761852", + "locked_amount": "571604.373675749833822534495", "deposits": [ { "amount": "1998.95815", @@ -40272,7 +40272,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "15870102.715470999700000001", "total_removed": "811190.94573738377022952", - "locked_amount": "7333986.0325934272424217304166262435293323", + "locked_amount": "7326559.99418648279155748747861272923168426", "deposits": [ { "amount": "16249.93", @@ -46498,7 +46498,7 @@ "tranche_end": "2023-05-05T00:00:00.000Z", "total_added": "14597706.0446472999", "total_removed": "5781272.031584311406488996", - "locked_amount": "1049243.851056986557877293880821272", + "locked_amount": "1042388.179815398047446064492132308", "deposits": [ { "amount": "129284.449", @@ -53930,7 +53930,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "5778205.3912159303", "total_removed": "3381706.364737906998719578", - "locked_amount": "97659.187786413891315382891271454", + "locked_amount": "94950.4706161080119101168331609", "deposits": [ { "amount": "552496.6455", @@ -56058,7 +56058,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "472355.6199999996", "total_removed": "38667.5655620217949", - "locked_amount": "90905.824641038114971752598274976", + "locked_amount": "90573.980438821583983853974835112", "deposits": [ { "amount": "3000", From a6964bc3cf77009f97dfd5322d4a4ab33fcc54c0 Mon Sep 17 00:00:00 2001 From: dexturr Date: Mon, 27 Mar 2023 06:06:57 +0000 Subject: [PATCH 19/23] chore: update tranches Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- apps/static/src/assets/mainnet-tranches.json | 57 ++++++++++++-------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/apps/static/src/assets/mainnet-tranches.json b/apps/static/src/assets/mainnet-tranches.json index e17b73ef5..2dc247434 100644 --- a/apps/static/src/assets/mainnet-tranches.json +++ b/apps/static/src/assets/mainnet-tranches.json @@ -530,7 +530,7 @@ "tranche_end": "2023-04-06T00:00:00.000Z", "total_added": "14099", "total_removed": "143.78419653368", - "locked_amount": "4542.87424805854272585", + "locked_amount": "4432.17309438470708546", "deposits": [ { "amount": "30", @@ -3306,7 +3306,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "86666.297", "total_removed": "0", - "locked_amount": "60070.0934301610173462076", + "locked_amount": "60012.2994098061907759131", "deposits": [ { "amount": "86666.297", @@ -3372,7 +3372,7 @@ "tranche_end": "2023-06-01T00:00:00.000Z", "total_added": "2500", "total_removed": "0", - "locked_amount": "906.43664784289785", + "locked_amount": "903.093203093203175", "deposits": [ { "amount": "2500", @@ -3493,7 +3493,7 @@ "tranche_end": "2023-09-01T00:00:00.000Z", "total_added": "17500", "total_removed": "0", - "locked_amount": "15026.088529086152", + "locked_amount": "15002.9388083735895", "deposits": [ { "amount": "12500", @@ -3760,7 +3760,7 @@ "tranche_end": "2023-08-01T00:00:00.000Z", "total_added": "37500", "total_removed": "4492.78075095", - "locked_amount": "26309.79032381829", + "locked_amount": "26259.36157151626875", "deposits": [ { "amount": "7500", @@ -4036,7 +4036,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "129999.45", "total_removed": "0", - "locked_amount": "60015.287028214976373657", + "locked_amount": "59957.545737631794657195", "deposits": [ { "amount": "129999.45", @@ -4102,7 +4102,7 @@ "tranche_end": "2023-09-03T00:00:00.000Z", "total_added": "62600", "total_removed": "0", - "locked_amount": "27439.138647894468438", + "locked_amount": "27397.393404363265956", "deposits": [ { "amount": "10000", @@ -4295,7 +4295,7 @@ "tranche_end": "2023-09-17T00:00:00.000Z", "total_added": "5000", "total_removed": "0", - "locked_amount": "2383.4053145611367", + "locked_amount": "2380.07102993404385", "deposits": [ { "amount": "5000", @@ -4506,7 +4506,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "97499.58", "total_removed": "0", - "locked_amount": "2091.6075207206349734454", + "locked_amount": "2034.9686935030549769988", "deposits": [ { "amount": "97499.58", @@ -4539,7 +4539,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "135173.4239508", "total_removed": "98230.390980249184455396", - "locked_amount": "2858.866379850941044001374998", + "locked_amount": "2781.4508813301073482881800752", "deposits": [ { "amount": "135173.4239508", @@ -4585,7 +4585,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "32499.86", "total_removed": "0", - "locked_amount": "879.90316383729300309056", + "locked_amount": "856.07618732708597453098", "deposits": [ { "amount": "32499.86", @@ -4618,7 +4618,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "10833.29", "total_removed": "0", - "locked_amount": "286.39994145084382756514", + "locked_amount": "278.6444918082786955163", "deposits": [ { "amount": "10833.29", @@ -4651,7 +4651,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "22749.93", "total_removed": "4720.860935375", - "locked_amount": "1070.6269474149204615219", + "locked_amount": "1041.6353445026172644364", "deposits": [ { "amount": "6500", @@ -4803,7 +4803,7 @@ "tranche_end": "2023-05-01T00:00:00.000Z", "total_added": "22500", "total_removed": "6029.8222644", - "locked_amount": "4349.410105893186375", + "locked_amount": "4319.15285451197025", "deposits": [ { "amount": "7500", @@ -5199,7 +5199,7 @@ "tranche_end": "2023-06-02T00:00:00.000Z", "total_added": "1939928.38", "total_removed": "928642.9598472029154", - "locked_amount": "356035.7888369267325999386", + "locked_amount": "354742.134161907705277922", "deposits": [ { "amount": "1852091.69", @@ -38890,7 +38890,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "3732368.4671", "total_removed": "700133.348465855088393", - "locked_amount": "571604.373675749833822534495", + "locked_amount": "569616.476842965740083581504", "deposits": [ { "amount": "1998.95815", @@ -40272,7 +40272,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "15870102.715470999700000001", "total_removed": "811190.94573738377022952", - "locked_amount": "7326559.99418648279155748747861272923168426", + "locked_amount": "7319511.0396526062849853116896723115788051", "deposits": [ { "amount": "16249.93", @@ -46498,7 +46498,7 @@ "tranche_end": "2023-05-05T00:00:00.000Z", "total_added": "14597706.0446472999", "total_removed": "5781272.031584311406488996", - "locked_amount": "1042388.179815398047446064492132308", + "locked_amount": "1035880.629997723569255699501954567", "deposits": [ { "amount": "129284.449", @@ -53930,7 +53930,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "5778205.3912159303", "total_removed": "3381706.364737906998719578", - "locked_amount": "94950.4706161080119101168331609", + "locked_amount": "92379.298325811440012225988805963", "deposits": [ { "amount": "552496.6455", @@ -56057,8 +56057,8 @@ "tranche_start": "2022-06-05T00:00:00.000Z", "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "472355.6199999996", - "total_removed": "38667.5655620217949", - "locked_amount": "90573.980438821583983853974835112", + "total_removed": "38818.1373783577949", + "locked_amount": "90258.98682236420185873334500254", "deposits": [ { "amount": "3000", @@ -62682,6 +62682,11 @@ "user": "0xcB555C5602cC0b2434A27d277e14Cb5C7bF4Ead1", "tx": "0x9d4c99fdeee2d95caee8d6725f6796f8e02f8a9fd2d911a8e151b2665e192ebc" }, + { + "amount": "150.571816336", + "user": "0xF5037DDA4A660d67560200f45380FF8364e35540", + "tx": "0xffc827a0984694ac0243552d0fa4267513471426f6ec34596fd57cfd9d9390e7" + }, { "amount": "154.812094114", "user": "0x27e2254A2A8c9c9D1321E5Fe64cAD88e7A4f0ba7", @@ -84882,6 +84887,12 @@ } ], "withdrawals": [ + { + "amount": "150.571816336", + "user": "0xF5037DDA4A660d67560200f45380FF8364e35540", + "tranche_id": 5, + "tx": "0xffc827a0984694ac0243552d0fa4267513471426f6ec34596fd57cfd9d9390e7" + }, { "amount": "11.163032724", "user": "0xF5037DDA4A660d67560200f45380FF8364e35540", @@ -84890,8 +84901,8 @@ } ], "total_tokens": "200", - "withdrawn_tokens": "11.163032724", - "remaining_tokens": "188.836967276" + "withdrawn_tokens": "161.73484906", + "remaining_tokens": "38.26515094" }, { "address": "0x2843a3A61C7a129e432455c02101Cec3fA428E60", From 621ba497e86b531f353eb2047f472ee571176c2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20M=C5=82odzikowski?= Date: Mon, 27 Mar 2023 11:03:06 +0200 Subject: [PATCH 20/23] feat: remove env vars file after setting up js file --- entrypoint.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index d0923b6eb..5360cbd08 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -35,6 +35,8 @@ do fi done < $env_vars_file +rm $env_vars_file + echo "}" >> $env_file # start serving From a2b112d898711bff7cbca016639fa54ae920b013 Mon Sep 17 00:00:00 2001 From: Maciek Date: Mon, 27 Mar 2023 12:30:55 +0200 Subject: [PATCH 21/23] fix(positions): make positions table smoothly updated (again) (#3266) --- libs/positions/src/lib/positions-manager.tsx | 8 ++--- libs/positions/src/lib/use-positions-data.tsx | 29 ++++++++++++++++--- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/libs/positions/src/lib/positions-manager.tsx b/libs/positions/src/lib/positions-manager.tsx index f251d1631..88eca9578 100644 --- a/libs/positions/src/lib/positions-manager.tsx +++ b/libs/positions/src/lib/positions-manager.tsx @@ -24,11 +24,7 @@ export const PositionsManager = ({ }: PositionsManagerProps) => { const gridRef = useRef(null); const [dataCount, setDataCount] = useState(0); - const { data, error, loading, reload } = usePositionsData( - partyId, - gridRef, - true - ); + const { data, error, loading, reload } = usePositionsData(partyId, gridRef); const create = useVegaTransactionStore((store) => store.create); const onClose = ({ marketId, @@ -72,7 +68,7 @@ export const PositionsManager = ({ }); useEffect(() => { setDataCount(gridRef.current?.api?.getModel().getRowCount() ?? 0); - }, [data?.length]); + }, [data]); const onFilterChanged = useCallback((event: FilterChangedEvent) => { setDataCount(gridRef.current?.api?.getModel().getRowCount() ?? 0); }, []); diff --git a/libs/positions/src/lib/use-positions-data.tsx b/libs/positions/src/lib/use-positions-data.tsx index ebf640d1d..6759639ef 100644 --- a/libs/positions/src/lib/use-positions-data.tsx +++ b/libs/positions/src/lib/use-positions-data.tsx @@ -6,13 +6,13 @@ import { positionsMetricsProvider } from './positions-data-providers'; import type { PositionsQueryVariables } from './__generated__/Positions'; import { useDataProvider, updateGridData } from '@vegaprotocol/react-helpers'; import type { GetRowsParams } from '@vegaprotocol/datagrid'; +import isEqual from 'lodash/isEqual'; export const getRowId = ({ data }: { data: Position }) => data.marketId; export const usePositionsData = ( partyId: string, - gridRef: RefObject, - clientSideModel?: boolean + gridRef: RefObject ) => { const variables = useMemo( () => ({ partyId }), @@ -21,9 +21,30 @@ export const usePositionsData = ( const dataRef = useRef(null); const update = useCallback( ({ data }: { data: Position[] | null }) => { - return clientSideModel ? false : updateGridData(dataRef, data, gridRef); + if (gridRef.current?.api?.getModel().getType() === 'infinite') { + return updateGridData(dataRef, data, gridRef); + } + + const update: Position[] = []; + const add: Position[] = []; + data?.forEach((d) => { + const rowNode = gridRef.current?.api?.getRowNode(d.marketId); + if (rowNode) { + if (!isEqual(rowNode.data, d)) { + update.push(d); + } + } else { + add.push(d); + } + }); + gridRef.current?.api?.applyTransaction({ + update, + add, + addIndex: 0, + }); + return true; }, - [gridRef, clientSideModel] + [gridRef] ); const { data, error, loading, reload } = useDataProvider({ dataProvider: positionsMetricsProvider, From 477d523582b854279c4904e66fb02023cc504575 Mon Sep 17 00:00:00 2001 From: daro-maj <119658839+daro-maj@users.noreply.github.com> Date: Mon, 27 Mar 2023 12:50:22 +0200 Subject: [PATCH 22/23] test(trading): fixed capsule tests (#3281) --- .../trading-e2e/src/integration/capsule.cy.ts | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/apps/trading-e2e/src/integration/capsule.cy.ts b/apps/trading-e2e/src/integration/capsule.cy.ts index e537cacac..bc92fc6c9 100644 --- a/apps/trading-e2e/src/integration/capsule.cy.ts +++ b/apps/trading-e2e/src/integration/capsule.cy.ts @@ -135,7 +135,7 @@ describe('capsule - without MultiSign', { tags: '@slow' }, () => { cy.getByTestId(transferForm).find(submitTransferBtn).click(); cy.getByTestId(toastContent).should( 'contain.text', - 'Transfer completeYour transaction has been confirmed TransferTo 7f9cf0…c255351.00 tBTC' + 'Transfer completeYour transaction has been confirmed View in block explorerTransferTo 7f9cf0…c255351.00 tBTC' ); cy.getByTestId(toastCloseBtn).click(); }); @@ -283,7 +283,7 @@ describe('capsule', { tags: '@slow' }, () => { }); }); // comment because of bug #2695 - it.skip('can edit order', function () { + it('can edit order', function () { cy.getByTestId(ordersTab).click(); cy.getByTestId('edit').first().should('be.visible').click(); cy.getByTestId('dialog-title').should('contain.text', 'Edit order'); @@ -422,7 +422,11 @@ describe('capsule', { tags: '@slow' }, () => { cy.getByTestId(depositSubmit).click(); cy.getByTestId('input-error-text').should( 'contain.text', - 'Amount is above approved amount.Update approve amount' + 'Amount is above approved amount' + ); + cy.getByTestId('reapprove-default').should( + 'contain.text', + 'Approve again to deposit more than' ); }); @@ -437,9 +441,11 @@ describe('capsule', { tags: '@slow' }, () => { cy.getByTestId('deposit-button').click(); connectEthereumWallet('Unknown'); cy.get(assetSelectField, txTimeout).select(vegaName, { force: true }); - cy.getByTestId('deposit-submit').click(); - cy.getByTestId('dialog-title').should('contain.text', 'Approve complete'); - cy.get('[data-testid="Return to deposit"]').click(); + cy.getByTestId('approve-submit').click(); + cy.getByTestId('approve-confirmed').should( + 'contain.text', + 'You can now make deposits in VEGA, up to a maximum of' + ); cy.get(amountField).clear().type('10000'); cy.getByTestId('deposit-submit').click(); cy.getByTestId(toastContent, txTimeout).should( @@ -447,7 +453,7 @@ describe('capsule', { tags: '@slow' }, () => { `Your transaction has been confirmed.`, { matchCase: false } ); - cy.getByTestId(toastCloseBtn).click(); + cy.getByTestId(toastCloseBtn).click({ multiple: true }); cy.getByTestId('Collateral').click(); cy.highlight('deposit verification'); From b6a9faaa7cc7fd3f562ce3f998e5c45458a904f1 Mon Sep 17 00:00:00 2001 From: dexturr Date: Mon, 27 Mar 2023 12:10:42 +0000 Subject: [PATCH 23/23] chore: update tranches Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- apps/static/src/assets/mainnet-tranches.json | 40 ++++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/apps/static/src/assets/mainnet-tranches.json b/apps/static/src/assets/mainnet-tranches.json index 2dc247434..bf7ae9aaa 100644 --- a/apps/static/src/assets/mainnet-tranches.json +++ b/apps/static/src/assets/mainnet-tranches.json @@ -530,7 +530,7 @@ "tranche_end": "2023-04-06T00:00:00.000Z", "total_added": "14099", "total_removed": "143.78419653368", - "locked_amount": "4432.17309438470708546", + "locked_amount": "4317.28708968040564483", "deposits": [ { "amount": "30", @@ -3306,7 +3306,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "86666.297", "total_removed": "0", - "locked_amount": "60012.2994098061907759131", + "locked_amount": "59952.3205941027057561402", "deposits": [ { "amount": "86666.297", @@ -3372,7 +3372,7 @@ "tranche_end": "2023-06-01T00:00:00.000Z", "total_added": "2500", "total_removed": "0", - "locked_amount": "903.093203093203175", + "locked_amount": "899.62336563899075", "deposits": [ { "amount": "2500", @@ -3493,7 +3493,7 @@ "tranche_end": "2023-09-01T00:00:00.000Z", "total_added": "17500", "total_removed": "0", - "locked_amount": "15002.9388083735895", + "locked_amount": "14978.9139555656195", "deposits": [ { "amount": "12500", @@ -3760,7 +3760,7 @@ "tranche_end": "2023-08-01T00:00:00.000Z", "total_added": "37500", "total_removed": "4492.78075095", - "locked_amount": "26259.36157151626875", + "locked_amount": "26207.02645411294875", "deposits": [ { "amount": "7500", @@ -4036,7 +4036,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "129999.45", "total_removed": "0", - "locked_amount": "59957.545737631794657195", + "locked_amount": "59897.62164505080734094", "deposits": [ { "amount": "129999.45", @@ -4102,7 +4102,7 @@ "tranche_end": "2023-09-03T00:00:00.000Z", "total_added": "62600", "total_removed": "0", - "locked_amount": "27397.393404363265956", + "locked_amount": "27354.070059614405762", "deposits": [ { "amount": "10000", @@ -4295,7 +4295,7 @@ "tranche_end": "2023-09-17T00:00:00.000Z", "total_added": "5000", "total_removed": "0", - "locked_amount": "2380.07102993404385", + "locked_amount": "2376.6106988838155", "deposits": [ { "amount": "5000", @@ -4506,7 +4506,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "97499.58", "total_removed": "0", - "locked_amount": "2034.9686935030549769988", + "locked_amount": "1976.1887408628310248306", "deposits": [ { "amount": "97499.58", @@ -4539,7 +4539,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "135173.4239508", "total_removed": "98230.390980249184455396", - "locked_amount": "2781.4508813301073482881800752", + "locked_amount": "2701.108834006406820430108332", "deposits": [ { "amount": "135173.4239508", @@ -4585,7 +4585,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "32499.86", "total_removed": "0", - "locked_amount": "856.07618732708597453098", + "locked_amount": "831.348476326834519302", "deposits": [ { "amount": "32499.86", @@ -4618,7 +4618,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "10833.29", "total_removed": "0", - "locked_amount": "278.6444918082786955163", + "locked_amount": "270.59586182972489332628", "deposits": [ { "amount": "10833.29", @@ -4651,7 +4651,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "22749.93", "total_removed": "4720.860935375", - "locked_amount": "1041.6353445026172644364", + "locked_amount": "1011.5477680137440929101", "deposits": [ { "amount": "6500", @@ -4803,7 +4803,7 @@ "tranche_end": "2023-05-01T00:00:00.000Z", "total_added": "22500", "total_removed": "6029.8222644", - "locked_amount": "4319.15285451197025", + "locked_amount": "4287.751784069981625", "deposits": [ { "amount": "7500", @@ -5199,7 +5199,7 @@ "tranche_end": "2023-06-02T00:00:00.000Z", "total_added": "1939928.38", "total_removed": "928642.9598472029154", - "locked_amount": "354742.134161907705277922", + "locked_amount": "353399.575280201010750956", "deposits": [ { "amount": "1852091.69", @@ -38890,7 +38890,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "3732368.4671", "total_removed": "700133.348465855088393", - "locked_amount": "569616.476842965740083581504", + "locked_amount": "567553.33674442327201243239", "deposits": [ { "amount": "1998.95815", @@ -40272,7 +40272,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "15870102.715470999700000001", "total_removed": "811190.94573738377022952", - "locked_amount": "7319511.0396526062849853116896723115788051", + "locked_amount": "7312195.27732943035628880483248801894971615", "deposits": [ { "amount": "16249.93", @@ -46498,7 +46498,7 @@ "tranche_end": "2023-05-05T00:00:00.000Z", "total_added": "14597706.0446472999", "total_removed": "5781272.031584311406488996", - "locked_amount": "1035880.629997723569255699501954567", + "locked_amount": "1029126.764932550789662065977913855", "deposits": [ { "amount": "129284.449", @@ -53930,7 +53930,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "5778205.3912159303", "total_removed": "3381706.364737906998719578", - "locked_amount": "92379.298325811440012225988805963", + "locked_amount": "89710.8053915257113869983245366295", "deposits": [ { "amount": "552496.6455", @@ -56058,7 +56058,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "472355.6199999996", "total_removed": "38818.1373783577949", - "locked_amount": "90258.98682236420185873334500254", + "locked_amount": "89932.07048033860228826051293758", "deposits": [ { "amount": "3000",