From 9cbb90498fe36c8262ef6b11f3292dfb7bee60ae Mon Sep 17 00:00:00 2001 From: Victoria Zotova Date: Wed, 28 Aug 2024 11:57:12 -0400 Subject: [PATCH] chore(deps): bump nucypher-contracts version to 0.23.0 --- packages/shared/package.json | 2 +- .../src/contracts/agents/coordinator.ts | 2 + .../contracts/ethers-typechain/Coordinator.ts | 565 +++++++++--------- .../ethers-typechain/GlobalAllowList.ts | 55 ++ .../factories/Coordinator__factory.ts | 345 +++++------ .../factories/GlobalAllowList__factory.ts | 32 + .../src/contracts/ethers-typechain/index.ts | 4 +- packages/taco/src/dkg.ts | 2 + pnpm-lock.yaml | 9 +- 9 files changed, 523 insertions(+), 493 deletions(-) diff --git a/packages/shared/package.json b/packages/shared/package.json index f08d2401d..a69227a48 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -42,7 +42,7 @@ "dependencies": { "@ethersproject/abi": "^5.7.0", "@ethersproject/providers": "^5.7.2", - "@nucypher/nucypher-contracts": "^0.22.0", + "@nucypher/nucypher-contracts": "^0.23.0", "@nucypher/nucypher-core": "*", "axios": "^1.6.8", "deep-equal": "^2.2.3", diff --git a/packages/shared/src/contracts/agents/coordinator.ts b/packages/shared/src/contracts/agents/coordinator.ts index b2f2cbc91..ab50500c3 100644 --- a/packages/shared/src/contracts/agents/coordinator.ts +++ b/packages/shared/src/contracts/agents/coordinator.ts @@ -74,10 +74,12 @@ export class DkgCoordinatorAgent { providers: ChecksumAddress[], authority: string, duration: BigNumberish, + feeModel: string, accessController: string, ): Promise { const coordinator = await this.connectReadWrite(provider, domain, signer); const tx = await coordinator.initiateRitual( + feeModel, providers, authority, duration, diff --git a/packages/shared/src/contracts/ethers-typechain/Coordinator.ts b/packages/shared/src/contracts/ethers-typechain/Coordinator.ts index 16e6c6633..219475c43 100644 --- a/packages/shared/src/contracts/ethers-typechain/Coordinator.ts +++ b/packages/shared/src/contracts/ethers-typechain/Coordinator.ts @@ -66,21 +66,23 @@ export declare namespace Coordinator { export interface CoordinatorInterface extends utils.Interface { functions: { 'DEFAULT_ADMIN_ROLE()': FunctionFragment; - 'INITIATOR_ROLE()': FunctionFragment; 'TREASURY_ROLE()': FunctionFragment; 'acceptDefaultAdminTransfer()': FunctionFragment; 'application()': FunctionFragment; + 'approveFeeModel(address)': FunctionFragment; 'beginDefaultAdminTransfer(address)': FunctionFragment; 'cancelDefaultAdminTransfer()': FunctionFragment; 'changeDefaultAdminDelay(uint48)': FunctionFragment; 'cohortFingerprint(address[])': FunctionFragment; - 'currency()': FunctionFragment; 'defaultAdmin()': FunctionFragment; 'defaultAdminDelay()': FunctionFragment; 'defaultAdminDelayIncreaseWait()': FunctionFragment; - 'feeDeduction(uint256,uint256)': FunctionFragment; - 'feeRatePerSecond()': FunctionFragment; + 'extendRitual(uint32,uint32)': FunctionFragment; + 'feeModelsRegistry(address)': FunctionFragment; + 'getAccessController(uint32)': FunctionFragment; 'getAuthority(uint32)': FunctionFragment; + 'getFeeModel(uint32)': FunctionFragment; + 'getInitiator(uint32)': FunctionFragment; 'getParticipant(uint32,address,bool)': FunctionFragment; 'getParticipantFromProvider(uint32,address)': FunctionFragment; 'getParticipants(uint32)': FunctionFragment; @@ -89,29 +91,25 @@ export interface CoordinatorInterface extends utils.Interface { 'getProviders(uint32)': FunctionFragment; 'getPublicKeyFromRitualId(uint32)': FunctionFragment; 'getRitualIdFromPublicKey((bytes32,bytes16))': FunctionFragment; - 'getRitualInitiationCost(address[],uint32)': FunctionFragment; 'getRitualState(uint32)': FunctionFragment; 'getRoleAdmin(bytes32)': FunctionFragment; 'getThresholdForRitualSize(uint16)': FunctionFragment; + 'getTimestamps(uint32)': FunctionFragment; 'grantRole(bytes32,address)': FunctionFragment; 'hasRole(bytes32,address)': FunctionFragment; 'initialize(uint32,uint16,address)': FunctionFragment; - 'initiateRitual(address[],address,uint32,address)': FunctionFragment; + 'initiateRitual(address,address[],address,uint32,address)': FunctionFragment; 'isEncryptionAuthorized(uint32,bytes,bytes)': FunctionFragment; - 'isInitiationPublic()': FunctionFragment; 'isParticipant(uint32,address)': FunctionFragment; 'isProviderPublicKeySet(address)': FunctionFragment; 'isRitualActive(uint32)': FunctionFragment; - 'makeInitiationPublic()': FunctionFragment; 'maxDkgSize()': FunctionFragment; 'numberOfRituals()': FunctionFragment; 'owner()': FunctionFragment; 'pendingDefaultAdmin()': FunctionFragment; 'pendingDefaultAdminDelay()': FunctionFragment; - 'pendingFees(uint256)': FunctionFragment; 'postAggregation(uint32,bytes,(bytes32,bytes16),bytes)': FunctionFragment; 'postTranscript(uint32,bytes)': FunctionFragment; - 'processPendingFee(uint32)': FunctionFragment; 'renounceRole(bytes32,address)': FunctionFragment; 'revokeRole(bytes32,address)': FunctionFragment; 'rituals(uint256)': FunctionFragment; @@ -122,29 +120,29 @@ export interface CoordinatorInterface extends utils.Interface { 'setTimeout(uint32)': FunctionFragment; 'supportsInterface(bytes4)': FunctionFragment; 'timeout()': FunctionFragment; - 'totalPendingFees()': FunctionFragment; 'transferRitualAuthority(uint32,address)': FunctionFragment; - 'withdrawTokens(address,uint256)': FunctionFragment; }; getFunction( nameOrSignatureOrTopic: | 'DEFAULT_ADMIN_ROLE' - | 'INITIATOR_ROLE' | 'TREASURY_ROLE' | 'acceptDefaultAdminTransfer' | 'application' + | 'approveFeeModel' | 'beginDefaultAdminTransfer' | 'cancelDefaultAdminTransfer' | 'changeDefaultAdminDelay' | 'cohortFingerprint' - | 'currency' | 'defaultAdmin' | 'defaultAdminDelay' | 'defaultAdminDelayIncreaseWait' - | 'feeDeduction' - | 'feeRatePerSecond' + | 'extendRitual' + | 'feeModelsRegistry' + | 'getAccessController' | 'getAuthority' + | 'getFeeModel' + | 'getInitiator' | 'getParticipant' | 'getParticipantFromProvider' | 'getParticipants(uint32)' @@ -153,29 +151,25 @@ export interface CoordinatorInterface extends utils.Interface { | 'getProviders' | 'getPublicKeyFromRitualId' | 'getRitualIdFromPublicKey' - | 'getRitualInitiationCost' | 'getRitualState' | 'getRoleAdmin' | 'getThresholdForRitualSize' + | 'getTimestamps' | 'grantRole' | 'hasRole' | 'initialize' | 'initiateRitual' | 'isEncryptionAuthorized' - | 'isInitiationPublic' | 'isParticipant' | 'isProviderPublicKeySet' | 'isRitualActive' - | 'makeInitiationPublic' | 'maxDkgSize' | 'numberOfRituals' | 'owner' | 'pendingDefaultAdmin' | 'pendingDefaultAdminDelay' - | 'pendingFees' | 'postAggregation' | 'postTranscript' - | 'processPendingFee' | 'renounceRole' | 'revokeRole' | 'rituals' @@ -186,19 +180,13 @@ export interface CoordinatorInterface extends utils.Interface { | 'setTimeout' | 'supportsInterface' | 'timeout' - | 'totalPendingFees' - | 'transferRitualAuthority' - | 'withdrawTokens', + | 'transferRitualAuthority', ): FunctionFragment; encodeFunctionData( functionFragment: 'DEFAULT_ADMIN_ROLE', values?: undefined, ): string; - encodeFunctionData( - functionFragment: 'INITIATOR_ROLE', - values?: undefined, - ): string; encodeFunctionData( functionFragment: 'TREASURY_ROLE', values?: undefined, @@ -211,6 +199,10 @@ export interface CoordinatorInterface extends utils.Interface { functionFragment: 'application', values?: undefined, ): string; + encodeFunctionData( + functionFragment: 'approveFeeModel', + values: [string], + ): string; encodeFunctionData( functionFragment: 'beginDefaultAdminTransfer', values: [string], @@ -227,7 +219,6 @@ export interface CoordinatorInterface extends utils.Interface { functionFragment: 'cohortFingerprint', values: [string[]], ): string; - encodeFunctionData(functionFragment: 'currency', values?: undefined): string; encodeFunctionData( functionFragment: 'defaultAdmin', values?: undefined, @@ -241,17 +232,29 @@ export interface CoordinatorInterface extends utils.Interface { values?: undefined, ): string; encodeFunctionData( - functionFragment: 'feeDeduction', + functionFragment: 'extendRitual', values: [BigNumberish, BigNumberish], ): string; encodeFunctionData( - functionFragment: 'feeRatePerSecond', - values?: undefined, + functionFragment: 'feeModelsRegistry', + values: [string], + ): string; + encodeFunctionData( + functionFragment: 'getAccessController', + values: [BigNumberish], ): string; encodeFunctionData( functionFragment: 'getAuthority', values: [BigNumberish], ): string; + encodeFunctionData( + functionFragment: 'getFeeModel', + values: [BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'getInitiator', + values: [BigNumberish], + ): string; encodeFunctionData( functionFragment: 'getParticipant', values: [BigNumberish, string, boolean], @@ -284,10 +287,6 @@ export interface CoordinatorInterface extends utils.Interface { functionFragment: 'getRitualIdFromPublicKey', values: [BLS12381.G1PointStruct], ): string; - encodeFunctionData( - functionFragment: 'getRitualInitiationCost', - values: [string[], BigNumberish], - ): string; encodeFunctionData( functionFragment: 'getRitualState', values: [BigNumberish], @@ -300,6 +299,10 @@ export interface CoordinatorInterface extends utils.Interface { functionFragment: 'getThresholdForRitualSize', values: [BigNumberish], ): string; + encodeFunctionData( + functionFragment: 'getTimestamps', + values: [BigNumberish], + ): string; encodeFunctionData( functionFragment: 'grantRole', values: [BytesLike, string], @@ -314,16 +317,12 @@ export interface CoordinatorInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: 'initiateRitual', - values: [string[], string, BigNumberish, string], + values: [string, string[], string, BigNumberish, string], ): string; encodeFunctionData( functionFragment: 'isEncryptionAuthorized', values: [BigNumberish, BytesLike, BytesLike], ): string; - encodeFunctionData( - functionFragment: 'isInitiationPublic', - values?: undefined, - ): string; encodeFunctionData( functionFragment: 'isParticipant', values: [BigNumberish, string], @@ -336,10 +335,6 @@ export interface CoordinatorInterface extends utils.Interface { functionFragment: 'isRitualActive', values: [BigNumberish], ): string; - encodeFunctionData( - functionFragment: 'makeInitiationPublic', - values?: undefined, - ): string; encodeFunctionData( functionFragment: 'maxDkgSize', values?: undefined, @@ -357,10 +352,6 @@ export interface CoordinatorInterface extends utils.Interface { functionFragment: 'pendingDefaultAdminDelay', values?: undefined, ): string; - encodeFunctionData( - functionFragment: 'pendingFees', - values: [BigNumberish], - ): string; encodeFunctionData( functionFragment: 'postAggregation', values: [BigNumberish, BytesLike, BLS12381.G1PointStruct, BytesLike], @@ -369,10 +360,6 @@ export interface CoordinatorInterface extends utils.Interface { functionFragment: 'postTranscript', values: [BigNumberish, BytesLike], ): string; - encodeFunctionData( - functionFragment: 'processPendingFee', - values: [BigNumberish], - ): string; encodeFunctionData( functionFragment: 'renounceRole', values: [BytesLike, string], @@ -410,27 +397,15 @@ export interface CoordinatorInterface extends utils.Interface { values: [BytesLike], ): string; encodeFunctionData(functionFragment: 'timeout', values?: undefined): string; - encodeFunctionData( - functionFragment: 'totalPendingFees', - values?: undefined, - ): string; encodeFunctionData( functionFragment: 'transferRitualAuthority', values: [BigNumberish, string], ): string; - encodeFunctionData( - functionFragment: 'withdrawTokens', - values: [string, BigNumberish], - ): string; decodeFunctionResult( functionFragment: 'DEFAULT_ADMIN_ROLE', data: BytesLike, ): Result; - decodeFunctionResult( - functionFragment: 'INITIATOR_ROLE', - data: BytesLike, - ): Result; decodeFunctionResult( functionFragment: 'TREASURY_ROLE', data: BytesLike, @@ -443,6 +418,10 @@ export interface CoordinatorInterface extends utils.Interface { functionFragment: 'application', data: BytesLike, ): Result; + decodeFunctionResult( + functionFragment: 'approveFeeModel', + data: BytesLike, + ): Result; decodeFunctionResult( functionFragment: 'beginDefaultAdminTransfer', data: BytesLike, @@ -459,7 +438,6 @@ export interface CoordinatorInterface extends utils.Interface { functionFragment: 'cohortFingerprint', data: BytesLike, ): Result; - decodeFunctionResult(functionFragment: 'currency', data: BytesLike): Result; decodeFunctionResult( functionFragment: 'defaultAdmin', data: BytesLike, @@ -473,17 +451,29 @@ export interface CoordinatorInterface extends utils.Interface { data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: 'feeDeduction', + functionFragment: 'extendRitual', data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: 'feeRatePerSecond', + functionFragment: 'feeModelsRegistry', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getAccessController', data: BytesLike, ): Result; decodeFunctionResult( functionFragment: 'getAuthority', data: BytesLike, ): Result; + decodeFunctionResult( + functionFragment: 'getFeeModel', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getInitiator', + data: BytesLike, + ): Result; decodeFunctionResult( functionFragment: 'getParticipant', data: BytesLike, @@ -516,10 +506,6 @@ export interface CoordinatorInterface extends utils.Interface { functionFragment: 'getRitualIdFromPublicKey', data: BytesLike, ): Result; - decodeFunctionResult( - functionFragment: 'getRitualInitiationCost', - data: BytesLike, - ): Result; decodeFunctionResult( functionFragment: 'getRitualState', data: BytesLike, @@ -532,6 +518,10 @@ export interface CoordinatorInterface extends utils.Interface { functionFragment: 'getThresholdForRitualSize', data: BytesLike, ): Result; + decodeFunctionResult( + functionFragment: 'getTimestamps', + data: BytesLike, + ): Result; decodeFunctionResult(functionFragment: 'grantRole', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'hasRole', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'initialize', data: BytesLike): Result; @@ -543,10 +533,6 @@ export interface CoordinatorInterface extends utils.Interface { functionFragment: 'isEncryptionAuthorized', data: BytesLike, ): Result; - decodeFunctionResult( - functionFragment: 'isInitiationPublic', - data: BytesLike, - ): Result; decodeFunctionResult( functionFragment: 'isParticipant', data: BytesLike, @@ -559,10 +545,6 @@ export interface CoordinatorInterface extends utils.Interface { functionFragment: 'isRitualActive', data: BytesLike, ): Result; - decodeFunctionResult( - functionFragment: 'makeInitiationPublic', - data: BytesLike, - ): Result; decodeFunctionResult(functionFragment: 'maxDkgSize', data: BytesLike): Result; decodeFunctionResult( functionFragment: 'numberOfRituals', @@ -577,10 +559,6 @@ export interface CoordinatorInterface extends utils.Interface { functionFragment: 'pendingDefaultAdminDelay', data: BytesLike, ): Result; - decodeFunctionResult( - functionFragment: 'pendingFees', - data: BytesLike, - ): Result; decodeFunctionResult( functionFragment: 'postAggregation', data: BytesLike, @@ -589,10 +567,6 @@ export interface CoordinatorInterface extends utils.Interface { functionFragment: 'postTranscript', data: BytesLike, ): Result; - decodeFunctionResult( - functionFragment: 'processPendingFee', - data: BytesLike, - ): Result; decodeFunctionResult( functionFragment: 'renounceRole', data: BytesLike, @@ -621,18 +595,10 @@ export interface CoordinatorInterface extends utils.Interface { data: BytesLike, ): Result; decodeFunctionResult(functionFragment: 'timeout', data: BytesLike): Result; - decodeFunctionResult( - functionFragment: 'totalPendingFees', - data: BytesLike, - ): Result; decodeFunctionResult( functionFragment: 'transferRitualAuthority', data: BytesLike, ): Result; - decodeFunctionResult( - functionFragment: 'withdrawTokens', - data: BytesLike, - ): Result; events: { 'AggregationPosted(uint32,address,bytes32)': EventFragment; @@ -641,11 +607,13 @@ export interface CoordinatorInterface extends utils.Interface { 'DefaultAdminTransferCanceled()': EventFragment; 'DefaultAdminTransferScheduled(address,uint48)': EventFragment; 'EndRitual(uint32,bool)': EventFragment; + 'FeeModelApproved(address)': EventFragment; 'Initialized(uint64)': EventFragment; 'MaxDkgSizeChanged(uint16,uint16)': EventFragment; 'ParticipantPublicKeySet(uint32,address,(bytes32,bytes32,bytes32))': EventFragment; 'ReimbursementPoolSet(address)': EventFragment; 'RitualAuthorityTransferred(uint32,address,address)': EventFragment; + 'RitualExtended(uint32,uint32)': EventFragment; 'RoleAdminChanged(bytes32,bytes32,bytes32)': EventFragment; 'RoleGranted(bytes32,address,address)': EventFragment; 'RoleRevoked(bytes32,address,address)': EventFragment; @@ -669,11 +637,13 @@ export interface CoordinatorInterface extends utils.Interface { nameOrSignatureOrTopic: 'DefaultAdminTransferScheduled', ): EventFragment; getEvent(nameOrSignatureOrTopic: 'EndRitual'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'FeeModelApproved'): EventFragment; getEvent(nameOrSignatureOrTopic: 'Initialized'): EventFragment; getEvent(nameOrSignatureOrTopic: 'MaxDkgSizeChanged'): EventFragment; getEvent(nameOrSignatureOrTopic: 'ParticipantPublicKeySet'): EventFragment; getEvent(nameOrSignatureOrTopic: 'ReimbursementPoolSet'): EventFragment; getEvent(nameOrSignatureOrTopic: 'RitualAuthorityTransferred'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'RitualExtended'): EventFragment; getEvent(nameOrSignatureOrTopic: 'RoleAdminChanged'): EventFragment; getEvent(nameOrSignatureOrTopic: 'RoleGranted'): EventFragment; getEvent(nameOrSignatureOrTopic: 'RoleRevoked'): EventFragment; @@ -749,6 +719,17 @@ export type EndRitualEvent = TypedEvent< export type EndRitualEventFilter = TypedEventFilter; +export interface FeeModelApprovedEventObject { + feeModel: string; +} +export type FeeModelApprovedEvent = TypedEvent< + [string], + FeeModelApprovedEventObject +>; + +export type FeeModelApprovedEventFilter = + TypedEventFilter; + export interface InitializedEventObject { version: BigNumber; } @@ -805,6 +786,17 @@ export type RitualAuthorityTransferredEvent = TypedEvent< export type RitualAuthorityTransferredEventFilter = TypedEventFilter; +export interface RitualExtendedEventObject { + ritualId: number; + endTimestamp: number; +} +export type RitualExtendedEvent = TypedEvent< + [number, number], + RitualExtendedEventObject +>; + +export type RitualExtendedEventFilter = TypedEventFilter; + export interface RoleAdminChangedEventObject { role: string; previousAdminRole: string; @@ -918,8 +910,6 @@ export interface Coordinator extends BaseContract { functions: { DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise<[string]>; - INITIATOR_ROLE(overrides?: CallOverrides): Promise<[string]>; - TREASURY_ROLE(overrides?: CallOverrides): Promise<[string]>; acceptDefaultAdminTransfer( @@ -928,6 +918,11 @@ export interface Coordinator extends BaseContract { application(overrides?: CallOverrides): Promise<[string]>; + approveFeeModel( + feeModel: string, + overrides?: Overrides & { from?: string }, + ): Promise; + beginDefaultAdminTransfer( newAdmin: string, overrides?: Overrides & { from?: string }, @@ -947,27 +942,43 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise<[string]>; - currency(overrides?: CallOverrides): Promise<[string]>; - defaultAdmin(overrides?: CallOverrides): Promise<[string]>; defaultAdminDelay(overrides?: CallOverrides): Promise<[number]>; defaultAdminDelayIncreaseWait(overrides?: CallOverrides): Promise<[number]>; - feeDeduction( - arg0: BigNumberish, - arg1: BigNumberish, + extendRitual( + ritualId: BigNumberish, + duration: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + feeModelsRegistry( + arg0: string, overrides?: CallOverrides, - ): Promise<[BigNumber]>; + ): Promise<[boolean]>; - feeRatePerSecond(overrides?: CallOverrides): Promise<[BigNumber]>; + getAccessController( + ritualId: BigNumberish, + overrides?: CallOverrides, + ): Promise<[string]>; getAuthority( ritualId: BigNumberish, overrides?: CallOverrides, ): Promise<[string]>; + getFeeModel( + ritualId: BigNumberish, + overrides?: CallOverrides, + ): Promise<[string]>; + + getInitiator( + ritualId: BigNumberish, + overrides?: CallOverrides, + ): Promise<[string]>; + getParticipant( ritualId: BigNumberish, provider: string, @@ -1015,12 +1026,6 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise<[number] & { ritualId: number }>; - getRitualInitiationCost( - providers: string[], - duration: BigNumberish, - overrides?: CallOverrides, - ): Promise<[BigNumber]>; - getRitualState( ritualId: BigNumberish, overrides?: CallOverrides, @@ -1033,6 +1038,13 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise<[number]>; + getTimestamps( + ritualId: BigNumberish, + overrides?: CallOverrides, + ): Promise< + [number, number] & { initTimestamp: number; endTimestamp: number } + >; + grantRole( role: BytesLike, account: string, @@ -1053,6 +1065,7 @@ export interface Coordinator extends BaseContract { ): Promise; initiateRitual( + feeModel: string, providers: string[], authority: string, duration: BigNumberish, @@ -1067,8 +1080,6 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise<[boolean]>; - isInitiationPublic(overrides?: CallOverrides): Promise<[boolean]>; - isParticipant( ritualId: BigNumberish, provider: string, @@ -1085,10 +1096,6 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise<[boolean]>; - makeInitiationPublic( - overrides?: Overrides & { from?: string }, - ): Promise; - maxDkgSize(overrides?: CallOverrides): Promise<[number]>; numberOfRituals(overrides?: CallOverrides): Promise<[BigNumber]>; @@ -1103,11 +1110,6 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise<[number, number] & { newDelay: number; schedule: number }>; - pendingFees( - arg0: BigNumberish, - overrides?: CallOverrides, - ): Promise<[BigNumber]>; - postAggregation( ritualId: BigNumberish, aggregatedTranscript: BytesLike, @@ -1122,11 +1124,6 @@ export interface Coordinator extends BaseContract { overrides?: Overrides & { from?: string }, ): Promise; - processPendingFee( - ritualId: BigNumberish, - overrides?: Overrides & { from?: string }, - ): Promise; - renounceRole( role: BytesLike, account: string, @@ -1156,6 +1153,7 @@ export interface Coordinator extends BaseContract { string, BLS12381.G1PointStructOutput, string, + string, ] & { initiator: string; initTimestamp: number; @@ -1169,6 +1167,7 @@ export interface Coordinator extends BaseContract { accessController: string; publicKey: BLS12381.G1PointStructOutput; aggregatedTranscript: string; + feeModel: string; } >; @@ -1203,25 +1202,15 @@ export interface Coordinator extends BaseContract { timeout(overrides?: CallOverrides): Promise<[number]>; - totalPendingFees(overrides?: CallOverrides): Promise<[BigNumber]>; - transferRitualAuthority( ritualId: BigNumberish, newAuthority: string, overrides?: Overrides & { from?: string }, ): Promise; - - withdrawTokens( - token: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string }, - ): Promise; }; DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; - INITIATOR_ROLE(overrides?: CallOverrides): Promise; - TREASURY_ROLE(overrides?: CallOverrides): Promise; acceptDefaultAdminTransfer( @@ -1230,6 +1219,11 @@ export interface Coordinator extends BaseContract { application(overrides?: CallOverrides): Promise; + approveFeeModel( + feeModel: string, + overrides?: Overrides & { from?: string }, + ): Promise; + beginDefaultAdminTransfer( newAdmin: string, overrides?: Overrides & { from?: string }, @@ -1249,27 +1243,40 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; - currency(overrides?: CallOverrides): Promise; - defaultAdmin(overrides?: CallOverrides): Promise; defaultAdminDelay(overrides?: CallOverrides): Promise; defaultAdminDelayIncreaseWait(overrides?: CallOverrides): Promise; - feeDeduction( - arg0: BigNumberish, - arg1: BigNumberish, - overrides?: CallOverrides, - ): Promise; + extendRitual( + ritualId: BigNumberish, + duration: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + feeModelsRegistry(arg0: string, overrides?: CallOverrides): Promise; - feeRatePerSecond(overrides?: CallOverrides): Promise; + getAccessController( + ritualId: BigNumberish, + overrides?: CallOverrides, + ): Promise; getAuthority( ritualId: BigNumberish, overrides?: CallOverrides, ): Promise; + getFeeModel( + ritualId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getInitiator( + ritualId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + getParticipant( ritualId: BigNumberish, provider: string, @@ -1317,12 +1324,6 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; - getRitualInitiationCost( - providers: string[], - duration: BigNumberish, - overrides?: CallOverrides, - ): Promise; - getRitualState( ritualId: BigNumberish, overrides?: CallOverrides, @@ -1335,6 +1336,13 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; + getTimestamps( + ritualId: BigNumberish, + overrides?: CallOverrides, + ): Promise< + [number, number] & { initTimestamp: number; endTimestamp: number } + >; + grantRole( role: BytesLike, account: string, @@ -1355,6 +1363,7 @@ export interface Coordinator extends BaseContract { ): Promise; initiateRitual( + feeModel: string, providers: string[], authority: string, duration: BigNumberish, @@ -1369,8 +1378,6 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; - isInitiationPublic(overrides?: CallOverrides): Promise; - isParticipant( ritualId: BigNumberish, provider: string, @@ -1387,10 +1394,6 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; - makeInitiationPublic( - overrides?: Overrides & { from?: string }, - ): Promise; - maxDkgSize(overrides?: CallOverrides): Promise; numberOfRituals(overrides?: CallOverrides): Promise; @@ -1405,11 +1408,6 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise<[number, number] & { newDelay: number; schedule: number }>; - pendingFees( - arg0: BigNumberish, - overrides?: CallOverrides, - ): Promise; - postAggregation( ritualId: BigNumberish, aggregatedTranscript: BytesLike, @@ -1424,11 +1422,6 @@ export interface Coordinator extends BaseContract { overrides?: Overrides & { from?: string }, ): Promise; - processPendingFee( - ritualId: BigNumberish, - overrides?: Overrides & { from?: string }, - ): Promise; - renounceRole( role: BytesLike, account: string, @@ -1458,6 +1451,7 @@ export interface Coordinator extends BaseContract { string, BLS12381.G1PointStructOutput, string, + string, ] & { initiator: string; initTimestamp: number; @@ -1471,6 +1465,7 @@ export interface Coordinator extends BaseContract { accessController: string; publicKey: BLS12381.G1PointStructOutput; aggregatedTranscript: string; + feeModel: string; } >; @@ -1505,31 +1500,23 @@ export interface Coordinator extends BaseContract { timeout(overrides?: CallOverrides): Promise; - totalPendingFees(overrides?: CallOverrides): Promise; - transferRitualAuthority( ritualId: BigNumberish, newAuthority: string, overrides?: Overrides & { from?: string }, ): Promise; - withdrawTokens( - token: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string }, - ): Promise; - callStatic: { DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; - INITIATOR_ROLE(overrides?: CallOverrides): Promise; - TREASURY_ROLE(overrides?: CallOverrides): Promise; acceptDefaultAdminTransfer(overrides?: CallOverrides): Promise; application(overrides?: CallOverrides): Promise; + approveFeeModel(feeModel: string, overrides?: CallOverrides): Promise; + beginDefaultAdminTransfer( newAdmin: string, overrides?: CallOverrides, @@ -1547,27 +1534,43 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; - currency(overrides?: CallOverrides): Promise; - defaultAdmin(overrides?: CallOverrides): Promise; defaultAdminDelay(overrides?: CallOverrides): Promise; defaultAdminDelayIncreaseWait(overrides?: CallOverrides): Promise; - feeDeduction( - arg0: BigNumberish, - arg1: BigNumberish, + extendRitual( + ritualId: BigNumberish, + duration: BigNumberish, overrides?: CallOverrides, - ): Promise; + ): Promise; - feeRatePerSecond(overrides?: CallOverrides): Promise; + feeModelsRegistry( + arg0: string, + overrides?: CallOverrides, + ): Promise; + + getAccessController( + ritualId: BigNumberish, + overrides?: CallOverrides, + ): Promise; getAuthority( ritualId: BigNumberish, overrides?: CallOverrides, ): Promise; + getFeeModel( + ritualId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getInitiator( + ritualId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + getParticipant( ritualId: BigNumberish, provider: string, @@ -1615,12 +1618,6 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; - getRitualInitiationCost( - providers: string[], - duration: BigNumberish, - overrides?: CallOverrides, - ): Promise; - getRitualState( ritualId: BigNumberish, overrides?: CallOverrides, @@ -1633,6 +1630,13 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; + getTimestamps( + ritualId: BigNumberish, + overrides?: CallOverrides, + ): Promise< + [number, number] & { initTimestamp: number; endTimestamp: number } + >; + grantRole( role: BytesLike, account: string, @@ -1653,6 +1657,7 @@ export interface Coordinator extends BaseContract { ): Promise; initiateRitual( + feeModel: string, providers: string[], authority: string, duration: BigNumberish, @@ -1667,8 +1672,6 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; - isInitiationPublic(overrides?: CallOverrides): Promise; - isParticipant( ritualId: BigNumberish, provider: string, @@ -1685,8 +1688,6 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; - makeInitiationPublic(overrides?: CallOverrides): Promise; - maxDkgSize(overrides?: CallOverrides): Promise; numberOfRituals(overrides?: CallOverrides): Promise; @@ -1701,11 +1702,6 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise<[number, number] & { newDelay: number; schedule: number }>; - pendingFees( - arg0: BigNumberish, - overrides?: CallOverrides, - ): Promise; - postAggregation( ritualId: BigNumberish, aggregatedTranscript: BytesLike, @@ -1720,11 +1716,6 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; - processPendingFee( - ritualId: BigNumberish, - overrides?: CallOverrides, - ): Promise; - renounceRole( role: BytesLike, account: string, @@ -1754,6 +1745,7 @@ export interface Coordinator extends BaseContract { string, BLS12381.G1PointStructOutput, string, + string, ] & { initiator: string; initTimestamp: number; @@ -1767,6 +1759,7 @@ export interface Coordinator extends BaseContract { accessController: string; publicKey: BLS12381.G1PointStructOutput; aggregatedTranscript: string; + feeModel: string; } >; @@ -1799,19 +1792,11 @@ export interface Coordinator extends BaseContract { timeout(overrides?: CallOverrides): Promise; - totalPendingFees(overrides?: CallOverrides): Promise; - transferRitualAuthority( ritualId: BigNumberish, newAuthority: string, overrides?: CallOverrides, ): Promise; - - withdrawTokens( - token: string, - amount: BigNumberish, - overrides?: CallOverrides, - ): Promise; }; filters: { @@ -1859,6 +1844,9 @@ export interface Coordinator extends BaseContract { successful?: null, ): EndRitualEventFilter; + 'FeeModelApproved(address)'(feeModel?: null): FeeModelApprovedEventFilter; + FeeModelApproved(feeModel?: null): FeeModelApprovedEventFilter; + 'Initialized(uint64)'(version?: null): InitializedEventFilter; Initialized(version?: null): InitializedEventFilter; @@ -1898,6 +1886,15 @@ export interface Coordinator extends BaseContract { newAuthority?: string | null, ): RitualAuthorityTransferredEventFilter; + 'RitualExtended(uint32,uint32)'( + ritualId?: BigNumberish | null, + endTimestamp?: null, + ): RitualExtendedEventFilter; + RitualExtended( + ritualId?: BigNumberish | null, + endTimestamp?: null, + ): RitualExtendedEventFilter; + 'RoleAdminChanged(bytes32,bytes32,bytes32)'( role?: BytesLike | null, previousAdminRole?: BytesLike | null, @@ -1973,8 +1970,6 @@ export interface Coordinator extends BaseContract { estimateGas: { DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; - INITIATOR_ROLE(overrides?: CallOverrides): Promise; - TREASURY_ROLE(overrides?: CallOverrides): Promise; acceptDefaultAdminTransfer( @@ -1983,6 +1978,11 @@ export interface Coordinator extends BaseContract { application(overrides?: CallOverrides): Promise; + approveFeeModel( + feeModel: string, + overrides?: Overrides & { from?: string }, + ): Promise; + beginDefaultAdminTransfer( newAdmin: string, overrides?: Overrides & { from?: string }, @@ -2002,8 +2002,6 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; - currency(overrides?: CallOverrides): Promise; - defaultAdmin(overrides?: CallOverrides): Promise; defaultAdminDelay(overrides?: CallOverrides): Promise; @@ -2012,19 +2010,37 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; - feeDeduction( - arg0: BigNumberish, - arg1: BigNumberish, + extendRitual( + ritualId: BigNumberish, + duration: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + feeModelsRegistry( + arg0: string, overrides?: CallOverrides, ): Promise; - feeRatePerSecond(overrides?: CallOverrides): Promise; + getAccessController( + ritualId: BigNumberish, + overrides?: CallOverrides, + ): Promise; getAuthority( ritualId: BigNumberish, overrides?: CallOverrides, ): Promise; + getFeeModel( + ritualId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getInitiator( + ritualId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + getParticipant( ritualId: BigNumberish, provider: string, @@ -2072,12 +2088,6 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; - getRitualInitiationCost( - providers: string[], - duration: BigNumberish, - overrides?: CallOverrides, - ): Promise; - getRitualState( ritualId: BigNumberish, overrides?: CallOverrides, @@ -2093,6 +2103,11 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; + getTimestamps( + ritualId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + grantRole( role: BytesLike, account: string, @@ -2113,6 +2128,7 @@ export interface Coordinator extends BaseContract { ): Promise; initiateRitual( + feeModel: string, providers: string[], authority: string, duration: BigNumberish, @@ -2127,8 +2143,6 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; - isInitiationPublic(overrides?: CallOverrides): Promise; - isParticipant( ritualId: BigNumberish, provider: string, @@ -2145,10 +2159,6 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; - makeInitiationPublic( - overrides?: Overrides & { from?: string }, - ): Promise; - maxDkgSize(overrides?: CallOverrides): Promise; numberOfRituals(overrides?: CallOverrides): Promise; @@ -2159,11 +2169,6 @@ export interface Coordinator extends BaseContract { pendingDefaultAdminDelay(overrides?: CallOverrides): Promise; - pendingFees( - arg0: BigNumberish, - overrides?: CallOverrides, - ): Promise; - postAggregation( ritualId: BigNumberish, aggregatedTranscript: BytesLike, @@ -2178,11 +2183,6 @@ export interface Coordinator extends BaseContract { overrides?: Overrides & { from?: string }, ): Promise; - processPendingFee( - ritualId: BigNumberish, - overrides?: Overrides & { from?: string }, - ): Promise; - renounceRole( role: BytesLike, account: string, @@ -2228,19 +2228,11 @@ export interface Coordinator extends BaseContract { timeout(overrides?: CallOverrides): Promise; - totalPendingFees(overrides?: CallOverrides): Promise; - transferRitualAuthority( ritualId: BigNumberish, newAuthority: string, overrides?: Overrides & { from?: string }, ): Promise; - - withdrawTokens( - token: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string }, - ): Promise; }; populateTransaction: { @@ -2248,8 +2240,6 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; - INITIATOR_ROLE(overrides?: CallOverrides): Promise; - TREASURY_ROLE(overrides?: CallOverrides): Promise; acceptDefaultAdminTransfer( @@ -2258,6 +2248,11 @@ export interface Coordinator extends BaseContract { application(overrides?: CallOverrides): Promise; + approveFeeModel( + feeModel: string, + overrides?: Overrides & { from?: string }, + ): Promise; + beginDefaultAdminTransfer( newAdmin: string, overrides?: Overrides & { from?: string }, @@ -2277,8 +2272,6 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; - currency(overrides?: CallOverrides): Promise; - defaultAdmin(overrides?: CallOverrides): Promise; defaultAdminDelay(overrides?: CallOverrides): Promise; @@ -2287,19 +2280,37 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; - feeDeduction( - arg0: BigNumberish, - arg1: BigNumberish, + extendRitual( + ritualId: BigNumberish, + duration: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + feeModelsRegistry( + arg0: string, overrides?: CallOverrides, ): Promise; - feeRatePerSecond(overrides?: CallOverrides): Promise; + getAccessController( + ritualId: BigNumberish, + overrides?: CallOverrides, + ): Promise; getAuthority( ritualId: BigNumberish, overrides?: CallOverrides, ): Promise; + getFeeModel( + ritualId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getInitiator( + ritualId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + getParticipant( ritualId: BigNumberish, provider: string, @@ -2347,12 +2358,6 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; - getRitualInitiationCost( - providers: string[], - duration: BigNumberish, - overrides?: CallOverrides, - ): Promise; - getRitualState( ritualId: BigNumberish, overrides?: CallOverrides, @@ -2368,6 +2373,11 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; + getTimestamps( + ritualId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + grantRole( role: BytesLike, account: string, @@ -2388,6 +2398,7 @@ export interface Coordinator extends BaseContract { ): Promise; initiateRitual( + feeModel: string, providers: string[], authority: string, duration: BigNumberish, @@ -2402,10 +2413,6 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; - isInitiationPublic( - overrides?: CallOverrides, - ): Promise; - isParticipant( ritualId: BigNumberish, provider: string, @@ -2422,10 +2429,6 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; - makeInitiationPublic( - overrides?: Overrides & { from?: string }, - ): Promise; - maxDkgSize(overrides?: CallOverrides): Promise; numberOfRituals(overrides?: CallOverrides): Promise; @@ -2440,11 +2443,6 @@ export interface Coordinator extends BaseContract { overrides?: CallOverrides, ): Promise; - pendingFees( - arg0: BigNumberish, - overrides?: CallOverrides, - ): Promise; - postAggregation( ritualId: BigNumberish, aggregatedTranscript: BytesLike, @@ -2459,11 +2457,6 @@ export interface Coordinator extends BaseContract { overrides?: Overrides & { from?: string }, ): Promise; - processPendingFee( - ritualId: BigNumberish, - overrides?: Overrides & { from?: string }, - ): Promise; - renounceRole( role: BytesLike, account: string, @@ -2512,18 +2505,10 @@ export interface Coordinator extends BaseContract { timeout(overrides?: CallOverrides): Promise; - totalPendingFees(overrides?: CallOverrides): Promise; - transferRitualAuthority( ritualId: BigNumberish, newAuthority: string, overrides?: Overrides & { from?: string }, ): Promise; - - withdrawTokens( - token: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string }, - ): Promise; }; } diff --git a/packages/shared/src/contracts/ethers-typechain/GlobalAllowList.ts b/packages/shared/src/contracts/ethers-typechain/GlobalAllowList.ts index 517a9d7f0..d6c681f97 100644 --- a/packages/shared/src/contracts/ethers-typechain/GlobalAllowList.ts +++ b/packages/shared/src/contracts/ethers-typechain/GlobalAllowList.ts @@ -28,6 +28,8 @@ import type { export interface GlobalAllowListInterface extends utils.Interface { functions: { + 'MAX_AUTH_ACTIONS()': FunctionFragment; + 'authActions(uint32)': FunctionFragment; 'authorize(uint32,address[])': FunctionFragment; 'coordinator()': FunctionFragment; 'deauthorize(uint32,address[])': FunctionFragment; @@ -37,6 +39,8 @@ export interface GlobalAllowListInterface extends utils.Interface { getFunction( nameOrSignatureOrTopic: + | 'MAX_AUTH_ACTIONS' + | 'authActions' | 'authorize' | 'coordinator' | 'deauthorize' @@ -44,6 +48,14 @@ export interface GlobalAllowListInterface extends utils.Interface { | 'isAuthorized', ): FunctionFragment; + encodeFunctionData( + functionFragment: 'MAX_AUTH_ACTIONS', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'authActions', + values: [BigNumberish], + ): string; encodeFunctionData( functionFragment: 'authorize', values: [BigNumberish, string[]], @@ -65,6 +77,14 @@ export interface GlobalAllowListInterface extends utils.Interface { values: [BigNumberish, BytesLike, BytesLike], ): string; + decodeFunctionResult( + functionFragment: 'MAX_AUTH_ACTIONS', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'authActions', + data: BytesLike, + ): Result; decodeFunctionResult(functionFragment: 'authorize', data: BytesLike): Result; decodeFunctionResult( functionFragment: 'coordinator', @@ -130,6 +150,13 @@ export interface GlobalAllowList extends BaseContract { removeListener: OnEvent; functions: { + MAX_AUTH_ACTIONS(overrides?: CallOverrides): Promise<[number]>; + + authActions( + arg0: BigNumberish, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + authorize( ritualId: BigNumberish, addresses: string[], @@ -158,6 +185,13 @@ export interface GlobalAllowList extends BaseContract { ): Promise<[boolean]>; }; + MAX_AUTH_ACTIONS(overrides?: CallOverrides): Promise; + + authActions( + arg0: BigNumberish, + overrides?: CallOverrides, + ): Promise; + authorize( ritualId: BigNumberish, addresses: string[], @@ -186,6 +220,13 @@ export interface GlobalAllowList extends BaseContract { ): Promise; callStatic: { + MAX_AUTH_ACTIONS(overrides?: CallOverrides): Promise; + + authActions( + arg0: BigNumberish, + overrides?: CallOverrides, + ): Promise; + authorize( ritualId: BigNumberish, addresses: string[], @@ -228,6 +269,13 @@ export interface GlobalAllowList extends BaseContract { }; estimateGas: { + MAX_AUTH_ACTIONS(overrides?: CallOverrides): Promise; + + authActions( + arg0: BigNumberish, + overrides?: CallOverrides, + ): Promise; + authorize( ritualId: BigNumberish, addresses: string[], @@ -257,6 +305,13 @@ export interface GlobalAllowList extends BaseContract { }; populateTransaction: { + MAX_AUTH_ACTIONS(overrides?: CallOverrides): Promise; + + authActions( + arg0: BigNumberish, + overrides?: CallOverrides, + ): Promise; + authorize( ritualId: BigNumberish, addresses: string[], diff --git a/packages/shared/src/contracts/ethers-typechain/factories/Coordinator__factory.ts b/packages/shared/src/contracts/ethers-typechain/factories/Coordinator__factory.ts index b0efa6bb9..71a4c6ede 100644 --- a/packages/shared/src/contracts/ethers-typechain/factories/Coordinator__factory.ts +++ b/packages/shared/src/contracts/ethers-typechain/factories/Coordinator__factory.ts @@ -16,16 +16,6 @@ const _abi = [ type: 'address', internalType: 'contract ITACoChildApplication', }, - { - name: '_currency', - type: 'address', - internalType: 'contract IERC20', - }, - { - name: '_feeRatePerSecond', - type: 'uint256', - internalType: 'uint256', - }, ], }, { @@ -76,33 +66,6 @@ const _abi = [ }, ], }, - { - type: 'error', - name: 'AddressEmptyCode', - inputs: [ - { - name: 'target', - type: 'address', - internalType: 'address', - }, - ], - }, - { - type: 'error', - name: 'AddressInsufficientBalance', - inputs: [ - { - name: 'account', - type: 'address', - internalType: 'address', - }, - ], - }, - { - type: 'error', - name: 'FailedInnerCall', - inputs: [], - }, { type: 'error', name: 'InvalidInitialization', @@ -129,17 +92,6 @@ const _abi = [ }, ], }, - { - type: 'error', - name: 'SafeERC20FailedOperation', - inputs: [ - { - name: 'token', - type: 'address', - internalType: 'address', - }, - ], - }, { type: 'event', name: 'AggregationPosted', @@ -234,6 +186,19 @@ const _abi = [ ], anonymous: false, }, + { + type: 'event', + name: 'FeeModelApproved', + inputs: [ + { + name: 'feeModel', + type: 'address', + internalType: 'contract IFeeModel', + indexed: false, + }, + ], + anonymous: false, + }, { type: 'event', name: 'Initialized', @@ -346,6 +311,25 @@ const _abi = [ ], anonymous: false, }, + { + type: 'event', + name: 'RitualExtended', + inputs: [ + { + name: 'ritualId', + type: 'uint32', + internalType: 'uint32', + indexed: true, + }, + { + name: 'endTimestamp', + type: 'uint32', + internalType: 'uint32', + indexed: false, + }, + ], + anonymous: false, + }, { type: 'event', name: 'RoleAdminChanged', @@ -516,19 +500,6 @@ const _abi = [ }, ], }, - { - type: 'function', - name: 'INITIATOR_ROLE', - stateMutability: 'view', - inputs: [], - outputs: [ - { - name: '', - type: 'bytes32', - internalType: 'bytes32', - }, - ], - }, { type: 'function', name: 'TREASURY_ROLE', @@ -562,6 +533,19 @@ const _abi = [ }, ], }, + { + type: 'function', + name: 'approveFeeModel', + stateMutability: 'nonpayable', + inputs: [ + { + name: 'feeModel', + type: 'address', + internalType: 'contract IFeeModel', + }, + ], + outputs: [], + }, { type: 'function', name: 'beginDefaultAdminTransfer', @@ -616,33 +600,33 @@ const _abi = [ }, { type: 'function', - name: 'currency', + name: 'defaultAdmin', stateMutability: 'view', inputs: [], outputs: [ { name: '', type: 'address', - internalType: 'contract IERC20', + internalType: 'address', }, ], }, { type: 'function', - name: 'defaultAdmin', + name: 'defaultAdminDelay', stateMutability: 'view', inputs: [], outputs: [ { name: '', - type: 'address', - internalType: 'address', + type: 'uint48', + internalType: 'uint48', }, ], }, { type: 'function', - name: 'defaultAdminDelay', + name: 'defaultAdminDelayIncreaseWait', stateMutability: 'view', inputs: [], outputs: [ @@ -655,57 +639,101 @@ const _abi = [ }, { type: 'function', - name: 'defaultAdminDelayIncreaseWait', + name: 'extendRitual', + stateMutability: 'nonpayable', + inputs: [ + { + name: 'ritualId', + type: 'uint32', + internalType: 'uint32', + }, + { + name: 'duration', + type: 'uint32', + internalType: 'uint32', + }, + ], + outputs: [], + }, + { + type: 'function', + name: 'feeModelsRegistry', stateMutability: 'view', - inputs: [], + inputs: [ + { + name: '', + type: 'address', + internalType: 'contract IFeeModel', + }, + ], outputs: [ { name: '', - type: 'uint48', - internalType: 'uint48', + type: 'bool', + internalType: 'bool', }, ], }, { type: 'function', - name: 'feeDeduction', - stateMutability: 'pure', + name: 'getAccessController', + stateMutability: 'view', inputs: [ { - name: '', - type: 'uint256', - internalType: 'uint256', + name: 'ritualId', + type: 'uint32', + internalType: 'uint32', }, + ], + outputs: [ { name: '', - type: 'uint256', - internalType: 'uint256', + type: 'address', + internalType: 'contract IEncryptionAuthorizer', + }, + ], + }, + { + type: 'function', + name: 'getAuthority', + stateMutability: 'view', + inputs: [ + { + name: 'ritualId', + type: 'uint32', + internalType: 'uint32', }, ], outputs: [ { name: '', - type: 'uint256', - internalType: 'uint256', + type: 'address', + internalType: 'address', }, ], }, { type: 'function', - name: 'feeRatePerSecond', + name: 'getFeeModel', stateMutability: 'view', - inputs: [], + inputs: [ + { + name: 'ritualId', + type: 'uint32', + internalType: 'uint32', + }, + ], outputs: [ { name: '', - type: 'uint256', - internalType: 'uint256', + type: 'address', + internalType: 'contract IFeeModel', }, ], }, { type: 'function', - name: 'getAuthority', + name: 'getInitiator', stateMutability: 'view', inputs: [ { @@ -1038,30 +1066,6 @@ const _abi = [ }, ], }, - { - type: 'function', - name: 'getRitualInitiationCost', - stateMutability: 'view', - inputs: [ - { - name: 'providers', - type: 'address[]', - internalType: 'address[]', - }, - { - name: 'duration', - type: 'uint32', - internalType: 'uint32', - }, - ], - outputs: [ - { - name: '', - type: 'uint256', - internalType: 'uint256', - }, - ], - }, { type: 'function', name: 'getRitualState', @@ -1119,6 +1123,30 @@ const _abi = [ }, ], }, + { + type: 'function', + name: 'getTimestamps', + stateMutability: 'view', + inputs: [ + { + name: 'ritualId', + type: 'uint32', + internalType: 'uint32', + }, + ], + outputs: [ + { + name: 'initTimestamp', + type: 'uint32', + internalType: 'uint32', + }, + { + name: 'endTimestamp', + type: 'uint32', + internalType: 'uint32', + }, + ], + }, { type: 'function', name: 'grantRole', @@ -1189,6 +1217,11 @@ const _abi = [ name: 'initiateRitual', stateMutability: 'nonpayable', inputs: [ + { + name: 'feeModel', + type: 'address', + internalType: 'contract IFeeModel', + }, { name: 'providers', type: 'address[]', @@ -1247,19 +1280,6 @@ const _abi = [ }, ], }, - { - type: 'function', - name: 'isInitiationPublic', - stateMutability: 'view', - inputs: [], - outputs: [ - { - name: '', - type: 'bool', - internalType: 'bool', - }, - ], - }, { type: 'function', name: 'isParticipant', @@ -1322,13 +1342,6 @@ const _abi = [ }, ], }, - { - type: 'function', - name: 'makeInitiationPublic', - stateMutability: 'nonpayable', - inputs: [], - outputs: [], - }, { type: 'function', name: 'maxDkgSize', @@ -1404,25 +1417,6 @@ const _abi = [ }, ], }, - { - type: 'function', - name: 'pendingFees', - stateMutability: 'view', - inputs: [ - { - name: '', - type: 'uint256', - internalType: 'uint256', - }, - ], - outputs: [ - { - name: '', - type: 'uint256', - internalType: 'uint256', - }, - ], - }, { type: 'function', name: 'postAggregation', @@ -1481,25 +1475,6 @@ const _abi = [ ], outputs: [], }, - { - type: 'function', - name: 'processPendingFee', - stateMutability: 'nonpayable', - inputs: [ - { - name: 'ritualId', - type: 'uint32', - internalType: 'uint32', - }, - ], - outputs: [ - { - name: 'refundableFee', - type: 'uint256', - internalType: 'uint256', - }, - ], - }, { type: 'function', name: 'renounceRole', @@ -1620,6 +1595,11 @@ const _abi = [ type: 'bytes', internalType: 'bytes', }, + { + name: 'feeModel', + type: 'address', + internalType: 'contract IFeeModel', + }, ], }, { @@ -1730,19 +1710,6 @@ const _abi = [ }, ], }, - { - type: 'function', - name: 'totalPendingFees', - stateMutability: 'view', - inputs: [], - outputs: [ - { - name: '', - type: 'uint256', - internalType: 'uint256', - }, - ], - }, { type: 'function', name: 'transferRitualAuthority', @@ -1761,24 +1728,6 @@ const _abi = [ ], outputs: [], }, - { - type: 'function', - name: 'withdrawTokens', - stateMutability: 'nonpayable', - inputs: [ - { - name: 'token', - type: 'address', - internalType: 'contract IERC20', - }, - { - name: 'amount', - type: 'uint256', - internalType: 'uint256', - }, - ], - outputs: [], - }, ] as const; export class Coordinator__factory { diff --git a/packages/shared/src/contracts/ethers-typechain/factories/GlobalAllowList__factory.ts b/packages/shared/src/contracts/ethers-typechain/factories/GlobalAllowList__factory.ts index d53e71fd1..8eac0678c 100644 --- a/packages/shared/src/contracts/ethers-typechain/factories/GlobalAllowList__factory.ts +++ b/packages/shared/src/contracts/ethers-typechain/factories/GlobalAllowList__factory.ts @@ -73,6 +73,38 @@ const _abi = [ ], anonymous: false, }, + { + type: 'function', + name: 'MAX_AUTH_ACTIONS', + stateMutability: 'view', + inputs: [], + outputs: [ + { + name: '', + type: 'uint32', + internalType: 'uint32', + }, + ], + }, + { + type: 'function', + name: 'authActions', + stateMutability: 'view', + inputs: [ + { + name: '', + type: 'uint32', + internalType: 'uint32', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, { type: 'function', name: 'authorize', diff --git a/packages/shared/src/contracts/ethers-typechain/index.ts b/packages/shared/src/contracts/ethers-typechain/index.ts index 34c1c7811..e0b86d8c9 100644 --- a/packages/shared/src/contracts/ethers-typechain/index.ts +++ b/packages/shared/src/contracts/ethers-typechain/index.ts @@ -2,9 +2,9 @@ /* tslint:disable */ /* eslint-disable */ export type { Coordinator } from './Coordinator'; -export type { GlobalAllowList } from './GlobalAllowList'; -export type { SubscriptionManager } from './SubscriptionManager'; export * as factories from './factories'; export { Coordinator__factory } from './factories/Coordinator__factory'; export { GlobalAllowList__factory } from './factories/GlobalAllowList__factory'; export { SubscriptionManager__factory } from './factories/SubscriptionManager__factory'; +export type { GlobalAllowList } from './GlobalAllowList'; +export type { SubscriptionManager } from './SubscriptionManager'; diff --git a/packages/taco/src/dkg.ts b/packages/taco/src/dkg.ts index 8e6ce50ec..d86ae9406 100644 --- a/packages/taco/src/dkg.ts +++ b/packages/taco/src/dkg.ts @@ -73,6 +73,7 @@ export class DkgClient { ursulas: ChecksumAddress[], authority: string, duration: BigNumberish, + feeModel: string, accessController: string, waitUntilEnd = false, ): Promise { @@ -83,6 +84,7 @@ export class DkgClient { ursulas.sort(), // Contract call requires sorted addresses authority, duration, + feeModel, accessController, ); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 348873d59..d13c798db 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -495,8 +495,8 @@ importers: specifier: ^5.7.2 version: 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@nucypher/nucypher-contracts': - specifier: ^0.22.0 - version: 0.22.0 + specifier: ^0.23.0 + version: 0.23.0 '@nucypher/nucypher-core': specifier: ^0.14.5 version: 0.14.5 @@ -2225,6 +2225,9 @@ packages: '@nucypher/nucypher-contracts@0.22.0': resolution: {integrity: sha512-poWxFBi2qL5KnPZYsqr4AWn/O26Z2Q6X9EoARjQZIZdcEqYvE6iMHHgiw/RKL036u1jh1/rzo44eZRCt6ErMpA==} + '@nucypher/nucypher-contracts@0.23.0': + resolution: {integrity: sha512-vilcgICbFzSP2x5otEJHzmaKsbX4t6DIU8aj4U33taTeCdR62LDFS6tCG1r+XzgSmIJZO8ksO5bGzaEHF+r1Ww==} + '@nucypher/nucypher-core@0.14.5': resolution: {integrity: sha512-Q3kBuJL0qtTtnxrM5DEQauQUvDlXmwubm9u1h7gbyLhs+aZNC9WDyjEUbE43+uahlHu4k1hKEMxD1gjV165ChA==} @@ -11102,6 +11105,8 @@ snapshots: '@nucypher/nucypher-contracts@0.22.0': {} + '@nucypher/nucypher-contracts@0.23.0': {} + '@nucypher/nucypher-core@0.14.5': {} '@nucypher/shared@0.2.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)':