Sometimes smart contracts need to either read state from web2 apis, or may want web2 apis to induce a state transition on a smart contract. There are products such as Gelato Web3 Functions or Chainlink Functions which accomplish this. Interoperability is really just a specific subset of the general oracle problem, so it would be pretty interesting to see these kind of oracles expressed as such. This bounty calls for a PoC of such.
To call an API, you could imagine this being implemented:
You can specify a specific API Url as a message recipient (bytes32 as a hash of the URL for example)
The message body would conform to a particular format which would have a keeper like service execute the API call. Such service can do the permissioning based on the origin chain sender.
To read data from an API call, you could imagine the following:
smart contracts already receive "external calls" via the handle function
The domain can similarly be a the web2 domain from above
The origin sender would be a specific URL (like above, could be bytes32 as the hash of the API caller)
The message body could be again some standardized format
Authentication of the call can be done inside the ISM
The latter is inspired by protocols that are trying to improve the trust assumptions of bringing Web2 data on-chain like Predicate and Opacity. This bounty would give message senders the ability to leverage these services but have a consistent interface for interacting with the world outside the chain + specifying the trust assumptions of that.
Sometimes smart contracts need to either read state from web2 apis, or may want web2 apis to induce a state transition on a smart contract. There are products such as Gelato Web3 Functions or Chainlink Functions which accomplish this. Interoperability is really just a specific subset of the general oracle problem, so it would be pretty interesting to see these kind of oracles expressed as such. This bounty calls for a PoC of such.
To call an API, you could imagine this being implemented:
domain
To read data from an API call, you could imagine the following:
handle
functionThe latter is inspired by protocols that are trying to improve the trust assumptions of bringing Web2 data on-chain like Predicate and Opacity. This bounty would give message senders the ability to leverage these services but have a consistent interface for interacting with the world outside the chain + specifying the trust assumptions of that.