Skip to content

Commit

Permalink
Use Address32 in XLogData
Browse files Browse the repository at this point in the history
  • Loading branch information
larskuhtz committed Jan 28, 2025
1 parent 6db3f9f commit c1485a1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Chainweb/PayloadProvider/EVM/SPV.hs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import GHC.Generics (Generic)
import GHC.TypeNats
import Data.Aeson
import Ethereum.Utils (HexBytes(..))
import Chainweb.PayloadProvider.EVM.Utils hiding (ChainId)

-- -------------------------------------------------------------------------- --
-- Utils
Expand Down Expand Up @@ -117,9 +118,9 @@ newtype XChainData = XChainData B.ByteString
--
data XLogData = XLogData
{ _xLogDataOperationName :: !XChainOperationName
, _xLogDataSenderAddress :: !Address
, _xLogDataSenderAddress :: !Address32
, _xLogDataTargetChain :: !ChainId
, _xLogDataTargetContract :: !Address
, _xLogDataTargetContract :: !Address32
, _xLogDataMessage :: !XChainData
}
deriving (Show, Eq, Generic)
Expand All @@ -141,9 +142,9 @@ parseXLogData v h e = do

return XLogData
{ _xLogDataOperationName = operationName
, _xLogDataSenderAddress = _logEntryAddress e
, _xLogDataSenderAddress = toAddress32 $ _logEntryAddress e
, _xLogDataTargetChain = targetChain
, _xLogDataTargetContract = Address $ dropN $ t2
, _xLogDataTargetContract = Address32 t2
, _xLogDataMessage = XChainData $ bytes $ _logEntryData e
}
where
Expand Down

0 comments on commit c1485a1

Please sign in to comment.