Vaulta

pick2lottery

Contract

{
  "version": "eosio::abi/1.1",
  "types": [],
  "structs": [
    {
      "name": "dapp",
      "base": "",
      "fields": [
        {
          "name": "dapp_hash",
          "type": "string"
        },
        {
          "name": "gateway",
          "type": "string"
        },
        {
          "name": "skeleton",
          "type": "string"
        },
        {
          "name": "content",
          "type": "string"
        }
      ]
    },
    {
      "name": "dappinfo",
      "base": "",
      "fields": [
        {
          "name": "id",
          "type": "uint64"
        },
        {
          "name": "dapp",
          "type": "string"
        },
        {
          "name": "gateway",
          "type": "string"
        },
        {
          "name": "homepage_skeleton",
          "type": "string"
        },
        {
          "name": "homepage_content",
          "type": "string"
        }
      ]
    },
    {
      "name": "ddata",
      "base": "",
      "fields": [
        {
          "name": "account",
          "type": "name"
        }
      ]
    },
    {
      "name": "increment",
      "base": "",
      "fields": [
        {
          "name": "number_pick",
          "type": "uint64"
        }
      ]
    },
    {
      "name": "info",
      "base": "",
      "fields": [
        {
          "name": "id",
          "type": "uint64"
        },
        {
          "name": "synopsis",
          "type": "string"
        },
        {
          "name": "notification",
          "type": "string"
        }
      ]
    },
    {
      "name": "infopush",
      "base": "",
      "fields": [
        {
          "name": "synopsis",
          "type": "string"
        },
        {
          "name": "info_hash",
          "type": "string"
        }
      ]
    },
    {
      "name": "liability",
      "base": "",
      "fields": [
        {
          "name": "number_pick",
          "type": "uint64"
        },
        {
          "name": "count",
          "type": "uint32"
        }
      ]
    },
    {
      "name": "operational",
      "base": "",
      "fields": [
        {
          "name": "open",
          "type": "bool"
        }
      ]
    },
    {
      "name": "pickoracle",
      "base": "",
      "fields": [
        {
          "name": "external_oracle",
          "type": "string"
        }
      ]
    },
    {
      "name": "pulltickets",
      "base": "",
      "fields": [
        {
          "name": "winning_numbers",
          "type": "string"
        }
      ]
    },
    {
      "name": "rinfo",
      "base": "",
      "fields": []
    },
    {
      "name": "rinfoitem",
      "base": "",
      "fields": [
        {
          "name": "item",
          "type": "uint64"
        }
      ]
    },
    {
      "name": "rmdappinfo",
      "base": "",
      "fields": []
    },
    {
      "name": "rwininfo",
      "base": "",
      "fields": []
    },
    {
      "name": "savetimes",
      "base": "",
      "fields": [
        {
          "name": "drawing_times",
          "type": "string"
        }
      ]
    },
    {
      "name": "setliability",
      "base": "",
      "fields": [
        {
          "name": "limit",
          "type": "uint32"
        }
      ]
    },
    {
      "name": "tdata",
      "base": "",
      "fields": [
        {
          "name": "id",
          "type": "uint64"
        },
        {
          "name": "midday_epoch",
          "type": "uint32"
        },
        {
          "name": "evening_epoch",
          "type": "uint32"
        },
        {
          "name": "drawing_times",
          "type": "string"
        }
      ]
    },
    {
      "name": "ticket",
      "base": "",
      "fields": [
        {
          "name": "id",
          "type": "uint64"
        },
        {
          "name": "bet",
          "type": "asset"
        },
        {
          "name": "play",
          "type": "string"
        },
        {
          "name": "number_pick",
          "type": "string"
        },
        {
          "name": "player",
          "type": "name"
        }
      ]
    },
    {
      "name": "wininfo",
      "base": "",
      "fields": [
        {
          "name": "id",
          "type": "uint64"
        },
        {
          "name": "winning_number",
          "type": "string"
        },
        {
          "name": "epoch",
          "type": "uint32"
        },
        {
          "name": "oracle_source",
          "type": "string"
        },
        {
          "name": "drawing_times",
          "type": "string"
        },
        {
          "name": "liability_limit",
          "type": "uint32"
        },
        {
          "name": "open",
          "type": "bool"
        }
      ]
    },
    {
      "name": "wtdata",
      "base": "",
      "fields": []
    }
  ],
  "actions": [
    {
      "name": "dapp",
      "type": "dapp",
      "ricardian_contract": "---\nspec-version: 0.0.2\ntitle: Dapp\nsummary: This action stores information regarding the decentralized web application in the \"dappinfo\" multi index table. \nThe information stored consists of the IPFS hash for the decentralized web application stored in the column labeled \"dapp\".\nThe complete URL for the decentralized web application from an IPFS public gateway stored in the column labeled \"gateway\".\nAlong with the IPFS hash of the homepage for the portfolio of our blockchain smart contract lottery games stored in the column labeled \"homepage\". The RAM costs are paid by the smart contract.\nThis is an administrative action and not available to unauthorized accounts.\nicon:"
    },
    {
      "name": "ddata",
      "type": "ddata",
      "ricardian_contract": "---\nspec-version: 0.0.2\ntitle: Ddata\nsummary: This is an administrative action and not available to unauthorized accounts.\nicon:"
    },
    {
      "name": "increment",
      "type": "increment",
      "ricardian_contract": "---\nspec-version: 0.0.2\ntitle: Increment\nsummary: This is an administrative action and not available to unauthorized accounts.\nicon:"
    },
    {
      "name": "infopush",
      "type": "infopush",
      "ricardian_contract": "---\nspec-version: 0.0.2\ntitle: Infopush\nsummary: This is an administrative action and not available to unauthorized accounts.\nicon:"
    },
    {
      "name": "operational",
      "type": "operational",
      "ricardian_contract": "---\nspec-version: 0.0.2\ntitle: Operational\nsummary: This is an administrative action and not available to unauthorized accounts.\nicon:"
    },
    {
      "name": "pickoracle",
      "type": "pickoracle",
      "ricardian_contract": "---\nspec-version: 0.0.2\ntitle: Pickoracle\nsummary: This action will select the external oracle for the Pick 2 lottery game. The oracle is passed as a parameter to the action.\nThe oracle selection is stored in the \"wininfo\" multi index table in the column labeled \"oracle_source\". The RAM costs are paid by the smart contract.\nThis is an administrative action and not available to unauthorized accounts.\nicon:"
    },
    {
      "name": "pulltickets",
      "type": "pulltickets",
      "ricardian_contract": "---\nspec-version: 0.0.2\ntitle: Pulltickets\nsummary: This is an administrative action and not available to unauthorized accounts.\nicon:"
    },
    {
      "name": "rinfo",
      "type": "rinfo",
      "ricardian_contract": "---\nspec-version: 0.0.2\ntitle: Rinfo\nsummary: This is an administrative action and not available to unauthorized accounts.\nicon:"
    },
    {
      "name": "rinfoitem",
      "type": "rinfoitem",
      "ricardian_contract": "---\nspec-version: 0.0.2\ntitle: Rinfoitem\nsummary: This is an administrative action and not available to unauthorized accounts.\nicon:"
    },
    {
      "name": "rmdappinfo",
      "type": "rmdappinfo",
      "ricardian_contract": "---\nspec-version: 0.0.2\ntitle: Rmdappinfo\nsummary: This is an administrative action and not available to unauthorized accounts.\nicon:"
    },
    {
      "name": "rwininfo",
      "type": "rwininfo",
      "ricardian_contract": "---\nspec-version: 0.0.2\ntitle: Rwinfo\nsummary: This is an administrative action and not available to unauthorized accounts.\nicon:"
    },
    {
      "name": "savetimes",
      "type": "savetimes",
      "ricardian_contract": "---\nspec-version: 0.0.2\ntitle: Savetimes\nsummary: This action persists the drawing times for the Pick 2 lottery game. Drawing times vary based upon the oracle identified through the pickoracle action.\nThe drawing times are stored in the \"wininfo\" multi index table in the column labeled \"drawing_times\". The RAM costs are paid by the smart contract.\nThis is an administrative action and not available to unauthorized accounts.\nicon:"
    },
    {
      "name": "setliability",
      "type": "setliability",
      "ricardian_contract": "---\nspec-version: 0.0.2\ntitle: Setliability\nsummary: This is an administrative action and not available to unauthorized accounts.\nicon:"
    },
    {
      "name": "wtdata",
      "type": "wtdata",
      "ricardian_contract": ""
    }
  ],
  "tables": [
    {
      "name": "dappinfo",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "dappinfo"
    },
    {
      "name": "info",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "info"
    },
    {
      "name": "liability",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "liability"
    },
    {
      "name": "tdata",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "tdata"
    },
    {
      "name": "tickets",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "ticket"
    },
    {
      "name": "wininfo",
      "index_type": "i64",
      "key_names": [],
      "key_types": [],
      "type": "wininfo"
    }
  ],
  "ricardian_clauses": [
    {
      "id": "Lottery Liability Limit",
      "body": "---\ntitle: Lottery Liability Limit\nsummary: This smart contract has an internal algorithm to limit liability of payouts greater than a specified amount.\nThe specified amount is: 50 multiplied by the value found in the cloumn labeled \"liability_limit\" in the multi index table named \"wininfo\".\nSo if the value in the \"liability_limit\" column is 20 then the maximum payout to winners in a round of play is 50 x 20 = 1000 TLOS. \nNumber combinations played are tracked via the liability algorithm and if any number selection could result in this liability limit being breached, new numbers matching this potential liability limit will be rejected (transfer transaction rejected). \nWhen liability limits have been activated in a round, the smart contract will retain an additional 50 TLOS and increment the liability_limit value in the \"wininfo\" table in an attempt to avoid future potential liability limits.\nThe algorithm repeats this cycle to dynamically manage the liability limit using data from normal game play.    \nicon:"
    },
    {
      "id": "Lottery Ticket Data Storage",
      "body": "---\ntitle: Lottery Ticket Data Storage\nsummary: This smart contract will store lottery ticket \"number selections\" added by the player. The data is only stored during the active round of play.\nOnce winners are identified, and winning prizes are paid, all lottery tickets are then erased from storage. No historical data is stored beyond the time limits for the active round of play. The player consents to the storage of this data by signing the transaction.\nLottery ticket data is stored in the \"tickets\" multi index table. RAM costs are paid by the smart contract.\nicon:"
    },
    {
      "id": "Lottery Winning Prizes",
      "body": "---\ntitle: Lottery Winning Prizes\nsummary: All Pick 2 lottery plays cost 1 TLOS to play. The Pick 2 Lottery game allows four different play types that pay as follows:\nSTRAIGHT - Match: 2 digits in exact order - pays 50 TLOS - Pick: any 2 distinct digits - Odds: 1 in 100 \nBOX - Match: 2 digits in any order - pays 25 TLOS - Pick: any 2 distinct digits - Odds: 1 in 50\nFRONT - Match: your digit to the first number drawn - pays 5 TLOS - Pick: any 1 digit - Odds: 1 in 10\nBACK - Match: your digit to the last number drawn - pays 5 TLOS - Pick: any 1 digit - Odds: 1 in 10\n\nThe winning numbers are drawn by the authoritative source identified by the games selected oracle.\nOnce the authoritative source has published the winning numbers, and the oracle service has provided the winning numbers to the smart contract. The results are final and the smart contract performs payouts to winners.\nIf at a later date, the authoritative source admits an error, that does not change the liability of this smart contract. All players consent to these terms by signing the transaction."
    }
  ],
  "error_messages": [],
  "abi_extensions": [],
  "variants": [],
  "action_results": []
}