Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c01680a
feat: Add `stake` with validator and override `_stakeMore` (#17)
garyghayrat Jun 26, 2025
67caac9
Add `alterValidator` and tests (#19)
garyghayrat Jul 3, 2025
5dd3efa
Add validator stake authority, bonus weight and `isLeaderDefault' (#20)
garyghayrat Jul 11, 2025
f5956e1
Add `setValidatorWeightThreshold` and tests (#22)
garyghayrat Jul 11, 2025
02974d6
Add `validatorTotalWeight` and tests (#23)
garyghayrat Jul 21, 2025
7bf6cf2
Add validator registration and mock registry (#24)
garyghayrat Jul 24, 2025
f8f8fcd
Add `_changeValidatorWeight` and tests (#25)
garyghayrat Jul 28, 2025
c6a5739
Override `_withdraw` and add `totalWeightChanged` event (#26)
garyghayrat Jul 28, 2025
661a123
Add atomic earning power calculation (#27)
garyghayrat Jul 28, 2025
3228dfa
Add registry passthrough methods (#28)
garyghayrat Jul 28, 2025
90b5948
fix: quality of life stuff
funkyenough Jul 31, 2025
4c823fe
Add validator registration and mock registry
garyghayrat Jul 10, 2025
e37b942
Add onBehalf fns for `stake` and `alterValidator`
garyghayrat Jul 22, 2025
8ad49b1
Add natspec
garyghayrat Jul 22, 2025
94f4ace
feat: add stakeOnBehalf and alterValidatorOnBehalf type hash
funkyenough Jul 31, 2025
502478e
test: add unit tests for stakeOnBehalf and alterValidatorOnBehalf
funkyenough Jul 31, 2025
6801680
fix: quality of life stuff
funkyenough Jul 31, 2025
455ac91
onbehalf feedback
wildmolasses Aug 3, 2025
1096b56
fix: quality of life stuff
funkyenough Jul 31, 2025
c5aa6c8
fix: quality of life stuff
funkyenough Jul 31, 2025
0f72c89
refactor: move existing integration tests to ZkStaker.old.integration…
funkyenough Aug 1, 2025
4012ca2
test: add integration tests with concrete consensus registry implemen…
funkyenough Aug 1, 2025
a7dfc8c
some updates
wildmolasses Aug 4, 2025
c65d0c1
fix tests
funkyenough Aug 5, 2025
dfa7e98
Add sepolia deployment script for `ZkStaker` and `ConsensusRegistry` …
funkyenough Aug 11, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Build contracts to get sizes
run: |
forge --version
forge build --sizes
forge build --sizes --zksync

test:
runs-on: ubuntu-latest
Expand Down
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Compiler files
cache/
out/
zkout/

# Ignores development broadcast logs
!/broadcast
Expand All @@ -17,3 +18,12 @@ lcov.info
.vscode
.idea
node_modules

# Artifacts
artifacts-zk/

# Cache
cache_hardhat-zk/

# Typechain
typechain-types/
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@
[submodule "lib/staker"]
path = lib/staker
url = https://github.com/withtally/staker
[submodule "lib/era-contracts"]
path = lib/era-contracts
url = https://github.com/matter-labs/era-contracts
branch = consensus-registry
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@

ZkStaker is built of of Tally's [Staker](https://github.com/withtally/staker) library, and incentivizes delegation within ZK Nation. The current system allows a ZK holder to stake their tokens and earn rewards in ZK tokens. Rewards are currently distributed via minting on a capped minter. In the future other reward sources can be added through a governance vote.

- [Overview](#overview)
- [Setup](#setup)
- [Development](#development)
- [Deployment](#deployment)
- [License](#license)
- [ZkStaker](#zkstaker)
- [Overview](#overview)
- [Setup](#setup)
- [Development](#development)
- [Deployment](#deployment)
- [Environment Variables](#environment-variables)
- [Script Constants](#script-constants)
- [Deployment Execution](#deployment-execution)
- [License](#license)

## Overview

Expand Down Expand Up @@ -157,10 +161,11 @@ For a local deployment, use `zkSyncLocal` as the network-name:
npx hardhat run script/DeployZkStaker.ts --network zkSyncLocal
```

For a testnet deployment, use `zkSyncEraTestnet` as the network-name:
For a testnet deployment, use `zkSyncTestnet` as the network-name:

```bash
npx hardhat run script/DeployZkStaker.ts --network zkSyncEraTestnet
npx hardhat run script/DeployZkStaker.sepolia.ts --network zkSyncTestnet
npx hardhat run script/DeployConsensusRegistry.sepolia.ts --network zkSyncTestnet
```

For a mainnet deployment, use `zkSyncEra` as the network-name
Expand Down
Loading
Loading