Giter Club home page Giter Club logo

Comments (3)

edd avatar edd commented on June 9, 2024

tl;dr I need this for the Network Treasury page, because I have no way to show individual transfers into and out of network treasury accounts.

Example for a recurring transfer:

https://api.testnet.vega.rocks/graphql/#

{
  transfer(id:"6655aa91eace8ac36ff59c84026d7982985d3b96a9728ab8ad0093892a0c7ca1") {
    fees {
      amount
      epoch
    }
    transfer {
      amount
      status
      kind {
        __typename
        ... on RecurringGovernanceTransfer {
          startEpoch
          endEpoch
        }
      }
    }
  }
}

Gives me:

{
  "data": {
    "transfer": {
      "fees": [],
      "transfer": {
        "amount": "323000000",
        "status": "STATUS_DONE",
        "kind": {
          "__typename": "RecurringGovernanceTransfer",
          "startEpoch": 10088,
          "endEpoch": 10188
        }
      }
    }
  }
}

There is no way to know how many times this transfer actually occured. If the ledgerEntries query worked, I could use the start/end epoch dates like so:

{
  ledgerEntries(filter: {
    FromAccountFilter: {
      partyIds: ["network"],
      accountTypes: ACCOUNT_TYPE_NETWORK_TREASURY

    }
    TransferId: "6655aa91eace8ac36ff59c84026d7982985d3b96a9728ab8ad0093892a0c7ca1"
  },
  dateRange: {
    start: "2023-11-15T12:17:52.34555Z",
    end: "2023-11-19T17:19:53.249505Z"
  }) {
    edges {
      node {
        assetId
        vegaTime
      }
    }
  }
}

but this query never returns. So a cashflows field would be amazing. A working ledgerEntries would be acceptable.

from vega.

edd avatar edd commented on June 9, 2024

An example of the query I'd like to do that still appears not to work:

{
  ledgerEntries(filter: {
    ToAccountFilter: {
      partyIds: ["network"]
      accountTypes: [ACCOUNT_TYPE_NETWORK_TREASURY]
    },
    FromAccountFilter: {
      partyIds: ["network"]
      accountTypes: [ACCOUNT_TYPE_NETWORK_TREASURY]
    }
  }) {
    edges {
      node {
        assetId
        quantity
      }
    }
  }
}

from vega.

edd avatar edd commented on June 9, 2024

Ticket updated after discussion with @EVODelavega

from vega.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.