bullpen polymarket wrap¶
Last updated: July 13, 2026
Wrap USDC into pUSD (Polymarket collateral token)
Usage¶
Live Help¶
Wrap USDC into pUSD (Polymarket collateral token)
Usage: bullpen polymarket wrap [OPTIONS] <AMOUNT>
Arguments:
<AMOUNT>
Amount in USDC to wrap (e.g. "100" for $100)
Options:
--output <OUTPUT>
Output format for command results
[possible values: table, json]
--yes
Skip confirmation prompt
--env <ENV>
Target environment to connect to (overrides config.toml)
[env: BULLPEN_ENV=]
[possible values: staging, production]
--preview
Preview the approve + wrap relayer batch without signing or submitting
--config <CONFIG>
Path to a custom config.toml file (overrides $BULLPEN_CONFIG and the default location).
Explicit --config and BULLPEN_CONFIG paths fail closed: if the file is missing, the CLI exits validation instead of silently loading defaults. Credentials still resolve via BULLPEN_HOME, so set BULLPEN_HOME too when isolating a session.
--wallet <WALLET>
Pin the signer to a specific owner EOA (0x…). Does not override the server-selected Safe/Proxy/Deposit Wallet or bypass 1151 safety checks. Use in bot automation to avoid wallet-select races
--read-only
Enable read-only mode: blocks all mutating commands
--non-interactive
Suppress interactive prompts; does NOT imply --yes for money-moving commands
[env: BULLPEN_NON_INTERACTIVE=]
-h, --help
Print help (see a summary with '-h')
EXAMPLES:
# Preview an approve + wrap relayer batch without signing or submitting
bullpen polymarket wrap 10 --preview --output json
# Wrap 10 USDC into pUSD after confirmation is bypassed
bullpen polymarket wrap 10 --yes
# Pin a specific owner EOA for automation and preview the batch
bullpen polymarket wrap 10 --wallet 0xYourOwnerEOA --preview
Example Commands¶
JSON Output¶
Contract: JSON Output Contract.
Successful output is a single JSON document. The shape below is representative for this command family; commands may add fields without breaking the shared contract.
Schema version: 1 when a command emits schema_version; otherwise treat the current command shape as contract version 1.
Top-level Keys¶
Preview (--preview) output:
| key | type | nullable | notes |
|---|---|---|---|
status |
string | no | dry-run for --preview responses |
operation |
string | no | wrap or unwrap |
amount |
string | no | Human-readable 6-decimal amount |
amount_raw |
string | no | Raw 6-decimal amount used in calldata |
owner_eoa |
string | no | Owner EOA controlling the selected Polymarket wallet |
source_wallet |
string | no | Polymarket wallet that would submit through the relayer |
source_wallet_kind |
string | no | Server-selected wallet kind |
relayer_batch_kind |
string | no | safe or wallet |
relayer_endpoint |
string | no | Polymarket relayer submit endpoint that would be used by the live path |
relayer_cost_note |
string | no | Gasless/builder-fee preview note |
would_submit |
boolean | no | Always false for preview output |
balance_precondition |
object | no | Source-wallet balance snapshot with raw and human-readable amounts |
preflight_decision |
string | no | ready, need_pre_swap, insufficient, or paused |
pre_swap_required |
string | yes | Native-USDC pre-swap note for wrap previews |
batch |
array | no | Planned approve + wrap/unwrap relayer calls; not submitted in preview |
warnings |
array |
no | Non-fatal preview warnings |
multi_wallet_warning |
object | yes | Machine-readable active-wallet warning when applicable |
Example¶
Example JSON output
{
"status": "dry-run",
"operation": "wrap",
"amount": "5.000000",
"amount_raw": "5000000",
"owner_eoa": "0x1111111111111111111111111111111111111111",
"source_wallet": "0x2222222222222222222222222222222222222222",
"source_wallet_kind": "deposit_wallet",
"relayer_batch_kind": "wallet",
"relayer_endpoint": "https://relayer-v2.polymarket.com/submit",
"relayer_cost_note": "gasless; Bullpen builder fee is HMAC-attached server-side and is not visible in the preview",
"would_submit": false,
"balance_precondition": {
"usdce": "12.345000",
"usdce_raw": "12345000",
"native_usdc": "0.000000",
"native_usdc_raw": "0",
"pusd": "0.000000",
"pusd_raw": "0",
"sufficient": true
},
"preflight_decision": "ready",
"batch": [
{
"label": "USDC.e.approve(Collateral Onramp)",
"to": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
"calldata": "0x095ea7b3...",
"operation": 0,
"value": "0"
},
{
"label": "Collateral Onramp.wrap",
"to": "0x93070a847efEf7F70739046A929D47a521F5B8ee",
"calldata": "0x...",
"operation": 0,
"value": "0"
}
],
"warnings": [
"Preview only; no USDC.e approval, wrap, unwrap, or relayer transaction was submitted."
]
}
Live (--yes --output json) output:
| key | type | nullable | notes |
|---|---|---|---|
status |
string | no | wrapped |
kind |
string | no | polymarket_wrap_result |
success |
boolean | no | true only when receipt status and balance proof are both confirmed |
amount |
string | no | Human-readable amount submitted |
tx_hash |
string | yes | On-chain transaction hash retained for compatibility |
transaction_hash |
string | yes | Alias of tx_hash for stable automation |
relayer_trace_id |
string | yes | Relayer trace ID for support when present |
receipt_status |
string | no | confirmed, missing_after_poll, or reverted |
verification |
object | no | Money-path proof state and details |
source_wallet_kind |
string | no | safe or deposit_wallet |
warnings |
array |
no | Non-fatal post-flight warnings |
multi_wallet_warning |
object | yes | Machine-readable active-wallet warning when applicable |
Live success JSON output
{
"status": "wrapped",
"kind": "polymarket_wrap_result",
"success": true,
"amount": "5.00",
"tx_hash": "0xabc123...",
"transaction_hash": "0xabc123...",
"relayer_trace_id": "relayer-trace-id",
"receipt_status": "confirmed",
"verification": {
"state": "confirmed",
"outcome": "confirmed-success",
"details": {
"tx_hash": "0xabc123...",
"polygonscan_url": "https://polygonscan.com/tx/0xabc123...",
"receipt_status": "confirmed"
}
},
"source_wallet_kind": "deposit_wallet",
"warnings": []
}
Error Envelope¶
When a Polymarket CLOB or gasless-relayer rejection coincides with a degraded Polymarket status page, the error envelope may include a polymarket_status object:
{
"polymarket_status": {
"page_status": "HASISSUES",
"status_url": "https://status.polymarket.com",
"affected_components": [
{"name": "CLOB API", "status": "PARTIALOUTAGE"}
],
"advisory": "Polymarket is experiencing issues; this rejection is most likely a Polymarket-side outage."
}
}
The field is omitted on local validation/auth/balance errors and when the status-page fetch times out or reports healthy relevant components.
Stability¶
Patch releases may add nullable or optional fields. Minor releases may add required fields or increment schema_version. Major releases may remove or rename fields.