Skip to content

Commit

Permalink
feat: Add StakedNFT contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
akashiceth committed Mar 31, 2023
1 parent fb778de commit 7adc02b
Show file tree
Hide file tree
Showing 46 changed files with 70,855 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .commitlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"extends": [
"@commitlint/config-conventional"
],
"rules": {
"subject-case": [
2,
"always",
"sentence-case"
],
"type-enum": [
2,
"always",
[
"build",
"ci",
"chore",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"test"
]
]
}
}
5 changes: 5 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ETHERSCAN_KEY=""
INFURA_KEY=""
ALCHEMY_KEY=""
MNEMONIC=""
PRIVATE_KEY=""
8 changes: 8 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules
artifacts
cache
coverage*
gasReporterOutput.json
typechain
.history
tasks/x2y2
27 changes: 27 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"env": {
"browser": false,
"es2021": true,
"mocha": true,
"node": true
},
"plugins": ["@typescript-eslint"],
"extends": [
"standard",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:node/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12
},
"rules": {
"node/no-unsupported-features/es-syntax": ["error", { "ignores": ["modules"] }]
},
"settings": {
"node": {
"tryExtensions": [".js", ".json", ".ts", ".d.ts"]
}
}
}
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

@akashiceth
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: ""
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: ""
assignees: ""
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
43 changes: 43 additions & 0 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Format and lint checks

on:
pull_request:
push:
branches: [main, release, dev]

jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Reconfigure git to use HTTP authentication
run: >
git config --global url."https://github.com/".insteadOf
ssh://[email protected]/
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Compile code (Hardhat)
run: yarn compile
- name: Force Compile code (Hardhat)
run: yarn compile:force
- name: Run format checks
run: yarn format:check
- name: Run lint
run: yarn lint
52 changes: 52 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Tests

on:
pull_request:
push:
branches: [main, release, dev]

jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Reconfigure git to use HTTP authentication
run: >
git config --global url."https://github.com/".insteadOf
ssh://[email protected]/
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dev dependencies
run: yarn install --frozen-lockfile
- name: Compile code (Hardhat)
run: yarn compile
- name: Force Compile code (Hardhat)
run: yarn compile:force
- name: Run TypeScript/Waffle tests
run: yarn test
env:
ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }}
- name: Run Coverage
run: yarn test:coverage
env:
ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }}
- name: Publish coverage
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
127 changes: 127 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port
node_modules
.env
.env*
!.env.template
coverage
coverage.json
typechain
typechain-types
.DS_Store

# Hardhat files
cache
artifacts
abis/

# Others
lib

storage_layout
out.html
.history/*
tasks/keys.ts
tasks/args.ts
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint
18 changes: 18 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
node_modules
.env
.env*
coverage
coverage.json
typechain

# Hardhat files
cache
artifacts

hardhat.config.ts
contracts/test
test/

# Others
lib
.DS_Store
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
node_modules
artifacts
cache
coverage*
gasReporterOutput.json
typechain-types
.history
deployments
tasks/x2y2
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"printWidth": 120
}
Loading

0 comments on commit 7adc02b

Please sign in to comment.