Repository navigation
Add mainnet USDC paymaster workflow - #107
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
| balance_raw="$(cast call "$usdc_contract" "balanceOf(address)(uint256)" "$FROM_ADDRESS" --rpc-url "$ETH_RPC_URL" | tr -d '\r\n')" | ||
| if ! mapfile -t balance_info < <(python - "$balance_raw" "$USDC_AMOUNT" <<'PY' | ||
| import sys | ||
| from decimal import Decimal | ||
| balance = int(sys.argv[1]) |
There was a problem hiding this comment.
[P1] Parse on-chain balance as hex before comparison
The preflight balance check reads balanceOf via cast call and passes the raw string directly into int(). cast call returns uint256 values in hexadecimal form (e.g. 0x00…), so int(sys.argv[1]) raises ValueError even for valid balances. The failure is caught by the surrounding mapfile and reported as an insufficient balance, which causes every workflow run to abort before simulation. Convert the response from hex (e.g. int(sys.argv[1], 16) or cast … --format-dec) before performing the comparison.
Useful? React with 👍 / 👎.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68cdbfe942508322bf7167b59505d467