Skip to content

fix(client): update auto-redeem operator#147

Merged
cesarenaldi merged 1 commit into
mainfrom
fix/auto-redeem-operator
Jul 8, 2026
Merged

fix(client): update auto-redeem operator#147
cesarenaldi merged 1 commit into
mainfrom
fix/auto-redeem-operator

Conversation

@cesarenaldi

@cesarenaldi cesarenaldi commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • update the production auto-redeem operator to the Protocol V2 auto-redeemer
  • rewrite the live setup-trading-approvals test to use shared integration fixtures
  • keep the live test metered-gated instead of unconditionally skipped

Verification

  • uv run pytest tests/integration/test_relayer_approve_live.py::test_setup_trading_approvals_live -q
  • uv run pytest tests/integration/test_relayer_approve_live.py::test_setup_trading_approvals_live --collect-only -q
  • uv run pytest tests/unit/test_relayer_setup_trading_approvals.py -q
  • uv run ruff format --check src/polymarket/environments.py tests/integration/test_relayer_approve_live.py
  • uv run ruff check src/polymarket/environments.py tests/integration/test_relayer_approve_live.py
  • uv run pyright

Note

Medium Risk
Swapping the production auto-redeem operator changes which on-chain contract receives trading approvals; a wrong address would break auto-redeem until users re-approve, and the re-enabled live test can submit real relayer transactions when metered credentials are present.

Overview
Updates production auto_redeem_operator to the Protocol V2 auto-redeemer contract (0xa120…00af), replacing the previous operator address. That value is what setup_trading_approvals uses when granting ERC-1155 setApprovalForAll to the auto-redeem path (conditional tokens and position manager), so wallets that run setup after this change will approve the new operator.

The live test_setup_trading_approvals_live integration test is no longer unconditionally skipped: it still runs only under the metered gate, but now builds AsyncSecureClient from shared builder_api_key / deposit-wallet fixtures instead of _secure_client(require_env), and documents that it may submit missing trading approvals on the configured wallet.

Reviewed by Cursor Bugbot for commit 5f7d828. Bugbot is set up for automated code reviews on this repo. Configure here.

@cesarenaldi cesarenaldi merged commit cb709e2 into main Jul 8, 2026
7 checks passed
@cesarenaldi cesarenaldi deleted the fix/auto-redeem-operator branch July 8, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant