Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 15 additions & 15 deletions deployments/tempo/latest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
"treasury": "0x2420fff17c4213a4075cf5f7b6dc33429aaf22bb",
"timelock": "0x2420fff17c4213a4075cf5f7b6dc33429aaf22bb",
"multisig": "0x2420fff17c4213a4075cf5f7b6dc33429aaf22bb",
"tangle": "0x77c1cdfdda642a9c2587545768088c7cad6c4ced",
"staking": "0x8ed44aa6c65ef51c880fed08c9b2a611604b5693",
"restaking": "0x8ed44aa6c65ef51c880fed08c9b2a611604b5693",
"statusRegistry": "0x9f5799bbb9abfcb89645f5bb4c4844efd3c87c0c",
"tntToken": "0xb91177666047459e13a6e1254fffae60762ec2b9",
"metrics": "0xedffd611b47a273f28a35b9de5ee29c793c58f7c",
"rewardVaults": "0xa2f876e7cb7702e161290b704e45271dd240fa76",
"inflationPool": "0x53894ba39bf548ef38018f5d29c67a57206173b4",
"serviceFeeDistributor": "0xdc7ff0f48e409fcec01e1ba375fd5af558b0986e",
"tangle": "0xff137b9c879c47c28ce389e84501925438ab4cda",
"staking": "0x9484d07899b98384f1d66bd5b2659f3ed346f89e",
"restaking": "0x9484d07899b98384f1d66bd5b2659f3ed346f89e",
"statusRegistry": "0xaedaffd260e21b41cb9926370e32d14bef812b48",
"tntToken": "0x64fb7ffae82c1682574e9edb4e2f4e377132f671",
"metrics": "0x485289432c55ca68a392a204c4bddf1e4a0acf8f",
"rewardVaults": "0x9a1615fdcaaf2f659d78eb0d72fd3759480af7c4",
"inflationPool": "0x3602b76c625464895205466c645feff0d911836f",
"serviceFeeDistributor": "0x39d16ff4e0bce0e6b00a4a49be80c2b7ad2fb4b4",
"streamingPaymentManager": "0x0000000000000000000000000000000000000000",
"credits": "0x2adc4f3f6c7a7fceed3f51a0c2da576ebb872332",
"credits": "0x94e8d532c3205346ee048cf6e37d5e7653c353ae",
"epochLength": 604800,
"stakeAssets": [
{
"symbol": "TNT",
"token": "0xb91177666047459e13a6e1254fffae60762ec2b9",
"token": "0x64fb7ffae82c1682574e9edb4e2f4e377132f671",
"adapter": "0x0000000000000000000000000000000000000000",
"minOperatorStake": "1000000000000000000",
"minDelegation": "100000000000000000",
Expand All @@ -31,7 +31,7 @@
],
"rewardVaultsConfig": [
{
"asset": "0xb91177666047459e13a6e1254fffae60762ec2b9",
"asset": "0x64fb7ffae82c1682574e9edb4e2f4e377132f671",
"depositCap": "250000000000000000000000",
"active": true
}
Expand Down Expand Up @@ -72,11 +72,11 @@
"treasuryAmount": "32588831841878446700145909",
"foundationRecipient": "0x2420fff17c4213a4075cf5f7b6dc33429aaf22bb",
"foundationAmount": "15040809826744825912214026",
"claimDeadline": "1814491629",
"claimDeadline": "1815003116",
"unlockedBps": 0,
"cliffDuration": 0,
"vestingDuration": 0,
"tangleMigration": "0xd29708d5768e192d31d3adcbd14532fb2a220d6f",
"zkVerifier": "0xc48a0f728df02647da5d923bd2193fd1f411c707"
"tangleMigration": "0x090853d08ac6dfb9496e1f6fa828469e41eac64d",
"zkVerifier": "0xe4e168cfab3bdf80f78d50121d036f04c10bb5c6"
}
}
6 changes: 3 additions & 3 deletions deployments/tempo/migration.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"tntToken": "0xb91177666047459e13a6e1254fffae60762ec2b9",
"tangleMigration": "0xd29708d5768e192d31d3adcbd14532fb2a220d6f",
"zkVerifier": "0xc48a0f728df02647da5d923bd2193fd1f411c707",
"tntToken": "0x64fb7ffae82c1682574e9edb4e2f4e377132f671",
"tangleMigration": "0x090853d08ac6dfb9496e1f6fa828469e41eac64d",
"zkVerifier": "0xe4e168cfab3bdf80f78d50121d036f04c10bb5c6",
"sp1VerifierGateway": "0x397a5f7f3dbd538f23de225b51f532c34448da9b",
"programVKey": "0x000d74444f16d75f72527687a36c1bd4c49e6799816dac4989be3bc175e86fd7",
"merkleRoot": "0x54ec5497e0a2f43ec721c1ec5392cb224cf710b1210b579dcaefea002bb51adb",
Expand Down
2 changes: 2 additions & 0 deletions script/DemoSimulation.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { TangleSlashingFacet } from "../src/facets/tangle/TangleSlashingFacet.so
import { StakingOperatorsFacet } from "../src/facets/staking/StakingOperatorsFacet.sol";
import { StakingDepositsFacet } from "../src/facets/staking/StakingDepositsFacet.sol";
import { StakingDelegationsFacet } from "../src/facets/staking/StakingDelegationsFacet.sol";
import { StakingUnstakeWithdrawFacet } from "../src/facets/staking/StakingUnstakeWithdrawFacet.sol";
import { StakingSlashingFacet } from "../src/facets/staking/StakingSlashingFacet.sol";
import { StakingAssetsFacet } from "../src/facets/staking/StakingAssetsFacet.sol";
import { StakingViewsFacet } from "../src/facets/staking/StakingViewsFacet.sol";
Expand Down Expand Up @@ -198,6 +199,7 @@ contract DemoSimulation is Script, BlueprintDefinitionHelper {
router.registerFacet(address(new StakingOperatorsFacet()));
router.registerFacet(address(new StakingDepositsFacet()));
router.registerFacet(address(new StakingDelegationsFacet()));
router.registerFacet(address(new StakingUnstakeWithdrawFacet()));
router.registerFacet(address(new StakingSlashingFacet()));
router.registerFacet(address(new StakingAssetsFacet()));
router.registerFacet(address(new StakingViewsFacet()));
Expand Down
21 changes: 20 additions & 1 deletion script/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { TangleSlashingFacet } from "../src/facets/tangle/TangleSlashingFacet.so
import { StakingOperatorsFacet } from "../src/facets/staking/StakingOperatorsFacet.sol";
import { StakingDepositsFacet } from "../src/facets/staking/StakingDepositsFacet.sol";
import { StakingDelegationsFacet } from "../src/facets/staking/StakingDelegationsFacet.sol";
import { StakingUnstakeWithdrawFacet } from "../src/facets/staking/StakingUnstakeWithdrawFacet.sol";
import { StakingSlashingFacet } from "../src/facets/staking/StakingSlashingFacet.sol";
import { StakingAssetsFacet } from "../src/facets/staking/StakingAssetsFacet.sol";
import { StakingViewsFacet } from "../src/facets/staking/StakingViewsFacet.sol";
Expand Down Expand Up @@ -293,7 +294,16 @@ contract DeployV2 is DeployScriptBase {

_ensureTntToken(bootstrapAdmin);
_configureTntDefaults(tangleProxy, stakingProxy);
_configureServiceFeeDistributor(bootstrapAdmin, stakingProxy, tangleProxy);
// Subclasses that own the ServiceFeeDistributor lifecycle end-to-end
// (FullDeploy deploys + wires + hands off + records it in the manifest)
// suppress this inherited deploy so the impl is created exactly once.
// Without the guard the base path deploys+wires instance A here and the
// subclass deploys+wires instance B in its own run(), overwriting the
// pointers and orphaning A (a wasted ~26.7M-gas CREATE). The standalone
// DeployV2.run() path leaves this false and still gets its SFD here.
if (!_deploysServiceFeeDistributorExternally()) {
_configureServiceFeeDistributor(bootstrapAdmin, stakingProxy, tangleProxy);
}

if (broadcast) {
vm.stopBroadcast();
Expand Down Expand Up @@ -344,6 +354,14 @@ contract DeployV2 is DeployScriptBase {
}
}

/// @notice Whether a subclass deploys and wires the ServiceFeeDistributor itself.
/// @dev When true, `_deployCore` skips the inherited `_configureServiceFeeDistributor`
/// so the distributor impl is created exactly once. Base `DeployV2.run()` keeps
/// this false and deploys the distributor inside `_deployCore` as before.
function _deploysServiceFeeDistributorExternally() internal view virtual returns (bool) {
return false;
}

function _configureServiceFeeDistributor(address admin, address stakingProxy, address tangleProxy) internal {
Tangle tangle = Tangle(payable(tangleProxy));
IMultiAssetDelegation staking = IMultiAssetDelegation(payable(stakingProxy));
Expand Down Expand Up @@ -459,6 +477,7 @@ contract DeployV2 is DeployScriptBase {
router.registerFacet(address(new StakingOperatorsFacet()));
router.registerFacet(address(new StakingDepositsFacet()));
router.registerFacet(address(new StakingDelegationsFacet()));
router.registerFacet(address(new StakingUnstakeWithdrawFacet()));
router.registerFacet(address(new StakingSlashingFacet()));
router.registerFacet(address(new StakingAssetsFacet()));
router.registerFacet(address(new StakingViewsFacet()));
Expand Down
2 changes: 2 additions & 0 deletions script/DeployContractsOnly.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import { TangleSlashingFacet } from "../src/facets/tangle/TangleSlashingFacet.so
import { StakingOperatorsFacet } from "../src/facets/staking/StakingOperatorsFacet.sol";
import { StakingDepositsFacet } from "../src/facets/staking/StakingDepositsFacet.sol";
import { StakingDelegationsFacet } from "../src/facets/staking/StakingDelegationsFacet.sol";
import { StakingUnstakeWithdrawFacet } from "../src/facets/staking/StakingUnstakeWithdrawFacet.sol";
// StakingRewardsFacet removed - no longer exists
import { StakingSlashingFacet } from "../src/facets/staking/StakingSlashingFacet.sol";
import { StakingAssetsFacet } from "../src/facets/staking/StakingAssetsFacet.sol";
Expand Down Expand Up @@ -147,6 +148,7 @@ contract DeployContractsOnly is Script {
mad.registerFacet(address(new StakingOperatorsFacet()));
mad.registerFacet(address(new StakingDepositsFacet()));
mad.registerFacet(address(new StakingDelegationsFacet()));
mad.registerFacet(address(new StakingUnstakeWithdrawFacet()));
// StakingRewardsFacet removed - no longer exists
mad.registerFacet(address(new StakingSlashingFacet()));
mad.registerFacet(address(new StakingAssetsFacet()));
Expand Down
9 changes: 9 additions & 0 deletions script/FullDeploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,15 @@ contract FullDeploy is DeployV2 {
console2.log("Deployed InflationPool:", proxy);
}

/// @notice FullDeploy owns the ServiceFeeDistributor lifecycle end-to-end: it deploys
/// the proxy in `run()` (via `_deployServiceFeeDistributorProxy`), wires it into
/// Tangle/staking/inflation-pool/streaming-manager, hands off its roles, and
/// records it in the manifest. Suppressing the inherited `_deployCore` deploy
/// keeps the impl a single CREATE instead of an orphaned duplicate.
function _deploysServiceFeeDistributorExternally() internal view override returns (bool) {
return true;
}

function _deployServiceFeeDistributorProxy(
address admin,
address staking,
Expand Down
2 changes: 2 additions & 0 deletions script/FullStackScenario.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { Types } from "../src/libraries/Types.sol";
import { StakingOperatorsFacet } from "../src/facets/staking/StakingOperatorsFacet.sol";
import { StakingDepositsFacet } from "../src/facets/staking/StakingDepositsFacet.sol";
import { StakingDelegationsFacet } from "../src/facets/staking/StakingDelegationsFacet.sol";
import { StakingUnstakeWithdrawFacet } from "../src/facets/staking/StakingUnstakeWithdrawFacet.sol";
import { StakingSlashingFacet } from "../src/facets/staking/StakingSlashingFacet.sol";
import { StakingAssetsFacet } from "../src/facets/staking/StakingAssetsFacet.sol";
import { StakingViewsFacet } from "../src/facets/staking/StakingViewsFacet.sol";
Expand Down Expand Up @@ -188,6 +189,7 @@ contract FullStackScenario is Script {
router.registerFacet(address(new StakingOperatorsFacet()));
router.registerFacet(address(new StakingDepositsFacet()));
router.registerFacet(address(new StakingDelegationsFacet()));
router.registerFacet(address(new StakingUnstakeWithdrawFacet()));
router.registerFacet(address(new StakingSlashingFacet()));
router.registerFacet(address(new StakingAssetsFacet()));
router.registerFacet(address(new StakingViewsFacet()));
Expand Down
2 changes: 2 additions & 0 deletions script/LocalTestnet.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import { TangleSlashingFacet } from "../src/facets/tangle/TangleSlashingFacet.so
import { StakingOperatorsFacet } from "../src/facets/staking/StakingOperatorsFacet.sol";
import { StakingDepositsFacet } from "../src/facets/staking/StakingDepositsFacet.sol";
import { StakingDelegationsFacet } from "../src/facets/staking/StakingDelegationsFacet.sol";
import { StakingUnstakeWithdrawFacet } from "../src/facets/staking/StakingUnstakeWithdrawFacet.sol";
import { StakingSlashingFacet } from "../src/facets/staking/StakingSlashingFacet.sol";
import { StakingAssetsFacet } from "../src/facets/staking/StakingAssetsFacet.sol";
import { StakingViewsFacet } from "../src/facets/staking/StakingViewsFacet.sol";
Expand Down Expand Up @@ -1371,6 +1372,7 @@ contract LocalTestnetSetup is Script, BlueprintDefinitionHelper {
router.registerFacet(address(new StakingOperatorsFacet()));
router.registerFacet(address(new StakingDepositsFacet()));
router.registerFacet(address(new StakingDelegationsFacet()));
router.registerFacet(address(new StakingUnstakeWithdrawFacet()));
router.registerFacet(address(new StakingSlashingFacet()));
router.registerFacet(address(new StakingAssetsFacet()));
router.registerFacet(address(new StakingViewsFacet()));
Expand Down
Loading
Loading