Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop to Main #203

Merged
merged 12 commits into from
Mar 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -29,6 +29,7 @@ jobs:
RPC_PROVIDER_URL_11155111: ${{ vars.RPC_PROVIDER_URL_11155111 }}
RPC_PROVIDER_URL_11155420: ${{ vars.RPC_PROVIDER_URL_11155420 }}
RPC_PROVIDER_URL_1946: ${{ vars.RPC_PROVIDER_URL_1946 }}
RPC_PROVIDER_URL_1301: ${{ vars.RPC_PROVIDER_URL_1301 }}
WALLETCONNECT_PROJECT_ID: ${{ vars.WALLETCONNECT_PROJECT_ID }}
SUPPORTED_CHAINS: ${{ vars.SUPPORTED_CHAINS }}
DEFAULT_CHAIN: ${{ vars.DEFAULT_CHAIN }}
1 change: 1 addition & 0 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
@@ -57,6 +57,7 @@ jobs:
RPC_PROVIDER_URL_11155111: ${{ vars.RPC_PROVIDER_URL_11155111 }}
RPC_PROVIDER_URL_11155420: ${{ vars.RPC_PROVIDER_URL_11155420 }}
RPC_PROVIDER_URL_1946: ${{ vars.RPC_PROVIDER_URL_1946 }}
RPC_PROVIDER_URL_1301: ${{ vars.RPC_PROVIDER_URL_1301 }}
WALLETCONNECT_PROJECT_ID: ${{ vars.WALLETCONNECT_PROJECT_ID }}
SUPPORTED_CHAINS: ${{ vars.SUPPORTED_CHAINS }}
DEFAULT_CHAIN: ${{ vars.DEFAULT_CHAIN }}
6 changes: 4 additions & 2 deletions docs/sdk/modules/l2.md
Original file line number Diff line number Diff line change
@@ -11,12 +11,14 @@ Modules exposes Lido MultiChain deployments. [See full info here](https://lido.f
This is core module for all L2 functionality. It will throw error if used on with chains that are not currently supported.

| **Chain** | **wsETH** | **stETH+(un)Wrap** |
|------------------| --------- | ------------------ |
| ---------------- | --------- | ------------------ |
| Optimism Sepolia | ✅ | ✅ |
| Optimism | ✅ | ✅ |
| Soneium Minato | ✅ | ✅ |
| Soneium | ✅ | ✅ |
| more 🔜 | | |
| Unichain Sepolia | ✅ | ✅ |
| Unichain | ✅ | ✅ |
| more 🔜 | | |

Use this helper to understand which contracts are supported on chain:

8 changes: 8 additions & 0 deletions packages/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 4.3.0

## SDK

### Added

- `Unichain`, `UnichainSepolia` L2 chains support

# 4.2.0

## SDK
16 changes: 16 additions & 0 deletions packages/sdk/src/common/constants.ts
Original file line number Diff line number Diff line change
@@ -7,6 +7,8 @@ import {
optimism,
soneiumMinato,
soneium,
unichain,
unichainSepolia,
} from 'viem/chains';

export enum CHAINS {
@@ -17,6 +19,8 @@ export enum CHAINS {
OptimismSepolia = 11155420,
Soneium = 1868,
SoneiumMinato = 1946,
Unichain = 130,
UnichainSepolia = 1301,
}

export const APPROX_BLOCKS_BY_DAY = 7600n;
@@ -29,6 +33,8 @@ export const SUPPORTED_CHAINS: CHAINS[] = [
CHAINS.OptimismSepolia,
CHAINS.Soneium,
CHAINS.SoneiumMinato,
CHAINS.Unichain,
CHAINS.UnichainSepolia,
];

export const SUBMIT_EXTRA_GAS_TRANSACTION_RATIO = 1.05;
@@ -105,6 +111,14 @@ export const LIDO_L2_CONTRACT_ADDRESSES: {
wsteth: '0xf7489b8d220DCf33bAe6b594C070061E4da9fDa9',
steth: '0x4e55E2d4c83df2E0083f1D616AFf007ac420b110',
},
[CHAINS.Unichain]: {
wsteth: '0xc02fE7317D4eb8753a02c35fe019786854A92001',
steth: '0x81f2508AAC59757EF7425DDc9717AB5c2AA0A84F',
},
[CHAINS.UnichainSepolia]: {
wsteth: '0xE66e1B0931345900024b524A88BBE58f09A18FD0',
steth: '0x4436b2d6A2a0807b211c6a725E905b736dF8511F',
},
};

export const CONTRACTS_BY_TOKENS = {
@@ -147,6 +161,8 @@ export const VIEM_CHAINS: { [key in CHAINS]: Chain } = {
[CHAINS.OptimismSepolia]: optimismSepolia,
[CHAINS.Soneium]: soneium,
[CHAINS.SoneiumMinato]: soneiumMinato,
[CHAINS.Unichain]: unichain,
[CHAINS.UnichainSepolia]: unichainSepolia,
};

export const WQ_API_URLS: { [key in CHAINS]?: string } = {
2 changes: 2 additions & 0 deletions playground/env-dynamics.mjs
Original file line number Diff line number Diff line change
@@ -9,6 +9,8 @@ export const rpcProviderUrls = {
11155420: process.env[`RPC_PROVIDER_URL_11155420`],
// Soneium Minato
1946: process.env[`RPC_PROVIDER_URL_1946`],
// Unichain Sepolia
1301: process.env[`RPC_PROVIDER_URL_1301`],
};
/** @type number */
export const defaultChain = parseInt(process.env.DEFAULT_CHAIN, 10) || 17000;
4 changes: 3 additions & 1 deletion playground/providers/web3.tsx
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ import { useThemeToggle } from '@lidofinance/lido-ui';

type ChainsList = [wagmiChains.Chain, ...wagmiChains.Chain[]];

export const L2_CHAINS = [10, 11155420, 1946];
export const L2_CHAINS = [10, 11155420, 1946, 1301];

const wagmiChainsArray = Object.values(wagmiChains) as any as ChainsList;

@@ -68,6 +68,8 @@ const Web3Provider: FC<PropsWithChildren> = ({ children }) => {
[CHAINS.OptimismSepolia]: getRpc(CHAINS.OptimismSepolia),
// Soneium Minato
[CHAINS.SoneiumMinato]: getRpc(CHAINS.SoneiumMinato),
// Unichain Sepolia
[CHAINS.UnichainSepolia]: getRpc(CHAINS.UnichainSepolia),
};
}, [customRpc]);

57 changes: 42 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -7680,13 +7680,13 @@ __metadata:
languageName: node
linkType: hard

"@octokit/endpoint@npm:^9.0.0":
version: 9.0.4
resolution: "@octokit/endpoint@npm:9.0.4"
"@octokit/endpoint@npm:^9.0.6":
version: 9.0.6
resolution: "@octokit/endpoint@npm:9.0.6"
dependencies:
"@octokit/types": ^12.0.0
"@octokit/types": ^13.1.0
universal-user-agent: ^6.0.0
checksum: ed1b64a448f478e5951a043ef816d634a5a1f584519cbf2f374ceac058f82a16e52f078f156aa8b8cbcab7b0590348d94294fc83c9b4eebd42a820a5f10db81c
checksum: f853c08f0777a8cc7c3d2509835d478e11a76d722f807d4f2ad7c0e64bf4dd159536409f466b367a907886aa3b78574d3d09ed95ac462c769e4fccaaad81e72a
languageName: node
linkType: hard

@@ -7708,6 +7708,13 @@ __metadata:
languageName: node
linkType: hard

"@octokit/openapi-types@npm:^23.0.1":
version: 23.0.1
resolution: "@octokit/openapi-types@npm:23.0.1"
checksum: 1e6766c60375375d85ecabded67d9ee313cf9401c18a44534b942717cf840d41b5a9d42035522efffe6b811ee2204d4615f72c333e984e81b25545926eb77989
languageName: node
linkType: hard

"@octokit/plugin-paginate-rest@npm:^9.0.0":
version: 9.2.0
resolution: "@octokit/plugin-paginate-rest@npm:9.2.0"
@@ -7745,25 +7752,36 @@ __metadata:
linkType: hard

"@octokit/request-error@npm:^5.0.0":
version: 5.0.1
resolution: "@octokit/request-error@npm:5.0.1"
version: 5.1.1
resolution: "@octokit/request-error@npm:5.1.1"
dependencies:
"@octokit/types": ^12.0.0
"@octokit/types": ^13.1.0
deprecation: ^2.0.0
once: ^1.4.0
checksum: 17d0b3f59c2a8a285715bfe6a85168d9c417aa7a0ff553b9be4198a3bc8bb00384a3530221a448eb19f8f07ea9fc48d264869624f5f84fa63a948a7af8cddc8c
languageName: node
linkType: hard

"@octokit/request-error@npm:^5.1.1":
version: 5.1.1
resolution: "@octokit/request-error@npm:5.1.1"
dependencies:
"@octokit/types": ^13.1.0
deprecation: ^2.0.0
once: ^1.4.0
checksum: a681341e43b4da7a8acb19e1a6ba0355b1af146fa0191f2554a98950cf85f898af6ae3ab0b0287d6c871f5465ec57cb38363b96b5019f9f77ba6f30eca39ede5
checksum: 17d0b3f59c2a8a285715bfe6a85168d9c417aa7a0ff553b9be4198a3bc8bb00384a3530221a448eb19f8f07ea9fc48d264869624f5f84fa63a948a7af8cddc8c
languageName: node
linkType: hard

"@octokit/request@npm:^8.0.1, @octokit/request@npm:^8.0.2":
version: 8.2.0
resolution: "@octokit/request@npm:8.2.0"
version: 8.4.1
resolution: "@octokit/request@npm:8.4.1"
dependencies:
"@octokit/endpoint": ^9.0.0
"@octokit/request-error": ^5.0.0
"@octokit/types": ^12.0.0
"@octokit/endpoint": ^9.0.6
"@octokit/request-error": ^5.1.1
"@octokit/types": ^13.1.0
universal-user-agent: ^6.0.0
checksum: 24dd2c96769aa52df19fdbf4058dfd06dc3a799121250c10ec5fbea4c43ec0183639a2beccc84053df2c298c18892ed8fbf722f1ca5271003feaac5290272beb
checksum: 0ba76728583543baeef9fda98690bc86c57e0a3ccac8c189d2b7d144d248c89167eb37a071ed8fead8f4da0a1c55c4dd98a8fc598769c263b95179fb200959de
languageName: node
linkType: hard

@@ -7776,6 +7794,15 @@ __metadata:
languageName: node
linkType: hard

"@octokit/types@npm:^13.1.0":
version: 13.8.0
resolution: "@octokit/types@npm:13.8.0"
dependencies:
"@octokit/openapi-types": ^23.0.1
checksum: be5fb327d0e39765e06f5a314556a273ff2bfb9ce4fd5a6e52c237d2f20a4c329493a8bde2c595cb82a5022f07ee6495dfff07ce24e3de4660c9ead913e3db0d
languageName: node
linkType: hard

"@parcel/watcher-android-arm64@npm:2.4.0":
version: 2.4.0
resolution: "@parcel/watcher-android-arm64@npm:2.4.0"