Source on GitHub

QBond

Idx 17·Since e204·2 ABI versions
RAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADKAH
8Procedures
8Functions
3Structs
2ABI Versions

Current ABI

e204Open Snapshot →

Procedures

8State-changing
procStake#1
in 8Bout 0B
input1 field · 8B
nametypeoffsetbyteslayout
quMillionssint6408
procTransferMBondOwnershipAndPossession#2
in 48Bout 8B
input3 fields · 48B
nametypeoffsetbyteslayout
newOwnerAndPossessorid032
epochsint64328
numberOfMBondssint64408
output1 field · 8B
nametypeoffsetbyteslayout
transferredMBondssint6408
procAddAskOrder#3
in 24Bout 8B
input3 fields · 24B
nametypeoffsetbyteslayout
epochsint6408
pricesint6488
numberOfMBondssint64168
output1 field · 8B
nametypeoffsetbyteslayout
addedMBondsAmountsint6408
procRemoveAskOrder#4
in 24Bout 8B
input3 fields · 24B
nametypeoffsetbyteslayout
epochsint6408
pricesint6488
numberOfMBondssint64168
output1 field · 8B
nametypeoffsetbyteslayout
removedMBondsAmountsint6408
procAddBidOrder#5
in 24Bout 8B
input3 fields · 24B
nametypeoffsetbyteslayout
epochsint6408
pricesint6488
numberOfMBondssint64168
output1 field · 8B
nametypeoffsetbyteslayout
addedMBondsAmountsint6408
procRemoveBidOrder#6
in 24Bout 8B
input3 fields · 24B
nametypeoffsetbyteslayout
epochsint6408
pricesint6488
numberOfMBondssint64168
output1 field · 8B
nametypeoffsetbyteslayout
removedMBondsAmountsint6408
procBurnQU#7
in 8Bout 8B
input1 field · 8B
nametypeoffsetbyteslayout
amountsint6408
output1 field · 8B
nametypeoffsetbyteslayout
amountsint6408
procUpdateCFA#8
in 33Bout 1B
input2 fields · 33B
nametypeoffsetbyteslayout
userid032
operationuint8321
output1 field · 1B
nametypeoffsetbyteslayout
resultuint801

Functions

8Read-only
funcGetFees#1
in 0Bout 24B
output3 fields · 24B
nametypeoffsetbyteslayout
stakeFeePercentuint6408
tradeFeePercentuint6488
transferFeeuint64168
funcGetEarnedFees#2
in 0Bout 16B
output2 fields · 16B
nametypeoffsetbyteslayout
stakeFeesuint6408
tradeFeesuint6488
funcGetInfoPerEpoch#3
in 8Bout 24B
input1 field · 8B
nametypeoffsetbyteslayout
epochsint6408
output3 fields · 24B
nametypeoffsetbyteslayout
stakersAmountuint6408
totalStakedsint6488
apysint64168
funcGetOrders#4
in 24Bout 24576B
input3 fields · 24B
nametypeoffsetbyteslayout
epochsint6408
askOrdersOffsetsint6488
bidOrdersOffsetsint64168
output2 fields · 24576B
nametypeoffsetbyteslayout
askOrdersOrder[256]012288
bidOrdersOrder[256]1228812288
funcGetUserOrders#5
in 48Bout 24576B
input3 fields · 48B
nametypeoffsetbyteslayout
ownerid032
askOrdersOffsetsint64328
bidOrdersOffsetsint64408
output2 fields · 24576B
nametypeoffsetbyteslayout
askOrdersOrder[256]012288
bidOrdersOrder[256]1228812288
funcGetMBondsTable#6
in 0Bout 16384B
output1 field · 16384B
nametypeoffsetbyteslayout
infoTableEntry[512]016384
funcGetUserMBonds#7
in 32Bout 6152B
input1 field · 32B
nametypeoffsetbyteslayout
ownerid032
output2 fields · 6152B
nametypeoffsetbyteslayout
totalMBondsAmountsint6408
mbondsMBondEntity[256]86144
funcGetCFA#8
in 0Bout 32768B
output1 field · 32768B
nametypeoffsetbyteslayout
commissionFreeAddressesid[1024]032768

Structs

3Shared types
structOrder
48B3 fields
fields
nametypeoffsetbyteslayout
ownerid032
epochsint64328
numberOfMBondssint64408
structTableEntry
32B4 fields
fields
nametypeoffsetbyteslayout
epochsint6408
totalStakedQBondsint6488
totalStakedQEarnsint64168
apyuint64248
structMBondEntity
24B3 fields
fields
nametypeoffsetbyteslayout
epochsint6408
amountsint6488
apyuint64168

Raw JSON

/v1/contracts/17
contracts/17.json
{
  "contractIndex": 17,
  "contractName": "QBond",
  "contractAddress": "RAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADKAH",
  "epoch": 204,
  "coreVersion": "v1.282.0",
  "structs": {
    "Order": {
      "name": "Order",
      "fields": [
        {
          "name": "owner",
          "type": "id",
          "offset": 0,
          "byteLength": 32
        },
        {
          "name": "epoch",
          "type": "sint64",
          "offset": 32,
          "byteLength": 8
        },
        {
          "name": "numberOfMBonds",
          "type": "sint64",
          "offset": 40,
          "byteLength": 8
        }
      ],
      "byteLength": 48
    },
    "TableEntry": {
      "name": "TableEntry",
      "fields": [
        {
          "name": "epoch",
          "type": "sint64",
          "offset": 0,
          "byteLength": 8
        },
        {
          "name": "totalStakedQBond",
          "type": "sint64",
          "offset": 8,
          "byteLength": 8
        },
        {
          "name": "totalStakedQEarn",
          "type": "sint64",
          "offset": 16,
          "byteLength": 8
        },
        {
          "name": "apy",
          "type": "uint64",
          "offset": 24,
          "byteLength": 8
        }
      ],
      "byteLength": 32
    },
    "MBondEntity": {
      "name": "MBondEntity",
      "fields": [
        {
          "name": "epoch",
          "type": "sint64",
          "offset": 0,
          "byteLength": 8
        },
        {
          "name": "amount",
          "type": "sint64",
          "offset": 8,
          "byteLength": 8
        },
        {
          "name": "apy",
          "type": "uint64",
          "offset": 16,
          "byteLength": 8
        }
      ],
      "byteLength": 24
    }
  },
  "procedures": [
    {
      "kind": "procedure",
      "inputType": 1,
      "name": "Stake",
      "inputFields": [
        {
          "name": "quMillions",
          "type": "sint64",
          "offset": 0,
          "byteLength": 8
        }
      ],
      "outputFields": [],
      "inputSize": 8,
      "outputSize": 0
    },
    {
      "kind": "procedure",
      "inputType": 2,
      "name": "TransferMBondOwnershipAndPossession",
      "inputFields": [
        {
          "name": "newOwnerAndPossessor",
          "type": "id",
          "offset": 0,
          "byteLength": 32
        },
        {
          "name": "epoch",
          "type": "sint64",
          "offset": 32,
          "byteLength": 8
        },
        {
          "name": "numberOfMBonds",
          "type": "sint64",
          "offset": 40,
          "byteLength": 8
        }
      ],
      "outputFields": [
        {
          "name": "transferredMBonds",
          "type": "sint64",
          "offset": 0,
          "byteLength": 8
        }
      ],
      "inputSize": 48,
      "outputSize": 8
    },
    {
      "kind": "procedure",
      "inputType": 3,
      "name": "AddAskOrder",
      "inputFields": [
        {
          "name": "epoch",
          "type": "sint64",
          "offset": 0,
          "byteLength": 8
        },
        {
          "name": "price",
          "type": "sint64",
          "offset": 8,
          "byteLength": 8
        },
        {
          "name": "numberOfMBonds",
          "type": "sint64",
          "offset": 16,
          "byteLength": 8
        }
      ],
      "outputFields": [
        {
          "name": "addedMBondsAmount",
          "type": "sint64",
          "offset": 0,
          "byteLength": 8
        }
      ],
      "inputSize": 24,
      "outputSize": 8
    },
    {
      "kind": "procedure",
      "inputType": 4,
      "name": "RemoveAskOrder",
      "inputFields": [
        {
          "name": "epoch",
          "type": "sint64",
          "offset": 0,
          "byteLength": 8
        },
        {
          "name": "price",
          "type": "sint64",
          "offset": 8,
          "byteLength": 8
        },
        {
          "name": "numberOfMBonds",
          "type": "sint64",
          "offset": 16,
          "byteLength": 8
        }
      ],
      "outputFields": [
        {
          "name": "removedMBondsAmount",
          "type": "sint64",
          "offset": 0,
          "byteLength": 8
        }
      ],
      "inputSize": 24,
      "outputSize": 8
    },
    {
      "kind": "procedure",
      "inputType": 5,
      "name": "AddBidOrder",
      "inputFields": [
        {
          "name": "epoch",
          "type": "sint64",
          "offset": 0,
          "byteLength": 8
        },
        {
          "name": "price",
          "type": "sint64",
          "offset": 8,
          "byteLength": 8
        },
        {
          "name": "numberOfMBonds",
          "type": "sint64",
          "offset": 16,
          "byteLength": 8
        }
      ],
      "outputFields": [
        {
          "name": "addedMBondsAmount",
          "type": "sint64",
          "offset": 0,
          "byteLength": 8
        }
      ],
      "inputSize": 24,
      "outputSize": 8
    },
    {
      "kind": "procedure",
      "inputType": 6,
      "name": "RemoveBidOrder",
      "inputFields": [
        {
          "name": "epoch",
          "type": "sint64",
          "offset": 0,
          "byteLength": 8
        },
        {
          "name": "price",
          "type": "sint64",
          "offset": 8,
          "byteLength": 8
        },
        {
          "name": "numberOfMBonds",
          "type": "sint64",
          "offset": 16,
          "byteLength": 8
        }
      ],
      "outputFields": [
        {
          "name": "removedMBondsAmount",
          "type": "sint64",
          "offset": 0,
          "byteLength": 8
        }
      ],
      "inputSize": 24,
      "outputSize": 8
    },
    {
      "kind": "procedure",
      "inputType": 7,
      "name": "BurnQU",
      "inputFields": [
        {
          "name": "amount",
          "type": "sint64",
          "offset": 0,
          "byteLength": 8
        }
      ],
      "outputFields": [
        {
          "name": "amount",
          "type": "sint64",
          "offset": 0,
          "byteLength": 8
        }
      ],
      "inputSize": 8,
      "outputSize": 8
    },
    {
      "kind": "procedure",
      "inputType": 8,
      "name": "UpdateCFA",
      "inputFields": [
        {
          "name": "user",
          "type": "id",
          "offset": 0,
          "byteLength": 32
        },
        {
          "name": "operation",
          "type": "uint8",
          "offset": 32,
          "byteLength": 1
        }
      ],
      "outputFields": [
        {
          "name": "result",
          "type": "uint8",
          "offset": 0,
          "byteLength": 1
        }
      ],
      "inputSize": 33,
      "outputSize": 1
    }
  ],
  "functions": [
    {
      "kind": "function",
      "inputType": 1,
      "name": "GetFees",
      "inputFields": [],
      "outputFields": [
        {
          "name": "stakeFeePercent",
          "type": "uint64",
          "offset": 0,
          "byteLength": 8
        },
        {
          "name": "tradeFeePercent",
          "type": "uint64",
          "offset": 8,
          "byteLength": 8
        },
        {
          "name": "transferFee",
          "type": "uint64",
          "offset": 16,
          "byteLength": 8
        }
      ],
      "inputSize": 0,
      "outputSize": 24
    },
    {
      "kind": "function",
      "inputType": 2,
      "name": "GetEarnedFees",
      "inputFields": [],
      "outputFields": [
        {
          "name": "stakeFees",
          "type": "uint64",
          "offset": 0,
          "byteLength": 8
        },
        {
          "name": "tradeFees",
          "type": "uint64",
          "offset": 8,
          "byteLength": 8
        }
      ],
      "inputSize": 0,
      "outputSize": 16
    },
    {
      "kind": "function",
      "inputType": 3,
      "name": "GetInfoPerEpoch",
      "inputFields": [
        {
          "name": "epoch",
          "type": "sint64",
          "offset": 0,
          "byteLength": 8
        }
      ],
      "outputFields": [
        {
          "name": "stakersAmount",
          "type": "uint64",
          "offset": 0,
          "byteLength": 8
        },
        {
          "name": "totalStaked",
          "type": "sint64",
          "offset": 8,
          "byteLength": 8
        },
        {
          "name": "apy",
          "type": "sint64",
          "offset": 16,
          "byteLength": 8
        }
      ],
      "inputSize": 8,
      "outputSize": 24
    },
    {
      "kind": "function",
      "inputType": 4,
      "name": "GetOrders",
      "inputFields": [
        {
          "name": "epoch",
          "type": "sint64",
          "offset": 0,
          "byteLength": 8
        },
        {
          "name": "askOrdersOffset",
          "type": "sint64",
          "offset": 8,
          "byteLength": 8
        },
        {
          "name": "bidOrdersOffset",
          "type": "sint64",
          "offset": 16,
          "byteLength": 8
        }
      ],
      "outputFields": [
        {
          "name": "askOrders",
          "type": "array",
          "offset": 0,
          "byteLength": 12288,
          "arrayLength": 256,
          "arrayItemStructRef": "Order",
          "arrayItemByteLength": 48
        },
        {
          "name": "bidOrders",
          "type": "array",
          "offset": 12288,
          "byteLength": 12288,
          "arrayLength": 256,
          "arrayItemStructRef": "Order",
          "arrayItemByteLength": 48
        }
      ],
      "inputSize": 24,
      "outputSize": 24576
    },
    {
      "kind": "function",
      "inputType": 5,
      "name": "GetUserOrders",
      "inputFields": [
        {
          "name": "owner",
          "type": "id",
          "offset": 0,
          "byteLength": 32
        },
        {
          "name": "askOrdersOffset",
          "type": "sint64",
          "offset": 32,
          "byteLength": 8
        },
        {
          "name": "bidOrdersOffset",
          "type": "sint64",
          "offset": 40,
          "byteLength": 8
        }
      ],
      "outputFields": [
        {
          "name": "askOrders",
          "type": "array",
          "offset": 0,
          "byteLength": 12288,
          "arrayLength": 256,
          "arrayItemStructRef": "Order",
          "arrayItemByteLength": 48
        },
        {
          "name": "bidOrders",
          "type": "array",
          "offset": 12288,
          "byteLength": 12288,
          "arrayLength": 256,
          "arrayItemStructRef": "Order",
          "arrayItemByteLength": 48
        }
      ],
      "inputSize": 48,
      "outputSize": 24576
    },
    {
      "kind": "function",
      "inputType": 6,
      "name": "GetMBondsTable",
      "inputFields": [],
      "outputFields": [
        {
          "name": "info",
          "type": "array",
          "offset": 0,
          "byteLength": 16384,
          "arrayLength": 512,
          "arrayItemStructRef": "TableEntry",
          "arrayItemByteLength": 32
        }
      ],
      "inputSize": 0,
      "outputSize": 16384
    },
    {
      "kind": "function",
      "inputType": 7,
      "name": "GetUserMBonds",
      "inputFields": [
        {
          "name": "owner",
          "type": "id",
          "offset": 0,
          "byteLength": 32
        }
      ],
      "outputFields": [
        {
          "name": "totalMBondsAmount",
          "type": "sint64",
          "offset": 0,
          "byteLength": 8
        },
        {
          "name": "mbonds",
          "type": "array",
          "offset": 8,
          "byteLength": 6144,
          "arrayLength": 256,
          "arrayItemStructRef": "MBondEntity",
          "arrayItemByteLength": 24
        }
      ],
      "inputSize": 32,
      "outputSize": 6152
    },
    {
      "kind": "function",
      "inputType": 8,
      "name": "GetCFA",
      "inputFields": [],
      "outputFields": [
        {
          "name": "commissionFreeAddresses",
          "type": "array",
          "offset": 0,
          "byteLength": 32768,
          "arrayLength": 1024,
          "arrayItemType": "id",
          "arrayItemByteLength": 32
        }
      ],
      "inputSize": 0,
      "outputSize": 32768
    }
  ],
  "effectiveFromEpoch": 204,
  "effectiveToEpoch": null
}