From c5e18f9c9aadd71ddce6add8b5d8718b93e5526f Mon Sep 17 00:00:00 2001 From: Gabriel Fournier Date: Wed, 29 May 2024 11:32:32 +0200 Subject: [PATCH] cleaning so todos --- contracts/VoucherHub.sol | 2 +- contracts/beacon/Voucher.sol | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/contracts/VoucherHub.sol b/contracts/VoucherHub.sol index 1246371..79e4479 100644 --- a/contracts/VoucherHub.sol +++ b/contracts/VoucherHub.sol @@ -237,7 +237,7 @@ contract VoucherHub is */ function getVoucherType( uint256 id - ) public view whenVoucherTypeExists(id) returns (VoucherType memory) { + ) external view whenVoucherTypeExists(id) returns (VoucherType memory) { VoucherHubStorage storage $ = _getVoucherHubStorage(); return $.voucherTypes[id]; } diff --git a/contracts/beacon/Voucher.sol b/contracts/beacon/Voucher.sol index 4704205..089e879 100644 --- a/contracts/beacon/Voucher.sol +++ b/contracts/beacon/Voucher.sol @@ -104,9 +104,7 @@ contract Voucher is OwnableUpgradeable, IVoucher { IexecLibOrders_v5.DatasetOrder calldata datasetOrder, IexecLibOrders_v5.WorkerpoolOrder calldata workerpoolOrder, IexecLibOrders_v5.RequestOrder calldata requestOrder - ) external returns (bytes32 dealId) { - // TODO add onlyAuthorized - // TODO check expiration + ) external onlyAuthorized onlyNotExpired returns (bytes32 dealId) { VoucherStorage storage $ = _getVoucherStorage(); IVoucherHub voucherHub = IVoucherHub($._voucherHub); address iexecPoco = voucherHub.getIexecPoco();