I'm trying to read data from Smart Contract B on Blockchain B using Smart Contract A on Blockchain A. For example, Smart Contract B has a function getPlayerAddressesAndBalance
that returns data like [[player1, 50]]
. I want to access this data from Smart Contract A on Blockchain A.
I understand this isn't typically possible, but I thought it might be achievable using oracles like Chainlink. However, after reviewing the Chainlink documentation, I didn't find a clear solution. Did I miss something in the Chainlink docs, or are there other oracles that support this functionality?
I looked into Chainlink CCIP, but it doesn't quite fit my needs. I'm looking for a solution to make a read and get the result.
Additionally, if this is possible with Chainlink, what would the cost per call be?
Details:
I need a mechanism to resolve disputes. The workflow would be:
- User_A calls a function on the smart contract on Chain_A, let's say
setUsername
. - User_B calls the contract on Chain_B, providing the username that User_A setted with the previous call.
- User_A has 1 minute to inform the Smart Contract on Chain_B if the username provided by User_B is incorrect.
- If a dispute arises, I want to read the actual username from Chain A through an oracle or some other means.
I only want to perform this read operation when necessary, to avoid unnecessary service fees, as disputes will be infrequent. Therefore, it's not practical for me to always call the Smart Contract on Chain_B through CCIP whenever a user interacts with setUsername
on Chain_A.