Skip to content
New issue

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

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

Already on GitHub? # to your account

Availability to get Data source information #425

Open
clauBv23 opened this issue Mar 28, 2024 · 0 comments
Open

Availability to get Data source information #425

clauBv23 opened this issue Mar 28, 2024 · 0 comments

Comments

@clauBv23
Copy link

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.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant