Skip to content

Commit

Permalink
docs: update UniversalProfile Natspec
Browse files Browse the repository at this point in the history
  • Loading branch information
b00ste committed Aug 23, 2023
1 parent b31d3af commit 72ebaa6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
12 changes: 7 additions & 5 deletions contracts/UniversalProfile.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ import {
*/
contract UniversalProfile is LSP0ERC725Account {
/**
* @notice Deploying the contract with owner set to: `initialOwner`
* @dev Set `initialOwner` as the contract owner and set the `SupportedStandards:LSP3UniversalProfile` data key
* in the ERC725Y data key/value store. The `constructor` also allows funding the contract on deployment.
* @notice Deploying a UniversalProfile contract with owner set to address `initialOwner`.
*
* Emitted Events:
* - ValueReceived: when the contract is funded on deployment.
* @dev Set `initialOwner` as the contract owner and the `SupportedStandards:LSP3UniversalProfile` data key in the ERC725Y data key/value store. The `constructor` also allows funding the contract on deployment.
*
* @param initialOwner the owner of the contract
*
* @custom:events
* - {ValueReceived} event when funding the contract on deployment.
* - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}.
* - {DataChanged} event when setting the {_LSP3_SUPPORTED_STANDARDS_KEY}.
*/
constructor(address initialOwner) payable LSP0ERC725Account(initialOwner) {
// set data key SupportedStandards:LSP3UniversalProfile
Expand Down
12 changes: 6 additions & 6 deletions contracts/UniversalProfileInit.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ contract UniversalProfileInit is UniversalProfileInitAbstract {
}

/**
* @notice Initializing the contract owner to: `initialOwner`
* @dev Set `initialOwner` as the contract owner and set the `SupportedStandards:LSP3UniversalProfile` data key in the ERC725Y data key/value store.
* The `initialOwner` will then be allowed to call protected functions marked with the `onlyOwner` modifier.
* The `initialize(address)` function also allows funding the contract on initialization.
* @notice Initializing a UniversalProfile contract with owner set to address `initialOwner`.
*
* Emitted Events:
* - ValueReceived: when the contract is funded on initialization.
* @dev Set `initialOwner` as the contract owner and the `SupportedStandards:LSP3UniversalProfile` data key in the ERC725Y data key/value store. The `constructor` also allows funding the contract on deployment. The `initialOwner` will then be allowed to call protected functions marked with the `onlyOwner` modifier. The `initialize(address)` function also allows funding the contract on initialization.
*
* @param initialOwner the owner of the contract
*
* @custom:events
* - {ValueReceived} event when funding the contract on deployment.
* - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}.
*/
function initialize(
address initialOwner
Expand Down
11 changes: 9 additions & 2 deletions contracts/UniversalProfileInitAbstract.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,15 @@ abstract contract UniversalProfileInitAbstract is
LSP0ERC725AccountInitAbstract
{
/**
* @inheritdoc LSP0ERC725AccountInitAbstract
* @dev Set the `SupportedStandards:LSP3UniversalProfile` data key in the ERC725Y data key/value store.
* @dev Set `initialOwner` as the contract owner and the `SupportedStandards:LSP3UniversalProfile` data key in the ERC725Y data key/value store.
*
* @param initialOwner The owner of the contract.
*
* @custom:warning ERC725X & ERC725Y parent contracts are not initialised as they don't have non-zero initial state. If you decide to add non-zero initial state to any of those contracts, you must initialize them here.
*
* @custom:events
* - {ValueReceived} event when funding the contract on deployment.
* - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}.
*/
function _initialize(
address initialOwner
Expand Down

0 comments on commit 72ebaa6

Please sign in to comment.