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

deploy relay facet to gravity chain #961

Merged
merged 12 commits into from
Feb 4, 2025
14 changes: 14 additions & 0 deletions deployments/_deployments_log_file.json
Original file line number Diff line number Diff line change
Expand Up @@ -27747,6 +27747,20 @@
}
]
}
},
"gravity": {
"production": {
"1.0.0": [
{
"ADDRESS": "0x3C9a1eb020448792F299f2Fa88cbDf6dF0C51f17",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2025-01-23 08:52:35",
"CONSTRUCTOR_ARGS": "0x0000000000000000000000007f4babd2c7d35221e72ab67ea72cba99573a0089000000000000000000000000f70da97812cb96acdf810712aa562db8dfa3dbef",
"SALT": "",
"VERIFIED": "true"
}
]
}
}
},
"GetGasFacet": {
Expand Down
6 changes: 5 additions & 1 deletion deployments/gravity.diamond.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
"0xbb44687E13B0DdB11682FA9299F5F982Ba3cc029": {
"Name": "SymbiosisFacet",
"Version": "1.0.0"
},
"0x3C9a1eb020448792F299f2Fa88cbDf6dF0C51f17": {
"Name": "RelayFacet",
"Version": "1.0.0"
}
},
"Periphery": {
Expand All @@ -82,8 +86,8 @@
"LiFiDEXAggregator": "0x6140b987d6B51Fd75b66C3B07733Beb5167c42fc",
"LiFuelFeeCollector": "0x134f525AC05E4724e55C363A9C4FA35ceB13F88d",
"Permit2Proxy": "",
"ReceiverAcrossV3": "",
"Receiver": "0x2DeB3bFa2b19024A0c1Ba299b6b79276f1F77b14",
"ReceiverAcrossV3": "",
"ReceiverStargateV2": "0x6A3d6652fb7be72200a47313C092342218aAeb72",
"RelayerCelerIM": "",
"TokenWrapper": "0x7fA60f4A59Dd8285C5Fcd8fd2A92A2Ca45ef8a0C"
Expand Down
3 changes: 2 additions & 1 deletion deployments/gravity.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@
"CBridgeFacetPacked": "0x49e93F6A99c590a8E70138D2710B9eDd88C077FF",
"GasZipFacet": "0xF5c923a087fb3c554579e2DD10AB6E37E0f6F849",
"GasZipPeriphery": "0x9a21E33F1a78b17DAd32010CeDB9Fd2F071C17d3",
"SymbiosisFacet": "0xbb44687E13B0DdB11682FA9299F5F982Ba3cc029"
"SymbiosisFacet": "0xbb44687E13B0DdB11682FA9299F5F982Ba3cc029",
"RelayFacet": "0x3C9a1eb020448792F299f2Fa88cbDf6dF0C51f17"
}
5 changes: 3 additions & 2 deletions script/deploy/safe/propose-to-safe.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { defineCommand, runMain } from 'citty'
import { type SafeApiKitConfig } from '@safe-global/api-kit'
import type { Chain } from 'viem'
import Safe, { EthersAdapter } from '@safe-global/protocol-kit'
import SafeApiKit from '@safe-global/api-kit'
import { EthersAdapter } from '@safe-global/protocol-kit'
const { default: Safe } = await import('@safe-global/protocol-kit')
const { default: SafeApiKit } = await import('@safe-global/api-kit')
import { ethers } from 'ethers6'
import {
OperationType,
Expand Down
2 changes: 1 addition & 1 deletion script/scriptMaster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ scriptMaster() {
"8) Verify all unverified contracts" \
"9) Review deploy status (vs. target state)" \
"10) Create updated target state from Google Docs (STAGING or PRODUCTION)" \
"11) Update all diamond log files" \
"11) Update diamond log(s)" \
"12) Propose upgrade TX to Gnosis SAFE"
)

Expand Down
27 changes: 17 additions & 10 deletions script/tasks/diamondUpdateFacet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,21 +151,28 @@ diamondUpdateFacet() {
fi
fi
RETURN_CODE=$?
echoDebug "RAW_RETURN_DATA: $RAW_RETURN_DATA"
# echoDebug "RAW_RETURN_DATA: $RAW_RETURN_DATA"

# check the return code the last call
if [ "$RETURN_CODE" -eq 0 ]; then
# extract the "logs" property and its contents from return data
CLEAN_RETURN_DATA=$(echo $RAW_RETURN_DATA | sed 's/^.*{\"logs/{\"logs/')
# only check the logs if deploying to staging, otherwise we are not calling the diamond and cannot expect any logs
if [[ "$ENVIRONMENT" != "production" ]]; then
# extract the "logs" property and its contents from return data
CLEAN_RETURN_DATA=$(echo $RAW_RETURN_DATA | sed 's/^.*{\"logs/{\"logs/')
echoDebug "CLEAN_RETURN_DATA: $CLEAN_RETURN_DATA"

# extract the "returns" property and its contents from logs
RETURN_DATA=$(echo $CLEAN_RETURN_DATA | jq -r '.returns' 2>/dev/null)
#echoDebug "RETURN_DATA: $RETURN_DATA"
# extract the "returns" property and its contents from logs
RETURN_DATA=$(echo $CLEAN_RETURN_DATA | jq -r '.returns' 2>/dev/null)
# echoDebug "RETURN_DATA: $RETURN_DATA"

# get the facet addresses that are known to the diamond from the return data
FACETS=$(echo $RETURN_DATA | jq -r '.facets.value')
if [[ $FACETS != "{}" ]]; then
break # exit the loop if the operation was successful
# get the facet addresses that are known to the diamond from the return data
FACETS=$(echo $RETURN_DATA | jq -r '.facets.value')
if [[ $FACETS != "{}" ]]; then
break # exit the loop if the operation was successful
fi
else
# if deploying to PROD and RETURN_CODE is OK then we can assume that the proposal to SAFE worked fine
break
fi
fi

Expand Down
Loading