makerdao / multicall.js

Multicall.js: A JavaScript blockchain state management library for dapps
MIT License
421 stars 97 forks source link

How can I get the method returns if the returns contain more than one result #44

Open terryyyyyy opened 3 years ago

terryyyyyy commented 3 years ago

One of my contract method will returns more than one params, How can I get them? I used multicall like this but It doesn't work const dis = await aggregate([ { target: stakingFactoryId, call: [ 'distributionEras(uint8)(uint256,uint256,uint256)', 0 ], returns: [ ['amount'], ['startHeight'], ['stopHeight'] ] } ], Multi_Config) console.log({dis});