Skip to main content
A thin adapter that emits DarkPool attribution events alongside the underlying predict::* call. The pattern is “TypeScript PTB places the Predict call, then immediately places our attribute_* call in the same PTB.” This avoids any Move-level dependency on Predict’s branch-pinned types.

Events emitted

public struct BinaryMintAttributed has copy, drop {
    actor_addr: address,
    actor_agent_id: vector<u8>,    // empty if human
    predict_manager_id: ID,
    oracle_id: vector<u8>,
    expiry_ms: u64,
    strike: u64,
    is_up: bool,
    quantity: u64,
    seal_policy_id: ID,
}

public struct RangeMintAttributed has copy, drop { ... }
public struct PLPSupplied has copy, drop { ... }
public struct PLPWithdrawn has copy, drop { ... }
public struct PositionRedeemed has copy, drop { ... }

Entry functions

public entry fun attribute_binary_mint(...);
public entry fun attribute_range_mint(...);
public entry fun attribute_plp_supply(...);
public entry fun attribute_plp_withdraw(...);
public entry fun attribute_redeem(...);
Each reads no state. It just emits the event.

Wired in

  • Resolver settlement PTB (buildAtomicSettlementPTB) → attribute_redeem per redeemed position.
  • scripts/supply-plp.tsattribute_plp_supply after predict::supply.

Not wired in (republish-era follow-up)

  • Frontend mints (buildPredictMintPTB).
  • Agent-service mints.
  • No indexer stream consumes facade events directly today. The indexer reads predict::PositionMinted / PositionRedeemed instead.

Tests

tests/predict_facade_tests.move: each attribute_* function emits exactly one event.