Source on GitHub

QDuel

Idx 23·Since e202·3 ABI versions
XAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXNMD
7Procedures
6Functions
3Structs
3ABI Versions

Current ABI

e202Open Snapshot →

Procedures

7State-changing
procCreateRoom#1
in 56Bout 1B
input4 fields · 56B
nametypeoffsetbyteslayout
allowedPlayerid032
stakesint64328
raiseStepsint64408
maxStakesint64488
output1 field · 1B
nametypeoffsetbyteslayout
returnCodeuint801
procConnectToRoom#2
in 32Bout 33B
input1 field · 32B
nametypeoffsetbyteslayout
roomIdid032
output2 fields · 33B
nametypeoffsetbyteslayout
winnerid032
returnCodeuint8321
procSetPercentFees#3
in 5Bout 1B
input4 fields · 5B
nametypeoffsetbyteslayout
devFeePercentBpsuint801
burnFeePercentBpsuint811
shareholdersFeePercentBpsuint821
percentScaleuint1632
output1 field · 1B
nametypeoffsetbyteslayout
returnCodeuint801
procSetTTLHours#4
in 1Bout 1B
input1 field · 1B
nametypeoffsetbyteslayout
ttlHoursuint801
output1 field · 1B
nametypeoffsetbyteslayout
returnCodeuint801
procDeposit#5
in 0Bout 1B
output1 field · 1B
nametypeoffsetbyteslayout
returnCodeuint801
procWithdraw#6
in 8Bout 1B
input1 field · 8B
nametypeoffsetbyteslayout
amountsint6408
output1 field · 1B
nametypeoffsetbyteslayout
returnCodeuint801
procCloseRoom#7
in 0Bout 1B
output1 field · 1B
nametypeoffsetbyteslayout
returnCodeuint801

Functions

6Read-only
funcGetPercentFees#1
in 0Bout 13B
output5 fields · 13B
nametypeoffsetbyteslayout
devFeePercentBpsuint801
burnFeePercentBpsuint811
shareholdersFeePercentBpsuint821
percentScaleuint1632
returnCodeuint6458
funcGetRooms#2
in 0Bout 61441B
output2 fields · 61441B
nametypeoffsetbyteslayout
roomsRoomInfo[512]061440
returnCodeuint8614401
funcGetTTLHours#3
in 0Bout 2B
output2 fields · 2B
nametypeoffsetbyteslayout
ttlHoursuint801
returnCodeuint811
funcGetUserProfile#4
in 32Bout 73B
input1 field · 32B
nametypeoffsetbyteslayout
userIdid032
output7 fields · 73B
nametypeoffsetbyteslayout
roomIdid032
depositedAmountuint64328
lockeduint64408
stakeuint64488
raiseStepuint64568
maxStakeuint64648
returnCodeuint8721
funcCalculateRevenue#5
in 8Bout 32B
input1 field · 8B
nametypeoffsetbyteslayout
amountuint6408
output4 fields · 32B
nametypeoffsetbyteslayout
devFeeuint6408
burnFeeuint6488
shareholdersFeeuint64168
winneruint64248
funcGetLastWinners#6
in 0Bout 13313B
output2 fields · 13313B
nametypeoffsetbyteslayout
winnersWinnerData[128]013312
returnCodeuint8133121

Structs

3Shared types
structRoomInfo
120B6 fields
fields
nametypeoffsetbyteslayout
roomIdid032
ownerid3232
allowedPlayerid6432
amountsint64968
closeTimeruint641048
lastUpdateDateAndTime1128
structWinnerData
104B4 fields
fields
nametypeoffsetbyteslayout
player1id032
player2id3232
winnerid6432
revenueuint64968
structDateAndTime
8B1 field
fields
nametypeoffsetbyteslayout
valueuint6408

Raw JSON

/v1/contracts/23
contracts/23.json
{
  "contractIndex": 23,
  "contractName": "QDuel",
  "contractAddress": "XAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXNMD",
  "epoch": 202,
  "coreVersion": "v1.280.0",
  "structs": {
    "RoomInfo": {
      "name": "RoomInfo",
      "fields": [
        {
          "name": "roomId",
          "type": "id",
          "offset": 0,
          "byteLength": 32
        },
        {
          "name": "owner",
          "type": "id",
          "offset": 32,
          "byteLength": 32
        },
        {
          "name": "allowedPlayer",
          "type": "id",
          "offset": 64,
          "byteLength": 32
        },
        {
          "name": "amount",
          "type": "sint64",
          "offset": 96,
          "byteLength": 8
        },
        {
          "name": "closeTimer",
          "type": "uint64",
          "offset": 104,
          "byteLength": 8
        },
        {
          "name": "lastUpdate",
          "type": "struct",
          "offset": 112,
          "byteLength": 8,
          "structRef": "DateAndTime"
        }
      ],
      "byteLength": 120
    },
    "WinnerData": {
      "name": "WinnerData",
      "fields": [
        {
          "name": "player1",
          "type": "id",
          "offset": 0,
          "byteLength": 32
        },
        {
          "name": "player2",
          "type": "id",
          "offset": 32,
          "byteLength": 32
        },
        {
          "name": "winner",
          "type": "id",
          "offset": 64,
          "byteLength": 32
        },
        {
          "name": "revenue",
          "type": "uint64",
          "offset": 96,
          "byteLength": 8
        }
      ],
      "byteLength": 104
    },
    "DateAndTime": {
      "name": "DateAndTime",
      "byteLength": 8,
      "fields": [
        {
          "name": "value",
          "type": "uint64",
          "offset": 0,
          "byteLength": 8
        }
      ]
    }
  },
  "procedures": [
    {
      "kind": "procedure",
      "inputType": 1,
      "name": "CreateRoom",
      "inputFields": [
        {
          "name": "allowedPlayer",
          "type": "id",
          "offset": 0,
          "byteLength": 32
        },
        {
          "name": "stake",
          "type": "sint64",
          "offset": 32,
          "byteLength": 8
        },
        {
          "name": "raiseStep",
          "type": "sint64",
          "offset": 40,
          "byteLength": 8
        },
        {
          "name": "maxStake",
          "type": "sint64",
          "offset": 48,
          "byteLength": 8
        }
      ],
      "outputFields": [
        {
          "name": "returnCode",
          "type": "uint8",
          "offset": 0,
          "byteLength": 1
        }
      ],
      "inputSize": 56,
      "outputSize": 1
    },
    {
      "kind": "procedure",
      "inputType": 2,
      "name": "ConnectToRoom",
      "inputFields": [
        {
          "name": "roomId",
          "type": "id",
          "offset": 0,
          "byteLength": 32
        }
      ],
      "outputFields": [
        {
          "name": "winner",
          "type": "id",
          "offset": 0,
          "byteLength": 32
        },
        {
          "name": "returnCode",
          "type": "uint8",
          "offset": 32,
          "byteLength": 1
        }
      ],
      "inputSize": 32,
      "outputSize": 33
    },
    {
      "kind": "procedure",
      "inputType": 3,
      "name": "SetPercentFees",
      "inputFields": [
        {
          "name": "devFeePercentBps",
          "type": "uint8",
          "offset": 0,
          "byteLength": 1
        },
        {
          "name": "burnFeePercentBps",
          "type": "uint8",
          "offset": 1,
          "byteLength": 1
        },
        {
          "name": "shareholdersFeePercentBps",
          "type": "uint8",
          "offset": 2,
          "byteLength": 1
        },
        {
          "name": "percentScale",
          "type": "uint16",
          "offset": 3,
          "byteLength": 2
        }
      ],
      "outputFields": [
        {
          "name": "returnCode",
          "type": "uint8",
          "offset": 0,
          "byteLength": 1
        }
      ],
      "inputSize": 5,
      "outputSize": 1
    },
    {
      "kind": "procedure",
      "inputType": 4,
      "name": "SetTTLHours",
      "inputFields": [
        {
          "name": "ttlHours",
          "type": "uint8",
          "offset": 0,
          "byteLength": 1
        }
      ],
      "outputFields": [
        {
          "name": "returnCode",
          "type": "uint8",
          "offset": 0,
          "byteLength": 1
        }
      ],
      "inputSize": 1,
      "outputSize": 1
    },
    {
      "kind": "procedure",
      "inputType": 5,
      "name": "Deposit",
      "inputFields": [],
      "outputFields": [
        {
          "name": "returnCode",
          "type": "uint8",
          "offset": 0,
          "byteLength": 1
        }
      ],
      "inputSize": 0,
      "outputSize": 1
    },
    {
      "kind": "procedure",
      "inputType": 6,
      "name": "Withdraw",
      "inputFields": [
        {
          "name": "amount",
          "type": "sint64",
          "offset": 0,
          "byteLength": 8
        }
      ],
      "outputFields": [
        {
          "name": "returnCode",
          "type": "uint8",
          "offset": 0,
          "byteLength": 1
        }
      ],
      "inputSize": 8,
      "outputSize": 1
    },
    {
      "kind": "procedure",
      "inputType": 7,
      "name": "CloseRoom",
      "inputFields": [],
      "outputFields": [
        {
          "name": "returnCode",
          "type": "uint8",
          "offset": 0,
          "byteLength": 1
        }
      ],
      "inputSize": 0,
      "outputSize": 1
    }
  ],
  "functions": [
    {
      "kind": "function",
      "inputType": 1,
      "name": "GetPercentFees",
      "inputFields": [],
      "outputFields": [
        {
          "name": "devFeePercentBps",
          "type": "uint8",
          "offset": 0,
          "byteLength": 1
        },
        {
          "name": "burnFeePercentBps",
          "type": "uint8",
          "offset": 1,
          "byteLength": 1
        },
        {
          "name": "shareholdersFeePercentBps",
          "type": "uint8",
          "offset": 2,
          "byteLength": 1
        },
        {
          "name": "percentScale",
          "type": "uint16",
          "offset": 3,
          "byteLength": 2
        },
        {
          "name": "returnCode",
          "type": "uint64",
          "offset": 5,
          "byteLength": 8
        }
      ],
      "inputSize": 0,
      "outputSize": 13
    },
    {
      "kind": "function",
      "inputType": 2,
      "name": "GetRooms",
      "inputFields": [],
      "outputFields": [
        {
          "name": "rooms",
          "type": "array",
          "offset": 0,
          "byteLength": 61440,
          "arrayLength": 512,
          "arrayItemStructRef": "RoomInfo",
          "arrayItemByteLength": 120
        },
        {
          "name": "returnCode",
          "type": "uint8",
          "offset": 61440,
          "byteLength": 1
        }
      ],
      "inputSize": 0,
      "outputSize": 61441
    },
    {
      "kind": "function",
      "inputType": 3,
      "name": "GetTTLHours",
      "inputFields": [],
      "outputFields": [
        {
          "name": "ttlHours",
          "type": "uint8",
          "offset": 0,
          "byteLength": 1
        },
        {
          "name": "returnCode",
          "type": "uint8",
          "offset": 1,
          "byteLength": 1
        }
      ],
      "inputSize": 0,
      "outputSize": 2
    },
    {
      "kind": "function",
      "inputType": 4,
      "name": "GetUserProfile",
      "inputFields": [
        {
          "name": "userId",
          "type": "id",
          "offset": 0,
          "byteLength": 32
        }
      ],
      "outputFields": [
        {
          "name": "roomId",
          "type": "id",
          "offset": 0,
          "byteLength": 32
        },
        {
          "name": "depositedAmount",
          "type": "uint64",
          "offset": 32,
          "byteLength": 8
        },
        {
          "name": "locked",
          "type": "uint64",
          "offset": 40,
          "byteLength": 8
        },
        {
          "name": "stake",
          "type": "uint64",
          "offset": 48,
          "byteLength": 8
        },
        {
          "name": "raiseStep",
          "type": "uint64",
          "offset": 56,
          "byteLength": 8
        },
        {
          "name": "maxStake",
          "type": "uint64",
          "offset": 64,
          "byteLength": 8
        },
        {
          "name": "returnCode",
          "type": "uint8",
          "offset": 72,
          "byteLength": 1
        }
      ],
      "inputSize": 32,
      "outputSize": 73
    },
    {
      "kind": "function",
      "inputType": 5,
      "name": "CalculateRevenue",
      "inputFields": [
        {
          "name": "amount",
          "type": "uint64",
          "offset": 0,
          "byteLength": 8
        }
      ],
      "outputFields": [
        {
          "name": "devFee",
          "type": "uint64",
          "offset": 0,
          "byteLength": 8
        },
        {
          "name": "burnFee",
          "type": "uint64",
          "offset": 8,
          "byteLength": 8
        },
        {
          "name": "shareholdersFee",
          "type": "uint64",
          "offset": 16,
          "byteLength": 8
        },
        {
          "name": "winner",
          "type": "uint64",
          "offset": 24,
          "byteLength": 8
        }
      ],
      "inputSize": 8,
      "outputSize": 32
    },
    {
      "kind": "function",
      "inputType": 6,
      "name": "GetLastWinners",
      "inputFields": [],
      "outputFields": [
        {
          "name": "winners",
          "type": "array",
          "offset": 0,
          "byteLength": 13312,
          "arrayLength": 128,
          "arrayItemStructRef": "WinnerData",
          "arrayItemByteLength": 104
        },
        {
          "name": "returnCode",
          "type": "uint8",
          "offset": 13312,
          "byteLength": 1
        }
      ],
      "inputSize": 0,
      "outputSize": 13313
    }
  ],
  "effectiveFromEpoch": 202,
  "effectiveToEpoch": null
}