Skip to content

Commit

Permalink
feat: cross chain boost sync support (#3377)
Browse files Browse the repository at this point in the history
* feat: add cross chain cards

* feat: add cross chain sync modal

* feat: add modal info selectors

* wip

* feat: add omni escrow request

* wip

* feat: create feature base branch

* feat: add sync state logic

* feat: add sync modals

* wip

* feat: add omni escrow voting contract

* feat: add tx error handling

* feat: add syncing network logic

* wip

* feat: add veBal balance display

* feat: add comments

* feat: add balances calculation

* feat: add sort in omni and vote escrow requests

* feat: add all unsynced state

* feat: add balances on final state

* fix: loader lint

* feat: change icons

* feat: add refetch icons

* feat: add polygon network

* feat: add temp syncing networks

* Add unit tests for useCrossChainSync

* wip

* feat: add sync refetch watcher

* feat: add cross chain sync provider

* feat: add gnosis and optimism networks

* feat: change networks icons

* feat: proper add gnosis url

* Refactor: extract useCrossChainNetwork (#3505)

* feat: add warning and info alerts

* feat: add procees to sync vebal modal

* feat: add l2 vebal balance on portfolio page

* feat: add portfolio sync tip component

* feat: app proper sync tip condition

* feat: increase sync state refetch time

* feat: change claim page texts

* feat: add boost calculation on l2s

* fix: tests

* fix: use boosts test

* feat: change refresh logic

* feat: change subgraph urls

* feat: add error alert

* feat: check tx with response mock

* fix: temp remove set to local storage

* fix: temp remove set to local storage

* feat: add clear temp sync condition

* feat: prevent memory leaking on localstorage set

* feat: remove icons

* feat: remove logs

* feat: change final state text

* feat: change l2 pools apr calc

* feat: put sync data in config

* feat: get data from configs

* fix: omni escrow locks value

* feat: add success check icon

* Fix tests

* fix: naming

* Updated network icons

* UI clean up cross chain sync

* fix: review fixes

* feat: sync related ui alerts on pool page (#3542)

* feat: add gauge balancer helper contract

* feat: add alerts in staking card

* wip

* feat: add check balances

* feat: add alerts on pool page

* wip

* feat: add user checkpoint actions

* remove logs

* feat: add networks tooltips

* feat: change sync process warning

* feat: change unstake btn style

* UI updates

* feat: change unsynced arr

* fix: unstake btn style

* feat: fix trigger update fn

* feat: open staking incentives card by default

* feat: add sync tips

* feat: opening staking incentives card

* feat: change texts

* feat: add info message

* fixes after review

---------

Co-authored-by: pkattera <[email protected]>

* chore: update wording (#3620)

* chore: Update wording

* chore: Update wording

* feat: add layer zero tx link (#3625)

* feat: add layer zero tx links

* feat: add timeout on l0 tx hashes set

* feat: hide text if no l0 link

* feat: remove test code

* feat: add padding if no link

* feat: implement fetch l0 messages on interval

* fix package lock

---------

Co-authored-by: Alberto Gualis <[email protected]>
Co-authored-by: Alberto Gualis <[email protected]>
Co-authored-by: pkattera <[email protected]>
Co-authored-by: Gareth Fuller <[email protected]>
  • Loading branch information
5 people authored Jul 6, 2023
1 parent 5d87918 commit 3eeb059
Show file tree
Hide file tree
Showing 87 changed files with 3,050 additions and 126 deletions.
17 changes: 17 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@
"wait-for-expect": "^3.0.2",
"walletlink": "^2.1.5",
"web3-utils": "^1.3.1",
"worker-loader": "^3.0.8"
"worker-loader": "^3.0.8",
"@layerzerolabs/scan-client": "^0.0.5"
},
"lint-staged": {
"*.{js,ts,vue}": "eslint --cache --fix --max-warnings 0",
Expand Down
2 changes: 2 additions & 0 deletions src/Root.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { provideTokens } from '@/providers/tokens.provider';
import { provideUserData } from '@/providers/user-data.provider';
import { provideWallets } from './providers/wallet.provider';
import { createProviderComponent } from './providers/createProviderComponent';
import { provideCrossChainSync } from './providers/cross-chain-sync.provider';
// The other providers call useWallets so we need to provide it in a higher level
const WalletsProvider = createProviderComponent(() => provideWallets());
Expand All @@ -18,6 +19,7 @@ const GlobalProvider = createProviderComponent(() => {
const tokenLists = provideTokenLists();
provideTokens(userSettings, tokenLists);
provideUserData();
provideCrossChainSync();
});
/**
Expand Down
30 changes: 30 additions & 0 deletions src/__mocks__/transactions.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
import BigNumber from 'bignumber.js';

const txReceiptMock = {
to: '0x1234567890abcdef',
from: '0xabcdef1234567890',
contractAddress: '0xabcdefabcdef1234567890',
transactionIndex: 1,
root: '0xabcdef1234567890abcdef',
gasUsed: new BigNumber('100000'),
logsBloom: '0xabcdef1234567890abcdef',
blockHash: '0xabcdef1234567890abcdef',
transactionHash: '0xabcdef1234567890abcdef',
logs: [
{
// Sample log object
address: '0xabcdef1234567890abcdef',
data: '0xabcdef1234567890abcdef',
topics: ['0xabcdef1234567890abcdef', '0xabcdef1234567890abcdef'],
},
],
blockNumber: 1000,
confirmations: 10,
cumulativeGasUsed: new BigNumber('200000'),
effectiveGasPrice: new BigNumber('5000000000'),
byzantium: true,
type: 1,
status: 1,
};

export const txResponseMock = {
hash: '0xdac16ca21df7e4e2c9e013a7c1b8e1b869bf0bc6e97dde103e280703a60ff00d',
type: 2,
Expand Down Expand Up @@ -35,4 +64,5 @@ export const txResponseMock = {
v: 1,
creates: null,
chainId: 0,
wait: () => txReceiptMock,
};
1 change: 1 addition & 0 deletions src/assets/data/contracts/arbitrum.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"ChildChainGauge": "0xa523f47A933D5020b23629dDf689695AA94612Dc",
"ChildChainGaugeFactory": "0x6817149cb753BF529565B4D023d7507eD2ff4Bc0",
"ChildChainGaugeRewardHelper": "0xA0DAbEBAAd1b243BBb243f933013d560819eB66f",
"ChildChainGaugeWorkingBalanceHelper": "0xEa924b45a3fcDAAdf4E5cFB1665823B8F8F2039B",
"ChildChainGaugeTokenAdder": "0xbfD9769b061E57e478690299011A028194D66e3C",
"ChildChainLiquidityGaugeFactory": "0xb08E16cFc07C684dAA2f93C70323BAdb2A6CBFd2",
"ChildChainStreamer": "0xD7FAD3bd59D6477cbe1BE7f646F7f1BA25b230f8",
Expand Down
1 change: 1 addition & 0 deletions src/assets/data/contracts/gnosis.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"ChildChainGauge": "0x96484f2aBF5e58b15176dbF1A799627B53F13B6d",
"ChildChainGaugeFactory": "0x83E443EF4f9963C77bd860f94500075556668cb8",
"ChildChainGaugeRewardHelper": "0xf7D5DcE55E6D47852F054697BAB6A1B48A00ddbd",
"ChildChainGaugeWorkingBalanceHelper": "0x682f0dDBFd41D1272982f64a499Fb62d80e27589",
"ChildChainGaugeTokenAdder": "0x1802953277FD955f9a254B80Aa0582f193cF1d77",
"ChildChainLiquidityGaugeFactory": "0x809B79b53F18E9bc08A961ED4678B901aC93213a",
"ChildChainStreamer": "0x230a59F4d9ADc147480f03B0D3fFfeCd56c3289a",
Expand Down
1 change: 1 addition & 0 deletions src/assets/data/contracts/optimism.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"ChildChainGauge": "0x81cFAE226343B24BA12EC6521Db2C79E7aeeb310",
"ChildChainGaugeFactory": "0xa523f47A933D5020b23629dDf689695AA94612Dc",
"ChildChainGaugeRewardHelper": "0x8aB784368A1883DA90D8513b48801e2Db1cb2D5D",
"ChildChainGaugeWorkingBalanceHelper": "0x9129E834e15eA19b6069e8f08a8EcFc13686B8dC",
"ChildChainGaugeTokenAdder": "0x6f5a2eE11E7a772AeB5114A20d0D7c0ff61EB8A0",
"ChildChainLiquidityGaugeFactory": "0x2E96068b3D5B5BAE3D7515da4A1D2E52d08A2647",
"ChildChainStreamer": "0x239e55F427D44C3cc793f49bFB507ebe76638a2b",
Expand Down
1 change: 1 addition & 0 deletions src/assets/data/contracts/polygon.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"ChildChainGauge": "0xc9b36096f5201ea332Db35d6D195774ea0D5988f",
"ChildChainGaugeFactory": "0x22625eEDd92c81a219A83e1dc48f88d54786B017",
"ChildChainGaugeRewardHelper": "0xaEb406b0E430BF5Ea2Dc0B9Fe62E4E53f74B3a33",
"ChildChainGaugeWorkingBalanceHelper": "0x08fd003D8F1892D4EC684E6C3EE0128081be461b",
"ChildChainGaugeTokenAdder": "0x1554ee754707D5C93b7934AF404747Aba521Aaf2",
"ChildChainLiquidityGaugeFactory": "0x3b8cA519122CdD8efb272b0D3085453404B25bD0",
"ChildChainStreamer": "0x6f5a2eE11E7a772AeB5114A20d0D7c0ff61EB8A0",
Expand Down
19 changes: 19 additions & 0 deletions src/assets/images/icons/frame-loading.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions src/assets/images/icons/networks/arbitrum-one.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions src/assets/images/icons/networks/arbitrum.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 14 additions & 7 deletions src/assets/images/icons/networks/ethereum.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

1 comment on commit 3eeb059

@vercel
Copy link

@vercel vercel bot commented on 3eeb059 Jul 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.