Skip to content

Commit

Permalink
feat: update zevm connector to accept zeta in onreceive
Browse files Browse the repository at this point in the history
  • Loading branch information
andresaiello committed Apr 18, 2024
1 parent 4be6fd4 commit 09da324
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 35 deletions.
4 changes: 2 additions & 2 deletions contracts/zevm/ZetaConnectorZEVM.sol
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ contract ZetaConnectorZEVM {
uint256 zetaValue,
bytes calldata message,
bytes32 internalSendHash
) external onlyFungibleModule {
) external payable onlyFungibleModule {
IWETH9(wzeta).deposit{value: zetaValue}();
if (!IWETH9(wzeta).transferFrom(address(this), destinationAddress, zetaValue)) revert WZETATransferFailed();

Expand All @@ -188,7 +188,7 @@ contract ZetaConnectorZEVM {
uint256 remainingZetaValue,
bytes calldata message,
bytes32 internalSendHash
) external onlyFungibleModule {
) external payable onlyFungibleModule {
IWETH9(wzeta).deposit{value: remainingZetaValue}();
if (!IWETH9(wzeta).transferFrom(address(this), zetaTxSenderAddress, remainingZetaValue))
revert WZETATransferFailed();
Expand Down
Loading

0 comments on commit 09da324

Please sign in to comment.