Paul & Chidubem
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # BetSwirl Entities - [`Store`](#store) - [`Token`](#token) - [`TokenBalancesDayData`](#tokenbalancesdaydata) - [`PvPToken`](#pvptoken) - [`DiceBet`](#dicebet) - [`CoinTossBet`](#cointossbet) - [`RouletteBet`](#roulettebet) - [`KenoBet`](#kenobet) - [`RussianRouletteBet`](#russianroulettebet) - [`GameToken`](#gametoken) - [`GameTokenDayData`](#gametokendaydata) - [`PvPGameToken`](#pvpgametoken) - [`PvPGameTokenDayData`](#pvpgametokendaydata) - [`User`](#user) - [`UserToken`](#usertoken) - [`UserTokenDayData`](#usertokendaydata) - [`UserOverchargedVRFCost`](#useroverchargedvrfcost) - [`StakingPool`](#stakingpool) - [`StakingPoolDayData`](#stakingpooldaydata) ## Store | Field | Type | Description | | ----- | ------ | ---------------------------------------- | | id | ID! | Unique identifier for the store | | bets | BigInt | Total amount of bets placed in the store | | users | BigInt | Total number of users in the store | ## Token | Field | Type | Description | | --------------------- | ----------------------- | -------------------------------------------------------------------------- | | id | ID! | Unique identifier for the token | | symbol | String! | Symbol of the token | | name | String! | Name of the token | | decimals | Int! | Number of decimal places for the token | | bets | BigInt | Total amount of bets placed with the token | | wonCount | BigInt | Total number of bets won with the token | | users | BigInt | Total number of users who have used the token | | amount | BigInt | Total amount of tokens in circulation | | payout | BigInt | Total amount of tokens paid out in winnings | | dividendAmount | BigInt | Total amount of tokens distributed as dividends | | bankAmount | BigInt | Total amount of tokens held in reserve for payouts | | partnerAmount | BigInt | Total amount of tokens held in reserve for partners | | treasuryAmount | BigInt | Total amount of tokens held in reserve for the treasury | | teamAmount | BigInt | Total amount of tokens held in reserve for the development team | | balancesDayDataLength | BigInt | Length of the array, which contains historical token balances for each day | | balancesDayData | [TokenBalancesDayData!] | Derived from the token balances day data field | | usersTokens | [UserToken!] | Derived from UserToken field | ## TokenBalancesDayData | Field | Type | Description | | ------- | ------- | ----------------- | | id | ID! | TOKEN-DAYID | | token | Token! | Token | | date | Int! | Date as timestamp | | balance | BigInt! | Balance of token | ## PvPToken | Field | Type | Description | | --------------- | ------- | ----------------------------------------------------- | | id | ID! | Address | | symbol | String! | Symbol of the token | | name | String! | Name of the token | | decimals | Int! | Number of decimal places the token uses | | bets | Int! | Number of bets made with the token | | uniqueBets | Int! | Number of unique bets made with the token | | users | Int! | Number of unique users who have used the token | | amount | BigInt! | Total amount of the token used in bets | | payout | BigInt! | Total payout of the token for all bets | | dividendAmount | BigInt! | Total amount of the token allocated for dividends | | treasuryAmount | BigInt! | Total amount of the token allocated for the treasury | | teamAmount | BigInt! | Total amount of the token allocated for the team | | initiatorAmount | BigInt! | Total amount of the token allocated for the initiator | ## Dicebet | Field | Type | Description | | ----------- | ---------- | --------------------------------------------------------- | | id | ID! | Unique identifier for the bet | | user | User! | The user who placed the bet | | gameToken | GameToken! | The token used for the bet | | timestamp | BigInt! | Timestamp of when the bet was placed | | resolved | Boolean! | Whether or not the bet has been resolved | | cap | Int! | Maximum bet amount allowed by the game | | betTxnHash | Bytes | Transaction hash of the transaction that placed the bet | | houseEdge | Int | House edge for the game | | amount | BigInt! | Amount of the bet | | rolled | Int | Number that was rolled in the game | | payout | BigInt! | Payout amount for the bet | | rollTxnHash | Bytes | Transaction hash of the transaction that resolved the bet | ## CoinTossBet | Field | Type | Description | | ----------- | ---------- | --------------------------------------------------------- | | id | ID! | Unique identifier for the bet | | user | User! | The user who placed the bet | | gameToken | GameToken! | The token used for the bet | | timestamp | BigInt! | Timestamp of when the bet was placed | | resolved | Boolean! | Whether or not the bet has been resolved | | face | Boolean! | Whether the user bet on a face or not | | betTxnHash | Bytes | Transaction hash of the transaction that placed the bet | | houseEdge | Int | House edge for the game | | amount | BigInt! | Amount of the bet | | rolled | Boolean! | Whether or not the bet won | | payout | BigInt! | Payout amount for the bet | | rollTxnHash | Bytes | Transaction hash of the transaction that resolved the bet | ## RouletteBet | Field | Type | Description | | ----------- | ---------- | --------------------------------------------------------- | | id | ID! | Unique identifier for the bet | | user | User! | The user who placed the bet | | gameToken | GameToken! | The token used for the bet | | timestamp | BigInt! | Timestamp of when the bet was placed | | resolved | Boolean! | Whether or not the bet has been resolved | | numbers | BigInt! | The numbers the user bet on | | betTxnHash | Bytes | Transaction hash of the transaction that placed the bet | | houseEdge | Int | House edge for the game | | amount | BigInt! | Amount of the bet | | rolled | Int | Number that was rolled in the game | | payout | BigInt! | Payout amount for the bet | | rollTxnHash | Bytes | Transaction hash of the transaction that resolved the bet | ## KenoBet | Field | Type | Description | | ----------- | ---------- | --------------------------------------------------------- | | id | ID! | Unique identifier for the bet | | user | User! | The user who placed the bet | | gameToken | GameToken! | The token used for the bet | | timestamp | BigInt! | Timestamp of when the bet was placed | | resolved | Boolean! | Whether or not the bet has been resolved | | numbers | BigInt! | The numbers the user bet on | | betTxnHash | Bytes | Transaction hash of the transaction that placed the bet | | houseEdge | Int | House edge for the game | | amount | BigInt! | Amount of the bet | | rolled | BigInt! | Number that was rolled in the game | | payout | BigInt! | Payout amount for the bet | | rollTxnHash | Bytes | Transaction hash of the transaction that resolved the bet | ## RussianRouletteBet | Field | Type | Description | | ------------------ | ------------- | ----------------------------------------------------------------- | | id | ID! | Unique identifier for the bet | | user | User! | The user who placed the bet | | gameToken | PvPGameToken! | The token used for the bet | | timestamp | Int! | Timestamp of when the bet was placed | | resolved | Boolean! | Whether or not the bet has been resolved | | canceled | Boolean | Whether or not the bet was canceled | | amount | BigInt! | Amount of the bet | | deathRatio | Int | The ratio of death in the game, if applicable | | startsAt | Int | The start time of the game, if applicable | | maxSeats | Int | The maximum number of seats in the game, if applicable | | opponents | [Bytes!]! | List of opponents' addresses, if applicable | | seats | [Bytes!]! | List of seat holders' addresses, if applicable | | joinedTxnHash | [Bytes!]! | Transaction hash of the transactions that joined the game, if any | | pot | BigInt! | Current pot size, if applicable | | gameStartedTxnHash | Bytes | Transaction hash of the transaction that started the game, if any | | houseEdge | Int! | House edge for the game | | payout | BigInt | Payout amount for the bet, if applicable | | killedSeatsNumber | Int | The number of seats killed in the game, if applicable | | winners | [Bytes!] | List of winners' addresses, if applicable | | winningSeats | [Boolean!] | List of whether each seat is a winner, if applicable | | rollTxnHash | Bytes | Transaction hash of the transaction that resolved the bet, if any | | rollTime | Int | Timestamp of when the bet was resolved, if any | ## GameToken | Field | Type | Description | | ------------- | ------------------- | -------------------------------------------------------------- | | id | ID! | The ID of the game token or game token account | | user | User | The user who created the game token or game token account | | token | Token! | The token used for betting | | game | String! | The name of the game associated with the game token | | houseEdge | Int | The house edge for the game | | bets | BigInt! | The total number of bets placed on the game | | wonCount | BigInt! | The total number of bets won on the game | | users | BigInt! | The total number of users who have placed bets on the game | | amount | BigInt! | The total amount of tokens that have been bet on the game | | payout | BigInt! | The total amount of tokens that have been paid out in winnings | | dayDataLength | BigInt! | The number of days for which data is available for the game | | dayData | [GameTokenDayData!] | Derived from the game token ID. | ## GameTokenDayData | Field | Type | Description | | --------- | ---------- | ---------------------------------------------------------- | | Id | ID! | GAME-TOKEN-DAYID`or`GAME-TOKEN-ACCOUNT-DAYID | | gameToken | GameToken! | Token used in game | | date | Int! | Date as timestamp | | bets | BigInt! | The total number of bets placed | | wonCount | BigInt! | Total number of bets won on the game | | users | BigInt! | Total number of users who have placed bets on the game | | amount | BigInt! | Total amount of tokens that have been bet on the game | | payout | BigInt! | Total amount of tokens that have been paid out in winnings | ## PvPGameToken | Field | Type | Description | | ------------- | ---------------------- | ---------------------------------------------------------- | | Id | ID! | The ID of the game token or game token account | | user | User! | The user who created the Game token | | token | PVPToken! | Token used in game | | game | String! | The name of the game associated with the game token | | houseEdge | Int! | House edge for the game | | bets | Int! | The total number of bets placed on the game | | uniqueBets | Int! | Number of unique bets made with the token | | users | Int! | Total number of users who have placed bets on the game | | amount | BigInt! | Total amount of tokens bet on the game | | payout | BigInt! | Total amount of tokens that have been paid out in winnings | | dayDataLength | Int! | Number of days for which data is available for the game | | dayData | [PvPGameTokenDayData!] | Derived from (field: "gameToken") | ## PvPGameTokenDayData | Field | Type | Description | | --------- | ------------- | ------------------------------------------------------ | | Id | ID! | GAME-TOKEN-DAYID or GAME-TOKEN-ACCOUNT-DAYID | | gameToken | PvPGameToken! | Token used in game | | date | Int! | Date as timestamp | | bets | Int! | The total number of bets placed on the game | | users | Int! | Total number of users who have placed bets on the game | | amount | BigInt! | Total amount of tokens bet on the game | | payout | BigInt! | Total amount of tokens paid out in winnings | ## User | Field | Type | Description | | ------------------- | ------------------------- | ---------------------------- | | Id | ID! | Account | | firstBetTimestamp | BigInt! | Timestamp of the first bet | | lastBetTimestamp | BigInt! | Timestamp of the last bet | | userTokens | [UserToken!]! | Derived from (field: "User") | | gamesTokens | [GameToken!]! | Derived from (field: "User") | | DiceBets | [DiceBet!]! | Derived from (field: "User") | | CoinTossBets | [CoinTossBet!]! | Derived from (field: "User") | | RouletteBets | [RouletteBet!]! | Derived from (field: "User") | | KenoBets | [KenoBet!]! | Derived from (field: "User") | | RussianRouletteBets | [RussianRouletteBet!] | Derived from (field: "User") | | overchargedVRFCosts | [UserOverchargedVRFCost!] | Derived from (field: "User") | ## UserToken | Field | Type | Description | | -------- | ------- | ------------------------------------------- | | Id | ID! | USER-TOKEN | | user | User! | User address | | token | Token! | Token used by the user | | bets | BigInt! | The total number of bets placed by user | | wonCount | BigInt! | Total number of bets won | | amount | BigInt! | Total amount of tokens bet | | payout | BigInt! | Total amount of tokens paid out in winnings | ## UserTokenDayData | Field | Type | Description | | --------- | ---------- | ------------------------------------------- | | Id | ID! | USER-TOKEN-DAYID | | userToken | UserToken! | Token used by user | | date | Int! | Date as timestamp | | bets | BigInt! | The total number of bets placed by user | | wonCount | BigInt! | Total number of bets won | | amount | BigInt! | Total amount of tokens bet | | payout | BigInt! | Total amount of tokens paid out in winnings | ## UserOverchargedVRFCost | Field | Type | Description | | ------ | ------- | ---------------------------------- | | Id | ID! | USER-GAME | | user | User! | User address | | game | String! | The name of the game | | amount | BigInt! | Total amount of tokens overcharged | ## StakingPool | Field | Type | Description | | ------------- | --------------------- | ----------------------------------------------------- | | Id | ID! | PID | | dayDataLength | BigInt! | Number of days data is available for the staking pool | | dayData | [StakingPoolDayData!] | derivedFrom(field: "stakingPool") | ## StakingPoolDayData | Field | Type | Description | | ----------- | ------------ | ------------------------- | | Id | ID! | PID-DAYID | | date | Int! | Date as timestamp | | stakingPool | StakingPool! | Staking pool | | balance | BigInt! | Token balance of the pool |

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully