Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
2b11daa
refactor: update project structure and configuration
cybervoid0 Sep 11, 2025
a9b6f1e
refactor: update StRIFToken tests to HH3
cybervoid0 Sep 11, 2025
9e7a2c6
refactor: upgrade Beta Builders test to HH3
cybervoid0 Sep 11, 2025
1cca4e7
refactor: update checkpoints tests to use new import structure and im…
cybervoid0 Sep 11, 2025
bbb8cb1
refactor: enhance address handling in deployContracts and EarlyAdopte…
cybervoid0 Sep 11, 2025
4749ab4
refactor: streamline Governor tests with improved address handling an…
cybervoid0 Sep 11, 2025
d8d26a0
refactor: update nftAttacker tests with improved import paths and fun…
cybervoid0 Sep 11, 2025
875d034
refactor: improve OGContributors tests with updated import paths and …
cybervoid0 Sep 11, 2025
e00b5d2
refactor: enhance OGPartners and RIFToken tests with updated import p…
cybervoid0 Sep 11, 2025
eb8415e
refactor: update StRIFToken tests for improved address handling and i…
cybervoid0 Sep 11, 2025
b1ebb8e
refactor: improve StRIFToken tests with consistent address handling a…
cybervoid0 Sep 11, 2025
14766d2
refactor: enhance Treasury tests with consistent address handling and…
cybervoid0 Sep 11, 2025
7f00e25
refactor: standardize address handling and update import paths in upg…
cybervoid0 Sep 11, 2025
bceeb06
refactor: update ESLint configuration and package dependencies
cybervoid0 Sep 12, 2025
c31e6a2
refactor: update ESLint dependencies in package.json and package-lock…
cybervoid0 Sep 12, 2025
13dfd0c
refactor: enhance ESLint configuration with new plugins for JSON and …
cybervoid0 Sep 12, 2025
6b53cf9
refactor: update Hardhat configuration and airdrop task for enhanced …
cybervoid0 Sep 12, 2025
595d2e4
refactor: update task implementations and import paths for consistency
cybervoid0 Sep 12, 2025
d6f7904
refactor: update project configuration and task implementations for i…
cybervoid0 Sep 12, 2025
da448e4
test: add test file to check husky and lint-staged
cybervoid0 Sep 12, 2025
cad65c6
test: check husky without deprecated warnings
cybervoid0 Sep 12, 2025
ce4ef07
fix: update husky pre-commit hook format
cybervoid0 Sep 12, 2025
ee54c66
chore: remove obsolete test files and streamline pre-commit hook
cybervoid0 Sep 12, 2025
a3a13c0
test: add badly formatted solidity file
cybervoid0 Sep 12, 2025
ad84baa
test: add solidity file with serious errors
cybervoid0 Sep 12, 2025
4554819
test: file with solhint error
cybervoid0 Sep 12, 2025
d86b233
feat: improve lint-staged config to block commits with solhint errors
cybervoid0 Sep 12, 2025
44319a1
test: solidity file with only warnings
cybervoid0 Sep 12, 2025
9d16361
chore: remove obsolete Solidity test files with errors and warnings
cybervoid0 Sep 12, 2025
9617b2d
chore: delete empty contracts overview file to clean up repository
cybervoid0 Sep 12, 2025
d6af12c
chore: update CI workflow to use npm instead of yarn for dependency m…
cybervoid0 Sep 15, 2025
909ead1
chore: update CI workflow to use Node.js 24.x
cybervoid0 Sep 15, 2025
b65c51c
chore: update CI workflow to use Node.js 24.x
cybervoid0 Sep 15, 2025
ff973af
chore: temporarily disable Slither analysis due to Hardhat 3 incompat…
cybervoid0 Sep 15, 2025
020a19a
chore: update rif-token-contracts dependency URL and upgrade various …
cybervoid0 Sep 15, 2025
2c1ab71
chore: add type-check script and update CI workflow to include type c…
cybervoid0 Sep 15, 2025
27c7773
chore: update @types/node, typescript, and undici-types to latest ver…
cybervoid0 Sep 15, 2025
e4c8d95
feat: enhance CI workflows with Solidity analysis and dependency revi…
cybervoid0 Sep 15, 2025
ae8ebf7
chore: remove Solidity formatting check from CI workflow
cybervoid0 Sep 15, 2025
d81900a
chore: add dotenv dependency and configure environment variables in h…
cybervoid0 Sep 15, 2025
6a3a331
chore: add blockscout verification configuration to hardhat.config.ts
cybervoid0 Sep 16, 2025
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
15 changes: 8 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,19 @@ jobs:

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
- name: Use Node.js 20.x
- name: Use Node.js 24.x
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 #v4.4.0
with:
node-version: 20
node-version: 24

- name: Install dependencies
run: yarn
run: npm install

- name: Compile contracts
run: yarn compile
run: npm run compile

- name: Test and Lint
- name: Test, Lint and Type Check
run: |
yarn test
yarn lint
npm run test
npm run lint
npm run type-check
4 changes: 3 additions & 1 deletion .github/workflows/dependency_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ jobs:
uses: actions/dependency-review-action@ce3cf9537a52e8119d91fd484ab5b8a807627bf8 # v4.6.0
with:
fail-on-severity: high
comment-summary-in-pr: true
comment-summary-in-pr: true
# Ignore rif-token-contracts package vulnerabilities (known false positive)
allow-ghsas: 'GHSA-j7xp-w6x3-3q9v'
25 changes: 17 additions & 8 deletions .github/workflows/slither.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,20 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2

- name: Run Slither
uses: crytic/slither-action@4fd765aeef19915d04ddf0be90c2930036a774d8 #v0.4.1
id: slither
with:
node-version: 20
fail-on: none
slither-args: --filter-paths "openzeppelin,RIF,util,exploit" --checklist --markdown-root ${{ github.server_url }}/${{ github.repository }}/blob/${{ github.sha }}/
target: .
# TODO: Re-enable Slither when Hardhat 3 compatibility is fixed
# Current issue: Slither v0.4.1 is not compatible with Hardhat 3.x
# See: https://github.com/crytic/slither/issues/860
# Alternative: Solhint analysis is now running in solidity-lint.yml workflow
- name: Run Slither (Temporarily Disabled)
run: |
echo "Slither analysis temporarily disabled due to Hardhat 3 incompatibility"
echo "Alternative Solidity analysis is provided by Solhint in solidity-lint.yml workflow"
echo "Will be re-enabled when crytic/slither-action supports Hardhat 3.x"
# - name: Run Slither
# uses: crytic/slither-action@4fd765aeef19915d04ddf0be90c2930036a774d8 #v0.4.1
# id: slither
# with:
# node-version: 24
# fail-on: none
# slither-args: --filter-paths "openzeppelin,RIF,util,exploit" --checklist --markdown-root ${{ github.server_url }}/${{ github.repository }}/blob/${{ github.sha }}/
# target: .
22 changes: 22 additions & 0 deletions .github/workflows/solidity-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Solidity Lint Analysis
on: [push, pull_request]
permissions: {}

jobs:
solidity-lint:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2

- name: Use Node.js 24.x
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 #v4.4.0
with:
node-version: 24

- name: Install dependencies
run: npm install

- name: Run Solhint Analysis
run: npm run lint:sol
12 changes: 10 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
node_modules
# Node modules
/node_modules

# Compilation output
/dist

# Misc
.env
.DS_Store
/nft

# Hardhat files
/cache
Expand All @@ -9,8 +16,9 @@ node_modules
# TypeChain files
/typechain
/typechain-types
/types/ethers-contracts

# solidity-coverage files
# Hardhat coverage reports
/coverage
/coverage.json

Expand Down
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
npx lint-staged
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
"useTabs": false,
"tabWidth": 2,
"bracketSpacing": true,
"plugins": ["prettier-plugin-solidity"],
"overrides": [
{
"files": "*.sol",
"options": {
"singleQuote": false,
"explicitTypes": "always",
"bracketSpacing": false
}
}
Expand Down
3 changes: 2 additions & 1 deletion .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "solhint:recommended",
"rules": {
"func-visibility": ["warn", { "ignoreConstructors": true }],
"compiler-version": ["error", ">=0.8.20 <0.9.0 || 0.4.24"]
"compiler-version": ["error", ">=0.8.20 <0.9.0 || 0.4.24"],
"use-natspec": "off"
}
}
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"NomicFoundation.hardhat-solidity",
"ms-vscode.vscode-typescript-next"
]
}
33 changes: 16 additions & 17 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
{
"solidity.compileUsingRemoteVersion": "v0.8.24+commit.e11b9ed9",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
"eslint.workingDirectories": ["."],
"prettier.configPath": "./.prettierrc.json",
"typescript.preferences.importModuleSpecifier": "relative",
"files.associations": {
"*.sol": "solidity"
},
"[solidity]": {
"editor.defaultFormatter": "NomicFoundation.hardhat-solidity"
},
"eslint.validate": ["javascript", "typescript"],
"eslint.workingDirectories": ["."]
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
File renamed without changes.
11 changes: 11 additions & 0 deletions contracts/ERC1967Proxy.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import {ERC1967Proxy as OZProxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";

/**
* @dev Simple wrapper around OpenZeppelin's ERC1967Proxy for Hardhat artifacts
*/
contract ERC1967Proxy is OZProxy {
constructor(address _logic, bytes memory _data) OZProxy(_logic, _data) {}
}
9 changes: 7 additions & 2 deletions contracts/RIFToken.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
// SPDX-License-Identifier: UNLICENSED
// SPDX-License-Identifier: MIT

pragma solidity ^0.4.24;

import {RIFToken as RIF} from "rif-token-contracts/contracts/RIF/RIFToken.sol";

/**
* @dev RIF token original implementation for testing its wrapping with StRIF
*/
import "rif-token-contracts/contracts/RIF/RIFToken.sol";
contract RIFToken is RIF {
constructor() public RIF() {}
}
14 changes: 11 additions & 3 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import { defineConfig } from 'eslint/config'
import globals from 'globals'
import pluginJs from '@eslint/js'
import { includeIgnoreFile } from '@eslint/compat'
import tseslint from 'typescript-eslint'
import eslintPluginPrettier from 'eslint-plugin-prettier/recommended'
import json from '@eslint/json'
import markdown from '@eslint/markdown'
import { fileURLToPath } from 'node:url'

export default [
const gitignorePath = fileURLToPath(new URL('.gitignore', import.meta.url))

export default defineConfig([
// 1) Base config for JS & TS
{
files: ['**/*.{js,mjs,cjs,ts}'],
Expand Down Expand Up @@ -36,12 +41,15 @@ export default [
},
},

// 5) **Override just for test files**
// 5) Ignore gitignore files and folders
includeIgnoreFile(gitignorePath, 'Imported .gitignore patterns'),

// 6) **Override just for test files**
{
files: ['test/**/*.ts', 'test/**/*.js'],
rules: {
// Turn off the rule that flags Chai property-based assertions
'@typescript-eslint/no-unused-expressions': 'off',
},
},
]
])
Loading
Loading