Skip to content

Commit 25a8a83

Browse files
Merge branch 'main' of github.com:valory-xyz/autonolas-frontend-mono into tanya/votes-reset
2 parents f16dd96 + addc657 commit 25a8a83

File tree

43 files changed

+794
-291
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+794
-291
lines changed

.gitleaksignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,5 @@ d8375c535fba0ffcd1161714448dc92a84b17858:apps/autonolas-registry/common-util/Con
164164
d8375c535fba0ffcd1161714448dc92a84b17858:apps/autonolas-registry/common-util/Contracts/addresses.tsx:generic-api-key:125
165165
d8375c535fba0ffcd1161714448dc92a84b17858:apps/autonolas-registry/common-util/Contracts/addresses.tsx:generic-api-key:127
166166
d8375c535fba0ffcd1161714448dc92a84b17858:apps/autonolas-registry/common-util/Contracts/addresses.tsx:generic-api-key:131
167-
d8375c535fba0ffcd1161714448dc92a84b17858:apps/autonolas-registry/common-util/Contracts/addresses.tsx:generic-api-key:133
167+
d8375c535fba0ffcd1161714448dc92a84b17858:apps/autonolas-registry/common-util/Contracts/addresses.tsx:generic-api-key:133
168+
d8810d2030e1f57c8d873dda381116798d02660b:apps/bond/components/Paths/data.json:generic-api-key:178

CODEOWNERS

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# more info here - https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
22

3-
apps/ @mohandast52 @oaksprout @Tanya-atatakai @truemiller
4-
libs/ @mohandast52 @oaksprout @Tanya-atatakai @truemiller
3+
apps/ @mohandast52 @Tanya-atatakai @truemiller
4+
libs/ @mohandast52 @Tanya-atatakai @truemiller

apps/autonolas-registry/common-util/Login/LoginV2.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { isAddressProhibited } from 'libs/util-prohibited-data/src/index';
1313

1414
import { setUserBalance } from 'store/setup';
1515

16-
import { YellowButton } from '../YellowButton';
16+
import { YellowButton } from 'libs/ui-components/src';
1717
import { useHelpers } from '../hooks';
1818
import { SolanaWallet } from './SolanaWallet';
1919

apps/autonolas-registry/common-util/Login/config.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export const EVM_SUPPORTED_CHAINS = SUPPORTED_CHAINS.map((chain) => {
6767
if (name === 'OP Mainnet') return 'optimism';
6868
if (name === 'OP Sepolia') return 'optimism-sepolia';
6969
if (name === 'Alfajores') return 'celo-alfajores';
70+
if (name === 'Mode Mainnet') return 'mode';
7071
return kebabCase(name);
7172
};
7273

apps/autonolas-registry/common-util/YellowButton.jsx

-25
This file was deleted.

apps/autonolas-registry/components/Layout/index.jsx

+9-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import { VM_TYPE, useScreen } from '@autonolas/frontend-library';
88
import { ConnectionProvider, WalletProvider } from '@solana/wallet-adapter-react';
99
import { PhantomWalletAdapter } from '@solana/wallet-adapter-wallets';
1010

11+
import { NavDropdown } from 'libs/ui-components/src';
12+
1113
import { PAGES_TO_LOAD_WITHOUT_CHAINID } from '../../util/constants';
1214
import { useHelpers } from '../../common-util/hooks';
1315
import { ALL_SUPPORTED_CHAINS, getSvmEndpoint } from '../../common-util/Login/config';
@@ -32,9 +34,13 @@ const Layout = ({ children }) => {
3234
return (
3335
<CustomLayout>
3436
<OlasHeader ismobile={`${isMobile}`}>
35-
<Logo onClick={onHomeClick} data-testid="protocol-logo" ismobile={`${isMobile}`}>
36-
{isMobile || isTablet ? <LogoIconSvg /> : <LogoSvg />}
37-
</Logo>
37+
<div className="header-left-content">
38+
<Logo onClick={onHomeClick} data-testid="protocol-logo" ismobile={`${isMobile}`}>
39+
{isMobile || isTablet ? <LogoIconSvg /> : <LogoSvg />}
40+
</Logo>
41+
42+
<NavDropdown currentSite="registry" />
43+
</div>
3844

3945
<SelectContainer style={{ marginRight: isMobile ? 8 : 0 }}>
4046
<Select

apps/autonolas-registry/pages/_app.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const DESC = 'View and manage components, agents and services via the Autonolas
1818
const queryClient = new QueryClient();
1919
const projectId = process.env.NEXT_PUBLIC_WALLET_PROJECT_ID as string;
2020
const metadata = {
21-
name: 'Autonolas Registry',
21+
name: 'Olas Registry',
2222
description: DESC,
2323
url: 'https://registry.olas.network/',
2424
icons: ['https://avatars.githubusercontent.com/u/37784886'],
@@ -60,7 +60,7 @@ const RegistryApp = ({
6060
<>
6161
<GlobalStyles />
6262
<Head>
63-
<title>Autonolas Registry</title>
63+
<title>Olas Registry</title>
6464
<meta name="description" content={DESC} />
6565
</Head>
6666
<Provider store={store}>
0 Bytes
Binary file not shown.

apps/bond/components/BondingProducts/Bonding/BondingList/useBondingList.jsx

+10-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const LP_PAIRS = {
8181
poolId: '0x5bb3e58887264b667f915130fd04bbb56116c27800020000000000000000012a',
8282
guide: 'weth-olas-via-balancer-on-optimism',
8383
},
84-
// base
84+
// base OLAS-USDC
8585
'0x9946d6FD1210D85EC613Ca956F142D911C97a074': {
8686
lpChainId: base.id,
8787
name: 'OLAS-USDC',
@@ -90,6 +90,15 @@ const LP_PAIRS = {
9090
poolId: '0x5332584890d6e415a6dc910254d6430b8aab7e69000200000000000000000103',
9191
guide: 'olas-usdc-via-balancer-on-base',
9292
},
93+
// base WETH-OLAS
94+
'0xad47b6ffEe3ed15fCE55eCA42AcE9736901b94A1': {
95+
lpChainId: base.id,
96+
name: 'WETH-OLAS',
97+
originAddress: '0x2da6e67c45af2aaa539294d9fa27ea50ce4e2c5f',
98+
dex: DEX.BALANCER.name,
99+
poolId: '0x2da6e67c45af2aaa539294d9fa27ea50ce4e2c5f0002000000000000000001a3',
100+
guide: 'weth-olas-via-balancer-on-base',
101+
},
93102
// celo
94103
'0xC085F31E4ca659fF8A17042dDB26f1dcA2fBdAB4': {
95104
lpChainId: celo.id,

apps/bond/components/Layout/index.jsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { useEffect, useState } from 'react';
99
import styled from 'styled-components';
1010

1111
import { COLOR } from 'libs/ui-theme/src';
12+
import { NavDropdown } from 'libs/ui-components/src';
1213

1314
import { useHelpers } from 'common-util/hooks/useHelpers';
1415
import { Logo as LogoSvg } from 'components/Branding/Logo';
@@ -53,12 +54,14 @@ const Layout = ({ children }) => {
5354
return (
5455
<CustomLayout pathname={router.pathname}>
5556
<StyledHeader>
56-
<div className="column-1">
57+
<div className="column-1 header-left-content">
5758
<Link href="/">
5859
<Logo data-testid="tokenomics-logo">
5960
<LogoSvg />
6061
</Logo>
6162
</Link>
63+
64+
<NavDropdown currentSite="bond" />
6265
</div>
6366

6467
<Menu

apps/bond/components/Paths/data.json

+27
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,33 @@
155155
}
156156
}
157157
},
158+
{
159+
"id": "weth-olas-via-balancer-on-base",
160+
"name": "WETH-OLAS via Balancer on Base",
161+
"network": "Base",
162+
"networkId": "base",
163+
"address": "0x54330d28ca3357F294334BDC454a032e7f353416",
164+
"explorerBaseUrl": "https://basescan.org/token/",
165+
"exchange": {
166+
"name": "Balancer",
167+
"url": "https://app.balancer.fi/#/base/pool/0x2da6e67c45af2aaa539294d9fa27ea50ce4e2c5f0002000000000000000001a3",
168+
"poolAddress": "0x2da6e67c45af2aaa539294d9fa27ea50ce4e2c5f"
169+
},
170+
"bridge": {
171+
"name": "Superbridge App",
172+
"url": "https://superbridge.app/base"
173+
},
174+
"bond": {
175+
"guideUrl": "https://olas.network/blog/bonding-guide-base",
176+
"lpTokenName": "WETH-OLAS",
177+
"lpPairTokenTicker": "WETH",
178+
"bridgedLpTokenAddress": "0xad47b6ffEe3ed15fCE55eCA42AcE9736901b94A1",
179+
"lpTokenBridge": {
180+
"name": "Wormhole: Portal Token Bridge",
181+
"url": "https://portalbridge.com/advanced-tools/#/transfer"
182+
}
183+
}
184+
},
158185
{
159186
"id": "wsol-olas-via-orca-on-solana",
160187
"name": "WSOL-OLAS via Orca on Solana",
Loading

apps/govern/common-util/functions/requests.ts

+5
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ export const checkIfContractDisabled = async (
7676
try {
7777
const result: Address[] = [];
7878

79+
// TODO: once verified contracts shouldn't be verified again;
80+
// the limits in Staking Verifier can change, but the contracts created before
81+
// that are still valid. We need to use
82+
// `stakingFactory.mapInstanceParams(instance).isEnabled`
83+
// instead
7984
const response = await readContracts(wagmiConfig, {
8085
contracts: allocations.map((item) => ({
8186
address: (STAKING_FACTORY.addresses as Record<number, Address>)[item.chainId as number],

apps/govern/components/Contract/index.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@ export const ContractPage = () => {
112112
const router = useRouter();
113113
const { isStakingContractsLoading, stakingContracts } = useAppSelector((state) => state.govern);
114114

115-
const contract = stakingContracts.find((item) => item.address === router?.query?.address);
115+
const contract = stakingContracts.find(
116+
(item) =>
117+
item.address.toLowerCase() === ((router?.query?.address as string) || '').toLowerCase(),
118+
);
116119

117120
if (isStakingContractsLoading) {
118121
return <SkeletonPage />;

apps/govern/components/Donate/index.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-unused-vars */
21
import { Alert, Button, Card, Skeleton, Typography } from 'antd';
32
import { ethers } from 'ethers';
43
import isNumber from 'lodash/isNumber';
@@ -170,7 +169,7 @@ export const DonatePage = () => {
170169
<DonateForm isLoading={isDonationLoading} onSubmit={onDepositServiceDonationSubmit} />
171170
</Card>
172171

173-
{/* <Card className="last-epoch-section">
172+
<Card className="last-epoch-section">
174173
<Title level={2} className="mt-0">
175174
Epoch Status
176175
</Title>
@@ -198,7 +197,7 @@ export const DonatePage = () => {
198197
</Button>
199198
<Text type="secondary">New epochs must be manually triggered by community members</Text>
200199
</EpochCheckpointRow>
201-
</Card> */}
200+
</Card>
202201
</DonateContainer>
203202
);
204203
};

apps/govern/components/Layout/index.tsx

+9-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import { Footer } from './Footer';
1010
import { LogoSvg } from './Logos';
1111
import { NavigationMenu } from './Menu';
1212
import { CustomLayout, Logo, OlasHeader, RightMenu } from './styles';
13+
import { NavDropdown } from 'libs/ui-components/src';
14+
import { SwitchNetworkButton } from 'components/Login/SwitchNetworkButton';
1315

1416
const { Content } = AntdLayout;
1517

@@ -23,12 +25,16 @@ export const Layout: FC<LayoutProps> = ({ children }) => {
2325
return (
2426
<CustomLayout>
2527
<OlasHeader>
26-
<Logo href="/">
27-
<LogoSvg />
28-
</Logo>
28+
<div className="header-left-content">
29+
<Logo href="/">
30+
<LogoSvg />
31+
</Logo>
32+
<NavDropdown currentSite="govern" />
33+
</div>
2934
<NavigationMenu />
3035
<RightMenu>
3136
<Balance />
37+
<SwitchNetworkButton />
3238
<LoginV2 />
3339
</RightMenu>
3440
</OlasHeader>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { useAccount, useSwitchChain } from 'wagmi';
2+
3+
import { SwitchNetworkButton as SwitchNetworkButtonComponent } from 'libs/ui-components/src';
4+
import { mainnet } from 'viem/chains';
5+
6+
export const SwitchNetworkButton = () => {
7+
const { chain: walletConnectedChain } = useAccount();
8+
const { switchChainAsync, isPending } = useSwitchChain();
9+
10+
return (
11+
<SwitchNetworkButtonComponent
12+
walletConnectedChain={walletConnectedChain}
13+
networkId={mainnet.id}
14+
switchChainAsync={switchChainAsync}
15+
isPending={isPending}
16+
/>
17+
);
18+
};

apps/govern/components/Proposals/ProposalDetails.tsx

+11-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { estimateFutureBlockTimestamp, getFullFormattedDate } from 'common-util/
1111
import { Proposal } from 'common-util/graphql/types';
1212

1313
import { VOTES_SUPPORT, formatWeiToEth } from './utils';
14-
import { NA } from 'libs/util-constants/src';
14+
import { EXPLORER_URLS, NA, UNICODE_SYMBOLS } from 'libs/util-constants/src';
1515

1616
const { Paragraph, Text } = Typography;
1717

@@ -87,6 +87,16 @@ export const ProposalDetails = ({
8787
</Flex>
8888
<Caption>Proposal ID</Caption>
8989
<Paragraph className="mb-16">{item.id}</Paragraph>
90+
91+
<Caption>Transaction</Caption>
92+
<a
93+
href={`${EXPLORER_URLS[mainnet.id]}/tx/${item.transactionHash}`}
94+
target="_blank"
95+
rel="noreferrer"
96+
className="mb-16"
97+
>
98+
{`${item.transactionHash} ${UNICODE_SYMBOLS.EXTERNAL_LINK}`}
99+
</a>
90100
</Flex>
91101
);
92102
};

0 commit comments

Comments
 (0)