@@ -38,6 +38,20 @@ export interface AuthorizationParameters<
3838 authorizationDecreaseChangePeriod : NumberType
3939}
4040
41+ export interface StakingProviderInfo <
42+ NumberType extends BigNumberish = BigNumber
43+ > {
44+ operator : string
45+ operatorConfirmed : boolean
46+ operatorStartTimestamp : NumberType
47+ authorized : NumberType
48+ deauthorizing : NumberType
49+ endDeauthorization : NumberType
50+ tReward : NumberType
51+ rewardPerTokenPaid : NumberType
52+ endCommitment : NumberType
53+ }
54+
4155export interface StakingProviderAppInfo <
4256 NumberType extends BigNumberish = BigNumber
4357> {
@@ -75,6 +89,8 @@ export interface StakingProviderAppInfo<
7589 * it means that the operator for a given staking provider is not set.
7690 */
7791 isOperatorInPool : boolean | undefined
92+
93+ stakingProviderInfo ?: StakingProviderInfo | undefined
7894}
7995
8096/**
@@ -202,6 +218,8 @@ export interface IApplication {
202218 */
203219 stakingProviderToOperator ( stakingProvider : string ) : Promise < string >
204220
221+ stakingProviderInfo ( stakingProvider : string ) : Promise < StakingProviderInfo >
222+
205223 /**
206224 * Used to get staking provider address mapped to the given registered
207225 * operator address
@@ -314,6 +332,15 @@ export class Application implements IApplication {
314332 } ,
315333 ]
316334
335+ const tacoCalls : ContractCall [ ] = [
336+ {
337+ interface : this . contract . interface ,
338+ address : this . contract . address ,
339+ method : "stakingProviderInfo" ,
340+ args : [ stakingProvider ] ,
341+ } ,
342+ ]
343+
317344 const [
318345 authorizedStake ,
319346 pendingAuthorizationDecrease ,
@@ -323,6 +350,14 @@ export class Application implements IApplication {
323350 [ operator ] ,
324351 ] = await this . _multicall . aggregate ( calls )
325352
353+ let stakingProviderInfo
354+ try {
355+ ; [ stakingProviderInfo ] = await this . _multicall . aggregate ( tacoCalls )
356+ } catch ( error ) {
357+ console . warn ( "Failed to aggregate tacoCalls" , error )
358+ stakingProviderInfo = undefined
359+ }
360+
326361 let isOperatorInPool = undefined
327362 if ( operator && ! isAddressZero ( operator ) ) {
328363 try {
@@ -368,6 +403,7 @@ export class Application implements IApplication {
368403 deauthorizationCreatedAt,
369404 isOperatorInPool,
370405 operator,
406+ stakingProviderInfo,
371407 }
372408 }
373409
@@ -448,6 +484,12 @@ export class Application implements IApplication {
448484 )
449485 }
450486
487+ stakingProviderInfo = async (
488+ stakingProvider : string
489+ ) : Promise < StakingProviderInfo > => {
490+ return await this . _application . stakingProviderInfo ( stakingProvider )
491+ }
492+
451493 stakingProviderToOperator = async (
452494 stakingProvider : string
453495 ) : Promise < string > => {
0 commit comments