Skip to content

Commit 72864df

Browse files
committed
Updated script
1 parent 45d3e1a commit 72864df

File tree

4 files changed

+18
-26
lines changed

4 files changed

+18
-26
lines changed

deployments/_deployments_log_file.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -28622,9 +28622,9 @@
2862228622
"staging": {
2862328623
"2.0.3": [
2862428624
{
28625-
"ADDRESS": "0x18Cd6D3A48f526b3BD140a26B0225C42969f0F63",
28625+
"ADDRESS": "0x37f3F3E9d909fB1163448C511193b8481e541C62",
2862628626
"OPTIMIZER_RUNS": "1000000",
28627-
"TIMESTAMP": "2025-03-14 10:35:29",
28627+
"TIMESTAMP": "2025-03-21 12:24:59",
2862828628
"CONSTRUCTOR_ARGS": "0x0000000000000000000000002a37d63eadfe4b4682a3c28c1c2cd4f109cc2762",
2862928629
"SALT": "",
2863028630
"VERIFIED": "true"

deployments/arbitrum.diamond.staging.json

+3-12
Original file line numberDiff line numberDiff line change
@@ -145,27 +145,19 @@
145145
"Name": "AcrossFacetV3",
146146
"Version": "1.1.0"
147147
},
148-
"0x3aF0c2dB91f75f05493E51cFcF92eC5276bc85F8": {
149-
"Name": "",
150-
"Version": ""
151-
},
152-
"0xDd661337B48BEA5194F6d26F2C59fF0855E15289": {
153-
"Name": "ChainflipFacet",
154-
"Version": "1.0.0"
155-
},
156148
"0xF82830B952Bc60b93206FA22f1cD4770cedb2840": {
157149
"Name": "GlacisFacet",
158150
"Version": "1.0.0"
159151
},
160152
"0xDd661337B48BEA5194F6d26F2C59fF0855E15289": {
161-
"Name": "",
162-
"Version": ""
153+
"Name": "ChainflipFacet",
154+
"Version": "1.0.0"
163155
},
164156
"0x6C96d5C36d9aDBD3F4e0337D2d1E133A59288D1A": {
165157
"Name": "MayanFacet",
166158
"Version": "1.1.0"
167159
},
168-
"0x18Cd6D3A48f526b3BD140a26B0225C42969f0F63": {
160+
"0x37f3F3E9d909fB1163448C511193b8481e541C62": {
169161
"Name": "GasZipFacet",
170162
"Version": "2.0.3"
171163
}
@@ -180,7 +172,6 @@
180172
"Permit2Proxy": "0xb33Fe241BEd9bf5F694101D7498F63a0d060F999",
181173
"ReceiverAcrossV3": "0xe4F3DEF14D61e47c696374453CD64d438FD277F8",
182174
"ReceiverChainflip": "",
183-
"Receiver": "0x36E9B2E8A627474683eF3b1E9Df26D2bF04396f3",
184175
"ReceiverStargateV2": "",
185176
"RelayerCelerIM": "0xa1Ed8783AC96385482092b82eb952153998e9b70",
186177
"TokenWrapper": "0xF63b27AE2Dc887b88f82E2Cc597d07fBB2E78E70"

deployments/arbitrum.staging.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@
5252
"AcrossFacetPackedV3": "0x21767081Ff52CE5563A29f27149D01C7127775A2",
5353
"RelayFacet": "0x3cf7dE0e31e13C93c8Aada774ADF1C7eD58157f5",
5454
"GlacisFacet": "0xF82830B952Bc60b93206FA22f1cD4770cedb2840",
55-
"GasZipFacet": "0x18Cd6D3A48f526b3BD140a26B0225C42969f0F63",
55+
"GasZipFacet": "0x37f3F3E9d909fB1163448C511193b8481e541C62",
5656
"ChainflipFacet": "0xDd661337B48BEA5194F6d26F2C59fF0855E15289"
5757
}

script/demoScripts/demoGasZip.ts

+12-11
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import gasZipFacetArtifact from '../../out/GasZipFacet.sol/GasZipFacet.json'
55
import { ILiFi } from '../../typechain'
66
import { SupportedChain } from './utils/demoScriptChainConfig'
77
import {
8+
addressToBytes32RightPadded,
89
ensureBalance,
910
executeTransaction,
1011
setupEnvironment,
1112
} from './utils/demoScriptHelpers'
1213
import { IGasZip } from '../../typechain/GasZipFacet'
13-
import { PublicKey } from '@solana/web3.js'
1414

1515
dotenv.config()
1616

@@ -25,22 +25,23 @@ const NON_EVM_ADDRESS = '0x11f111f111f111F111f111f111F111f111f111F1'
2525
async function main() {
2626
// === Set up environment ===
2727
const srcChain: SupportedChain = 'arbitrum'
28-
const destinationChainId = 245 // solana (non evm) - custom destination chain id for gas.zip - check here (https://dev.gas.zip/gas/chain-support/outbound)
28+
const nativeDestinationChainId = 80094 // berachain
29+
const gasZipDestinationChainId = 143 // berachain - custom destination chain id for gas.zip - check here (https://dev.gas.zip/gas/chain-support/outbound)
2930

3031
const { publicClient, walletAccount, lifiDiamondContract } =
3132
await setupEnvironment(srcChain, GAS_ZIP__FACET_ABI)
3233
const signerAddress = walletAccount.address
33-
// const userReceiver = addressToBytes32RightPadded({evm_address}) // <== in case of evm address
34-
const userReceiver = `0x${new PublicKey(
35-
'DDMe5C8EhVhaVZRu3ukqhXF5CqnjuxhxbXBXj7pZnTw6'
36-
)
37-
.toBuffer()
38-
.toString('hex')}`
34+
const userReceiver = addressToBytes32RightPadded(signerAddress) // <== in case of evm address
35+
// const userReceiver = `0x${new PublicKey(
36+
// 'DDMe5C8EhVhaVZRu3ukqhXF5CqnjuxhxbXBXj7pZnTw6'
37+
// )
38+
// .toBuffer()
39+
// .toString('hex')}` // <== in case of svm address
3940

4041
// === Contract addresses ===
4142
const SRC_TOKEN_ADDRESS = zeroAddress as `0x${string}` // native token
4243

43-
const amount = parseUnits('0.001', 18) // 0.001 * 1e18
44+
const amount = parseUnits('0.0005', 18) // 0.0005 * 1e18
4445

4546
console.info(`Bridge ${amount} native from ${srcChain} --> Solana`)
4647
console.info(`Connected wallet address: ${signerAddress}`)
@@ -55,15 +56,15 @@ async function main() {
5556
referrer: zeroAddress,
5657
sendingAssetId: zeroAddress, // <-- native token
5758
receiver: NON_EVM_ADDRESS,
58-
destinationChainId,
59+
destinationChainId: nativeDestinationChainId,
5960
minAmount: amount,
6061
hasSourceSwaps: false,
6162
hasDestinationCall: false,
6263
}
6364

6465
const gasZipData: IGasZip.GasZipDataStruct = {
6566
receiverAddress: userReceiver,
66-
destinationChains: destinationChainId,
67+
destinationChains: gasZipDestinationChainId,
6768
}
6869

6970
// === Start bridging ===

0 commit comments

Comments
 (0)