Skip to content

Commit

Permalink
feat: orgnaize repo into monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyar committed Feb 1, 2024
1 parent 0513d79 commit 5ee4a8b
Show file tree
Hide file tree
Showing 49 changed files with 1,820 additions and 2,336 deletions.
4 changes: 2 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ cache
coverage
dist
typechain
src/config/abis/generated.ts
subgraph-client/.graphqlclient
packages/token-converter-bot/src/config/abis/generated.ts
packages/token-converter-bot/subgraph-client/.graphqlclient
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"project": ".eslint-tsconfig"
"project": ["./.eslint-tsconfig", "./packages/*/tsconfig.json"]
},
"root": true,
"rules": {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
- name: Export deployments
run: |
for NETWORK in bsctestnet bscmainnet ethereum sepolia; do
EXPORT=true yarn hardhat export --network ${NETWORK} --export ./deployments/${NETWORK}.json
EXPORT=true yarn workspace @venusprotocol/keeper-bot-contracts run hardhat export --network ${NETWORK} --export ./deployments/${NETWORK}.json
jq -M '{name, chainId, addresses: .contracts | map_values(.address)}' ./deployments/${NETWORK}.json > ./deployments/${NETWORK}_addresses.json
done
yarn prettier
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ artifacts
!.yarn/versions

# Generated files
src/config/abis/generated.ts
subgraph-client/.graphclient
packages/token-converter-bot/src/config/abis/generated.ts
packages/token-converter-bot/subgraph-client/.graphclient
546 changes: 0 additions & 546 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

28 changes: 28 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

785 changes: 0 additions & 785 deletions .yarn/releases/yarn-3.2.0.cjs

This file was deleted.

783 changes: 783 additions & 0 deletions .yarn/releases/yarn-3.2.2.cjs

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"

yarnPath: .yarn/releases/yarn-3.2.0.cjs
yarnPath: .yarn/releases/yarn-3.2.2.cjs

checksumBehavior: update
19 changes: 19 additions & 0 deletions deploy/001-token-converter-operator.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { DeployFunction } from "hardhat-deploy/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { deployments, getNamedAccounts }: any = hre;
const { deploy } = deployments;
const { deployer } = await getNamedAccounts();

await deploy("TokenConverterOperator", {
from: deployer,
log: true,
autoMine: true, // speed up deployment on local network (ganache, hardhat), no effect on live networks
skipIfAlreadyDeployed: true,
});
};

func.tags = ["TokenConverterOperator"];

export default func;
5 changes: 0 additions & 5 deletions deployments/bscmainnet.json

This file was deleted.

5 changes: 0 additions & 5 deletions deployments/bscmainnet_addresses.json

This file was deleted.

5 changes: 0 additions & 5 deletions deployments/bsctestnet.json

This file was deleted.

5 changes: 0 additions & 5 deletions deployments/bsctestnet_addresses.json

This file was deleted.

5 changes: 0 additions & 5 deletions deployments/ethereum.json

This file was deleted.

5 changes: 0 additions & 5 deletions deployments/ethereum_addresses.json

This file was deleted.

5 changes: 0 additions & 5 deletions deployments/sepolia.json

This file was deleted.

5 changes: 0 additions & 5 deletions deployments/sepolia_addresses.json

This file was deleted.

79 changes: 8 additions & 71 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,100 +2,37 @@
"name": "@venusprotocol/keeper-bots",
"version": "1.1.0",
"description": "Keeper bots for Venus Protocol",
"files": [
"artifacts",
"typechain",
"dist",
"deployments"
],
"scripts": {
"test": "hardhat test",
"test:integration": "hardhat test tests/integration/index.ts",
"test:fork": "hardhat test tests/hardhat/Fork/*",
"hardhat:compile": "hardhat compile",
"hardhat:coverage": "hardhat coverage",
"lint": "yarn lint:sol && yarn lint:ts && yarn prettier:check",
"lint:sol": "solhint \"contracts/**/*.sol\"",
"lint:sol:fix": "prettier --write \"contracts/**/*.sol\"",
"lint:ts": "eslint --ext .js,.ts .",
"lint:ts:fix": "eslint --fix --ext .js,.ts .",
"prettier": "prettier --write \"**/*.{js,json,md,sol,ts,yaml,yml}\"",
"prettier:check": "prettier --check \"**/*.{js,json,md,sol,ts,yaml,yml}\"",
"build": "rm -rf dist && hardhat compile && tsc --declaration",
"docgen": "hardhat docgen",
"prepare": "husky install",
"generate-abis": "yarn wagmi generate",
"postinstall": "yarn generate-abis",
"generate-subgraph-types": "rm -rf /subgraph-client/.graphclient && npx graphclient build --dir ./subgraph-client"
},
"private": true,
"keywords": [],
"author": "Venus",
"license": "ISC",
"engines": {
"node": ">=18.0.0"
},
"workspaces": [
"packages/*"
],
"scripts": {
"lint": "yarn workspaces foreach run lint"
},
"devDependencies": {
"@commitlint/cli": "^17.0.3",
"@commitlint/config-conventional": "^17.0.3",
"@ethersproject/abi": "^5.7.0",
"@ethersproject/providers": "^5.7.2",
"@nomicfoundation/hardhat-chai-matchers": "^1.0.3",
"@nomicfoundation/hardhat-network-helpers": "^1.0.4",
"@nomicfoundation/hardhat-toolbox": "^2.0.0",
"@nomiclabs/hardhat-ethers": "^2.0.0",
"@nomiclabs/hardhat-etherscan": "^3.0.3",
"@pancakeswap/v3-core": "^1.0.2",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/npm": "^11.0.1",
"@trivago/prettier-plugin-sort-imports": "3.4.0",
"@typechain/ethers-v5": "^10.1.0",
"@typechain/hardhat": "^6.1.2",
"@types/chai": "^4.3.11",
"@types/mocha": "^10.0.6",
"@types/node": "^20.10.0",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"@venusprotocol/oracle": "^1.7.3",
"@venusprotocol/solidity-utilities": "^1.1.0",
"@wagmi/cli": "^2.0.4",
"chai": "^4.3.10",
"dotenv": "^16.3.1",
"eslint": "^7.32.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "3.4.1",
"eslint-plugin-promise": "^5.2.0",
"ethers": "^5.7.0",
"hardhat": "^2.19.1",
"hardhat-deploy": "^0.11.44",
"hardhat-deploy-ethers": "^0.3.0-beta.13",
"hardhat-gas-reporter": "^1.0.9",
"husky": "^8.0.3",
"prettier": "2.7.1",
"prettier-plugin-solidity": "1.1.3",
"semantic-release": "^22.0.8",
"solhint": "^4.0.0",
"solidity-coverage": "^0.8.5",
"solidity-docgen": "^0.6.0-beta.36",
"ts-node": "^10.9.1",
"typechain": "^8.3.2",
"typescript": "^5.3.2"
},
"publishConfig": {
"access": "public",
"provenance": true
},
"_moduleAliases": {
"@nomiclabs/hardhat-ethers": "node_modules/hardhat-deploy-ethers"
},
"dependencies": {
"@openzeppelin/contracts-upgradeable": "4.9.3",
"@venusprotocol/governance-contracts": "^1.4.0",
"@venusprotocol/isolated-pools": "^2.3.0",
"@venusprotocol/protocol-reserve": "^1.4.0",
"@venusprotocol/venus-protocol": "^7.1.0",
"viem": "^2.1.1"
"semantic-release": "^22.0.8"
}
}
8 changes: 8 additions & 0 deletions packages/smart-contracts/.eslint-tsconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"include": [
"./typechain",
"docgen-templates",
"commitlint.config.js"
]
}
3 changes: 0 additions & 3 deletions .prettierignore → packages/smart-contracts/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ dist
typechain
contracts/third-party
*.hbs

src/config/abis/generated.ts
subgraph-client/.graphqlclient
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
75 changes: 75 additions & 0 deletions packages/smart-contracts/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"name": "@venusprotocol/keeper-bot-contracts",
"version": "1.1.0",
"description": "Smart contracts to support keeper bot tasks",
"scripts": {
"test": "hardhat test",
"test:integration": "hardhat test tests/integration/index.ts",
"test:fork": "hardhat test tests/hardhat/Fork/*",
"hardhat:compile": "hardhat compile",
"hardhat:coverage": "hardhat coverage",
"lint": "yarn lint:sol && yarn lint:ts && yarn prettier:check",
"lint:sol": "solhint \"contracts/**/*.sol\"",
"lint:sol:fix": "prettier --write \"contracts/**/*.sol\"",
"lint:ts": "eslint --ext .js,.ts .",
"lint:ts:fix": "eslint --fix --ext .js,.ts .",
"prettier": "prettier --write \"**/*.{js,json,md,sol,ts,yaml,yml}\"",
"prettier:check": "prettier --check \"**/*.{js,json,md,sol,ts,yaml,yml}\"",
"docgen": "hardhat docgen"
},
"keywords": [],
"author": "Venus",
"license": "ISC",
"engines": {
"node": ">=18.0.0"
},
"dependencies": {
"@openzeppelin/contracts-upgradeable": "4.9.3",
"@venusprotocol/governance-contracts": "^1.4.0",
"@venusprotocol/isolated-pools": "^2.3.0",
"@venusprotocol/protocol-reserve": "^1.4.0",
"@venusprotocol/venus-protocol": "^7.1.0"
},
"devDependencies": {
"@ethersproject/abi": "^5.7.0",
"@ethersproject/providers": "^5.7.2",
"@nomicfoundation/hardhat-chai-matchers": "^1.0.3",
"@nomicfoundation/hardhat-network-helpers": "^1.0.4",
"@nomicfoundation/hardhat-toolbox": "^2.0.0",
"@nomiclabs/hardhat-ethers": "^2.0.0",
"@nomiclabs/hardhat-etherscan": "^3.0.3",
"@typechain/ethers-v5": "^10.1.0",
"@typechain/hardhat": "^6.1.2",
"@types/chai": "^4.3.11",
"@types/mocha": "^10.0.6",
"@types/node": "^20.10.0",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"@venusprotocol/oracle": "^1.7.3",
"@venusprotocol/solidity-utilities": "^1.1.0",
"@wagmi/cli": "^2.0.4",
"chai": "^4.3.10",
"eslint": "^7.32.0",
"ethers": "^5.7.0",
"hardhat": "^2.19.1",
"hardhat-deploy": "^0.11.44",
"hardhat-deploy-ethers": "^0.3.0-beta.13",
"hardhat-gas-reporter": "^1.0.9",
"husky": "^8.0.3",
"prettier": "2.7.1",
"prettier-plugin-solidity": "1.1.3",
"semantic-release": "^22.0.8",
"solhint": "^4.0.0",
"solidity-coverage": "^0.8.5",
"solidity-docgen": "^0.6.0-beta.36",
"typechain": "^8.3.2",
"typescript": "^5.3.2"
},
"publishConfig": {
"access": "public",
"provenance": true
},
"_moduleAliases": {
"@nomiclabs/hardhat-ethers": "node_modules/hardhat-deploy-ethers"
}
}
10 changes: 10 additions & 0 deletions packages/smart-contracts/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
"paths": {
"@nomiclabs/hardhat-ethers": ["./node_modules/hardhat-deploy-ethers"]
}
},
"include": ["./typechain"],
"files": ["./hardhat.config.ts"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
"extends": "./tsconfig.json",
"include": [
"./src",
"./typechain",
"docgen-templates",
"commitlint.config.js",
"wagmi.config.ts",
"src/environment.d.ts"
]
Expand Down
4 changes: 4 additions & 0 deletions packages/token-converter-bot/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist

src/config/abis/generated.ts
subgraph-client/.graphqlclient
4 changes: 4 additions & 0 deletions packages/token-converter-bot/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist

src/config/abis/generated.ts
subgraph-client/.graphqlclient
50 changes: 50 additions & 0 deletions packages/token-converter-bot/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"name": "@venusprotocol/token-converter-bot",
"version": "0.0.1",
"description": "",
"private": true,
"scripts": {
"lint": "yarn lint:ts && yarn prettier:check",
"lint:ts": "eslint --ext .js,.ts .",
"lint:ts:fix": "eslint --fix --ext .js,.ts .",
"prettier": "prettier --write \"**/*.{js,json,md,ts,yaml,yml}\"",
"prettier:check": "prettier --check \"**/*.{js,json,md,ts,yaml,yml}\"",
"generate-abis": "yarn wagmi generate",
"postinstall": "yarn generate-abis"
},
"keywords": [],
"author": "Venus",
"license": "ISC",
"engines": {
"node": ">=18.0.0"
},
"dependencies": {
"hardhat": "^2.19.5",
"viem": "^2.1.1"
},
"devDependencies": {
"@pancakeswap/v3-core": "^1.0.2",
"@typechain/ethers-v5": "^10.1.0",
"@typechain/hardhat": "^6.1.2",
"@types/chai": "^4.3.11",
"@types/mocha": "^10.0.6",
"@types/node": "^20.10.0",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"@venusprotocol/oracle": "^1.7.3",
"@venusprotocol/solidity-utilities": "^1.1.0",
"@wagmi/cli": "^2.0.4",
"eslint": "^7.32.0",
"prettier": "2.7.1",
"ts-node": "^10.9.1",
"typechain": "^8.3.2",
"typescript": "^5.3.2"
},
"publishConfig": {
"access": "public",
"provenance": true
},
"_moduleAliases": {
"@nomiclabs/hardhat-ethers": "node_modules/hardhat-deploy-ethers"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 5ee4a8b

Please sign in to comment.