Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add LSP0 typeId for Value Received in Natspec comments for UniversalReceiver event #965

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/lsp0-contracts/contracts/LSP0ERC725Account.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ contract LSP0ERC725Account is LSP0ERC725AccountCore, Version {
* @param initialOwner The owner of the contract.
*
* @custom:events
* - {UniversalReceiver} event when funding the contract on deployment.
* - {UniversalReceiver} event with typeId {`LSP0ValueReceived`} when when funding the contract on deployment.
* - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}.
*/
constructor(address initialOwner) payable {
Expand Down
14 changes: 7 additions & 7 deletions packages/lsp0-contracts/contracts/LSP0ERC725AccountCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ abstract contract LSP0ERC725AccountCore is
* @custom:info This function internally delegates the handling of native tokens to the {universalReceiver} function
* passing `_TYPEID_LSP0_VALUE_RECEIVED` as typeId and an empty bytes array as received data.
*
* @custom:events Emits a {UniversalReceiver} event when the `universalReceiver` logic is executed upon receiving native tokens.
* * @custom:events Emits a {UniversalReceiver} event with typeId {`LSP0ValueReceived`} when the `universalReceiver` logic is executed upon receiving native tokens.
*/
receive() external payable virtual {
if (msg.value != 0) {
Expand Down Expand Up @@ -131,7 +131,7 @@ abstract contract LSP0ERC725AccountCore is
* @custom:info Whenever the call is associated with native tokens, the function will delegate the handling of native tokens internally to the {universalReceiver} function
* passing `_TYPEID_LSP0_VALUE_RECEIVED` as typeId and the calldata as received data, except when the native token will be sent directly to the extension.
*
* @custom:events {UniversalReceiver} event when receiving native tokens and extension function selector is not found or not payable.
* * @custom:events {UniversalReceiver} event with typeId {`LSP0ValueReceived`} when receiving native tokens and extension function selector is not found or not payable.
*/
// solhint-disable-next-line no-complex-fallback
fallback(
Expand Down Expand Up @@ -197,7 +197,7 @@ abstract contract LSP0ERC725AccountCore is
* @custom:events
* - {Executed} event for each call that uses under `operationType`: `CALL` (0), `STATICCALL` (3) and `DELEGATECALL` (4).
* - {ContractCreated} event, when a contract is created under `operationType`: `CREATE` (1) and `CREATE2` (2).
* - {UniversalReceiver} event when receiving native tokens.
* - {UniversalReceiver} event with typeId {`LSP0ValueReceived`} when receiving native tokens.
*/
function execute(
uint256 operationType,
Expand Down Expand Up @@ -261,7 +261,7 @@ abstract contract LSP0ERC725AccountCore is
* @custom:events
* - {Executed} event for each call that uses under `operationType`: `CALL` (0), `STATICCALL` (3) and `DELEGATECALL` (4). (each iteration)
* - {ContractCreated} event, when a contract is created under `operationType`: `CREATE` (1) and `CREATE2` (2) (each iteration)
* - {UniversalReceiver} event when receiving native tokens.
* - {UniversalReceiver} event with typeId {`LSP0ValueReceived`} when receiving native tokens.
*/
function executeBatch(
uint256[] memory operationsType,
Expand Down Expand Up @@ -321,7 +321,7 @@ abstract contract LSP0ERC725AccountCore is
* @custom:requirements Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner.
*
* @custom:events
* - {UniversalReceiver} event when receiving native tokens.
* - {UniversalReceiver} event with typeId {`LSP0ValueReceived`} when receiving native tokens.
* - {DataChanged} event.
*/
function setData(
Expand Down Expand Up @@ -364,7 +364,7 @@ abstract contract LSP0ERC725AccountCore is
* @custom:requirements Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner.
*
* @custom:events
* - {UniversalReceiver} event when receiving native tokens.
* - {UniversalReceiver} event with typeId {`LSP0ValueReceived`} when receiving native tokens.
* - {DataChanged} event. (on each iteration of setting data)
*/
function setDataBatch(
Expand Down Expand Up @@ -452,7 +452,7 @@ abstract contract LSP0ERC725AccountCore is
* @return returnedValues The ABI encoded return value of the LSP1UniversalReceiverDelegate call and the LSP1TypeIdDelegate call.
*
* @custom:events
* - {UniversalReceiver} when receiving native tokens.
* - {UniversalReceiver} with typeId {`LSP0ValueReceived`} when receiving native tokens.
* - {UniversalReceiver} event with the function parameters, call options, and the response of the UniversalReceiverDelegates (URD) contract that was called.
*/
function universalReceiver(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ contract LSP0ERC725AccountInit is LSP0ERC725AccountInitAbstract, Version {
* @param initialOwner The owner of the contract.
*
* @custom:events
* - {UniversalReceiver} event when funding the contract on deployment.
* - {UniversalReceiver} event with typeId `LSP0ValueReceived` when funding the contract on initialization.
* - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}.
*/
function initialize(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ abstract contract LSP0ERC725AccountInitAbstract is
* If you decide to add non-zero initial state to any of those contracts, you MUST initialize them here.
*
* @custom:events
* - {UniversalReceiver} event when funding the contract on deployment.
* - {UniversalReceiver} event with typeId `LSP0ValueReceived` when funding the contract on initialization.
* - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}.
*/
function _initialize(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface ILSP1UniversalReceiver {
*
* @param from The address of the EOA or smart contract that called the {universalReceiver(...)} function.
* @param value The amount sent to the {universalReceiver(...)} function.
* @param typeId A `bytes32` unique identifier (= _"hook"_)that describe the type of notification, information or transaction received by the contract. Can be related to a specific standard or a hook.
* @param typeId A `bytes32` unique identifier (= _"hook"_) that describe the type of notification, information or transaction received by the contract. Can be related to a specific standard or a hook.
* @param receivedData Any arbitrary data that was sent to the {universalReceiver(...)} function.
* @param returnedValue The value returned by the {universalReceiver(...)} function.
*/
Expand Down
2 changes: 2 additions & 0 deletions packages/lsp6-contracts/contracts/LSP6KeyManagerCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ abstract contract LSP6KeyManagerCore is
/**
* @inheritdoc ILSP25
*
* @custom:info For more details, see the internal function {`_getNonce`}.
*
* @custom:hint A signer can choose its channel number arbitrarily. The recommended practice is to:
* - use `channelId == 0` for transactions for which the ordering of execution matters.abi
*
Expand Down
Loading