Package Logo
polymarket-neg-risk-ctf
polymarket-neg-risk-ctf@v0.3.0
Total Downloads
3
Published
7 hours ago
Network
polygon polygon
Publisher
User Avatar colindickson

Readme

Polymarket Negative Risk CTF Substreams Package

Substreams package for extracting events from the Polymarket Negative Risk Conditional Tokens Framework contract on Polygon.

Contract Information

  • Address: 0xe2222d279d744050d28e00520010520000310F59
  • Network: Polygon
  • Explorer: View on Polygonscan

Available Modules

Module Description Output Type
map_all_events Extracts all negative risk CTF events proto:negriskctf.v1.AllEvents

Quick Start

Build the WASM binary:

make build-neg-risk
# or
cd polymarket-neg-risk-ctf && substreams build

Create the Substreams package:

make package-neg-risk
# or
cd polymarket-neg-risk-ctf && substreams pack

Run the Substreams:

make run-neg-risk
# or
substreams run substreams.yaml map_all_events \
  --network polygon \
  --start-block -1000

Event Types

The package extracts the following event categories:

Fee Events

  • FeeCharged - Protocol fee collected

Admin Events

  • NewAdmin - New admin added
  • NewOperator - New operator added
  • RemovedAdmin - Admin removed
  • RemovedOperator - Operator removed

Trading Events

  • OrderCancelled - Order cancelled
  • OrderFilled - Order filled (main trading event)
  • OrdersMatched - Taker order matched against maker orders

Registry Events

  • TokenRegistered - Token pair registered for trading

Pause Events

  • TradingPaused - Trading paused
  • TradingUnpaused - Trading unpaused

Config Events

  • ProxyFactoryUpdated - Proxy factory updated
  • SafeFactoryUpdated - Safe factory updated

Dependencies

  • substreams: ^0.7
  • substreams-ethereum: ^0.11
  • ethabi: ^18

Binary Output

Build artifacts: target/wasm32-unknown-unknown/release/polymarket_neg_risk_ctf.wasm

Documentation

Modules

Maps icon
Maps

map
map_trading_events

b9474ae8477acb1dfbab4c7f54e273f6d65083c7
map map_trading_events (
blocksf.ethereum.type.v2.Block
)  -> polymarket.neg_risk_ctf.v1.TradingEvents
substreams gui polymarket-neg-risk-ctf@v0.3.0 map_trading_events

map
map_fee_events

a5225b186a6338d2701385a4fcead91ad055fe61
substreams gui polymarket-neg-risk-ctf@v0.3.0 map_fee_events

map
map_admin_events

accc505be2352325525a4a3119cfca650facc5d9
substreams gui polymarket-neg-risk-ctf@v0.3.0 map_admin_events

map
map_pause_events

b0231508b9eff08ca21bc4fb515eb6b3faa5c4fe
substreams gui polymarket-neg-risk-ctf@v0.3.0 map_pause_events

map
map_approval_events

82e83b5a6c71ba1fbdb56f41692d8557313d52c7
substreams gui polymarket-neg-risk-ctf@v0.3.0 map_approval_events

map
map_all_events

564151ddfdb41642d51ec9f58f27d7eaaff561c2
substreams gui polymarket-neg-risk-ctf@v0.3.0 map_all_events
Protobuf

Protobuf Docs Explorer

sf.ethereum.transform.v1
sf.ethereum.type.v2
polymarket.neg_risk_ctf.v1
sf.ethereum.substreams.v1