query eventsInRange($fromBlockNumber: Int!, $toBlockNumber: Int!){
    eventsInRange(fromBlockNumber: $fromBlockNumber, toBlockNumber: $toBlockNumber){
        block{
            cid
            hash
            number
            timestamp
            parentHash
        }
        tx{
            hash
            index
            from
            to
        }
        contract
        eventIndex
        event{
            ... on ApprovalEvent {
                owner
                approved
                tokenId
                spender
                value
            }
            ... on ApprovalForAllEvent {
                owner
                operator
                approved
            }
            ... on BurnEvent {
                lender
                tokenId
            }
            ... on MemorializePositionEvent {
                lender
                tokenId
                indexes
            }
            ... on MintEvent {
                lender
                pool
                tokenId
            }
            ... on MoveLiquidityEvent {
                lender
                tokenId
                fromIndex
                toIndex
                lpRedeemedFrom
                lpAwardedTo
            }
            ... on RedeemPositionEvent {
                lender
                tokenId
                indexes
            }
            ... on TransferEvent {
                from
                to
                tokenId
                value
            }
            ... on PoolCreatedEvent {
                pool_
                subsetHash_
            }
            ... on DelegateRewardClaimedEvent {
                delegateeAddress
                distributionId
                rewardClaimed
            }
            ... on DistributionPeriodStartedEvent {
                distributionId
                startBlock
                endBlock
            }
            ... on FundTreasuryEvent {
                amount
                treasuryBalance
            }
            ... on FundedSlateUpdatedEvent {
                distributionId
                fundedSlateHash
            }
            ... on ProposalCreatedEvent {
                proposalId
                proposer
                targets
                values
                signatures
                calldatas
                startBlock
                endBlock
                description
            }
            ... on ProposalExecutedEvent {
                proposalId
            }
            ... on VoteCastEvent {
                voter
                proposalId
                support
                weight
                reason
            }
            ... on DelegateChangedEvent {
                delegator
                fromDelegate
                toDelegate
            }
            ... on DelegateVotesChangedEvent {
                delegate
                previousBalance
                newBalance
            }
            ... on AddCollateralEvent {
                actor
                index
                amount
                lpAwarded
            }
            ... on AddQuoteTokenEvent {
                lender
                index
                amount
                lpAwarded
                lup
            }
            ... on ApproveLPTransferorsEvent {
                lender
                transferors
            }
            ... on AuctionNFTSettleEvent {
                borrower
                collateral
                lp
                index
            }
            ... on AuctionSettleEvent {
                borrower
                collateral
            }
            ... on BondWithdrawnEvent {
                kicker
                reciever
                amount
            }
            ... on BucketBankruptcyEvent {
                index
                lpForfeited
            }
            ... on BucketTakeEvent {
                borrower
                index
                amount
                collateral
                bondChange
                isReward
            }
            ... on BucketTakeLPAwardedEvent {
                taker
                kicker
                lpAwardedTaker
                lpAwardedKicker
            }
            ... on DecreaseLPAllowanceEvent {
                owner
                spender
                indexes
                amounts
            }
            ... on DrawDebtEvent {
                borrower
                amountBorrowed
                collateralPledged
                lup
            }
            ... on FlashloanEvent {
                receiver
                token
                amount
            }
            ... on IncreaseLPAllowanceEvent {
                owner
                spender
                indexes
                amounts
            }
            ... on InterestUpdateFailureEvent {
                dummy
            }
            ... on KickEvent {
                borrower
                debt
                collateral
                bond
            }
            ... on KickReserveAuctionEvent {
                claimableReservesRemaining
                auctionPrice
                currentBurnEpoch
            }
            ... on LoanStampedEvent {
                borrower
            }
            ... on MoveQuoteTokenEvent {
                lender
                from
                to
                amount
                lpRedeemedFrom
                lpAwardedTo
                lup
            }
            ... on RemoveCollateralEvent {
                claimer
                index
                amount
                lpRedeemed
            }
            ... on RemoveQuoteTokenEvent {
                lender
                index
                amount
                lpRedeemed
                lup
            }
            ... on RepayDebtEvent {
                borrower
                quoteRepaid
                collateralPulled
                lup
            }
            ... on ReserveAuctionEvent {
                claimableReservesRemaining
                auctionPrice
                currentBurnEpoch
            }
            ... on ResetInterestRateEvent {
                oldRate
                newRate
            }
            ... on RevokeLPAllowanceEvent {
                owner
                spender
                indexes
            }
            ... on RevokeLPTransferorsEvent {
                lender
                transferors
            }
            ... on SettleEvent {
                borrower
                settledDebt
            }
            ... on TakeEvent {
                borrower
                amount
                collateral
                bondChange
                isReward
            }
            ... on TransferLPEvent {
                owner
                newOwner
                indexes
                lp
            }
            ... on UpdateInterestRateEvent {
                oldRate
                newRate
            }
            ... on AddCollateralNFTEvent {
                actor
                index
                tokenIds
                lpAwarded
            }
            ... on DrawDebtNFTEvent {
                borrower
                amountBorrowed
                tokenIdsPledged
                lup
            }
            ... on MergeOrRemoveCollateralNFTEvent {
                actor
                collateralMerged
                toIndexLps
            }
        }
        proof{
            data
        }
    }
}