CROSS_CHAIN_ENABLED=true, the bridge API and outcome token contract can be used by BridgeService and related APIs (see roadmap).
1. Overview
Code:
CrossChainTransaction model (app/db/models.py) and migration a1c2d3e4f5b6_add_cross_chain_transactions. When implemented: BridgeService, blockchain_service.mint_outcome_token, GET /cross-chain/transactions, GET /bridge/status, POST /outcome-tokens/mint. Config: app/core/config.py.
2. Configuration
3. CrossChainTransaction model
4. Chain IDs (examples)
Set
OUTCOME_TOKEN_CHAIN_ID to the chain where the SFP outcome token contract is deployed. RPC for that chain must be available (e.g. via X402_NETWORK_RPC_URL when that is the active network, or a dedicated RPC if the app supports it).
5. Bridge API
POLYMARKET_BRIDGE_API_URL should point to an API that supports at least:
- Status:
GET {base}/bridge/status/{bridge_id}—BridgeService.get_bridge_status(bridge_id)calls this. Returns JSON with at leaststatus(and optionallydest_tx_hash,bridge_id, etc.). - Submit:
POST {base}/bridge/submit—BridgeService.submit_bridge(...)sends JSON:source_chain_id,dest_chain_id,amount,token_address,sender_address, and optionallymarket_event_id,outcome_token_id,receiver_address,extra. The API should return e.g.{ "bridge_id": "...", "status": "submitted" }.
BridgeService (app/services/bridge_service.py) implements the above; adapt the service or base URL path if your relay uses different conventions.
6. SFP Outcome Token (ERC-1155)
SFPOutcomeToken.sol (contracts/contracts/SFPOutcomeToken.sol) is an ERC-1155 with mint(to, outcomeTokenId, amount, data) and mintBatch (owner-only). Deploy it on OUTCOME_TOKEN_CHAIN_ID and set SFP_OUTCOME_TOKEN_CONTRACT.
blockchain_service.mint_outcome_token(recipient_address, outcome_token_id, amount, data) calls mint; it requires CROSS_CHAIN_ENABLED, SFP_OUTCOME_TOKEN_CONTRACT, and BLOCKCHAIN_DEPLOYER_PRIVATE_KEY (or deployer from BLOCKCHAIN_AUTO_DEPLOY). The Web3 RPC is X402_NETWORK_RPC_URL—use the node for OUTCOME_TOKEN_CHAIN_ID when minting.
7. Example .env
8. Related
- Polymarket (SFP markets):
POLYMARKET_ENABLED,POLYMARKET_API_URL,POLYMARKET_GAMMA_API_URL, etc. — for internal SFP prediction markets and optional Gamma/CLOB. Seedev/POLYMARKET_CONFIGURATION_GUIDE.mdor.env.exampleif present. - Polymarket Surveillance: Polymarket Surveillance Signals —
POLYMARKET_DATA_API_URL,POLYMARKET_SURVEILLANCE_ENABLED. - Blockchain / RPC:
X402_NETWORK_RPC_URL,BLOCKCHAIN_DEPLOYER_PRIVATE_KEY— used for on-chain calls including outcome token minting when wired.