Skip to content

Sepolia TokenStaking proxy deploy, ExtendedTokenStaking upgrade, and operator setup tooling#176

Open
lionakhnazarov wants to merge 1 commit intomainfrom
feat/testnet4-deployment-support
Open

Sepolia TokenStaking proxy deploy, ExtendedTokenStaking upgrade, and operator setup tooling#176
lionakhnazarov wants to merge 1 commit intomainfrom
feat/testnet4-deployment-support

Conversation

@lionakhnazarov
Copy link
Copy Markdown

Sepolia TokenStaking proxy deploy, ExtendedTokenStaking upgrade, and operator setup tooling

Summary

This branch makes Sepolia a first-class network for TokenStaking: deploy the UUPS/transparent proxy the same way as mainnet, add a hardhat-deploy path to upgrade the proxy to ExtendedTokenStaking (so operators can call stake()), and add scripts for funding, keystores, and end-to-end operator registration against deployed tbtc-v2 Sepolia artifacts.

It also aligns IStaking / TokenStaking with approveApplication and increaseAuthorization, and updates ExtendedTokenStaking in the test harness with override where needed.

Motivation

  • Sepolia needs proxy-deployed TokenStaking and an upgrade to ExtendedTokenStaking so staking providers can stake native T and authorize Random Beacon / Wallet Registry apps—required for a working testnet operator stack.
  • Operational scripts reduce manual cast steps and document the flow (fund T + ETH, stake, increaseAuthorization, register operator, join sortition pools).

Changes

Contracts

  • IStaking: declare approveApplication and increaseAuthorization.
  • TokenStaking: implement approveApplication and increaseAuthorization (governance + authorizer flows, application callbacks).
  • TokenStakingTestSet.sol: add override on ExtendedTokenStaking methods that now override the base.

Deploy / upgrade

  • deploy/07_deploy_token_staking.ts: use OpenZeppelin proxy deploy for sepolia as well as mainnet.
  • deploy/54_upgrade_token_staking_extended.ts (new): Sepolia-only upgrade of the TokenStaking proxy to ExtendedTokenStaking, with Tenderly verify when tagged.
  • scripts/upgrade-token-staking.ts: standalone upgrade + refresh deployments/<network>/TokenStaking.json ABI/address.
  • package.json: add yarn upgrade:token-staking; pin packageManager (Yarn 4).

Artifacts / repo layout

  • TokenStaking.json added at repo root (deployment/ABI snapshot).
  • deployments/mainnet/TokenStaking.json removed (superseded / relocated—confirm in review if anything still expects the old path).

New scripts (operator / maintainer)

  • setup-new-staking-provider.js, fund-new-operator.sh, run-new-operator-setup.sh, setup-multiple-operators.sh
  • create-operator-keystore.js, get-operator-key.js
  • create-spv-maintainer-keystore.js

…rease in TokenStaking

- Introduced  method in  and  to allow governance to approve applications.
- Added  method to enable staking providers to increase their authorization for applications.
- Updated deployment scripts for TokenStaking upgrade and added new scripts for operator keystore management.
- Modified  to include a new script for upgrading token staking.
- Created new JSON file for TokenStaking ABI and removed outdated deployment data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant