Source on GitHub

RandomLottery

Idx 16·Since e186·2 ABI versions
QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPIYE
3Procedures
10Functions
2Structs
2ABI Versions

Current ABI

e186Open Snapshot →

Procedures

3State-changing
procBuyTicket#1
in 0Bout 1B
output1 field · 1B
nametypeoffsetbyteslayout
returnCodeuint801
procSetPrice#2
in 8Bout 1B
input1 field · 8B
nametypeoffsetbyteslayout
newPriceuint6408
output1 field · 1B
nametypeoffsetbyteslayout
returnCodeuint801
procSetSchedule#3
in 1Bout 1B
input1 field · 1B
nametypeoffsetbyteslayout
newScheduleuint801
output1 field · 1B
nametypeoffsetbyteslayout
returnCodeuint801

Functions

10Read-only
funcGetFees#1
in 0Bout 5B
output5 fields · 5B
nametypeoffsetbyteslayout
teamFeePercentuint801
distributionFeePercentuint811
winnerFeePercentuint821
burnPercentuint831
returnCodeuint841
funcGetPlayers#2
in 0Bout 32777B
output3 fields · 32777B
nametypeoffsetbyteslayout
playersid[1024]032768
playerCounteruint64327688
returnCodeuint8327761
funcGetWinners#3
in 0Bout 48137B
output3 fields · 48137B
nametypeoffsetbyteslayout
winnersWinnerInfo[1024]048128
winnersCounteruint64481288
returnCodeuint8481361
funcGetTicketPrice#4
in 0Bout 8B
output1 field · 8B
nametypeoffsetbyteslayout
ticketPriceuint6408
funcGetMaxNumberOfPlayers#5
in 0Bout 8B
output1 field · 8B
nametypeoffsetbyteslayout
numberOfPlayersuint6408
funcGetState#6
in 0Bout 1B
output1 field · 1B
nametypeoffsetbyteslayout
currentStateuint801
funcGetBalance#7
in 0Bout 8B
output1 field · 8B
nametypeoffsetbyteslayout
balanceuint6408
funcGetNextEpochData#8
in 0Bout 9B
output1 field · 9B
nametypeoffsetbyteslayout
nextEpochDataNextEpochData09
funcGetDrawHour#9
in 0Bout 1B
output1 field · 1B
nametypeoffsetbyteslayout
drawHouruint801
funcGetSchedule#10
in 0Bout 1B
output1 field · 1B
nametypeoffsetbyteslayout
scheduleuint801

Structs

2Shared types
structWinnerInfo
47B5 fields
fields
nametypeoffsetbyteslayout
winnerAddressid032
revenueuint64328
tickuint32404
epochuint16442
dayOfWeekuint8461
structNextEpochData
9B2 fields
fields
nametypeoffsetbyteslayout
newPriceuint6408
scheduleuint881

Raw JSON

/v1/contracts/16
contracts/16.json
{
  "contractIndex": 16,
  "contractName": "RandomLottery",
  "contractAddress": "QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPIYE",
  "epoch": 186,
  "coreVersion": "v1.266.1",
  "structs": {
    "WinnerInfo": {
      "name": "WinnerInfo",
      "fields": [
        {
          "name": "winnerAddress",
          "type": "id",
          "offset": 0,
          "byteLength": 32
        },
        {
          "name": "revenue",
          "type": "uint64",
          "offset": 32,
          "byteLength": 8
        },
        {
          "name": "tick",
          "type": "uint32",
          "offset": 40,
          "byteLength": 4
        },
        {
          "name": "epoch",
          "type": "uint16",
          "offset": 44,
          "byteLength": 2
        },
        {
          "name": "dayOfWeek",
          "type": "uint8",
          "offset": 46,
          "byteLength": 1
        }
      ],
      "byteLength": 47
    },
    "NextEpochData": {
      "name": "NextEpochData",
      "fields": [
        {
          "name": "newPrice",
          "type": "uint64",
          "offset": 0,
          "byteLength": 8
        },
        {
          "name": "schedule",
          "type": "uint8",
          "offset": 8,
          "byteLength": 1
        }
      ],
      "byteLength": 9
    }
  },
  "procedures": [
    {
      "kind": "procedure",
      "inputType": 1,
      "name": "BuyTicket",
      "inputFields": [],
      "outputFields": [
        {
          "name": "returnCode",
          "type": "uint8",
          "offset": 0,
          "byteLength": 1
        }
      ],
      "inputSize": 0,
      "outputSize": 1
    },
    {
      "kind": "procedure",
      "inputType": 2,
      "name": "SetPrice",
      "inputFields": [
        {
          "name": "newPrice",
          "type": "uint64",
          "offset": 0,
          "byteLength": 8
        }
      ],
      "outputFields": [
        {
          "name": "returnCode",
          "type": "uint8",
          "offset": 0,
          "byteLength": 1
        }
      ],
      "inputSize": 8,
      "outputSize": 1
    },
    {
      "kind": "procedure",
      "inputType": 3,
      "name": "SetSchedule",
      "inputFields": [
        {
          "name": "newSchedule",
          "type": "uint8",
          "offset": 0,
          "byteLength": 1
        }
      ],
      "outputFields": [
        {
          "name": "returnCode",
          "type": "uint8",
          "offset": 0,
          "byteLength": 1
        }
      ],
      "inputSize": 1,
      "outputSize": 1
    }
  ],
  "functions": [
    {
      "kind": "function",
      "inputType": 1,
      "name": "GetFees",
      "inputFields": [],
      "outputFields": [
        {
          "name": "teamFeePercent",
          "type": "uint8",
          "offset": 0,
          "byteLength": 1
        },
        {
          "name": "distributionFeePercent",
          "type": "uint8",
          "offset": 1,
          "byteLength": 1
        },
        {
          "name": "winnerFeePercent",
          "type": "uint8",
          "offset": 2,
          "byteLength": 1
        },
        {
          "name": "burnPercent",
          "type": "uint8",
          "offset": 3,
          "byteLength": 1
        },
        {
          "name": "returnCode",
          "type": "uint8",
          "offset": 4,
          "byteLength": 1
        }
      ],
      "inputSize": 0,
      "outputSize": 5
    },
    {
      "kind": "function",
      "inputType": 2,
      "name": "GetPlayers",
      "inputFields": [],
      "outputFields": [
        {
          "name": "players",
          "type": "array",
          "offset": 0,
          "byteLength": 32768,
          "arrayLength": 1024,
          "arrayItemType": "id",
          "arrayItemByteLength": 32
        },
        {
          "name": "playerCounter",
          "type": "uint64",
          "offset": 32768,
          "byteLength": 8
        },
        {
          "name": "returnCode",
          "type": "uint8",
          "offset": 32776,
          "byteLength": 1
        }
      ],
      "inputSize": 0,
      "outputSize": 32777
    },
    {
      "kind": "function",
      "inputType": 3,
      "name": "GetWinners",
      "inputFields": [],
      "outputFields": [
        {
          "name": "winners",
          "type": "array",
          "offset": 0,
          "byteLength": 48128,
          "arrayLength": 1024,
          "arrayItemStructRef": "WinnerInfo",
          "arrayItemByteLength": 47
        },
        {
          "name": "winnersCounter",
          "type": "uint64",
          "offset": 48128,
          "byteLength": 8
        },
        {
          "name": "returnCode",
          "type": "uint8",
          "offset": 48136,
          "byteLength": 1
        }
      ],
      "inputSize": 0,
      "outputSize": 48137
    },
    {
      "kind": "function",
      "inputType": 4,
      "name": "GetTicketPrice",
      "inputFields": [],
      "outputFields": [
        {
          "name": "ticketPrice",
          "type": "uint64",
          "offset": 0,
          "byteLength": 8
        }
      ],
      "inputSize": 0,
      "outputSize": 8
    },
    {
      "kind": "function",
      "inputType": 5,
      "name": "GetMaxNumberOfPlayers",
      "inputFields": [],
      "outputFields": [
        {
          "name": "numberOfPlayers",
          "type": "uint64",
          "offset": 0,
          "byteLength": 8
        }
      ],
      "inputSize": 0,
      "outputSize": 8
    },
    {
      "kind": "function",
      "inputType": 6,
      "name": "GetState",
      "inputFields": [],
      "outputFields": [
        {
          "name": "currentState",
          "type": "uint8",
          "offset": 0,
          "byteLength": 1
        }
      ],
      "inputSize": 0,
      "outputSize": 1
    },
    {
      "kind": "function",
      "inputType": 7,
      "name": "GetBalance",
      "inputFields": [],
      "outputFields": [
        {
          "name": "balance",
          "type": "uint64",
          "offset": 0,
          "byteLength": 8
        }
      ],
      "inputSize": 0,
      "outputSize": 8
    },
    {
      "kind": "function",
      "inputType": 8,
      "name": "GetNextEpochData",
      "inputFields": [],
      "outputFields": [
        {
          "name": "nextEpochData",
          "type": "struct",
          "offset": 0,
          "byteLength": 9,
          "structRef": "NextEpochData"
        }
      ],
      "inputSize": 0,
      "outputSize": 9
    },
    {
      "kind": "function",
      "inputType": 9,
      "name": "GetDrawHour",
      "inputFields": [],
      "outputFields": [
        {
          "name": "drawHour",
          "type": "uint8",
          "offset": 0,
          "byteLength": 1
        }
      ],
      "inputSize": 0,
      "outputSize": 1
    },
    {
      "kind": "function",
      "inputType": 10,
      "name": "GetSchedule",
      "inputFields": [],
      "outputFields": [
        {
          "name": "schedule",
          "type": "uint8",
          "offset": 0,
          "byteLength": 1
        }
      ],
      "inputSize": 0,
      "outputSize": 1
    }
  ],
  "effectiveFromEpoch": 186,
  "effectiveToEpoch": null
}