NewMarket event).
Which function to use
Parameters: CreateMarketParams
All four functions take one argument: a struct with the following fields. Optional/conditional fields are noted.
Getting the new market address: the contract returns it; you can also parse the
NewMarket event from the transaction logs.
Struct shape (for ABI / viem):
Using @seer-pm/sdk (recommended)
The @seer-pm/sdk providesgetCreateMarketParams, getCreateMarketExecution, and MarketTypes. Use your viem clients to send the transaction. See Viem setup for installation.
SDK: create categorical market
Only required:marketType, marketName, outcomes, openingTime, minBond, chainId. Other fields have defaults (e.g. tokenNames are derived from outcomes, category defaults to "misc").
SDK: create multi categorical market
SDK: create scalar market
For scalar,lowerBound, upperBound and unit are also required. Bounds are in wei (1e18); use viem’s parseEther (e.g. 0 and 50 for a 0–50 °C range):
SDK: create multi scalar market
For multi scalar, the name must include the[outcomeType] placeholder (e.g. [City]) so the SDK can build questionStart / questionEnd / outcomeType via getQuestionParts. unit is required for the question suffix.
getCreateMarketParams(props) if you only need the params struct (with all fields filled) for a custom flow.