AURORA-to-NEAR coross- contract call possible

Make Aurora-to-NEAR cross-contract calls possible.

It is currently possible (though undocumented) to call smart contracts deployed inside Aurora from smart contracts deployed in the NEAR base runtime. However, it is currently impossible for contracts on Aurora to call contracts on NEAR. The purpose of this challenge is to make Aurora-to-NEAR cross-contract calls possible.

The specifics of the technical solution are up to the developer creating a submission for this challenge, however you may consider modelling it after the exit-to-near custom EVM precompile which is used to move ETH from Aurora to NEAR. This solution would look something like the following:

  • Create a new custom precompile (say call_to_near)
  • Create a new private method on the engine contract (say near_callback) which can resume the contract which called the call_to_near precompile, including the result of the promise.
  • The precompile can create a promise which performs the desired cross-contract call, and uses the callback to process the result.
  • Note: the promise should not be immediately created by the precompile, but instead done at the end of a successful transaction to take the possibility of reverting in the EVM into account.
1 Like

See also Cross contract calls · Discussion #291 · aurora-is-near/aurora-engine · GitHub

1 Like