Skip to content
This repository was archived by the owner on Apr 18, 2023. It is now read-only.

Aggregate usage example #27

Open
shmuel-web opened this issue Mar 24, 2021 · 1 comment
Open

Aggregate usage example #27

shmuel-web opened this issue Mar 24, 2021 · 1 comment

Comments

@shmuel-web
Copy link

Hi

thanks for open-sourcing this project

could you add a short and simple example of using "aggregate" to batch calls

thanks

@shmuel-web
Copy link
Author

maybe something like this
but with more explainers

async function start(){
  try{
    const res = await aggregate([{
      target: '0xbbf289d846208c16edc8474705c748aff07732db',
      method: 'what()',
      returns: [['foo']],
      returnTypes: ['uint256']
    }], config)
    console.log({res})
  } catch (err){
    console.error(err)
  }
}

start()

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant