Skip to content

Commit

Permalink
Deploy relay and stargate to sonic (#1029)
Browse files Browse the repository at this point in the history
* deployed RelayFacet to sonic

* deployed stargate to sonic

* fix issue in SAFE script

* diamond logs updated
  • Loading branch information
0xDEnYO authored Feb 26, 2025
1 parent bfed9d2 commit 14f4112
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 4 deletions.
5 changes: 5 additions & 0 deletions config/relay.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@
"relayReceiver": "0x7f4babd2c7d35221e72ab67ea72cba99573a0089",
"relaySolver": "0xf70da97812CB96acDF810712Aa562db8dfA3dbEF"
},
"sonic": {
"chainId": 146,
"relayReceiver": "0x7f4babd2c7d35221e72ab67ea72cba99573a0089",
"relaySolver": "0xf70da97812CB96acDF810712Aa562db8dfA3dbEF"
},
"taiko": {
"chainId": 167000,
"relayReceiver": "0xa06e1351e2fd2d45b5d35633ca7ecf328684a109",
Expand Down
3 changes: 3 additions & 0 deletions config/stargate.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"mode": "0x1a44076050125825900e736c501f859c50fE728c",
"mantle": "0x1a44076050125825900e736c501f859c50fE728c",
"soneium": "0x4bcb6a963a9563c33569d7a512d35754221f3a19",
"sonic": "0x6F475642a6e85809B1c36Fa62763669b1b48DD5B",
"scroll": "0x1a44076050125825900e736c501f859c50fE728c",
"taiko": "0x1a44076050125825900e736c501f859c50fE728c",
"xlayer": "0x0000000000000000000000000000000000000000",
Expand All @@ -50,6 +51,7 @@
},
"tokenMessaging": {
"LinkToDeployedToAddresses": "https://stargateprotocol.gitbook.io/stargate/v/v2-developer-docs/technical-reference/mainnet-contracts",
"LinkToDeployedToAddressesAlternative": "https://github.com/stargate-protocol/stargate-v2/tree/main/packages/stg-evm-v2/deployments",
"mainnet": "0x6d6620eFa72948C5f68A3C8646d58C00d3f4A980",
"berachain": "0xAf5191B0De278C7286d6C7CC6ab6BB8A73bA2Cd6",
"bsc": "0x6e3d884c96d640526f273c61dfcf08915ebd7e2b",
Expand All @@ -74,6 +76,7 @@
"sei": "0x1502FA4be69d526124D453619276FacCab275d3D",
"scroll": "0x4e422b0acb2bd7e3ac70b5c0e5eb806e86a94038",
"soneium": "0xAF54BE5B6eEc24d6BFACf1cce4eaF680A8239398",
"sonic": "0x2086f755A6d9254045C257ea3d382ef854849B0f",
"taiko": "0x45d417612e177672958dC0537C45a8f8d754Ac2E",
"zksync": "---comingSoon---"
},
Expand Down
42 changes: 42 additions & 0 deletions deployments/_deployments_log_file.json
Original file line number Diff line number Diff line change
Expand Up @@ -25478,6 +25478,20 @@
}
]
}
},
"sonic": {
"production": {
"1.0.1": [
{
"ADDRESS": "0x8D4cE7275C269FA5a7E9ca76EA146e01bc0fC540",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2025-02-25 15:55:35",
"CONSTRUCTOR_ARGS": "0x0000000000000000000000002086f755a6d9254045c257ea3d382ef854849b0f",
"SALT": "",
"VERIFIED": "true"
}
]
}
}
},
"ReceiverStargateV2": {
Expand Down Expand Up @@ -25814,6 +25828,20 @@
}
]
}
},
"sonic": {
"production": {
"1.1.0": [
{
"ADDRESS": "0xB05796e54CfADA2C4F7771A0553D6538DD66Ba9a",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2025-02-25 15:55:50",
"CONSTRUCTOR_ARGS": "0x000000000000000000000000156cebba59deb2cb23742f70dcb0a11cc775591f0000000000000000000000001b874aae59d738079fe3e4f7d90b5793d3a514810000000000000000000000002086f755a6d9254045c257ea3d382ef854849b0f0000000000000000000000006f475642a6e85809b1c36fa62763669b1b48dd5b00000000000000000000000000000000000000000000000000000000000186a0",
"SALT": "",
"VERIFIED": "true"
}
]
}
}
},
"LiFiDEXAggregator": {
Expand Down Expand Up @@ -29675,6 +29703,20 @@
}
]
}
},
"sonic": {
"production": {
"1.0.0": [
{
"ADDRESS": "0xd9aeA8f746888739B0A063Fd608851e1195AF8F3",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2025-02-25 15:48:35",
"CONSTRUCTOR_ARGS": "0x0000000000000000000000007f4babd2c7d35221e72ab67ea72cba99573a0089000000000000000000000000f70da97812cb96acdf810712aa562db8dfa3dbef",
"SALT": "",
"VERIFIED": "true"
}
]
}
}
},
"GetGasFacet": {
Expand Down
10 changes: 9 additions & 1 deletion deployments/sonic.diamond.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@
"0xC8C286F373c5b4a4c6a2D6369003477D76584D7F": {
"Name": "SymbiosisFacet",
"Version": "1.0.0"
},
"0xd9aeA8f746888739B0A063Fd608851e1195AF8F3": {
"Name": "RelayFacet",
"Version": "1.0.0"
},
"0x8D4cE7275C269FA5a7E9ca76EA146e01bc0fC540": {
"Name": "StargateFacetV2",
"Version": "1.0.1"
}
},
"Periphery": {
Expand All @@ -72,7 +80,7 @@
"Permit2Proxy": "",
"Receiver": "0xbE539601FDf7736A4Dd730008082Bf2C16e6f728",
"ReceiverAcrossV3": "",
"ReceiverStargateV2": "",
"ReceiverStargateV2": "0xB05796e54CfADA2C4F7771A0553D6538DD66Ba9a",
"RelayerCelerIM": "",
"TokenWrapper": "0x51f5A9675A0663C3EC2b46121eB1504687922911"
}
Expand Down
5 changes: 4 additions & 1 deletion deployments/sonic.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,8 @@
"TokenWrapper": "0x51f5A9675A0663C3EC2b46121eB1504687922911",
"LiFiDEXAggregator": "0xAdf8d87723Ec7f011Ae56DDD6dC10FA8b2C3863A",
"GasZipPeriphery": "0x3925eFbD0C1d9c119eC771649052eed7587094AA",
"SymbiosisFacet": "0xC8C286F373c5b4a4c6a2D6369003477D76584D7F"
"SymbiosisFacet": "0xC8C286F373c5b4a4c6a2D6369003477D76584D7F",
"RelayFacet": "0xd9aeA8f746888739B0A063Fd608851e1195AF8F3",
"StargateFacetV2": "0x8D4cE7275C269FA5a7E9ca76EA146e01bc0fC540",
"ReceiverStargateV2": "0xB05796e54CfADA2C4F7771A0553D6538DD66Ba9a"
}
5 changes: 4 additions & 1 deletion script/deploy/_targetState.json
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,10 @@
"LiFiDEXAggregator": "1.6.0",
"GasZipPeriphery": "1.0.1",
"GasZipFacet": "2.0.2",
"SymbiosisFacet": "1.0.0"
"SymbiosisFacet": "1.0.0",
"RelayFacet": "1.0.0",
"StargateFacetV2": "1.0.1",
"ReceiverStargateV2": "1.1.0"
}
}
},
Expand Down
5 changes: 4 additions & 1 deletion script/deploy/safe/propose-to-safe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,11 @@ const main = defineCommand({
.limit(1)
.toArray()

// it seems that different versions of the SAFE package produce different object structures for "latestTx" so we use this approach to cover both cases
const nextNonce =
latestTx.length > 0 ? latestTx[0].nonce + 1 : await protocolKit.getNonce()
latestTx.length > 0
? (latestTx[0].safeTx?.data?.nonce || latestTx[0].data?.nonce) + 1
: await protocolKit.getNonce()
const safeTransactionData: SafeTransactionDataPartial = {
to: args.to,
value: '0',
Expand Down

0 comments on commit 14f4112

Please sign in to comment.