Anchor.sol¶
Description¶
A contrac that implements the appropriate remaining functions for processing deposits and withdrawals for an AnchorBase.sol
. This contract inherits all the methods of the base LinkableAnchor.sol
and AnchorBase.sol
contracts.
Variables¶
token¶
Type: public immutable token
Constructor¶
Details
Signature
constructor(
IVerifier _verifier,
IPoseidonT3 _hasher,
uint256 _denomination,
uint32 _merkleTreeHeight,
ITokenWrapper _token,
address _bridge,
address _admin,
address _handler,
uint8 _maxEdges
) LinkableAnchor(_verifier, _hasher, _denomination, _merkleTreeHeight, _bridge, _admin, _handler, _maxEdges)
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")