Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contract events wrong order #469

Open
lassemand opened this issue Feb 3, 2025 — with Linear · 0 comments
Open

Contract events wrong order #469

lassemand opened this issue Feb 3, 2025 — with Linear · 0 comments
Assignees

Comments

Copy link
Contributor

lassemand commented Feb 3, 2025

Can be tested by inserting below into https://api-ccdscan-fungy.stagenet.concordium.com/ and https://api-ccdscan.stagenet.concordium.com/graphql/ respectively
Query

query ($skipEvent: Int, $takeEvent: Int, $skipRejectEvent: Int, $takeRejectEvent: Int, $skipTokens: Int, $takeTokens: Int, $contractAddressIndex: UnsignedLong!, $contractAddressSubIndex: UnsignedLong!) {
  contract(
    contractAddressIndex: $contractAddressIndex
    contractAddressSubIndex: $contractAddressSubIndex
  ) {
    transactionHash
    contractAddress
    blockSlotTime
    snapshot {
      moduleReference
      amount
      contractName
      __typename
    }
    tokens(skip: $skipTokens, take: $takeTokens) {
      items {
        tokenAddress
        tokenId
        contractIndex
        contractSubIndex
        contractAddressFormatted
        totalSupply
        metadataUrl
        __typename
      }
      totalCount
      __typename
    }
    creator {
      asString
      __typename
    }
    contractRejectEvents(skip: $skipRejectEvent, take: $takeRejectEvent) {
      items {
        blockSlotTime
        transactionHash
        rejectedEvent {
          __typename
          ... on RejectedReceive {
            rejectReason
            receiveName
            messageAsHex
            message
            contractAddress {
              index
              subIndex
              __typename
            }
            __typename
          }
        }
        __typename
      }
      totalCount
      __typename
    }
    contractEvents(skip: $skipEvent, take: $takeEvent) {
      items {
        blockSlotTime
        transactionHash
        event {
          __typename
          ... on ContractInitialized {
            contractAddress {
              __typename
              asString
              index
              subIndex
            }
            amount
            moduleRef
            initName
            moduleRef
            version
            eventsAsHex {
              nodes
              __typename
            }
            events {
              nodes
              __typename
            }
            __typename
          }
          ... on ContractInterrupted {
            contractAddress {
              __typename
              asString
              index
              subIndex
            }
            eventsAsHex {
              nodes
              __typename
            }
            events {
              nodes
              __typename
            }
            __typename
          }
          ... on ContractResumed {
            contractAddress {
              __typename
              asString
              index
              subIndex
            }
            success
            __typename
          }
          ... on ContractUpdated {
            amount
            receiveName
            messageAsHex
            message
            version
            instigator {
              __typename
              ... on AccountAddress {
                asString
                __typename
              }
              ... on ContractAddress {
                asString
                index
                subIndex
                __typename
              }
            }
            contractAddress {
              __typename
              asString
              index
              subIndex
            }
            eventsAsHex {
              nodes
              __typename
            }
            events {
              nodes
              __typename
            }
            __typename
          }
          ... on ContractCall {
            contractUpdated {
              amount
              receiveName
              messageAsHex
              message
              version
              instigator {
                __typename
                ... on AccountAddress {
                  asString
                  __typename
                }
                ... on ContractAddress {
                  asString
                  index
                  subIndex
                  __typename
                }
              }
              contractAddress {
                __typename
                asString
                index
                subIndex
              }
              eventsAsHex {
                nodes
                __typename
              }
              events {
                nodes
                __typename
              }
              __typename
            }
            __typename
          }
          ... on ContractUpgraded {
            __typename
            contractAddress {
              __typename
              asString
              index
              subIndex
            }
            moduleFrom: from
            moduleTo: to
          }
          ... on Transferred {
            amount
            from {
              ... on ContractAddress {
                __typename
                asString
                index
                subIndex
              }
              __typename
            }
            to {
              ... on AccountAddress {
                __typename
                asString
              }
              __typename
            }
            __typename
          }
        }
        __typename
      }
      totalCount
      __typename
    }
    __typename
  }
}

Variables:

{
  "contractAddressIndex": 5056,
  "contractAddressSubIndex": 0,
  "skipEvent": 2,
  "takeEvent": 10,
  "skipRejectEvent": 0,
  "takeRejectEvent": 2,
  "skipTokens": 0,
  "takeTokens": 2
}
@lassemand lassemand changed the title Contract events, rejected and tokens wrong order Contract events wrong order Feb 3, 2025
@lassemand lassemand self-assigned this Feb 5, 2025
@limemloh limemloh closed this as completed Feb 7, 2025
@lassemand lassemand reopened this Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants