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