Entities
OptSwap Subgraph Data Entities and Schema
Note that some attributes such as proposalType
, optionType
, optionStyle
, etc., return enumerated values. Please refer to the associated smart contracts documentation for full details about the various enumerated types.
Some of these entities may change or be renamed/optimized in future versions which may affect your queries. Subsequent versions will be posted on this page along with the Changelog for developers to update their code. Please consider these entities as currently "in beta" and be prepared to update your applications in the future, if needed.
Changelog
2024-xx-xx: Entities & Schema –
v0.0.1 created.
Entities & Schema (v0.0.1)
##############
# Block Info #
##############
type LatestBlock @entity {
id: ID!
number: BigInt! # uint256
timestamp: BigInt! # uint256
}
########################
# OptSwapDAOGovernance #
########################
type GovernanceExecutedTransaction @entity {
id: ID!
contract: Bytes! # address
actionHash: Bytes! # bytes32
target: Bytes! # address
value: BigInt! # uint256
signature: String! # string
data: Bytes! # bytes
executionTime: BigInt! # uint256
withDelegatecall: Boolean! # bool
resultData: Bytes! # bytes
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type NativeAssetDonated @entity {
id: ID!
to: Bytes! # address
user: Bytes! # address
donationAmount: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwap @entity {
id: ID!
contract: Bytes! # address
contractLogic: Bytes! # address
token0: Bytes! # address
token0Decimals: Int! # uint8
token1: Bytes! # address
token1Decimals: Int! # uint8
fixedLotSize: BigInt! # uint32
minTickSize: BigInt! # uint32
metaOracle: Bytes! # address
useViaToken: Boolean! # bool
viaToken: Bytes! # address
token0Reserves: BigInt! # uint256
token1Reserves: BigInt! # uint256
totalTradeVolume: BigInt! # uint256
totalUnderlyingSettlementVolume: BigInt! # uint256
totalCashSettlementVolume: BigInt! # uint256
totalMakerFeesEarned: BigInt! # uint256
totalTakerFeesEarned: BigInt! # uint256
totalUnderlyingSettlementFeesEarned: BigInt! # uint256
totalCashSettlementFeesEarned: BigInt! # uint256
totalPositionConversionFeesEarned: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapDayData @entity {
id: ID!
contract: Bytes! # address
dayNumber: BigInt! # uint256
dayStartTimestamp: BigInt! # uint256
token0Reserves: BigInt! # uint256
token1Reserves: BigInt! # uint256
totalTradeVolume: BigInt! # uint256
totalUnderlyingSettlementVolume: BigInt! # uint256
totalCashSettlementVolume: BigInt! # uint256
totalMakerFeesEarned: BigInt! # uint256
totalTakerFeesEarned: BigInt! # uint256
totalUnderlyingSettlementFeesEarned: BigInt! # uint256
totalCashSettlementFeesEarned: BigInt! # uint256
totalPositionConversionFeesEarned: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapUpdateDetail @entity {
id: ID!
optSwapContract: Bytes! # address
ammContract: Bytes! # address
makerFees: BigInt! # uint32
takerFees: BigInt! # uint32
settlementFees: BigInt! # uint32
positionConversionFees: BigInt! # uint32
matchFinderFeesPerLot: BigInt! # uint96
token0FeesDisbursalContract: Bytes! # address
token1FeesDisbursalContract: Bytes! # address
feesTransferReward: BigInt! # uint32
maxUnderlyingExercisePeriod: BigInt! # uint32
maxForceCashSettlementWaitPeriod: BigInt! # uint32
rewardPerSettlementsExecutionPoint: BigInt! # uint96
allowForceExerciseCashCalls: Boolean! # bool
allowForceExerciseCashPuts: Boolean! # bool
allowForceExerciseWithPartialSwap: Boolean! # bool
allowForceExerciseUnderlying: Boolean! # bool
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapAMMUpdated @entity {
id: ID!
optSwapContract: Bytes! # address
ammContract: Bytes! # address
ammContractLogic: Bytes! # address
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type GovernanceProposalCreated @entity {
id: ID!
contract: Bytes! # address
proposalNumber: BigInt! # uint256
user: Bytes! # address
proposalType: Int! # uint8
target: Bytes! # address
quorum: BigInt! # uint256
votingEndsAt: BigInt! # uint256
timelockDuration: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type GovernanceProposalExecuted @entity {
id: ID!
contract: Bytes! # address
proposalNumber: BigInt! # uint256
user: Bytes! # address
reward: BigInt! # uint256
resultData: Bytes! # bytes
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type GovernanceProposalExecutionError @entity {
id: ID!
contract: Bytes! # address
proposalNumber: BigInt! # uint256
user: Bytes! # address
reward: BigInt! # uint256
callError: Bytes! # bytes
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
# Maps from RegisterNewContract events wherever applicable
# or gets stamped out based on core contracts deployed
type Contract @entity {
id: ID! # ID is the address
contract: Bytes! # address
contractType: Int! # uint8
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type StakingContract @entity {
id: ID!
governanceContract: Bytes! # address
contract: Bytes! # address
contractLogic: Bytes! # address
stakedToken: Bytes! # address
stakedTokenDecimals: Int! # uint8
stakedTokenIsNativeAsset: Boolean! # bool
rewardToken: Bytes! # address
rewardTokenIsNativeAsset: Boolean! # bool
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type TokensDonated @entity {
id: ID!
to: Bytes! # address
user: Bytes! # address
donationToken: Bytes! # address
donationAmount: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type TokensWithdrawn @entity {
id: ID!
from: Bytes! # address
proposalNumber: BigInt! # uint256
user: Bytes! # address
nVeGovernanceTokens: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type CommercialPaper @entity {
id: ID!
governanceContract: Bytes! # address
contract: Bytes! # address
contractLogic: Bytes! # address
whitelisted: Boolean! # bool
restrictiveLegend: Boolean! # bool
underlyingToken: Bytes! # address
faceValue: BigInt! # uint256
subscriptionDiscount: BigInt! # uint256
issueStartAt: BigInt! # uint256
issueEndAt: BigInt! # uint256
maturityTimestamp: BigInt! # uint256
maxSupply: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type GovernanceVoteModified @entity {
id: ID!
contract: Bytes! # address
proposalNumber: BigInt! # uint256
user: Bytes! # address
yesOrNo: Boolean! # bool
nVeGovernanceTokens: BigInt! # uint256
voteChanged: Boolean! # bool
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type GovernanceVoted @entity {
id: ID!
contract: Bytes! # address
proposalNumber: BigInt! # uint256
user: Bytes! # address
yesOrNo: Boolean! # bool
nVeGovernanceTokens: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
##############
# MetaOracle #
##############
# Inherits NativeAssetDonated from OptSwapDAOGovernance
type ProxyAdminChanged @entity {
id: ID!
contract: Bytes! # address
previousAdmin: Bytes! # address
newAdmin: Bytes! # address
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type ProxyUpgraded @entity {
id: ID!
contract: Bytes! # address
implementation: Bytes! # address
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type Token @entity {
id: ID!
decimals: Int! # uint8
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OracleAdded @entity {
id: ID!
contract: Bytes! # address
token0: Bytes! # address
token0Decimals: Int! # uint8
token1: Bytes! # address
token1Decimals: Int! # uint8
router: Bytes! # address
liquidityPool: Bytes! # address
liquidityPoolType: Int! # uint8
nativeAssetToken: Int! # uint8
oracleIndex: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OracleDisabled @entity {
id: ID!
contract: Bytes! # address
token0: Bytes! # address
token1: Bytes! # address
liquidityPool: Bytes! # address
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OracleEnabled @entity {
id: ID!
contract: Bytes! # address
token0: Bytes! # address
token1: Bytes! # address
liquidityPool: Bytes! # address
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OwnershipTransferred @entity {
id: ID!
contract: Bytes! # address
previousOwner: Bytes! # address
newOwner: Bytes! # address
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type SnapshotOracle @entity {
id: ID!
contract: Bytes! # address
token0: Bytes! # address
token1: Bytes! # address
user: Bytes! # address
nRewardTokensToUser: BigInt! # uint256
nRewardTokensToTreasury: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
spotPriceOfToken0PerToken1: BigInt! # uint256
spotPriceOfToken1PerToken0: BigInt! # uint256
LTWAPOfToken0PerToken1: BigInt! # uint256
LTWAPOfToken1PerToken0: BigInt! # uint256
reserve0: BigInt! # uint256
reserve1: BigInt! # uint256
}
# Inherits TokensDonated from OptSwapDAOGovernance
type Withdrawn @entity {
id: ID!
contract: Bytes! # address
token: Bytes! # address
withdrawnAmount: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
#########################
# OptSwapDAOFundraising #
#########################
# Inherits ProxyAdminChanged & ProxyUpgraded from MetaOracle
type FundraisingFunded @entity {
id: ID!
contract: Bytes! # address
user: Bytes! # address
roundNumber: BigInt! # uint256
nGovernanceTokens: BigInt! # uint256
fundedAmount: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
# Inherits OwnershipTransferred from MetaOracle
type FundraisingRestrictiveLegendRemoved @entity {
id: ID!
contract: Bytes! # address
vestingNumber: BigInt! # uint256
roundNumber: BigInt! # uint256
user: Bytes! # address
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type FundraisingRoundCreated @entity {
id: ID!
contract: Bytes! # address
roundNumber: BigInt! # uint256
maxSupply: BigInt! # uint256
token: Bytes! # address
tokenDecimals: Int! # uint8
whitelisted: Boolean! # bool
restrictiveLegend: Boolean! # bool
rate: BigInt! # uint256
startAt: BigInt! # uint256
endAt: BigInt! # uint256
vestingPeriod: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type FundraisingUnvested @entity {
id: ID!
contract: Bytes! # address
vestingNumber: BigInt! # uint256
user: Bytes! # address
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type FundraisingVested @entity {
id: ID!
contract: Bytes! # address
vestingNumber: BigInt! # uint256
roundNumber: BigInt! # uint256
user: Bytes! # address
restrictiveLegend: Boolean! # bool
vestingEndsAt: BigInt! # uint256
nGovernanceTokens: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type FundraisingWhitelisted @entity {
id: ID!
contract: Bytes! # address
roundNumber: BigInt! # uint256
user: Bytes! # address
whitelisted: Boolean! # bool
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
# Inherits Withdrawn from MetaOracle
######################
# OptSwapDAOAirdrops #
######################
# Inherits ProxyAdminChanged & ProxyUpgraded from MetaOracle
type AirdropClaimed @entity {
id: ID!
contract: Bytes! # address
airdropNumber: BigInt! # uint256
user: Bytes! # address
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type AirdropCreated @entity {
id: ID!
contract: Bytes! # address
airdropNumber: BigInt! # uint256
proposalNumber: BigInt! # uint256
user: Bytes! # address
token: Bytes! # address
amount: BigInt! # uint256
vestingEndsAt: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
# Inherits OwnershipTransferred from MetaOracle
# Inherits Withdrawn from MetaOracle
#######################################
# OptSwapDAOToken & OptSwapDAOVeToken #
#######################################
type Approval @entity {
id: ID!
token: Bytes! # address
owner: Bytes! # address
spender: Bytes! # address
value: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type Transfer @entity {
id: ID!
token: Bytes! # address
from: Bytes! # address
to: Bytes! # address
value: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type RoleAdminChanged @entity {
id: ID!
contract: Bytes! # address
role: Bytes! # bytes32
previousAdminRole: Bytes! # bytes32
newAdminRole: Bytes! # bytes32
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type RoleGranted @entity {
id: ID!
contract: Bytes! # address
role: Bytes! # bytes32
account: Bytes! # address
sender: Bytes! # address
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type RoleRevoked @entity {
id: ID!
contract: Bytes! # address
role: Bytes! # bytes32
account: Bytes! # address
sender: Bytes! # address
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type TokenUnescrowed @entity {
id: ID!
contract: Bytes! # address
unescrowNumber: BigInt! # uint256
escrowNumber: BigInt! # uint256
user: Bytes! # address
unescrowedAmount: BigInt! # uint256
escrowedTokensBurnAmount: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type TokenEscrowed @entity {
id: ID!
contract: Bytes! # address
escrowNumber: BigInt! # uint256
user: Bytes! # address
escrowPeriodYears: Int! # uint8
escrowAmount: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type VotingRightsActivated @entity {
id: ID!
contract: Bytes! # address
escrowNumber: BigInt! # uint256
user: Bytes! # address
escrowedTokensMintAmount: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type EscrowTokenWithdrawn @entity {
id: ID!
contract: Bytes! # address
token: Bytes! # address
unescrowNumber: BigInt! # uint256
user: Bytes! # address
withdrawnAmount: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
###########
# OptSwap #
###########
# Inherits ProxyAdminChanged & ProxyUpgraded from MetaOracle
type OptSwapOption @entity {
id: ID!
contract: Bytes! # address
optionStyle: Int! # uint8
expiry: BigInt! # uint256
optionType: Int! # uint8
strike0: BigInt! # uint256
strike1: BigInt! # uint256
lotSize: BigInt! # uint256
maxOpenInterestLots: BigInt! # uint256
openInterestLots: BigInt! # uint256
totalTrades: BigInt! # uint256
totalVolumeLots: BigInt! # uint256
totalTradeVolume: BigInt! # uint256
totalUnderlyingSettlementVolume: BigInt! # uint256
totalCashSettlementVolume: BigInt! # uint256
totalMakerFeesEarned: BigInt! # uint256
totalTakerFeesEarned: BigInt! # uint256
totalUnderlyingSettlementFeesEarned: BigInt! # uint256
totalCashSettlementFeesEarned: BigInt! # uint256
lastTradedPrice: BigInt! # uint256
lastTradedVolumeLots: BigInt! # uint256
lastTradedBlockNumber: BigInt! # uint256
lastTradedTimestamp: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapOptionMinuteData @entity {
id: ID!
contract: Bytes! # address
dayNumber: BigInt! # uint256
dayStartTimestamp: BigInt! # uint256
hourStartTimestamp: BigInt! # uint256
minuteStartTimestamp: BigInt! # uint256
hourOfDay: BigInt! # uint256
minuteOfHour: BigInt! # uint256
optionStyle: Int! # uint8
expiry: BigInt! # uint256
optionType: Int! # uint8
strike0: BigInt! # uint256
strike1: BigInt! # uint256
lotSize: BigInt! # uint256
openInterestLotsOpen: BigInt! # uint256
openInterestLotsHigh: BigInt! # uint256
openInterestLotsLow: BigInt! # uint256
openInterestLotsClose: BigInt! # uint256
priceOpen: BigInt! # uint256
priceHigh: BigInt! # uint256
priceLow: BigInt! # uint256
priceClose: BigInt! # uint256
totalTrades: BigInt! # uint256
totalVolumeLots: BigInt! # uint256
totalTradeVolume: BigInt! # uint256
totalUnderlyingSettlementVolume: BigInt! # uint256
totalCashSettlementVolume: BigInt! # uint256
totalMakerFeesEarned: BigInt! # uint256
totalTakerFeesEarned: BigInt! # uint256
totalUnderlyingSettlementFeesEarned: BigInt! # uint256
totalCashSettlementFeesEarned: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapOptionDayData @entity {
id: ID!
contract: Bytes! # address
dayNumber: BigInt! # uint256
dayStartTimestamp: BigInt! # uint256
optionStyle: Int! # uint8
expiry: BigInt! # uint256
optionType: Int! # uint8
strike0: BigInt! # uint256
strike1: BigInt! # uint256
lotSize: BigInt! # uint256
openInterestLotsOpen: BigInt! # uint256
openInterestLotsHigh: BigInt! # uint256
openInterestLotsLow: BigInt! # uint256
openInterestLotsClose: BigInt! # uint256
priceOpen: BigInt! # uint256
priceHigh: BigInt! # uint256
priceLow: BigInt! # uint256
priceClose: BigInt! # uint256
totalTrades: BigInt! # uint256
totalVolumeLots: BigInt! # uint256
totalTradeVolume: BigInt! # uint256
totalUnderlyingSettlementVolume: BigInt! # uint256
totalCashSettlementVolume: BigInt! # uint256
totalMakerFeesEarned: BigInt! # uint256
totalTakerFeesEarned: BigInt! # uint256
totalUnderlyingSettlementFeesEarned: BigInt! # uint256
totalCashSettlementFeesEarned: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapPosition @entity {
id: ID!
contract: Bytes! # address
optionStyle: Int! # uint8
expiry: BigInt! # uint256
optionType: Int! # uint8
strike0: BigInt! # uint256
strike1: BigInt! # uint256
lotSize: BigInt! # uint256
orderType: Int! # uint8
user: Bytes! # address
belongsToAMM: Boolean! # bool
createdAt: BigInt! # uint256
lots: BigInt! # uint256
lotsLocked: BigInt! # uint256
lotsSettled: BigInt! # uint256
openLots: BigInt! # uint256
unlockedOpenLots: BigInt! # uint256
lockedOpenLots: BigInt! # uint256
settledAt: BigInt! # uint256
averagePrice: BigInt! # uint256
lastAveragePrice: BigInt! # uint256
bookedProfitsOrLosses: BigInt! # int256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapLockedPosition @entity {
id: ID!
contract: Bytes! # address
expiry: BigInt! # uint256
callStrike0: BigInt! # uint256
callStrike1: BigInt! # uint256
putStrike0: BigInt! # uint256
putStrike1: BigInt! # uint256
lotSize: BigInt! # uint256
user: Bytes! # address
lockedPositionsIndex: BigInt! # int256
lots: BigInt! # uint64
manuallyConverted: Boolean! # bool
cashMarginDiscount: BigInt! # uint256
positionConversionFeesEarned: BigInt! # uint256
lotsUnlocked: BigInt! # uint64
lotsSettled: BigInt! # uint64
openLots: BigInt! # uint256
totalCashMarginRefunds: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapLockedPositionSettlement @entity {
id: ID!
contract: Bytes! # address
lockedPositionsIndex: BigInt! # int256
lotsSettled: BigInt! # uint64
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapManagePosition @entity {
id: ID!
contract: Bytes! # address
sender: Bytes! # address
mode: Int! # uint8
optionStyle: Int! # uint8
expiry: BigInt! # uint256
optionType: Int! # uint8
strike0: BigInt! # uint256
strike1: BigInt! # uint256
lotSize: BigInt! # uint256
orderType: Int! # uint8
user: Bytes! # address
lots: BigInt! # uint64
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapOrder @entity {
id: ID!
logIndex: BigInt! # uint256
orderNumber: BigInt! # uint256
contract: Bytes! # address
orderType: Int! # uint8
instruction: Int! # uint8
optionStyle: Int! # uint8
expiry: BigInt! # uint256
optionType: Int! # uint8
strike0: BigInt! # uint256
strike1: BigInt! # uint256
lotSize: BigInt! # uint256
premium: BigInt! # uint256
lots: BigInt! # uint256
lotsCancelled: BigInt! # uint256
lotsFilled: BigInt! # uint256
openLots: BigInt! # uint256
createdAt: BigInt! # uint256
filledAt: BigInt! # uint256
cancelledAt: BigInt! # uint256
memo: BigInt! # uint256
user: Bytes! # address
orderBookIndex: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
# Inherits OwnershipTransferred from MetaOracle
type OptSwapSettlement @entity {
id: ID!
contract: Bytes! # address
user: Bytes! # address
optionStyle: Int! # uint8
expiry: BigInt! # uint256
optionType: Int! # uint8
strike0: BigInt! # uint256
strike1: BigInt! # uint256
lotSize: BigInt! # uint256
lots: BigInt! # uint64
settlementType: Int! # uint8
counterparty: Bytes! # address
intrinsicValue: BigInt! # uint256
underlyingSettlementFeesEarned: BigInt! # uint256
cashSettlementFeesEarned: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapSettlementSwap @entity {
id: ID!
contract: Bytes! # address
token0In: BigInt! # uint256
token0Out: BigInt! # uint256
token1In: BigInt! # uint256
token1Out: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapSettlementsExecutionPointsAwarded @entity {
id: ID!
contract: Bytes! # address
user: Bytes! # address
settlementsExecutionPointsAwarded: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapSettlementsExecutionRewardWithdrawn @entity {
id: ID!
contract: Bytes! # address
user: Bytes! # address
settlementsExecutionReward: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapFeesTransfer @entity {
id: ID!
contract: Bytes! # address
token0FeesDisbursalContract: Bytes! # address
totalUnderlyingFeesAmount: BigInt! # uint256
underlyingSettlementFeesEarned: BigInt! # uint256
token1FeesDisbursalContract: Bytes! # address
totalCashFeesAmount: BigInt! # uint256
makerFeesEarned: BigInt! # uint256
takerFeesEarned: BigInt! # uint256
cashSettlementFeesEarned: BigInt! # uint256
positionConversionFeesEarned: BigInt! # uint256
user: Bytes! # address
underlyingReward: BigInt! # uint256
cashReward: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapTrade @entity {
id: ID!
logIndex: BigInt! # uint256
tradeNumber: BigInt! # uint256
contract: Bytes! # address
optionStyle: Int! # uint8
expiry: BigInt! # uint256
optionType: Int! # uint8
strike0: BigInt! # uint256
strike1: BigInt! # uint256
lotSize: BigInt! # uint256
price: BigInt! # uint256
lots: BigInt! # uint256
lockedPositionIndex: BigInt! # int256
buyer: Bytes! # address
seller: Bytes! # address
maker: Bytes! # address
taker: Bytes! # address
makerOrderBookIndex: BigInt! # uint256
takerOrderBookIndex: BigInt! # uint256
takerPremium: BigInt! # uint256
buyerTaker: Boolean! # bool
makerInstruction: Int! # uint8
takerInstruction: Int! # uint8
makerMemo: BigInt! # uint256
takerMemo: BigInt! # uint256
makerFeesEarned: BigInt! # uint256
takerFeesEarned: BigInt! # uint256
openInterestLots: BigInt! # uint256
totalVolumeLots: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapOrderTradeLookup @entity {
id: ID!
optSwapTradeId: String! # string
}
type OptSwapUnlockedPosition @entity {
id: ID!
contract: Bytes! # address
lockedPositionsIndex: BigInt! # int256
lotsUnlocked: BigInt! # uint64
cashMarginDeposit: BigInt! # uint256
cashMarginRefund: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapToken0TransferIn @entity {
id: ID!
contract: Bytes! # address
amount: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapToken0TransferOut @entity {
id: ID!
contract: Bytes! # address
amount: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapToken1TransferIn @entity {
id: ID!
contract: Bytes! # address
amount: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapToken1TransferOut @entity {
id: ID!
contract: Bytes! # address
amount: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapUserTransfer @entity {
id: ID!
contract: Bytes! # address
user: Bytes! # address
sender: Bytes! # address
underlyingDiff: BigInt! # uint256
underlyingPullIn: Boolean! # bool
cashDiff: BigInt! # uint256
cashPullIn: Boolean! # bool
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapWithdrawn @entity {
id: ID!
contract: Bytes! # address
user: Bytes! # address
totalUnderlyingAmount: BigInt! # uint256
underlyingRefunds: BigInt! # uint256
underlyingSettled: BigInt! # uint256
totalCashAmount: BigInt! # uint256
premiumsEarned: BigInt! # uint256
premiumRefunds: BigInt! # uint256
cashRefunds: BigInt! # uint256
cashSettled: BigInt! # uint256
feesRefunds: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapRewardAdded @entity {
id: ID!
contract: Bytes! # address
user: Bytes! # address
reward: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
#####################
# OptSwapDAOStaking #
#####################
# Inherits ProxyAdminChanged & ProxyUpgraded from MetaOracle
type StakingRewardAdded @entity {
id: ID!
contract: Bytes! # address
user: Bytes! # address
reward: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type StakingRewardPaid @entity {
id: ID!
contract: Bytes! # address
user: Bytes! # address
reward: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type StakingStaked @entity {
id: ID!
contract: Bytes! # address
user: Bytes! # address
amount: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type StakingWithdrawn @entity {
id: ID!
contract: Bytes! # address
user: Bytes! # address
amount: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
##################################
# OptSwapDAOCommercialPaperToken #
##################################
# Inherits ProxyAdminChanged & ProxyUpgraded from MetaOracle
# Inherits Approval from OptSwapDAOToken
# Inherits Transfer from OptSwapDAOToken
# Inherits OwnershipTransferred from MetaOracle
type CommercialPaperRedeemed @entity {
id: ID!
contract: Bytes! # address
user: Bytes! # address
amount: BigInt! # uint256
redemptionAmount: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type CommercialPaperSubscribed @entity {
id: ID!
contract: Bytes! # address
user: Bytes! # address
amount: BigInt! # uint256
depositAmount: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type CommercialPaperWhitelisted @entity {
id: ID!
contract: Bytes! # address
user: Bytes! # address
whitelisted: Boolean! # bool
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
# Inherits Withdrawn from MetaOracle
##############
# OptSwapAMM #
##############
# Inherits ProxyAdminChanged & ProxyUpgraded from MetaOracle
type OptSwapAMM @entity {
id: ID!
contract: Bytes! # address
contractLogic: Bytes! # address
optSwapContract: Bytes! # address
governanceToken: Bytes! # address
standardStrikeDistance: BigInt! # uint32
expiryStart: BigInt! # uint64
expiryFrequency: BigInt! # uint32
token0Reserves: BigInt! # uint256
token1Reserves: BigInt! # uint256
totalMatchFinderFeesEarned: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapAMMDayData @entity {
id: ID!
contract: Bytes! # address
dayNumber: BigInt! # uint256
dayStartTimestamp: BigInt! # uint256
token0Reserves: BigInt! # uint256
token1Reserves: BigInt! # uint256
totalMatchFinderFeesEarned: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapAMMMatchFinderFeesEarned @entity {
id: ID!
contract: Bytes! # address
user: Bytes! # address
lots: BigInt! # uint32
feesEarned: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapAMMMatchFinderFeesRefundsWithdrawn @entity {
id: ID!
contract: Bytes! # address
user: Bytes! # address
feesRefunds: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapAMMMatchFinderPointsAwarded @entity {
id: ID!
contract: Bytes! # address
user: Bytes! # address
pointsAwarded: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapAMMLiquidityProviderPointsAwarded @entity {
id: ID!
contract: Bytes! # address
user: Bytes! # address
pointsAwarded: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapAMMManagedOrderCancellationPointsAwarded @entity {
id: ID!
contract: Bytes! # address
user: Bytes! # address
pointsAwarded: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapAMMManagedOrderCancelled @entity {
id: ID!
contract: Bytes! # address
managedOrderNumber: BigInt! # uint256
lotsCancelled: BigInt! # uint32
matchFinderFeesHoldRefunds: BigInt! # uint256
managedOrderCancellationPointsEarned: BigInt! # uint256
sender: Bytes! # address
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapAMMManagedOrder @entity {
id: ID!
contract: Bytes! # address
managedOrderNumber: BigInt! # uint256
orderType: Int! # uint8
instruction: Int! # uint8
optionStyle: Int! # uint8
optionType: Int! # uint8
lotSize: BigInt! # uint256
lots: BigInt! # uint32
lotsCancelled: BigInt! # uint256
lotsFilled: BigInt! # uint256
openLots: BigInt! # uint256
memo: BigInt! # uint32
validUntil: BigInt! # uint256
spotPriceAggregationTypeForStrike0: Int! # uint8
spotPriceAggregationTypeForStrike1: Int! # uint8
TWAPDuration0: BigInt! # uint32
TWAPDuration1: BigInt! # uint32
TWAPDuration2: BigInt! # uint32
TWAPDuration3: BigInt! # uint32
TWAPDuration4: BigInt! # uint32
inTheMoneyMultiplier: BigInt! # uint256
outOfTheMoneyMultiplier: BigInt! # uint256
expiryLower: BigInt! # uint256
expiryUpper: BigInt! # uint256
strike0Lower: BigInt! # uint256
strike0Upper: BigInt! # uint256
strike1Lower: BigInt! # uint256
strike1Upper: BigInt! # uint256
premiumLower: BigInt! # uint256
premiumUpper: BigInt! # uint256
deltaLower: Int! # int16
deltaUpper: Int! # int16
impliedVolatilityStrike0: BigInt! # uint32
impliedVolatilityStrike1: BigInt! # uint32
interestRate: BigInt! # uint32
dividendYield: BigInt! # uint32
user: Bytes! # address
totalMatchFinderFeesHold: BigInt! # uint128
matchFinderFeesPerLot: BigInt! # uint96
maxFees: BigInt! # uint32
createdAt: BigInt! # uint256
filledAt: BigInt! # uint256
cancelledAt: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapAMMManagedOrderExecuted @entity {
id: ID!
contract: Bytes! # address
managedOrderNumber: BigInt! # uint256
strike0: BigInt! # uint256
strike1: BigInt! # uint256
expiry: BigInt! # uint256
premium: BigInt! # uint256
lots: BigInt! # uint32
matchFinder: Bytes! # address
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapAMMManagedOrderFill @entity {
id: ID!
contract: Bytes! # address
managedOrderNumber: BigInt! # uint256
lotsFilled: BigInt! # uint32
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapAMMManagedOrderModified @entity {
id: ID!
contract: Bytes! # address
managedOrderNumber: BigInt! # uint256
lots: BigInt! # uint8
memo: BigInt! # uint32
validUntil: BigInt! # uint64
premiumLower: BigInt! # uint128
premiumUpper: BigInt! # uint128
deltaLower: Int! # int16
deltaUpper: Int! # int16
inTheMoneyMultiplier: BigInt! # uint32
outOfTheMoneyMultiplier: BigInt! # uint32
spotPriceAggregationTypeForStrike0: Int! # uint8
spotPriceAggregationTypeForStrike1: Int! # uint8
TWAPDuration0: BigInt! # uint32
TWAPDuration1: BigInt! # uint32
TWAPDuration2: BigInt! # uint32
TWAPDuration3: BigInt! # uint32
TWAPDuration4: BigInt! # uint32
impliedVolatilityStrike0: BigInt! # uint32
impliedVolatilityStrike1: BigInt! # uint32
interestRate: BigInt! # uint32
dividendYield: BigInt! # uint32
maxFees: BigInt! # uint32
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
# Inherits OwnershipTransferred from MetaOracle
type OptSwapAMMRewardAdded @entity {
id: ID!
contract: Bytes! # address
user: Bytes! # address
reward: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapAMMRewardsAndFeesPaid @entity {
id: ID!
contract: Bytes! # address
user: Bytes! # address
matchFinderPoints: BigInt! # uint256
matchFinderReward: BigInt! # uint256
liquidityProviderPoints: BigInt! # uint256
liquidityProviderReward: BigInt! # uint256
managedOrderCancellationPoints: BigInt! # uint256
managedOrderCancellationReward: BigInt! # uint256
matchFinderFeesPaid: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OptSwapAMMToCloseOrder @entity {
id: ID!
contract: Bytes! # address
optionStyle: Int! # uint8
expiry: BigInt! # uint256
optionType: Int! # uint8
strike0: BigInt! # uint256
strike1: BigInt! # uint256
lotSize: BigInt! # uint256
orderType: Int! # uint8
premium: BigInt! # uint256
lots: BigInt! # uint256
orderBookIndex: BigInt! # uint256
onBehalfOfUser: Bytes! # address
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
###########################
# OptSwapDAOTestnetFaucet #
###########################
# Inherits ProxyAdminChanged & ProxyUpgraded from MetaOracle
type TestnetFaucetClaimed @entity {
id: ID!
contract: Bytes! # address
user: Bytes! # address
token: Bytes! # address
amount: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
# Inherits OwnershipTransferred from MetaOracle
type TestnetFaucetWhitelisted @entity {
id: ID!
contract: Bytes! # address
user: Bytes! # address
token: Bytes! # address
amount: BigInt! # uint256
blockNumber: BigInt! # uint256
timestamp: BigInt! # uint256
}
# Inherits Withdrawn from MetaOracle
Last updated