fix(deployment): parse cast send receipts and extend RPC timeouts for LINK ops
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m8s
CI/CD Pipeline / Lint and Format (push) Failing after 1m8s
CI/CD Pipeline / Terraform Validation (push) Failing after 25s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 26s
CI/CD Pipeline / Security Scanning (push) Successful in 3m5s
Deploy ChainID 138 / Deploy ChainID 138 (push) Failing after 51s
HYBX OMNL TypeScript & anchor / token-aggregation build + reconcile artifact (push) Failing after 58s
OMNL reconcile anchor / Run omnl:reconcile and upload artifacts (push) Failing after 30s
Validation / validate-genesis (push) Successful in 27s
Validation / validate-kubernetes (push) Failing after 9s
Validation / validate-smart-contracts (push) Failing after 8s
Validation / validate-terraform (push) Failing after 44s
Validation / validate-documentation (push) Failing after 18s
Validation / validate-security (push) Failing after 2m14s
Verify Deployment / Verify Deployment (push) Failing after 51s

Cast can exit 0 on mined reverts; classify receipt output so operators see
failures. Add cast --timeout/--rpc-timeout on mainnet and L2 LINK transfers.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
defiQUG
2026-05-11 15:23:05 -07:00
parent 21578e1a13
commit 0561d26bcd
2 changed files with 50 additions and 10 deletions

View File

@@ -75,15 +75,34 @@ fi
# If a selector is missing, bridge.calculateFee / ccipSend revert with CCIPRouter: chain not supported.
CCIP_ROUTER="${CCIP_ROUTER:-}"
# cast send often exits 0 even when the receipt shows status 0 (revert). Parse human receipt output.
report_cast_send_result() {
local _out="$1"
if echo "$_out" | grep -qE 'status[[:space:]]+0[[:space:]]+\(failed\)'; then
log_warn " On-chain revert (mined, status=0)"
echo " $_out" >&2
elif echo "$_out" | grep -qE 'status[[:space:]]+1[[:space:]]+\(success\)'; then
log_success " OK (mined)"
[[ -n "$_out" ]] && echo " $_out"
elif echo "$_out" | grep -qiE 'Error:|revert|Failed|timeout|null response|invalid nonce'; then
log_warn " RPC / client failure (non-fatal)"
echo " $_out" >&2
elif echo "$_out" | grep -q 'transactionHash'; then
log_success " OK (submitted; verify receipt if status line missing)"
[[ -n "$_out" ]] && echo " $_out"
else
log_warn " Ambiguous cast output (non-fatal)"
echo " $_out" >&2
fi
}
run_or_echo() {
if [[ "$DRY_RUN" = "1" ]]; then
echo " [DRY RUN] $*"
else
# With set -e, _out=$(eval ...) would exit the whole script on failure; use if to absorb it.
local _out
if _out=$(eval "$*" 2>&1); then
log_success " OK"
[[ -n "$_out" ]] && echo " $_out"
report_cast_send_result "$_out"
else
log_warn " Failed (non-fatal)"
echo " $_out" >&2