Skip to content

Commit

Permalink
comment updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Lam committed Nov 9, 2023
1 parent 7e53c8f commit 3d32cec
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions contracts/src/Teleporter/upgrades/TeleporterRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ contract TeleporterRegistry {
}

/**
* @dev Gets and verifies a Warp off-chain message, and adds the new protocol version
* address to the registry.
* @dev Gets and verifies a Warp off-chain message, and adds the new version to procotol address mapping,
* specified in the Warp off-chain message, to the registry.
* If a version is greater than the current latest version, it will be set as the latest version.
* If a version is less than the current latest version, it is added to the registry, but
* doesn't change the latest version.
Expand All @@ -74,11 +74,7 @@ contract TeleporterRegistry {
* - a valid Warp off-chain message must be provided.
* - source chain ID must be the same as the blockchain ID of the registry.
* - origin sender address must be the same as the `VALIDATORS_SOURCE_ADDRESS`.
* - destination chain ID must be the same as the blockchain ID of the registry.
* - destination address must be the same as the address of the registry.
* - version must not be zero.
* - version must not already be registered.
* - protocol address must not be zero address.
* - destination address must be the same as the address of this registry.
*/
function addProtocolVersion(uint32 messageIndex) external {
// Get and validate for a Warp off-chain message.
Expand Down Expand Up @@ -164,7 +160,7 @@ contract TeleporterRegistry {
* Emits a {AddProtocolVersion} event when successful.
* Note: `protocolAddress` doesn't have to be a contract address, this is primarily
* to support the case we want to register a new protocol address meant for a security patch
* before the contract is deployed, to prevent the vulnerabilitiy from being exposed before registry update.
* before the contract is deployed, to prevent the vulnerabilitiy from being exposed before the registry update.
* Requirements:
*
* - `version` is not zero
Expand Down

0 comments on commit 3d32cec

Please sign in to comment.