commit
529845e3b4
@ -0,0 +1,3 @@ |
||||
node_modules |
||||
dist |
||||
coverage |
@ -0,0 +1,20 @@ |
||||
{ |
||||
"env": { |
||||
"node": true |
||||
}, |
||||
"root": true, |
||||
"parser": "@typescript-eslint/parser", |
||||
"plugins": ["@typescript-eslint"], |
||||
"extends": [ |
||||
"eslint:recommended", |
||||
"plugin:@typescript-eslint/recommended", |
||||
"prettier" |
||||
], |
||||
"rules": { |
||||
"comma-dangle": ["error", "always-multiline"], |
||||
"semi": ["error", "always"], |
||||
"@typescript-eslint/explicit-module-boundary-types": ["error"], |
||||
"@typescript-eslint/no-non-null-assertion": ["error"], |
||||
"@typescript-eslint/no-explicit-any": ["error", { "ignoreRestArgs": true }] |
||||
} |
||||
} |
@ -0,0 +1,86 @@ |
||||
name: ci |
||||
|
||||
on: |
||||
# Triggers the workflow on push or pull request events but only for the main branch |
||||
push: |
||||
branches: [main] |
||||
pull_request: |
||||
branches: [main] |
||||
|
||||
# Allows you to run this workflow manually from the Actions tab |
||||
workflow_dispatch: |
||||
|
||||
jobs: |
||||
install: |
||||
runs-on: ubuntu-latest |
||||
steps: |
||||
- uses: actions/checkout@v2 |
||||
- uses: actions/cache@v2 |
||||
with: |
||||
path: .//node_modules |
||||
key: ${{ runner.os }}-npm-cache-${{ hashFiles('./package-lock.json') }} |
||||
|
||||
- name: npm-install |
||||
# Check out the lockfile from main, reinstall, and then |
||||
# verify the lockfile matches what was committed. |
||||
run: | |
||||
npm install |
||||
CHANGES=$(git status -s) |
||||
if [[ ! -z $CHANGES ]]; then |
||||
echo "Changes found: $CHANGES" |
||||
git diff |
||||
exit 1 |
||||
fi |
||||
|
||||
build: |
||||
runs-on: ubuntu-latest |
||||
needs: [install] |
||||
steps: |
||||
- uses: actions/checkout@v2 |
||||
|
||||
- name: npm-cache |
||||
uses: actions/cache@v2 |
||||
with: |
||||
path: .//node_modules |
||||
key: ${{ runner.os }}-npm-cache-${{ hashFiles('./package-lock.json') }} |
||||
|
||||
- name: build-cache |
||||
uses: actions/cache@v2 |
||||
with: |
||||
path: ./* |
||||
key: ${{ github.sha }} |
||||
|
||||
- name: build |
||||
run: npm run build |
||||
|
||||
prettier: |
||||
runs-on: ubuntu-latest |
||||
needs: [install] |
||||
steps: |
||||
- uses: actions/checkout@v2 |
||||
- uses: actions/cache@v2 |
||||
with: |
||||
path: .//node_modules |
||||
key: ${{ runner.os }}-npm-cache-${{ hashFiles('./package-lock.json') }} |
||||
|
||||
- name: prettier |
||||
run: | |
||||
npm run prettier |
||||
CHANGES=$(git status -s) |
||||
if [[ ! -z $CHANGES ]]; then |
||||
echo "Changes found: $CHANGES" |
||||
exit 1 |
||||
fi |
||||
|
||||
test: |
||||
runs-on: ubuntu-latest |
||||
needs: [build] |
||||
steps: |
||||
- uses: actions/checkout@v2 |
||||
- uses: actions/cache@v2 |
||||
with: |
||||
path: ./* |
||||
key: ${{ github.sha }} |
||||
|
||||
- name: test |
||||
run: npm run test |
@ -0,0 +1,8 @@ |
||||
node_modules/ |
||||
cache/ |
||||
artifacts/ |
||||
types/ |
||||
dist/ |
||||
coverage/ |
||||
coverage.json |
||||
*.swp |
@ -0,0 +1,18 @@ |
||||
{ |
||||
"tabWidth": 2, |
||||
"singleQuote": true, |
||||
"trailingComma": "all", |
||||
"overrides": [ |
||||
{ |
||||
"files": "*.sol", |
||||
"options": { |
||||
"printWidth": 80, |
||||
"tabWidth": 4, |
||||
"useTabs": false, |
||||
"singleQuote": false, |
||||
"bracketSpacing": false, |
||||
"explicitTypes": "always" |
||||
} |
||||
} |
||||
] |
||||
} |
@ -0,0 +1,3 @@ |
||||
module.exports = { |
||||
skipFiles: ["test"], |
||||
}; |
@ -0,0 +1,8 @@ |
||||
{ |
||||
"extends": "solhint:recommended", |
||||
"rules": { |
||||
"compiler-version": ["error", "^0.6.11"], |
||||
"func-visibility": ["warn", {"ignoreConstructors":true}], |
||||
"not-rely-on-time": "off" |
||||
} |
||||
} |
@ -0,0 +1,28 @@ |
||||
import 'solidity-coverage'; |
||||
import '@typechain/hardhat'; |
||||
import '@nomiclabs/hardhat-waffle'; |
||||
import 'hardhat-gas-reporter'; |
||||
import '@abacus-network/hardhat'; |
||||
|
||||
/** |
||||
* @type import('hardhat/config').HardhatUserConfig |
||||
*/ |
||||
module.exports = { |
||||
solidity: { |
||||
version: '0.7.6', |
||||
settings: { |
||||
optimizer: { |
||||
enabled: true, |
||||
runs: 999999, |
||||
}, |
||||
}, |
||||
}, |
||||
gasReporter: { |
||||
currency: 'USD', |
||||
}, |
||||
typechain: { |
||||
outDir: './types', |
||||
target: 'ethers-v5', |
||||
alwaysGenerateOverloads: false, // should overloads with full signatures like deposit(uint256) be generated always, even if there are no overloads?
|
||||
}, |
||||
}; |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,49 @@ |
||||
{ |
||||
"name": "@abacus-network/erc20-token", |
||||
"version": "0.0.0", |
||||
"license": "MIT OR Apache-2.0", |
||||
"main": "dist/index.js", |
||||
"types": "dist/index.d.ts", |
||||
"directories": { |
||||
"test": "test" |
||||
}, |
||||
"scripts": { |
||||
"build": "hardhat compile && hardhat typechain && npm run prettier && tsc && npm run copy-types", |
||||
"test": "hardhat test", |
||||
"prettier": "prettier --write ./contracts ./test", |
||||
"copy-types": "cp types/*.d.ts dist/", |
||||
"coverage": "hardhat coverage" |
||||
}, |
||||
"dependencies": { |
||||
"@abacus-network/core": "file:../abacus-monorepo/solidity/core", |
||||
"@abacus-network/sdk": "file:../abacus-monorepo/typescript/sdk", |
||||
"@abacus-network/utils": "file:../abacus-monorepo/typescript/utils", |
||||
"@abacus-network/apps": "file:../abacus-monorepo/solidity/apps", |
||||
"@ethersproject/bignumber": "^5.5.0", |
||||
"@ethersproject/bytes": "^5.5.0", |
||||
"ethers": "^5.4.7" |
||||
}, |
||||
"devDependencies": { |
||||
"@abacus-network/hardhat": "file:../abacus-monorepo/typescript/hardhat", |
||||
"@openzeppelin/contracts": "~3.4.2", |
||||
"@openzeppelin/contracts-upgradeable": "~3.4.2", |
||||
"@summa-tx/memview-sol": "^2.0.0", |
||||
"@nomiclabs/hardhat-ethers": "^2.0.1", |
||||
"@nomiclabs/hardhat-waffle": "^2.0.1", |
||||
"@typechain/ethers-v5": "~7.0.0", |
||||
"@typechain/hardhat": "^2.0.1", |
||||
"@types/mocha": "^9.1.0", |
||||
"chai": "^4.3.0", |
||||
"eslint": "^7.20.0", |
||||
"hardhat": "^2.8.3", |
||||
"hardhat-gas-reporter": "^1.0.7", |
||||
"prettier": "^2.2.1", |
||||
"prettier-plugin-solidity": "^1.0.0-beta.5", |
||||
"solhint": "^3.3.2", |
||||
"solhint-plugin-prettier": "^0.0.5", |
||||
"solidity-coverage": "^0.7.14", |
||||
"ts-node": "^10.1.0", |
||||
"typechain": "^5.0.0", |
||||
"typescript": "^4.3.5" |
||||
} |
||||
} |
@ -0,0 +1,25 @@ |
||||
{ |
||||
"compilerOptions": { |
||||
"declaration": true, |
||||
"declarationMap": true, |
||||
"esModuleInterop": true, |
||||
"forceConsistentCasingInFileNames": true, |
||||
"incremental": false, |
||||
"lib": ["es2015", "es5", "dom"], |
||||
"module": "commonjs", |
||||
"moduleResolution": "node", |
||||
"noEmitOnError": true, |
||||
"noFallthroughCasesInSwitch": true, |
||||
"noImplicitAny": true, |
||||
"noImplicitReturns": true, |
||||
"noUnusedLocals": true, |
||||
"preserveSymlinks": true, |
||||
"preserveWatchOutput": true, |
||||
"pretty": false, |
||||
"sourceMap": true, |
||||
"target": "es6", |
||||
"strict": true, |
||||
"outDir": "./dist/", |
||||
"rootDir": "./src/" |
||||
}, |
||||
} |
Loading…
Reference in new issue