-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build!: move LSP9 in its own package
- Loading branch information
Showing
28 changed files
with
354 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ['custom'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"extends": "solhint:recommended", | ||
"rules": { | ||
"avoid-sha3": "error", | ||
"avoid-suicide": "error", | ||
"avoid-throw": "error", | ||
"avoid-tx-origin": "error", | ||
"check-send-result": "error", | ||
"compiler-version": ["error", "^0.8.0"], | ||
"func-visibility": ["error", { "ignoreConstructors": true }], | ||
"not-rely-on-block-hash": "error", | ||
"not-rely-on-time": "error", | ||
"reentrancy": "error", | ||
"constructor-syntax": "error", | ||
"private-vars-leading-underscore": ["error", { "strict": false }], | ||
"imports-on-top": "error", | ||
"visibility-modifier-order": "error", | ||
"no-unused-import": "error", | ||
"no-global-import": "error", | ||
"reason-string": ["warn", { "maxLength": 120 }], | ||
"avoid-low-level-calls": "off", | ||
"no-empty-blocks": ["error", { "ignoreConstructors": true }], | ||
"custom-errors": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# LSP Package Template | ||
|
||
This project can be used as a skeleton to build a package for a LSP implementation in Solidity (LUKSO Standard Proposal) | ||
|
||
It is based on Hardhat. | ||
|
||
## How to setup a LSP as a package? | ||
|
||
1. Copy the `template/` folder and paste it under the `packages/` folder. Then rename this `template/` folder that you copied with the LSP name. | ||
|
||
You can do so either: | ||
|
||
- manually, by copying the folder and pasting it inside `packages` and then renaming it. | ||
or | ||
- by running the following command from the root of the repository. | ||
|
||
```bash | ||
cp -r template packages/lsp-name | ||
``` | ||
|
||
2. Update the `"name"` and `"description"` field inside the `package.json` for this LSP package you just created. | ||
|
||
3. Setup the dependencies | ||
|
||
If this LSP uses external dependencies like `@openzeppelin/contracts`, put them under `dependencies` with the version number. | ||
|
||
```json | ||
"@openzeppelin/contracts": "^4.9.3" | ||
``` | ||
|
||
If this LSP uses other LSP as dependencies, put each LSP dependency as shown below. This will use the current code in the package: | ||
|
||
```json | ||
"@lsp2": "*" | ||
``` | ||
|
||
4. Setup the npm commands for linting, building, testing, etc... under the `"scripts"` in the `package.json` | ||
|
||
5. Test that all commands you setup run successfully | ||
|
||
By running the commands below, your LSP package should come up in the list of packages that Turbo is running this command for. | ||
|
||
```bash | ||
turbo build | ||
turbo lint | ||
turbo lint:solidity | ||
turbo test | ||
turbo test:foundry | ||
``` | ||
|
||
6. Finally update the relevant information in the `README.md` file in the folder of the newly created package, such as the title at the top, some description, etc... |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.4; | ||
|
||
abstract contract Version { | ||
/** | ||
* @dev Get the version of the contract. | ||
* @notice Contract version. | ||
* | ||
* @return The version of the the contract. | ||
*/ | ||
// DO NOT CHANGE | ||
// Comments block below is used by release-please to automatically update the version in this file. | ||
// x-release-please-start-version | ||
string public constant VERSION = "0.12.1"; | ||
|
||
// x-release-please-end | ||
} |
Oops, something went wrong.