</> QUERY

๐ŸŽฐ LoTerra lottery contract

๐ŸŽŸ Winning combination

Query
Result

Get the winning combination๐ŸŽŸ by lottery ๐Ÿ†”

1
{
2
"winning_combination": {
3
"lottery_id": 8
4
}
5
}
Copied!

Winning combination๐ŸŽŸ

1
{
2
"79f22f"
3
}
Copied!

๐Ÿ’ฐ Jackpot

Query
Result

Get the jackpot๐Ÿ’ฐ by lottery ๐Ÿ†”

1
{
2
"jackpot": {
3
"lottery_id": 8
4
}
5
}
Copied!

Jackpot๐Ÿ’ฐ

1
{
2
"133746163665"
3
}
Copied!

๐ŸŽซ Tickets

Query
Result

Get the number of tickets๐ŸŽซ sold by lottery ๐Ÿ†”

1
{
2
"count_ticket": {
3
"lottery_id": 8
4
}
5
}
Copied!

Number of tickets๐ŸŽซ sold

1
{
2
"2687"
3
}
Copied!

๐Ÿ™‹โ€โ™‚๏ธ Players

Query
Result

Get the number of players๐Ÿ™‹โ€โ™‚๏ธ by lottery ๐Ÿ†”

1
{
2
"count_player": {
3
"lottery_id": 8
4
}
5
}
Copied!

Number of players๐Ÿ™‹โ€โ™‚๏ธ

1
{
2
"141"
3
}
Copied!
Query
Result

Get all players๐Ÿ™‹โ€โ™‚๏ธ addresses by lottery ๐Ÿ†”

1
{
2
"players":{
3
"lottery_id": 8
4
}
5
}
Copied!

All players๐Ÿ™‹โ€โ™‚๏ธ addresses

1
{
2
["terraa0000", "terraa0000"]
3
}
Copied!

๐Ÿ† Winners

Query
Result

Get the winners๐Ÿ† by lottery ๐Ÿ†”

1
{
2
"winner": {
3
"lottery_id": 8
4
}
5
}
Copied!

Winners๐Ÿ†

1
{
2
"winners": [
3
{
4
"address": "terra0000",
5
"claims": {
6
"claimed": false,
7
"ranks": [
8
4
9
]
10
}
11
}
12
}
Copied!
Query
Result

Get number of winning ticket๐ŸŽŸ by rank & by lottery ๐Ÿ†”

1
{
2
"count_winner": {
3
"lottery_id": 8,
4
"rank": 4
5
}
6
}
Copied!

Number of winning ticket๐ŸŽŸ

1
{
2
"15"
3
}
Copied!
Query
Result

Get all played combination by address

1
{
2
"combination": {
3
"lottery_id": 8,
4
"address": "addr0000"
5
}
6
}
Copied!

All played combinations by address

1
{
2
["0a0012", "0a1112", "bb9912"]
3
}
Copied!

Query staking contract

Get pending Unbond

Query
Result
Get pending unboning LOTA
1
โ€‹
2
{
3
"claims": {
4
"address": "addr0000"
5
}
6
}
Copied!
1
{
2
"claims": []
3
}
Copied!

Get holder

Query
Result
1
{
2
"holder": {
3
"address": "addr0000"
4
}
5
}
Copied!
1
{
2
"address": "addr0000",
3
"balance": "0",
4
"index": "0",
5
"pending_rewards": "0"
6
}
Copied!

Get contract info

Query
Result
โ€‹
1
{
2
"state": {}
3
}
Copied!
โ€‹
1
{
2
"global_index": "0.01644844356413612", // global index
3
"total_balance": "588238614920", // Total staked
4
"prev_reward_balance": "3663910891" // balance rewards
5
}
Copied!
โ€‹
Last modified 8d ago