diff --git a/contracts/src/FeeVault.sol b/contracts/src/FeeVault.sol index 932538b..7069258 100644 --- a/contracts/src/FeeVault.sol +++ b/contracts/src/FeeVault.sol @@ -130,4 +130,31 @@ contract FeeVault { hypNativeMinter = IHypNativeMinter(_hypNativeMinter); emit HypNativeMinterUpdated(_hypNativeMinter); } + + /// @notice Return the full configuration currently stored in the contract. + function getConfig() + external + view + returns ( + address _owner, + uint32 _destinationDomain, + bytes32 _recipientAddress, + uint256 _minimumAmount, + uint256 _callFee, + uint256 _bridgeShareBps, + address _otherRecipient, + address _hypNativeMinter + ) + { + return ( + owner, + destinationDomain, + recipientAddress, + minimumAmount, + callFee, + bridgeShareBps, + otherRecipient, + address(hypNativeMinter) + ); + } } diff --git a/contracts/test/FeeVault.t.sol b/contracts/test/FeeVault.t.sol index dbb4301..fdc379d 100644 --- a/contracts/test/FeeVault.t.sol +++ b/contracts/test/FeeVault.t.sol @@ -49,6 +49,28 @@ contract FeeVaultTest is Test { feeVault.setHypNativeMinter(address(mockMinter)); } + function test_GetConfig() public { + ( + address cfgOwner, + uint32 cfgDestination, + bytes32 cfgRecipient, + uint256 cfgMinAmount, + uint256 cfgCallFee, + uint256 cfgBridgeShare, + address cfgOtherRecipient, + address cfgHypNativeMinter + ) = feeVault.getConfig(); + + assertEq(cfgOwner, owner); + assertEq(cfgDestination, destination); + assertEq(cfgRecipient, recipient); + assertEq(cfgMinAmount, minAmount); + assertEq(cfgCallFee, fee); + assertEq(cfgBridgeShare, 10000); + assertEq(cfgOtherRecipient, otherRecipient); + assertEq(cfgHypNativeMinter, address(mockMinter)); + } + function test_Receive() public { uint256 amount = 1 ether; (bool success,) = address(feeVault).call{value: amount}("");