Skip to content

Commit

Permalink
Merge pull request #19 from medusa-network/fix/contract-bug
Browse files Browse the repository at this point in the history
Fix bug in contract and make it consistent with docs
  • Loading branch information
jaeaster authored Jan 26, 2023
2 parents ed2fccf + 0967f9c commit 82f1af1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/contracts/OnlyFiles.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ interface IEncryptionClient {
function oracleResult(uint256 requestId, Ciphertext calldata _cipher) external;
}

interface IOracle {
interface IEncryptionOracle {
/// @notice submit a ciphertext that can be retrieved at the given link and
/// has been created by this encryptor address. The ciphertext proof is checked
/// and if correct, being signalled to Medusa.
function submitCiphertext(Ciphertext calldata _cipher, bytes calldata _link, address _encryptor)
external
returns (uint256);

function requestReencryption(uint256 _cipherId, G1Point calldata _publickey) external returns (uint256);
}

error CallbackNotAuthorized();
Expand All @@ -51,7 +53,7 @@ struct Listing {

contract OnlyFiles is IEncryptionClient, PullPayment {
/// @notice The Encryption Oracle Instance
IOracle public oracle;
IEncryptionOracle public oracle;

/// @notice A mapping from cipherId to listing
mapping(uint256 => Listing) public listings;
Expand All @@ -69,7 +71,7 @@ contract OnlyFiles is IEncryptionClient, PullPayment {
_;
}

constructor(Oracle _oracle) {
constructor(IEncryptionOracle _oracle) {
oracle = _oracle;
}

Expand Down

1 comment on commit 82f1af1

@vercel
Copy link

@vercel vercel bot commented on 82f1af1 Jan 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.