Sub project race-cli implements a command line tool to use RACE Protocol.
race-cli <SUBCOMMAND> [<CHAIN>] [<PATH>]
race-cli publish <NAME> <CHAIN> <BUNDLE>
NOTE
<NAME>is your game's name, in one word<BUNDLE>is the URL pointing to themetadata.jsonthat already has been uploaded to a decentralized storage IPFS such as Arweave.
Running this command will mint an NFT representing your game and return its address. The caller will receive the NFT in its wallet. It is recommenced to view the result on Solscan or Solana Explorer.
race-cli create-game /path/to/game.spec.json
game.spec.json file should contain the below information:
{
"title": "<GAME TITLE>",
"reg_addr": "<REPLACE WITH THE REGISTRATION ADDRESS>",
"bundle_addr": "<REPLACE WITH THE BUNDLE ADDRESS>",
"token_addr": "<REPLACE WITH THE TOKEN ADDRESS>",
"max_players": <number>,
"min_deposit": <number>,
"max_deposit": <numer>,
"data": []
}NOTE:
<GAME TITLE>should not exceed 16 charactersmax_playersshould not exceed 10- TODO: data length
race-cli create-reg
The registry/registration address will be returned.
TODO
race-cli <SUBCOMMAND> <CHAIN> <ADDRESS>
race-cli game-info <CHAIN> <ADDRESS>
This command queries the on-chain data of a game account.
race-cli server-info <CHAIN> <ADDRESS>
This command queries the on-chain data of a server account.
race-cli reg-info <CHAIN> <ADDRESS>
This command queries the on-chain data of a registration account.
race-cli bundle-info <CHAIN> <ADDRESS>
This command queries the on-chain data of a game bundle account.