-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from pnetwork-association/chore/test-contracts
Add tests contracts + event attestator simulator
- Loading branch information
Showing
59 changed files
with
7,637 additions
and
1,602 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,42 @@ | ||
name: CI | ||
name: test | ||
on: | ||
push: | ||
branches: | ||
- master | ||
branches: [master] | ||
pull_request: | ||
|
||
env: | ||
FOUNDRY_PROFILE: ci | ||
|
||
jobs: | ||
run-ci: | ||
yarn-ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: 'Enable corepack' | ||
run: corepack enable | ||
|
||
- name: Install Foundry | ||
- name: 'Install Foundry' | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- name: Install deps | ||
run: forge install | ||
- name: 'Setup Node.js' | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: 'yarn' | ||
|
||
- name: 'Install' | ||
run: yarn install | ||
|
||
- name: 'Build' | ||
run: yarn build | ||
|
||
- name: Check gas snapshots | ||
run: forge snapshot --check | ||
- name: 'Lint' | ||
run: yarn lint | ||
|
||
- name: Run tests | ||
run: forge test | ||
- name: 'Test' | ||
run: yarn test |
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 |
---|---|---|
@@ -1 +1,5 @@ | ||
.yarn | ||
|
||
dist | ||
coverage | ||
node_modules |
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,7 @@ | ||
{ | ||
"recommendations": [ | ||
"esbenp.prettier-vscode", | ||
"bierner.github-markdown-preview", | ||
"nomicfoundation.hardhat-solidity" | ||
] | ||
} |
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,41 @@ | ||
{ | ||
"npm.packageManager": "yarn", | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true, | ||
"source.organizeImports": "explicit" | ||
}, | ||
"[json]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[markdown]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[solidity]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[javascript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"files.watcherExclude": { | ||
"**/.git/**": true, | ||
"./solidity/lib": true, | ||
"**/node_modules/*/**": true | ||
}, | ||
"files.exclude": { | ||
"**/node_modules": true, | ||
"**/*.js": { | ||
"when": "$(basename).ts" | ||
}, | ||
"**/*.map": { | ||
"when": "$(basename).map" | ||
}, | ||
"**/artifacts": true, | ||
"**/cache": true, | ||
"**/dist": true, | ||
"**/types": true | ||
} | ||
} |
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 @@ | ||
nodeLinker: "node-modules" |
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,24 @@ | ||
// @ts-check | ||
import eslint from '@eslint/js' | ||
import prettierConfig from 'eslint-config-prettier' | ||
import globals from 'globals' | ||
import tseslint from 'typescript-eslint' | ||
|
||
export default tseslint.config( | ||
eslint.configs.recommended, | ||
...tseslint.configs.recommended, | ||
prettierConfig, | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.node, | ||
}, | ||
}, | ||
rules: { | ||
'no-console': 'error', | ||
}, | ||
}, | ||
{ | ||
ignores: ['**/lib'], | ||
}, | ||
) |
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 |
---|---|---|
|
@@ -3,21 +3,30 @@ | |
"version": "0.0.0", | ||
"private": true, | ||
"description": "pNetwork v4 monorepo", | ||
"main": " ", | ||
"type": "module", | ||
"author": "pNetwork Devs", | ||
"license": "MIT", | ||
"workspaces": [ | ||
"solidity" | ||
"solidity", | ||
"typescript/*" | ||
], | ||
"scripts": { | ||
"test": "yarn workspaces run test", | ||
"prettier": "yarn workspaces run prettier" | ||
"test": "yarn workspaces foreach --all --parallel --no-private run test", | ||
"lint": "yarn workspaces foreach --all --parallel --no-private run lint", | ||
"build": "yarn workspaces foreach --all --parallel --no-private run build", | ||
"prettier": "yarn workspaces foreach --all --parallel --no-private run prettier" | ||
}, | ||
"devDependencies": { | ||
"@eslint/js": "^9.5.0", | ||
"@trivago/prettier-plugin-sort-imports": "^4.3.0", | ||
"@types/eslint__js": "^8.42.3", | ||
"eslint": "8.57.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"prettier": "3.3.2", | ||
"prettier-plugin-solidity": "^1.3.1" | ||
} | ||
"prettier-plugin-solidity": "^1.3.1", | ||
"solhint": "^5.0.1", | ||
"typescript": "4.7.4", | ||
"typescript-eslint": "^7.13.1" | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
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,14 @@ | ||
{ | ||
"folders": [ | ||
{ | ||
"name": "root", | ||
"path": "./", | ||
}, | ||
{ | ||
"path": "typescript", | ||
}, | ||
{ | ||
"path": "solidity", | ||
}, | ||
] | ||
} |
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 |
---|---|---|
|
@@ -12,3 +12,7 @@ docs/ | |
|
||
# Dotenv file | ||
.env | ||
|
||
# Private keys | ||
*.key | ||
*.keys |
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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
{ | ||
"extends": "solhint:default" | ||
"extends": "solhint:default", | ||
"rules": { | ||
"ordering": "warn", | ||
"private-vars-leading-underscore": ["warn", { "strict": false }] | ||
} | ||
} |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import config from '../eslint.config.js' | ||
|
||
export default [...config, { rules: { 'no-console': '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,5 @@ | ||
#!/bin/bash | ||
|
||
ls lib/ | \ | ||
xargs -I % bash -c \ | ||
'cat ./lib/%/package.json | jq -r "@text \"\(.name)@\(.version)\""' |
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 @@ | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] |
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
Submodule openzeppelin-contracts-upgradeable
added at
723f8c
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.