MultiValidatorLST entities
Create multi validator LST entities to track their data per LST
MultiValidatorLST {
id: ID // Address
}
Validator set
Using call handlers for addValidator, removeValidator and updateWeight (check exact function signatures on the contract ), track the current validator set id's on the mulitivalidator LST entities.
validators: Int[]
Then in the application we can use multicall on the LST contract with these Ids to fetch the data for each validator LST.stakingPools(id)
struct StakingPool {
address payable tToken; // Address of validator share token
uint256 target; // Target STAKE
uint256 balance; // Current balance of tTokens (OR CURRENT STAKE FOR THIS VALIDATOR)
}
Unstake List
On the multi validator LST entity, using call handlers on the unstakeNFT contract mint, burn and transfer calls update the ids owned by a user for the multi validator LSTs.
MultiValidatorUnstake {
id: ID
user: User
lst: MultiValidatorLST
claimed: Boolean
}
User {
multiValidatorUnstakes: [MultiValidatorUnstake!] @derivedFrom(field: "user")
}
query {
multiValidatorUnstakes(where: {user: $user, claimed: false}) {
id
user {id}
lst {id}
}
}
MultiValidatorLST entities
Create multi validator LST entities to track their data per LST
MultiValidatorLST {
id: ID // Address
}
Validator set
Using call handlers for
addValidator,removeValidatorandupdateWeight(check exact function signatures on the contract ), track the current validator set id's on the mulitivalidator LST entities.validators: Int[]Then in the application we can use
multicallon the LST contract with these Ids to fetch the data for each validatorLST.stakingPools(id)Unstake List
On the multi validator LST entity, using call handlers on the unstakeNFT contract mint, burn and transfer calls update the ids owned by a user for the multi validator LSTs.
query {
multiValidatorUnstakes(where: {user: $user, claimed: false}) {
id
user {id}
lst {id}
}
}