From 5f8fe9f9843d4ecd054fc961a7a90148720114d1 Mon Sep 17 00:00:00 2001 From: Purva-Chaudhari <48947123+Purva-Chaudhari@users.noreply.github.com> Date: Fri, 29 Nov 2024 11:04:29 -0500 Subject: [PATCH] add flight class (#101) --- plume/src/Faucet.sol | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plume/src/Faucet.sol b/plume/src/Faucet.sol index 68784d1..67633c5 100644 --- a/plume/src/Faucet.sol +++ b/plume/src/Faucet.sol @@ -118,9 +118,9 @@ contract Faucet is Initializable, UUPSUpgradeable { } /// @notice Must pass in a message signed by the owner to call this function - modifier onlySignedByOwner(string calldata token, bytes32 salt, bytes calldata signature) { + modifier onlySignedByOwner(string calldata token, uint256 flightClass, bytes32 salt, bytes calldata signature) { FaucetStorage storage $ = _getFaucetStorage(); - bytes32 message = keccak256(abi.encodePacked(msg.sender, token, salt)); + bytes32 message = keccak256(abi.encodePacked(msg.sender, token, flightClass, salt)); if ($.usedNonces[message]) { revert InvalidNonce(); @@ -192,9 +192,10 @@ contract Faucet is Initializable, UUPSUpgradeable { */ function getToken( string calldata token, + uint256 flightClass, bytes32 salt, bytes calldata signature - ) external onlySignedByOwner(token, salt, signature) { + ) external onlySignedByOwner(token, flightClass, salt, signature) { FaucetStorage storage $ = _getFaucetStorage(); address tokenAddress = $.tokens[token]; uint256 amount = $.dripAmounts[tokenAddress];