Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ERCS/erc-7573.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ The smart contract implementing `IDecryptionContract`, decrypts one of two keys

In addtion there are to interface that standardize the communication with external decryption oracle(s).

The interface`IDecryptionOracle.sol` is implemented by a decryption oracle proxy contract.
The interface `IDecryptionOracleCallback.sol` has to be implemented by a callback receiving the decrypted key.
The interface`IKeyDecryptionOracle.sol` is implemented by a decryption oracle proxy contract.
The interface `IKeyDecryptionOracleCallback.sol` has to be implemented by a callback receiving the decrypted key.

## Motivation

Expand Down
4 changes: 2 additions & 2 deletions assets/erc-7573/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ The smart contract implementing `IDecryptionContract`, decrypts one of two keys

#### Decryption Oracle

- `contracts/IDecryptionOracle.sol` - Interface implemented by a decryption oracle proxy contract.
- `contracts/IDecryptionOracleCallback.sol` - Interface to be implemented by a callback receiving the decrypted key.
- `contracts/IKeyDecryptionOracle.sol` - Interface implemented by a decryption oracle proxy contract.
- `contracts/IKeyDecryptionOracleCallback.sol` - Interface to be implemented by a callback receiving the decrypted key.

### Documentation

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// SPDX-License-Identifier: CC0-1.0
pragma solidity >=0.8.0 <0.9.0;

import "./IDecryptionOracleCallback.sol";
import "./IKeyDecryptionOracleCallback.sol";

/*------------------------------------------- DESCRIPTION ------------------------------------------------------------*/

/**
* @title ERC-7573 Decryption Oracle Contract - a bridge to an external decryption oracle.
* @dev Interface specification for a smart contract that performs decryption (by bridging to an external oracle).
*
* See documentation for details.
* @author Christian Fries.
* @notice See documentation for details.
*/
interface IDecryptionOracle {
interface IKeyDecryptionOracle {

/*------------------------------------------- EVENTS -------------------------------------------------------------*/

Expand All @@ -24,7 +24,7 @@ interface IDecryptionOracle {
* @param transaction Transaction specification to be verified against the key.
* @param requestId Correlation id for the fullfillmen
*/
event DecryptionRequested(address indexed sender, uint256 id, bytes encryptedKey, IDecryptionOracleCallback indexed callback, bytes transaction, uint256 indexed requestId);
event DecryptionRequested(address indexed sender, uint256 id, bytes encryptedKey, IKeyDecryptionOracleCallback indexed callback, bytes transaction, uint256 indexed requestId);

/**
* @dev Emitted when a verification is requested (issued by requestVerifyEncryptedKey).
Expand All @@ -34,7 +34,7 @@ interface IDecryptionOracle {
* @param callback Receiver of the verification.
* @param requestId Correlation id for the fullfillmen
*/
event VerificationRequested(address indexed sender, uint256 id, bytes encryptedKey, IDecryptionOracleCallback indexed callback, uint256 indexed requestId);
event VerificationRequested(address indexed sender, uint256 id, bytes encryptedKey, IKeyDecryptionOracleCallback indexed callback, uint256 indexed requestId);

/**
* @dev Emitted when a encrypted key generation is requested (issued by requestGenerateEncryptedHashedKey).
Expand All @@ -45,7 +45,7 @@ interface IDecryptionOracle {
* @param transaction Transaction specification to be verified against the key.
* @param requestId Correlation id for the fullfillmen
*/
event EncryptedHashedKeyGenerationRequested(address indexed sender, uint256 id, IDecryptionOracleCallback indexed callback, address receiverContract, bytes transaction, uint256 indexed requestId);
event EncryptedHashedKeyGenerationRequested(address indexed sender, uint256 id, IKeyDecryptionOracleCallback indexed callback, address receiverContract, bytes transaction, uint256 indexed requestId);

/*------------------------------------------- FUNCTIONALITY: REQUESTS --------------------------------------------*/

Expand All @@ -61,7 +61,7 @@ interface IDecryptionOracle {
* @param callback The callback contract. If validated the decrypted key will be passed to releaseKey function.
* @param transaction General purpose transaction identifier.
*/
function requestDecrypt(uint256 id, bytes memory encryptedKey, IDecryptionOracleCallback callback, bytes memory transaction) external payable;
function requestDecrypt(uint256 id, bytes memory encryptedKey, IKeyDecryptionOracleCallback callback, bytes memory transaction) external payable;

/**
* @notice The functions performs a verification of the given encryptedKey, that this
Expand All @@ -75,7 +75,7 @@ interface IDecryptionOracle {
* @param encryptedKey Encryption of a key
* @param callback The callback contract. If validated the decrypted key will be passed to releaseKey function.
*/
function requestVerifyEncryptedKey(uint256 id, bytes memory encryptedKey, IDecryptionOracleCallback callback) external payable;
function requestVerifyEncryptedKey(uint256 id, bytes memory encryptedKey, IKeyDecryptionOracleCallback callback) external payable;

/**
* @notice The functions performs a generation of an encryptedKey and a hash
Expand All @@ -89,7 +89,7 @@ interface IDecryptionOracle {
* @param receiverContract Contract that is eligible to receive the decryption.
* @param transaction General purpose transaction identifier.
*/
function requestGenerateEncryptedHashedKey(uint256 id, IDecryptionOracleCallback callback, address receiverContract, bytes memory transaction) external payable;
function requestGenerateEncryptedHashedKey(uint256 id, IKeyDecryptionOracleCallback callback, address receiverContract, bytes memory transaction) external payable;

/*------------------------------------------- FUNCTIONALITY: FULFILLMENT (should be guarded by onlyOracle) -------*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ pragma solidity >=0.8.0 <0.9.0;
/**
* @title ERC-7573 Decryption Oracle Callback Contract - the callback from an external decryption oracle.
* @dev Interface specification for a smart contract that performs decryption (by bridging to an external oracle).
*
* See documentation for details.
* @author Christian Fries.
* @notice See documentation for details.
*/
interface IDecryptionOracleCallback {
interface IKeyDecryptionOracleCallback {

/*------------------------------------------- EVENTS ---------------------------------------------------------------------------------------*/

Expand Down
2 changes: 1 addition & 1 deletion assets/erc-7573/doc/multi-party-dvp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions assets/erc-7573/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@finmath.net/dvp",
"version": "0.6.0",
"version": "0.7.0",
"description": "Solidity Conditional-upon-Transfer-Decryption for DvP and nDvP",
"author": "Christian Fries, Peter Kohl-Landgraf",
"license": "ISC",
Expand Down Expand Up @@ -30,10 +30,11 @@
"keywords": [
"Delivery versus Payment",
"HTLC",
"EIP-7573"
"EIP-7573",
"Decryption Oracle"
],
"bugs": {
"url": "https://github.com/finmath/finmath-smart-derivative-contract/issues"
"url": "https://gitlab.com/finmath/finmath-decryption-oracle/-/issues"
},
"publishConfig": {
"access": "public"
Expand Down
Loading