Skip to content

Commit

Permalink
feat(router-contract): <- adds event to emit metadata details
Browse files Browse the repository at this point in the history
  • Loading branch information
gskapka committed Feb 8, 2024
1 parent 8aecde1 commit 52d6811
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions contracts/PTokensRouter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ contract PTokensRouter is
ConvertStringToAddress,
PTokensRouterStorage
{
event Metadata(bytes, bytes4, string, bytes4, string);

function initialize (
address safeVaultAddress
)
Expand Down Expand Up @@ -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...
Expand Down

0 comments on commit 52d6811

Please sign in to comment.