# Calling Enigma from within a secret contract

**URL:** <https://forum.scrt.network/t/calling-enigma-from-within-a-secret-contract/474>\
**Category:** Uncategorized\
**Created:** [November 23, 2018, 8:19pm UTC](https://forum.scrt.network/t/calling-enigma-from-within-a-secret-contract/474 "2018-11-23T20:19:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![crypto\_mentions](https://avatars.discourse-cdn.com/v4/letter/c/67e7ee/32.png) [@crypto\_mentions](https://forum.scrt.network/u/crypto_mentions)\
**Post date:** [November 23, 2018, 8:19pm UTC](https://forum.scrt.network/t/calling-enigma-from-within-a-secret-contract/474/1 "2018-11-23T20:19:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![adi](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@adi](https://forum.scrt.network/u/adi)\
**Post date:** [November 27, 2018, 7:53am UTC](https://forum.scrt.network/t/calling-enigma-from-within-a-secret-contract/474/2 "2018-11-27T07:53:00Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![crypto\_mentions](https://avatars.discourse-cdn.com/v4/letter/c/67e7ee/32.png) [@crypto\_mentions](https://forum.scrt.network/u/crypto_mentions)\
**Post date:** [November 30, 2018, 4:46am UTC](https://forum.scrt.network/t/calling-enigma-from-within-a-secret-contract/474/3 "2018-11-30T04:46:56Z")

</div>

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](https://enigma.co/protocol/AboutThisRelease.html?highlight=SputnikVM) 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?

---

<div class="post-metadata">

**Author:** ![crypto\_mentions](https://avatars.discourse-cdn.com/v4/letter/c/67e7ee/32.png) [@crypto\_mentions](https://forum.scrt.network/u/crypto_mentions)\
**Post date:** [June 20, 2019, 2:04am UTC](https://forum.scrt.network/t/calling-enigma-from-within-a-secret-contract/474/4 "2019-06-20T02:04:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![can](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/can/32/596_2.png) [@can](https://forum.scrt.network/u/can)\
**Post date:** [June 20, 2019, 3:07am UTC](https://forum.scrt.network/t/calling-enigma-from-within-a-secret-contract/474/5 "2019-06-20T03:07:43Z")

</div>

@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
