Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy v1 public beta contracts #434

Merged
merged 38 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
e904518
Migrate oracle to new dkg lib
shanejearley Oct 5, 2023
b748dfa
Fix operator test
shanejearley Oct 7, 2023
4b61186
Change example filenames
shanejearley Oct 7, 2023
53330ae
Merge branch 'develop' into test/new-dkg
shanejearley Oct 7, 2023
52fccdd
Remove remote submodule pull
shanejearley Oct 8, 2023
1c30ebd
Add contract tasks
shanejearley Oct 11, 2023
df04f36
Make factory contract entrypoint
shanejearley Oct 19, 2023
db54832
Handle multiple contracts in oracle
shanejearley Oct 19, 2023
3323e41
Merge develop
shanejearley Oct 19, 2023
5ce68b2
Move users db clean to service script
shanejearley Oct 19, 2023
857cf7d
Integrate blog with dev workflow
shanejearley Oct 19, 2023
edefde2
Update operators.ts with contract factory
ccali11 Oct 19, 2023
cb3b9d1
Implement contract factory approach in staking and breakdownMetrics c…
ccali11 Oct 19, 2023
3f59db9
Merge branch 'enhancement/use-factory-in-composables' into deployment…
ccali11 Oct 19, 2023
44568ae
Add blog deployment
shanejearley Oct 19, 2023
b97f9bb
Get hackmd token for dev
shanejearley Oct 19, 2023
abeb95a
Update env signers
shanejearley Oct 19, 2023
89cb834
Add deployed contract addresses
shanejearley Oct 19, 2023
2d5baf7
Change blogs route to blog
shanejearley Oct 19, 2023
ae79a4a
Update hardcoded operator urls in web
shanejearley Oct 19, 2023
7fb5447
Change Pool to PoolConfig
shanejearley Oct 19, 2023
a447fa7
Fix web build errors
ccali11 Oct 19, 2023
7ad2134
Add contract upgrade test
shanejearley Oct 20, 2023
479a923
Quick fix of async factory contract call
ccali11 Oct 20, 2023
c191c08
Merge branch 'deployment/goerli' into fix/async-environment
ccali11 Oct 20, 2023
5ef8453
DRY up getting factory addresses info
ccali11 Oct 20, 2023
eb6955c
Add mock eigen deploy to dev script
shanejearley Oct 21, 2023
a94c4f4
Merge branch 'deployment/goerli' into fix/async-environment
ccali11 Oct 23, 2023
479f528
Add eigen contract addresses & update breakdownMetrics composable
ccali11 Oct 23, 2023
c11ce45
Update operator with defaultManager
ccali11 Oct 23, 2023
a9accd3
Resolve breakdownMetrics and staking component bug
ccali11 Oct 23, 2023
834df65
Remove user from initializeOperatorComposable method
ccali11 Oct 23, 2023
f6ade2e
Add docs app
shanejearley Oct 23, 2023
d2fe084
Add docs deploy
shanejearley Oct 23, 2023
020057e
Merge branch 'feature/docs' into deployment/goerli
shanejearley Oct 23, 2023
ed0083a
Fix ethereum dev script
shanejearley Oct 23, 2023
0b0083a
Clean deployment
shanejearley Oct 24, 2023
573528d
Add blog and docs to dev stage deploy
shanejearley Oct 24, 2023
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
3 changes: 1 addition & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
"quotes": ["error", "single"]
},
"ignorePatterns": [
"contracts/**/scripts/resources",
"scripts/**/resources",
"lib",
"cdk.out",
"*.js"
]
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ jobs:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Install mdBook plugins
uses: actions-rs/cargo@v1
with:
command: install
args: mdbook-katex mdbook-mermaid

- name: Install and build all package dependencies
run: npm ci
env:
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ jobs:

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Install mdBook plugins
uses: actions-rs/cargo@v1
with:
command: install
args: mdbook-katex mdbook-mermaid

- name: Install and build all package dependencies
run: npm ci
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ jobs:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Install mdBook plugins
uses: actions-rs/cargo@v1
with:
command: install
args: mdbook-katex mdbook-mermaid

- name: Install and build all package dependencies
run: npm ci
env:
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/sandbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ jobs:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Install mdBook plugins
uses: actions-rs/cargo@v1
with:
command: install
args: mdbook-katex mdbook-mermaid

- name: Install and build all package dependencies
run: npm ci
env:
Expand Down
15 changes: 8 additions & 7 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[submodule "contracts/ethereum/scripts/resources/ssv-network"]
path = contracts/ethereum/scripts/resources/ssv-network
url = https://github.com/bloxapp/ssv-network.git
branch = jato-v2
[submodule "contracts/ethereum/lib/forge-std"]
path = contracts/ethereum/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "services/oracle/scripts/resources/rockx-dkg-cli"]
path = services/oracle/scripts/resources/rockx-dkg-cli
url = https://github.com/consensusnetworks/rockx-dkg-cli.git
[submodule "contracts/ethereum/lib/ssv-network"]
path = contracts/ethereum/lib/ssv-network
url = https://github.com/bloxapp/ssv-network.git
branch = jato-v2
[submodule "services/oracle/lib/dkg"]
path = services/oracle/lib/dkg
url = https://github.com/consensusnetworks/ssv-dkg.git
branch = feature/operator-env
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@
"typescript"
],
"css.lint.unknownAtRules": "ignore",
"jupyter.notebookFileRoot": "${fileDirname}",
"volar.inlayHints.eventArgumentInInlineHandlers": false
}
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ echo "USE_SECRETS=false" > .env
| `ETHEREUM_RPC_URL` | Ethereum RPC network URL | `http://127.0.0.1:8545` |
| `NETWORK` | Network name (`mainnet || testnet || hardhat || localhost`) | `localhost` |
| `FORK` | Fork network name (`mainnet || testnet || hardhat`) | `testnet` |
| `MANAGER_ADDRESS` | Manager contract address | (predicted manager address) |
| `VIEWS_ADDRESS` | Views contract address | (predicted views address) |
| `FACTORY_ADDRESS` | Base factory contract address | (predicted factory address) |
| `CRYPTO_COMPARE_API_KEY` | CryptoCompare API key | `` |
| `TUNNEL` | Whether to tunnel local network RPC URLs (for remote wallets) | `false` |
| `MOCK_SERVICES` | Whether to mock backend services | `true` |
Expand Down
2 changes: 2 additions & 0 deletions apps/docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cache
dist
61 changes: 61 additions & 0 deletions apps/docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import { withMermaid } from 'vitepress-plugin-mermaid'

// https://vitepress.dev/reference/site-config
export default withMermaid({
title: "Casimir Docs",
head: [['link', { rel: 'icon', href: '/favicon.ico' }]],
rewrites: {
'index.md': 'introduction/what-is-casimir.md',
},
cleanUrls: true,
markdown: {
math: true
},
srcDir: 'src',
outDir: './dist',
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
logo: '/casimir.svg',
search: {
provider: 'local'
},
sidebar: [
{
text: 'Introduction',
base: '/introduction',
items: [
{ text: 'What is Casimir?', link: '/what-is-casimir' },
{ text: 'Architecture', link: '/architecture' }
]
},
{
text: 'Guide',
base: '/guide',
items: [
{ text: 'Accounts', link: '/accounts' },
{ text: 'Staking', link: '/staking' },
{ text: 'Operating', link: '/operating' }
]
},
{
text: 'Reference',
base: '/reference',
items: [
{ text: 'Contract Addresses', link: '/contract-addresses' },
{ text: 'Solidity API', link: '/solidity-api' }
]
},
{
text: 'Troubleshooting',
base: '/troubleshooting',
items: [
{ text: 'Operator Issues', link: '/operator-issues' },
{ text: 'Wallet Issues', link: '/wallet-issues' }
]
}
],
socialLinks: [
{ icon: 'github', link: 'https://github.com/consensusnetworks/casimir' }
]
}
})
1 change: 1 addition & 0 deletions apps/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# @casimir/docs
20 changes: 20 additions & 0 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "@casimir/docs",
"private": "true",
"scripts": {
"dev": "npx vitepress dev",
"docgen": "npx esno -r dotenv/config ./scripts/docgen.ts",
"build": "npx vitepress build",
"preview": "npx vitepress preview",
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
"@types/node": "^17.0.38",
"dotenv": "^16.3.1",
"esno": "0.17.0",
"markdown-it-mathjax3": "^4.3.2",
"mermaid": "^10.5.1",
"vitepress": "^1.0.0-rc.23",
"vitepress-plugin-mermaid": "^2.0.15"
}
}
7 changes: 7 additions & 0 deletions apps/docs/scripts/docgen.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { run } from '@casimir/shell'

void async function () {
const outputDir = `${process.cwd()}/src/reference`
const templateDir = `${process.cwd()}/templates/solidity`
await run(`DOCS_OUTPUT_DIR=${outputDir} DOCS_TEMPLATE_DIR=${templateDir} npm run docgen --workspace @casimir/ethereum`)
}()
5 changes: 5 additions & 0 deletions apps/docs/src/guide/accounts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
::: warning
🚧 This page is incomplete.
:::

# Accounts
7 changes: 7 additions & 0 deletions apps/docs/src/guide/operating.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
::: warning
🚧 This page is incomplete.
:::

# Operating

Operators owners will need to [set up an SSV node with RockX](https://github.com/consensusnetworks/ssv-dkg) and register with Casimir. The operators page in the Casimir app guides an owner through the process and provides an easy interface for registration and operator management.
7 changes: 7 additions & 0 deletions apps/docs/src/guide/staking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
::: warning
🚧 This page is incomplete.
:::

# Staking

Users can deposit any amount of ETH to the manager contract. Their deposits are staked to validators run by SSV operators (see [Operators](#operators)). Rewards are auto-compounded into stake and users can withdraw their principal plus any earned proportion of new stake (or a partial amount of their choice) at any time.
17 changes: 17 additions & 0 deletions apps/docs/src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
::: warning
🚧 This page is incomplete.
:::

# What is Casimir?

Casimir is a platform... TODO

## Casimir Ethereum Staking

Currlently stakers either need to solo-stake (and have least 32 Ether), or they need to pool their assets in a liquid staking protocol (LSD). While the former choice is a reliably secure choice for Ether holders (if they have solid infrastructure), the latter, LSDs, often present an inherent counterparty risk to the user because of their centralized control of staking node operators (see [The Risks of LSD](https://notes.ethereum.org/@djrtwo/risks-of-lsd)).

Casimir is designed to offer users the experience and security of solo-staking while pooling their assets. The Casimir contracts seamlessly connect stakers with any amount of Ether to a permissionless registry of high-performing node operators. Casimir aims to minimize counterparty risk for users and improve decentralization in Ethereum staking:

- Validators duties are performed by registered (collateralized) operators running distributed validator technology (DVT)
- Keys are created and reshared using distributed key generation (DKG)
- Balance and status reports are reported by a decentralized oracle network (DON)
Loading
Loading