Skip to content

Commit

Permalink
Upgrade all the things (#407)
Browse files Browse the repository at this point in the history
* Edit top level config

* Update tsconfig

* Update prettier config

* Update eslint config

* checkpoint

* Update SDK configs

* Change typechain to artifacts

* Rename typechain folder

* Streamline artifacts

* Move artifacts script

* Remove I interface prefix and redundant interfaces

* Refactor prettier, add package back

* Update evm packages

* Refactor Models progress

* Update LockingVault model

* Update GSCVault model

* Update CachedContract id field to namespace

* Checkpoint

* Client improvements

* Badass evm-client

* Fix util type

* Fix NamedEventInput type

* Fix types

* Fix comment

* Update viem client

* Add calldatas to spellcheck

* Use arg types from evm-client

* Reorg evm-client, more fixes

* Wrap up clients

* Huge milestone force commit

* Add council-viem implementations

* Add council-ethers and reafactors

* Reset all app changes

* Update packages

* Redo CLI

* Remove single letter options, upgrade clide, fix all the things

* Package progress

* Package export management

* Checkpoint

* Update artifacts script

* Remove local evm-client package

* Fix option values passed to forked commands.

* Re-org src dir

* Fix wagmi and query client providers

* Update react-tooltip usage

* Fix import

* Bump evm-client version to fix type resolutions in next.js

* Milestone

* Details page working

* Milestone

* Progress

* Vaults page progress

* Progress

* Progress

* Progress

* Progress

* Progress

* Progress

* Progress

* Progress

* Progress

* Progress

* Fix ethers sdk

* Progress

* Progress

* Fix getBulkEnsRecords

* Fix examples

* Fix type errors

* Add test for `getVotingPowerBreakdown`

* Remove nonexistent file from tsconfig

* streamline pr workflow

* Add paths to landing page deploy workflow

* Fix file casing

* Remove color class from landiing H1

* Remove unnecessary casting to unknown

* Fix skeletons

* Update packages

* Disable council-viem integration test and move into src

* Fix voting UI and nav buttons

* Remove prop

* Remove parcel

* Update packages and sdk-starter

* Bump all deps
  • Loading branch information
ryangoree authored Feb 22, 2024
1 parent 5ecd060 commit 721387a
Show file tree
Hide file tree
Showing 890 changed files with 27,533 additions and 91,317 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/build.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/format-check.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .github/workflows/gh-pages-council.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
paths:
- "apps/council-ui/**"
- ".github/workflows/deploy-council-ui-to-gh-pages.yml"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/lint.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# https://turbo.build/repo/docs/ci/github-actions

name: Pull Request

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
verify:
runs-on: ubuntu-latest
strategy:
matrix:
tasks: [lint, build, typecheck, test]

steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Run ${{ matrix.tasks }}
run: yarn ${{ matrix.tasks }}
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
node_modules
dist
.turbo
.next
.DS_Store
.parcel-cache
.DS_Store
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
15 changes: 15 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
node_modules
dist
.DS_Store
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
vite.config.*.timestamp-*
1 change: 1 addition & 0 deletions packages/prettier-config/index.js → .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
plugins: ["prettier-plugin-organize-imports"],
tabWidth: 2,
useTabs: false,
trailingComma: "all",
Expand Down
14 changes: 13 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,17 @@
"url": "./packages/council-deploy/src/deployments/deployments.schema.json"
}
],
"markdown.extension.toc.levels": "2..6"
"markdown.extension.toc.levels": "2..6",
"cSpell.words": [
"abitype",
"calldatas",
"Delegators",
"delvtech",
"merkle",
"Timelock",
"tsup",
"typecheck",
"unvested",
"Viem"
]
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ This monorepo uses [Yarn](https://classic.yarnpkg.com/) as a package manager. It

| Name | Description |
| ----------------------------------------------------------------------------------------------- | ------------------------------------ |
| [eslint-config](https://github.com/delvtech/council-kit/tree/main/packages/eslint-config) | Package for static type checking. |
| [@council/eslint-config](https://github.com/delvtech/council-kit/tree/main/packages/@council/eslint-config) | Package for static type checking. |
| [prettier-config](https://github.com/delvtech/council-kit/tree/main/packages/prettier-config) | Package for code formatting. |
| [tsconfig](https://github.com/delvtech/council-kit/tree/main/packages/tsconfig) | Package for TypeScript configuation. |
| [@council/tsconfig](https://github.com/delvtech/council-kit/tree/main/packages/tsconfig) | Package for TypeScript configuation. |

Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).

Expand Down
4 changes: 2 additions & 2 deletions apps/council-sdk-starter/.env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
PROVIDER_URI=
WALLET_PRIVATE_KEY=
RPC_URL=
WALLET_PRIVATE_KEY=
1 change: 0 additions & 1 deletion apps/council-sdk-starter/.prettierignore

This file was deleted.

4 changes: 0 additions & 4 deletions apps/council-sdk-starter/.prettierrc.js

This file was deleted.

42 changes: 14 additions & 28 deletions apps/council-sdk-starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,25 @@
"description": "Boilerplate to get started using the council-sdk fast!",
"license": "MIT",
"private": true,
"main": "dist/index.js",
"types": "dist/types.d.ts",
"source": "src/index.ts",
"alias": {
"src": "./src"
},
"files": [
"dist"
],
"type": "module",
"scripts": {
"watch": "parcel watch",
"build": "parcel build",
"createProposal": "ts-node -r dotenv/config -r tsconfig-paths/register src/scripts/createProposal.ts",
"executeProposal": "ts-node -r dotenv/config -r tsconfig-paths/register src/scripts/executeProposal.ts",
"setLockDuration": "ts-node -r dotenv/config -r tsconfig-paths/register src/scripts/setLockDuration.ts",
"changeVaultStatus": "ts-node -r dotenv/config -r tsconfig-paths/register src/scripts/changeVaultStatus.ts",
"getGSCMembers": "ts-node -r dotenv/config -r tsconfig-paths/register src/scripts/getGSCMembers.ts",
"getProposalResults": "ts-node -r dotenv/config -r tsconfig-paths/register src/scripts/getProposalResults.ts"
"createProposal": "tesm-node -r dotenv/config src/scripts/createProposal.ts",
"executeProposal": "tesm-node -r dotenv/config src/scripts/executeProposal.ts",
"setLockDuration": "tesm-node -r dotenv/config src/scripts/setLockDuration.ts",
"changeVaultStatus": "tesm-node -r dotenv/config src/scripts/changeVaultStatus.ts",
"getGSCMembers": "tesm-node -r dotenv/config ./src/scripts/getGSCMembers.ts",
"getProposalResults": "tesm-node -r dotenv/config src/scripts/getProposalResults.ts"
},
"dependencies": {
"@council/deploy": "*",
"@council/sdk": "*",
"@council/typechain": "*",
"ethers": "^5.7.2"
"@delvtech/council-viem": "*",
"viem": "^2.7.12"
},
"devDependencies": {
"@council/prettier-config": "*",
"@council/tsconfig": "*",
"dotenv": "^16.0.3",
"parcel": "^2.8.0",
"prettier-plugin-organize-imports": "^3.2.2",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.1.0",
"typescript": "^4.7.4"
"@types/node": "^20.11.19",
"dotenv": "^16.4.5",
"tesm-node": "^1.3.1",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export const elementAddresses = {
airdrop: "0xd04a459FFD3A5E3C93d5cD8BB13d26a9845716c2",
coreVoting: "0xEaCD577C3F6c44C3ffA398baaD97aE12CDCFed4a",
elementToken: "0x5c6D51ecBA4D8E4F20373e3ce96a62342B125D6d",
gscCoreVoting: "0x40309f197e7f94B555904DF0f788a3F48cF326aB",
gscVault: "0xcA870E8aa4FCEa85b5f0c6F4209C8CBA9265B940",
lockingVault: "0x02Bd4A3b1b95b01F2Aa61655415A5d3EAAcaafdD",
spender: "0xDa2Baf34B5717b257e52039f78d02B9C58751781",
timeLock: "0x81758f3361A769016eae4844072FA6d7f828a651",
treasury: "0x82eF450FB7f06E3294F2f19ed1713b255Af0f541",
vestingVault: "0x6De73946eab234F1EE61256F10067D713aF0e37A",
} as const;
31 changes: 0 additions & 31 deletions apps/council-sdk-starter/src/addresses/elementAddresses.ts

This file was deleted.

20 changes: 20 additions & 0 deletions apps/council-sdk-starter/src/client.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import {
PublicClient,
createPublicClient,
createWalletClient,
http,
} from "viem";
import { privateKeyToAccount } from "viem/accounts";

export const publicClient: PublicClient = createPublicClient({
transport: http(process.env.RPC_URL),
});

export const walletClient =
process.env.WALLET_PRIVATE_KEY &&
createWalletClient({
account: privateKeyToAccount(
process.env.WALLET_PRIVATE_KEY as `0x${string}`,
),
transport: http(process.env.RPC_URL),
});
9 changes: 0 additions & 9 deletions apps/council-sdk-starter/src/provider.ts

This file was deleted.

Loading

0 comments on commit 721387a

Please sign in to comment.