From 52d68115568f040b6311cf5d9b56d8492b64f03d Mon Sep 17 00:00:00 2001 From: gskapka Date: Thu, 8 Feb 2024 14:20:55 +0000 Subject: [PATCH] feat(router-contract): <- adds event to emit metadata details --- contracts/PTokensRouter.sol | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contracts/PTokensRouter.sol b/contracts/PTokensRouter.sol index 6040ef5..d4e9f81 100644 --- a/contracts/PTokensRouter.sol +++ b/contracts/PTokensRouter.sol @@ -26,6 +26,8 @@ contract PTokensRouter is ConvertStringToAddress, PTokensRouterStorage { + event Metadata(bytes, bytes4, string, bytes4, string); + function initialize ( address safeVaultAddress ) @@ -170,6 +172,10 @@ contract PTokensRouter is string memory originAddress, string memory destinationAddress ) = decodeParamsFromUserData(_userData); + // NOTE: We emit this event to allow v2 cores to ready it & thus pass through origin chain tx + // information no atter what type of bridge crossing this is. + emit Metadata(userData, originChainId, originAddress, destinationChainId, destinationAddress); + address tokenAddress = msg.sender; // NOTE: We give the fee contract an allowance up to the total amount so that it can transfer fees...