LogoLogo
  • HXRO NETWORK
    • Welcome to Hxro Network
    • Market Protocols
      • Derivatives Trading
      • Betting
        • SAMM Protocol Litepaper - v1.1
    • Network Fees
  • TOKENOMICS AND STAKING
    • HXRO Token
    • Network Staking
    • Liquidity Pools
    • How-To
      • Transfer HXRO from ERC20 to SPL via Wormhole
      • Claim an esHXRO Airdrop
      • How to Stake HXRO
      • How to Vest esHXRO
      • How to Initialize and Claim Rewards
  • NETWORK REWARDS AND INCENTIVES
    • Rewards
    • Volume Incentives
    • Staking Incentives
      • Stake Delegation
  • DEVELOPERS
    • Derivatives Tooling
      • Python & Typescript SDKs
      • Dexterity Typescript SDK QuickStart
      • Dexterity Typscript Scripts
      • DEX Reference Implementations
    • Parimutuel Tooling
      • Typescript SDK
      • Python SDK
      • Parimutuel Typescript SDK QuickStart
      • Parimutuel Typescript + React Project
        • Config.tsx
        • PariBox.tsx
        • PlacePositionBox.tsx
        • PlacePosition.tsx
    • Developer Grants
      • Developer Grant FAQs
    • Oracles
  • Traders
    • FAQs
  • MARKET MAKERS
    • Market Maker Reference Implementation
  • Security
    • Staking Contract Audit
  • External Links
    • Website
    • Governance, Staking, and Rewards Portal
    • Github
    • Forum
    • Twitter
    • Discord
    • Brand Kit
      • Brand and Press
Powered by GitBook
On this page
  • Getting Started
  • Requirements:
  • Next Steps:
  1. DEVELOPERS
  2. Parimutuel Tooling

Parimutuel Typescript + React Project

Last updated 1 year ago

This project walkthrough outlines how to create a dAPP UI that allows users to place positions, and various other interactions using the Hxro TS SDK and the Solana web3.js Lib

Here is a sneak peek of the application built in this project walkthrough:

Getting Started

Requirements:

  • Start the project

    • Run yarn install to install all project dependencies

    • Run yarn dev to run the application

Next Steps:

Now that all of the requirements are met, it's time to dive into the code.

  1. Begin by changing the branch from main to doc-template.

  2. Our next stop is src/views/home/index.tsx, which will be the homepage view.

With the groundwork laid, set up your files:

  1. Navigate to the components folder under src

  2. Here, you'll create four new files with the .tsx extension:

    1. Config.tsx - This is where we are going to set our global config variable for the ParimutuelWeb3 connection

    2. PariBox.tsx - This component will be used for each parimutuel market we want to add

    3. PlacePositionBox.tsx - This component will handle the amount a user wants to set for a trade and make the call to the PlacePosition component to place the trade

    4. PlacePosition.tsx - This component will handle the placement of the position and send a transaction request to the user's wallet

Complete the, which helps with extracting the necessary information needed to showcase users

Clone the Parimutuel TS Project

Typescript SDK Quickstart
repo