ToolszkEVMArchitectureHigh levelSmart contractsApiLib

DepositContractV2.sol

This contract is used by the contract. It inherits the and adds the logic to calculate the leaf of the exit tree. ## Functions ### Given the leaf data it return

This contract is used by the PolygonZkEVMBridge contract. It inherits the DepositContractBase and adds the logic to calculate the leaf of the exit tree.

Functions

getLeafValue

Given the leaf data it returns the leaf value.

  function getLeafValue(
    uint8 leafType,
    uint32 originNetwork,
    address originAddress,
    uint32 destinationNetwork,
    address destinationAddress,
    uint256 amount,
    bytes32 metadataHash
  ) public returns (bytes32)
Parameters
NameTypeDescription
leafTypeuint8Leaf type --> [0] transfer Ether / ERC20 tokens, [1] message
originNetworkuint32Origin Network.
originAddressaddress[0] Origin token address, 0 address is reserved for ether, [1] msg.sender of the message.
destinationNetworkuint32Destination network.
destinationAddressaddressDestination address.
amountuint256[0] Amount of tokens/ether, [1] Amount of ether.
metadataHashbytes32Hash of the metadata.
Edit on GitHub

Last updated on