Add examples for Any API Large and Multi-word responses
In addition to the standard GET request for Chainlink Connect to any API, Chainlink also supports multi-variable and large (bytes or string > 32bytes) responses.
On first glance it appears that executing these examples in hardhat-starter-kit will require a adjustment to, or the addition of a second MockOracle.
Excellent idea, @mpaler. Thanks for raising this issue!
Taking a crack at it now...
Appears to be an issue over in core Chainlink too? not finding any test examples over there (yet) that we can pull from...
There is this https://github.com/smartcontractkit/chainlink/issues/5639 which seems related as i believe we'll need to create an Operator mock, vs. the current Oracle mock.
Will this work ?
Action Steps
- Add fulfillOracleRequest2 method (supports multi-word and large responses) in existing MockOracle.sol
- Create Multi-word API Consumer Contract
- Create Tests for Multi-word API Consumer Contract
Hey @kevin3010, that sounds like a great plan. If you are going to open a PR, feel free to use examples from the official documentation as inspiration. Looking forward to it!
ok I'll work on this issue.