Function: _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256)
This function validates token transfers by checking expiration status, transfer locks, and global transfer blocks. It initiates cross-chain ownership transfer from the tokenization chain to Doma chain via proxy contract and performs ERC-721-C validation for transfers between owners.
Inputs
from
Control: Full.
Constraints: N/A.
Impact: Used to determine transfer type (mint/burn/transfer) and as source address for cross-chain ownership transfer.
to
Control: Full.
Constraints: N/A.
Impact: Used to determine transfer type (mint/burn/transfer) and as destination address for cross-chain ownership transfer.
firstTokenId
Control: Full.
Constraints: Checked for expiration via
_isTokenExpired()
, transfer lock via_transferLocks
, and global block viablockAllTransfers
.Impact: Ensures only valid, nonexpired, and unlocked tokens can be transferred and identifies the token for cross-chain ownership updates.
Branches and code coverage (including function calls)
Intended branches
Negative behavior