Skip to content

WEBBAnchor2.sol

Implementation

Description

A contract that implements the appropriate remaining functions for processing deposits and withdrawals for an AnchorBase2.sol. This contract inherits all the methods of the base LinkableAnchor2.sol and AnchorBase2.sol contracts.

Variables

token

Type: public immutable token

Constructor

Details

Signature

constructor( IVerifier _verifier, IPoseidonT3 _hasher, uint256 _denomination, uint32 _merkleTreeHeight, uint32 _chainID, IMintableCompToken _token, address _bridge, address _admin, address _handler ) LinkableAnchor2(_verifier, _hasher, _denomination, _merkleTreeHeight, _chainID, _bridge, _admin, _handler)

Internal Functions

Calls to deposits require a commitment, which is a hash of some secret values.

_processDeposit

Details

Signature

_processDeposit()

Requires

  • require(msg.value == 0, "ETH value is supposed to be 0 for ERC20 instance")

_processWithdraw

Details

Signature

_processWithdraw( address payable _recipient, address payable _relayer, uint256 _fee, uint256 _refund )

Requires

  • require(msg.value == _refund, "Incorrect refund amount received by the contract")