Schema Structure
Full schema definition file.
Full schema of the Fantom GraphQL API is:
1
# Bytes32 is a 32 byte binary string, represented by 0x prefixed hexadecimal hash.
2
scalar Bytes32
3
​
4
# Address is a 20 byte Opera address, represented as 0x prefixed hexadecimal number.
5
scalar Address
6
​
7
# BigInt is a large integer value. Input is accepted as either a JSON number,
8
# or a hexadecimal string alternatively prefixed with 0x. Output is 0x prefixed hexadecimal.
9
scalar BigInt
10
​
11
# Long is a 64 bit unsigned integer value.
12
scalar Long
13
​
14
# Bytes is an arbitrary length binary string, represented as 0x-prefixed hexadecimal.
15
# An empty byte string is represented as '0x'.
16
scalar Bytes
17
​
18
# Cursor is a string representing position in a sequential list of edges.
19
scalar Cursor
20
​
21
# Root schema definition
22
schema {
23
query: Query
24
mutation: Mutation
25
subscription: Subscription
26
}
27
​
28
# Entry points for querying the API
29
type Query {
30
# version represents the API server version responding to your requests.
31
version: String!
32
​
33
# State represents the current state of the blockchain and network.
34
state: CurrentState!
35
​
36
# sfcConfig provides the current configuration
37
# of the SFC contract managing the block chain staking economy.
38
sfcConfig: SfcConfig!
39
​
40
# Total number of accounts active on the Opera blockchain.
41
accountsActive:Long!
42
​
43
# Get an Account information by hash address.
44
account(address:Address!):Account!
45
​
46
# Get list of Contracts with at most <count> edges.
47
# If <count> is positive, return edges after the cursor,
48
# if negative, return edges before the cursor.
49
# For undefined cursor, positive <count> starts the list from top,
50
# negative <count> starts the list from bottom.
51
# ValidatedOnly specifies if the list should contain all the Contracts,
52
# or just contracts with validated byte code and available source/ABI.
53
contracts(validatedOnly: Boolean = false, cursor:Cursor, count:Int!):ContractList!
54
​
55
# Get block information by number or by hash.
56
# If neither is provided, the most recent block is given.
57
block(number:Long, hash: Bytes32):Block
58
​
59
# Get list of Blocks with at most <count> edges.
60
# If <count> is positive, return edges after the cursor,
61
# if negative, return edges before the cursor.
62
# For undefined cursor, positive <count> starts the list from top,
63
# negative <count> starts the list from bottom.
64
blocks(cursor:Cursor, count:Int!):BlockList!
65
​
66
# Get transaction information for given transaction hash.
67
transaction(hash:Bytes32!):Transaction
68
​
69
# Get list of Transactions with at most <count> edges.
70
# If <count> is positive, return edges after the cursor,
71
# if negative, return edges before the cursor.
72
# For undefined cursor, positive <count> starts the list from top,
73
# negative <count> starts the list from bottom.
74
transactions(cursor:Cursor, count:Int!):TransactionList!
75
​
76
# Get the id of the current epoch of the Opera blockchain.
77
currentEpoch:Long!
78
​
79
# Get information about specified epoch. Returns current epoch information
80
# if id is not provided.
81
epoch(id: Long): Epoch!
82
​
83
# The last staker id in Opera blockchain.
84
lastStakerId: Long!
85
​
86
# The number of stakers in Opera blockchain.
87
stakersNum: Long!
88
​
89
# Staker information. The staker is loaded either by numeric ID,
90
# or by address. null if none is provided.
91
staker(id: BigInt, address: Address): Staker
92
​
93
# List of staker information from SFC smart contract.
94
stakers: [Staker!]!
95
​
96
# The list of delegations for the given staker ID.
97
# Cursor is used to obtain specific slice of the staker's delegations.
98
# The most recent delegations are provided if cursor is omitted.
99
delegationsOf(staker:BigInt!, cursor: Cursor, count: Int = 25): DelegationList!
100
​
101
# Get the details of a specific delegation by it's delegator address
102
# and staker the delegation belongs to.
103
delegation(address:Address!, staker: BigInt!): Delegation
104
​
105
# Get the list of all delegations by it's delegator address.
106
delegationsByAddress(address:Address!, cursor: Cursor, count: Int = 25): DelegationList!
107
​
108
# Returns the current price per gas in WEI units.
109
gasPrice: Long!
110
​
111
# estimateGas returns the estimated amount of gas required
112
# for the transaction described by the parameters of the call.
113
estimateGas(from: Address, to: Address, value: BigInt, data: String): Long
114
​
115
# Get price details of the Opera blockchain token for the given target symbols.
116
price(to:String!):Price!
117
​
118
# Get calculated staking rewards for an account or given
119
# staking amount in FTM tokens.
120
# At least one of the address and amount parameters must be provided.
121
# If you provide both, the address takes precedence and the amount is ignored.
122
estimateRewards(address:Address, amount:Long):EstimatedRewards!
123
​
124
# defiConfiguration exposes the current DeFi contract setup.
125
defiConfiguration:DefiSettings!
126
​
127
# defiTokens represents a list of all available DeFi tokens.
128
defiTokens:[DefiToken!]!
129
​
130
# defiNativeToken represents the information about the native token
131
# wrapper ERC20 contract. Returns NULL if the native token wraper
132
# is not available.
133
defiNativeToken: ERC20Token
134
​
135
# fMintAccount provides DeFi/fMint information about an account on fMint protocol.
136
fMintAccount(owner: Address!):FMintAccount!
137
​
138
# fMintTokenAllowance resolves the amount of ERC20 tokens unlocked
139
# by the token owner for DeFi/fMint operations.
140
fMintTokenAllowance(owner: Address!, token: Address!):BigInt!
141
​
142
# defiUniswapPairs represents a list of all pairs managed
143
# by the Uniswap Core contract on Opera blockchain.
144
defiUniswapPairs: [UniswapPair!]!
145
​
146
# defiUniswapAmountsOut calculates the expected output amounts
147
# required to finalize a swap operation specified by a list of
148
# tokens involved in the swap steps and the input amount.
149
# At least two addresses of tokens must be given
150
# for the calculation to succeed.
151
defiUniswapAmountsOut(amountIn: BigInt!, tokens:[Address!]!): [BigInt!]!
152
​
153
# defiUniswapAmountsIn calculates the expected input amounts
154
# required to finalize a swap operation specified by a list of
155
# tokens involved in the swap steps and the output amount.
156
# At least two addresses of tokens must be given
157
# for the calculation to succeed.
158
defiUniswapAmountsIn(amountOut: BigInt!, tokens:[Address!]!): [BigInt!]!
159
​
160
# defiUniswapQuoteLiquidity calculates optimal amount of tokens
161
# of an Uniswap pair defined by a pair of tokens for the given amount
162
# of both tokens desired to be added to the liquidity pool.
163
# The function can be used to calculate minimal amount of tokens expected
164
# to be added to the pool on both sides on addLiquidity call.
165
# Please note "amountsIn" must be in the same order as are the tokens.
166
defiUniswapQuoteLiquidity(tokens:[Address!]!, amountsIn:[BigInt!]!): [BigInt!]!
167
​
168
# defiUniswapVolumes represents a list of pairs and their historical values
169
# of traded volumes
170
defiUniswapVolumes:[DefiUniswapVolume!]!
171
​
172
# defiTimeVolumes returns volumes for specified pair, time resolution and interval.
173
# Address is pair address and is mandatory.
174
# Resolution can be {month, day, 4h, 1h, 30m 15m, 5m, 1m}, is optional, default is a day.
175
# Dates are in unix UTC number and are optional. When not provided
176
# then it takes period for last month till now.
177
defiTimeVolumes(address:Address!, resolution:String, fromDate:Int, toDate:Int):[DefiTimeVolume!]!
178
​
179
# defiTimePrices returns prices for specified pair, time resolution and interval.
180
# Address is pair address and is mandatory.
181
# Resolution can be {month, day, 4h, 1h, 30m 15m, 5m, 1m}, is optional, default is a day.
182
# Direction specifies price calculation, default 0 is for TokenA/TokenB otherwise TokenB/TokenA
183
# Dates are in unix UTC number and are optional. When not provided
184
# then it takes period for last month till now.
185
defiTimePrices(address:Address!, resolution:String, fromDate:Int, toDate:Int, direction:Int):[DefiTimePrice!]!
186
​
187
# defiTimeReserves returns reserves for specified pair, time resolution and interval.
188
# Address is pair address and is mandatory.
189
# Resolution can be {month, day, 4h, 1h, 30m 15m, 5m, 1m}, is optional, default is a day.
190
# Dates are in unix UTC number and are optional. When not provided
191
# then it takes period for last month till now.
192
defiTimeReserves(address:Address!, resolution:String, fromDate:Int, toDate:Int):[DefiTimeReserve!]!
193
​
194
# Get list of Uniswap actions with at most <count> edges.
195
# If <count> is positive, return edges after the cursor,
196
# if negative, return edges before the cursor.
197
# For undefined cursor, positive <count> starts the list from top,
198
# negative <count> starts the list from bottom.
199
# Address can be used for specifying actions for one Uniswap pair.
200
# ActionType represents action type:
201
# 0 - swap,
202
# 1 - mint,
203
# 2 - burn,
204
defiUniswapActions(pairAddress:Address, cursor:Cursor, count:Int!, actionType:Int):UniswapActionList!
205
​
206
# erc20Token provides the information about an ERC20 token specified by it's
207
# address, if available. The resolver returns NULL if the token does not exist.
208
erc20Token(token: Address!):ERC20Token
209
​
210
# erc20TokenList provides list of the most active ERC20 tokens
211
# deployed on the block chain.
212
erc20TokenList(count: Int = 50):[ERC20Token!]!
213
​
214
# erc20Assets provides list of tokens owned by the given
215
# account address.
216
erc20Assets(owner: Address!, count: Int = 50):[ERC20Token!]!
217
​
218
# ercTotalSupply provides the current total supply amount of a specified ERC20 token
219
# identified by it's ERC20 contract address.
220
ercTotalSupply(token: Address!):BigInt!
221
​
222
# ercTokenBalance provides the current available balance of a specified ERC20 token
223
# identified by it's ERC20 contract address.
224
ercTokenBalance(owner: Address!, token: Address!):BigInt!
225
​
226
# ercTokenAllowance provides the current amount of ERC20 tokens unlocked
227
# by the token owner for the spender to be manipulated with.
228
ercTokenAllowance(token: Address!, owner: Address!, spender: Address!):BigInt!
229
​
230
# govContracts provides list of governance contracts.
231
govContracts:[GovernanceContract!]!
232
​
233
# govContract provides a specific Governance contract information by its address.
234
govContract(address: Address!): GovernanceContract
235
​
236
# govProposals represents list of joined proposals across all the Governance contracts.
237
govProposals(cursor:Cursor, count:Int!, activeOnly: Boolean = false):GovernanceProposalList!
238
​
239
# fLendLendingPool represents an instance of an fLend Lending pool
240
fLendLendingPool: LendingPool!
241
}
242
​
243
# Mutation endpoints for modifying the data
244
type Mutation {
245
# SendTransaction submits a raw signed transaction into the block chain.
246
# The tx parameter represents raw signed and RLP encoded transaction data.
247
sendTransaction(tx: Bytes!):Transaction
248
​
249
# Validate a deployed contract byte code with the provided source code
250
# so potential users can check the contract source code, access contract ABI
251
# to be able to interact with the contract and get the right metadata.
252
# Returns updated contract information. If the contract can not be validated,
253
# it raises a GraphQL error.
254
validateContract(contract: ContractValidationInput!): Contract!
255
}
256
​
257
# Subscriptions to live events broadcasting
258
type Subscription {
259
# Subscribe to receive information about new blocks in the blockchain.
260
onBlock: Block!
261
​
262
# Subscribe to receive information about new transactions in the blockchain.
263
onTransaction: Transaction!
264
}
265
​
266
# DefiToken represents a token available for DeFi operations.
267
type DefiToken {
268
# address of the token is used as the token's unique identifier.
269
address: Address!
270
​
271
# name of the token.
272
name: String!
273
​
274
# symbol used as an abbreviation for the token.
275
symbol: String!
276
​
277
# logoUrl is the URL of the token logo image.
278
logoUrl: String!
279
​
280
# decimals is the number of decimals the token supports.
281
# The most common value is 18 to mimic the ETH to WEI relationship.
282
decimals: Int!
283
​
284
# isActive signals if the token can be used
285
# in the DeFi functions at all.
286
isActive: Boolean!
287
​
288
# canWrapFTM signals if the token can be used
289
# to wrap native FTM tokens for DeFi trading.
290
canWrapFTM: Boolean!
291
​
292
# canDeposit signals if the token can be used
293
# in deposit as a collateral asset.
294
canDeposit: Boolean!
295
​
296
# canMint signals if the token can be used
297
# in fMint protocol as the target token.
298
canMint: Boolean!
299
​
300
# canBorrow signals if the token is available
301
# for FLend borrow operations.
302
canBorrow: Boolean!
303
​
304
# canTrade signals if the token is available
305
# for FTrade direct trading operations.
306
canTrade: Boolean!
307
​
308
# price represents the value of the token in ref. denomination.
309
# We use fUSD tokens as the synth reference value.
310
price: BigInt!
311
​
312
# priceDecimals is the number of decimals used on the price
313
# field to properly handle value calculations without loosing precision.
314
priceDecimals: Int!
315
​
316
# availableBalance represents the total available balance of the token
317
# on the account regardless of the DeFi usage of the token.
318
# It's effectively the amount available held by the ERC20 token
319
# on the account behalf.
320
availableBalance(owner: Address!): BigInt!
321
​
322
# defiAllowance represents the amount of ERC20 tokens unlocked
323
# by the owner / token holder to be accessible for DeFi operations.
324
# If an operation requires access to certain ERC20 token, the DeFi
325
# contract must be allowed to make a transfer of required amount
326
# of tokens from the owner to the DeFi Liquidity Poll.
327
# If it's not given, the operation will fail.
328
allowance(owner: Address!): BigInt!
329
​
330
# totalSupply represents total amount of tokens across all accounts
331
totalSupply: BigInt!
332
​
333
# totalDeposited represents total amount of deposited tokens collateral on fMint.
334
totalDeposit: BigInt!
335
​
336
# totalDebt represents total amount of borrowed/minted tokens on fMint.
337
totalDebt: BigInt!
338
}
339
​
340
# DefiTokenBalanceType represents the type of DeFi token balance record.
341
enum DefiTokenBalanceType {
342
COLLATERAL
343
DEBT
344
}
345
​
346
# Erc20TransactionType represents a type of transaction.
347
enum Erc20TransactionType {
348
TRANSFER
349
MINT
350
BURN
351
APPROVAL
352
}
353
​
354
# ERC20Transaction represents a transaction on an ERC20 token.
355
type ERC20Transaction {
356
# trxHash represents a hash of the transaction
357
# executing the ERC20 call.
358
trxHash: Bytes32!
359
​
360
# transaction represents the transaction
361
# executing the ERC20 call.
362
transaction: Transaction!
363
​
364
# trxIndex represents the index
365
# of the ERC20 call in the transaction logs.
366
trxIndex: Long!
367
​
368
# tokenAddress represents the address
369
# of the ERC20 token contract.
370
tokenAddress: Address!
371
​
372
# token represents the token detail involved.
373
token: ERC20Token!
374
​
375
# trxType is the type of the transaction.
376
trxType: Erc20TransactionType!
377
​
378
# sender represents the address of the token owner
379
# sending the tokens, e.g. the sender.
380
sender: Address!
381
​
382
# recipient represents the address of the token recipient.
383
recipient: Address!
384
​
385
# amount represents the amount of tokens involved
386
# in the transaction; please make sure to interpret the amount
387
# with the correct number of decimals from the ERC20 token detail.
388
amount: BigInt!
389
​
390
# timeStamp represents the Unix epoch time stamp
391
# of the ERC20 transaction procvessing.
392
timeStamp: Long!
393
}
394
# RewardClaimList is a list of reward claims linked to delegations.
395
type RewardClaimList {
396
# Edges contains provided edges of the sequential list.
397
edges: [RewardClaimListEdge!]!
398
​
399
# TotalCount is the maximum number of reward claims
400
# available for sequential access.
401
totalCount: Long!
402
​
403
# PageInfo is an information about the current page
404
# of reward claim edges.
405
pageInfo: ListPageInfo!
406
}
407
​
408
# RewardClaimListEdge is a single edge in a sequential list
409
# of reward claims.
410
type RewardClaimListEdge {
411
# Cursor defines a scroll key to this edge.
412
cursor: Cursor!
413
​
414
# ckaim represents the reward claim detail provided by this list edge.
415
claim: RewardClaim!
416
}
417
​
418
# Price represents price information of core Opera token
419
type Price {
420
"Source unit symbol."
421
fromSymbol: String!
422
​
423
"Target unit symbol."
424
toSymbol: String!
425
​
426
"Price of the source symbol unit in target symbol unit."
427
price: Float!
428
​
429
"Price change in last 24h."
430
change24: Float!
431
​
432
"Price change in percent in last 24h."
433
changePct24: Float!
434
​
435
"Open 24h price."
436
open24: Float!
437
​
438
"Highest 24h price."
439
high24: Float!
440
​
441
"Lowest 24h price."
442
low24: Float!
443
​
444
"Volume exchanged in last 24h price."
445
volume24: Float!
446
​
447
"Market cap of the source unit."
448
marketCap: Float!
449
​
450
"Timestamp of the last update of this price value."
451
lastUpdate: Long!
452
}
453
​
454
# TransactionList is a list of transaction edges provided by sequential access request.
455
type TransactionList {
456
# Edges contains provided edges of the sequential list.
457
edges: [TransactionListEdge!]!
458
​
459
# TotalCount is the maximum number of transactions available for sequential access.
460
totalCount: BigInt!
461
​
462
# PageInfo is an information about the current page of transaction edges.
463
pageInfo: ListPageInfo!
464
}
465
​
466
# TransactionListEdge is a single edge in a sequential list of transactions.
467
type TransactionListEdge {
468
cursor: Cursor!
469
transaction: Transaction!
470
}
471
​
472
​
473
# BlockList is a list of block edges provided by sequential access request.
474
type BlockList {
475
# Edges contains provided edges of the sequential list.
476
edges: [BlockListEdge!]!
477
​
478
# TotalCount is the maximum number of blocks available for sequential access.
479
totalCount: BigInt!
480
​
481
# PageInfo is an information about the current page of block edges.
482
pageInfo: ListPageInfo!
483
}
484
​
485
# BlockListEdge is a single edge in a sequential list of blocks.
486
type BlockListEdge {
487
cursor: Cursor!
488
block: Block!
489
}
490
​
491
# StakerInfo represents extended staker information from smart contract.
492
type StakerInfo {
493
"Name represents the name of the staker."
494
name: String
495
​
496
"LogoUrl represents staker logo URL."
497
logoUrl: String
498
​
499
"Website represents a link to stakers website."
500
website: String
501
​
502
"Contact represents a link to contact to the staker."
503
contact: String
504
}
505
​
506
# ListPageInfo contains information about a sequential access list page.
507
type ListPageInfo {
508
# First is the cursor of the first edge of the edges list. null for empty list.
509
first: Cursor
510
​
511
# Last if the cursor of the last edge of the edges list. null for empty list.
512
last: Cursor
513
​
514
# HasNext specifies if there is another edge after the last one.
515
hasNext: Boolean!
516
​
517
# HasNext specifies if there is another edge before the first one.
518
hasPrevious: Boolean!
519
}
520
​
521
# Transaction is an Opera block chain transaction.
522
type Transaction {
523
# Hash is the unique hash of this transaction.
524
hash: Bytes32!
525
​
526
# Nonce is the number of transactions sent by the account prior
527
# to this transaction.
528
nonce: Long!
529
​
530
# Index is the index of this transaction in the block. This will
531
# be null if the transaction is in a pending pool.
532
index: Long
533
​
534
# From is the address of the account that sent this transaction
535
from: Address!
536
​
537
# Sender is the account that sent this transaction
538
sender: Account!
539
​
540
# To is the account the transaction was sent to.
541
# This is null for contract creating transactions.
542
to: Address
543
​
544
# contractAddress represents the address of smart contract
545
# deployed by this transaction;
546
# null if the transaction is not contract creation
547
contractAddress: Address
548
​
549
# Recipient is the account that received this transaction.
550
# Null for contract creating transaction.
551
recipient: Account
552
​
553
# Value is the value sent along with this transaction in WEI.
554
value: BigInt!
555
​
556
# GasPrice is the price of gas per unit in WEI.
557
gasPrice: BigInt!
558
​
559
# Gas represents gas provided by the sender.
560
gas: Long!
561
​
562
# GasUsed is the amount of gas that was used
563
# on processing this transaction.
564
# If the transaction is pending, this field will be null.
565
gasUsed: Long
566
​
567
# InputData is the data supplied to the target of the transaction.
568
# Contains smart contract byte code if this is contract creation.
569
# Contains encoded contract state mutating function call if recipient
570
# is a contract address.
571
inputData: Bytes!
572
​
573
# BlockHash is the hash of the block this transaction was assigned to.
574
# Null if the transaction is pending.
575
blockHash: Bytes32
576
​
577
# BlockHash is the hash of the block this transaction was assigned to.
578
# Null if the transaction is pending.
579
blockNumber: Long
580
​
581
# Block is the block this transaction was assigned to. This will be null if
582
# the transaction is pending.
583
block: Block
584
​
585
# Status is the return status of the transaction. This will be 1 if the
586
# transaction succeeded, or 0 if it failed (due to a revert, or due to
587
# running out of gas). If the transaction has not yet been processed, this
588
# field will be null.
589
status: Long
590
}
591
​
592
# Block is an Opera block chain block.
593
type Block {
594
# Number is the number of this block, starting at 0 for the genesis block.
595
number: Long!
596
​
597
# Hash is the unique block hash of this block.
598
hash: Bytes32!
599
​
600
# Parent is the parent block of this block.
601
parent: Block
602
​
603
# TransactionCount is the number of transactions in this block.
604
transactionCount: Int
605
​
606
# Timestamp is the unix timestamp at which this block was mined.
607
timestamp: Long!
608
​
609
# GasLimit represents the maximum gas allowed in this block.
610
gasLimit: Long!
611
​
612
# GasUsed represents the actual total used gas by all transactions in this block.
613
gasUsed: Long!
614
​
615
# txHashList is the list of unique hash values of transaction
616
# assigned to the block.
617
txHashList: [Bytes32!]!
618
​
619
# txList is a list of transactions assigned to the block.
620
txList: [Transaction!]!
621
}
622
​
623
# SfcConfig represents the configuration of the SFC contract
624
# responsible for managing the staking economy of the network.
625
type SfcConfig {
626
# minValidatorStake is the minimal amount of tokens required
627
# to register a validator account with the default self stake.
628
minValidatorStake: BigInt!
629
​
630
# maxDelegatedRatio is the maximal ratio between a validator self stake
631
# and the sum of all the received stakes of the validator.
632
# The value is provided as a multiplier number with 18 decimals.
633
maxDelegatedRatio: BigInt!
634
​
635
# minLockupDuration is the lowest possible number of seconds
636
# a delegation can be locked for.
637
minLockupDuration: BigInt!
638
​
639
# maxLockupDuration is the highest possible number of seconds
640
# a delegation can be locked for.
641
maxLockupDuration: BigInt!
642
​
643
# withdrawalPeriodEpochs is the minimal number of epochs
644
# between an un-delegation and corresponding withdraw request.
645
# The delay is enforced on withdraw call.
646
withdrawalPeriodEpochs: BigInt!
647
​
648
# withdrawalPeriodTime is the minimal number of seconds
649
# between an un-delegation and corresponding withdraw request.
650
# The delay is enforced on withdraw call.
651
withdrawalPeriodTime: BigInt!
652
}
653
​
654
# ERC20Token represents a generic ERC20 token.
655
type ERC20Token {
656
# address of the token is used as the token's unique identifier.
657
address: Address!
658
​
659
# name of the token.
660
name: String!
661
​
662
# symbol used as an abbreviation for the token.
663
symbol: String!
664
​
665
# decimals is the number of decimals the token supports.
666
# The most common value is 18 to mimic the ETH to WEI relationship.
667
decimals: Int!
668
​
669
# totalSupply represents total amount of tokens across all accounts
670
totalSupply: BigInt!
671
​
672
# logoURL represents a URL address of a logo of the token. It's always
673
# provided, but unknown tokens have this set to a generic logo file.
674
logoURL: String!
675
​
676
# balanceOf represents the total available balance of the token
677
# on the account regardless of the DeFi usage of the token.
678
# It's effectively the amount available held by the ERC20 token
679
# on the account behalf.
680
balanceOf(owner: Address!): BigInt!
681
​
682
# allowance represents the amount of ERC20 tokens unlocked
683
# by the owner / token holder to be accessible for the given spender.
684
allowance(owner: Address!, spender: Address!): BigInt!
685
​
686
# totalDeposited represents total amount of deposited tokens collateral on fMint.
687
totalDeposit: BigInt!
688
​
689
# totalDebt represents total amount of borrowed/minted tokens on fMint.
690
totalDebt: BigInt!
691
}
692
​
693
# DelegationList is a list of delegations edges provided by sequential access request.
694
type DelegationList {
695
"Edges contains provided edges of the sequential list."
696
edges: [DelegationListEdge!]!
697
​
698
"""
699
TotalCount is the maximum number of delegations
700
available for sequential access.
701
"""
702
totalCount: Long!
703
​
704
"PageInfo is an information about the current page of delegation edges."
705
pageInfo: ListPageInfo!
706
}
707
​
708
# DelegationListEdge is a single edge in a sequential list of delegations.
709
type DelegationListEdge {
710
"Cursor defines a scroll key to this edge."
711
cursor: Cursor!
712
​
713
"Delegator represents the delegator provided by this list edge."
714
delegation: Delegation!
715
}
716
​
717
# Delegation represents a delegation on Opera block chain.
718
type Delegation {
719
# Address of the delegator account.
720
address: Address!
721
​
722
# Identifier of the staker the delegation belongs to.
723
toStakerId: BigInt!
724
​
725
# Time stamp of the delegation creation.
726
createdTime: Long!
727
​
728
# Amount delegated in WEI. The value includes all the pending un-delegations.
729
amount: BigInt!
730
​
731
# Current active amount delegated in WEI.
732
amountDelegated: BigInt!
733
​
734
# Amount locked in pending un-delegations in WEI.
735
amountInWithdraw: BigInt!
736
​
737
# Total amount of rewards claimed.
738
claimedReward: BigInt!
739
​
740
# Pending rewards for the delegation in WEI.
741
pendingRewards: PendingRewards!
742
​
743
# List of withdraw requests of the delegation,
744
# sorted fro the newest to the oldest requests.
745
withdrawRequests(cursor: Cursor, count: Int = 25): [WithdrawRequest!]!
746
​
747
# rewardClaims provides a list of reward claims
748
# of the delegation as a scrollable list of edges with details of claims.
749
rewardClaims(cursor: Cursor, count: Int = 25): RewardClaimList!
750
​
751
# isFluidStakingActive indicates if the delegation is upgraded to fluid staking.
752
isFluidStakingActive: Boolean!
753
​
754
# isDelegationLocked indicates if the delegation is locked.
755
isDelegationLocked: Boolean!
756
​
757
# lockedFromEpoch represents the id of epoch the lock has been created.
758
lockedFromEpoch: Long!
759
​
760
# lockedUntil represents the time stamp up to which
761
# the delegation is locked, zero if not locked.
762
lockedUntil: Long!
763
​
764
# lockedAmount represents the amount of delegation stake locked.
765
# The undelegate process must call unlock prior to creating withdraw
766
# request if outstanding unlocked amount
767
# is lower than demanded amount to undelegate.
768
lockedAmount: BigInt!
769
​
770
# unlockedAmount represents the amount
771
# of delegation stake available for undelegate.
772
unlockedAmount: BigInt!
773
​
774
# unlockPenalty provides the mount of penalty applied
775
# to the stake amount on premature unlock
776
unlockPenalty(amount: BigInt!): BigInt!
777
​
778
# outstandingSFTM represents the amount of sFTM tokens representing
779
# the tokenized stake minted and un-repaid on this delegation.
780
outstandingSFTM: BigInt!
781
​
782
# tokenizerAllowedToWithdraw indicates if the stake tokenizer allows the stake
783
# to be withdrawn. That means all the sFTM tokens have been repaid and the sFTM
784
# debt is effectively zero for the delegation.
785
tokenizerAllowedToWithdraw: Boolean!
786
}
787
​
788
# PendingRewards represents a detail of pending rewards for staking and delegations
789
type PendingRewards {
790
# address of the delegation the reward belongs to.
791
address: Address!
792
​
793
# Staker the pending reward relates to.
794
staker: BigInt!
795
​
796
# Pending rewards amount.
797
amount: BigInt!
798
​
799
# The first unpaid epoch. Is not used for SFCv3.
800
fromEpoch: Long!
801
​
802
# The last unpaid epoch. Is not used for SFCv3.
803
toEpoch: Long!
804
​
805
# isOverRange signals that the rewards calculation
806
# can not be done due to too many unclaimed epochs.
807
# Is not used for SFCv3.
808
isOverRange: Boolean!
809
}
810
​
811
# Represents epoch information.
812
type Epoch {
813
# Identifier of the epoch.
814
id: Long!
815
​
816
# Timestamp of the epoch end.
817
endTime: Long!
818
​
819
# Epoch duration in seconds.
820
duration: Long!
821
​
822
# Fee at the epoch.
823
epochFee: BigInt!
824
​
825
# Total base reward weight on epoch.
826
totalBaseRewardWeight: BigInt!
827
​
828
# Total transaction reward weight on epoch.
829
totalTxRewardWeight: BigInt!
830
​
831
# Base reward per second of epoch.
832
baseRewardPerSecond: BigInt!
833
​
834
# Total amount staked. This includes all the staked
835
# amount including validators' self stake.
836
stakeTotalAmount: BigInt!
837
​
838
# Total supply amount.
839
totalSupply: BigInt!
840
}
841
​
842
# Contract defines block-chain smart contract information container
843
type Contract {
844
"Address represents the contract address."
845
address: Address!
846
​
847
"DeployedBy represents the smart contract deployment transaction reference."
848
deployedBy: Transaction!
849
​
850
"transactionHash represents the smart contract deployment transaction hash."
851
transactionHash: Bytes32!
852
​
853
"Smart contract name. Empty if not available."
854
name: String!
855
​
856
"Smart contract version identifier. Empty if not available."
857
version: String!
858
​
859
"""
860
License specifies an open source license the contract was published with.
861
Empty if not specified.
862
"""
863
license: String!
864
​
865
"Smart contract author contact. Empty if not available."
866
supportContact: String!
867
​
868
"Smart contract compiler identifier. Empty if not available."
869
compiler: String!
870
​
871
"Smart contract source code. Empty if not available."
872
sourceCode: String!
873
​
874
"Smart contract ABI definition. Empty if not available."
875
abi: String!
876
​
877
"""
878
Validated is the unix timestamp at which the source code was validated
879
against the deployed byte code. Null if not validated yet.
880
"""
881
validated: Long
882
​
883
"Timestamp is the unix timestamp at which this smart contract was deployed."
884
timestamp: Long!
885
}
886
​
887
# ContractValidationInput represents a set of data sent from client
888
# to validate deployed contract with the provided source code.
889
input ContractValidationInput {
890
"Address of the contract being validated."
891
address: Address!
892
​
893
"Optional smart contract name. Maximum allowed length is 64 characters."
894
name: String
895
​
896
"Optional smart contract version identifier. Maximum allowed length is 14 characters."
897
version: String
898
​
899
"Optional smart contract author contact. Maximum allowed length is 64 characters."
900
supportContact: String
901
​
902
"""
903
License specifies an open source license the contract was published with.
904
Empty if not specified.
905
"""
906
license: String
907
​
908
"Optimized specifies if the compiler was set to optimize the byte code."
909
optimized: Boolean = true
910
​
911
"""
912
OptimizeRuns specifies number of optimization runs the compiler was set
913
to execute during the byte code optimizing.
914
"""
915
optimizeRuns: Int = 200
916
​
917
"Smart contract source code."
918
sourceCode: String!
919
}
920
​
921
# ContractList is a list of smart contract edges provided by sequential access request.
922
type ContractList {
923
# Edges contains provided edges of the sequential list.
924
edges: [ContractListEdge!]!
925
​
926
# TotalCount is the maximum number of contracts available for sequential access.
927
totalCount: BigInt!
928
​
929
# PageInfo is an information about the current page of contract edges.
930
pageInfo: ListPageInfo!
931
}
932
​
933
# TransactionListEdge is a single edge in a sequential list of transactions.
934
type ContractListEdge {
935
cursor: Cursor!
936
contract: Contract!
937
}
938
​
939
# ERC20TransactionList is a list of ERC20 transaction edges provided by sequential access request.
940
type ERC20TransactionList {
941
# Edges contains provided edges of the sequential list.
942
edges: [ERC20TransactionListEdge!]!
943
​
944
# TotalCount is the maximum number of ERC20 transactions available for sequential access.
945
totalCount: BigInt!
946
​
947
# PageInfo is an information about the current page of ERC20 transaction edges.
948
pageInfo: ListPageInfo!
949
}
950
​
951
# TransactionListEdge is a single edge in a sequential list of ERC20 transactions.
952
type ERC20TransactionListEdge {
953
cursor: Cursor!
954
trx: ERC20Transaction!
955
}
956
​
957
# CurrentState represents the current active state
958
# of the chain information condensed on one place.
959
type CurrentState {
960
# epoch is the last sealed Epoch structure
961
sealedEpoch: Epoch!
962
​
963
# blocks represents number of blocks in the chain.
964
blocks: BigInt!
965
​
966
# transactions represents number of transactions in the chain.
967
transactions: Long!
968
​
969
# validators represents number of validators in the network.
970
validators: Long!
971
​
972
# accounts represents number of accounts participating on transactions.
973
accounts: Long!
974
​
975
# sfcVersion indicates the current version of the SFC contract.
976
# The version is encoded into 3 bytes representing ASCII version numbers
977
# with the most significant byte first [<8bit major><8bit minor><8bit revision>].
978
# I.e. Version 1.0.2 = "102" = 0x313032
979
sfcVersion: Long!
980
​
981
# sfcContractAddress is the address of the SFC contract
982
# used for PoS staking control.
983
sfcContractAddress: Address!
984
​
985
# sfcLockingEnabled indicates if the SFC locking feature is enabled.
986
sfcLockingEnabled: Boolean!
987
}
988
# UniswapActionList is a list of uniswap action edges provided by sequential access request.
989
type UniswapActionList {
990
# Edges contains provided edges of the sequential list.
991
edges: [UniswapActionListEdge!]!
992
​
993
# TotalCount is the maximum number of uniswap actions available for sequential access.
994
totalCount: BigInt!
995
​
996
# PageInfo is an information about the current page of uniswap action edges.
997
pageInfo: ListPageInfo!
998
}
999
​
1000
# UniswapActionListEdge is a single edge in a sequential list of uniswap actions.
1001
type UniswapActionListEdge {
1002
cursor: Cursor!
1003
uniswapAction: UniswapAction!
1004
}
1005
​
1006
# UniswapAction represents a Uniswap action - swap, mint, burn
1007
type UniswapAction {
1008
​
1009
# id of the action in the persistent db
1010
id: Bytes32!
1011
​
1012
# UniswapPair represents the information about single
1013
# Uniswap pair managed by the Uniswap Core.
1014
uniswapPair: UniswapPair!
1015
​
1016
# pairAddress is address of the action's uniswap pair
1017
pairAddress: Address!
1018
​
1019
# transactionHash represents the hash for this acstion transaction
1020
transactionHash: Bytes32!
1021
​
1022
# sender is address of action owner account
1023
sender: Address!
1024
​
1025
# type represents action type:
1026
# 0 - swap
1027
# 1 - mint
1028
# 2 - burn
1029
type: Int!
1030
​
1031
# blockNr is number of the block for this action
1032
blockNr: Long!
1033
​
1034
# Time represents UTC ISO time tag for this reserve value
1035
time: Long!
1036
​
1037
# amount0in is amount of incomming tokens for Token0 in this action
1038
amount0in: BigInt!
1039
​
1040
# amount0out is amount of outgoing tokens for Token0 in this action
1041
amount0out: BigInt!
1042
​
1043
# amount1in is amount of In tokens for Token1 in this action
1044
amount1in: BigInt!
1045
​
1046
# amount1out is amount of outgoing tokens for Token1 in this action
1047
amount1out: BigInt!
1048
}
1049
​
1050
# Represents staker information.
1051
type Staker {
1052
# ID number the staker.
1053
id: BigInt!
1054
​
1055
# Staker address.
1056
stakerAddress: Address!
1057
​
1058
# Amount of total staked tokens in WEI.
1059
totalStake: BigInt
1060
​
1061
# Amount of own staked tokens in WEI.
1062
stake: BigInt!
1063
​
1064
# Amount of tokens delegated to the staker in WEI.
1065
delegatedMe: BigInt!
1066
​
1067
# Maximum total amount of tokens allowed to be delegated
1068
# to the staker in WEI.
1069
# This value depends on the amount of self staked tokens.
1070
totalDelegatedLimit: BigInt!
1071
​
1072
# Maximum amount of tokens allowed to be delegated to the staker
1073
# on a new delegation in WEI.
1074
# This value depends on the amount of self staked tokens.
1075
delegatedLimit: BigInt!
1076
​
1077
# Is the staker active.
1078
isActive: Boolean!
1079
​
1080
# Is TRUE for validators withdrawing their validation stake.
1081
isWithdrawn: Boolean!
1082
​
1083
# Is the staker considered to be cheater.
1084
isCheater: Boolean!
1085
​
1086
# Is the staker offline.
1087
isOffline: Boolean!
1088
​
1089
# isStakeLocked signals if the staker locked the stake.
1090
isStakeLocked: Boolean!
1091
​
1092
# Epoch in which the staker was created.
1093
createdEpoch: Long!
1094
​
1095
# Timestamp of the staker creation.
1096
createdTime: Long!
1097
​
1098
# lockedFromEpoch is the identifier of the epoch the stake lock was created.
1099
lockedFromEpoch: Long!
1100
​
1101
# lockedUntil is the timestamp up to which the stake is locked, zero if not locked.
1102
lockedUntil: Long!
1103
​
1104
# Epoch in which the staker was deactivated.
1105
deactivatedEpoch: Long!
1106
​
1107
# Timestamp of the staker deactivation.
1108
deactivatedTime: Long!
1109
​
1110
# How many blocks the staker missed.