Calling Enigma from within a secret contract

Hi,

Apologies if this has been asked before. Is there functionality available in the current release to submit a task to the Enigma network and get the results within a method in the secret contract, as opposed to doing this from the client side with web3? If this isn’t the case, will it be available in the next release? I’d like this primarily for passing the current block number to the Enigma callable, as well as for checking the message sender before executing the callable.

Hey, great question! In the current version that’s out, this unfortunately is not supported. In the next release, although you won’t be able to submit from a contract itself, there are far better security guarantees to address what you’re referring to. Task records will be stored on ETH and when the computation is run on the ENG network, the message sender can be validated. Hope that helps, happy to clarify if need be :slight_smile:

1 Like

Thanks for the explanation Adi. I do have a followup question or two.

Will the SputnikVM that the Core component executes in have access to the Ethereum mainnet in the next release? At that point, would I be able to use msg.sender and block.number like I would in a regular smart contract, or would there be some other method of obtaining those values?

1 Like

Apologies for dragging this up again, but I didn’t want to create a duplicate thread.

I’m not sure why I wrote " Calling Enigma from within a secret contract" in the title and description, I think I actually meant " Calling Enigma from within an Ethereum smart contract".

I just wanted to confirm whether or not it’s possible in the current Discovery release (or short term feature additions) to call the Enigma network directly from an Ethereum smart contract. I could see this being useful for acting as a trusted source of public information for timestamps or events. Ainsley mentioned that one of the complications here is deciding who pays the gas fee (in ENG, I assume), I’d be curious to know more about this as well as any other blockers.

cc @ainsley

1 Like

@crypto_mentions right now this is possible but this is something that we have in the roadmap. Currently reading timestamps or events can be done by a relayer / coordinator model