Skip to content

Commit 1d77293

Browse files
committed
audit patches + improvement (#1600)
Signed-off-by: shankar <shankar@layerzerolabs.org>
1 parent 456f658 commit 1d77293

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

packages/ovault-evm/contracts/OVaultComposer.sol

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { OFTComposeMsgCodec } from "@layerzerolabs/oft-evm/contracts/libs/OFTCom
1414

1515
import { IOFTWithDecimalConversionRate as IOFT } from "./interfaces/IOFTWithDecimalConversionRate.sol";
1616
import { IOVaultComposer, FailedMessage, FailedState } from "./interfaces/IOVaultComposer.sol";
17+
import { IOFTWithDecimalConversionRate as IOFT } from "./interfaces/IOFTWithDecimalConversionRate.sol";
1718

1819
contract OVaultComposer is IOVaultComposer, ReentrancyGuard {
1920
using OFTComposeMsgCodec for bytes;
@@ -34,6 +35,11 @@ contract OVaultComposer is IOVaultComposer, ReentrancyGuard {
3435

3536
address public immutable REFUND_OVERPAY_ADDRESS;
3637

38+
address public immutable REFUND_OVERPAY_ADDRESS;
39+
40+
uint256 public immutable ASSET_DECIMAL_CONVERSION_RATE;
41+
uint256 public immutable SHARE_DECIMAL_CONVERSION_RATE;
42+
3743
mapping(bytes32 guid => FailedMessage) public failedMessages;
3844

3945
constructor(address _ovault, address _assetOFT, address _shareOFT, address _refundOverpayAddress) {

packages/ovault-evm/contracts/interfaces/IOVaultComposer.sol

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ interface IOVaultComposer is IOAppComposer {
4949
error CanNotRefund(bytes32 guid);
5050
error CanNotRetry(bytes32 guid);
5151
error CanNotSwap(bytes32 guid);
52-
5352
error NotEnoughTargetTokens(uint256 amountLD, uint256 minAmountLD);
5453
error NoMsgValueWhenSkippingRetry();
5554
error NoMsgValueOnSameChainOVaultAction();

packages/ovault-evm/test/composer/OVaultComposer_Base.t.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ contract OVaultComposerBaseTest is TestHelperOz5 {
4848
address public userB = makeAddr("userB");
4949
address public refundOverpayAddress = makeAddr("refundOverpayAddress");
5050

51+
address public refundOverpayAddress = makeAddr("refundOverpayAddress");
52+
5153
address public arbEndpoint;
5254
address public arbExecutor = makeAddr("arbExecutor");
5355
bytes public OPTIONS_LZRECEIVE_100k = OptionsBuilder.newOptions().addExecutorLzReceiveOption(100_000, 0);

0 commit comments

Comments
 (0)