This library adds interpretation of our SpanningAddress as follows:
31 27 19 0
|-----+---------+--------------------|
+The bottom 0-19 bytes are the local address
+Bytes 20-27 are left empty for future expansion
+Bytes 28 - 31 are the domain ID
+Byte 20 - the number of blocks the protocol
will wait before settling the transaction
function equals(bytes32 first, bytes32 second) public pure returns (bool)
Determines if two Spanning Addresses are equal. Note: This function only considers LegacyAddress and Domain for equality Note: Thus, equals() can return true even if first != second
Name
Type
Description
first
bytes32
- the first Spanning Address
second
bytes32
- the second Spanning Address
Name
Type
Description
[0]
bool
bool - true if the two Spanning Addresses are equal
function packAddressData(bytes32 existingAddress, uint8 payload, uint8 index) public pure returns (bytes32)
_Packs data into an existing Spanning Address
This can be used to add routing parameters into a Spanning Addresses buffer space.
Example to specify a message waits numFinalityBlocks before settling: newSpanningAddress = packAddressData(prevSpanningAddress, numFinalityBlocks, 20)_