Skip to content
Merged
Show file tree
Hide file tree
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 config/gaszip.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"scroll": "0x2a37D63EAdFe4b4682a3c28C1c2cD4F109Cc2762",
"sei": "0x3ac2cD998cB96a699f88C3C665abC767A9800cc8",
"sonic": "0x2a37D63EAdFe4b4682a3c28C1c2cD4F109Cc2762",
"somnia": "0x9E22ebeC84c7e4C4bD6D4aE7FF6f4D436D6D8390",
"sophon": "0x6CbC57A6162839d782B2B4a1BD18554135e4Fafa",
"stable": "0x9E22ebeC84c7e4C4bD6D4aE7FF6f4D436D6D8390",
"superposition": "0x2a37D63EAdFe4b4682a3c28C1c2cD4F109Cc2762",
Expand Down
21 changes: 21 additions & 0 deletions config/networks.json
Original file line number Diff line number Diff line change
Expand Up @@ -1142,6 +1142,27 @@
"deployedWithSolcVersion": "0.8.17",
"create3Factory": "0x93FEC2C00BfE902F733B57c5a6CeeD7CD1384AE1"
},
"somnia": {
"name": "somnia",
"chainId": 5031,
"nativeAddress": "0x0000000000000000000000000000000000000000",
"nativeCurrency": "SOMI",
"wrappedNativeAddress": "0x046EDe9564A72571df6F5e44d0405360c0f4dCab",
"status": "active",
"type": "mainnet",
"rpcUrl": "https://api.infra.mainnet.somnia.network",
"verificationType": "blockscout",
"explorerUrl": "https://explorer.somnia.network",
"explorerApiUrl": "https://mainnet.somnia.w3us.site/api",
"multicallAddress": "0x5e44F178E8cF9B2F5409B6f18ce936aB817C5a11",
"safeAddress": "0x9A9a96827a97b145cb1dB0e79297F9206A22f5Fc",
"gasZipChainId": 524,
"isZkEVM": false,
"deployedWithEvmVersion": "cancun",
"deployedWithSolcVersion": "0.8.29",
"create3Factory": "0xE2cb61f7e383270c9153563C6e5A18E5A7A43397",
"devNotes": "deployments only worked with extra large gas multiplier (used 10000)"
},
"soneium": {
"name": "soneium",
"chainId": 1868,
Expand Down
1 change: 1 addition & 0 deletions config/permit2Proxy.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"rootstock": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
"scroll": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
"sei": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
"somnia": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
"soneium": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
"sonic": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
"sophon": "0xb8e9B994102309E820cf29BA0D98673C8995Ebad",
Expand Down
4 changes: 4 additions & 0 deletions config/relay.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@
"sei": {
"relayDepository": "0x4cd00e387622c35bddb9b4c962c136462338bc31"
},
"somnia": {
"relayReceiver": "0xbf05bdaff9b80cf511f89069410af2d7b1897471",
"relayDepository": "0x4cd00e387622c35bddb9b4c962c136462338bc31"
},
"soneium": {
"relayDepository": "0x4cd00e387622c35bddb9b4c962c136462338bc31"
},
Expand Down
2 changes: 2 additions & 0 deletions config/stargateV2.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"polygonzkevm": "0x1a44076050125825900e736c501f859c50fE728c",
"rootstock": "0xcb566e3B6934Fa77258d68ea18E931fa75e1aaAa",
"sei": "0x1a44076050125825900e736c501f859c50fE728c",
"somnia": "0x6F475642a6e85809B1c36Fa62763669b1b48DD5B",
"soneium": "0x4bcb6a963a9563c33569d7a512d35754221f3a19",
"scroll": "0x1a44076050125825900e736c501f859c50fE728c",
"sonic": "0x6F475642a6e85809B1c36Fa62763669b1b48DD5B",
Expand Down Expand Up @@ -99,6 +100,7 @@
"rootstock": "0x45a01e4e04f14f7a4a6702c74187c5f6222033cd",
"sei": "0x1502FA4be69d526124D453619276FacCab275d3D",
"scroll": "0x4e422b0acb2bd7e3ac70b5c0e5eb806e86a94038",
"somnia": "0x78adD880A697070c1e765Ac44D65323a0DcCE913",
"soneium": "0xAF54BE5B6eEc24d6BFACf1cce4eaF680A8239398",
"sonic": "0x2086f755A6d9254045C257ea3d382ef854849B0f",
"sophon": "0x8d96695B834d2bAC27BD9511c586E7c834548cEC",
Expand Down
70 changes: 69 additions & 1 deletion config/whitelist.json
Original file line number Diff line number Diff line change
Expand Up @@ -9417,6 +9417,74 @@
]
}
],
"somnia": [
{
"name": "FeeCollector",
"address": "0x84F071fcD60e5ff3B0E618B80Fb3DD6857C0e20c",
"selectors": [
{
"selector": "0xe0cbc5f2",
"signature": "collectNativeFees(uint256,uint256,address)"
},
{
"selector": "0xeedd56e1",
"signature": "collectTokenFees(address,uint256,uint256,address)"
}
]
},
{
"name": "FeeForwarder",
"address": "0x312C114ecAA3755286D1AE985F0277b0C6E87057",
"selectors": [
{
"selector": "0x0e8ae67f",
"signature": "forwardNativeFees((address,uint256)[])"
},
{
"selector": "0x332d746b",
"signature": "forwardERC20Fees(address,(address,uint256)[])"
}
]
},
{
"name": "GasZipPeriphery",
"address": "0xC4d74fe42cd158276d7EB97d946e485faFBda89b",
"selectors": [
{
"selector": "0x8b71ae6c",
"signature": "depositToGasZipERC20((address,address,address,address,uint256,bytes,bool),(bytes32,uint256))"
},
{
"selector": "0xc4af5a74",
"signature": "depositToGasZipNative((bytes32,uint256),uint256)"
}
]
},
{
"name": "TokenWrapper",
"address": "0x6c29Ee558c2dCBcc9d45a666A5240353273E23dD",
"selectors": [
{
"selector": "0x3ccfd60b",
"signature": "withdraw()"
},
{
"selector": "0xd0e30db0",
"signature": "deposit()"
}
]
},
{
"name": "LiFiDEXAggregator",
"address": "0xAD7272F01ccA70814387555C14C2F7AC1C50Aa98",
"selectors": [
{
"selector": "0x2646478b",
"signature": "processRoute(address,uint256,address,uint256,address,bytes)"
}
]
}
],
"soneium": [
{
"name": "FeeCollector",
Expand Down Expand Up @@ -10670,4 +10738,4 @@
}
]
}
}
}
79 changes: 79 additions & 0 deletions deployments/somnia.diamond.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"LiFiDiamond": {
"Facets": {
"0x67fb34dd0FFe5A73EC2AC4eB392E649b7f58e744": {
"Name": "DiamondCutFacet",
"Version": "1.0.0"
},
"0xBE5DdfBD1a00e8a7dbf19d77cDa1745455d4593B": {
"Name": "DiamondLoupeFacet",
"Version": "1.0.0"
},
"0x55fB4f9b7A90E8De03c8c0c54C3a5f9CaDf1E5Fe": {
"Name": "AccessManagerFacet",
"Version": "1.0.0"
},
"0x3FCedD498862b2705aFD1d70cF2B2c264e95b36D": {
"Name": "CalldataVerificationFacet",
"Version": "1.3.1"
},
"0x29866A651F9a414b5060f3D7e95b3b6824F0AF87": {
"Name": "EmergencyPauseFacet",
"Version": "1.0.1"
},
"0x9217f7Ec92cb9Ec98001D804E3053080f136DD68": {
"Name": "GenericSwapFacet",
"Version": "1.0.0"
},
"0xBBF6551c5573d3689981f3C4d39539285b7C2A5b": {
"Name": "GenericSwapFacetV3",
"Version": "1.0.2"
},
"0xB9e3952b7f884cbAf58383f8C4f8136a319519Db": {
"Name": "OwnershipFacet",
"Version": "1.0.0"
},
"0x2fc43E0784f33e9510b8B1dd65c6C64389212Bd4": {
"Name": "PeripheryRegistryFacet",
"Version": "1.0.0"
},
"0x329019D07737d5e089E12B1C7F1a962c666EEE9c": {
"Name": "WhitelistManagerFacet",
"Version": "1.1.0"
},
"0x74a91cBf6FE33706aA3fb9Be2E6CdFf523b6585D": {
"Name": "WithdrawFacet",
"Version": "1.0.0"
},
"0xC7f5fF020f8b91b5EaedD0FDD65F49Ef12ddFaab": {
"Name": "RelayDepositoryFacet",
"Version": "1.0.0"
},
"0xE89881FdF22D86e2146Cd7b40633011016081Fcf": {
"Name": "StargateFacetV2",
"Version": "1.0.1"
},
"0x9b9561A93b95eDe8a61605243C5F03459f7909dE": {
"Name": "GasZipFacet",
"Version": "2.0.5"
}
},
"Periphery": {
"ERC20Proxy": "0xE58c2CC78bA787bB8a549435bE6D31Ef92c150EF",
"Executor": "0x88d60e2C67c39981a69774D430CeC432E2327484",
"FeeCollector": "0x84F071fcD60e5ff3B0E618B80Fb3DD6857C0e20c",
"FeeForwarder": "0x312C114ecAA3755286D1AE985F0277b0C6E87057",
"GasZipPeriphery": "0xC4d74fe42cd158276d7EB97d946e485faFBda89b",
"LidoWrapper": "",
"LiFiDEXAggregator": "0xAD7272F01ccA70814387555C14C2F7AC1C50Aa98",
"Patcher": "",
"Permit2Proxy": "0x5b11025E373e5c238eF4a98f81e935259AaF79f3",
"ReceiverAcrossV3": "",
"ReceiverAcrossV4": "",
"ReceiverChainflip": "",
"ReceiverOIF": "",
"ReceiverStargateV2": "0x069aC4A19bA701F4aD8D53FF5590aB0268e697Ec",
"TokenWrapper": "0x6c29Ee558c2dCBcc9d45a666A5240353273E23dD"
}
}
}
27 changes: 27 additions & 0 deletions deployments/somnia.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"AccessManagerFacet": "0x55fB4f9b7A90E8De03c8c0c54C3a5f9CaDf1E5Fe",
"CalldataVerificationFacet": "0x3FCedD498862b2705aFD1d70cF2B2c264e95b36D",
"DiamondCutFacet": "0x67fb34dd0FFe5A73EC2AC4eB392E649b7f58e744",
"DiamondLoupeFacet": "0xBE5DdfBD1a00e8a7dbf19d77cDa1745455d4593B",
"EmergencyPauseFacet": "0x29866A651F9a414b5060f3D7e95b3b6824F0AF87",
"GenericSwapFacet": "0x9217f7Ec92cb9Ec98001D804E3053080f136DD68",
"GenericSwapFacetV3": "0xBBF6551c5573d3689981f3C4d39539285b7C2A5b",
"OwnershipFacet": "0xB9e3952b7f884cbAf58383f8C4f8136a319519Db",
"PeripheryRegistryFacet": "0x2fc43E0784f33e9510b8B1dd65c6C64389212Bd4",
"WhitelistManagerFacet": "0x329019D07737d5e089E12B1C7F1a962c666EEE9c",
"WithdrawFacet": "0x74a91cBf6FE33706aA3fb9Be2E6CdFf523b6585D",
"LiFiDiamond": "0x0bc413CAe89C5b3Ba3AA87FB98dCA23425E1828f",
"RelayDepositoryFacet": "0xC7f5fF020f8b91b5EaedD0FDD65F49Ef12ddFaab",
"StargateFacetV2": "0xE89881FdF22D86e2146Cd7b40633011016081Fcf",
"ERC20Proxy": "0xE58c2CC78bA787bB8a549435bE6D31Ef92c150EF",
"Executor": "0x88d60e2C67c39981a69774D430CeC432E2327484",
"FeeCollector": "0x84F071fcD60e5ff3B0E618B80Fb3DD6857C0e20c",
"FeeForwarder": "0x312C114ecAA3755286D1AE985F0277b0C6E87057",
"LiFiDEXAggregator": "0xAD7272F01ccA70814387555C14C2F7AC1C50Aa98",
"Permit2Proxy": "0x5b11025E373e5c238eF4a98f81e935259AaF79f3",
"ReceiverStargateV2": "0x069aC4A19bA701F4aD8D53FF5590aB0268e697Ec",
"TokenWrapper": "0x6c29Ee558c2dCBcc9d45a666A5240353273E23dD",
"LiFiTimelockController": "0xfc35701819Ce049247F999b2a6e1Ee1A8D719d97",
"GasZipPeriphery": "0xC4d74fe42cd158276d7EB97d946e485faFBda89b",
"GasZipFacet": "0x9b9561A93b95eDe8a61605243C5F03459f7909dE"
}
2 changes: 2 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ polygon = "${ETH_NODE_URI_POLYGON}"
rootstock = "${ETH_NODE_URI_ROOTSTOCK}"
ronin = "${ETH_NODE_URI_RONIN}"
sei = "${ETH_NODE_URI_SEI}"
somnia = "${ETH_NODE_URI_SOMNIA}"
soneium = "${ETH_NODE_URI_SONEIUM}"
sonic = "${ETH_NODE_URI_SONIC}"
sophon = "${ETH_NODE_URI_SOPHON}"
Expand Down Expand Up @@ -167,6 +168,7 @@ ronin= { key = "${NO_ETHERSCAN_API_KEY_REQUIRED}", url = "https://sourcify.ronin
rootstock= { key = "${NO_ETHERSCAN_API_KEY_REQUIRED}", url = "https://rootstock.blockscout.com/api", chain = "30", verifier = "blockscout" }
scroll = { key = "${MAINNET_ETHERSCAN_API_KEY}", url = "https://api.etherscan.io/v2/api?chainid=534352", chain = "534352" }
sei = { key = "${MAINNET_ETHERSCAN_API_KEY}", url = "https://api.etherscan.io/v2/api?chainid=1329", chain = "1329" }
somnia = { key = "${NO_ETHERSCAN_API_KEY_REQUIRED}", url = "https://mainnet.somnia.w3us.site/api", chain = "5031", verifier = "blockscout" }
soneium = { key = "${NO_ETHERSCAN_API_KEY_REQUIRED}", url = "https://soneium.blockscout.com/api", verifier = "blockscout", chain = "1868" }
sonic = { key = "${MAINNET_ETHERSCAN_API_KEY}", url = "https://api.etherscan.io/v2/api?chainid=146", chain = "146" }
sophon = { key = "${NO_ETHERSCAN_API_KEY_REQUIRED}", url = "https://explorer.sophon.xyz/contract_verification", chain = "50104", verifier = "zksync" }
Expand Down
30 changes: 30 additions & 0 deletions script/deploy/_targetState.json
Original file line number Diff line number Diff line change
Expand Up @@ -2430,5 +2430,35 @@
"FeeForwarder": "1.0.0"
}
}
},
"somnia": {
"production": {
"LiFiDiamond": {
"AccessManagerFacet": "1.0.0",
"CalldataVerificationFacet": "1.3.1",
"DiamondCutFacet": "1.0.0",
"DiamondLoupeFacet": "1.0.0",
"EmergencyPauseFacet": "1.0.1",
"GasZipFacet": "2.0.5",
"GenericSwapFacet": "1.0.0",
"GenericSwapFacetV3": "1.0.2",
"LiFiTimelockController": "1.0.1",
"OwnershipFacet": "1.0.0",
"PeripheryRegistryFacet": "1.0.0",
"WithdrawFacet": "1.0.0",
"LiFiDiamond": "1.0.0",
"ERC20Proxy": "1.1.0",
"Executor": "2.1.0",
"FeeCollector": "1.0.1",
"FeeForwarder": "1.0.0",
"GasZipPeriphery": "1.0.2",
"LiFiDEXAggregator": "1.12.0",
"TokenWrapper": "1.2.1",
"Permit2Proxy": "1.0.4",
"RelayDepositoryFacet": "1.0.0",
"StargateFacetV2": "1.0.1",
"ReceiverStargateV2": "1.1.0"
Comment thread
0xDEnYO marked this conversation as resolved.
}
}
}
}
9 changes: 6 additions & 3 deletions test/solidity/Periphery/Patcher.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -1911,8 +1911,8 @@ contract PatcherTest is TestBase {
depositoryData
);

bridgeData.minAmount =
0x1234567890ABCDEF1234567890ABCDEF1234567890ABCDEF1234567890ABCDEF;
bridgeData
.minAmount = 0x1234567890ABCDEF1234567890ABCDEF1234567890ABCDEF1234567890ABCDEF;
bytes memory calldataWithMarker = abi.encodeWithSelector(
relayDepositoryFacet.startBridgeTokensViaRelayDepository.selector,
bridgeData,
Expand All @@ -1921,7 +1921,10 @@ contract PatcherTest is TestBase {
bridgeData.minAmount = 0;

uint256[] memory offsets = new uint256[](1);
offsets[0] = _findMinAmountOffset(calldataWithZero, calldataWithMarker);
offsets[0] = _findMinAmountOffset(
calldataWithZero,
calldataWithMarker
);

bytes memory valueGetter = abi.encodeWithSelector(
priceOracle.calculateMinAmount.selector,
Expand Down
Loading