Skip to main content

Syndicate Proposer Activation Tutorial (SDK)

This Wizard SDK tutorial will walk through how to poke the syndicate to activate any proposers that are not activated but are eligible to receive rewards since they have been part of the network for at least 4 epochs by default following the fork activation distance rule of the Ethereum Consensus layer.

Prerequisites

Installation of Wizard SDK

npm i @blockswaplab/lsd-wizard

Syndicate address

Obtaining the target syndicate that requires activation can be done through the LSD subgraph:

https://thegraph.com/hosted-service/subgraph/stakehouse-dev/lsd

With the following query:

{
liquidStakingNetworks(where: {
ticker: "DREAM"
}) {
feeRecipientAndSyndicate
}
}

This for example finds the syndicate specifically for the DREAM LSD network.

Step 1: Set up the script

// Set up the SDK by injecting an Ethers.js version 5 signer
import {
Wizard
} from '@blockswaplab/lsd-wizard';

const wizard = new Wizard(ethersJSSigner);

// New up a syndicate contract instance
const syndicateContractAddress = '<insert_from_the_query>';
const contract = (await wizard.contractInstance).syndicate(syndicateContractAddress);

// Check how many proposers are currently activated
let currentlyActivated = await contract.numberOfActiveKnots();
console.log('Currently activated', currentlyActivated.toString());

// Fire the activate proposers transaction
const transaction = await contract.activateProposers();
console.log('Transaction Hash', transaction.hash);
await transaction.wait();

currentlyActivated = await contract.numberOfActiveKnots();
console.log('Currently activated after', currentlyActivated.toString());

Step 2: Execution

If it has worked, you will get a transaction hash that will activate any pending proposers.