Skip to content

Commit

Permalink
docs: Add more NatSpec comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mgnfy-view committed Jan 11, 2025
1 parent 58d2aac commit 3a9e8ea
Show file tree
Hide file tree
Showing 5 changed files with 206 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/DestinationPortal.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,23 @@ import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";

import { IDestinationPortal } from "./interfaces/IDestinationPortal.sol";

/// @title DestinationPortal.
/// @author mgnfy-view.
/// @notice This contract will be deployed on destination chains, and hooked up
/// with the source portal. This allows seamless, native bridging of the stablecoin
/// accross multiple evm-compatible networks supported by LayerZero.
contract DestinationPortal is OFT, IDestinationPortal {
uint8 private constant DECIMALS = 6;

/// @notice Sets the ERC20 metadata, layer zero endpoint, and owner contract.
/// @param _lzEndpoint The layer zero endpoint address that enables cross-chain OApp communications.
/// @param _owner The owner address.
constructor(address _lzEndpoint, address _owner) OFT("Portal", "PORTAL", _lzEndpoint, _owner) Ownable(_owner) {
if (_lzEndpoint == address(0) || _owner == address(0)) revert DestinationPortal__AddressZero();
}

/// @notice Gets the ERC20's decimals (6).
/// @return The token decimals.
function decimals() public pure override returns (uint8) {
return DECIMALS;
}
Expand Down
6 changes: 6 additions & 0 deletions src/GlobalOwnable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ pragma solidity 0.8.24;

import { Ownable, Ownable2Step } from "@openzeppelin/contracts/access/Ownable2Step.sol";

/// @title GlobalOwnable.
/// @author mgnfy-view.
/// @notice This contract owns the `AssetRegistry`, `PythOracle`, and `SourcePortal`
/// contracts.
contract GlobalOwnable is Ownable2Step {
/// @notice Sets the initial global owner.
/// @param _owner The initial global owner address.
constructor(address _owner) Ownable(_owner) { }
}
Loading

0 comments on commit 3a9e8ea

Please sign in to comment.