ERC-8087 Decryption Oracle: Encrypted Hashed Arguments and Calls


⚠️ Before you continue: Please read the Disclaimer.
By using this site, software, or contracts, you acknowledge that you have read and accepted it.


Introduction

The finmath call decryption-oracle project provides open source implementations of the ERC-8087 decryption oracle (for secure stateless decryption of function calls).

Interfaces

The interface to the decryption oracle proxy contract and the decryption oracle callback are available via npm at @finmath.net/encall.

Current Deployments   Try it on Remix

A decryption oracle contract is currently deployed on

Ethereum Mainnet

0x13E6464A85a63c9214a4F04cd942466F35D17E54

Polygon Mainnet

0x22a687a3a0F958AccC1395C4D134F297eaCa1B2B

Sepolia (Ethereum Testnet)

0x668a5e0eE0dD80F08AE7cf7D91Af84d6bB28f70D

Amoy (Polygon Testnet)

0x27aF9135aF9a7FEe7f9dde4d595E200B0c602576

Use these to explore and test the protocol.

Using the Decryption Oracle Contract

Send your request to an instance (address) of the decryption oracle contract using one of the following two functions…

interface ICallDecryptionOracle {
    // Encrypted arguments, but plain call descriptor (target contract)
    function requestCall(
        CallDescriptor            calldata callDescriptor,
        EncryptedHashedArguments  calldata encArgs,
        bytes                     calldata secondFactor
    ) external payable returns (uint256 requestId);

    // Encrypted arguments, and encrypted call descriptor
    function requestEncryptedCall(
        EncryptedCallDescriptor   calldata encCall,
        EncryptedHashedArguments  calldata encArgs,
        bytes                     calldata secondFactor
    ) external payable returns (uint256 requestId);
}

For a step-by-step introduction see the usage page.

IMPORTANT: Depending on the chain, the current test deployment may require a very small fee (≈ $0.01) to cover the gas cost and protect against over-use (feeCall, feeEncyptedCall return the current fee in POL or ETH wei). So if oracle is the above address, then you need to call decrypt via

oracle.requestCall{value: CallDecryptionOracle(payable(address(oracle))).feeCall()}(
  id, callDescriptor, encArgs, secondFactor
);

Standards (Protocols)

ICallDecryptionOracle

For the exact interface definition see the solidity page.

ERC-8087

See ERC 8087.

License

The code is distributed under the Apache License version 2.0, unless otherwise explicitly stated.