LinkableAnchor.sol¶
Description¶
An abstract contract that implements the linking functionality for bridging anchors across chains. This contract inherits all the methods of the base AnchorBase.sol
contract.
Constructor¶
Details
Signature
constructor(
IVerifier _verifier,
IHasher _hasher,
uint256 _denomination,
uint32 _merkleTreeHeight,
address _bridge,
address _admin,
address _handler,
uint8 _maxEdges
) AnchorBase(_verifier, _hasher, _denomination, _merkleTreeHeight, _maxEdges)
External Functions¶
Calls to deposits require a commitment, which is a hash of some secret values.
setHandler¶
Details
Signature
setHandler(address _handler)
Requires
- require(..., "sender is not the bridge")
setBridge¶
Details
Signature
setBridge(address _bridge)
Requires
- require(..., "sender is not the admin")
addEdge¶
Details
Signature
addEdge(
uint256 sourceChainID,
bytes32 root,
uint256 leafIndex
)
Requires
- require(..., "sender is not the handler")
- require(..., "This Anchor is at capacity")
Emits
EdgeAddition, RootHistoryUpdate
updateEdge¶
Details
Signature
updateEdge(
uint256 sourceChainID,
bytes32 root,
uint256 leafIndex
)
Requires
- require(..., "sender is not the handler")
- require(..., "Chain must be integrated from the bridge before updates")
- require(..., "New height must be greater")
Emits
EdgeUpdate, RootHistoryUpdate