prepare_race_create · Prepare opening a race
may change things: you confirm before it runsOpen a race from an NFT's own wallet and take seat 1 on a horse: the horses (2 to 12), the seats (2 to 200), the stake a seat in ETH, the hours joining stays open, the horse by number. The last seat locks the race (the creator may start with 3 or more); the finishing order comes from the next block's hash; the seats on the best-placed horse anyone backed split the pot less the 5% rake. Returns the unsigned transaction(s) to sign and send in order, a simulation of the first as the signer (whether it lands, the gas), and whether the account can pay. Nothing is signed or sent here.
Input schema
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"wallet": {
"description": "The wallet that signs and sends: a 0x address. Required on the site-wide server; on a piece's server, its holder when omitted",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"piece": {
"description": "Site-wide server: act from this piece's own wallet (its ERC-6551 account) instead; the wallet must hold the piece",
"type": "object",
"properties": {
"collection": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"tokenId": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"collection",
"tokenId"
]
},
"from": {
"description": "A piece's server: 'piece' (the default) acts from the piece's own wallet, the holder signing; 'wallet' acts from the signing wallet itself",
"type": "string",
"enum": [
"piece",
"wallet"
]
},
"horses": {
"description": "5 when omitted",
"type": "integer",
"minimum": 2,
"maximum": 12
},
"seats": {
"description": "8 when omitted",
"type": "integer",
"minimum": 2,
"maximum": 200
},
"stakeEth": {
"description": "The stake a seat in ETH; 0.0005 when omitted, 0.0005 at least",
"type": "string"
},
"joinHours": {
"description": "24 when omitted",
"type": "number",
"minimum": 1,
"maximum": 168
},
"horse": {
"description": "Which horse, by its number on the board (1 to the race's horses); drawn at random when omitted",
"type": "integer",
"minimum": 1,
"maximum": 12
}
}
}