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

feat!: add LSP11 package #918

Merged
merged 8 commits into from
Jul 29, 2024
Merged

feat!: add LSP11 package #918

merged 8 commits into from
Jul 29, 2024

Conversation

YamenMerhi
Copy link
Member

@YamenMerhi YamenMerhi commented Mar 7, 2024

What does this PR introduce?

🚀 Feature

  • Adding LSP11

PR Checklist

  • Wrote Tests
  • Wrote & Generated Documentation (readme/natspec/dodoc)
  • Ran npm run lint && npm run lint:solidity (solhint)
  • Ran npm run format (prettier)
  • Ran npm run build
  • Ran npm run test

@YamenMerhi YamenMerhi marked this pull request as ready for review March 26, 2024 11:14
Copy link
Member

@CJ42 CJ42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added first round of review.

You also need to register the package in the release-please-config.json file.

},
"packages/lsp17contractextension-contracts": {
"component": "lsp17contractextension-contracts",
"package-name": "@lukso/lsp17contractextension-contracts",
"include-component-in-tag": true,
"release-type": "node",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": false,
"draft": false,
"prerelease-type": "rc",
"extra-files": [
"packages/lsp17contractextension-contracts/contracts/Version.sol"
]
},
"packages/lsp23-contracts": {
"component": "lsp23-contracts",
"package-name": "@lukso/lsp23-contracts",
"include-component-in-tag": true,
"release-type": "node",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": false,
"draft": false,
"prerelease-type": "rc"
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}

packages/lsp11-contracts/README.md Show resolved Hide resolved
packages/lsp11-contracts/README.md Outdated Show resolved Hide resolved
packages/lsp11-contracts/contracts/LSP11Errors.sol Outdated Show resolved Hide resolved
packages/lsp11-contracts/hardhat.config.ts Outdated Show resolved Hide resolved
packages/lsp11-contracts/package.json Outdated Show resolved Hide resolved
packages/lsp11-contracts/package.json Show resolved Hide resolved
packages/lsp11-contracts/package.json Outdated Show resolved Hide resolved
Copy link
Member

@CJ42 CJ42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added 2nd round of review for the Solidity code

packages/lsp11-contracts/contracts/LSP11SocialRecovery.sol Outdated Show resolved Hide resolved

// Errors
// solhint-disable no-global-import
import "./LSP11Errors.sol";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here since there are so many, the specific import syntax would be quite big, so maybe we could do:

Suggested change
import "./LSP11Errors.sol";
import ./LSP11Errors.sol" as Errors;

And then reference like that:

revert Errors.NotAGuardian(...)

wdyt?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the value in adding it

using ECDSA for *;

/// @dev The default recovery delay set to 40 minutes.
uint256 private constant _DEFAULT_RECOVERY_DELAY = 40 minutes;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it make sense to show that as public for block explorers?

packages/lsp11-contracts/contracts/LSP11SocialRecovery.sol Outdated Show resolved Hide resolved

// if there is a secret require a commitment first
if (_secretHash != bytes32(0)) {
bytes32 saltedHash = keccak256(abi.encode(account, secretHash));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

encode or encode packed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No preference

packages/lsp11-contracts/contracts/LSP11SocialRecovery.sol Outdated Show resolved Hide resolved
@CJ42 CJ42 merged commit 4d0315c into develop Jul 29, 2024
2 checks passed
@CJ42 CJ42 deleted the guardianRecovery branch July 29, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants