Skip to content

Availability to get Data source information #425

Description

@clauBv23

Hi,

After the 0.6.0 version we can print the data sources with logDataSources. I would like to be able to retrieve the data source information to test whether the values are correct.

example:

let's say I have this logDataSource output:

🛠  {
  "0xa16081f360e3847006db660bae1c6d1b2e17ec2a": {
    "kind": "ethereum/contract",
    "name": "GraphTokenLockWallet",
    "address": "0xa16081f360e3847006db660bae1c6d1b2e17ec2a",
    "context": {
      "contextVal": {
        "type": "Int",
        "data": 325
      }
    }
  }
}

I would like to add a test that checks if the context is correct.
Something like:

logDataSources('GraphTokenLockWallet')
let dataSource = getDataSource('GraphTokenLockWallet') 
assert.bigIntEquals(dataSource[0xa16081f360e3847006db660bae1c6d1b2e17ec2a].context.contextVal.data, 325)
// other assert for checking the data source context etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions