Skip to content

Commit

Permalink
Merge 20342bf into c08947c
Browse files Browse the repository at this point in the history
  • Loading branch information
b00ste authored Feb 13, 2024
2 parents c08947c + 20342bf commit 1c78f31
Show file tree
Hide file tree
Showing 447 changed files with 62,002 additions and 28,376 deletions.
9 changes: 9 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
ignorePatterns: ['artifacts/', 'cache/', 'dist/', 'types/', 'contracts.ts'],
extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
plugins: ['@typescript-eslint/eslint-plugin', 'prettier'],
rules: {
'prettier/prettier': 'error',
'@typescript-eslint/no-explicit-any': 'off',
},
};
12 changes: 0 additions & 12 deletions .eslintrc.json

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ jobs:
run: npm ci

- name: 🏗️ Build contract artifacts
run: npx hardhat compile
run: |
npm run build
npm run build:turbo
- name: 🧪 Run Benchmark tests
# Rename the file to be able to generate benchmark JSON report
Expand Down
38 changes: 22 additions & 16 deletions .github/workflows/build-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,42 @@ jobs:
- uses: actions/checkout@v3

# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
- name: Use Node.js '16.15.0'
uses: actions/setup-node@v2
- name: Use Node.js v20
uses: actions/setup-node@v3
with:
node-version: "16.15.0"
node-version: "20.x"
cache: "npm"

- name: 📦 Install dependencies
run: npm ci

- name: 🔍 Run Solidity Linter
run: npm run lint:solidity
run: |
npm run lint:solidity
npm run lint:turbo:solidity
- name: 🎨 Run ESLint on JS/TS files
run: npm run lint
run: |
npm run lint
npm run lint:turbo
# This will also generate the Typechain types used by the Chai tests
- name: 🏗️ Build contract artifacts
run: npx hardhat compile
run: |
npm run build
npm run build:turbo
- name: 📤 cache dependencies + build
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
artifacts
node_modules
types
contracts.ts
packages/**/types
key: ${{ github.run_id }}

- name: 🧪 run import/requires tests
run: npm run test:importRequire

- name: 📚 generate ABI docs
run: npm run build:docs

Expand All @@ -55,6 +59,9 @@ jobs:
exit 1
fi
- name: 🧪 Run Turbo tests
run: npm run test:turbo

test-suites:
strategy:
matrix:
Expand All @@ -63,7 +70,6 @@ jobs:
"up",
"upinit",
"lsp1",
"lsp2",
"lsp6",
"lsp6init",
"lsp7",
Expand All @@ -79,7 +85,6 @@ jobs:
"lsp20",
"lsp20init",
"lsp23",
"universalfactory",
"reentrancy",
"reentrancyinit",
"mocks",
Expand All @@ -91,20 +96,21 @@ jobs:
- uses: actions/checkout@v3

- name: 📥 restore cache
uses: actions/cache@v2
uses: actions/cache@v4
id: "build-cache"
with:
path: |
artifacts
node_modules
types
contracts.ts
packages/**/types
key: ${{ github.run_id }}

- name: Use Node.js v16
uses: actions/setup-node@v2
- name: Use Node.js v20
uses: actions/setup-node@v3
with:
node-version: "16.x"
node-version: "20.x"
cache: "npm"

- name: Install dependencies
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/solc_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ jobs:
- name: Compile Smart Contracts
run: |
if [[ "<" == "${{ steps.comparison.outputs.comparison-result }}" ]]
then
then
solc $(ls contracts/**/*.sol | grep -v "Extension4337\|contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset") \
--allow-paths $(pwd)/node_modules/ \
--allow-paths $(pwd)/node_modules/,$(pwd)/packages/ \
../=$(pwd)/contracts/ \
@=node_modules/@ \
solidity-bytes-utils/=node_modules/solidity-bytes-utils/ \
../=$(pwd)/contracts/
solidity-bytes-utils/=node_modules/solidity-bytes-utils/
else
solc contracts/**/*.sol \
@=node_modules/@ \
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,9 @@ gas_benchmark.md

# test temporary folder
/.test

# Turborepo
.turbo

# Custom setup
foundry_artifacts/
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = git@github.com:foundry-rs/forge-std.git
url = https://github.com/foundry-rs/forge-std.git
65 changes: 0 additions & 65 deletions .mythx.yml

This file was deleted.

6 changes: 4 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/contracts/LSP6KeyManager/LSP6Constants.sol
/packages/LSP6KeyManager/contracts/LSP6Constants.sol
/artifacts
/cache
/types
Expand All @@ -10,4 +10,6 @@
/userdocs
/common
/package
/module
/module
packages/*/types/
packages/*/artifacts/
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"options": {
"tabWidth": 4,
"printWidth": 80,
"compiler": "0.8.15"
"compiler": "0.8.17"
}
}
]
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"CodeGPT.apiKey": "CodeGPT Plus Beta"
}
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ For more information see [Documentation](https://docs.lukso.tech/standards/smart
| :warning: | _This package is currently in early stages of development,<br/> use for testing or experimentation purposes only._ |
| :-------: | :----------------------------------------------------------------------------------------------------------------- |

## Packages

This repo contains packages around SwapKit sdk and its integrations with different blockchains.

| Package | NPM | Description |
| -------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------- |
| [@lukso/lsp0-contracts](./packages/lsp0-contracts) | [![npm version](https://img.shields.io/npm/v/@lukso/lsp0-contracts.svg?style=flat)] | LSP0 ERC725Account |
| [@lukso/lsp1-contracts](./packages/lsp1-contracts) | [![npm version](https://img.shields.io/npm/v/@lukso/lsp1-contracts.svg?style=flat)] | LSP1 Unviersal Receiver |

## Installation

### npm
Expand Down
9 changes: 9 additions & 0 deletions build.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineBuildConfig } from 'unbuild';

export default defineBuildConfig({
entries: ['./constants'],
declaration: 'compatible', // generate .d.ts files
rollup: {
emitCJS: true,
},
});
1 change: 1 addition & 0 deletions config/eslint-config-custom/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# `eslint-custom-config`
14 changes: 14 additions & 0 deletions config/eslint-config-custom/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
ignorePatterns: ['artifacts/', 'cache/', 'dist/', 'types/', 'contracts.ts'],
extends: ['turbo', 'prettier'],
plugins: ['@typescript-eslint', 'prettier'],
rules: {
'prettier/prettier': 'error',
'@typescript-eslint/no-explicit-any': 'off',
},
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
},
};
13 changes: 13 additions & 0 deletions config/eslint-config-custom/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "eslint-config-custom",
"version": "0.0.0",
"main": "index.js",
"private": true,
"dependencies": {
"@typescript-eslint/eslint-plugin": "^6.2.1",
"@typescript-eslint/parser": "^6.2.1",
"eslint-config-prettier": "^8.8.0",
"eslint-config-turbo": "^1.9.3",
"eslint-plugin-prettier": "^4.2.1"
}
}
17 changes: 17 additions & 0 deletions config/tsconfig/contracts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Default",
"compilerOptions": {
"target": "ES2019",
"module": "commonjs",
"moduleResolution": "node",
"esModuleInterop": true,
"outDir": "dist",
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"lib": ["ES2019", "es2019.array", "ES2021.String"]
},
"include": ["./tests", "hardhat", "./deploy"],
"files": ["./hardhat.config.ts"]
}
11 changes: 11 additions & 0 deletions config/tsconfig/contracts.module.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"module": "esNext",
"target": "esNext",
"outDir": "module",
"declaration": true,
"skipLibCheck": false
},
"files": ["./constants.ts"]
}
13 changes: 13 additions & 0 deletions config/tsconfig/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "tsconfig",
"version": "0.0.0",
"private": true,
"license": "Apache-2.0",
"publishConfig": {
"access": "public"
},
"files": [
"contracts.json",
"contracts.module.json"
]
}
14 changes: 14 additions & 0 deletions contracts/Imports.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.4;

// solhint-disable no-unused-import

import {
LSP1UniversalReceiverDelegateUP
} from "@lukso/lsp1delegate-contracts/contracts/LSP1UniversalReceiverDelegateUP.sol";
import {
LSP1UniversalReceiverDelegateVault
} from "@lukso/lsp1delegate-contracts/contracts/LSP1UniversalReceiverDelegateVault.sol";

import {LSP9Vault} from "@lukso/lsp9-contracts/contracts/LSP9Vault.sol";
import {LSP9VaultInit} from "@lukso/lsp9-contracts/contracts/LSP9VaultInit.sol";
Loading

0 comments on commit 1c78f31

Please sign in to comment.