From 79e222b9e853ec2aef0223cd39b4070f5b03f544 Mon Sep 17 00:00:00 2001 From: Gabriel Fournier Date: Mon, 3 Jun 2024 17:04:39 +0200 Subject: [PATCH] set new positon of view function based on storage --- contracts/beacon/Voucher.sol | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/contracts/beacon/Voucher.sol b/contracts/beacon/Voucher.sol index 590bf42..1516b21 100644 --- a/contracts/beacon/Voucher.sol +++ b/contracts/beacon/Voucher.sol @@ -247,12 +247,11 @@ contract Voucher is Initializable, IVoucher { } /** - * Retrieve the type of the voucher. - * @return voucherType The type of the voucher. + * @dev Returns the address of the current owner. */ - function getType() external view returns (uint256) { + function owner() public view returns (address) { VoucherStorage storage $ = _getVoucherStorage(); - return $._type; + return $._owner; } /** @@ -264,6 +263,15 @@ contract Voucher is Initializable, IVoucher { return $._expiration; } + /** + * Retrieve the type of the voucher. + * @return voucherType The type of the voucher. + */ + function getType() external view returns (uint256) { + VoucherStorage storage $ = _getVoucherStorage(); + return $._type; + } + /** * Get voucher balance. */ @@ -299,14 +307,6 @@ contract Voucher is Initializable, IVoucher { return $._voucherHub; } - /** - * @dev Returns the address of the current owner. - */ - function owner() public view returns (address) { - VoucherStorage storage $ = _getVoucherStorage(); - return $._owner; - } - /** * Internal function to set authorization for an account. * @param account The account to set authorization for.