diff --git a/packages/contract-helpers/src/commons/types.ts b/packages/contract-helpers/src/commons/types.ts index 0c12eff7..ec8e3d0b 100644 --- a/packages/contract-helpers/src/commons/types.ts +++ b/packages/contract-helpers/src/commons/types.ts @@ -143,6 +143,8 @@ export enum ProtocolAction { claimRewardsAndStake = 'claimRewardsAndStake', setUsageAsCollateral = 'setUsageAsCollateral', withdrawAndSwitch = 'withdrawAndSwitch', + batchMetaDelegate = 'batchMetaDelegate', + updateRepresentatives = 'updateRepresentatives', } export enum GovernanceVote { diff --git a/packages/contract-helpers/src/commons/utils.ts b/packages/contract-helpers/src/commons/utils.ts index e711ac9b..2b9db750 100644 --- a/packages/contract-helpers/src/commons/utils.ts +++ b/packages/contract-helpers/src/commons/utils.ts @@ -138,6 +138,14 @@ export const gasLimitRecommendations: GasRecommendationType = { limit: '1000000', recommended: '1000000', }, + [ProtocolAction.batchMetaDelegate]: { + limit: '200000', + recommended: '200000', + }, + [ProtocolAction.updateRepresentatives]: { + limit: '60000', + recommended: '60000', + }, }; export const mintAmountsPerToken: Record = { diff --git a/packages/contract-helpers/src/governance-v3/aave-token-v3/index.ts b/packages/contract-helpers/src/governance-v3/aave-token-v3/index.ts new file mode 100644 index 00000000..10d970da --- /dev/null +++ b/packages/contract-helpers/src/governance-v3/aave-token-v3/index.ts @@ -0,0 +1,84 @@ +import { BigNumber, PopulatedTransaction, providers } from 'ethers'; +import { AaveTokenV3 } from '../typechain/AaveTokenV3'; +import { AaveTokenV3__factory } from '../typechain/factories/AaveTokenV3__factory'; + +export enum GovernancePowerType { + VOTING, + PROPOSITION, + ALL, +} + +interface Eip712Domain { + name: string; + version: string; + chainId: BigNumber; + verifyingContract: string; +} + +export class AaveTokenV3Service { + readonly _contract: AaveTokenV3; + readonly _contractInterface = AaveTokenV3__factory.createInterface(); + + constructor(tokenAddress: string, provider: providers.Provider) { + this._contract = AaveTokenV3__factory.connect(tokenAddress, provider); + } + + public async balanceOf(user: string) { + return this._contract.balanceOf(user); + } + + public async getPowerAt( + blockNumber: number, + user: string, + delegationType: GovernancePowerType, + ) { + return this._contract.functions.getPowerCurrent(user, delegationType, { + blockTag: blockNumber, + }); + } + + public async getPowers(user: string) { + const powers = await this._contract.getPowersCurrent(user); + return { + votingPower: powers[0], + propositionPower: powers[1], + }; + } + + public async getDelegateeData(user: string) { + const data = await this._contract.getDelegates(user); + return { + votingDelegatee: data[0], + propositionDelegatee: data[1], + }; + } + + public getDelegateTxData( + user: string, + delegateTo: string, + type: GovernancePowerType, + ): PopulatedTransaction { + const tx: PopulatedTransaction = {}; + if (type === GovernancePowerType.ALL) { + tx.data = this._contractInterface.encodeFunctionData('delegate', [ + delegateTo, + ]); + } else { + tx.data = this._contractInterface.encodeFunctionData('delegateByType', [ + delegateTo, + type, + ]); + } + + return { + ...tx, + to: this._contract.address, + from: user, + gasLimit: BigNumber.from('100000'), + }; + } + + public async getEip712Domain(): Promise { + return this._contract.functions.eip712Domain(); + } +} diff --git a/packages/contract-helpers/src/governance-v3/delegate-helper/index.ts b/packages/contract-helpers/src/governance-v3/delegate-helper/index.ts new file mode 100644 index 00000000..94e01c2f --- /dev/null +++ b/packages/contract-helpers/src/governance-v3/delegate-helper/index.ts @@ -0,0 +1,150 @@ +import { BigNumber, PopulatedTransaction, providers } from 'ethers'; +import { tEthereumAddress, ENS, ProtocolAction } from '../../commons/types'; +import { gasLimitRecommendations } from '../../commons/utils'; +import { MetaDelegateHelper } from '../typechain/MetaDelegateHelper'; +import { MetaDelegateHelper__factory } from '../typechain/factories/MetaDelegateHelper__factory'; +export enum DelegationType { + VOTING, + PROPOSITION, + ALL, +} + +export type MetaDelegateParams = { + delegator: string; + delegatee: string; + underlyingAsset: string; + deadline: string; + v: number; + r: string; + s: string; + delegationType: number; +}; + +export type DelegateMetaSigParams = { + underlyingAsset: tEthereumAddress; + delegatee: tEthereumAddress | ENS; + delegationType: DelegationType; + delegator: tEthereumAddress; + increaseNonce: boolean; + governanceTokenName: string; + nonce: string; + connectedChainId: number; + deadline: string; +}; + +export class MetaDelegateHelperService { + readonly _contract: MetaDelegateHelper; + + readonly _contractInterface = MetaDelegateHelper__factory.createInterface(); + private readonly metaDelegateHelperContractAddress: string; + + constructor( + metaDelegateHelperContractAddress: string, + provider: providers.Provider, + ) { + this.metaDelegateHelperContractAddress = metaDelegateHelperContractAddress; // Assign the contract address + + this._contract = MetaDelegateHelper__factory.connect( + metaDelegateHelperContractAddress, + provider, + ); + } + + public batchMetaDelegate( + user: string, + delegateParams: MetaDelegateParams[], + ): PopulatedTransaction { + const tx: PopulatedTransaction = { + data: this._contractInterface.encodeFunctionData('batchMetaDelegate', [ + delegateParams, + ]), + to: this.metaDelegateHelperContractAddress, + from: user, + gasLimit: BigNumber.from( + gasLimitRecommendations[ProtocolAction.batchMetaDelegate].limit, + ), + }; + return tx; + } + + public async prepareV3DelegateByTypeSignature({ + underlyingAsset, + delegatee, + delegationType, + delegator, + increaseNonce, + governanceTokenName, + nonce, + connectedChainId, + deadline, + }: DelegateMetaSigParams): Promise { + const isAllDelegate = delegationType === DelegationType.ALL; + + const sigBaseType = [ + { name: 'nonce', type: 'uint256' }, + { name: 'deadline', type: 'uint256' }, + ]; + const sigParametersType = [ + { name: 'delegator', type: 'address' }, + { name: 'delegatee', type: 'address' }, + ]; + const sigDelegationTypeType = [{ name: 'delegationType', type: 'uint8' }]; + + const typesData = { + delegator, + delegatee, + nonce: BigInt(increaseNonce ? Number(nonce) + 1 : nonce).toString(), + deadline, + }; + + const eIP712DomainType = { + EIP712Domain: [ + { + name: 'name', + type: 'string', + }, + { + name: 'version', + type: 'string', + }, + { + name: 'chainId', + type: 'uint256', + }, + { + name: 'verifyingContract', + type: 'address', + }, + ], + }; + + const typeData = { + domain: { + name: governanceTokenName, + version: '2', + chainId: connectedChainId, + verifyingContract: underlyingAsset, + }, + types: isAllDelegate + ? { + ...eIP712DomainType, + Delegate: [...sigParametersType, ...sigBaseType], + } + : { + ...eIP712DomainType, + + DelegateByType: [ + ...sigParametersType, + ...sigDelegationTypeType, + ...sigBaseType, + ], + }, + primaryType: isAllDelegate ? 'Delegate' : 'DelegateByType', + message: isAllDelegate + ? { ...typesData } + : { ...typesData, delegationType }, + }; + + return JSON.stringify(typeData); + } +} diff --git a/packages/contract-helpers/src/governance-v3/governance-core/index.ts b/packages/contract-helpers/src/governance-v3/governance-core/index.ts new file mode 100644 index 00000000..46c45dc6 --- /dev/null +++ b/packages/contract-helpers/src/governance-v3/governance-core/index.ts @@ -0,0 +1,55 @@ +import { BigNumber, PopulatedTransaction, providers } from 'ethers'; +import { ChainId, ProtocolAction } from '../../commons/types'; +import { gasLimitRecommendations } from '../../commons/utils'; +import { + GovernanceCore, + GovernanceCoreInterface, +} from '../typechain/GovernanceCore'; +import { GovernanceCore__factory } from '../typechain/factories/GovernanceCore__factory'; + +export interface GovernanceCoreServiceInterface { + getProposalCount: () => Promise; + updateRepresentativesForChain: ( + user: string, + representatives: Array<{ representative: string; chainId: ChainId }>, + ) => PopulatedTransaction; +} +export class GovernanceCoreService implements GovernanceCoreServiceInterface { + private readonly _contractInterface: GovernanceCoreInterface; + private readonly _contractInstance: GovernanceCore; + + constructor( + governanceCoreContractAddress: string, + provider: providers.Provider, + ) { + this._contractInterface = GovernanceCore__factory.createInterface(); + this._contractInstance = GovernanceCore__factory.connect( + governanceCoreContractAddress, + provider, + ); + } + + public async getProposalCount(): Promise { + const count = await this._contractInstance.getProposalsCount(); + return count.toNumber(); + } + + public updateRepresentativesForChain( + user: string, + representatives: Array<{ representative: string; chainId: ChainId }>, + ): PopulatedTransaction { + const actionTx: PopulatedTransaction = { + data: this._contractInterface.encodeFunctionData( + 'updateRepresentativesForChain', + [representatives], + ), + to: this._contractInstance.address, + from: user, + gasLimit: BigNumber.from( + gasLimitRecommendations[ProtocolAction.updateRepresentatives].limit, + ), + }; + + return actionTx; + } +} diff --git a/packages/contract-helpers/src/governance-v3/governance-data-helper/index.ts b/packages/contract-helpers/src/governance-v3/governance-data-helper/index.ts new file mode 100644 index 00000000..3c7abb78 --- /dev/null +++ b/packages/contract-helpers/src/governance-v3/governance-data-helper/index.ts @@ -0,0 +1,228 @@ +import { providers } from 'ethers'; +import { GovernanceDataHelper as GovernanceDataHelperContract } from '../typechain/GovernanceDataHelper'; +import { GovernanceDataHelper__factory } from '../typechain/factories/GovernanceDataHelper__factory'; + +export enum AccessLevel { + /** Do not use */ + None, + /** listing assets, changes of assets params, updates of the protocol etc */ + Short_Executor, + /** payloads controller updates */ + Long_Executor, +} + +export enum ProposalV3State { + /** proposal does not exist */ + Null, + /** created, waiting for a cooldown to initiate the balances snapshot */ + Created, + /** balances snapshot set, voting in progress */ + Active, + /** voting results submitted, but proposal is under grace period when guardian can cancel it */ + Queued, + /** results sent to the execution chain(s) */ + Executed, + /** voting was not successful */ + Failed, + /** got cancelled by guardian, or because proposition power of creator dropped below allowed minimum */ + Cancelled, + Expired, +} + +export type ProposalPayload = { + chain: number; + accessLevel: AccessLevel; + payloadsController: string; + payloadId: number; +}; + +export type ProposalV3 = { + state: ProposalV3State; + accessLevel: AccessLevel; + creationTime: number; + votingDuration: number; + votingActivationTime: number; + queuingTime: number; + cancelTimestamp: number; + creator: string; + votingPortal: string; + snapshotBlockHash: string; + ipfsHash: string; + forVotes: string; + againstVotes: string; + cancellationFee: string; + payloads: ProposalPayload[]; +}; + +export type ProposalData = { + id: string; + votingChainId: number; + proposalData: ProposalV3; +}; + +export type VotingConfig = { + accessLevel: AccessLevel; + config: { + coolDownBeforeVotingStart: string; + votingDuration: string; + quorum: string; + differential: string; + minPropositionPower: string; + }; +}; + +export type Constants = { + votingConfigs: VotingConfig[]; + precisionDivider: string; + cooldownPeriod: string; + expirationTime: string; + cancellationFee: string; +}; + +export type Representative = { + chainId: number; + representative: string; +}; + +export type Rpresented = { + chainId: number; + votersRepresented: string[]; +}; + +export interface GovernanceDataHelperInterface { + getConstants: (govCore: string, accessLevels: number[]) => Promise; + getProposalsData: ( + govCore: string, + from: number, + to: number, + pageSize: number, + ) => Promise; + getRepresentationData: ( + govCore: string, + wallet: string, + chainIds: number[], + ) => Promise<{ + Representatives: Representative[]; + Represented: Rpresented[]; + }>; +} + +export class GovernanceDataHelperService + implements GovernanceDataHelperInterface +{ + private readonly _contract: GovernanceDataHelperContract; + + constructor( + governanceDataHelperContractAddress: string, + provider: providers.Provider, + ) { + this._contract = GovernanceDataHelper__factory.connect( + governanceDataHelperContractAddress, + provider, + ); + } + + public async getConstants( + govCore: string, + accessLevels: number[], + ): Promise { + const data = await this._contract.getConstants(govCore, accessLevels); + + const votingConfigs = data.votingConfigs.map(votingConfig => { + return { + accessLevel: votingConfig.accessLevel, + config: { + coolDownBeforeVotingStart: + votingConfig.config.coolDownBeforeVotingStart.toString(), + votingDuration: votingConfig.config.votingDuration.toString(), + quorum: votingConfig.config.yesThreshold.toString(), + differential: votingConfig.config.yesNoDifferential.toString(), + minPropositionPower: + votingConfig.config.minPropositionPower.toString(), + }, + }; + }); + + return { + votingConfigs, + precisionDivider: data.precisionDivider.toString(), + cooldownPeriod: data.cooldownPeriod.toString(), + expirationTime: data.expirationTime.toString(), + cancellationFee: data.cancellationFee.toString(), + }; + } + + public async getProposalsData( + govCore: string, + from: number, + to: number, + pageSize: number, + ) { + const data = await this._contract.getProposalsData( + govCore, + from, + to, + pageSize, + ); + + return data.map(proposalData => { + return { + id: proposalData.id.toString(), + votingChainId: proposalData.votingChainId.toNumber(), + proposalData: { + state: proposalData.proposalData.state, + accessLevel: proposalData.proposalData.accessLevel, + creationTime: proposalData.proposalData.creationTime, + votingDuration: proposalData.proposalData.votingDuration, + votingActivationTime: proposalData.proposalData.votingActivationTime, + queuingTime: proposalData.proposalData.queuingTime, + cancelTimestamp: proposalData.proposalData.cancelTimestamp, + creator: proposalData.proposalData.creator, + votingPortal: proposalData.proposalData.votingPortal, + snapshotBlockHash: proposalData.proposalData.snapshotBlockHash, + ipfsHash: proposalData.proposalData.ipfsHash, + forVotes: proposalData.proposalData.forVotes.toString(), + againstVotes: proposalData.proposalData.againstVotes.toString(), + cancellationFee: proposalData.proposalData.cancellationFee.toString(), + payloads: proposalData.proposalData.payloads.map( + payload => { + return { + chain: payload.chain.toNumber(), + accessLevel: payload.accessLevel, + payloadsController: payload.payloadsController, + payloadId: payload.payloadId, + }; + }, + ), + }, + }; + }); + } + + public async getRepresentationData( + govCore: string, + wallet: string, + chainIds: number[], + ): Promise<{ Representatives: Representative[]; Represented: Rpresented[] }> { + const data = await this._contract.getRepresentationData( + govCore, + wallet, + chainIds, + ); + + return { + Representatives: data[0].map(representative => { + return { + chainId: representative.chainId.toNumber(), + representative: representative.representative, + }; + }), + Represented: data[1].map(represented => { + return { + chainId: represented.chainId.toNumber(), + votersRepresented: represented.votersRepresented, + }; + }), + }; + } +} diff --git a/packages/contract-helpers/src/governance-v3/payloads-data-helper/index.ts b/packages/contract-helpers/src/governance-v3/payloads-data-helper/index.ts new file mode 100644 index 00000000..0c6e96e4 --- /dev/null +++ b/packages/contract-helpers/src/governance-v3/payloads-data-helper/index.ts @@ -0,0 +1,88 @@ +import { providers } from 'ethers'; +import { AccessLevel } from '../governance-data-helper'; +import { PayloadsControllerDataHelper } from '../typechain/PayloadsControllerDataHelper'; +import { PayloadsControllerDataHelper__factory } from '../typechain/factories/PayloadsControllerDataHelper__factory'; + +export enum PayloadState { + None, + Created, + Queued, + Executed, + Cancelled, + Expired, +} + +export type ExecutionAction = { + target: string; + withDelegateCall: boolean; + accessLevel: AccessLevel; + value: string; + signature: string; + callData: string; +}; + +export type Payload = { + id: string; + creator: string; + maximumAccessLevelRequired: AccessLevel; + state: PayloadState; + createdAt: number; + queuedAt: number; + executedAt: number; + cancelledAt: number; + expirationTime: number; + delay: number; + gracePeriod: number; + actions: ExecutionAction[]; +}; +export class PayloadsDataHelperService { + private readonly _contract: PayloadsControllerDataHelper; + + constructor( + payloadsHelperContracAddress: string, + provider: providers.Provider, + ) { + this._contract = PayloadsControllerDataHelper__factory.connect( + payloadsHelperContracAddress, + provider, + ); + } + + public async getPayloadsData( + payloadsControllerAddress: string, + payloadsIds: number[], + ): Promise { + const data = await this._contract.getPayloadsData( + payloadsControllerAddress, + payloadsIds, + ); + + const payloads = data.map(payload => { + return { + id: payload.id.toString(), + creator: payload.data.creator, + maximumAccessLevelRequired: payload.data.maximumAccessLevelRequired, + state: payload.data.state, + createdAt: payload.data.createdAt, + queuedAt: payload.data.queuedAt, + executedAt: payload.data.executedAt, + cancelledAt: payload.data.cancelledAt, + expirationTime: payload.data.expirationTime, + delay: payload.data.delay, + gracePeriod: payload.data.gracePeriod, + actions: payload.data.actions.map(action => { + return { + target: action.target, + withDelegateCall: action.withDelegateCall, + accessLevel: action.accessLevel, + value: action.value.toString(), + signature: action.signature, + callData: action.callData, + }; + }), + }; + }); + + return payloads; + } +} diff --git a/packages/contract-helpers/src/governance-v3/typechain/AaveTokenV3.d.ts b/packages/contract-helpers/src/governance-v3/typechain/AaveTokenV3.d.ts new file mode 100644 index 00000000..d6b4f0a1 --- /dev/null +++ b/packages/contract-helpers/src/governance-v3/typechain/AaveTokenV3.d.ts @@ -0,0 +1,1109 @@ +/* Autogenerated file. Do not edit manually. */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers'; +import type { + FunctionFragment, + Result, + EventFragment, +} from '@ethersproject/abi'; +import type { Listener, Provider } from '@ethersproject/providers'; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from './common'; + +export interface AaveTokenV3Interface extends utils.Interface { + functions: { + 'DELEGATE_BY_TYPE_TYPEHASH()': FunctionFragment; + 'DELEGATE_TYPEHASH()': FunctionFragment; + 'DOMAIN_SEPARATOR()': FunctionFragment; + 'PERMIT_TYPEHASH()': FunctionFragment; + 'POWER_SCALE_FACTOR()': FunctionFragment; + 'REVISION()': FunctionFragment; + '_nonces(address)': FunctionFragment; + 'allowance(address,address)': FunctionFragment; + 'approve(address,uint256)': FunctionFragment; + 'balanceOf(address)': FunctionFragment; + 'decimals()': FunctionFragment; + 'decreaseAllowance(address,uint256)': FunctionFragment; + 'delegate(address)': FunctionFragment; + 'delegateByType(address,uint8)': FunctionFragment; + 'eip712Domain()': FunctionFragment; + 'getDelegateeByType(address,uint8)': FunctionFragment; + 'getDelegates(address)': FunctionFragment; + 'getPowerCurrent(address,uint8)': FunctionFragment; + 'getPowersCurrent(address)': FunctionFragment; + 'increaseAllowance(address,uint256)': FunctionFragment; + 'initialize()': FunctionFragment; + 'metaDelegate(address,address,uint256,uint8,bytes32,bytes32)': FunctionFragment; + 'metaDelegateByType(address,address,uint8,uint256,uint8,bytes32,bytes32)': FunctionFragment; + 'name()': FunctionFragment; + 'permit(address,address,uint256,uint256,uint8,bytes32,bytes32)': FunctionFragment; + 'symbol()': FunctionFragment; + 'totalSupply()': FunctionFragment; + 'transfer(address,uint256)': FunctionFragment; + 'transferFrom(address,address,uint256)': FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | 'DELEGATE_BY_TYPE_TYPEHASH' + | 'DELEGATE_TYPEHASH' + | 'DOMAIN_SEPARATOR' + | 'PERMIT_TYPEHASH' + | 'POWER_SCALE_FACTOR' + | 'REVISION' + | '_nonces' + | 'allowance' + | 'approve' + | 'balanceOf' + | 'decimals' + | 'decreaseAllowance' + | 'delegate' + | 'delegateByType' + | 'eip712Domain' + | 'getDelegateeByType' + | 'getDelegates' + | 'getPowerCurrent' + | 'getPowersCurrent' + | 'increaseAllowance' + | 'initialize' + | 'metaDelegate' + | 'metaDelegateByType' + | 'name' + | 'permit' + | 'symbol' + | 'totalSupply' + | 'transfer' + | 'transferFrom', + ): FunctionFragment; + + encodeFunctionData( + functionFragment: 'DELEGATE_BY_TYPE_TYPEHASH', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'DELEGATE_TYPEHASH', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'DOMAIN_SEPARATOR', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'PERMIT_TYPEHASH', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'POWER_SCALE_FACTOR', + values?: undefined, + ): string; + encodeFunctionData(functionFragment: 'REVISION', values?: undefined): string; + encodeFunctionData(functionFragment: '_nonces', values: [string]): string; + encodeFunctionData( + functionFragment: 'allowance', + values: [string, string], + ): string; + encodeFunctionData( + functionFragment: 'approve', + values: [string, BigNumberish], + ): string; + encodeFunctionData(functionFragment: 'balanceOf', values: [string]): string; + encodeFunctionData(functionFragment: 'decimals', values?: undefined): string; + encodeFunctionData( + functionFragment: 'decreaseAllowance', + values: [string, BigNumberish], + ): string; + encodeFunctionData(functionFragment: 'delegate', values: [string]): string; + encodeFunctionData( + functionFragment: 'delegateByType', + values: [string, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'eip712Domain', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'getDelegateeByType', + values: [string, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'getDelegates', + values: [string], + ): string; + encodeFunctionData( + functionFragment: 'getPowerCurrent', + values: [string, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'getPowersCurrent', + values: [string], + ): string; + encodeFunctionData( + functionFragment: 'increaseAllowance', + values: [string, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'initialize', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'metaDelegate', + values: [string, string, BigNumberish, BigNumberish, BytesLike, BytesLike], + ): string; + encodeFunctionData( + functionFragment: 'metaDelegateByType', + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike, + ], + ): string; + encodeFunctionData(functionFragment: 'name', values?: undefined): string; + encodeFunctionData( + functionFragment: 'permit', + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike, + ], + ): string; + encodeFunctionData(functionFragment: 'symbol', values?: undefined): string; + encodeFunctionData( + functionFragment: 'totalSupply', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'transfer', + values: [string, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'transferFrom', + values: [string, string, BigNumberish], + ): string; + + decodeFunctionResult( + functionFragment: 'DELEGATE_BY_TYPE_TYPEHASH', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'DELEGATE_TYPEHASH', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'DOMAIN_SEPARATOR', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'PERMIT_TYPEHASH', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'POWER_SCALE_FACTOR', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'REVISION', data: BytesLike): Result; + decodeFunctionResult(functionFragment: '_nonces', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'allowance', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'approve', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'balanceOf', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'decimals', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'decreaseAllowance', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'delegate', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'delegateByType', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'eip712Domain', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getDelegateeByType', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getDelegates', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getPowerCurrent', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getPowersCurrent', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'increaseAllowance', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'initialize', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'metaDelegate', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'metaDelegateByType', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'name', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'permit', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'symbol', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'totalSupply', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'transfer', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'transferFrom', + data: BytesLike, + ): Result; + + events: { + 'Approval(address,address,uint256)': EventFragment; + 'DelegateChanged(address,address,uint8)': EventFragment; + 'EIP712DomainChanged()': EventFragment; + 'Transfer(address,address,uint256)': EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: 'Approval'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'DelegateChanged'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'EIP712DomainChanged'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Transfer'): EventFragment; +} + +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface DelegateChangedEventObject { + delegator: string; + delegatee: string; + delegationType: number; +} +export type DelegateChangedEvent = TypedEvent< + [string, string, number], + DelegateChangedEventObject +>; + +export type DelegateChangedEventFilter = TypedEventFilter; + +export interface EIP712DomainChangedEventObject {} +export type EIP712DomainChangedEvent = TypedEvent< + [], + EIP712DomainChangedEventObject +>; + +export type EIP712DomainChangedEventFilter = + TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface AaveTokenV3 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: AaveTokenV3Interface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter, + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter, + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + DELEGATE_BY_TYPE_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + POWER_SCALE_FACTOR(overrides?: CallOverrides): Promise<[BigNumber]>; + + REVISION(overrides?: CallOverrides): Promise<[BigNumber]>; + + _nonces(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + eip712Domain(overrides?: CallOverrides): Promise< + [string, string, string, BigNumber, string, string, BigNumber[]] & { + fields: string; + name: string; + version: string; + chainId: BigNumber; + verifyingContract: string; + salt: string; + extensions: BigNumber[]; + } + >; + + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides, + ): Promise<[string]>; + + getDelegates( + delegator: string, + overrides?: CallOverrides, + ): Promise<[string, string]>; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + getPowersCurrent( + user: string, + overrides?: CallOverrides, + ): Promise<[BigNumber, BigNumber]>; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + initialize( + overrides?: Overrides & { from?: string }, + ): Promise; + + metaDelegate( + delegator: string, + delegatee: string, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + metaDelegateByType( + delegator: string, + delegatee: string, + delegationType: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + }; + + DELEGATE_BY_TYPE_TYPEHASH(overrides?: CallOverrides): Promise; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + POWER_SCALE_FACTOR(overrides?: CallOverrides): Promise; + + REVISION(overrides?: CallOverrides): Promise; + + _nonces(arg0: string, overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides, + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + eip712Domain(overrides?: CallOverrides): Promise< + [string, string, string, BigNumber, string, string, BigNumber[]] & { + fields: string; + name: string; + version: string; + chainId: BigNumber; + verifyingContract: string; + salt: string; + extensions: BigNumber[]; + } + >; + + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getDelegates( + delegator: string, + overrides?: CallOverrides, + ): Promise<[string, string]>; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getPowersCurrent( + user: string, + overrides?: CallOverrides, + ): Promise<[BigNumber, BigNumber]>; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + initialize( + overrides?: Overrides & { from?: string }, + ): Promise; + + metaDelegate( + delegator: string, + delegatee: string, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + metaDelegateByType( + delegator: string, + delegatee: string, + delegationType: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + name(overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + callStatic: { + DELEGATE_BY_TYPE_TYPEHASH(overrides?: CallOverrides): Promise; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + POWER_SCALE_FACTOR(overrides?: CallOverrides): Promise; + + REVISION(overrides?: CallOverrides): Promise; + + _nonces(arg0: string, overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides, + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + delegate(delegatee: string, overrides?: CallOverrides): Promise; + + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + eip712Domain(overrides?: CallOverrides): Promise< + [string, string, string, BigNumber, string, string, BigNumber[]] & { + fields: string; + name: string; + version: string; + chainId: BigNumber; + verifyingContract: string; + salt: string; + extensions: BigNumber[]; + } + >; + + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getDelegates( + delegator: string, + overrides?: CallOverrides, + ): Promise<[string, string]>; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getPowersCurrent( + user: string, + overrides?: CallOverrides, + ): Promise<[BigNumber, BigNumber]>; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + initialize(overrides?: CallOverrides): Promise; + + metaDelegate( + delegator: string, + delegatee: string, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides, + ): Promise; + + metaDelegateByType( + delegator: string, + delegatee: string, + delegationType: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides, + ): Promise; + + name(overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides, + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + }; + + filters: { + 'Approval(address,address,uint256)'( + owner?: string | null, + spender?: string | null, + value?: null, + ): ApprovalEventFilter; + Approval( + owner?: string | null, + spender?: string | null, + value?: null, + ): ApprovalEventFilter; + + 'DelegateChanged(address,address,uint8)'( + delegator?: string | null, + delegatee?: string | null, + delegationType?: null, + ): DelegateChangedEventFilter; + DelegateChanged( + delegator?: string | null, + delegatee?: string | null, + delegationType?: null, + ): DelegateChangedEventFilter; + + 'EIP712DomainChanged()'(): EIP712DomainChangedEventFilter; + EIP712DomainChanged(): EIP712DomainChangedEventFilter; + + 'Transfer(address,address,uint256)'( + from?: string | null, + to?: string | null, + value?: null, + ): TransferEventFilter; + Transfer( + from?: string | null, + to?: string | null, + value?: null, + ): TransferEventFilter; + }; + + estimateGas: { + DELEGATE_BY_TYPE_TYPEHASH(overrides?: CallOverrides): Promise; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + POWER_SCALE_FACTOR(overrides?: CallOverrides): Promise; + + REVISION(overrides?: CallOverrides): Promise; + + _nonces(arg0: string, overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides, + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + eip712Domain(overrides?: CallOverrides): Promise; + + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getDelegates( + delegator: string, + overrides?: CallOverrides, + ): Promise; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getPowersCurrent( + user: string, + overrides?: CallOverrides, + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + initialize(overrides?: Overrides & { from?: string }): Promise; + + metaDelegate( + delegator: string, + delegatee: string, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + metaDelegateByType( + delegator: string, + delegatee: string, + delegationType: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + name(overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + }; + + populateTransaction: { + DELEGATE_BY_TYPE_TYPEHASH( + overrides?: CallOverrides, + ): Promise; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + POWER_SCALE_FACTOR( + overrides?: CallOverrides, + ): Promise; + + REVISION(overrides?: CallOverrides): Promise; + + _nonces( + arg0: string, + overrides?: CallOverrides, + ): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides, + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + balanceOf( + account: string, + overrides?: CallOverrides, + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + eip712Domain(overrides?: CallOverrides): Promise; + + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getDelegates( + delegator: string, + overrides?: CallOverrides, + ): Promise; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getPowersCurrent( + user: string, + overrides?: CallOverrides, + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + initialize( + overrides?: Overrides & { from?: string }, + ): Promise; + + metaDelegate( + delegator: string, + delegatee: string, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + metaDelegateByType( + delegator: string, + delegatee: string, + delegationType: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + name(overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + }; +} diff --git a/packages/contract-helpers/src/governance-v3/typechain/GovernanceCore.d.ts b/packages/contract-helpers/src/governance-v3/typechain/GovernanceCore.d.ts new file mode 100644 index 00000000..7dc4be1d --- /dev/null +++ b/packages/contract-helpers/src/governance-v3/typechain/GovernanceCore.d.ts @@ -0,0 +1,1713 @@ +/* Autogenerated file. Do not edit manually. */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers'; +import type { + FunctionFragment, + Result, + EventFragment, +} from '@ethersproject/abi'; +import type { Listener, Provider } from '@ethersproject/providers'; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from './common'; + +export declare namespace IVotingMachineWithProofs { + export type VotingAssetWithSlotStruct = { + underlyingAsset: string; + slot: BigNumberish; + }; + + export type VotingAssetWithSlotStructOutput = [string, BigNumber] & { + underlyingAsset: string; + slot: BigNumber; + }; +} + +export declare namespace PayloadsControllerUtils { + export type PayloadStruct = { + chain: BigNumberish; + accessLevel: BigNumberish; + payloadsController: string; + payloadId: BigNumberish; + }; + + export type PayloadStructOutput = [BigNumber, number, string, number] & { + chain: BigNumber; + accessLevel: number; + payloadsController: string; + payloadId: number; + }; +} + +export declare namespace IGovernanceCore { + export type ProposalStruct = { + state: BigNumberish; + accessLevel: BigNumberish; + creationTime: BigNumberish; + votingDuration: BigNumberish; + votingActivationTime: BigNumberish; + queuingTime: BigNumberish; + cancelTimestamp: BigNumberish; + creator: string; + votingPortal: string; + snapshotBlockHash: BytesLike; + ipfsHash: BytesLike; + forVotes: BigNumberish; + againstVotes: BigNumberish; + cancellationFee: BigNumberish; + payloads: PayloadsControllerUtils.PayloadStruct[]; + }; + + export type ProposalStructOutput = [ + number, + number, + number, + number, + number, + number, + number, + string, + string, + string, + string, + BigNumber, + BigNumber, + BigNumber, + PayloadsControllerUtils.PayloadStructOutput[], + ] & { + state: number; + accessLevel: number; + creationTime: number; + votingDuration: number; + votingActivationTime: number; + queuingTime: number; + cancelTimestamp: number; + creator: string; + votingPortal: string; + snapshotBlockHash: string; + ipfsHash: string; + forVotes: BigNumber; + againstVotes: BigNumber; + cancellationFee: BigNumber; + payloads: PayloadsControllerUtils.PayloadStructOutput[]; + }; + + export type VotingConfigStruct = { + coolDownBeforeVotingStart: BigNumberish; + votingDuration: BigNumberish; + yesThreshold: BigNumberish; + yesNoDifferential: BigNumberish; + minPropositionPower: BigNumberish; + }; + + export type VotingConfigStructOutput = [ + number, + number, + BigNumber, + BigNumber, + BigNumber, + ] & { + coolDownBeforeVotingStart: number; + votingDuration: number; + yesThreshold: BigNumber; + yesNoDifferential: BigNumber; + minPropositionPower: BigNumber; + }; + + export type SetVotingConfigInputStruct = { + accessLevel: BigNumberish; + coolDownBeforeVotingStart: BigNumberish; + votingDuration: BigNumberish; + yesThreshold: BigNumberish; + yesNoDifferential: BigNumberish; + minPropositionPower: BigNumberish; + }; + + export type SetVotingConfigInputStructOutput = [ + number, + number, + number, + BigNumber, + BigNumber, + BigNumber, + ] & { + accessLevel: number; + coolDownBeforeVotingStart: number; + votingDuration: number; + yesThreshold: BigNumber; + yesNoDifferential: BigNumber; + minPropositionPower: BigNumber; + }; + + export type RepresentativeInputStruct = { + representative: string; + chainId: BigNumberish; + }; + + export type RepresentativeInputStructOutput = [string, BigNumber] & { + representative: string; + chainId: BigNumber; + }; +} + +export interface GovernanceCoreInterface extends utils.Interface { + functions: { + 'ACHIEVABLE_VOTING_PARTICIPATION()': FunctionFragment; + 'CANCELLATION_FEE_COLLECTOR()': FunctionFragment; + 'COOLDOWN_PERIOD()': FunctionFragment; + 'MIN_VOTING_DURATION()': FunctionFragment; + 'NAME()': FunctionFragment; + 'PRECISION_DIVIDER()': FunctionFragment; + 'PROPOSAL_EXPIRATION_TIME()': FunctionFragment; + 'VOTING_TOKENS_CAP()': FunctionFragment; + 'activateVoting(uint256)': FunctionFragment; + 'addVotingPortals(address[])': FunctionFragment; + 'cancelProposal(uint256)': FunctionFragment; + 'createProposal((uint256,uint8,address,uint40)[],address,bytes32)': FunctionFragment; + 'executeProposal(uint256)': FunctionFragment; + 'getCancellationFee()': FunctionFragment; + 'getPowerStrategy()': FunctionFragment; + 'getProposal(uint256)': FunctionFragment; + 'getProposalState(uint256)': FunctionFragment; + 'getProposalsCount()': FunctionFragment; + 'getRepresentativeByChain(address,uint256)': FunctionFragment; + 'getRepresentedVotersByChain(address,uint256)': FunctionFragment; + 'getVotingConfig(uint8)': FunctionFragment; + 'getVotingPortalsCount()': FunctionFragment; + 'guardian()': FunctionFragment; + 'isVotingPortalApproved(address)': FunctionFragment; + 'owner()': FunctionFragment; + 'queueProposal(uint256,uint128,uint128)': FunctionFragment; + 'redeemCancellationFee(uint256[])': FunctionFragment; + 'removeVotingPortals(address[])': FunctionFragment; + 'renounceOwnership()': FunctionFragment; + 'rescueVotingPortal(address)': FunctionFragment; + 'setPowerStrategy(address)': FunctionFragment; + 'setVotingConfigs((uint8,uint24,uint24,uint256,uint256,uint256)[])': FunctionFragment; + 'transferOwnership(address)': FunctionFragment; + 'updateCancellationFee(uint256)': FunctionFragment; + 'updateGuardian(address)': FunctionFragment; + 'updateRepresentativesForChain((address,uint256)[])': FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | 'ACHIEVABLE_VOTING_PARTICIPATION' + | 'CANCELLATION_FEE_COLLECTOR' + | 'COOLDOWN_PERIOD' + | 'MIN_VOTING_DURATION' + | 'NAME' + | 'PRECISION_DIVIDER' + | 'PROPOSAL_EXPIRATION_TIME' + | 'VOTING_TOKENS_CAP' + | 'activateVoting' + | 'addVotingPortals' + | 'cancelProposal' + | 'createProposal' + | 'executeProposal' + | 'getCancellationFee' + | 'getPowerStrategy' + | 'getProposal' + | 'getProposalState' + | 'getProposalsCount' + | 'getRepresentativeByChain' + | 'getRepresentedVotersByChain' + | 'getVotingConfig' + | 'getVotingPortalsCount' + | 'guardian' + | 'isVotingPortalApproved' + | 'owner' + | 'queueProposal' + | 'redeemCancellationFee' + | 'removeVotingPortals' + | 'renounceOwnership' + | 'rescueVotingPortal' + | 'setPowerStrategy' + | 'setVotingConfigs' + | 'transferOwnership' + | 'updateCancellationFee' + | 'updateGuardian' + | 'updateRepresentativesForChain', + ): FunctionFragment; + + encodeFunctionData( + functionFragment: 'ACHIEVABLE_VOTING_PARTICIPATION', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'CANCELLATION_FEE_COLLECTOR', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'COOLDOWN_PERIOD', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'MIN_VOTING_DURATION', + values?: undefined, + ): string; + encodeFunctionData(functionFragment: 'NAME', values?: undefined): string; + encodeFunctionData( + functionFragment: 'PRECISION_DIVIDER', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'PROPOSAL_EXPIRATION_TIME', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'VOTING_TOKENS_CAP', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'activateVoting', + values: [BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'addVotingPortals', + values: [string[]], + ): string; + encodeFunctionData( + functionFragment: 'cancelProposal', + values: [BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'createProposal', + values: [PayloadsControllerUtils.PayloadStruct[], string, BytesLike], + ): string; + encodeFunctionData( + functionFragment: 'executeProposal', + values: [BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'getCancellationFee', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'getPowerStrategy', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'getProposal', + values: [BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'getProposalState', + values: [BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'getProposalsCount', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'getRepresentativeByChain', + values: [string, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'getRepresentedVotersByChain', + values: [string, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'getVotingConfig', + values: [BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'getVotingPortalsCount', + values?: undefined, + ): string; + encodeFunctionData(functionFragment: 'guardian', values?: undefined): string; + encodeFunctionData( + functionFragment: 'isVotingPortalApproved', + values: [string], + ): string; + encodeFunctionData(functionFragment: 'owner', values?: undefined): string; + encodeFunctionData( + functionFragment: 'queueProposal', + values: [BigNumberish, BigNumberish, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'redeemCancellationFee', + values: [BigNumberish[]], + ): string; + encodeFunctionData( + functionFragment: 'removeVotingPortals', + values: [string[]], + ): string; + encodeFunctionData( + functionFragment: 'renounceOwnership', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'rescueVotingPortal', + values: [string], + ): string; + encodeFunctionData( + functionFragment: 'setPowerStrategy', + values: [string], + ): string; + encodeFunctionData( + functionFragment: 'setVotingConfigs', + values: [IGovernanceCore.SetVotingConfigInputStruct[]], + ): string; + encodeFunctionData( + functionFragment: 'transferOwnership', + values: [string], + ): string; + encodeFunctionData( + functionFragment: 'updateCancellationFee', + values: [BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'updateGuardian', + values: [string], + ): string; + encodeFunctionData( + functionFragment: 'updateRepresentativesForChain', + values: [IGovernanceCore.RepresentativeInputStruct[]], + ): string; + + decodeFunctionResult( + functionFragment: 'ACHIEVABLE_VOTING_PARTICIPATION', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'CANCELLATION_FEE_COLLECTOR', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'COOLDOWN_PERIOD', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'MIN_VOTING_DURATION', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'NAME', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'PRECISION_DIVIDER', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'PROPOSAL_EXPIRATION_TIME', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'VOTING_TOKENS_CAP', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'activateVoting', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'addVotingPortals', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'cancelProposal', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'createProposal', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'executeProposal', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getCancellationFee', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getPowerStrategy', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getProposal', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getProposalState', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getProposalsCount', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getRepresentativeByChain', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getRepresentedVotersByChain', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getVotingConfig', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getVotingPortalsCount', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'guardian', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'isVotingPortalApproved', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'queueProposal', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'redeemCancellationFee', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'removeVotingPortals', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'renounceOwnership', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'rescueVotingPortal', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'setPowerStrategy', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'setVotingConfigs', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'transferOwnership', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'updateCancellationFee', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'updateGuardian', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'updateRepresentativesForChain', + data: BytesLike, + ): Result; + + events: { + 'CancellationFeeRedeemed(uint256,address,uint256,bool)': EventFragment; + 'CancellationFeeUpdated(uint256)': EventFragment; + 'GuardianUpdated(address,address)': EventFragment; + 'Initialized(uint8)': EventFragment; + 'OwnershipTransferred(address,address)': EventFragment; + 'PayloadSent(uint256,uint40,address,uint256,uint256,uint256)': EventFragment; + 'PowerStrategyUpdated(address)': EventFragment; + 'ProposalCanceled(uint256)': EventFragment; + 'ProposalCreated(uint256,address,uint8,bytes32)': EventFragment; + 'ProposalExecuted(uint256)': EventFragment; + 'ProposalFailed(uint256,uint128,uint128)': EventFragment; + 'ProposalQueued(uint256,uint128,uint128)': EventFragment; + 'RepresentativeUpdated(address,address,uint256)': EventFragment; + 'VoteForwarded(uint256,address,bool,(address,uint128)[])': EventFragment; + 'VotingActivated(uint256,bytes32,uint24)': EventFragment; + 'VotingConfigUpdated(uint8,uint24,uint24,uint256,uint256,uint256)': EventFragment; + 'VotingPortalUpdated(address,bool)': EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: 'CancellationFeeRedeemed'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'CancellationFeeUpdated'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'GuardianUpdated'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Initialized'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'OwnershipTransferred'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'PayloadSent'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'PowerStrategyUpdated'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'ProposalCanceled'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'ProposalCreated'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'ProposalExecuted'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'ProposalFailed'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'ProposalQueued'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'RepresentativeUpdated'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'VoteForwarded'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'VotingActivated'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'VotingConfigUpdated'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'VotingPortalUpdated'): EventFragment; +} + +export interface CancellationFeeRedeemedEventObject { + proposalId: BigNumber; + to: string; + cancellationFee: BigNumber; + success: boolean; +} +export type CancellationFeeRedeemedEvent = TypedEvent< + [BigNumber, string, BigNumber, boolean], + CancellationFeeRedeemedEventObject +>; + +export type CancellationFeeRedeemedEventFilter = + TypedEventFilter; + +export interface CancellationFeeUpdatedEventObject { + cancellationFee: BigNumber; +} +export type CancellationFeeUpdatedEvent = TypedEvent< + [BigNumber], + CancellationFeeUpdatedEventObject +>; + +export type CancellationFeeUpdatedEventFilter = + TypedEventFilter; + +export interface GuardianUpdatedEventObject { + oldGuardian: string; + newGuardian: string; +} +export type GuardianUpdatedEvent = TypedEvent< + [string, string], + GuardianUpdatedEventObject +>; + +export type GuardianUpdatedEventFilter = TypedEventFilter; + +export interface InitializedEventObject { + version: number; +} +export type InitializedEvent = TypedEvent<[number], InitializedEventObject>; + +export type InitializedEventFilter = TypedEventFilter; + +export interface OwnershipTransferredEventObject { + previousOwner: string; + newOwner: string; +} +export type OwnershipTransferredEvent = TypedEvent< + [string, string], + OwnershipTransferredEventObject +>; + +export type OwnershipTransferredEventFilter = + TypedEventFilter; + +export interface PayloadSentEventObject { + proposalId: BigNumber; + payloadId: number; + payloadsController: string; + chainId: BigNumber; + payloadNumberOnProposal: BigNumber; + numberOfPayloadsOnProposal: BigNumber; +} +export type PayloadSentEvent = TypedEvent< + [BigNumber, number, string, BigNumber, BigNumber, BigNumber], + PayloadSentEventObject +>; + +export type PayloadSentEventFilter = TypedEventFilter; + +export interface PowerStrategyUpdatedEventObject { + newPowerStrategy: string; +} +export type PowerStrategyUpdatedEvent = TypedEvent< + [string], + PowerStrategyUpdatedEventObject +>; + +export type PowerStrategyUpdatedEventFilter = + TypedEventFilter; + +export interface ProposalCanceledEventObject { + proposalId: BigNumber; +} +export type ProposalCanceledEvent = TypedEvent< + [BigNumber], + ProposalCanceledEventObject +>; + +export type ProposalCanceledEventFilter = + TypedEventFilter; + +export interface ProposalCreatedEventObject { + proposalId: BigNumber; + creator: string; + accessLevel: number; + ipfsHash: string; +} +export type ProposalCreatedEvent = TypedEvent< + [BigNumber, string, number, string], + ProposalCreatedEventObject +>; + +export type ProposalCreatedEventFilter = TypedEventFilter; + +export interface ProposalExecutedEventObject { + proposalId: BigNumber; +} +export type ProposalExecutedEvent = TypedEvent< + [BigNumber], + ProposalExecutedEventObject +>; + +export type ProposalExecutedEventFilter = + TypedEventFilter; + +export interface ProposalFailedEventObject { + proposalId: BigNumber; + votesFor: BigNumber; + votesAgainst: BigNumber; +} +export type ProposalFailedEvent = TypedEvent< + [BigNumber, BigNumber, BigNumber], + ProposalFailedEventObject +>; + +export type ProposalFailedEventFilter = TypedEventFilter; + +export interface ProposalQueuedEventObject { + proposalId: BigNumber; + votesFor: BigNumber; + votesAgainst: BigNumber; +} +export type ProposalQueuedEvent = TypedEvent< + [BigNumber, BigNumber, BigNumber], + ProposalQueuedEventObject +>; + +export type ProposalQueuedEventFilter = TypedEventFilter; + +export interface RepresentativeUpdatedEventObject { + voter: string; + representative: string; + chainId: BigNumber; +} +export type RepresentativeUpdatedEvent = TypedEvent< + [string, string, BigNumber], + RepresentativeUpdatedEventObject +>; + +export type RepresentativeUpdatedEventFilter = + TypedEventFilter; + +export interface VoteForwardedEventObject { + proposalId: BigNumber; + voter: string; + support: boolean; + votingAssetsWithSlot: IVotingMachineWithProofs.VotingAssetWithSlotStructOutput[]; +} +export type VoteForwardedEvent = TypedEvent< + [ + BigNumber, + string, + boolean, + IVotingMachineWithProofs.VotingAssetWithSlotStructOutput[], + ], + VoteForwardedEventObject +>; + +export type VoteForwardedEventFilter = TypedEventFilter; + +export interface VotingActivatedEventObject { + proposalId: BigNumber; + snapshotBlockHash: string; + votingDuration: number; +} +export type VotingActivatedEvent = TypedEvent< + [BigNumber, string, number], + VotingActivatedEventObject +>; + +export type VotingActivatedEventFilter = TypedEventFilter; + +export interface VotingConfigUpdatedEventObject { + accessLevel: number; + votingDuration: number; + coolDownBeforeVotingStart: number; + yesThreshold: BigNumber; + yesNoDifferential: BigNumber; + minPropositionPower: BigNumber; +} +export type VotingConfigUpdatedEvent = TypedEvent< + [number, number, number, BigNumber, BigNumber, BigNumber], + VotingConfigUpdatedEventObject +>; + +export type VotingConfigUpdatedEventFilter = + TypedEventFilter; + +export interface VotingPortalUpdatedEventObject { + votingPortal: string; + approved: boolean; +} +export type VotingPortalUpdatedEvent = TypedEvent< + [string, boolean], + VotingPortalUpdatedEventObject +>; + +export type VotingPortalUpdatedEventFilter = + TypedEventFilter; + +export interface GovernanceCore extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: GovernanceCoreInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter, + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter, + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + ACHIEVABLE_VOTING_PARTICIPATION( + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + CANCELLATION_FEE_COLLECTOR(overrides?: CallOverrides): Promise<[string]>; + + COOLDOWN_PERIOD(overrides?: CallOverrides): Promise<[BigNumber]>; + + MIN_VOTING_DURATION(overrides?: CallOverrides): Promise<[BigNumber]>; + + NAME(overrides?: CallOverrides): Promise<[string]>; + + PRECISION_DIVIDER(overrides?: CallOverrides): Promise<[BigNumber]>; + + PROPOSAL_EXPIRATION_TIME(overrides?: CallOverrides): Promise<[BigNumber]>; + + VOTING_TOKENS_CAP(overrides?: CallOverrides): Promise<[BigNumber]>; + + activateVoting( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + addVotingPortals( + votingPortals: string[], + overrides?: Overrides & { from?: string }, + ): Promise; + + cancelProposal( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + createProposal( + payloads: PayloadsControllerUtils.PayloadStruct[], + votingPortal: string, + ipfsHash: BytesLike, + overrides?: PayableOverrides & { from?: string }, + ): Promise; + + executeProposal( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + getCancellationFee(overrides?: CallOverrides): Promise<[BigNumber]>; + + getPowerStrategy(overrides?: CallOverrides): Promise<[string]>; + + getProposal( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise<[IGovernanceCore.ProposalStructOutput]>; + + getProposalState( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise<[number]>; + + getProposalsCount(overrides?: CallOverrides): Promise<[BigNumber]>; + + getRepresentativeByChain( + voter: string, + chainId: BigNumberish, + overrides?: CallOverrides, + ): Promise<[string]>; + + getRepresentedVotersByChain( + representative: string, + chainId: BigNumberish, + overrides?: CallOverrides, + ): Promise<[string[]]>; + + getVotingConfig( + accessLevel: BigNumberish, + overrides?: CallOverrides, + ): Promise<[IGovernanceCore.VotingConfigStructOutput]>; + + getVotingPortalsCount(overrides?: CallOverrides): Promise<[BigNumber]>; + + guardian(overrides?: CallOverrides): Promise<[string]>; + + isVotingPortalApproved( + votingPortal: string, + overrides?: CallOverrides, + ): Promise<[boolean]>; + + owner(overrides?: CallOverrides): Promise<[string]>; + + queueProposal( + proposalId: BigNumberish, + forVotes: BigNumberish, + againstVotes: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + redeemCancellationFee( + proposalIds: BigNumberish[], + overrides?: Overrides & { from?: string }, + ): Promise; + + removeVotingPortals( + votingPortals: string[], + overrides?: Overrides & { from?: string }, + ): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string }, + ): Promise; + + rescueVotingPortal( + votingPortal: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + setPowerStrategy( + powerStrategy: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + setVotingConfigs( + votingConfigs: IGovernanceCore.SetVotingConfigInputStruct[], + overrides?: Overrides & { from?: string }, + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + updateCancellationFee( + cancellationFee: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + updateGuardian( + newGuardian: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + updateRepresentativesForChain( + representatives: IGovernanceCore.RepresentativeInputStruct[], + overrides?: Overrides & { from?: string }, + ): Promise; + }; + + ACHIEVABLE_VOTING_PARTICIPATION( + overrides?: CallOverrides, + ): Promise; + + CANCELLATION_FEE_COLLECTOR(overrides?: CallOverrides): Promise; + + COOLDOWN_PERIOD(overrides?: CallOverrides): Promise; + + MIN_VOTING_DURATION(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + PRECISION_DIVIDER(overrides?: CallOverrides): Promise; + + PROPOSAL_EXPIRATION_TIME(overrides?: CallOverrides): Promise; + + VOTING_TOKENS_CAP(overrides?: CallOverrides): Promise; + + activateVoting( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + addVotingPortals( + votingPortals: string[], + overrides?: Overrides & { from?: string }, + ): Promise; + + cancelProposal( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + createProposal( + payloads: PayloadsControllerUtils.PayloadStruct[], + votingPortal: string, + ipfsHash: BytesLike, + overrides?: PayableOverrides & { from?: string }, + ): Promise; + + executeProposal( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + getCancellationFee(overrides?: CallOverrides): Promise; + + getPowerStrategy(overrides?: CallOverrides): Promise; + + getProposal( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getProposalState( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getProposalsCount(overrides?: CallOverrides): Promise; + + getRepresentativeByChain( + voter: string, + chainId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getRepresentedVotersByChain( + representative: string, + chainId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getVotingConfig( + accessLevel: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getVotingPortalsCount(overrides?: CallOverrides): Promise; + + guardian(overrides?: CallOverrides): Promise; + + isVotingPortalApproved( + votingPortal: string, + overrides?: CallOverrides, + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + queueProposal( + proposalId: BigNumberish, + forVotes: BigNumberish, + againstVotes: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + redeemCancellationFee( + proposalIds: BigNumberish[], + overrides?: Overrides & { from?: string }, + ): Promise; + + removeVotingPortals( + votingPortals: string[], + overrides?: Overrides & { from?: string }, + ): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string }, + ): Promise; + + rescueVotingPortal( + votingPortal: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + setPowerStrategy( + powerStrategy: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + setVotingConfigs( + votingConfigs: IGovernanceCore.SetVotingConfigInputStruct[], + overrides?: Overrides & { from?: string }, + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + updateCancellationFee( + cancellationFee: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + updateGuardian( + newGuardian: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + updateRepresentativesForChain( + representatives: IGovernanceCore.RepresentativeInputStruct[], + overrides?: Overrides & { from?: string }, + ): Promise; + + callStatic: { + ACHIEVABLE_VOTING_PARTICIPATION( + overrides?: CallOverrides, + ): Promise; + + CANCELLATION_FEE_COLLECTOR(overrides?: CallOverrides): Promise; + + COOLDOWN_PERIOD(overrides?: CallOverrides): Promise; + + MIN_VOTING_DURATION(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + PRECISION_DIVIDER(overrides?: CallOverrides): Promise; + + PROPOSAL_EXPIRATION_TIME(overrides?: CallOverrides): Promise; + + VOTING_TOKENS_CAP(overrides?: CallOverrides): Promise; + + activateVoting( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + addVotingPortals( + votingPortals: string[], + overrides?: CallOverrides, + ): Promise; + + cancelProposal( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + createProposal( + payloads: PayloadsControllerUtils.PayloadStruct[], + votingPortal: string, + ipfsHash: BytesLike, + overrides?: CallOverrides, + ): Promise; + + executeProposal( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getCancellationFee(overrides?: CallOverrides): Promise; + + getPowerStrategy(overrides?: CallOverrides): Promise; + + getProposal( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getProposalState( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getProposalsCount(overrides?: CallOverrides): Promise; + + getRepresentativeByChain( + voter: string, + chainId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getRepresentedVotersByChain( + representative: string, + chainId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getVotingConfig( + accessLevel: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getVotingPortalsCount(overrides?: CallOverrides): Promise; + + guardian(overrides?: CallOverrides): Promise; + + isVotingPortalApproved( + votingPortal: string, + overrides?: CallOverrides, + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + queueProposal( + proposalId: BigNumberish, + forVotes: BigNumberish, + againstVotes: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + redeemCancellationFee( + proposalIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + removeVotingPortals( + votingPortals: string[], + overrides?: CallOverrides, + ): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + rescueVotingPortal( + votingPortal: string, + overrides?: CallOverrides, + ): Promise; + + setPowerStrategy( + powerStrategy: string, + overrides?: CallOverrides, + ): Promise; + + setVotingConfigs( + votingConfigs: IGovernanceCore.SetVotingConfigInputStruct[], + overrides?: CallOverrides, + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: CallOverrides, + ): Promise; + + updateCancellationFee( + cancellationFee: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + updateGuardian( + newGuardian: string, + overrides?: CallOverrides, + ): Promise; + + updateRepresentativesForChain( + representatives: IGovernanceCore.RepresentativeInputStruct[], + overrides?: CallOverrides, + ): Promise; + }; + + filters: { + 'CancellationFeeRedeemed(uint256,address,uint256,bool)'( + proposalId?: BigNumberish | null, + to?: string | null, + cancellationFee?: null, + success?: boolean | null, + ): CancellationFeeRedeemedEventFilter; + CancellationFeeRedeemed( + proposalId?: BigNumberish | null, + to?: string | null, + cancellationFee?: null, + success?: boolean | null, + ): CancellationFeeRedeemedEventFilter; + + 'CancellationFeeUpdated(uint256)'( + cancellationFee?: null, + ): CancellationFeeUpdatedEventFilter; + CancellationFeeUpdated( + cancellationFee?: null, + ): CancellationFeeUpdatedEventFilter; + + 'GuardianUpdated(address,address)'( + oldGuardian?: null, + newGuardian?: null, + ): GuardianUpdatedEventFilter; + GuardianUpdated( + oldGuardian?: null, + newGuardian?: null, + ): GuardianUpdatedEventFilter; + + 'Initialized(uint8)'(version?: null): InitializedEventFilter; + Initialized(version?: null): InitializedEventFilter; + + 'OwnershipTransferred(address,address)'( + previousOwner?: string | null, + newOwner?: string | null, + ): OwnershipTransferredEventFilter; + OwnershipTransferred( + previousOwner?: string | null, + newOwner?: string | null, + ): OwnershipTransferredEventFilter; + + 'PayloadSent(uint256,uint40,address,uint256,uint256,uint256)'( + proposalId?: BigNumberish | null, + payloadId?: null, + payloadsController?: string | null, + chainId?: BigNumberish | null, + payloadNumberOnProposal?: null, + numberOfPayloadsOnProposal?: null, + ): PayloadSentEventFilter; + PayloadSent( + proposalId?: BigNumberish | null, + payloadId?: null, + payloadsController?: string | null, + chainId?: BigNumberish | null, + payloadNumberOnProposal?: null, + numberOfPayloadsOnProposal?: null, + ): PayloadSentEventFilter; + + 'PowerStrategyUpdated(address)'( + newPowerStrategy?: string | null, + ): PowerStrategyUpdatedEventFilter; + PowerStrategyUpdated( + newPowerStrategy?: string | null, + ): PowerStrategyUpdatedEventFilter; + + 'ProposalCanceled(uint256)'( + proposalId?: BigNumberish | null, + ): ProposalCanceledEventFilter; + ProposalCanceled( + proposalId?: BigNumberish | null, + ): ProposalCanceledEventFilter; + + 'ProposalCreated(uint256,address,uint8,bytes32)'( + proposalId?: BigNumberish | null, + creator?: string | null, + accessLevel?: BigNumberish | null, + ipfsHash?: null, + ): ProposalCreatedEventFilter; + ProposalCreated( + proposalId?: BigNumberish | null, + creator?: string | null, + accessLevel?: BigNumberish | null, + ipfsHash?: null, + ): ProposalCreatedEventFilter; + + 'ProposalExecuted(uint256)'( + proposalId?: BigNumberish | null, + ): ProposalExecutedEventFilter; + ProposalExecuted( + proposalId?: BigNumberish | null, + ): ProposalExecutedEventFilter; + + 'ProposalFailed(uint256,uint128,uint128)'( + proposalId?: BigNumberish | null, + votesFor?: null, + votesAgainst?: null, + ): ProposalFailedEventFilter; + ProposalFailed( + proposalId?: BigNumberish | null, + votesFor?: null, + votesAgainst?: null, + ): ProposalFailedEventFilter; + + 'ProposalQueued(uint256,uint128,uint128)'( + proposalId?: BigNumberish | null, + votesFor?: null, + votesAgainst?: null, + ): ProposalQueuedEventFilter; + ProposalQueued( + proposalId?: BigNumberish | null, + votesFor?: null, + votesAgainst?: null, + ): ProposalQueuedEventFilter; + + 'RepresentativeUpdated(address,address,uint256)'( + voter?: string | null, + representative?: string | null, + chainId?: BigNumberish | null, + ): RepresentativeUpdatedEventFilter; + RepresentativeUpdated( + voter?: string | null, + representative?: string | null, + chainId?: BigNumberish | null, + ): RepresentativeUpdatedEventFilter; + + 'VoteForwarded(uint256,address,bool,(address,uint128)[])'( + proposalId?: BigNumberish | null, + voter?: string | null, + support?: boolean | null, + votingAssetsWithSlot?: null, + ): VoteForwardedEventFilter; + VoteForwarded( + proposalId?: BigNumberish | null, + voter?: string | null, + support?: boolean | null, + votingAssetsWithSlot?: null, + ): VoteForwardedEventFilter; + + 'VotingActivated(uint256,bytes32,uint24)'( + proposalId?: BigNumberish | null, + snapshotBlockHash?: BytesLike | null, + votingDuration?: null, + ): VotingActivatedEventFilter; + VotingActivated( + proposalId?: BigNumberish | null, + snapshotBlockHash?: BytesLike | null, + votingDuration?: null, + ): VotingActivatedEventFilter; + + 'VotingConfigUpdated(uint8,uint24,uint24,uint256,uint256,uint256)'( + accessLevel?: BigNumberish | null, + votingDuration?: null, + coolDownBeforeVotingStart?: null, + yesThreshold?: null, + yesNoDifferential?: null, + minPropositionPower?: null, + ): VotingConfigUpdatedEventFilter; + VotingConfigUpdated( + accessLevel?: BigNumberish | null, + votingDuration?: null, + coolDownBeforeVotingStart?: null, + yesThreshold?: null, + yesNoDifferential?: null, + minPropositionPower?: null, + ): VotingConfigUpdatedEventFilter; + + 'VotingPortalUpdated(address,bool)'( + votingPortal?: string | null, + approved?: boolean | null, + ): VotingPortalUpdatedEventFilter; + VotingPortalUpdated( + votingPortal?: string | null, + approved?: boolean | null, + ): VotingPortalUpdatedEventFilter; + }; + + estimateGas: { + ACHIEVABLE_VOTING_PARTICIPATION( + overrides?: CallOverrides, + ): Promise; + + CANCELLATION_FEE_COLLECTOR(overrides?: CallOverrides): Promise; + + COOLDOWN_PERIOD(overrides?: CallOverrides): Promise; + + MIN_VOTING_DURATION(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + PRECISION_DIVIDER(overrides?: CallOverrides): Promise; + + PROPOSAL_EXPIRATION_TIME(overrides?: CallOverrides): Promise; + + VOTING_TOKENS_CAP(overrides?: CallOverrides): Promise; + + activateVoting( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + addVotingPortals( + votingPortals: string[], + overrides?: Overrides & { from?: string }, + ): Promise; + + cancelProposal( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + createProposal( + payloads: PayloadsControllerUtils.PayloadStruct[], + votingPortal: string, + ipfsHash: BytesLike, + overrides?: PayableOverrides & { from?: string }, + ): Promise; + + executeProposal( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + getCancellationFee(overrides?: CallOverrides): Promise; + + getPowerStrategy(overrides?: CallOverrides): Promise; + + getProposal( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getProposalState( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getProposalsCount(overrides?: CallOverrides): Promise; + + getRepresentativeByChain( + voter: string, + chainId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getRepresentedVotersByChain( + representative: string, + chainId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getVotingConfig( + accessLevel: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getVotingPortalsCount(overrides?: CallOverrides): Promise; + + guardian(overrides?: CallOverrides): Promise; + + isVotingPortalApproved( + votingPortal: string, + overrides?: CallOverrides, + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + queueProposal( + proposalId: BigNumberish, + forVotes: BigNumberish, + againstVotes: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + redeemCancellationFee( + proposalIds: BigNumberish[], + overrides?: Overrides & { from?: string }, + ): Promise; + + removeVotingPortals( + votingPortals: string[], + overrides?: Overrides & { from?: string }, + ): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string }, + ): Promise; + + rescueVotingPortal( + votingPortal: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + setPowerStrategy( + powerStrategy: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + setVotingConfigs( + votingConfigs: IGovernanceCore.SetVotingConfigInputStruct[], + overrides?: Overrides & { from?: string }, + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + updateCancellationFee( + cancellationFee: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + updateGuardian( + newGuardian: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + updateRepresentativesForChain( + representatives: IGovernanceCore.RepresentativeInputStruct[], + overrides?: Overrides & { from?: string }, + ): Promise; + }; + + populateTransaction: { + ACHIEVABLE_VOTING_PARTICIPATION( + overrides?: CallOverrides, + ): Promise; + + CANCELLATION_FEE_COLLECTOR( + overrides?: CallOverrides, + ): Promise; + + COOLDOWN_PERIOD(overrides?: CallOverrides): Promise; + + MIN_VOTING_DURATION( + overrides?: CallOverrides, + ): Promise; + + NAME(overrides?: CallOverrides): Promise; + + PRECISION_DIVIDER(overrides?: CallOverrides): Promise; + + PROPOSAL_EXPIRATION_TIME( + overrides?: CallOverrides, + ): Promise; + + VOTING_TOKENS_CAP(overrides?: CallOverrides): Promise; + + activateVoting( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + addVotingPortals( + votingPortals: string[], + overrides?: Overrides & { from?: string }, + ): Promise; + + cancelProposal( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + createProposal( + payloads: PayloadsControllerUtils.PayloadStruct[], + votingPortal: string, + ipfsHash: BytesLike, + overrides?: PayableOverrides & { from?: string }, + ): Promise; + + executeProposal( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + getCancellationFee( + overrides?: CallOverrides, + ): Promise; + + getPowerStrategy(overrides?: CallOverrides): Promise; + + getProposal( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getProposalState( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getProposalsCount(overrides?: CallOverrides): Promise; + + getRepresentativeByChain( + voter: string, + chainId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getRepresentedVotersByChain( + representative: string, + chainId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getVotingConfig( + accessLevel: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getVotingPortalsCount( + overrides?: CallOverrides, + ): Promise; + + guardian(overrides?: CallOverrides): Promise; + + isVotingPortalApproved( + votingPortal: string, + overrides?: CallOverrides, + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + queueProposal( + proposalId: BigNumberish, + forVotes: BigNumberish, + againstVotes: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + redeemCancellationFee( + proposalIds: BigNumberish[], + overrides?: Overrides & { from?: string }, + ): Promise; + + removeVotingPortals( + votingPortals: string[], + overrides?: Overrides & { from?: string }, + ): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string }, + ): Promise; + + rescueVotingPortal( + votingPortal: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + setPowerStrategy( + powerStrategy: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + setVotingConfigs( + votingConfigs: IGovernanceCore.SetVotingConfigInputStruct[], + overrides?: Overrides & { from?: string }, + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + updateCancellationFee( + cancellationFee: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + updateGuardian( + newGuardian: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + updateRepresentativesForChain( + representatives: IGovernanceCore.RepresentativeInputStruct[], + overrides?: Overrides & { from?: string }, + ): Promise; + }; +} diff --git a/packages/contract-helpers/src/governance-v3/typechain/GovernanceDataHelper.d.ts b/packages/contract-helpers/src/governance-v3/typechain/GovernanceDataHelper.d.ts new file mode 100644 index 00000000..da07dd71 --- /dev/null +++ b/packages/contract-helpers/src/governance-v3/typechain/GovernanceDataHelper.d.ts @@ -0,0 +1,382 @@ +/* Autogenerated file. Do not edit manually. */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers'; +import type { FunctionFragment, Result } from '@ethersproject/abi'; +import type { Listener, Provider } from '@ethersproject/providers'; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from './common'; + +export declare namespace IGovernanceCore { + export type VotingConfigStruct = { + coolDownBeforeVotingStart: BigNumberish; + votingDuration: BigNumberish; + yesThreshold: BigNumberish; + yesNoDifferential: BigNumberish; + minPropositionPower: BigNumberish; + }; + + export type VotingConfigStructOutput = [ + number, + number, + BigNumber, + BigNumber, + BigNumber, + ] & { + coolDownBeforeVotingStart: number; + votingDuration: number; + yesThreshold: BigNumber; + yesNoDifferential: BigNumber; + minPropositionPower: BigNumber; + }; + + export type ProposalStruct = { + state: BigNumberish; + accessLevel: BigNumberish; + creationTime: BigNumberish; + votingDuration: BigNumberish; + votingActivationTime: BigNumberish; + queuingTime: BigNumberish; + cancelTimestamp: BigNumberish; + creator: string; + votingPortal: string; + snapshotBlockHash: BytesLike; + ipfsHash: BytesLike; + forVotes: BigNumberish; + againstVotes: BigNumberish; + cancellationFee: BigNumberish; + payloads: PayloadsControllerUtils.PayloadStruct[]; + }; + + export type ProposalStructOutput = [ + number, + number, + number, + number, + number, + number, + number, + string, + string, + string, + string, + BigNumber, + BigNumber, + BigNumber, + PayloadsControllerUtils.PayloadStructOutput[], + ] & { + state: number; + accessLevel: number; + creationTime: number; + votingDuration: number; + votingActivationTime: number; + queuingTime: number; + cancelTimestamp: number; + creator: string; + votingPortal: string; + snapshotBlockHash: string; + ipfsHash: string; + forVotes: BigNumber; + againstVotes: BigNumber; + cancellationFee: BigNumber; + payloads: PayloadsControllerUtils.PayloadStructOutput[]; + }; +} + +export declare namespace IGovernanceDataHelper { + export type VotingConfigStruct = { + accessLevel: BigNumberish; + config: IGovernanceCore.VotingConfigStruct; + }; + + export type VotingConfigStructOutput = [ + number, + IGovernanceCore.VotingConfigStructOutput, + ] & { accessLevel: number; config: IGovernanceCore.VotingConfigStructOutput }; + + export type ConstantsStruct = { + votingConfigs: IGovernanceDataHelper.VotingConfigStruct[]; + precisionDivider: BigNumberish; + cooldownPeriod: BigNumberish; + expirationTime: BigNumberish; + cancellationFee: BigNumberish; + }; + + export type ConstantsStructOutput = [ + IGovernanceDataHelper.VotingConfigStructOutput[], + BigNumber, + BigNumber, + BigNumber, + BigNumber, + ] & { + votingConfigs: IGovernanceDataHelper.VotingConfigStructOutput[]; + precisionDivider: BigNumber; + cooldownPeriod: BigNumber; + expirationTime: BigNumber; + cancellationFee: BigNumber; + }; + + export type ProposalStruct = { + id: BigNumberish; + votingChainId: BigNumberish; + proposalData: IGovernanceCore.ProposalStruct; + }; + + export type ProposalStructOutput = [ + BigNumber, + BigNumber, + IGovernanceCore.ProposalStructOutput, + ] & { + id: BigNumber; + votingChainId: BigNumber; + proposalData: IGovernanceCore.ProposalStructOutput; + }; + + export type RepresentativesStruct = { + chainId: BigNumberish; + representative: string; + }; + + export type RepresentativesStructOutput = [BigNumber, string] & { + chainId: BigNumber; + representative: string; + }; + + export type RepresentedStruct = { + chainId: BigNumberish; + votersRepresented: string[]; + }; + + export type RepresentedStructOutput = [BigNumber, string[]] & { + chainId: BigNumber; + votersRepresented: string[]; + }; +} + +export declare namespace PayloadsControllerUtils { + export type PayloadStruct = { + chain: BigNumberish; + accessLevel: BigNumberish; + payloadsController: string; + payloadId: BigNumberish; + }; + + export type PayloadStructOutput = [BigNumber, number, string, number] & { + chain: BigNumber; + accessLevel: number; + payloadsController: string; + payloadId: number; + }; +} + +export interface GovernanceDataHelperInterface extends utils.Interface { + functions: { + 'getConstants(address,uint8[])': FunctionFragment; + 'getProposalsData(address,uint256,uint256,uint256)': FunctionFragment; + 'getRepresentationData(address,address,uint256[])': FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | 'getConstants' + | 'getProposalsData' + | 'getRepresentationData', + ): FunctionFragment; + + encodeFunctionData( + functionFragment: 'getConstants', + values: [string, BigNumberish[]], + ): string; + encodeFunctionData( + functionFragment: 'getProposalsData', + values: [string, BigNumberish, BigNumberish, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'getRepresentationData', + values: [string, string, BigNumberish[]], + ): string; + + decodeFunctionResult( + functionFragment: 'getConstants', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getProposalsData', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getRepresentationData', + data: BytesLike, + ): Result; + + events: {}; +} + +export interface GovernanceDataHelper extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: GovernanceDataHelperInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter, + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter, + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + getConstants( + govCore: string, + accessLevels: BigNumberish[], + overrides?: CallOverrides, + ): Promise<[IGovernanceDataHelper.ConstantsStructOutput]>; + + getProposalsData( + govCore: string, + from: BigNumberish, + to: BigNumberish, + pageSize: BigNumberish, + overrides?: CallOverrides, + ): Promise<[IGovernanceDataHelper.ProposalStructOutput[]]>; + + getRepresentationData( + govCore: string, + wallet: string, + chainIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise< + [ + IGovernanceDataHelper.RepresentativesStructOutput[], + IGovernanceDataHelper.RepresentedStructOutput[], + ] + >; + }; + + getConstants( + govCore: string, + accessLevels: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + getProposalsData( + govCore: string, + from: BigNumberish, + to: BigNumberish, + pageSize: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getRepresentationData( + govCore: string, + wallet: string, + chainIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise< + [ + IGovernanceDataHelper.RepresentativesStructOutput[], + IGovernanceDataHelper.RepresentedStructOutput[], + ] + >; + + callStatic: { + getConstants( + govCore: string, + accessLevels: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + getProposalsData( + govCore: string, + from: BigNumberish, + to: BigNumberish, + pageSize: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getRepresentationData( + govCore: string, + wallet: string, + chainIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise< + [ + IGovernanceDataHelper.RepresentativesStructOutput[], + IGovernanceDataHelper.RepresentedStructOutput[], + ] + >; + }; + + filters: {}; + + estimateGas: { + getConstants( + govCore: string, + accessLevels: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + getProposalsData( + govCore: string, + from: BigNumberish, + to: BigNumberish, + pageSize: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getRepresentationData( + govCore: string, + wallet: string, + chainIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + }; + + populateTransaction: { + getConstants( + govCore: string, + accessLevels: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + getProposalsData( + govCore: string, + from: BigNumberish, + to: BigNumberish, + pageSize: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getRepresentationData( + govCore: string, + wallet: string, + chainIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + }; +} diff --git a/packages/contract-helpers/src/governance-v3/typechain/MetaDelegateHelper.d.ts b/packages/contract-helpers/src/governance-v3/typechain/MetaDelegateHelper.d.ts new file mode 100644 index 00000000..ae69c6d4 --- /dev/null +++ b/packages/contract-helpers/src/governance-v3/typechain/MetaDelegateHelper.d.ts @@ -0,0 +1,137 @@ +/* Autogenerated file. Do not edit manually. */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers'; +import type { FunctionFragment, Result } from '@ethersproject/abi'; +import type { Listener, Provider } from '@ethersproject/providers'; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from './common'; + +export declare namespace IMetaDelegateHelper { + export type MetaDelegateParamsStruct = { + underlyingAsset: string; + delegationType: BigNumberish; + delegator: string; + delegatee: string; + deadline: BigNumberish; + v: BigNumberish; + r: BytesLike; + s: BytesLike; + }; + + export type MetaDelegateParamsStructOutput = [ + string, + number, + string, + string, + BigNumber, + number, + string, + string, + ] & { + underlyingAsset: string; + delegationType: number; + delegator: string; + delegatee: string; + deadline: BigNumber; + v: number; + r: string; + s: string; + }; +} + +export interface MetaDelegateHelperInterface extends utils.Interface { + functions: { + 'batchMetaDelegate((address,uint8,address,address,uint256,uint8,bytes32,bytes32)[])': FunctionFragment; + }; + + getFunction(nameOrSignatureOrTopic: 'batchMetaDelegate'): FunctionFragment; + + encodeFunctionData( + functionFragment: 'batchMetaDelegate', + values: [IMetaDelegateHelper.MetaDelegateParamsStruct[]], + ): string; + + decodeFunctionResult( + functionFragment: 'batchMetaDelegate', + data: BytesLike, + ): Result; + + events: {}; +} + +export interface MetaDelegateHelper extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: MetaDelegateHelperInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter, + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter, + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + batchMetaDelegate( + delegateParams: IMetaDelegateHelper.MetaDelegateParamsStruct[], + overrides?: Overrides & { from?: string }, + ): Promise; + }; + + batchMetaDelegate( + delegateParams: IMetaDelegateHelper.MetaDelegateParamsStruct[], + overrides?: Overrides & { from?: string }, + ): Promise; + + callStatic: { + batchMetaDelegate( + delegateParams: IMetaDelegateHelper.MetaDelegateParamsStruct[], + overrides?: CallOverrides, + ): Promise; + }; + + filters: {}; + + estimateGas: { + batchMetaDelegate( + delegateParams: IMetaDelegateHelper.MetaDelegateParamsStruct[], + overrides?: Overrides & { from?: string }, + ): Promise; + }; + + populateTransaction: { + batchMetaDelegate( + delegateParams: IMetaDelegateHelper.MetaDelegateParamsStruct[], + overrides?: Overrides & { from?: string }, + ): Promise; + }; +} diff --git a/packages/contract-helpers/src/governance-v3/typechain/PayloadsControllerDataHelper.d.ts b/packages/contract-helpers/src/governance-v3/typechain/PayloadsControllerDataHelper.d.ts new file mode 100644 index 00000000..51a1db6f --- /dev/null +++ b/packages/contract-helpers/src/governance-v3/typechain/PayloadsControllerDataHelper.d.ts @@ -0,0 +1,247 @@ +/* Autogenerated file. Do not edit manually. */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers'; +import type { FunctionFragment, Result } from '@ethersproject/abi'; +import type { Listener, Provider } from '@ethersproject/providers'; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from './common'; + +export declare namespace IPayloadsControllerCore { + export type ExecutorConfigStruct = { executor: string; delay: BigNumberish }; + + export type ExecutorConfigStructOutput = [string, number] & { + executor: string; + delay: number; + }; + + export type ExecutionActionStruct = { + target: string; + withDelegateCall: boolean; + accessLevel: BigNumberish; + value: BigNumberish; + signature: string; + callData: BytesLike; + }; + + export type ExecutionActionStructOutput = [ + string, + boolean, + number, + BigNumber, + string, + string, + ] & { + target: string; + withDelegateCall: boolean; + accessLevel: number; + value: BigNumber; + signature: string; + callData: string; + }; + + export type PayloadStruct = { + creator: string; + maximumAccessLevelRequired: BigNumberish; + state: BigNumberish; + createdAt: BigNumberish; + queuedAt: BigNumberish; + executedAt: BigNumberish; + cancelledAt: BigNumberish; + expirationTime: BigNumberish; + delay: BigNumberish; + gracePeriod: BigNumberish; + actions: IPayloadsControllerCore.ExecutionActionStruct[]; + }; + + export type PayloadStructOutput = [ + string, + number, + number, + number, + number, + number, + number, + number, + number, + number, + IPayloadsControllerCore.ExecutionActionStructOutput[], + ] & { + creator: string; + maximumAccessLevelRequired: number; + state: number; + createdAt: number; + queuedAt: number; + executedAt: number; + cancelledAt: number; + expirationTime: number; + delay: number; + gracePeriod: number; + actions: IPayloadsControllerCore.ExecutionActionStructOutput[]; + }; +} + +export declare namespace IPayloadsControllerDataHelper { + export type ExecutorConfigStruct = { + accessLevel: BigNumberish; + config: IPayloadsControllerCore.ExecutorConfigStruct; + }; + + export type ExecutorConfigStructOutput = [ + number, + IPayloadsControllerCore.ExecutorConfigStructOutput, + ] & { + accessLevel: number; + config: IPayloadsControllerCore.ExecutorConfigStructOutput; + }; + + export type PayloadStruct = { + id: BigNumberish; + data: IPayloadsControllerCore.PayloadStruct; + }; + + export type PayloadStructOutput = [ + BigNumber, + IPayloadsControllerCore.PayloadStructOutput, + ] & { id: BigNumber; data: IPayloadsControllerCore.PayloadStructOutput }; +} + +export interface PayloadsControllerDataHelperInterface extends utils.Interface { + functions: { + 'getExecutorConfigs(address,uint8[])': FunctionFragment; + 'getPayloadsData(address,uint40[])': FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: 'getExecutorConfigs' | 'getPayloadsData', + ): FunctionFragment; + + encodeFunctionData( + functionFragment: 'getExecutorConfigs', + values: [string, BigNumberish[]], + ): string; + encodeFunctionData( + functionFragment: 'getPayloadsData', + values: [string, BigNumberish[]], + ): string; + + decodeFunctionResult( + functionFragment: 'getExecutorConfigs', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getPayloadsData', + data: BytesLike, + ): Result; + + events: {}; +} + +export interface PayloadsControllerDataHelper extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: PayloadsControllerDataHelperInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter, + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter, + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + getExecutorConfigs( + payloadsController: string, + accessLevels: BigNumberish[], + overrides?: CallOverrides, + ): Promise<[IPayloadsControllerDataHelper.ExecutorConfigStructOutput[]]>; + + getPayloadsData( + payloadsController: string, + payloadsIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise<[IPayloadsControllerDataHelper.PayloadStructOutput[]]>; + }; + + getExecutorConfigs( + payloadsController: string, + accessLevels: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + getPayloadsData( + payloadsController: string, + payloadsIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + callStatic: { + getExecutorConfigs( + payloadsController: string, + accessLevels: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + getPayloadsData( + payloadsController: string, + payloadsIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + }; + + filters: {}; + + estimateGas: { + getExecutorConfigs( + payloadsController: string, + accessLevels: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + getPayloadsData( + payloadsController: string, + payloadsIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + }; + + populateTransaction: { + getExecutorConfigs( + payloadsController: string, + accessLevels: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + + getPayloadsData( + payloadsController: string, + payloadsIds: BigNumberish[], + overrides?: CallOverrides, + ): Promise; + }; +} diff --git a/packages/contract-helpers/src/governance-v3/typechain/VotingMachine.ts b/packages/contract-helpers/src/governance-v3/typechain/VotingMachine.ts new file mode 100644 index 00000000..b2c06bc4 --- /dev/null +++ b/packages/contract-helpers/src/governance-v3/typechain/VotingMachine.ts @@ -0,0 +1,1538 @@ +/* Autogenerated file. Do not edit manually. */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers'; +import type { + FunctionFragment, + Result, + EventFragment, +} from '@ethersproject/abi'; +import type { Listener, Provider } from '@ethersproject/providers'; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from './common'; + +export declare namespace IVotingMachineWithProofs { + export type VotingAssetWithSlotStruct = { + underlyingAsset: string; + slot: BigNumberish; + }; + + export type VotingAssetWithSlotStructOutput = [string, BigNumber] & { + underlyingAsset: string; + slot: BigNumber; + }; + + export type ProposalWithoutVotesStruct = { + id: BigNumberish; + sentToGovernance: boolean; + startTime: BigNumberish; + endTime: BigNumberish; + votingClosedAndSentTimestamp: BigNumberish; + forVotes: BigNumberish; + againstVotes: BigNumberish; + creationBlockNumber: BigNumberish; + votingClosedAndSentBlockNumber: BigNumberish; + }; + + export type ProposalWithoutVotesStructOutput = [ + BigNumber, + boolean, + number, + number, + number, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + ] & { + id: BigNumber; + sentToGovernance: boolean; + startTime: number; + endTime: number; + votingClosedAndSentTimestamp: number; + forVotes: BigNumber; + againstVotes: BigNumber; + creationBlockNumber: BigNumber; + votingClosedAndSentBlockNumber: BigNumber; + }; + + export type ProposalVoteConfigurationStruct = { + votingDuration: BigNumberish; + l1ProposalBlockHash: BytesLike; + }; + + export type ProposalVoteConfigurationStructOutput = [number, string] & { + votingDuration: number; + l1ProposalBlockHash: string; + }; + + export type VoteStruct = { support: boolean; votingPower: BigNumberish }; + + export type VoteStructOutput = [boolean, BigNumber] & { + support: boolean; + votingPower: BigNumber; + }; + + export type VotingBalanceProofStruct = { + underlyingAsset: string; + slot: BigNumberish; + proof: BytesLike; + }; + + export type VotingBalanceProofStructOutput = [string, BigNumber, string] & { + underlyingAsset: string; + slot: BigNumber; + proof: string; + }; + + export type SignatureParamsStruct = { + v: BigNumberish; + r: BytesLike; + s: BytesLike; + }; + + export type SignatureParamsStructOutput = [number, string, string] & { + v: number; + r: string; + s: string; + }; +} + +export interface VotingMachineInterface extends utils.Interface { + functions: { + 'CROSS_CHAIN_CONTROLLER()': FunctionFragment; + 'DATA_WAREHOUSE()': FunctionFragment; + 'DOMAIN_SEPARATOR()': FunctionFragment; + 'GOVERNANCE()': FunctionFragment; + 'L1_VOTING_PORTAL()': FunctionFragment; + 'L1_VOTING_PORTAL_CHAIN_ID()': FunctionFragment; + 'NAME()': FunctionFragment; + 'REPRESENTATIVES_SLOT()': FunctionFragment; + 'VOTE_SUBMITTED_BY_REPRESENTATIVE_TYPEHASH()': FunctionFragment; + 'VOTE_SUBMITTED_TYPEHASH()': FunctionFragment; + 'VOTING_ASSET_WITH_SLOT_RAW()': FunctionFragment; + 'VOTING_ASSET_WITH_SLOT_TYPEHASH()': FunctionFragment; + 'VOTING_STRATEGY()': FunctionFragment; + 'closeAndSendVote(uint256)': FunctionFragment; + 'decodeMessage(bytes)': FunctionFragment; + 'decodeProposalMessage(bytes)': FunctionFragment; + 'decodeVoteMessage(bytes)': FunctionFragment; + 'eip712Domain()': FunctionFragment; + 'getGasLimit()': FunctionFragment; + 'getProposalById(uint256)': FunctionFragment; + 'getProposalState(uint256)': FunctionFragment; + 'getProposalVoteConfiguration(uint256)': FunctionFragment; + 'getProposalsVoteConfigurationIds(uint256,uint256)': FunctionFragment; + 'getUserProposalVote(address,uint256)': FunctionFragment; + 'owner()': FunctionFragment; + 'receiveCrossChainMessage(address,uint256,bytes)': FunctionFragment; + 'renounceOwnership()': FunctionFragment; + 'startProposalVote(uint256)': FunctionFragment; + 'submitVote(uint256,bool,(address,uint128,bytes)[])': FunctionFragment; + 'submitVoteAsRepresentative(uint256,bool,address,bytes,(address,uint128,bytes)[])': FunctionFragment; + 'submitVoteAsRepresentativeBySignature(uint256,address,address,bool,bytes,(address,uint128,bytes)[],(uint8,bytes32,bytes32))': FunctionFragment; + 'submitVoteBySignature(uint256,address,bool,(address,uint128,bytes)[],uint8,bytes32,bytes32)': FunctionFragment; + 'transferOwnership(address)': FunctionFragment; + 'updateGasLimit(uint256)': FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | 'CROSS_CHAIN_CONTROLLER' + | 'DATA_WAREHOUSE' + | 'DOMAIN_SEPARATOR' + | 'GOVERNANCE' + | 'L1_VOTING_PORTAL' + | 'L1_VOTING_PORTAL_CHAIN_ID' + | 'NAME' + | 'REPRESENTATIVES_SLOT' + | 'VOTE_SUBMITTED_BY_REPRESENTATIVE_TYPEHASH' + | 'VOTE_SUBMITTED_TYPEHASH' + | 'VOTING_ASSET_WITH_SLOT_RAW' + | 'VOTING_ASSET_WITH_SLOT_TYPEHASH' + | 'VOTING_STRATEGY' + | 'closeAndSendVote' + | 'decodeMessage' + | 'decodeProposalMessage' + | 'decodeVoteMessage' + | 'eip712Domain' + | 'getGasLimit' + | 'getProposalById' + | 'getProposalState' + | 'getProposalVoteConfiguration' + | 'getProposalsVoteConfigurationIds' + | 'getUserProposalVote' + | 'owner' + | 'receiveCrossChainMessage' + | 'renounceOwnership' + | 'startProposalVote' + | 'submitVote' + | 'submitVoteAsRepresentative' + | 'submitVoteAsRepresentativeBySignature' + | 'submitVoteBySignature' + | 'transferOwnership' + | 'updateGasLimit', + ): FunctionFragment; + + encodeFunctionData( + functionFragment: 'CROSS_CHAIN_CONTROLLER', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'DATA_WAREHOUSE', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'DOMAIN_SEPARATOR', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'GOVERNANCE', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'L1_VOTING_PORTAL', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'L1_VOTING_PORTAL_CHAIN_ID', + values?: undefined, + ): string; + encodeFunctionData(functionFragment: 'NAME', values?: undefined): string; + encodeFunctionData( + functionFragment: 'REPRESENTATIVES_SLOT', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'VOTE_SUBMITTED_BY_REPRESENTATIVE_TYPEHASH', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'VOTE_SUBMITTED_TYPEHASH', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'VOTING_ASSET_WITH_SLOT_RAW', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'VOTING_ASSET_WITH_SLOT_TYPEHASH', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'VOTING_STRATEGY', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'closeAndSendVote', + values: [BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'decodeMessage', + values: [BytesLike], + ): string; + encodeFunctionData( + functionFragment: 'decodeProposalMessage', + values: [BytesLike], + ): string; + encodeFunctionData( + functionFragment: 'decodeVoteMessage', + values: [BytesLike], + ): string; + encodeFunctionData( + functionFragment: 'eip712Domain', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'getGasLimit', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'getProposalById', + values: [BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'getProposalState', + values: [BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'getProposalVoteConfiguration', + values: [BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'getProposalsVoteConfigurationIds', + values: [BigNumberish, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'getUserProposalVote', + values: [string, BigNumberish], + ): string; + encodeFunctionData(functionFragment: 'owner', values?: undefined): string; + encodeFunctionData( + functionFragment: 'receiveCrossChainMessage', + values: [string, BigNumberish, BytesLike], + ): string; + encodeFunctionData( + functionFragment: 'renounceOwnership', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'startProposalVote', + values: [BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'submitVote', + values: [ + BigNumberish, + boolean, + IVotingMachineWithProofs.VotingBalanceProofStruct[], + ], + ): string; + encodeFunctionData( + functionFragment: 'submitVoteAsRepresentative', + values: [ + BigNumberish, + boolean, + string, + BytesLike, + IVotingMachineWithProofs.VotingBalanceProofStruct[], + ], + ): string; + encodeFunctionData( + functionFragment: 'submitVoteAsRepresentativeBySignature', + values: [ + BigNumberish, + string, + string, + boolean, + BytesLike, + IVotingMachineWithProofs.VotingBalanceProofStruct[], + IVotingMachineWithProofs.SignatureParamsStruct, + ], + ): string; + encodeFunctionData( + functionFragment: 'submitVoteBySignature', + values: [ + BigNumberish, + string, + boolean, + IVotingMachineWithProofs.VotingBalanceProofStruct[], + BigNumberish, + BytesLike, + BytesLike, + ], + ): string; + encodeFunctionData( + functionFragment: 'transferOwnership', + values: [string], + ): string; + encodeFunctionData( + functionFragment: 'updateGasLimit', + values: [BigNumberish], + ): string; + + decodeFunctionResult( + functionFragment: 'CROSS_CHAIN_CONTROLLER', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'DATA_WAREHOUSE', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'DOMAIN_SEPARATOR', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'GOVERNANCE', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'L1_VOTING_PORTAL', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'L1_VOTING_PORTAL_CHAIN_ID', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'NAME', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'REPRESENTATIVES_SLOT', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'VOTE_SUBMITTED_BY_REPRESENTATIVE_TYPEHASH', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'VOTE_SUBMITTED_TYPEHASH', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'VOTING_ASSET_WITH_SLOT_RAW', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'VOTING_ASSET_WITH_SLOT_TYPEHASH', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'VOTING_STRATEGY', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'closeAndSendVote', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'decodeMessage', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'decodeProposalMessage', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'decodeVoteMessage', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'eip712Domain', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getGasLimit', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getProposalById', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getProposalState', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getProposalVoteConfiguration', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getProposalsVoteConfigurationIds', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getUserProposalVote', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'receiveCrossChainMessage', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'renounceOwnership', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'startProposalVote', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'submitVote', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'submitVoteAsRepresentative', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'submitVoteAsRepresentativeBySignature', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'submitVoteBySignature', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'transferOwnership', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'updateGasLimit', + data: BytesLike, + ): Result; + + events: { + 'EIP712DomainChanged()': EventFragment; + 'GasLimitUpdated(uint256)': EventFragment; + 'IncorrectTypeMessageReceived(address,uint256,bytes,bytes)': EventFragment; + 'MessageReceived(address,uint256,bool,uint8,bytes,bytes)': EventFragment; + 'OwnershipTransferred(address,address)': EventFragment; + 'ProposalResultsSent(uint256,uint256,uint256)': EventFragment; + 'ProposalVoteConfigurationBridged(uint256,bytes32,uint24,bool)': EventFragment; + 'ProposalVoteStarted(uint256,bytes32,uint256,uint256)': EventFragment; + 'VoteEmitted(uint256,address,bool,uint256)': EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: 'EIP712DomainChanged'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'GasLimitUpdated'): EventFragment; + getEvent( + nameOrSignatureOrTopic: 'IncorrectTypeMessageReceived', + ): EventFragment; + getEvent(nameOrSignatureOrTopic: 'MessageReceived'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'OwnershipTransferred'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'ProposalResultsSent'): EventFragment; + getEvent( + nameOrSignatureOrTopic: 'ProposalVoteConfigurationBridged', + ): EventFragment; + getEvent(nameOrSignatureOrTopic: 'ProposalVoteStarted'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'VoteEmitted'): EventFragment; +} + +export interface EIP712DomainChangedEventObject {} +export type EIP712DomainChangedEvent = TypedEvent< + [], + EIP712DomainChangedEventObject +>; + +export type EIP712DomainChangedEventFilter = + TypedEventFilter; + +export interface GasLimitUpdatedEventObject { + gasLimit: BigNumber; +} +export type GasLimitUpdatedEvent = TypedEvent< + [BigNumber], + GasLimitUpdatedEventObject +>; + +export type GasLimitUpdatedEventFilter = TypedEventFilter; + +export interface IncorrectTypeMessageReceivedEventObject { + originSender: string; + originChainId: BigNumber; + message: string; + reason: string; +} +export type IncorrectTypeMessageReceivedEvent = TypedEvent< + [string, BigNumber, string, string], + IncorrectTypeMessageReceivedEventObject +>; + +export type IncorrectTypeMessageReceivedEventFilter = + TypedEventFilter; + +export interface MessageReceivedEventObject { + originSender: string; + originChainId: BigNumber; + delivered: boolean; + messageType: number; + message: string; + reason: string; +} +export type MessageReceivedEvent = TypedEvent< + [string, BigNumber, boolean, number, string, string], + MessageReceivedEventObject +>; + +export type MessageReceivedEventFilter = TypedEventFilter; + +export interface OwnershipTransferredEventObject { + previousOwner: string; + newOwner: string; +} +export type OwnershipTransferredEvent = TypedEvent< + [string, string], + OwnershipTransferredEventObject +>; + +export type OwnershipTransferredEventFilter = + TypedEventFilter; + +export interface ProposalResultsSentEventObject { + proposalId: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; +} +export type ProposalResultsSentEvent = TypedEvent< + [BigNumber, BigNumber, BigNumber], + ProposalResultsSentEventObject +>; + +export type ProposalResultsSentEventFilter = + TypedEventFilter; + +export interface ProposalVoteConfigurationBridgedEventObject { + proposalId: BigNumber; + blockHash: string; + votingDuration: number; + voteCreated: boolean; +} +export type ProposalVoteConfigurationBridgedEvent = TypedEvent< + [BigNumber, string, number, boolean], + ProposalVoteConfigurationBridgedEventObject +>; + +export type ProposalVoteConfigurationBridgedEventFilter = + TypedEventFilter; + +export interface ProposalVoteStartedEventObject { + proposalId: BigNumber; + l1BlockHash: string; + startTime: BigNumber; + endTime: BigNumber; +} +export type ProposalVoteStartedEvent = TypedEvent< + [BigNumber, string, BigNumber, BigNumber], + ProposalVoteStartedEventObject +>; + +export type ProposalVoteStartedEventFilter = + TypedEventFilter; + +export interface VoteEmittedEventObject { + proposalId: BigNumber; + voter: string; + support: boolean; + votingPower: BigNumber; +} +export type VoteEmittedEvent = TypedEvent< + [BigNumber, string, boolean, BigNumber], + VoteEmittedEventObject +>; + +export type VoteEmittedEventFilter = TypedEventFilter; + +export interface VotingMachine extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: VotingMachineInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter, + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter, + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + CROSS_CHAIN_CONTROLLER(overrides?: CallOverrides): Promise<[string]>; + + DATA_WAREHOUSE(overrides?: CallOverrides): Promise<[string]>; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + + GOVERNANCE(overrides?: CallOverrides): Promise<[string]>; + + L1_VOTING_PORTAL(overrides?: CallOverrides): Promise<[string]>; + + L1_VOTING_PORTAL_CHAIN_ID(overrides?: CallOverrides): Promise<[BigNumber]>; + + NAME(overrides?: CallOverrides): Promise<[string]>; + + REPRESENTATIVES_SLOT(overrides?: CallOverrides): Promise<[BigNumber]>; + + VOTE_SUBMITTED_BY_REPRESENTATIVE_TYPEHASH( + overrides?: CallOverrides, + ): Promise<[string]>; + + VOTE_SUBMITTED_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + VOTING_ASSET_WITH_SLOT_RAW(overrides?: CallOverrides): Promise<[string]>; + + VOTING_ASSET_WITH_SLOT_TYPEHASH( + overrides?: CallOverrides, + ): Promise<[string]>; + + VOTING_STRATEGY(overrides?: CallOverrides): Promise<[string]>; + + closeAndSendVote( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + decodeMessage( + message: BytesLike, + overrides?: CallOverrides, + ): Promise<[number, string]>; + + decodeProposalMessage( + message: BytesLike, + overrides?: CallOverrides, + ): Promise<[BigNumber, string, number]>; + + decodeVoteMessage( + message: BytesLike, + overrides?: CallOverrides, + ): Promise< + [ + BigNumber, + string, + boolean, + IVotingMachineWithProofs.VotingAssetWithSlotStructOutput[], + ] + >; + + eip712Domain(overrides?: CallOverrides): Promise< + [string, string, string, BigNumber, string, string, BigNumber[]] & { + fields: string; + name: string; + version: string; + chainId: BigNumber; + verifyingContract: string; + salt: string; + extensions: BigNumber[]; + } + >; + + getGasLimit(overrides?: CallOverrides): Promise<[BigNumber]>; + + getProposalById( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise<[IVotingMachineWithProofs.ProposalWithoutVotesStructOutput]>; + + getProposalState( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise<[number]>; + + getProposalVoteConfiguration( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise< + [IVotingMachineWithProofs.ProposalVoteConfigurationStructOutput] + >; + + getProposalsVoteConfigurationIds( + skip: BigNumberish, + size: BigNumberish, + overrides?: CallOverrides, + ): Promise<[BigNumber[]]>; + + getUserProposalVote( + user: string, + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise<[IVotingMachineWithProofs.VoteStructOutput]>; + + owner(overrides?: CallOverrides): Promise<[string]>; + + receiveCrossChainMessage( + originSender: string, + originChainId: BigNumberish, + messageWithType: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string }, + ): Promise; + + startProposalVote( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + submitVote( + proposalId: BigNumberish, + support: boolean, + votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], + overrides?: Overrides & { from?: string }, + ): Promise; + + submitVoteAsRepresentative( + proposalId: BigNumberish, + support: boolean, + voter: string, + proofOfRepresentation: BytesLike, + votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], + overrides?: Overrides & { from?: string }, + ): Promise; + + submitVoteAsRepresentativeBySignature( + proposalId: BigNumberish, + voter: string, + representative: string, + support: boolean, + proofOfRepresentation: BytesLike, + votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], + signatureParams: IVotingMachineWithProofs.SignatureParamsStruct, + overrides?: Overrides & { from?: string }, + ): Promise; + + submitVoteBySignature( + proposalId: BigNumberish, + voter: string, + support: boolean, + votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + updateGasLimit( + gasLimit: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + }; + + CROSS_CHAIN_CONTROLLER(overrides?: CallOverrides): Promise; + + DATA_WAREHOUSE(overrides?: CallOverrides): Promise; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + GOVERNANCE(overrides?: CallOverrides): Promise; + + L1_VOTING_PORTAL(overrides?: CallOverrides): Promise; + + L1_VOTING_PORTAL_CHAIN_ID(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + REPRESENTATIVES_SLOT(overrides?: CallOverrides): Promise; + + VOTE_SUBMITTED_BY_REPRESENTATIVE_TYPEHASH( + overrides?: CallOverrides, + ): Promise; + + VOTE_SUBMITTED_TYPEHASH(overrides?: CallOverrides): Promise; + + VOTING_ASSET_WITH_SLOT_RAW(overrides?: CallOverrides): Promise; + + VOTING_ASSET_WITH_SLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + VOTING_STRATEGY(overrides?: CallOverrides): Promise; + + closeAndSendVote( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + decodeMessage( + message: BytesLike, + overrides?: CallOverrides, + ): Promise<[number, string]>; + + decodeProposalMessage( + message: BytesLike, + overrides?: CallOverrides, + ): Promise<[BigNumber, string, number]>; + + decodeVoteMessage( + message: BytesLike, + overrides?: CallOverrides, + ): Promise< + [ + BigNumber, + string, + boolean, + IVotingMachineWithProofs.VotingAssetWithSlotStructOutput[], + ] + >; + + eip712Domain(overrides?: CallOverrides): Promise< + [string, string, string, BigNumber, string, string, BigNumber[]] & { + fields: string; + name: string; + version: string; + chainId: BigNumber; + verifyingContract: string; + salt: string; + extensions: BigNumber[]; + } + >; + + getGasLimit(overrides?: CallOverrides): Promise; + + getProposalById( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getProposalState( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getProposalVoteConfiguration( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getProposalsVoteConfigurationIds( + skip: BigNumberish, + size: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getUserProposalVote( + user: string, + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + receiveCrossChainMessage( + originSender: string, + originChainId: BigNumberish, + messageWithType: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string }, + ): Promise; + + startProposalVote( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + submitVote( + proposalId: BigNumberish, + support: boolean, + votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], + overrides?: Overrides & { from?: string }, + ): Promise; + + submitVoteAsRepresentative( + proposalId: BigNumberish, + support: boolean, + voter: string, + proofOfRepresentation: BytesLike, + votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], + overrides?: Overrides & { from?: string }, + ): Promise; + + submitVoteAsRepresentativeBySignature( + proposalId: BigNumberish, + voter: string, + representative: string, + support: boolean, + proofOfRepresentation: BytesLike, + votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], + signatureParams: IVotingMachineWithProofs.SignatureParamsStruct, + overrides?: Overrides & { from?: string }, + ): Promise; + + submitVoteBySignature( + proposalId: BigNumberish, + voter: string, + support: boolean, + votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + updateGasLimit( + gasLimit: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + callStatic: { + CROSS_CHAIN_CONTROLLER(overrides?: CallOverrides): Promise; + + DATA_WAREHOUSE(overrides?: CallOverrides): Promise; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + GOVERNANCE(overrides?: CallOverrides): Promise; + + L1_VOTING_PORTAL(overrides?: CallOverrides): Promise; + + L1_VOTING_PORTAL_CHAIN_ID(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + REPRESENTATIVES_SLOT(overrides?: CallOverrides): Promise; + + VOTE_SUBMITTED_BY_REPRESENTATIVE_TYPEHASH( + overrides?: CallOverrides, + ): Promise; + + VOTE_SUBMITTED_TYPEHASH(overrides?: CallOverrides): Promise; + + VOTING_ASSET_WITH_SLOT_RAW(overrides?: CallOverrides): Promise; + + VOTING_ASSET_WITH_SLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + VOTING_STRATEGY(overrides?: CallOverrides): Promise; + + closeAndSendVote( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + decodeMessage( + message: BytesLike, + overrides?: CallOverrides, + ): Promise<[number, string]>; + + decodeProposalMessage( + message: BytesLike, + overrides?: CallOverrides, + ): Promise<[BigNumber, string, number]>; + + decodeVoteMessage( + message: BytesLike, + overrides?: CallOverrides, + ): Promise< + [ + BigNumber, + string, + boolean, + IVotingMachineWithProofs.VotingAssetWithSlotStructOutput[], + ] + >; + + eip712Domain(overrides?: CallOverrides): Promise< + [string, string, string, BigNumber, string, string, BigNumber[]] & { + fields: string; + name: string; + version: string; + chainId: BigNumber; + verifyingContract: string; + salt: string; + extensions: BigNumber[]; + } + >; + + getGasLimit(overrides?: CallOverrides): Promise; + + getProposalById( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getProposalState( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getProposalVoteConfiguration( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getProposalsVoteConfigurationIds( + skip: BigNumberish, + size: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getUserProposalVote( + user: string, + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + receiveCrossChainMessage( + originSender: string, + originChainId: BigNumberish, + messageWithType: BytesLike, + overrides?: CallOverrides, + ): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + startProposalVote( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + submitVote( + proposalId: BigNumberish, + support: boolean, + votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], + overrides?: CallOverrides, + ): Promise; + + submitVoteAsRepresentative( + proposalId: BigNumberish, + support: boolean, + voter: string, + proofOfRepresentation: BytesLike, + votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], + overrides?: CallOverrides, + ): Promise; + + submitVoteAsRepresentativeBySignature( + proposalId: BigNumberish, + voter: string, + representative: string, + support: boolean, + proofOfRepresentation: BytesLike, + votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], + signatureParams: IVotingMachineWithProofs.SignatureParamsStruct, + overrides?: CallOverrides, + ): Promise; + + submitVoteBySignature( + proposalId: BigNumberish, + voter: string, + support: boolean, + votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides, + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: CallOverrides, + ): Promise; + + updateGasLimit( + gasLimit: BigNumberish, + overrides?: CallOverrides, + ): Promise; + }; + + filters: { + 'EIP712DomainChanged()'(): EIP712DomainChangedEventFilter; + EIP712DomainChanged(): EIP712DomainChangedEventFilter; + + 'GasLimitUpdated(uint256)'( + gasLimit?: BigNumberish | null, + ): GasLimitUpdatedEventFilter; + GasLimitUpdated(gasLimit?: BigNumberish | null): GasLimitUpdatedEventFilter; + + 'IncorrectTypeMessageReceived(address,uint256,bytes,bytes)'( + originSender?: string | null, + originChainId?: BigNumberish | null, + message?: null, + reason?: null, + ): IncorrectTypeMessageReceivedEventFilter; + IncorrectTypeMessageReceived( + originSender?: string | null, + originChainId?: BigNumberish | null, + message?: null, + reason?: null, + ): IncorrectTypeMessageReceivedEventFilter; + + 'MessageReceived(address,uint256,bool,uint8,bytes,bytes)'( + originSender?: string | null, + originChainId?: BigNumberish | null, + delivered?: boolean | null, + messageType?: null, + message?: null, + reason?: null, + ): MessageReceivedEventFilter; + MessageReceived( + originSender?: string | null, + originChainId?: BigNumberish | null, + delivered?: boolean | null, + messageType?: null, + message?: null, + reason?: null, + ): MessageReceivedEventFilter; + + 'OwnershipTransferred(address,address)'( + previousOwner?: string | null, + newOwner?: string | null, + ): OwnershipTransferredEventFilter; + OwnershipTransferred( + previousOwner?: string | null, + newOwner?: string | null, + ): OwnershipTransferredEventFilter; + + 'ProposalResultsSent(uint256,uint256,uint256)'( + proposalId?: BigNumberish | null, + forVotes?: null, + againstVotes?: null, + ): ProposalResultsSentEventFilter; + ProposalResultsSent( + proposalId?: BigNumberish | null, + forVotes?: null, + againstVotes?: null, + ): ProposalResultsSentEventFilter; + + 'ProposalVoteConfigurationBridged(uint256,bytes32,uint24,bool)'( + proposalId?: BigNumberish | null, + blockHash?: BytesLike | null, + votingDuration?: null, + voteCreated?: boolean | null, + ): ProposalVoteConfigurationBridgedEventFilter; + ProposalVoteConfigurationBridged( + proposalId?: BigNumberish | null, + blockHash?: BytesLike | null, + votingDuration?: null, + voteCreated?: boolean | null, + ): ProposalVoteConfigurationBridgedEventFilter; + + 'ProposalVoteStarted(uint256,bytes32,uint256,uint256)'( + proposalId?: BigNumberish | null, + l1BlockHash?: BytesLike | null, + startTime?: null, + endTime?: null, + ): ProposalVoteStartedEventFilter; + ProposalVoteStarted( + proposalId?: BigNumberish | null, + l1BlockHash?: BytesLike | null, + startTime?: null, + endTime?: null, + ): ProposalVoteStartedEventFilter; + + 'VoteEmitted(uint256,address,bool,uint256)'( + proposalId?: BigNumberish | null, + voter?: string | null, + support?: boolean | null, + votingPower?: null, + ): VoteEmittedEventFilter; + VoteEmitted( + proposalId?: BigNumberish | null, + voter?: string | null, + support?: boolean | null, + votingPower?: null, + ): VoteEmittedEventFilter; + }; + + estimateGas: { + CROSS_CHAIN_CONTROLLER(overrides?: CallOverrides): Promise; + + DATA_WAREHOUSE(overrides?: CallOverrides): Promise; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + GOVERNANCE(overrides?: CallOverrides): Promise; + + L1_VOTING_PORTAL(overrides?: CallOverrides): Promise; + + L1_VOTING_PORTAL_CHAIN_ID(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + REPRESENTATIVES_SLOT(overrides?: CallOverrides): Promise; + + VOTE_SUBMITTED_BY_REPRESENTATIVE_TYPEHASH( + overrides?: CallOverrides, + ): Promise; + + VOTE_SUBMITTED_TYPEHASH(overrides?: CallOverrides): Promise; + + VOTING_ASSET_WITH_SLOT_RAW(overrides?: CallOverrides): Promise; + + VOTING_ASSET_WITH_SLOT_TYPEHASH( + overrides?: CallOverrides, + ): Promise; + + VOTING_STRATEGY(overrides?: CallOverrides): Promise; + + closeAndSendVote( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + decodeMessage( + message: BytesLike, + overrides?: CallOverrides, + ): Promise; + + decodeProposalMessage( + message: BytesLike, + overrides?: CallOverrides, + ): Promise; + + decodeVoteMessage( + message: BytesLike, + overrides?: CallOverrides, + ): Promise; + + eip712Domain(overrides?: CallOverrides): Promise; + + getGasLimit(overrides?: CallOverrides): Promise; + + getProposalById( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getProposalState( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getProposalVoteConfiguration( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getProposalsVoteConfigurationIds( + skip: BigNumberish, + size: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getUserProposalVote( + user: string, + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + receiveCrossChainMessage( + originSender: string, + originChainId: BigNumberish, + messageWithType: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string }, + ): Promise; + + startProposalVote( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + submitVote( + proposalId: BigNumberish, + support: boolean, + votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], + overrides?: Overrides & { from?: string }, + ): Promise; + + submitVoteAsRepresentative( + proposalId: BigNumberish, + support: boolean, + voter: string, + proofOfRepresentation: BytesLike, + votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], + overrides?: Overrides & { from?: string }, + ): Promise; + + submitVoteAsRepresentativeBySignature( + proposalId: BigNumberish, + voter: string, + representative: string, + support: boolean, + proofOfRepresentation: BytesLike, + votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], + signatureParams: IVotingMachineWithProofs.SignatureParamsStruct, + overrides?: Overrides & { from?: string }, + ): Promise; + + submitVoteBySignature( + proposalId: BigNumberish, + voter: string, + support: boolean, + votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + updateGasLimit( + gasLimit: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + }; + + populateTransaction: { + CROSS_CHAIN_CONTROLLER( + overrides?: CallOverrides, + ): Promise; + + DATA_WAREHOUSE(overrides?: CallOverrides): Promise; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + GOVERNANCE(overrides?: CallOverrides): Promise; + + L1_VOTING_PORTAL(overrides?: CallOverrides): Promise; + + L1_VOTING_PORTAL_CHAIN_ID( + overrides?: CallOverrides, + ): Promise; + + NAME(overrides?: CallOverrides): Promise; + + REPRESENTATIVES_SLOT( + overrides?: CallOverrides, + ): Promise; + + VOTE_SUBMITTED_BY_REPRESENTATIVE_TYPEHASH( + overrides?: CallOverrides, + ): Promise; + + VOTE_SUBMITTED_TYPEHASH( + overrides?: CallOverrides, + ): Promise; + + VOTING_ASSET_WITH_SLOT_RAW( + overrides?: CallOverrides, + ): Promise; + + VOTING_ASSET_WITH_SLOT_TYPEHASH( + overrides?: CallOverrides, + ): Promise; + + VOTING_STRATEGY(overrides?: CallOverrides): Promise; + + closeAndSendVote( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + decodeMessage( + message: BytesLike, + overrides?: CallOverrides, + ): Promise; + + decodeProposalMessage( + message: BytesLike, + overrides?: CallOverrides, + ): Promise; + + decodeVoteMessage( + message: BytesLike, + overrides?: CallOverrides, + ): Promise; + + eip712Domain(overrides?: CallOverrides): Promise; + + getGasLimit(overrides?: CallOverrides): Promise; + + getProposalById( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getProposalState( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getProposalVoteConfiguration( + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getProposalsVoteConfigurationIds( + skip: BigNumberish, + size: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getUserProposalVote( + user: string, + proposalId: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + receiveCrossChainMessage( + originSender: string, + originChainId: BigNumberish, + messageWithType: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string }, + ): Promise; + + startProposalVote( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + submitVote( + proposalId: BigNumberish, + support: boolean, + votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], + overrides?: Overrides & { from?: string }, + ): Promise; + + submitVoteAsRepresentative( + proposalId: BigNumberish, + support: boolean, + voter: string, + proofOfRepresentation: BytesLike, + votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], + overrides?: Overrides & { from?: string }, + ): Promise; + + submitVoteAsRepresentativeBySignature( + proposalId: BigNumberish, + voter: string, + representative: string, + support: boolean, + proofOfRepresentation: BytesLike, + votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], + signatureParams: IVotingMachineWithProofs.SignatureParamsStruct, + overrides?: Overrides & { from?: string }, + ): Promise; + + submitVoteBySignature( + proposalId: BigNumberish, + voter: string, + support: boolean, + votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + updateGasLimit( + gasLimit: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + }; +} diff --git a/packages/contract-helpers/src/governance-v3/typechain/VotingMachineDataHelper.d.ts b/packages/contract-helpers/src/governance-v3/typechain/VotingMachineDataHelper.d.ts new file mode 100644 index 00000000..01e6a710 --- /dev/null +++ b/packages/contract-helpers/src/governance-v3/typechain/VotingMachineDataHelper.d.ts @@ -0,0 +1,208 @@ +/* Autogenerated file. Do not edit manually. */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers'; +import type { FunctionFragment, Result } from '@ethersproject/abi'; +import type { Listener, Provider } from '@ethersproject/providers'; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from './common'; + +export declare namespace IVotingMachineDataHelper { + export type InitialProposalStruct = { + id: BigNumberish; + snapshotBlockHash: BytesLike; + }; + + export type InitialProposalStructOutput = [BigNumber, string] & { + id: BigNumber; + snapshotBlockHash: string; + }; + + export type VotedInfoStruct = { support: boolean; votingPower: BigNumberish }; + + export type VotedInfoStructOutput = [boolean, BigNumber] & { + support: boolean; + votingPower: BigNumber; + }; + + export type ProposalStruct = { + proposalData: IVotingMachineWithProofs.ProposalWithoutVotesStruct; + votedInfo: IVotingMachineDataHelper.VotedInfoStruct; + strategy: string; + dataWarehouse: string; + votingAssets: string[]; + hasRequiredRoots: boolean; + voteConfig: IVotingMachineWithProofs.ProposalVoteConfigurationStruct; + state: BigNumberish; + }; + + export type ProposalStructOutput = [ + IVotingMachineWithProofs.ProposalWithoutVotesStructOutput, + IVotingMachineDataHelper.VotedInfoStructOutput, + string, + string, + string[], + boolean, + IVotingMachineWithProofs.ProposalVoteConfigurationStructOutput, + number, + ] & { + proposalData: IVotingMachineWithProofs.ProposalWithoutVotesStructOutput; + votedInfo: IVotingMachineDataHelper.VotedInfoStructOutput; + strategy: string; + dataWarehouse: string; + votingAssets: string[]; + hasRequiredRoots: boolean; + voteConfig: IVotingMachineWithProofs.ProposalVoteConfigurationStructOutput; + state: number; + }; +} + +export declare namespace IVotingMachineWithProofs { + export type ProposalWithoutVotesStruct = { + id: BigNumberish; + sentToGovernance: boolean; + startTime: BigNumberish; + endTime: BigNumberish; + votingClosedAndSentTimestamp: BigNumberish; + forVotes: BigNumberish; + againstVotes: BigNumberish; + creationBlockNumber: BigNumberish; + votingClosedAndSentBlockNumber: BigNumberish; + }; + + export type ProposalWithoutVotesStructOutput = [ + BigNumber, + boolean, + number, + number, + number, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + ] & { + id: BigNumber; + sentToGovernance: boolean; + startTime: number; + endTime: number; + votingClosedAndSentTimestamp: number; + forVotes: BigNumber; + againstVotes: BigNumber; + creationBlockNumber: BigNumber; + votingClosedAndSentBlockNumber: BigNumber; + }; + + export type ProposalVoteConfigurationStruct = { + votingDuration: BigNumberish; + l1ProposalBlockHash: BytesLike; + }; + + export type ProposalVoteConfigurationStructOutput = [number, string] & { + votingDuration: number; + l1ProposalBlockHash: string; + }; +} + +export interface VotingMachineDataHelperInterface extends utils.Interface { + functions: { + 'getProposalsData(address,(uint256,bytes32)[],address)': FunctionFragment; + }; + + getFunction(nameOrSignatureOrTopic: 'getProposalsData'): FunctionFragment; + + encodeFunctionData( + functionFragment: 'getProposalsData', + values: [string, IVotingMachineDataHelper.InitialProposalStruct[], string], + ): string; + + decodeFunctionResult( + functionFragment: 'getProposalsData', + data: BytesLike, + ): Result; + + events: {}; +} + +export interface VotingMachineDataHelper extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: VotingMachineDataHelperInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter, + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter, + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + getProposalsData( + votingMachine: string, + initialProposals: IVotingMachineDataHelper.InitialProposalStruct[], + user: string, + overrides?: CallOverrides, + ): Promise<[IVotingMachineDataHelper.ProposalStructOutput[]]>; + }; + + getProposalsData( + votingMachine: string, + initialProposals: IVotingMachineDataHelper.InitialProposalStruct[], + user: string, + overrides?: CallOverrides, + ): Promise; + + callStatic: { + getProposalsData( + votingMachine: string, + initialProposals: IVotingMachineDataHelper.InitialProposalStruct[], + user: string, + overrides?: CallOverrides, + ): Promise; + }; + + filters: {}; + + estimateGas: { + getProposalsData( + votingMachine: string, + initialProposals: IVotingMachineDataHelper.InitialProposalStruct[], + user: string, + overrides?: CallOverrides, + ): Promise; + }; + + populateTransaction: { + getProposalsData( + votingMachine: string, + initialProposals: IVotingMachineDataHelper.InitialProposalStruct[], + user: string, + overrides?: CallOverrides, + ): Promise; + }; +} diff --git a/packages/contract-helpers/src/governance-v3/typechain/common.ts b/packages/contract-helpers/src/governance-v3/typechain/common.ts new file mode 100644 index 00000000..0fb82cd3 --- /dev/null +++ b/packages/contract-helpers/src/governance-v3/typechain/common.ts @@ -0,0 +1,43 @@ +/* Autogenerated file. Do not edit manually. */ +/* eslint-disable */ +import type { Listener } from '@ethersproject/providers'; +import type { Event, EventFilter } from 'ethers'; + +export interface TypedEvent< + TArgsArray extends Array = any, + TArgsObject = any, +> extends Event { + args: TArgsArray & TArgsObject; +} + +export interface TypedEventFilter<_TEvent extends TypedEvent> + extends EventFilter {} + +export interface TypedListener { + (...listenerArg: [...__TypechainArgsArray, TEvent]): void; +} + +type __TypechainArgsArray = T extends TypedEvent ? U : never; + +export interface OnEvent { + ( + eventFilter: TypedEventFilter, + listener: TypedListener, + ): TRes; + (eventName: string, listener: Listener): TRes; +} + +export type MinEthersFactory = { + deploy(...a: ARGS[]): Promise; +}; + +export type GetContractTypeFromFactory = F extends MinEthersFactory< + infer C, + any +> + ? C + : never; + +export type GetARGsTypeFromFactory = F extends MinEthersFactory + ? Parameters + : never; diff --git a/packages/contract-helpers/src/governance-v3/typechain/factories/AaveTokenV3__factory.ts b/packages/contract-helpers/src/governance-v3/typechain/factories/AaveTokenV3__factory.ts new file mode 100644 index 00000000..268a6bdb --- /dev/null +++ b/packages/contract-helpers/src/governance-v3/typechain/factories/AaveTokenV3__factory.ts @@ -0,0 +1,778 @@ +/* Autogenerated file. Do not edit manually. */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from 'ethers'; +import type { Provider, TransactionRequest } from '@ethersproject/providers'; +import type { AaveTokenV3, AaveTokenV3Interface } from '../AaveTokenV3'; + +const _abi = [ + { + inputs: [], + name: 'InvalidShortString', + type: 'error', + }, + { + inputs: [ + { + internalType: 'string', + name: 'str', + type: 'string', + }, + ], + name: 'StringTooLong', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + ], + name: 'Approval', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'delegator', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'delegatee', + type: 'address', + }, + { + indexed: false, + internalType: + 'enum IGovernancePowerDelegationToken.GovernancePowerType', + name: 'delegationType', + type: 'uint8', + }, + ], + name: 'DelegateChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [], + name: 'EIP712DomainChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'from', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'to', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + ], + name: 'Transfer', + type: 'event', + }, + { + inputs: [], + name: 'DELEGATE_BY_TYPE_TYPEHASH', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'DELEGATE_TYPEHASH', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'DOMAIN_SEPARATOR', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'PERMIT_TYPEHASH', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'POWER_SCALE_FACTOR', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'REVISION', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: '_nonces', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + ], + name: 'allowance', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'approve', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'balanceOf', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'decimals', + outputs: [ + { + internalType: 'uint8', + name: '', + type: 'uint8', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + internalType: 'uint256', + name: 'subtractedValue', + type: 'uint256', + }, + ], + name: 'decreaseAllowance', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'delegatee', + type: 'address', + }, + ], + name: 'delegate', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'delegatee', + type: 'address', + }, + { + internalType: + 'enum IGovernancePowerDelegationToken.GovernancePowerType', + name: 'delegationType', + type: 'uint8', + }, + ], + name: 'delegateByType', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'eip712Domain', + outputs: [ + { + internalType: 'bytes1', + name: 'fields', + type: 'bytes1', + }, + { + internalType: 'string', + name: 'name', + type: 'string', + }, + { + internalType: 'string', + name: 'version', + type: 'string', + }, + { + internalType: 'uint256', + name: 'chainId', + type: 'uint256', + }, + { + internalType: 'address', + name: 'verifyingContract', + type: 'address', + }, + { + internalType: 'bytes32', + name: 'salt', + type: 'bytes32', + }, + { + internalType: 'uint256[]', + name: 'extensions', + type: 'uint256[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'delegator', + type: 'address', + }, + { + internalType: + 'enum IGovernancePowerDelegationToken.GovernancePowerType', + name: 'delegationType', + type: 'uint8', + }, + ], + name: 'getDelegateeByType', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'delegator', + type: 'address', + }, + ], + name: 'getDelegates', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'user', + type: 'address', + }, + { + internalType: + 'enum IGovernancePowerDelegationToken.GovernancePowerType', + name: 'delegationType', + type: 'uint8', + }, + ], + name: 'getPowerCurrent', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'user', + type: 'address', + }, + ], + name: 'getPowersCurrent', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + internalType: 'uint256', + name: 'addedValue', + type: 'uint256', + }, + ], + name: 'increaseAllowance', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'initialize', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'delegator', + type: 'address', + }, + { + internalType: 'address', + name: 'delegatee', + type: 'address', + }, + { + internalType: 'uint256', + name: 'deadline', + type: 'uint256', + }, + { + internalType: 'uint8', + name: 'v', + type: 'uint8', + }, + { + internalType: 'bytes32', + name: 'r', + type: 'bytes32', + }, + { + internalType: 'bytes32', + name: 's', + type: 'bytes32', + }, + ], + name: 'metaDelegate', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'delegator', + type: 'address', + }, + { + internalType: 'address', + name: 'delegatee', + type: 'address', + }, + { + internalType: + 'enum IGovernancePowerDelegationToken.GovernancePowerType', + name: 'delegationType', + type: 'uint8', + }, + { + internalType: 'uint256', + name: 'deadline', + type: 'uint256', + }, + { + internalType: 'uint8', + name: 'v', + type: 'uint8', + }, + { + internalType: 'bytes32', + name: 'r', + type: 'bytes32', + }, + { + internalType: 'bytes32', + name: 's', + type: 'bytes32', + }, + ], + name: 'metaDelegateByType', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'name', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'deadline', + type: 'uint256', + }, + { + internalType: 'uint8', + name: 'v', + type: 'uint8', + }, + { + internalType: 'bytes32', + name: 'r', + type: 'bytes32', + }, + { + internalType: 'bytes32', + name: 's', + type: 'bytes32', + }, + ], + name: 'permit', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'symbol', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'totalSupply', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'transfer', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'transferFrom', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, +] as const; + +const _bytecode = + '0x61016060405260006006553480156200001757600080fd5b506040518060400160405280600d81526020016c4161766520746f6b656e20563360981b815250604051806040016040528060018152602001601960f91b81525062000069826200011560201b60201c565b61012052620000788162000115565b61014052815160208084019190912060e052815190820120610100524660a0526200010660e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60805250503060c052620001d9565b600080829050601f815111156200014c578260405163305a27a960e01b815260040162000143919062000161565b60405180910390fd5b80516200015982620001b1565b179392505050565b600060208083528351808285015260005b81811015620001905785810183015185820160400152820162000172565b506000604082860101526040601f19601f8301168501019250505092915050565b80516020808301519190811015620001d3576000198160200360031b1b821691505b50919050565b60805160a05160c05160e0516101005161012051610140516121cf62000234600039600061149101526000611466015260006112b40152600061128c015260006111e7015260006112110152600061123b01526121cf6000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80636f50458d11610104578063a9059cbb116100a2578063d505accf11610071578063d505accf1461043d578063dc937e1c14610450578063dd62ed3e14610463578063dde43cba1461049c57600080fd5b8063a9059cbb146103d0578063aa9fbe02146103e3578063b2f4201d1461040a578063b9844d8d1461041d57600080fd5b806384b0196e116100de57806384b0196e1461038757806395d89b41146103a2578063a095ac19146103aa578063a457c2d7146103bd57600080fd5b80636f50458d1461034157806370a082311461036c5780638129fc1c1461037f57600080fd5b8063313ce5671161017157806341cbf54a1161014b57806341cbf54a146102e6578063570a97141461030d5780635c19a95c14610319578063657f0cde1461032e57600080fd5b8063313ce567146102bc5780633644e515146102cb57806339509351146102d357600080fd5b806318160ddd116101ad57806318160ddd1461024857806323b872dd1461025a5780632a8b36681461026d57806330adf81f1461029557600080fd5b806306fdde03146101d4578063095ea7b3146101f2578063169db77d14610215575b600080fd5b6101dc6104a4565b6040516101e99190611c86565b60405180910390f35b610205610200366004611cb5565b610536565b60405190151581526020016101e9565b610228610223366004611cdf565b610550565b604080516001600160a01b039384168152929091166020830152016101e9565b6002545b6040519081526020016101e9565b610205610268366004611cfa565b610582565b61028061027b366004611cdf565b6105a8565b604080519283526020830191909152016101e9565b61024c7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b604051601281526020016101e9565b61024c6105ca565b6102056102e1366004611cb5565b6105d9565b61024c7fd46e8b93b5190df6403875402a5c13897b72d2a576da5d1bfea20a63638d216e81565b61024c6402540be40081565b61032c610327366004611cdf565b610618565b005b61032c61033c366004611d56565b610633565b61035461034f366004611dc7565b610778565b6040516001600160a01b0390911681526020016101e9565b61024c61037a366004611cdf565b61078d565b61032c6107b1565b61038f610821565b6040516101e99796959493929190611dfa565b6101dc610867565b61032c6103b8366004611e90565b610876565b6102056103cb366004611cb5565b6109a8565b6102056103de366004611cb5565b610a45565b61024c7f6e77642f8f60cdece0498bfeeb2f06ccfef0e8f86d28a1b6255c5e48f1d72a0381565b61024c610418366004611dc7565b610a53565b61024c61042b366004611cdf565b60396020526000908152604090205481565b61032c61044b366004611eef565b610ad5565b61032c61045e366004611dc7565b610c1c565b61024c610471366004611f3d565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61024c600481565b6060600380546104b390611f67565b80601f01602080910402602001604051908101604052809291908181526020018280546104df90611f67565b801561052c5780601f106105015761010080835404028352916020019161052c565b820191906000526020600020905b81548152906001019060200180831161050f57829003601f168201915b5050505050905090565b600033610544818585610c2b565b60019150505b92915050565b600080600061055e84610d50565b905061056c84826000610e53565b61057885836001610e53565b9250925050915091565b600033610590858285610f03565b61059b858585610f95565b60019150505b9392505050565b6000806105b6836000610a53565b6105c1846001610a53565b91509150915091565b60006105d46111da565b905090565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091906105449082908690610613908790611fb7565b610c2b565b61062433826000611305565b61063033826001611305565b50565b6001600160a01b0387166106625760405162461bcd60e51b815260040161065990611fca565b60405180910390fd5b834211156106825760405162461bcd60e51b815260040161065990611ff1565b600061072561068f61142d565b7f6e77642f8f60cdece0498bfeeb2f06ccfef0e8f86d28a1b6255c5e48f1d72a038a8a8a6106da8e6001600160a01b0316600090815260396020526040902080546001810190915590565b8b6040516020016106f096959493929190612055565b6040516020818303038152906040528051906020012060405161190160f01b8152600281019290925260228201526042902090565b905061073381858585611437565b6001600160a01b0316886001600160a01b0316146107635760405162461bcd60e51b815260040161065990612094565b61076e888888611305565b5050505050505050565b60006105a18361078785610d50565b84610e53565b6001600160a01b03166000908152602081905260409020546001600160681b031690565b600654600490811161081c5760405162461bcd60e51b815260206004820152602e60248201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560448201526d195b881a5b9a5d1a585b1a5e995960921b6064820152608401610659565b600655565b60006060806000806000606061083561145f565b61083d61148a565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6060600480546104b390611f67565b6001600160a01b03861661089c5760405162461bcd60e51b815260040161065990611fca565b834211156108bc5760405162461bcd60e51b815260040161065990611ff1565b60006109496108c961142d565b7fd46e8b93b5190df6403875402a5c13897b72d2a576da5d1bfea20a63638d216e89896109138c6001600160a01b0316600090815260396020526040902080546001810190915590565b6040805160208101959095526001600160a01b039384169085015291166060830152608082015260a0810188905260c0016106f0565b905061095781858585611437565b6001600160a01b0316876001600160a01b0316146109875760405162461bcd60e51b815260040161065990612094565b61099387876000611305565b61099f87876001611305565b50505050505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919083811015610a2d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610659565b610a3a8286868403610c2b565b506001949350505050565b600033610544818585610f95565b600080610a5f84610d50565b90506000836001811115610a7557610a7561201d565b610a809060016120bf565b82604001516003811115610a9657610a9661201d565b1660ff16600014610aa8576000610ab1565b610ab18561078d565b90506000610abf83866114b5565b9050610acb8183611fb7565b9695505050505050565b6001600160a01b038716610afb5760405162461bcd60e51b815260040161065990611fca565b83421115610b1b5760405162461bcd60e51b815260040161065990611ff1565b6001600160a01b0387811660008181526039602090815260408083205481517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9938101939093529082019390935292891660608401526080830188905260a0830182905260c083018790529091610baa9060e001604051602081830303815290604052805190602001206114f4565b9050610bb881868686611437565b6001600160a01b0316896001600160a01b031614610be85760405162461bcd60e51b815260040161065990612094565b6001600160a01b0389166000908152603960205260409020600183019055610c11898989610c2b565b505050505050505050565b610c27338383611305565b5050565b6001600160a01b038316610c8d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610659565b6001600160a01b038216610cee5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610659565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b610d7160408051606081018252600080825260208201819052909182015290565b6001600160a01b038216600090815260208181526040808320815160808101835281546001600160681b03811682526001600160481b03600160681b8204811695830195909552600160b01b8104909416928101929092529091606083019060ff600160f81b909104166003811115610dec57610dec61201d565b6003811115610dfd57610dfd61201d565b815250509050604051806060016040528082602001516001600160481b0316815260200182604001516001600160481b0316815260200182606001516003811115610e4a57610e4a61201d565b90529392505050565b600080826001811115610e6857610e6861201d565b03610eba57600183604001516003811115610e8557610e8561201d565b1660ff16600003610e97576000610eb3565b6001600160a01b03808516600090815260426020526040902054165b90506105a1565b600283604001516003811115610ed257610ed261201d565b1015610edf576000610efb565b6001600160a01b03808516600090815260436020526040902054165b949350505050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114610f8f5781811015610f825760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610659565b610f8f8484848403610c2b565b50505050565b6001600160a01b038316610ff95760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610659565b6001600160a01b03821661105b5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610659565b816001600160a01b0316836001600160a01b031614611195576001600160a01b038084166000908152602081905260408082205492851682529020546001600160681b039182169116828210156111035760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610659565b6001600160a01b038516600090815260208190526040902080546cffffffffffffffffffffffffff19168484036001600160681b031617905561114683826120d8565b6001600160a01b038516600090815260208190526040902080546cffffffffffffffffffffffffff19166001600160681b03928316179055611192908690869085811690851687611521565b50505b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d4391815260200190565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561123357507f000000000000000000000000000000000000000000000000000000000000000046145b1561125d57507f000000000000000000000000000000000000000000000000000000000000000090565b6105d4604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b6000836001600160a01b0316836001600160a01b0316146113265782611329565b60005b9050600061133685610d50565b90506000611345868386610e53565b9050806001600160a01b0316836001600160a01b03160361136857505050505050565b6001600160a01b038181161515908416151560006113858961078d565b9050821561139a5761139a816000868a611535565b81156113ad576113ad600082888a611535565b6113b88988886115ff565b821515821515146113d7576113d7896113d2878a866116a2565b6117c2565b856001600160a01b0316896001600160a01b03167fe8d51c8e11bd570db1734c8ec775785330e77007feed45c43b608ef33ff914bd8960405161141a91906120ff565b60405180910390a3505050505050505050565b60006105d46105ca565b600080600061144887878787611862565b9150915061145581611926565b5095945050505050565b60606105d47f0000000000000000000000000000000000000000000000000000000000000000611a70565b60606105d47f0000000000000000000000000000000000000000000000000000000000000000611a70565b6000808260018111156114ca576114ca61201d565b146114d65782516114dc565b82602001515b6105a1906001600160481b03166402540be40061210d565b600061054a6115016111da565b8360405161190160f01b8152600281019290925260228201526042902090565b61152e8585858585611aaf565b5050505050565b6001600160a01b03821615610f8f57838314610f8f57600061156461155f6402540be40087612124565b611bac565b9050600061157a61155f6402540be40087612124565b9050600061158785610d50565b9050600084600181111561159d5761159d61201d565b036115d057818382602001516115b39190612146565b6115bd9190612166565b6001600160481b031660208201526115f5565b805182906115df908590612146565b6115e99190612166565b6001600160481b031681525b61099f85826117c2565b6000836001600160a01b0316826001600160a01b0316146116205781611623565b60005b905060008360018111156116395761163961201d565b03611671576001600160a01b03848116600090815260426020526040902080546001600160a01b031916918316919091179055610f8f565b6001600160a01b03938416600090815260436020526040902080546001600160a01b03191691909416179092555050565b6116c360408051606081018252600080825260208201819052909182015290565b8115611742578260018111156116db576116db61201d565b6116e69060016120bf565b846040015160038111156116fc576116fc61201d565b1760ff1660038111156117115761171161201d565b846040019060038111156117275761172761201d565b9081600381111561173a5761173a61201d565b9052506117ba565b60038360018111156117565761175661201d565b6117619060016120bf565b18846040015160038111156117785761177861201d565b1660ff16600381111561178d5761178d61201d565b846040019060038111156117a3576117a361201d565b908160038111156117b6576117b661201d565b9052505b509192915050565b6001600160a01b03821660009081526020818152604091829020835181549285015171ffffffffffffffffffffffffffffffffffff60681b19909316600160681b6001600160481b039283160268ffffffffffffffffff60b01b191617600160b01b91909316029190911780825591830151909182906001600160f81b0316600160f81b8360038111156118585761185861201d565b0217905550505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611899575060009050600361191d565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156118ed573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166119165760006001925092505061191d565b9150600090505b94509492505050565b600081600481111561193a5761193a61201d565b036119425750565b60018160048111156119565761195661201d565b036119a35760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610659565b60028160048111156119b7576119b761201d565b03611a045760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610659565b6003816004811115611a1857611a1861201d565b036106305760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610659565b60606000611a7d83611c18565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b836001600160a01b0316856001600160a01b0316031561152e576001600160a01b03851615611b43576000611ae386610d50565b90506000611af18386612186565b9050600082604001516003811115611b0b57611b0b61201d565b14611b4057611b288582611b218a866000610e53565b6000611535565b611b408582611b398a866001610e53565b6001611535565b50505b6001600160a01b0384161561152e576000611b5d85610d50565b90506000611b6b8385611fb7565b9050600082604001516003811115611b8557611b8561201d565b1461099f57611b9b8482611b2189866000610e53565b61099f8482611b3989866001610e53565b60006001600160481b03821115611c145760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203760448201526532206269747360d01b6064820152608401610659565b5090565b600060ff8216601f81111561054a57604051632cd44ac360e21b815260040160405180910390fd5b6000815180845260005b81811015611c6657602081850181015186830182015201611c4a565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006105a16020830184611c40565b80356001600160a01b0381168114611cb057600080fd5b919050565b60008060408385031215611cc857600080fd5b611cd183611c99565b946020939093013593505050565b600060208284031215611cf157600080fd5b6105a182611c99565b600080600060608486031215611d0f57600080fd5b611d1884611c99565b9250611d2660208501611c99565b9150604084013590509250925092565b803560028110611cb057600080fd5b803560ff81168114611cb057600080fd5b600080600080600080600060e0888a031215611d7157600080fd5b611d7a88611c99565b9650611d8860208901611c99565b9550611d9660408901611d36565b945060608801359350611dab60808901611d45565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215611dda57600080fd5b611de383611c99565b9150611df160208401611d36565b90509250929050565b60ff60f81b881681526000602060e081840152611e1a60e084018a611c40565b8381036040850152611e2c818a611c40565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015611e7e57835183529284019291840191600101611e62565b50909c9b505050505050505050505050565b60008060008060008060c08789031215611ea957600080fd5b611eb287611c99565b9550611ec060208801611c99565b945060408701359350611ed560608801611d45565b92506080870135915060a087013590509295509295509295565b600080600080600080600060e0888a031215611f0a57600080fd5b611f1388611c99565b9650611f2160208901611c99565b95506040880135945060608801359350611dab60808901611d45565b60008060408385031215611f5057600080fd5b611f5983611c99565b9150611df160208401611c99565b600181811c90821680611f7b57607f821691505b602082108103611f9b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561054a5761054a611fa1565b6020808252600d908201526c24a72b20a624a22fa7aba722a960991b604082015260600190565b60208082526012908201527124a72b20a624a22fa2ac2824a920aa24a7a760711b604082015260600190565b634e487b7160e01b600052602160045260246000fd5b6002811061205157634e487b7160e01b600052602160045260246000fd5b9052565b8681526001600160a01b0386811660208301528516604082015260c081016120806060830186612033565b608082019390935260a00152949350505050565b602080825260119082015270494e56414c49445f5349474e415455524560781b604082015260600190565b60ff818116838216019081111561054a5761054a611fa1565b6001600160681b038181168382160190808211156120f8576120f8611fa1565b5092915050565b6020810161054a8284612033565b808202811582820484141761054a5761054a611fa1565b60008261214157634e487b7160e01b600052601260045260246000fd5b500490565b6001600160481b038281168282160390808211156120f8576120f8611fa1565b6001600160481b038181168382160190808211156120f8576120f8611fa1565b8181038181111561054a5761054a611fa156fea2646970667358221220031d3febae0d90117808e443ab3b4b6923733bd26a4184ff7cedb41ae7c1a14564736f6c63430008140033'; + +type AaveTokenV3ConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: AaveTokenV3ConstructorParams, +): xs is ConstructorParameters => xs.length > 1; + +export class AaveTokenV3__factory extends ContractFactory { + constructor(...args: AaveTokenV3ConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + overrides?: Overrides & { from?: string }, + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + override getDeployTransaction( + overrides?: Overrides & { from?: string }, + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + override attach(address: string): AaveTokenV3 { + return super.attach(address) as AaveTokenV3; + } + override connect(signer: Signer): AaveTokenV3__factory { + return super.connect(signer) as AaveTokenV3__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): AaveTokenV3Interface { + return new utils.Interface(_abi) as AaveTokenV3Interface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider, + ): AaveTokenV3 { + return new Contract(address, _abi, signerOrProvider) as AaveTokenV3; + } +} diff --git a/packages/contract-helpers/src/governance-v3/typechain/factories/GovernanceCore__factory.ts b/packages/contract-helpers/src/governance-v3/typechain/factories/GovernanceCore__factory.ts new file mode 100644 index 00000000..032bc4de --- /dev/null +++ b/packages/contract-helpers/src/governance-v3/typechain/factories/GovernanceCore__factory.ts @@ -0,0 +1,1164 @@ +/* Autogenerated file. Do not edit manually. */ +/* eslint-disable */ + +import { Contract, Signer, utils } from 'ethers'; +import type { Provider } from '@ethersproject/providers'; +import type { + GovernanceCore, + GovernanceCoreInterface, +} from '../GovernanceCore'; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + { + indexed: true, + internalType: 'address', + name: 'to', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'cancellationFee', + type: 'uint256', + }, + { + indexed: true, + internalType: 'bool', + name: 'success', + type: 'bool', + }, + ], + name: 'CancellationFeeRedeemed', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'cancellationFee', + type: 'uint256', + }, + ], + name: 'CancellationFeeUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'oldGuardian', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'newGuardian', + type: 'address', + }, + ], + name: 'GuardianUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint8', + name: 'version', + type: 'uint8', + }, + ], + name: 'Initialized', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'previousOwner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'OwnershipTransferred', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint40', + name: 'payloadId', + type: 'uint40', + }, + { + indexed: true, + internalType: 'address', + name: 'payloadsController', + type: 'address', + }, + { + indexed: true, + internalType: 'uint256', + name: 'chainId', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'payloadNumberOnProposal', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'numberOfPayloadsOnProposal', + type: 'uint256', + }, + ], + name: 'PayloadSent', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'newPowerStrategy', + type: 'address', + }, + ], + name: 'PowerStrategyUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + ], + name: 'ProposalCanceled', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + { + indexed: true, + internalType: 'address', + name: 'creator', + type: 'address', + }, + { + indexed: true, + internalType: 'enum PayloadsControllerUtils.AccessControl', + name: 'accessLevel', + type: 'uint8', + }, + { + indexed: false, + internalType: 'bytes32', + name: 'ipfsHash', + type: 'bytes32', + }, + ], + name: 'ProposalCreated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + ], + name: 'ProposalExecuted', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint128', + name: 'votesFor', + type: 'uint128', + }, + { + indexed: false, + internalType: 'uint128', + name: 'votesAgainst', + type: 'uint128', + }, + ], + name: 'ProposalFailed', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint128', + name: 'votesFor', + type: 'uint128', + }, + { + indexed: false, + internalType: 'uint128', + name: 'votesAgainst', + type: 'uint128', + }, + ], + name: 'ProposalQueued', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'voter', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'representative', + type: 'address', + }, + { + indexed: true, + internalType: 'uint256', + name: 'chainId', + type: 'uint256', + }, + ], + name: 'RepresentativeUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + { + indexed: true, + internalType: 'address', + name: 'voter', + type: 'address', + }, + { + indexed: true, + internalType: 'bool', + name: 'support', + type: 'bool', + }, + { + components: [ + { + internalType: 'address', + name: 'underlyingAsset', + type: 'address', + }, + { + internalType: 'uint128', + name: 'slot', + type: 'uint128', + }, + ], + indexed: false, + internalType: 'struct IVotingMachineWithProofs.VotingAssetWithSlot[]', + name: 'votingAssetsWithSlot', + type: 'tuple[]', + }, + ], + name: 'VoteForwarded', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + { + indexed: true, + internalType: 'bytes32', + name: 'snapshotBlockHash', + type: 'bytes32', + }, + { + indexed: false, + internalType: 'uint24', + name: 'votingDuration', + type: 'uint24', + }, + ], + name: 'VotingActivated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'enum PayloadsControllerUtils.AccessControl', + name: 'accessLevel', + type: 'uint8', + }, + { + indexed: false, + internalType: 'uint24', + name: 'votingDuration', + type: 'uint24', + }, + { + indexed: false, + internalType: 'uint24', + name: 'coolDownBeforeVotingStart', + type: 'uint24', + }, + { + indexed: false, + internalType: 'uint256', + name: 'yesThreshold', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'yesNoDifferential', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'minPropositionPower', + type: 'uint256', + }, + ], + name: 'VotingConfigUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'votingPortal', + type: 'address', + }, + { + indexed: true, + internalType: 'bool', + name: 'approved', + type: 'bool', + }, + ], + name: 'VotingPortalUpdated', + type: 'event', + }, + { + inputs: [], + name: 'ACHIEVABLE_VOTING_PARTICIPATION', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'CANCELLATION_FEE_COLLECTOR', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'COOLDOWN_PERIOD', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'MIN_VOTING_DURATION', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'NAME', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'PRECISION_DIVIDER', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'PROPOSAL_EXPIRATION_TIME', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'VOTING_TOKENS_CAP', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + ], + name: 'activateVoting', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address[]', + name: 'votingPortals', + type: 'address[]', + }, + ], + name: 'addVotingPortals', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + ], + name: 'cancelProposal', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + components: [ + { + internalType: 'uint256', + name: 'chain', + type: 'uint256', + }, + { + internalType: 'enum PayloadsControllerUtils.AccessControl', + name: 'accessLevel', + type: 'uint8', + }, + { + internalType: 'address', + name: 'payloadsController', + type: 'address', + }, + { + internalType: 'uint40', + name: 'payloadId', + type: 'uint40', + }, + ], + internalType: 'struct PayloadsControllerUtils.Payload[]', + name: 'payloads', + type: 'tuple[]', + }, + { + internalType: 'address', + name: 'votingPortal', + type: 'address', + }, + { + internalType: 'bytes32', + name: 'ipfsHash', + type: 'bytes32', + }, + ], + name: 'createProposal', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + ], + name: 'executeProposal', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'getCancellationFee', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'getPowerStrategy', + outputs: [ + { + internalType: 'contract IGovernancePowerStrategy', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + ], + name: 'getProposal', + outputs: [ + { + components: [ + { + internalType: 'enum IGovernanceCore.State', + name: 'state', + type: 'uint8', + }, + { + internalType: 'enum PayloadsControllerUtils.AccessControl', + name: 'accessLevel', + type: 'uint8', + }, + { + internalType: 'uint40', + name: 'creationTime', + type: 'uint40', + }, + { + internalType: 'uint24', + name: 'votingDuration', + type: 'uint24', + }, + { + internalType: 'uint40', + name: 'votingActivationTime', + type: 'uint40', + }, + { + internalType: 'uint40', + name: 'queuingTime', + type: 'uint40', + }, + { + internalType: 'uint40', + name: 'cancelTimestamp', + type: 'uint40', + }, + { + internalType: 'address', + name: 'creator', + type: 'address', + }, + { + internalType: 'address', + name: 'votingPortal', + type: 'address', + }, + { + internalType: 'bytes32', + name: 'snapshotBlockHash', + type: 'bytes32', + }, + { + internalType: 'bytes32', + name: 'ipfsHash', + type: 'bytes32', + }, + { + internalType: 'uint128', + name: 'forVotes', + type: 'uint128', + }, + { + internalType: 'uint128', + name: 'againstVotes', + type: 'uint128', + }, + { + internalType: 'uint256', + name: 'cancellationFee', + type: 'uint256', + }, + { + components: [ + { + internalType: 'uint256', + name: 'chain', + type: 'uint256', + }, + { + internalType: 'enum PayloadsControllerUtils.AccessControl', + name: 'accessLevel', + type: 'uint8', + }, + { + internalType: 'address', + name: 'payloadsController', + type: 'address', + }, + { + internalType: 'uint40', + name: 'payloadId', + type: 'uint40', + }, + ], + internalType: 'struct PayloadsControllerUtils.Payload[]', + name: 'payloads', + type: 'tuple[]', + }, + ], + internalType: 'struct IGovernanceCore.Proposal', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + ], + name: 'getProposalState', + outputs: [ + { + internalType: 'enum IGovernanceCore.State', + name: '', + type: 'uint8', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'getProposalsCount', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'voter', + type: 'address', + }, + { + internalType: 'uint256', + name: 'chainId', + type: 'uint256', + }, + ], + name: 'getRepresentativeByChain', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'representative', + type: 'address', + }, + { + internalType: 'uint256', + name: 'chainId', + type: 'uint256', + }, + ], + name: 'getRepresentedVotersByChain', + outputs: [ + { + internalType: 'address[]', + name: '', + type: 'address[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'enum PayloadsControllerUtils.AccessControl', + name: 'accessLevel', + type: 'uint8', + }, + ], + name: 'getVotingConfig', + outputs: [ + { + components: [ + { + internalType: 'uint24', + name: 'coolDownBeforeVotingStart', + type: 'uint24', + }, + { + internalType: 'uint24', + name: 'votingDuration', + type: 'uint24', + }, + { + internalType: 'uint56', + name: 'yesThreshold', + type: 'uint56', + }, + { + internalType: 'uint56', + name: 'yesNoDifferential', + type: 'uint56', + }, + { + internalType: 'uint56', + name: 'minPropositionPower', + type: 'uint56', + }, + ], + internalType: 'struct IGovernanceCore.VotingConfig', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'getVotingPortalsCount', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'guardian', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'votingPortal', + type: 'address', + }, + ], + name: 'isVotingPortalApproved', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'owner', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + { + internalType: 'uint128', + name: 'forVotes', + type: 'uint128', + }, + { + internalType: 'uint128', + name: 'againstVotes', + type: 'uint128', + }, + ], + name: 'queueProposal', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256[]', + name: 'proposalIds', + type: 'uint256[]', + }, + ], + name: 'redeemCancellationFee', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address[]', + name: 'votingPortals', + type: 'address[]', + }, + ], + name: 'removeVotingPortals', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'renounceOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'votingPortal', + type: 'address', + }, + ], + name: 'rescueVotingPortal', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'contract IGovernancePowerStrategy', + name: 'powerStrategy', + type: 'address', + }, + ], + name: 'setPowerStrategy', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + components: [ + { + internalType: 'enum PayloadsControllerUtils.AccessControl', + name: 'accessLevel', + type: 'uint8', + }, + { + internalType: 'uint24', + name: 'coolDownBeforeVotingStart', + type: 'uint24', + }, + { + internalType: 'uint24', + name: 'votingDuration', + type: 'uint24', + }, + { + internalType: 'uint256', + name: 'yesThreshold', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'yesNoDifferential', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'minPropositionPower', + type: 'uint256', + }, + ], + internalType: 'struct IGovernanceCore.SetVotingConfigInput[]', + name: 'votingConfigs', + type: 'tuple[]', + }, + ], + name: 'setVotingConfigs', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'transferOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'cancellationFee', + type: 'uint256', + }, + ], + name: 'updateCancellationFee', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newGuardian', + type: 'address', + }, + ], + name: 'updateGuardian', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + components: [ + { + internalType: 'address', + name: 'representative', + type: 'address', + }, + { + internalType: 'uint256', + name: 'chainId', + type: 'uint256', + }, + ], + internalType: 'struct IGovernanceCore.RepresentativeInput[]', + name: 'representatives', + type: 'tuple[]', + }, + ], + name: 'updateRepresentativesForChain', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, +] as const; + +export class GovernanceCore__factory { + static readonly abi = _abi; + static createInterface(): GovernanceCoreInterface { + return new utils.Interface(_abi) as GovernanceCoreInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider, + ): GovernanceCore { + return new Contract(address, _abi, signerOrProvider) as GovernanceCore; + } +} diff --git a/packages/contract-helpers/src/governance-v3/typechain/factories/GovernanceDataHelper__factory.ts b/packages/contract-helpers/src/governance-v3/typechain/factories/GovernanceDataHelper__factory.ts new file mode 100644 index 00000000..3f673091 --- /dev/null +++ b/packages/contract-helpers/src/governance-v3/typechain/factories/GovernanceDataHelper__factory.ts @@ -0,0 +1,327 @@ +/* Autogenerated file. Do not edit manually. */ +/* eslint-disable */ + +import { Contract, Signer, utils } from 'ethers'; +import type { Provider } from '@ethersproject/providers'; +import type { + GovernanceDataHelper, + GovernanceDataHelperInterface, +} from '../GovernanceDataHelper'; + +const _abi = [ + { + inputs: [ + { + internalType: 'contract IGovernanceCore', + name: 'govCore', + type: 'address', + }, + { + internalType: 'enum PayloadsControllerUtils.AccessControl[]', + name: 'accessLevels', + type: 'uint8[]', + }, + ], + name: 'getConstants', + outputs: [ + { + components: [ + { + components: [ + { + internalType: 'enum PayloadsControllerUtils.AccessControl', + name: 'accessLevel', + type: 'uint8', + }, + { + components: [ + { + internalType: 'uint24', + name: 'coolDownBeforeVotingStart', + type: 'uint24', + }, + { + internalType: 'uint24', + name: 'votingDuration', + type: 'uint24', + }, + { + internalType: 'uint56', + name: 'yesThreshold', + type: 'uint56', + }, + { + internalType: 'uint56', + name: 'yesNoDifferential', + type: 'uint56', + }, + { + internalType: 'uint56', + name: 'minPropositionPower', + type: 'uint56', + }, + ], + internalType: 'struct IGovernanceCore.VotingConfig', + name: 'config', + type: 'tuple', + }, + ], + internalType: 'struct IGovernanceDataHelper.VotingConfig[]', + name: 'votingConfigs', + type: 'tuple[]', + }, + { + internalType: 'uint256', + name: 'precisionDivider', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'cooldownPeriod', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'expirationTime', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'cancellationFee', + type: 'uint256', + }, + ], + internalType: 'struct IGovernanceDataHelper.Constants', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'contract IGovernanceCore', + name: 'govCore', + type: 'address', + }, + { + internalType: 'uint256', + name: 'from', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'to', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'pageSize', + type: 'uint256', + }, + ], + name: 'getProposalsData', + outputs: [ + { + components: [ + { + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'votingChainId', + type: 'uint256', + }, + { + components: [ + { + internalType: 'enum IGovernanceCore.State', + name: 'state', + type: 'uint8', + }, + { + internalType: 'enum PayloadsControllerUtils.AccessControl', + name: 'accessLevel', + type: 'uint8', + }, + { + internalType: 'uint40', + name: 'creationTime', + type: 'uint40', + }, + { + internalType: 'uint24', + name: 'votingDuration', + type: 'uint24', + }, + { + internalType: 'uint40', + name: 'votingActivationTime', + type: 'uint40', + }, + { + internalType: 'uint40', + name: 'queuingTime', + type: 'uint40', + }, + { + internalType: 'uint40', + name: 'cancelTimestamp', + type: 'uint40', + }, + { + internalType: 'address', + name: 'creator', + type: 'address', + }, + { + internalType: 'address', + name: 'votingPortal', + type: 'address', + }, + { + internalType: 'bytes32', + name: 'snapshotBlockHash', + type: 'bytes32', + }, + { + internalType: 'bytes32', + name: 'ipfsHash', + type: 'bytes32', + }, + { + internalType: 'uint128', + name: 'forVotes', + type: 'uint128', + }, + { + internalType: 'uint128', + name: 'againstVotes', + type: 'uint128', + }, + { + internalType: 'uint256', + name: 'cancellationFee', + type: 'uint256', + }, + { + components: [ + { + internalType: 'uint256', + name: 'chain', + type: 'uint256', + }, + { + internalType: 'enum PayloadsControllerUtils.AccessControl', + name: 'accessLevel', + type: 'uint8', + }, + { + internalType: 'address', + name: 'payloadsController', + type: 'address', + }, + { + internalType: 'uint40', + name: 'payloadId', + type: 'uint40', + }, + ], + internalType: 'struct PayloadsControllerUtils.Payload[]', + name: 'payloads', + type: 'tuple[]', + }, + ], + internalType: 'struct IGovernanceCore.Proposal', + name: 'proposalData', + type: 'tuple', + }, + ], + internalType: 'struct IGovernanceDataHelper.Proposal[]', + name: '', + type: 'tuple[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'contract IGovernanceCore', + name: 'govCore', + type: 'address', + }, + { + internalType: 'address', + name: 'wallet', + type: 'address', + }, + { + internalType: 'uint256[]', + name: 'chainIds', + type: 'uint256[]', + }, + ], + name: 'getRepresentationData', + outputs: [ + { + components: [ + { + internalType: 'uint256', + name: 'chainId', + type: 'uint256', + }, + { + internalType: 'address', + name: 'representative', + type: 'address', + }, + ], + internalType: 'struct IGovernanceDataHelper.Representatives[]', + name: '', + type: 'tuple[]', + }, + { + components: [ + { + internalType: 'uint256', + name: 'chainId', + type: 'uint256', + }, + { + internalType: 'address[]', + name: 'votersRepresented', + type: 'address[]', + }, + ], + internalType: 'struct IGovernanceDataHelper.Represented[]', + name: '', + type: 'tuple[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, +] as const; + +export class GovernanceDataHelper__factory { + static readonly abi = _abi; + static createInterface(): GovernanceDataHelperInterface { + return new utils.Interface(_abi) as GovernanceDataHelperInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider, + ): GovernanceDataHelper { + return new Contract( + address, + _abi, + signerOrProvider, + ) as GovernanceDataHelper; + } +} diff --git a/packages/contract-helpers/src/governance-v3/typechain/factories/MetaDelegateHelper__factory.ts b/packages/contract-helpers/src/governance-v3/typechain/factories/MetaDelegateHelper__factory.ts new file mode 100644 index 00000000..244e662c --- /dev/null +++ b/packages/contract-helpers/src/governance-v3/typechain/factories/MetaDelegateHelper__factory.ts @@ -0,0 +1,116 @@ +/* Autogenerated file. Do not edit manually. */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from 'ethers'; +import type { Provider, TransactionRequest } from '@ethersproject/providers'; +import type { + MetaDelegateHelper, + MetaDelegateHelperInterface, +} from '../MetaDelegateHelper'; + +const _abi = [ + { + inputs: [ + { + components: [ + { + internalType: 'contract IGovernancePowerDelegationToken', + name: 'underlyingAsset', + type: 'address', + }, + { + internalType: 'enum IMetaDelegateHelper.DelegationType', + name: 'delegationType', + type: 'uint8', + }, + { + internalType: 'address', + name: 'delegator', + type: 'address', + }, + { + internalType: 'address', + name: 'delegatee', + type: 'address', + }, + { + internalType: 'uint256', + name: 'deadline', + type: 'uint256', + }, + { + internalType: 'uint8', + name: 'v', + type: 'uint8', + }, + { + internalType: 'bytes32', + name: 'r', + type: 'bytes32', + }, + { + internalType: 'bytes32', + name: 's', + type: 'bytes32', + }, + ], + internalType: 'struct IMetaDelegateHelper.MetaDelegateParams[]', + name: 'delegateParams', + type: 'tuple[]', + }, + ], + name: 'batchMetaDelegate', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, +] as const; + +const _bytecode = + '0x608060405234801561001057600080fd5b50610662806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063dfec976814610030575b600080fd5b61004361003e366004610434565b610045565b005b6000805b828110156103ed576002848483818110610065576100656104bf565b90506101000201602001602081019061007e91906104d5565b600281111561008f5761008f6104a9565b03610228578383828181106100a6576100a66104bf565b6100bd926020610100909202019081019150610515565b6001600160a01b031663a095ac198585848181106100dd576100dd6104bf565b9050610100020160400160208101906100f69190610515565b868685818110610108576101086104bf565b9050610100020160600160208101906101219190610515565b878786818110610133576101336104bf565b9050610100020160800135888887818110610150576101506104bf565b9050610100020160a00160208101906101699190610532565b89898881811061017b5761017b6104bf565b9050610100020160c001358a8a89818110610198576101986104bf565b60405160e08a811b6001600160e01b03191682526001600160a01b03998a16600483015297909816602489015260448801959095525060ff929092166064860152608485015261010090910201013560a482015260c401600060405180830381600087803b15801561020957600080fd5b505af192505050801561021a575060015b156103db57600191506103db565b83838281811061023a5761023a6104bf565b610251926020610100909202019081019150610515565b6001600160a01b031663657f0cde858584818110610271576102716104bf565b90506101000201604001602081019061028a9190610515565b86868581811061029c5761029c6104bf565b9050610100020160600160208101906102b59190610515565b60008888878181106102c9576102c96104bf565b9050610100020160200160208101906102e291906104d5565b60028111156102f3576102f36104a9565b146102ff576001610302565b60005b888887818110610314576103146104bf565b9050610100020160800135898988818110610331576103316104bf565b9050610100020160a001602081019061034a9190610532565b8a8a8981811061035c5761035c6104bf565b9050610100020160c001358b8b8a818110610379576103796104bf565b9050610100020160e001356040518863ffffffff1660e01b81526004016103a69796959493929190610555565b600060405180830381600087803b1580156103c057600080fd5b505af19250505080156103d1575060015b156103db57600191505b806103e5816105b7565b915050610049565b50604080518082019091526002815261072760f31b60208201528161042e5760405162461bcd60e51b815260040161042591906105de565b60405180910390fd5b50505050565b6000806020838503121561044757600080fd5b823567ffffffffffffffff8082111561045f57600080fd5b818501915085601f83011261047357600080fd5b81358181111561048257600080fd5b8660208260081b850101111561049757600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000602082840312156104e757600080fd5b8135600381106104f657600080fd5b9392505050565b6001600160a01b038116811461051257600080fd5b50565b60006020828403121561052757600080fd5b81356104f6816104fd565b60006020828403121561054457600080fd5b813560ff811681146104f657600080fd5b6001600160a01b0388811682528716602082015260e081016002871061058b57634e487b7160e01b600052602160045260246000fd5b6040820196909652606081019490945260ff92909216608084015260a083015260c09091015292915050565b6000600182016105d757634e487b7160e01b600052601160045260246000fd5b5060010190565b600060208083528351808285015260005b8181101561060b578581018301518582016040015282016105ef565b506000604082860101526040601f19601f830116850101925050509291505056fea26469706673582212203dced7f46a3999c58a7e8dd9fb69bbfb2191166296934c957b5c98f1adb8b70c64736f6c63430008130033'; + +type MetaDelegateHelperConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: MetaDelegateHelperConstructorParams, +): xs is ConstructorParameters => xs.length > 1; + +export class MetaDelegateHelper__factory extends ContractFactory { + constructor(...args: MetaDelegateHelperConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + overrides?: Overrides & { from?: string }, + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + override getDeployTransaction( + overrides?: Overrides & { from?: string }, + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + override attach(address: string): MetaDelegateHelper { + return super.attach(address) as MetaDelegateHelper; + } + override connect(signer: Signer): MetaDelegateHelper__factory { + return super.connect(signer) as MetaDelegateHelper__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): MetaDelegateHelperInterface { + return new utils.Interface(_abi) as MetaDelegateHelperInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider, + ): MetaDelegateHelper { + return new Contract(address, _abi, signerOrProvider) as MetaDelegateHelper; + } +} diff --git a/packages/contract-helpers/src/governance-v3/typechain/factories/PayloadsControllerDataHelper__factory.ts b/packages/contract-helpers/src/governance-v3/typechain/factories/PayloadsControllerDataHelper__factory.ts new file mode 100644 index 00000000..de700c18 --- /dev/null +++ b/packages/contract-helpers/src/governance-v3/typechain/factories/PayloadsControllerDataHelper__factory.ts @@ -0,0 +1,203 @@ +/* Autogenerated file. Do not edit manually. */ +/* eslint-disable */ + +import { Contract, Signer, utils } from 'ethers'; +import type { Provider } from '@ethersproject/providers'; +import type { + PayloadsControllerDataHelper, + PayloadsControllerDataHelperInterface, +} from '../PayloadsControllerDataHelper'; + +const _abi = [ + { + inputs: [ + { + internalType: 'contract IPayloadsController', + name: 'payloadsController', + type: 'address', + }, + { + internalType: 'enum PayloadsControllerUtils.AccessControl[]', + name: 'accessLevels', + type: 'uint8[]', + }, + ], + name: 'getExecutorConfigs', + outputs: [ + { + components: [ + { + internalType: 'enum PayloadsControllerUtils.AccessControl', + name: 'accessLevel', + type: 'uint8', + }, + { + components: [ + { + internalType: 'address', + name: 'executor', + type: 'address', + }, + { + internalType: 'uint40', + name: 'delay', + type: 'uint40', + }, + ], + internalType: 'struct IPayloadsControllerCore.ExecutorConfig', + name: 'config', + type: 'tuple', + }, + ], + internalType: 'struct IPayloadsControllerDataHelper.ExecutorConfig[]', + name: '', + type: 'tuple[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'contract IPayloadsController', + name: 'payloadsController', + type: 'address', + }, + { + internalType: 'uint40[]', + name: 'payloadsIds', + type: 'uint40[]', + }, + ], + name: 'getPayloadsData', + outputs: [ + { + components: [ + { + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + { + components: [ + { + internalType: 'address', + name: 'creator', + type: 'address', + }, + { + internalType: 'enum PayloadsControllerUtils.AccessControl', + name: 'maximumAccessLevelRequired', + type: 'uint8', + }, + { + internalType: 'enum IPayloadsControllerCore.PayloadState', + name: 'state', + type: 'uint8', + }, + { + internalType: 'uint40', + name: 'createdAt', + type: 'uint40', + }, + { + internalType: 'uint40', + name: 'queuedAt', + type: 'uint40', + }, + { + internalType: 'uint40', + name: 'executedAt', + type: 'uint40', + }, + { + internalType: 'uint40', + name: 'cancelledAt', + type: 'uint40', + }, + { + internalType: 'uint40', + name: 'expirationTime', + type: 'uint40', + }, + { + internalType: 'uint40', + name: 'delay', + type: 'uint40', + }, + { + internalType: 'uint40', + name: 'gracePeriod', + type: 'uint40', + }, + { + components: [ + { + internalType: 'address', + name: 'target', + type: 'address', + }, + { + internalType: 'bool', + name: 'withDelegateCall', + type: 'bool', + }, + { + internalType: 'enum PayloadsControllerUtils.AccessControl', + name: 'accessLevel', + type: 'uint8', + }, + { + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + { + internalType: 'string', + name: 'signature', + type: 'string', + }, + { + internalType: 'bytes', + name: 'callData', + type: 'bytes', + }, + ], + internalType: + 'struct IPayloadsControllerCore.ExecutionAction[]', + name: 'actions', + type: 'tuple[]', + }, + ], + internalType: 'struct IPayloadsControllerCore.Payload', + name: 'data', + type: 'tuple', + }, + ], + internalType: 'struct IPayloadsControllerDataHelper.Payload[]', + name: '', + type: 'tuple[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, +] as const; + +export class PayloadsControllerDataHelper__factory { + static readonly abi = _abi; + static createInterface(): PayloadsControllerDataHelperInterface { + return new utils.Interface(_abi) as PayloadsControllerDataHelperInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider, + ): PayloadsControllerDataHelper { + return new Contract( + address, + _abi, + signerOrProvider, + ) as PayloadsControllerDataHelper; + } +} diff --git a/packages/contract-helpers/src/governance-v3/typechain/factories/VotingMachineDataHelper__factory.ts b/packages/contract-helpers/src/governance-v3/typechain/factories/VotingMachineDataHelper__factory.ts new file mode 100644 index 00000000..4d36cd66 --- /dev/null +++ b/packages/contract-helpers/src/governance-v3/typechain/factories/VotingMachineDataHelper__factory.ts @@ -0,0 +1,185 @@ +/* Autogenerated file. Do not edit manually. */ +/* eslint-disable */ + +import { Contract, Signer, utils } from 'ethers'; +import type { Provider } from '@ethersproject/providers'; +import type { + VotingMachineDataHelper, + VotingMachineDataHelperInterface, +} from '../VotingMachineDataHelper'; + +const _abi = [ + { + inputs: [ + { + internalType: 'contract IVotingMachineWithProofs', + name: 'votingMachine', + type: 'address', + }, + { + components: [ + { + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + { + internalType: 'bytes32', + name: 'snapshotBlockHash', + type: 'bytes32', + }, + ], + internalType: 'struct IVotingMachineDataHelper.InitialProposal[]', + name: 'initialProposals', + type: 'tuple[]', + }, + { + internalType: 'address', + name: 'user', + type: 'address', + }, + ], + name: 'getProposalsData', + outputs: [ + { + components: [ + { + components: [ + { + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + { + internalType: 'bool', + name: 'sentToGovernance', + type: 'bool', + }, + { + internalType: 'uint40', + name: 'startTime', + type: 'uint40', + }, + { + internalType: 'uint40', + name: 'endTime', + type: 'uint40', + }, + { + internalType: 'uint40', + name: 'votingClosedAndSentTimestamp', + type: 'uint40', + }, + { + internalType: 'uint128', + name: 'forVotes', + type: 'uint128', + }, + { + internalType: 'uint128', + name: 'againstVotes', + type: 'uint128', + }, + { + internalType: 'uint256', + name: 'creationBlockNumber', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'votingClosedAndSentBlockNumber', + type: 'uint256', + }, + ], + internalType: + 'struct IVotingMachineWithProofs.ProposalWithoutVotes', + name: 'proposalData', + type: 'tuple', + }, + { + components: [ + { + internalType: 'bool', + name: 'support', + type: 'bool', + }, + { + internalType: 'uint248', + name: 'votingPower', + type: 'uint248', + }, + ], + internalType: 'struct IVotingMachineDataHelper.VotedInfo', + name: 'votedInfo', + type: 'tuple', + }, + { + internalType: 'contract IVotingStrategy', + name: 'strategy', + type: 'address', + }, + { + internalType: 'contract IDataWarehouse', + name: 'dataWarehouse', + type: 'address', + }, + { + internalType: 'address[]', + name: 'votingAssets', + type: 'address[]', + }, + { + internalType: 'bool', + name: 'hasRequiredRoots', + type: 'bool', + }, + { + components: [ + { + internalType: 'uint24', + name: 'votingDuration', + type: 'uint24', + }, + { + internalType: 'bytes32', + name: 'l1ProposalBlockHash', + type: 'bytes32', + }, + ], + internalType: + 'struct IVotingMachineWithProofs.ProposalVoteConfiguration', + name: 'voteConfig', + type: 'tuple', + }, + { + internalType: 'enum IVotingMachineWithProofs.ProposalState', + name: 'state', + type: 'uint8', + }, + ], + internalType: 'struct IVotingMachineDataHelper.Proposal[]', + name: '', + type: 'tuple[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, +] as const; + +export class VotingMachineDataHelper__factory { + static readonly abi = _abi; + static createInterface(): VotingMachineDataHelperInterface { + return new utils.Interface(_abi) as VotingMachineDataHelperInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider, + ): VotingMachineDataHelper { + return new Contract( + address, + _abi, + signerOrProvider, + ) as VotingMachineDataHelper; + } +} diff --git a/packages/contract-helpers/src/governance-v3/typechain/factories/VotingMachine__factory.ts b/packages/contract-helpers/src/governance-v3/typechain/factories/VotingMachine__factory.ts new file mode 100644 index 00000000..6abd3200 --- /dev/null +++ b/packages/contract-helpers/src/governance-v3/typechain/factories/VotingMachine__factory.ts @@ -0,0 +1,1160 @@ +/* Autogenerated file. Do not edit manually. */ +/* eslint-disable */ + +import { Contract, Signer, utils } from 'ethers'; +import type { Provider } from '@ethersproject/providers'; +import type { VotingMachine, VotingMachineInterface } from '../VotingMachine'; + +const _abi = [ + { + inputs: [ + { + internalType: 'address', + name: 'crossChainController', + type: 'address', + }, + { + internalType: 'uint256', + name: 'gasLimit', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'l1VotingPortalChainId', + type: 'uint256', + }, + { + internalType: 'contract IVotingStrategy', + name: 'votingStrategy', + type: 'address', + }, + { + internalType: 'address', + name: 'l1VotingPortal', + type: 'address', + }, + { + internalType: 'address', + name: 'governance', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'constructor', + }, + { + inputs: [], + name: 'ECDSAInvalidSignature', + type: 'error', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'length', + type: 'uint256', + }, + ], + name: 'ECDSAInvalidSignatureLength', + type: 'error', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 's', + type: 'bytes32', + }, + ], + name: 'ECDSAInvalidSignatureS', + type: 'error', + }, + { + inputs: [], + name: 'InvalidShortString', + type: 'error', + }, + { + inputs: [ + { + internalType: 'string', + name: 'str', + type: 'string', + }, + ], + name: 'StringTooLong', + type: 'error', + }, + { + anonymous: false, + inputs: [], + name: 'EIP712DomainChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint256', + name: 'gasLimit', + type: 'uint256', + }, + ], + name: 'GasLimitUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'originSender', + type: 'address', + }, + { + indexed: true, + internalType: 'uint256', + name: 'originChainId', + type: 'uint256', + }, + { + indexed: false, + internalType: 'bytes', + name: 'message', + type: 'bytes', + }, + { + indexed: false, + internalType: 'bytes', + name: 'reason', + type: 'bytes', + }, + ], + name: 'IncorrectTypeMessageReceived', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'originSender', + type: 'address', + }, + { + indexed: true, + internalType: 'uint256', + name: 'originChainId', + type: 'uint256', + }, + { + indexed: true, + internalType: 'bool', + name: 'delivered', + type: 'bool', + }, + { + indexed: false, + internalType: 'enum IVotingPortal.MessageType', + name: 'messageType', + type: 'uint8', + }, + { + indexed: false, + internalType: 'bytes', + name: 'message', + type: 'bytes', + }, + { + indexed: false, + internalType: 'bytes', + name: 'reason', + type: 'bytes', + }, + ], + name: 'MessageReceived', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'previousOwner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'OwnershipTransferred', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'forVotes', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'againstVotes', + type: 'uint256', + }, + ], + name: 'ProposalResultsSent', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + { + indexed: true, + internalType: 'bytes32', + name: 'blockHash', + type: 'bytes32', + }, + { + indexed: false, + internalType: 'uint24', + name: 'votingDuration', + type: 'uint24', + }, + { + indexed: true, + internalType: 'bool', + name: 'voteCreated', + type: 'bool', + }, + ], + name: 'ProposalVoteConfigurationBridged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + { + indexed: true, + internalType: 'bytes32', + name: 'l1BlockHash', + type: 'bytes32', + }, + { + indexed: false, + internalType: 'uint256', + name: 'startTime', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'endTime', + type: 'uint256', + }, + ], + name: 'ProposalVoteStarted', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + { + indexed: true, + internalType: 'address', + name: 'voter', + type: 'address', + }, + { + indexed: true, + internalType: 'bool', + name: 'support', + type: 'bool', + }, + { + indexed: false, + internalType: 'uint256', + name: 'votingPower', + type: 'uint256', + }, + ], + name: 'VoteEmitted', + type: 'event', + }, + { + inputs: [], + name: 'CROSS_CHAIN_CONTROLLER', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'DATA_WAREHOUSE', + outputs: [ + { + internalType: 'contract IDataWarehouse', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'DOMAIN_SEPARATOR', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'GOVERNANCE', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'L1_VOTING_PORTAL', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'L1_VOTING_PORTAL_CHAIN_ID', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'NAME', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'REPRESENTATIVES_SLOT', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'VOTE_SUBMITTED_BY_REPRESENTATIVE_TYPEHASH', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'VOTE_SUBMITTED_TYPEHASH', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'VOTING_ASSET_WITH_SLOT_RAW', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'VOTING_ASSET_WITH_SLOT_TYPEHASH', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'VOTING_STRATEGY', + outputs: [ + { + internalType: 'contract IVotingStrategy', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + ], + name: 'closeAndSendVote', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes', + name: 'message', + type: 'bytes', + }, + ], + name: 'decodeMessage', + outputs: [ + { + internalType: 'enum IVotingPortal.MessageType', + name: '', + type: 'uint8', + }, + { + internalType: 'bytes', + name: '', + type: 'bytes', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes', + name: 'message', + type: 'bytes', + }, + ], + name: 'decodeProposalMessage', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + { + internalType: 'uint24', + name: '', + type: 'uint24', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes', + name: 'message', + type: 'bytes', + }, + ], + name: 'decodeVoteMessage', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + { + internalType: 'address', + name: '', + type: 'address', + }, + { + internalType: 'bool', + name: '', + type: 'bool', + }, + { + components: [ + { + internalType: 'address', + name: 'underlyingAsset', + type: 'address', + }, + { + internalType: 'uint128', + name: 'slot', + type: 'uint128', + }, + ], + internalType: 'struct IVotingMachineWithProofs.VotingAssetWithSlot[]', + name: '', + type: 'tuple[]', + }, + ], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [], + name: 'eip712Domain', + outputs: [ + { + internalType: 'bytes1', + name: 'fields', + type: 'bytes1', + }, + { + internalType: 'string', + name: 'name', + type: 'string', + }, + { + internalType: 'string', + name: 'version', + type: 'string', + }, + { + internalType: 'uint256', + name: 'chainId', + type: 'uint256', + }, + { + internalType: 'address', + name: 'verifyingContract', + type: 'address', + }, + { + internalType: 'bytes32', + name: 'salt', + type: 'bytes32', + }, + { + internalType: 'uint256[]', + name: 'extensions', + type: 'uint256[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'getGasLimit', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + ], + name: 'getProposalById', + outputs: [ + { + components: [ + { + internalType: 'uint256', + name: 'id', + type: 'uint256', + }, + { + internalType: 'bool', + name: 'sentToGovernance', + type: 'bool', + }, + { + internalType: 'uint40', + name: 'startTime', + type: 'uint40', + }, + { + internalType: 'uint40', + name: 'endTime', + type: 'uint40', + }, + { + internalType: 'uint40', + name: 'votingClosedAndSentTimestamp', + type: 'uint40', + }, + { + internalType: 'uint128', + name: 'forVotes', + type: 'uint128', + }, + { + internalType: 'uint128', + name: 'againstVotes', + type: 'uint128', + }, + { + internalType: 'uint256', + name: 'creationBlockNumber', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'votingClosedAndSentBlockNumber', + type: 'uint256', + }, + ], + internalType: 'struct IVotingMachineWithProofs.ProposalWithoutVotes', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + ], + name: 'getProposalState', + outputs: [ + { + internalType: 'enum IVotingMachineWithProofs.ProposalState', + name: '', + type: 'uint8', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + ], + name: 'getProposalVoteConfiguration', + outputs: [ + { + components: [ + { + internalType: 'uint24', + name: 'votingDuration', + type: 'uint24', + }, + { + internalType: 'bytes32', + name: 'l1ProposalBlockHash', + type: 'bytes32', + }, + ], + internalType: + 'struct IVotingMachineWithProofs.ProposalVoteConfiguration', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'skip', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'size', + type: 'uint256', + }, + ], + name: 'getProposalsVoteConfigurationIds', + outputs: [ + { + internalType: 'uint256[]', + name: '', + type: 'uint256[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'user', + type: 'address', + }, + { + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + ], + name: 'getUserProposalVote', + outputs: [ + { + components: [ + { + internalType: 'bool', + name: 'support', + type: 'bool', + }, + { + internalType: 'uint248', + name: 'votingPower', + type: 'uint248', + }, + ], + internalType: 'struct IVotingMachineWithProofs.Vote', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'owner', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'originSender', + type: 'address', + }, + { + internalType: 'uint256', + name: 'originChainId', + type: 'uint256', + }, + { + internalType: 'bytes', + name: 'messageWithType', + type: 'bytes', + }, + ], + name: 'receiveCrossChainMessage', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'renounceOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + ], + name: 'startProposalVote', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + { + internalType: 'bool', + name: 'support', + type: 'bool', + }, + { + components: [ + { + internalType: 'address', + name: 'underlyingAsset', + type: 'address', + }, + { + internalType: 'uint128', + name: 'slot', + type: 'uint128', + }, + { + internalType: 'bytes', + name: 'proof', + type: 'bytes', + }, + ], + internalType: 'struct IVotingMachineWithProofs.VotingBalanceProof[]', + name: 'votingBalanceProofs', + type: 'tuple[]', + }, + ], + name: 'submitVote', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + { + internalType: 'bool', + name: 'support', + type: 'bool', + }, + { + internalType: 'address', + name: 'voter', + type: 'address', + }, + { + internalType: 'bytes', + name: 'proofOfRepresentation', + type: 'bytes', + }, + { + components: [ + { + internalType: 'address', + name: 'underlyingAsset', + type: 'address', + }, + { + internalType: 'uint128', + name: 'slot', + type: 'uint128', + }, + { + internalType: 'bytes', + name: 'proof', + type: 'bytes', + }, + ], + internalType: 'struct IVotingMachineWithProofs.VotingBalanceProof[]', + name: 'votingBalanceProofs', + type: 'tuple[]', + }, + ], + name: 'submitVoteAsRepresentative', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + { + internalType: 'address', + name: 'voter', + type: 'address', + }, + { + internalType: 'address', + name: 'representative', + type: 'address', + }, + { + internalType: 'bool', + name: 'support', + type: 'bool', + }, + { + internalType: 'bytes', + name: 'proofOfRepresentation', + type: 'bytes', + }, + { + components: [ + { + internalType: 'address', + name: 'underlyingAsset', + type: 'address', + }, + { + internalType: 'uint128', + name: 'slot', + type: 'uint128', + }, + { + internalType: 'bytes', + name: 'proof', + type: 'bytes', + }, + ], + internalType: 'struct IVotingMachineWithProofs.VotingBalanceProof[]', + name: 'votingBalanceProofs', + type: 'tuple[]', + }, + { + components: [ + { + internalType: 'uint8', + name: 'v', + type: 'uint8', + }, + { + internalType: 'bytes32', + name: 'r', + type: 'bytes32', + }, + { + internalType: 'bytes32', + name: 's', + type: 'bytes32', + }, + ], + internalType: 'struct IVotingMachineWithProofs.SignatureParams', + name: 'signatureParams', + type: 'tuple', + }, + ], + name: 'submitVoteAsRepresentativeBySignature', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', + }, + { + internalType: 'address', + name: 'voter', + type: 'address', + }, + { + internalType: 'bool', + name: 'support', + type: 'bool', + }, + { + components: [ + { + internalType: 'address', + name: 'underlyingAsset', + type: 'address', + }, + { + internalType: 'uint128', + name: 'slot', + type: 'uint128', + }, + { + internalType: 'bytes', + name: 'proof', + type: 'bytes', + }, + ], + internalType: 'struct IVotingMachineWithProofs.VotingBalanceProof[]', + name: 'votingBalanceProofs', + type: 'tuple[]', + }, + { + internalType: 'uint8', + name: 'v', + type: 'uint8', + }, + { + internalType: 'bytes32', + name: 'r', + type: 'bytes32', + }, + { + internalType: 'bytes32', + name: 's', + type: 'bytes32', + }, + ], + name: 'submitVoteBySignature', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'transferOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'gasLimit', + type: 'uint256', + }, + ], + name: 'updateGasLimit', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, +] as const; + +export class VotingMachine__factory { + static readonly abi = _abi; + static createInterface(): VotingMachineInterface { + return new utils.Interface(_abi) as VotingMachineInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider, + ): VotingMachine { + return new Contract(address, _abi, signerOrProvider) as VotingMachine; + } +} diff --git a/packages/contract-helpers/src/governance-v3/typechain/factories/index.ts b/packages/contract-helpers/src/governance-v3/typechain/factories/index.ts new file mode 100644 index 00000000..7ecdd505 --- /dev/null +++ b/packages/contract-helpers/src/governance-v3/typechain/factories/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ + +export { GovernanceDataHelper__factory } from './GovernanceDataHelper__factory'; +export { VotingMachine__factory } from './VotingMachine__factory'; +export { VotingMachineDataHelper__factory } from './VotingMachineDataHelper__factory'; diff --git a/packages/contract-helpers/src/governance-v3/typechain/index.ts b/packages/contract-helpers/src/governance-v3/typechain/index.ts new file mode 100644 index 00000000..9de1ac10 --- /dev/null +++ b/packages/contract-helpers/src/governance-v3/typechain/index.ts @@ -0,0 +1,8 @@ +/* Autogenerated file. Do not edit manually. */ + +export type { GovernanceDataHelper } from './GovernanceDataHelper'; +export type { VotingMachine } from './VotingMachine'; +export { GovernanceDataHelper__factory } from './factories/GovernanceDataHelper__factory'; +export { VotingMachine__factory } from './factories/VotingMachine__factory'; +export { VotingMachineDataHelper__factory } from './factories/VotingMachineDataHelper__factory'; +export { AaveTokenV3__factory } from './factories/AaveTokenV3__factory'; diff --git a/packages/contract-helpers/src/governance-v3/voting-machine-data-helper/index.ts b/packages/contract-helpers/src/governance-v3/voting-machine-data-helper/index.ts new file mode 100644 index 00000000..7caffa30 --- /dev/null +++ b/packages/contract-helpers/src/governance-v3/voting-machine-data-helper/index.ts @@ -0,0 +1,112 @@ +import { BytesLike, providers } from 'ethers'; +import { VotingMachineDataHelper } from '../typechain/VotingMachineDataHelper'; +import { VotingMachineDataHelper__factory } from '../typechain/index'; + +export type InitialProposals = { + id: number; + snapshotBlockHash: BytesLike; +}; + +export enum VotingMachineProposalState { + NotCreated, + Active, + Finished, + SentToGovernance, +} + +type Proposal = { + id: string; + sentToGovernance: boolean; + startTime: number; + endTime: number; + votingClosedAndSentTimestamp: number; + forVotes: string; + againstVotes: string; + creationBlockNumber: number; + votingClosedAndSentBlockNumber: number; +}; + +export type VotingMachineProposal = { + proposalData: Proposal; + votedInfo: { + support: boolean; + votingPower: string; + }; + strategy: string; + dataWarehouse: string; + votingAssets: string[]; + hasRequiredRoots: boolean; + voteConfig: { + votingDuration: string; + l1ProposalBlockHash: BytesLike; + }; + state: VotingMachineProposalState; +}; + +export interface VotingMachineDataHelperInterface { + getProposalsData: ( + votingMachineContractAddress: string, + proposals: InitialProposals[], + userAddress?: string, + ) => Promise; +} + +export class VotingMachineDataHelperService + implements VotingMachineDataHelperInterface +{ + private readonly _contract: VotingMachineDataHelper; + + constructor( + votingMachineDataHelperContractAddress: string, + provider: providers.Provider, + ) { + this._contract = VotingMachineDataHelper__factory.connect( + votingMachineDataHelperContractAddress, + provider, + ); + } + + public async getProposalsData( + votingMachineContractAddress: string, + proposals: InitialProposals[], + userAddress?: string, + ) { + const data = await this._contract.getProposalsData( + votingMachineContractAddress, + proposals, + userAddress ?? '0x0', + ); + + return data.map(proposal => { + return { + proposalData: { + id: proposal.proposalData.id.toString(), + sentToGovernance: proposal.proposalData.sentToGovernance, + startTime: proposal.proposalData.startTime, + endTime: proposal.proposalData.endTime, + votingClosedAndSentTimestamp: + proposal.proposalData.votingClosedAndSentTimestamp, + forVotes: proposal.proposalData.forVotes.toString(), + againstVotes: proposal.proposalData.againstVotes.toString(), + creationBlockNumber: + proposal.proposalData.creationBlockNumber.toNumber(), + votingClosedAndSentBlockNumber: + proposal.proposalData.votingClosedAndSentBlockNumber.toNumber(), + }, + votedInfo: { + support: proposal.votedInfo.support, + votingPower: proposal.votedInfo.votingPower.toString(), + }, + strategy: proposal.strategy, + dataWarehouse: proposal.dataWarehouse, + votingAssets: proposal.votingAssets, + hasRequiredRoots: proposal.hasRequiredRoots, + voteConfig: { + votingDuration: proposal.voteConfig.votingDuration.toString(), + l1ProposalBlockHash: proposal.voteConfig.l1ProposalBlockHash, + }, + state: proposal.state, + }; + }); + } +} diff --git a/packages/contract-helpers/src/index.ts b/packages/contract-helpers/src/index.ts index c0198350..8f10ae36 100644 --- a/packages/contract-helpers/src/index.ts +++ b/packages/contract-helpers/src/index.ts @@ -31,6 +31,12 @@ export * from './erc20-2612'; export * from './paraswap-debtSwitch-contract'; export * from './paraswap-withdrawAndSwitchAdapter-contract'; export * from './token-wrapper'; +export * from './governance-v3/governance-data-helper'; +export * from './governance-v3/voting-machine-data-helper'; +export * from './governance-v3/governance-core'; +export * from './governance-v3/aave-token-v3'; +export * from './governance-v3/payloads-data-helper'; +export * from './governance-v3/delegate-helper'; // commons export * from './commons/types'; diff --git a/packages/contract-helpers/src/staking-contract/index.ts b/packages/contract-helpers/src/staking-contract/index.ts index 933a951b..8c974692 100644 --- a/packages/contract-helpers/src/staking-contract/index.ts +++ b/packages/contract-helpers/src/staking-contract/index.ts @@ -20,8 +20,9 @@ import { } from '../commons/validators/paramValidators'; import { ERC20_2612Interface, ERC20_2612Service } from '../erc20-2612'; import { ERC20Service, IERC20ServiceInterface } from '../erc20-contract'; -import { IStakedAaveV3 } from './typechain/IStakedAaveV3'; -import { IStakedAaveV3__factory } from './typechain/IStakedAaveV3__factory'; +import { AaveTokenV3Service } from '../governance-v3/aave-token-v3'; +import { StakedAaveV3 } from './typechain/IStakedAaveV3'; +import { StakedAaveV3__factory } from './typechain/IStakedAaveV3__factory'; export interface StakingInterface { stakingContractAddress: tEthereumAddress; @@ -62,7 +63,7 @@ type StakingServiceConfig = { }; export class StakingService - extends BaseService + extends BaseService implements StakingInterface { public readonly stakingContractAddress: tEthereumAddress; @@ -75,7 +76,7 @@ export class StakingService provider: providers.Provider, stakingServiceConfig: StakingServiceConfig, ) { - super(provider, IStakedAaveV3__factory); + super(provider, StakedAaveV3__factory); this.erc20Service = new ERC20Service(provider); @@ -91,15 +92,21 @@ export class StakingService deadline: string, ): Promise { const { getTokenData } = this.erc20Service; - const stakingContract: IStakedAaveV3 = this.getContractInstance( + const stakingContract: StakedAaveV3 = this.getContractInstance( this.stakingContractAddress, ); // eslint-disable-next-line new-cap const stakedToken: string = await stakingContract.STAKED_TOKEN(); - const { name, decimals } = await getTokenData(stakedToken); + const { decimals } = await getTokenData(stakedToken); const convertedAmount: string = valueToWei(amount, decimals); const { chainId } = await this.provider.getNetwork(); + const aaveTokenV3Service = new AaveTokenV3Service( + stakedToken, + this.provider, + ); + const { name, version } = await aaveTokenV3Service.getEip712Domain(); + const nonce = await this.erc20_2612Service.getNonce({ token: stakedToken, owner: user, @@ -128,7 +135,7 @@ export class StakingService primaryType: 'Permit', domain: { name, - version: '1', + version, chainId, verifyingContract: stakedToken, }, @@ -153,7 +160,7 @@ export class StakingService ): Promise { const txs: EthereumTransactionTypeExtended[] = []; const { decimalsOf } = this.erc20Service; - const stakingContract: IStakedAaveV3 = this.getContractInstance( + const stakingContract: StakedAaveV3 = this.getContractInstance( this.stakingContractAddress, ); // eslint-disable-next-line new-cap @@ -165,7 +172,6 @@ export class StakingService const txCallback: () => Promise = this.generateTxCallback({ rawTxMethod: async () => stakingContract.populateTransaction.stakeWithPermit( - user, convertedAmount, deadline, sig.v, @@ -196,7 +202,7 @@ export class StakingService ): Promise { const txs: EthereumTransactionTypeExtended[] = []; const { decimalsOf, isApproved, approve } = this.erc20Service; - const stakingContract: IStakedAaveV3 = this.getContractInstance( + const stakingContract: StakedAaveV3 = this.getContractInstance( this.stakingContractAddress, ); // eslint-disable-next-line new-cap @@ -248,7 +254,7 @@ export class StakingService @isPositiveOrMinusOneAmount() amount: string, ): Promise { let convertedAmount: string; - const stakingContract: IStakedAaveV3 = this.getContractInstance( + const stakingContract: StakedAaveV3 = this.getContractInstance( this.stakingContractAddress, ); if (amount === '-1') { @@ -282,7 +288,7 @@ export class StakingService public cooldown( @isEthAddress() user: tEthereumAddress, ): EthereumTransactionTypeExtended[] { - const stakingContract: IStakedAaveV3 = this.getContractInstance( + const stakingContract: StakedAaveV3 = this.getContractInstance( this.stakingContractAddress, ); @@ -306,7 +312,7 @@ export class StakingService @isPositiveOrMinusOneAmount() amount: string, ): Promise { let convertedAmount: string; - const stakingContract: IStakedAaveV3 = this.getContractInstance( + const stakingContract: StakedAaveV3 = this.getContractInstance( this.stakingContractAddress, ); if (amount === '-1') { @@ -346,7 +352,7 @@ export class StakingService @isPositiveOrMinusOneAmount() amount: string, ): Promise { let convertedAmount: string; - const stakingContract: IStakedAaveV3 = this.getContractInstance( + const stakingContract: StakedAaveV3 = this.getContractInstance( this.stakingContractAddress, ); if (amount === '-1') { diff --git a/packages/contract-helpers/src/staking-contract/staking.test.ts b/packages/contract-helpers/src/staking-contract/staking.test.ts index 56fa6b5b..5b86cb55 100644 --- a/packages/contract-helpers/src/staking-contract/staking.test.ts +++ b/packages/contract-helpers/src/staking-contract/staking.test.ts @@ -6,8 +6,10 @@ import { transactionType, } from '../commons/types'; import { gasLimitRecommendations, valueToWei } from '../commons/utils'; -import { IStakedAaveV3 } from './typechain/IStakedAaveV3'; -import { IStakedAaveV3__factory } from './typechain/IStakedAaveV3__factory'; +import { AaveTokenV3 } from '../governance-v3/typechain/AaveTokenV3'; +import { AaveTokenV3__factory } from '../governance-v3/typechain/factories/AaveTokenV3__factory'; +import { StakedAaveV3 } from './typechain/IStakedAaveV3'; +import { StakedAaveV3__factory } from './typechain/IStakedAaveV3__factory'; import { StakingService } from './index'; jest.mock('../commons/gasStation', () => { @@ -70,12 +72,24 @@ describe('StakingService', () => { address: '0x0000000000000000000000000000000000000006', }), ); - const spy = jest - .spyOn(IStakedAaveV3__factory, 'connect') + const spy = jest.spyOn(StakedAaveV3__factory, 'connect').mockReturnValue({ + STAKED_TOKEN: async () => + Promise.resolve('0x0000000000000000000000000000000000000006'), + } as unknown as StakedAaveV3); + + const aaveV3TokenSpy = jest + .spyOn(AaveTokenV3__factory, 'connect') .mockReturnValue({ - STAKED_TOKEN: async () => - Promise.resolve('0x0000000000000000000000000000000000000006'), - } as unknown as IStakedAaveV3); + functions: { + eip712Domain: async () => + Promise.resolve({ + name: 'mockToken', + version: '2', + chainId: BigNumber.from(1), + verifyingContract: TOKEN_STAKING_ADDRESS, + }), + }, + } as unknown as AaveTokenV3); const nonce = 1; @@ -90,6 +104,7 @@ describe('StakingService', () => { ); expect(spy).toHaveBeenCalled(); + expect(aaveV3TokenSpy).toHaveBeenCalled(); // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment const { primaryType, domain, message } = await JSON.parse(signature); @@ -155,10 +170,10 @@ describe('StakingService', () => { address: '0x0000000000000000000000000000000000000006', }), ); - jest.spyOn(IStakedAaveV3__factory, 'connect').mockReturnValue({ + jest.spyOn(StakedAaveV3__factory, 'connect').mockReturnValue({ STAKED_TOKEN: async () => Promise.resolve('0x0000000000000000000000000000000000000006'), - } as unknown as IStakedAaveV3); + } as unknown as StakedAaveV3); jest .spyOn(instance.erc20_2612Service, 'getNonce') @@ -178,7 +193,7 @@ describe('StakingService', () => { const signature = '0x532f8df4e2502bd869fb35e9301156f9b307380afdcc25cfbc87b2e939f16f7e47c326dc26eb918d327358797ee67ad7415d871ef7eaf0d4f6352d3ad021fbb41c'; - const { populateTransaction } = IStakedAaveV3__factory.connect( + const { populateTransaction } = StakedAaveV3__factory.connect( TOKEN_STAKING_ADDRESS, provider, ); @@ -195,13 +210,11 @@ describe('StakingService', () => { .spyOn(instance.erc20Service, 'decimalsOf') .mockReturnValue(Promise.resolve(decimals)); - const spy = jest - .spyOn(IStakedAaveV3__factory, 'connect') - .mockReturnValue({ - populateTransaction, - STAKED_TOKEN: async () => - Promise.resolve('0x0000000000000000000000000000000000000006'), - } as unknown as IStakedAaveV3); + const spy = jest.spyOn(StakedAaveV3__factory, 'connect').mockReturnValue({ + populateTransaction, + STAKED_TOKEN: async () => + Promise.resolve('0x0000000000000000000000000000000000000006'), + } as unknown as StakedAaveV3); const stakeTxObj = await instance.stakeWithPermit( user, @@ -220,18 +233,17 @@ describe('StakingService', () => { expect(tx.gasLimit).toEqual(BigNumber.from(1)); const decoded = utils.defaultAbiCoder.decode( - ['address', 'uint256', 'uint256', 'uint8', 'bytes32', 'bytes32'], + ['uint256', 'uint256', 'uint8', 'bytes32', 'bytes32'], utils.hexDataSlice(tx.data ?? '', 4), ); - expect(decoded[0]).toEqual(user); - expect(decoded[1]).toEqual(BigNumber.from(valueToWei(amount, 18))); - expect(decoded[2]).toEqual(BigNumber.from(deadline)); - expect(decoded[3]).toEqual(28); - expect(decoded[4]).toEqual( + expect(decoded[0]).toEqual(BigNumber.from(valueToWei(amount, 18))); + expect(decoded[1]).toEqual(BigNumber.from(deadline)); + expect(decoded[2]).toEqual(28); + expect(decoded[3]).toEqual( '0x532f8df4e2502bd869fb35e9301156f9b307380afdcc25cfbc87b2e939f16f7e', ); - expect(decoded[5]).toEqual( + expect(decoded[4]).toEqual( '0x47c326dc26eb918d327358797ee67ad7415d871ef7eaf0d4f6352d3ad021fbb4', ); @@ -288,18 +300,16 @@ describe('StakingService', () => { jest.clearAllMocks(); }); - const { populateTransaction } = IStakedAaveV3__factory.connect( + const { populateTransaction } = StakedAaveV3__factory.connect( TOKEN_STAKING_ADDRESS, provider, ); it('Expects the tx object when all params passed with no approval needed', async () => { - const spy = jest - .spyOn(IStakedAaveV3__factory, 'connect') - .mockReturnValue({ - populateTransaction, - STAKED_TOKEN: async () => - Promise.resolve('0x0000000000000000000000000000000000000006'), - } as unknown as IStakedAaveV3); + const spy = jest.spyOn(StakedAaveV3__factory, 'connect').mockReturnValue({ + populateTransaction, + STAKED_TOKEN: async () => + Promise.resolve('0x0000000000000000000000000000000000000006'), + } as unknown as StakedAaveV3); const instance = new StakingService(provider, { TOKEN_STAKING_ADDRESS }); jest @@ -340,13 +350,11 @@ describe('StakingService', () => { expect(gasPrice?.gasPrice).toEqual('1'); }); it('Expects the tx object when all params passed and no onBehalfOf with approval needed', async () => { - const spy = jest - .spyOn(IStakedAaveV3__factory, 'connect') - .mockReturnValue({ - populateTransaction, - STAKED_TOKEN: async () => - Promise.resolve('0x0000000000000000000000000000000000000006'), - } as unknown as IStakedAaveV3); + const spy = jest.spyOn(StakedAaveV3__factory, 'connect').mockReturnValue({ + populateTransaction, + STAKED_TOKEN: async () => + Promise.resolve('0x0000000000000000000000000000000000000006'), + } as unknown as StakedAaveV3); const instance = new StakingService(provider, { TOKEN_STAKING_ADDRESS }); jest @@ -442,18 +450,16 @@ describe('StakingService', () => { jest.clearAllMocks(); }); - const { populateTransaction } = IStakedAaveV3__factory.connect( + const { populateTransaction } = StakedAaveV3__factory.connect( TOKEN_STAKING_ADDRESS, provider, ); it('Expects the tx object when all params passed and specific amount', async () => { - const spy = jest - .spyOn(IStakedAaveV3__factory, 'connect') - .mockReturnValue({ - populateTransaction, - STAKED_TOKEN: async () => - Promise.resolve('0x0000000000000000000000000000000000000006'), - } as unknown as IStakedAaveV3); + const spy = jest.spyOn(StakedAaveV3__factory, 'connect').mockReturnValue({ + populateTransaction, + STAKED_TOKEN: async () => + Promise.resolve('0x0000000000000000000000000000000000000006'), + } as unknown as StakedAaveV3); const instance = new StakingService(provider, { TOKEN_STAKING_ADDRESS }); jest @@ -486,13 +492,11 @@ describe('StakingService', () => { expect(gasPrice?.gasPrice).toEqual('1'); }); it('Expects the tx object when all params passed and -1 amount', async () => { - const spy = jest - .spyOn(IStakedAaveV3__factory, 'connect') - .mockReturnValue({ - populateTransaction, - STAKED_TOKEN: async () => - Promise.resolve('0x0000000000000000000000000000000000000006'), - } as unknown as IStakedAaveV3); + const spy = jest.spyOn(StakedAaveV3__factory, 'connect').mockReturnValue({ + populateTransaction, + STAKED_TOKEN: async () => + Promise.resolve('0x0000000000000000000000000000000000000006'), + } as unknown as StakedAaveV3); const instance = new StakingService(provider, { TOKEN_STAKING_ADDRESS }); const amount = '-1'; @@ -557,18 +561,16 @@ describe('StakingService', () => { jest.clearAllMocks(); }); - const { populateTransaction } = IStakedAaveV3__factory.connect( + const { populateTransaction } = StakedAaveV3__factory.connect( TOKEN_STAKING_ADDRESS, provider, ); it('Expects the tx object when all params passed and specific amount', async () => { - const spy = jest - .spyOn(IStakedAaveV3__factory, 'connect') - .mockReturnValue({ - populateTransaction, - STAKED_TOKEN: async () => - Promise.resolve('0x0000000000000000000000000000000000000006'), - } as unknown as IStakedAaveV3); + const spy = jest.spyOn(StakedAaveV3__factory, 'connect').mockReturnValue({ + populateTransaction, + STAKED_TOKEN: async () => + Promise.resolve('0x0000000000000000000000000000000000000006'), + } as unknown as StakedAaveV3); const instance = new StakingService(provider, { TOKEN_STAKING_ADDRESS, }); @@ -609,13 +611,11 @@ describe('StakingService', () => { expect(gasPrice?.gasPrice).toEqual('1'); }); it('Expects the tx object when all params passed and -1 amount', async () => { - const spy = jest - .spyOn(IStakedAaveV3__factory, 'connect') - .mockReturnValue({ - populateTransaction, - STAKED_TOKEN: async () => - Promise.resolve('0x0000000000000000000000000000000000000006'), - } as unknown as IStakedAaveV3); + const spy = jest.spyOn(StakedAaveV3__factory, 'connect').mockReturnValue({ + populateTransaction, + STAKED_TOKEN: async () => + Promise.resolve('0x0000000000000000000000000000000000000006'), + } as unknown as StakedAaveV3); const instance = new StakingService(provider, { TOKEN_STAKING_ADDRESS, }); @@ -745,18 +745,16 @@ describe('StakingService', () => { jest.clearAllMocks(); }); - const { populateTransaction } = IStakedAaveV3__factory.connect( + const { populateTransaction } = StakedAaveV3__factory.connect( TOKEN_STAKING_ADDRESS, provider, ); it('Expects the tx object when all params passed with specific amount', async () => { - const spy = jest - .spyOn(IStakedAaveV3__factory, 'connect') - .mockReturnValue({ - populateTransaction, - REWARD_TOKEN: async () => - Promise.resolve('0x0000000000000000000000000000000000000006'), - } as unknown as IStakedAaveV3); + const spy = jest.spyOn(StakedAaveV3__factory, 'connect').mockReturnValue({ + populateTransaction, + REWARD_TOKEN: async () => + Promise.resolve('0x0000000000000000000000000000000000000006'), + } as unknown as StakedAaveV3); const instance = new StakingService(provider, { TOKEN_STAKING_ADDRESS }); jest diff --git a/packages/contract-helpers/src/staking-contract/typechain/IStakedAaveV3.d.ts b/packages/contract-helpers/src/staking-contract/typechain/IStakedAaveV3.d.ts index 99aa2ce2..29c62a72 100644 --- a/packages/contract-helpers/src/staking-contract/typechain/IStakedAaveV3.d.ts +++ b/packages/contract-helpers/src/staking-contract/typechain/IStakedAaveV3.d.ts @@ -1,1691 +1,2967 @@ /* Autogenerated file. Do not edit manually. */ /* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers'; +import type { + FunctionFragment, + Result, + EventFragment, +} from '@ethersproject/abi'; +import type { Listener, Provider } from '@ethersproject/providers'; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from './common'; + +export declare namespace DistributionTypes { + export type AssetConfigInputStruct = { + emissionPerSecond: BigNumberish; + totalStaked: BigNumberish; + underlyingAsset: string; + }; + + export type AssetConfigInputStructOutput = [BigNumber, BigNumber, string] & { + emissionPerSecond: BigNumber; + totalStaked: BigNumber; + underlyingAsset: string; + }; +} -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - Contract, - ContractTransaction, - Overrides, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; - -interface IStakedAaveV3Interface extends ethers.utils.Interface { - functions: { - "COOLDOWN_SECONDS()": FunctionFragment; - 'REWARD_TOKEN()': FunctionFragment; - 'STAKED_TOKEN()': FunctionFragment; - "claimRewards(address,uint256)": FunctionFragment; - "claimRewardsAndRedeem(address,uint256,uint256)": FunctionFragment; - "claimRewardsAndRedeemOnBehalf(address,address,uint256,uint256)": FunctionFragment; - "claimRewardsAndStake(address,uint256)": FunctionFragment; - "claimRewardsAndStakeOnBehalf(address,address,uint256)": FunctionFragment; - "claimRewardsOnBehalf(address,address,uint256)": FunctionFragment; - "cooldown()": FunctionFragment; - "cooldownOnBehalfOf(address)": FunctionFragment; - "getCooldownSeconds()": FunctionFragment; - "getExchangeRate()": FunctionFragment; - "getExchangeRateSnapshot(uint32)": FunctionFragment; - "getExchangeRateSnapshotsCount()": FunctionFragment; - "getMaxSlashablePercentage()": FunctionFragment; - "getTotalRewardsBalance(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "previewRedeem(uint256)": FunctionFragment; - "previewStake(uint256)": FunctionFragment; - "redeem(address,uint256)": FunctionFragment; - "redeemOnBehalf(address,address,uint256)": FunctionFragment; - "stake(address,uint256)": FunctionFragment; - "stakeWithPermit(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - }; - - encodeFunctionData( - functionFragment: "COOLDOWN_SECONDS", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: 'REWARD_TOKEN', - values?: undefined, - ): string; - encodeFunctionData( - functionFragment: 'STAKED_TOKEN', - values?: undefined, - ): string; - encodeFunctionData( - functionFragment: "claimRewards", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "claimRewardsAndRedeem", - values: [string, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "claimRewardsAndRedeemOnBehalf", - values: [string, string, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "claimRewardsAndStake", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "claimRewardsAndStakeOnBehalf", - values: [string, string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "claimRewardsOnBehalf", - values: [string, string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "cooldown", values?: undefined): string; - encodeFunctionData( - functionFragment: "cooldownOnBehalfOf", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "getCooldownSeconds", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getExchangeRate", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getExchangeRateSnapshot", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getExchangeRateSnapshotsCount", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getMaxSlashablePercentage", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getTotalRewardsBalance", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "permit", - values: [ - string, - string, - BigNumberish, - BigNumberish, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData( - functionFragment: "previewRedeem", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "previewStake", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "redeem", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "redeemOnBehalf", - values: [string, string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "stake", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "stakeWithPermit", - values: [ - string, - BigNumberish, - BigNumberish, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - - decodeFunctionResult( - functionFragment: "COOLDOWN_SECONDS", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: 'REWARD_TOKEN', - data: BytesLike, - ): Result; - decodeFunctionResult( - functionFragment: 'STAKED_TOKEN', - data: BytesLike, - ): Result; - decodeFunctionResult( - functionFragment: "claimRewards", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "claimRewardsAndRedeem", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "claimRewardsAndRedeemOnBehalf", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "claimRewardsAndStake", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "claimRewardsAndStakeOnBehalf", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "claimRewardsOnBehalf", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "cooldown", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "cooldownOnBehalfOf", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getCooldownSeconds", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getExchangeRate", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getExchangeRateSnapshot", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getExchangeRateSnapshotsCount", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getMaxSlashablePercentage", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getTotalRewardsBalance", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "previewRedeem", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "previewStake", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "redeem", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "redeemOnBehalf", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "stake", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "stakeWithPermit", - data: BytesLike - ): Result; - - events: { - "Cooldown(address,uint256)": EventFragment; - "CooldownSecondsChanged(uint256)": EventFragment; - "ExchangeRateChanged(uint216)": EventFragment; - "FundsReturned(uint256)": EventFragment; - "GHODebtTokenChanged(address)": EventFragment; - "MaxSlashablePercentageChanged(uint256)": EventFragment; - "Redeem(address,address,uint256,uint256)": EventFragment; - "RewardsAccrued(address,uint256)": EventFragment; - "RewardsClaimed(address,address,uint256)": EventFragment; - "Slashed(address,uint256)": EventFragment; - "SlashingExitWindowDurationChanged(uint256)": EventFragment; - "SlashingSettled()": EventFragment; - "Staked(address,address,uint256,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Cooldown"): EventFragment; - getEvent(nameOrSignatureOrTopic: "CooldownSecondsChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ExchangeRateChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "FundsReturned"): EventFragment; - getEvent(nameOrSignatureOrTopic: "GHODebtTokenChanged"): EventFragment; - getEvent( - nameOrSignatureOrTopic: "MaxSlashablePercentageChanged" - ): EventFragment; - getEvent(nameOrSignatureOrTopic: "Redeem"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RewardsAccrued"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RewardsClaimed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Slashed"): EventFragment; - getEvent( - nameOrSignatureOrTopic: "SlashingExitWindowDurationChanged" - ): EventFragment; - getEvent(nameOrSignatureOrTopic: "SlashingSettled"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Staked"): EventFragment; +export interface StakedAaveV3Interface extends utils.Interface { + functions: { + 'CLAIM_HELPER_ROLE()': FunctionFragment; + 'COOLDOWN_ADMIN_ROLE()': FunctionFragment; + 'COOLDOWN_SECONDS()': FunctionFragment; + 'DELEGATE_BY_TYPE_TYPEHASH()': FunctionFragment; + 'DELEGATE_TYPEHASH()': FunctionFragment; + 'DISTRIBUTION_END()': FunctionFragment; + 'DOMAIN_SEPARATOR()': FunctionFragment; + 'EIP712_REVISION()': FunctionFragment; + 'EMISSION_MANAGER()': FunctionFragment; + 'EXCHANGE_RATE_UNIT()': FunctionFragment; + 'INITIAL_EXCHANGE_RATE()': FunctionFragment; + 'LOWER_BOUND()': FunctionFragment; + 'PERMIT_TYPEHASH()': FunctionFragment; + 'POWER_SCALE_FACTOR()': FunctionFragment; + 'PRECISION()': FunctionFragment; + 'REVISION()': FunctionFragment; + 'REWARDS_VAULT()': FunctionFragment; + 'REWARD_TOKEN()': FunctionFragment; + 'SLASH_ADMIN_ROLE()': FunctionFragment; + 'STAKED_TOKEN()': FunctionFragment; + 'UNSTAKE_WINDOW()': FunctionFragment; + '_nonces(address)': FunctionFragment; + 'allowance(address,address)': FunctionFragment; + 'approve(address,uint256)': FunctionFragment; + 'assets(address)': FunctionFragment; + 'balanceOf(address)': FunctionFragment; + 'claimRewards(address,uint256)': FunctionFragment; + 'claimRewardsAndRedeem(address,uint256,uint256)': FunctionFragment; + 'claimRewardsAndRedeemOnBehalf(address,address,uint256,uint256)': FunctionFragment; + 'claimRewardsAndStake(address,uint256)': FunctionFragment; + 'claimRewardsAndStakeOnBehalf(address,address,uint256)': FunctionFragment; + 'claimRewardsOnBehalf(address,address,uint256)': FunctionFragment; + 'claimRoleAdmin(uint256)': FunctionFragment; + 'configureAssets((uint128,uint256,address)[])': FunctionFragment; + 'cooldown()': FunctionFragment; + 'cooldownOnBehalfOf(address)': FunctionFragment; + 'decimals()': FunctionFragment; + 'decreaseAllowance(address,uint256)': FunctionFragment; + 'delegate(address)': FunctionFragment; + 'delegateByType(address,uint8)': FunctionFragment; + 'eip712Domain()': FunctionFragment; + 'getAdmin(uint256)': FunctionFragment; + 'getCooldownSeconds()': FunctionFragment; + 'getDelegateeByType(address,uint8)': FunctionFragment; + 'getDelegates(address)': FunctionFragment; + 'getExchangeRate()': FunctionFragment; + 'getMaxSlashablePercentage()': FunctionFragment; + 'getPendingAdmin(uint256)': FunctionFragment; + 'getPowerCurrent(address,uint8)': FunctionFragment; + 'getPowersCurrent(address)': FunctionFragment; + 'getTotalRewardsBalance(address)': FunctionFragment; + 'getUserAssetData(address,address)': FunctionFragment; + 'ghoDebtToken()': FunctionFragment; + 'inPostSlashingPeriod()': FunctionFragment; + 'increaseAllowance(address,uint256)': FunctionFragment; + 'initialize()': FunctionFragment; + 'metaDelegate(address,address,uint256,uint8,bytes32,bytes32)': FunctionFragment; + 'metaDelegateByType(address,address,uint8,uint256,uint8,bytes32,bytes32)': FunctionFragment; + 'name()': FunctionFragment; + 'permit(address,address,uint256,uint256,uint8,bytes32,bytes32)': FunctionFragment; + 'previewRedeem(uint256)': FunctionFragment; + 'previewStake(uint256)': FunctionFragment; + 'redeem(address,uint256)': FunctionFragment; + 'redeemOnBehalf(address,address,uint256)': FunctionFragment; + 'returnFunds(uint256)': FunctionFragment; + 'setCooldownSeconds(uint256)': FunctionFragment; + 'setMaxSlashablePercentage(uint256)': FunctionFragment; + 'setPendingAdmin(uint256,address)': FunctionFragment; + 'settleSlashing()': FunctionFragment; + 'slash(address,uint256)': FunctionFragment; + 'stake(address,uint256)': FunctionFragment; + 'stakeWithPermit(uint256,uint256,uint8,bytes32,bytes32)': FunctionFragment; + 'stakerRewardsToClaim(address)': FunctionFragment; + 'stakersCooldowns(address)': FunctionFragment; + 'symbol()': FunctionFragment; + 'totalSupply()': FunctionFragment; + 'transfer(address,uint256)': FunctionFragment; + 'transferFrom(address,address,uint256)': FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | 'CLAIM_HELPER_ROLE' + | 'COOLDOWN_ADMIN_ROLE' + | 'COOLDOWN_SECONDS' + | 'DELEGATE_BY_TYPE_TYPEHASH' + | 'DELEGATE_TYPEHASH' + | 'DISTRIBUTION_END' + | 'DOMAIN_SEPARATOR' + | 'EIP712_REVISION' + | 'EMISSION_MANAGER' + | 'EXCHANGE_RATE_UNIT' + | 'INITIAL_EXCHANGE_RATE' + | 'LOWER_BOUND' + | 'PERMIT_TYPEHASH' + | 'POWER_SCALE_FACTOR' + | 'PRECISION' + | 'REVISION' + | 'REWARDS_VAULT' + | 'REWARD_TOKEN' + | 'SLASH_ADMIN_ROLE' + | 'STAKED_TOKEN' + | 'UNSTAKE_WINDOW' + | '_nonces' + | 'allowance' + | 'approve' + | 'assets' + | 'balanceOf' + | 'claimRewards' + | 'claimRewardsAndRedeem' + | 'claimRewardsAndRedeemOnBehalf' + | 'claimRewardsAndStake' + | 'claimRewardsAndStakeOnBehalf' + | 'claimRewardsOnBehalf' + | 'claimRoleAdmin' + | 'configureAssets' + | 'cooldown' + | 'cooldownOnBehalfOf' + | 'decimals' + | 'decreaseAllowance' + | 'delegate' + | 'delegateByType' + | 'eip712Domain' + | 'getAdmin' + | 'getCooldownSeconds' + | 'getDelegateeByType' + | 'getDelegates' + | 'getExchangeRate' + | 'getMaxSlashablePercentage' + | 'getPendingAdmin' + | 'getPowerCurrent' + | 'getPowersCurrent' + | 'getTotalRewardsBalance' + | 'getUserAssetData' + | 'ghoDebtToken' + | 'inPostSlashingPeriod' + | 'increaseAllowance' + | 'initialize' + | 'metaDelegate' + | 'metaDelegateByType' + | 'name' + | 'permit' + | 'previewRedeem' + | 'previewStake' + | 'redeem' + | 'redeemOnBehalf' + | 'returnFunds' + | 'setCooldownSeconds' + | 'setMaxSlashablePercentage' + | 'setPendingAdmin' + | 'settleSlashing' + | 'slash' + | 'stake' + | 'stakeWithPermit' + | 'stakerRewardsToClaim' + | 'stakersCooldowns' + | 'symbol' + | 'totalSupply' + | 'transfer' + | 'transferFrom', + ): FunctionFragment; + + encodeFunctionData( + functionFragment: 'CLAIM_HELPER_ROLE', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'COOLDOWN_ADMIN_ROLE', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'COOLDOWN_SECONDS', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'DELEGATE_BY_TYPE_TYPEHASH', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'DELEGATE_TYPEHASH', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'DISTRIBUTION_END', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'DOMAIN_SEPARATOR', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'EIP712_REVISION', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'EMISSION_MANAGER', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'EXCHANGE_RATE_UNIT', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'INITIAL_EXCHANGE_RATE', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'LOWER_BOUND', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'PERMIT_TYPEHASH', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'POWER_SCALE_FACTOR', + values?: undefined, + ): string; + encodeFunctionData(functionFragment: 'PRECISION', values?: undefined): string; + encodeFunctionData(functionFragment: 'REVISION', values?: undefined): string; + encodeFunctionData( + functionFragment: 'REWARDS_VAULT', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'REWARD_TOKEN', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'SLASH_ADMIN_ROLE', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'STAKED_TOKEN', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'UNSTAKE_WINDOW', + values?: undefined, + ): string; + encodeFunctionData(functionFragment: '_nonces', values: [string]): string; + encodeFunctionData( + functionFragment: 'allowance', + values: [string, string], + ): string; + encodeFunctionData( + functionFragment: 'approve', + values: [string, BigNumberish], + ): string; + encodeFunctionData(functionFragment: 'assets', values: [string]): string; + encodeFunctionData(functionFragment: 'balanceOf', values: [string]): string; + encodeFunctionData( + functionFragment: 'claimRewards', + values: [string, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'claimRewardsAndRedeem', + values: [string, BigNumberish, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'claimRewardsAndRedeemOnBehalf', + values: [string, string, BigNumberish, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'claimRewardsAndStake', + values: [string, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'claimRewardsAndStakeOnBehalf', + values: [string, string, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'claimRewardsOnBehalf', + values: [string, string, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'claimRoleAdmin', + values: [BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'configureAssets', + values: [DistributionTypes.AssetConfigInputStruct[]], + ): string; + encodeFunctionData(functionFragment: 'cooldown', values?: undefined): string; + encodeFunctionData( + functionFragment: 'cooldownOnBehalfOf', + values: [string], + ): string; + encodeFunctionData(functionFragment: 'decimals', values?: undefined): string; + encodeFunctionData( + functionFragment: 'decreaseAllowance', + values: [string, BigNumberish], + ): string; + encodeFunctionData(functionFragment: 'delegate', values: [string]): string; + encodeFunctionData( + functionFragment: 'delegateByType', + values: [string, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'eip712Domain', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'getAdmin', + values: [BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'getCooldownSeconds', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'getDelegateeByType', + values: [string, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'getDelegates', + values: [string], + ): string; + encodeFunctionData( + functionFragment: 'getExchangeRate', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'getMaxSlashablePercentage', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'getPendingAdmin', + values: [BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'getPowerCurrent', + values: [string, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'getPowersCurrent', + values: [string], + ): string; + encodeFunctionData( + functionFragment: 'getTotalRewardsBalance', + values: [string], + ): string; + encodeFunctionData( + functionFragment: 'getUserAssetData', + values: [string, string], + ): string; + encodeFunctionData( + functionFragment: 'ghoDebtToken', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'inPostSlashingPeriod', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'increaseAllowance', + values: [string, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'initialize', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'metaDelegate', + values: [string, string, BigNumberish, BigNumberish, BytesLike, BytesLike], + ): string; + encodeFunctionData( + functionFragment: 'metaDelegateByType', + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike, + ], + ): string; + encodeFunctionData(functionFragment: 'name', values?: undefined): string; + encodeFunctionData( + functionFragment: 'permit', + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike, + ], + ): string; + encodeFunctionData( + functionFragment: 'previewRedeem', + values: [BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'previewStake', + values: [BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'redeem', + values: [string, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'redeemOnBehalf', + values: [string, string, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'returnFunds', + values: [BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'setCooldownSeconds', + values: [BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'setMaxSlashablePercentage', + values: [BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'setPendingAdmin', + values: [BigNumberish, string], + ): string; + encodeFunctionData( + functionFragment: 'settleSlashing', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'slash', + values: [string, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'stake', + values: [string, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'stakeWithPermit', + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike], + ): string; + encodeFunctionData( + functionFragment: 'stakerRewardsToClaim', + values: [string], + ): string; + encodeFunctionData( + functionFragment: 'stakersCooldowns', + values: [string], + ): string; + encodeFunctionData(functionFragment: 'symbol', values?: undefined): string; + encodeFunctionData( + functionFragment: 'totalSupply', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'transfer', + values: [string, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'transferFrom', + values: [string, string, BigNumberish], + ): string; + + decodeFunctionResult( + functionFragment: 'CLAIM_HELPER_ROLE', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'COOLDOWN_ADMIN_ROLE', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'COOLDOWN_SECONDS', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'DELEGATE_BY_TYPE_TYPEHASH', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'DELEGATE_TYPEHASH', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'DISTRIBUTION_END', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'DOMAIN_SEPARATOR', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'EIP712_REVISION', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'EMISSION_MANAGER', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'EXCHANGE_RATE_UNIT', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'INITIAL_EXCHANGE_RATE', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'LOWER_BOUND', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'PERMIT_TYPEHASH', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'POWER_SCALE_FACTOR', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'PRECISION', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'REVISION', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'REWARDS_VAULT', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'REWARD_TOKEN', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'SLASH_ADMIN_ROLE', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'STAKED_TOKEN', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'UNSTAKE_WINDOW', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: '_nonces', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'allowance', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'approve', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'assets', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'balanceOf', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'claimRewards', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'claimRewardsAndRedeem', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'claimRewardsAndRedeemOnBehalf', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'claimRewardsAndStake', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'claimRewardsAndStakeOnBehalf', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'claimRewardsOnBehalf', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'claimRoleAdmin', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'configureAssets', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'cooldown', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'cooldownOnBehalfOf', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'decimals', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'decreaseAllowance', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'delegate', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'delegateByType', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'eip712Domain', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'getAdmin', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'getCooldownSeconds', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getDelegateeByType', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getDelegates', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getExchangeRate', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getMaxSlashablePercentage', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getPendingAdmin', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getPowerCurrent', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getPowersCurrent', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getTotalRewardsBalance', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getUserAssetData', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'ghoDebtToken', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'inPostSlashingPeriod', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'increaseAllowance', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'initialize', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'metaDelegate', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'metaDelegateByType', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'name', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'permit', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'previewRedeem', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'previewStake', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'redeem', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'redeemOnBehalf', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'returnFunds', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'setCooldownSeconds', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'setMaxSlashablePercentage', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'setPendingAdmin', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'settleSlashing', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'slash', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'stake', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'stakeWithPermit', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'stakerRewardsToClaim', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'stakersCooldowns', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'symbol', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'totalSupply', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'transfer', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'transferFrom', + data: BytesLike, + ): Result; + + events: { + 'Approval(address,address,uint256)': EventFragment; + 'AssetConfigUpdated(address,uint256)': EventFragment; + 'AssetIndexUpdated(address,uint256)': EventFragment; + 'Cooldown(address,uint256)': EventFragment; + 'CooldownSecondsChanged(uint256)': EventFragment; + 'DelegateChanged(address,address,uint8)': EventFragment; + 'EIP712DomainChanged()': EventFragment; + 'ExchangeRateChanged(uint216)': EventFragment; + 'FundsReturned(uint256)': EventFragment; + 'MaxSlashablePercentageChanged(uint256)': EventFragment; + 'PendingAdminChanged(address,uint256)': EventFragment; + 'Redeem(address,address,uint256,uint256)': EventFragment; + 'RewardsAccrued(address,uint256)': EventFragment; + 'RewardsClaimed(address,address,uint256)': EventFragment; + 'RoleClaimed(address,uint256)': EventFragment; + 'Slashed(address,uint256)': EventFragment; + 'SlashingExitWindowDurationChanged(uint256)': EventFragment; + 'SlashingSettled()': EventFragment; + 'Staked(address,address,uint256,uint256)': EventFragment; + 'Transfer(address,address,uint256)': EventFragment; + 'UserIndexUpdated(address,address,uint256)': EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: 'Approval'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'AssetConfigUpdated'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'AssetIndexUpdated'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Cooldown'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'CooldownSecondsChanged'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'DelegateChanged'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'EIP712DomainChanged'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'ExchangeRateChanged'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'FundsReturned'): EventFragment; + getEvent( + nameOrSignatureOrTopic: 'MaxSlashablePercentageChanged', + ): EventFragment; + getEvent(nameOrSignatureOrTopic: 'PendingAdminChanged'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Redeem'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'RewardsAccrued'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'RewardsClaimed'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'RoleClaimed'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Slashed'): EventFragment; + getEvent( + nameOrSignatureOrTopic: 'SlashingExitWindowDurationChanged', + ): EventFragment; + getEvent(nameOrSignatureOrTopic: 'SlashingSettled'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Staked'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Transfer'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'UserIndexUpdated'): EventFragment; } -export class IStakedAaveV3 extends Contract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: IStakedAaveV3Interface; - - functions: { - COOLDOWN_SECONDS(overrides?: CallOverrides): Promise<[BigNumber]>; - - "COOLDOWN_SECONDS()"(overrides?: CallOverrides): Promise<[BigNumber]>; - - REWARD_TOKEN(overrides?: CallOverrides): Promise<{ - 0: string; - }>; - - 'REWARD_TOKEN()'(overrides?: CallOverrides): Promise<{ - 0: string; - }>; - - STAKED_TOKEN(overrides?: CallOverrides): Promise<{ - 0: string; - }>; - - 'STAKED_TOKEN()'(overrides?: CallOverrides): Promise<{ - 0: string; - }>; - - claimRewards( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "claimRewards(address,uint256)"( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - claimRewardsAndRedeem( - to: string, - claimAmount: BigNumberish, - redeemAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "claimRewardsAndRedeem(address,uint256,uint256)"( - to: string, - claimAmount: BigNumberish, - redeemAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - claimRewardsAndRedeemOnBehalf( - from: string, - to: string, - claimAmount: BigNumberish, - redeemAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "claimRewardsAndRedeemOnBehalf(address,address,uint256,uint256)"( - from: string, - to: string, - claimAmount: BigNumberish, - redeemAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - claimRewardsAndStake( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "claimRewardsAndStake(address,uint256)"( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - claimRewardsAndStakeOnBehalf( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "claimRewardsAndStakeOnBehalf(address,address,uint256)"( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - claimRewardsOnBehalf( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "claimRewardsOnBehalf(address,address,uint256)"( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - cooldown( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "cooldown()"( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - cooldownOnBehalfOf( - from: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "cooldownOnBehalfOf(address)"( - from: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getCooldownSeconds(overrides?: CallOverrides): Promise<[BigNumber]>; - - "getCooldownSeconds()"(overrides?: CallOverrides): Promise<[BigNumber]>; - - getExchangeRate(overrides?: CallOverrides): Promise<[BigNumber]>; - - "getExchangeRate()"(overrides?: CallOverrides): Promise<[BigNumber]>; - - getExchangeRateSnapshot( - index: BigNumberish, - overrides?: CallOverrides - ): Promise< - [[number, BigNumber] & { blockNumber: number; value: BigNumber }] - >; - - "getExchangeRateSnapshot(uint32)"( - index: BigNumberish, - overrides?: CallOverrides - ): Promise< - [[number, BigNumber] & { blockNumber: number; value: BigNumber }] - >; - - getExchangeRateSnapshotsCount(overrides?: CallOverrides): Promise<[number]>; - - "getExchangeRateSnapshotsCount()"( - overrides?: CallOverrides - ): Promise<[number]>; - - getMaxSlashablePercentage(overrides?: CallOverrides): Promise<[BigNumber]>; - - "getMaxSlashablePercentage()"( - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getTotalRewardsBalance( - staker: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - "getTotalRewardsBalance(address)"( - staker: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - previewRedeem( - shares: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - "previewRedeem(uint256)"( - shares: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - previewStake( - assets: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - "previewStake(uint256)"( - assets: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - redeem( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "redeem(address,uint256)"( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - redeemOnBehalf( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "redeemOnBehalf(address,address,uint256)"( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - stake( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "stake(address,uint256)"( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - stakeWithPermit( - from: string, - amount: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "stakeWithPermit(address,uint256,uint256,uint8,bytes32,bytes32)"( - from: string, - amount: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent< + [string, string, BigNumber], + ApprovalEventObject +>; - REWARD_TOKEN(overrides?: CallOverrides): Promise; +export type ApprovalEventFilter = TypedEventFilter; - 'REWARD_TOKEN()'(overrides?: CallOverrides): Promise; +export interface AssetConfigUpdatedEventObject { + asset: string; + emission: BigNumber; +} +export type AssetConfigUpdatedEvent = TypedEvent< + [string, BigNumber], + AssetConfigUpdatedEventObject +>; - STAKED_TOKEN(overrides?: CallOverrides): Promise; +export type AssetConfigUpdatedEventFilter = + TypedEventFilter; - 'STAKED_TOKEN()'(overrides?: CallOverrides): Promise; +export interface AssetIndexUpdatedEventObject { + asset: string; + index: BigNumber; +} +export type AssetIndexUpdatedEvent = TypedEvent< + [string, BigNumber], + AssetIndexUpdatedEventObject +>; - COOLDOWN_SECONDS(overrides?: CallOverrides): Promise; +export type AssetIndexUpdatedEventFilter = + TypedEventFilter; - "COOLDOWN_SECONDS()"(overrides?: CallOverrides): Promise; +export interface CooldownEventObject { + user: string; + amount: BigNumber; +} +export type CooldownEvent = TypedEvent< + [string, BigNumber], + CooldownEventObject +>; - claimRewards( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } +export type CooldownEventFilter = TypedEventFilter; + +export interface CooldownSecondsChangedEventObject { + cooldownSeconds: BigNumber; +} +export type CooldownSecondsChangedEvent = TypedEvent< + [BigNumber], + CooldownSecondsChangedEventObject +>; + +export type CooldownSecondsChangedEventFilter = + TypedEventFilter; + +export interface DelegateChangedEventObject { + delegator: string; + delegatee: string; + delegationType: number; +} +export type DelegateChangedEvent = TypedEvent< + [string, string, number], + DelegateChangedEventObject +>; + +export type DelegateChangedEventFilter = TypedEventFilter; + +export interface EIP712DomainChangedEventObject {} +export type EIP712DomainChangedEvent = TypedEvent< + [], + EIP712DomainChangedEventObject +>; + +export type EIP712DomainChangedEventFilter = + TypedEventFilter; + +export interface ExchangeRateChangedEventObject { + exchangeRate: BigNumber; +} +export type ExchangeRateChangedEvent = TypedEvent< + [BigNumber], + ExchangeRateChangedEventObject +>; + +export type ExchangeRateChangedEventFilter = + TypedEventFilter; + +export interface FundsReturnedEventObject { + amount: BigNumber; +} +export type FundsReturnedEvent = TypedEvent< + [BigNumber], + FundsReturnedEventObject +>; + +export type FundsReturnedEventFilter = TypedEventFilter; + +export interface MaxSlashablePercentageChangedEventObject { + newPercentage: BigNumber; +} +export type MaxSlashablePercentageChangedEvent = TypedEvent< + [BigNumber], + MaxSlashablePercentageChangedEventObject +>; + +export type MaxSlashablePercentageChangedEventFilter = + TypedEventFilter; + +export interface PendingAdminChangedEventObject { + newPendingAdmin: string; + role: BigNumber; +} +export type PendingAdminChangedEvent = TypedEvent< + [string, BigNumber], + PendingAdminChangedEventObject +>; + +export type PendingAdminChangedEventFilter = + TypedEventFilter; + +export interface RedeemEventObject { + from: string; + to: string; + assets: BigNumber; + shares: BigNumber; +} +export type RedeemEvent = TypedEvent< + [string, string, BigNumber, BigNumber], + RedeemEventObject +>; + +export type RedeemEventFilter = TypedEventFilter; + +export interface RewardsAccruedEventObject { + user: string; + amount: BigNumber; +} +export type RewardsAccruedEvent = TypedEvent< + [string, BigNumber], + RewardsAccruedEventObject +>; + +export type RewardsAccruedEventFilter = TypedEventFilter; + +export interface RewardsClaimedEventObject { + from: string; + to: string; + amount: BigNumber; +} +export type RewardsClaimedEvent = TypedEvent< + [string, string, BigNumber], + RewardsClaimedEventObject +>; + +export type RewardsClaimedEventFilter = TypedEventFilter; + +export interface RoleClaimedEventObject { + newAdmin: string; + role: BigNumber; +} +export type RoleClaimedEvent = TypedEvent< + [string, BigNumber], + RoleClaimedEventObject +>; + +export type RoleClaimedEventFilter = TypedEventFilter; + +export interface SlashedEventObject { + destination: string; + amount: BigNumber; +} +export type SlashedEvent = TypedEvent<[string, BigNumber], SlashedEventObject>; + +export type SlashedEventFilter = TypedEventFilter; + +export interface SlashingExitWindowDurationChangedEventObject { + windowSeconds: BigNumber; +} +export type SlashingExitWindowDurationChangedEvent = TypedEvent< + [BigNumber], + SlashingExitWindowDurationChangedEventObject +>; + +export type SlashingExitWindowDurationChangedEventFilter = + TypedEventFilter; + +export interface SlashingSettledEventObject {} +export type SlashingSettledEvent = TypedEvent<[], SlashingSettledEventObject>; + +export type SlashingSettledEventFilter = TypedEventFilter; + +export interface StakedEventObject { + from: string; + to: string; + assets: BigNumber; + shares: BigNumber; +} +export type StakedEvent = TypedEvent< + [string, string, BigNumber, BigNumber], + StakedEventObject +>; + +export type StakedEventFilter = TypedEventFilter; + +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent< + [string, string, BigNumber], + TransferEventObject +>; + +export type TransferEventFilter = TypedEventFilter; + +export interface UserIndexUpdatedEventObject { + user: string; + asset: string; + index: BigNumber; +} +export type UserIndexUpdatedEvent = TypedEvent< + [string, string, BigNumber], + UserIndexUpdatedEventObject +>; + +export type UserIndexUpdatedEventFilter = + TypedEventFilter; + +export interface StakedAaveV3 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: StakedAaveV3Interface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter, + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter, + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + CLAIM_HELPER_ROLE(overrides?: CallOverrides): Promise<[BigNumber]>; + + COOLDOWN_ADMIN_ROLE(overrides?: CallOverrides): Promise<[BigNumber]>; + + COOLDOWN_SECONDS(overrides?: CallOverrides): Promise<[BigNumber]>; + + DELEGATE_BY_TYPE_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + DISTRIBUTION_END(overrides?: CallOverrides): Promise<[BigNumber]>; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + + EIP712_REVISION(overrides?: CallOverrides): Promise<[string]>; + + EMISSION_MANAGER(overrides?: CallOverrides): Promise<[string]>; + + EXCHANGE_RATE_UNIT(overrides?: CallOverrides): Promise<[BigNumber]>; + + INITIAL_EXCHANGE_RATE(overrides?: CallOverrides): Promise<[BigNumber]>; + + LOWER_BOUND(overrides?: CallOverrides): Promise<[BigNumber]>; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + POWER_SCALE_FACTOR(overrides?: CallOverrides): Promise<[BigNumber]>; + + PRECISION(overrides?: CallOverrides): Promise<[number]>; + + REVISION(overrides?: CallOverrides): Promise<[BigNumber]>; + + REWARDS_VAULT(overrides?: CallOverrides): Promise<[string]>; + + REWARD_TOKEN(overrides?: CallOverrides): Promise<[string]>; + + SLASH_ADMIN_ROLE(overrides?: CallOverrides): Promise<[BigNumber]>; + + STAKED_TOKEN(overrides?: CallOverrides): Promise<[string]>; + + UNSTAKE_WINDOW(overrides?: CallOverrides): Promise<[BigNumber]>; + + _nonces(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, ): Promise; - "claimRewards(address,uint256)"( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } + assets( + arg0: string, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + emissionPerSecond: BigNumber; + lastUpdateTimestamp: BigNumber; + index: BigNumber; + } + >; + + balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + claimRewards( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, ): Promise; claimRewardsAndRedeem( - to: string, - claimAmount: BigNumberish, - redeemAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } + to: string, + claimAmount: BigNumberish, + redeemAmount: BigNumberish, + overrides?: Overrides & { from?: string }, ): Promise; - "claimRewardsAndRedeem(address,uint256,uint256)"( - to: string, - claimAmount: BigNumberish, - redeemAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } + claimRewardsAndRedeemOnBehalf( + from: string, + to: string, + claimAmount: BigNumberish, + redeemAmount: BigNumberish, + overrides?: Overrides & { from?: string }, ): Promise; - claimRewardsAndRedeemOnBehalf( - from: string, - to: string, - claimAmount: BigNumberish, - redeemAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } + claimRewardsAndStake( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, ): Promise; - "claimRewardsAndRedeemOnBehalf(address,address,uint256,uint256)"( - from: string, - to: string, - claimAmount: BigNumberish, - redeemAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } + claimRewardsAndStakeOnBehalf( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, ): Promise; - claimRewardsAndStake( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } + claimRewardsOnBehalf( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, ): Promise; - "claimRewardsAndStake(address,uint256)"( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } + claimRoleAdmin( + role: BigNumberish, + overrides?: Overrides & { from?: string }, ): Promise; - claimRewardsAndStakeOnBehalf( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } + configureAssets( + assetsConfigInput: DistributionTypes.AssetConfigInputStruct[], + overrides?: Overrides & { from?: string }, ): Promise; - "claimRewardsAndStakeOnBehalf(address,address,uint256)"( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } + cooldown( + overrides?: Overrides & { from?: string }, ): Promise; - claimRewardsOnBehalf( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } + cooldownOnBehalfOf( + from: string, + overrides?: Overrides & { from?: string }, ): Promise; - "claimRewardsOnBehalf(address,address,uint256)"( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } + decimals(overrides?: CallOverrides): Promise<[number]>; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string }, ): Promise; - cooldown( - overrides?: Overrides & { from?: string | Promise } + delegate( + delegatee: string, + overrides?: Overrides & { from?: string }, ): Promise; - "cooldown()"( - overrides?: Overrides & { from?: string | Promise } + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string }, ): Promise; - cooldownOnBehalfOf( - from: string, - overrides?: Overrides & { from?: string | Promise } + eip712Domain(overrides?: CallOverrides): Promise< + [string, string, string, BigNumber, string, string, BigNumber[]] & { + fields: string; + name: string; + version: string; + chainId: BigNumber; + verifyingContract: string; + salt: string; + extensions: BigNumber[]; + } + >; + + getAdmin(role: BigNumberish, overrides?: CallOverrides): Promise<[string]>; + + getCooldownSeconds(overrides?: CallOverrides): Promise<[BigNumber]>; + + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides, + ): Promise<[string]>; + + getDelegates( + delegator: string, + overrides?: CallOverrides, + ): Promise<[string, string]>; + + getExchangeRate(overrides?: CallOverrides): Promise<[BigNumber]>; + + getMaxSlashablePercentage(overrides?: CallOverrides): Promise<[BigNumber]>; + + getPendingAdmin( + role: BigNumberish, + overrides?: CallOverrides, + ): Promise<[string]>; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + getPowersCurrent( + user: string, + overrides?: CallOverrides, + ): Promise<[BigNumber, BigNumber]>; + + getTotalRewardsBalance( + staker: string, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + getUserAssetData( + user: string, + asset: string, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + ghoDebtToken(overrides?: CallOverrides): Promise<[string]>; + + inPostSlashingPeriod(overrides?: CallOverrides): Promise<[boolean]>; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + initialize( + overrides?: Overrides & { from?: string }, + ): Promise; + + metaDelegate( + delegator: string, + delegatee: string, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + metaDelegateByType( + delegator: string, + delegatee: string, + delegationType: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, ): Promise; - "cooldownOnBehalfOf(address)"( - from: string, - overrides?: Overrides & { from?: string | Promise } + name(overrides?: CallOverrides): Promise<[string]>; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + previewRedeem( + shares: BigNumberish, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + previewStake( + assets: BigNumberish, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + redeem( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + redeemOnBehalf( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + returnFunds( + amount: BigNumberish, + overrides?: Overrides & { from?: string }, ): Promise; + setCooldownSeconds( + cooldownSeconds: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + setMaxSlashablePercentage( + percentage: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + setPendingAdmin( + role: BigNumberish, + newPendingAdmin: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + settleSlashing( + overrides?: Overrides & { from?: string }, + ): Promise; + + slash( + destination: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + stake( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + stakeWithPermit( + amount: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + stakerRewardsToClaim( + arg0: string, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + stakersCooldowns( + arg0: string, + overrides?: CallOverrides, + ): Promise<[number, BigNumber] & { timestamp: number; amount: BigNumber }>; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + }; + + CLAIM_HELPER_ROLE(overrides?: CallOverrides): Promise; + + COOLDOWN_ADMIN_ROLE(overrides?: CallOverrides): Promise; + + COOLDOWN_SECONDS(overrides?: CallOverrides): Promise; + + DELEGATE_BY_TYPE_TYPEHASH(overrides?: CallOverrides): Promise; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise; + + DISTRIBUTION_END(overrides?: CallOverrides): Promise; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + EIP712_REVISION(overrides?: CallOverrides): Promise; + + EMISSION_MANAGER(overrides?: CallOverrides): Promise; + + EXCHANGE_RATE_UNIT(overrides?: CallOverrides): Promise; + + INITIAL_EXCHANGE_RATE(overrides?: CallOverrides): Promise; + + LOWER_BOUND(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + POWER_SCALE_FACTOR(overrides?: CallOverrides): Promise; + + PRECISION(overrides?: CallOverrides): Promise; + + REVISION(overrides?: CallOverrides): Promise; + + REWARDS_VAULT(overrides?: CallOverrides): Promise; + + REWARD_TOKEN(overrides?: CallOverrides): Promise; + + SLASH_ADMIN_ROLE(overrides?: CallOverrides): Promise; + + STAKED_TOKEN(overrides?: CallOverrides): Promise; + + UNSTAKE_WINDOW(overrides?: CallOverrides): Promise; + + _nonces(arg0: string, overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides, + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + assets( + arg0: string, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + emissionPerSecond: BigNumber; + lastUpdateTimestamp: BigNumber; + index: BigNumber; + } + >; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + claimRewards( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + claimRewardsAndRedeem( + to: string, + claimAmount: BigNumberish, + redeemAmount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + claimRewardsAndRedeemOnBehalf( + from: string, + to: string, + claimAmount: BigNumberish, + redeemAmount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + claimRewardsAndStake( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + claimRewardsAndStakeOnBehalf( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + claimRewardsOnBehalf( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + claimRoleAdmin( + role: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + configureAssets( + assetsConfigInput: DistributionTypes.AssetConfigInputStruct[], + overrides?: Overrides & { from?: string }, + ): Promise; + + cooldown( + overrides?: Overrides & { from?: string }, + ): Promise; + + cooldownOnBehalfOf( + from: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + eip712Domain(overrides?: CallOverrides): Promise< + [string, string, string, BigNumber, string, string, BigNumber[]] & { + fields: string; + name: string; + version: string; + chainId: BigNumber; + verifyingContract: string; + salt: string; + extensions: BigNumber[]; + } + >; + + getAdmin(role: BigNumberish, overrides?: CallOverrides): Promise; + + getCooldownSeconds(overrides?: CallOverrides): Promise; + + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getDelegates( + delegator: string, + overrides?: CallOverrides, + ): Promise<[string, string]>; + + getExchangeRate(overrides?: CallOverrides): Promise; + + getMaxSlashablePercentage(overrides?: CallOverrides): Promise; + + getPendingAdmin( + role: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getPowersCurrent( + user: string, + overrides?: CallOverrides, + ): Promise<[BigNumber, BigNumber]>; + + getTotalRewardsBalance( + staker: string, + overrides?: CallOverrides, + ): Promise; + + getUserAssetData( + user: string, + asset: string, + overrides?: CallOverrides, + ): Promise; + + ghoDebtToken(overrides?: CallOverrides): Promise; + + inPostSlashingPeriod(overrides?: CallOverrides): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + initialize( + overrides?: Overrides & { from?: string }, + ): Promise; + + metaDelegate( + delegator: string, + delegatee: string, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + metaDelegateByType( + delegator: string, + delegatee: string, + delegationType: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + name(overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + previewRedeem( + shares: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + previewStake( + assets: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + redeem( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + redeemOnBehalf( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + returnFunds( + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + setCooldownSeconds( + cooldownSeconds: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + setMaxSlashablePercentage( + percentage: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + setPendingAdmin( + role: BigNumberish, + newPendingAdmin: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + settleSlashing( + overrides?: Overrides & { from?: string }, + ): Promise; + + slash( + destination: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + stake( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + stakeWithPermit( + amount: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + stakerRewardsToClaim( + arg0: string, + overrides?: CallOverrides, + ): Promise; + + stakersCooldowns( + arg0: string, + overrides?: CallOverrides, + ): Promise<[number, BigNumber] & { timestamp: number; amount: BigNumber }>; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + callStatic: { + CLAIM_HELPER_ROLE(overrides?: CallOverrides): Promise; + + COOLDOWN_ADMIN_ROLE(overrides?: CallOverrides): Promise; + + COOLDOWN_SECONDS(overrides?: CallOverrides): Promise; + + DELEGATE_BY_TYPE_TYPEHASH(overrides?: CallOverrides): Promise; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise; + + DISTRIBUTION_END(overrides?: CallOverrides): Promise; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + EIP712_REVISION(overrides?: CallOverrides): Promise; + + EMISSION_MANAGER(overrides?: CallOverrides): Promise; + + EXCHANGE_RATE_UNIT(overrides?: CallOverrides): Promise; + + INITIAL_EXCHANGE_RATE(overrides?: CallOverrides): Promise; + + LOWER_BOUND(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + POWER_SCALE_FACTOR(overrides?: CallOverrides): Promise; + + PRECISION(overrides?: CallOverrides): Promise; + + REVISION(overrides?: CallOverrides): Promise; + + REWARDS_VAULT(overrides?: CallOverrides): Promise; + + REWARD_TOKEN(overrides?: CallOverrides): Promise; + + SLASH_ADMIN_ROLE(overrides?: CallOverrides): Promise; + + STAKED_TOKEN(overrides?: CallOverrides): Promise; + + UNSTAKE_WINDOW(overrides?: CallOverrides): Promise; + + _nonces(arg0: string, overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides, + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + assets( + arg0: string, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + emissionPerSecond: BigNumber; + lastUpdateTimestamp: BigNumber; + index: BigNumber; + } + >; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + claimRewards( + to: string, + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + claimRewardsAndRedeem( + to: string, + claimAmount: BigNumberish, + redeemAmount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + claimRewardsAndRedeemOnBehalf( + from: string, + to: string, + claimAmount: BigNumberish, + redeemAmount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + claimRewardsAndStake( + to: string, + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + claimRewardsAndStakeOnBehalf( + from: string, + to: string, + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + claimRewardsOnBehalf( + from: string, + to: string, + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + claimRoleAdmin( + role: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + configureAssets( + assetsConfigInput: DistributionTypes.AssetConfigInputStruct[], + overrides?: CallOverrides, + ): Promise; + + cooldown(overrides?: CallOverrides): Promise; + + cooldownOnBehalfOf(from: string, overrides?: CallOverrides): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + delegate(delegatee: string, overrides?: CallOverrides): Promise; + + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + eip712Domain(overrides?: CallOverrides): Promise< + [string, string, string, BigNumber, string, string, BigNumber[]] & { + fields: string; + name: string; + version: string; + chainId: BigNumber; + verifyingContract: string; + salt: string; + extensions: BigNumber[]; + } + >; + + getAdmin(role: BigNumberish, overrides?: CallOverrides): Promise; + getCooldownSeconds(overrides?: CallOverrides): Promise; - "getCooldownSeconds()"(overrides?: CallOverrides): Promise; + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getDelegates( + delegator: string, + overrides?: CallOverrides, + ): Promise<[string, string]>; getExchangeRate(overrides?: CallOverrides): Promise; - "getExchangeRate()"(overrides?: CallOverrides): Promise; + getMaxSlashablePercentage(overrides?: CallOverrides): Promise; + + getPendingAdmin( + role: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getPowersCurrent( + user: string, + overrides?: CallOverrides, + ): Promise<[BigNumber, BigNumber]>; + + getTotalRewardsBalance( + staker: string, + overrides?: CallOverrides, + ): Promise; + + getUserAssetData( + user: string, + asset: string, + overrides?: CallOverrides, + ): Promise; + + ghoDebtToken(overrides?: CallOverrides): Promise; + + inPostSlashingPeriod(overrides?: CallOverrides): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + initialize(overrides?: CallOverrides): Promise; + + metaDelegate( + delegator: string, + delegatee: string, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides, + ): Promise; + + metaDelegateByType( + delegator: string, + delegatee: string, + delegationType: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides, + ): Promise; + + name(overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides, + ): Promise; + + previewRedeem( + shares: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + previewStake( + assets: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + redeem( + to: string, + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + redeemOnBehalf( + from: string, + to: string, + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + returnFunds(amount: BigNumberish, overrides?: CallOverrides): Promise; + + setCooldownSeconds( + cooldownSeconds: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + setMaxSlashablePercentage( + percentage: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + setPendingAdmin( + role: BigNumberish, + newPendingAdmin: string, + overrides?: CallOverrides, + ): Promise; + + settleSlashing(overrides?: CallOverrides): Promise; + + slash( + destination: string, + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + stake( + to: string, + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + stakeWithPermit( + amount: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides, + ): Promise; + + stakerRewardsToClaim( + arg0: string, + overrides?: CallOverrides, + ): Promise; + + stakersCooldowns( + arg0: string, + overrides?: CallOverrides, + ): Promise<[number, BigNumber] & { timestamp: number; amount: BigNumber }>; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + }; + + filters: { + 'Approval(address,address,uint256)'( + owner?: string | null, + spender?: string | null, + value?: null, + ): ApprovalEventFilter; + Approval( + owner?: string | null, + spender?: string | null, + value?: null, + ): ApprovalEventFilter; + + 'AssetConfigUpdated(address,uint256)'( + asset?: string | null, + emission?: null, + ): AssetConfigUpdatedEventFilter; + AssetConfigUpdated( + asset?: string | null, + emission?: null, + ): AssetConfigUpdatedEventFilter; + + 'AssetIndexUpdated(address,uint256)'( + asset?: string | null, + index?: null, + ): AssetIndexUpdatedEventFilter; + AssetIndexUpdated( + asset?: string | null, + index?: null, + ): AssetIndexUpdatedEventFilter; + + 'Cooldown(address,uint256)'( + user?: string | null, + amount?: null, + ): CooldownEventFilter; + Cooldown(user?: string | null, amount?: null): CooldownEventFilter; + + 'CooldownSecondsChanged(uint256)'( + cooldownSeconds?: null, + ): CooldownSecondsChangedEventFilter; + CooldownSecondsChanged( + cooldownSeconds?: null, + ): CooldownSecondsChangedEventFilter; + + 'DelegateChanged(address,address,uint8)'( + delegator?: string | null, + delegatee?: string | null, + delegationType?: null, + ): DelegateChangedEventFilter; + DelegateChanged( + delegator?: string | null, + delegatee?: string | null, + delegationType?: null, + ): DelegateChangedEventFilter; + + 'EIP712DomainChanged()'(): EIP712DomainChangedEventFilter; + EIP712DomainChanged(): EIP712DomainChangedEventFilter; + + 'ExchangeRateChanged(uint216)'( + exchangeRate?: null, + ): ExchangeRateChangedEventFilter; + ExchangeRateChanged(exchangeRate?: null): ExchangeRateChangedEventFilter; + + 'FundsReturned(uint256)'(amount?: null): FundsReturnedEventFilter; + FundsReturned(amount?: null): FundsReturnedEventFilter; + + 'MaxSlashablePercentageChanged(uint256)'( + newPercentage?: null, + ): MaxSlashablePercentageChangedEventFilter; + MaxSlashablePercentageChanged( + newPercentage?: null, + ): MaxSlashablePercentageChangedEventFilter; + + 'PendingAdminChanged(address,uint256)'( + newPendingAdmin?: string | null, + role?: null, + ): PendingAdminChangedEventFilter; + PendingAdminChanged( + newPendingAdmin?: string | null, + role?: null, + ): PendingAdminChangedEventFilter; + + 'Redeem(address,address,uint256,uint256)'( + from?: string | null, + to?: string | null, + assets?: null, + shares?: null, + ): RedeemEventFilter; + Redeem( + from?: string | null, + to?: string | null, + assets?: null, + shares?: null, + ): RedeemEventFilter; + + 'RewardsAccrued(address,uint256)'( + user?: null, + amount?: null, + ): RewardsAccruedEventFilter; + RewardsAccrued(user?: null, amount?: null): RewardsAccruedEventFilter; + + 'RewardsClaimed(address,address,uint256)'( + from?: string | null, + to?: string | null, + amount?: null, + ): RewardsClaimedEventFilter; + RewardsClaimed( + from?: string | null, + to?: string | null, + amount?: null, + ): RewardsClaimedEventFilter; + + 'RoleClaimed(address,uint256)'( + newAdmin?: string | null, + role?: null, + ): RoleClaimedEventFilter; + RoleClaimed(newAdmin?: string | null, role?: null): RoleClaimedEventFilter; + + 'Slashed(address,uint256)'( + destination?: string | null, + amount?: null, + ): SlashedEventFilter; + Slashed(destination?: string | null, amount?: null): SlashedEventFilter; + + 'SlashingExitWindowDurationChanged(uint256)'( + windowSeconds?: null, + ): SlashingExitWindowDurationChangedEventFilter; + SlashingExitWindowDurationChanged( + windowSeconds?: null, + ): SlashingExitWindowDurationChangedEventFilter; + + 'SlashingSettled()'(): SlashingSettledEventFilter; + SlashingSettled(): SlashingSettledEventFilter; + + 'Staked(address,address,uint256,uint256)'( + from?: string | null, + to?: string | null, + assets?: null, + shares?: null, + ): StakedEventFilter; + Staked( + from?: string | null, + to?: string | null, + assets?: null, + shares?: null, + ): StakedEventFilter; + + 'Transfer(address,address,uint256)'( + from?: string | null, + to?: string | null, + value?: null, + ): TransferEventFilter; + Transfer( + from?: string | null, + to?: string | null, + value?: null, + ): TransferEventFilter; + + 'UserIndexUpdated(address,address,uint256)'( + user?: string | null, + asset?: string | null, + index?: null, + ): UserIndexUpdatedEventFilter; + UserIndexUpdated( + user?: string | null, + asset?: string | null, + index?: null, + ): UserIndexUpdatedEventFilter; + }; + + estimateGas: { + CLAIM_HELPER_ROLE(overrides?: CallOverrides): Promise; + + COOLDOWN_ADMIN_ROLE(overrides?: CallOverrides): Promise; + + COOLDOWN_SECONDS(overrides?: CallOverrides): Promise; + + DELEGATE_BY_TYPE_TYPEHASH(overrides?: CallOverrides): Promise; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise; + + DISTRIBUTION_END(overrides?: CallOverrides): Promise; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + EIP712_REVISION(overrides?: CallOverrides): Promise; + + EMISSION_MANAGER(overrides?: CallOverrides): Promise; + + EXCHANGE_RATE_UNIT(overrides?: CallOverrides): Promise; + + INITIAL_EXCHANGE_RATE(overrides?: CallOverrides): Promise; + + LOWER_BOUND(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; - getExchangeRateSnapshot( - index: BigNumberish, - overrides?: CallOverrides - ): Promise<[number, BigNumber] & { blockNumber: number; value: BigNumber }>; + POWER_SCALE_FACTOR(overrides?: CallOverrides): Promise; - "getExchangeRateSnapshot(uint32)"( - index: BigNumberish, - overrides?: CallOverrides - ): Promise<[number, BigNumber] & { blockNumber: number; value: BigNumber }>; + PRECISION(overrides?: CallOverrides): Promise; - getExchangeRateSnapshotsCount(overrides?: CallOverrides): Promise; + REVISION(overrides?: CallOverrides): Promise; - "getExchangeRateSnapshotsCount()"(overrides?: CallOverrides): Promise; + REWARDS_VAULT(overrides?: CallOverrides): Promise; + + REWARD_TOKEN(overrides?: CallOverrides): Promise; + + SLASH_ADMIN_ROLE(overrides?: CallOverrides): Promise; + + STAKED_TOKEN(overrides?: CallOverrides): Promise; + + UNSTAKE_WINDOW(overrides?: CallOverrides): Promise; + + _nonces(arg0: string, overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides, + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + assets(arg0: string, overrides?: CallOverrides): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + claimRewards( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + claimRewardsAndRedeem( + to: string, + claimAmount: BigNumberish, + redeemAmount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + claimRewardsAndRedeemOnBehalf( + from: string, + to: string, + claimAmount: BigNumberish, + redeemAmount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + claimRewardsAndStake( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + claimRewardsAndStakeOnBehalf( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + claimRewardsOnBehalf( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + claimRoleAdmin( + role: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + configureAssets( + assetsConfigInput: DistributionTypes.AssetConfigInputStruct[], + overrides?: Overrides & { from?: string }, + ): Promise; + + cooldown(overrides?: Overrides & { from?: string }): Promise; + + cooldownOnBehalfOf( + from: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + eip712Domain(overrides?: CallOverrides): Promise; + + getAdmin(role: BigNumberish, overrides?: CallOverrides): Promise; + + getCooldownSeconds(overrides?: CallOverrides): Promise; + + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getDelegates( + delegator: string, + overrides?: CallOverrides, + ): Promise; + + getExchangeRate(overrides?: CallOverrides): Promise; getMaxSlashablePercentage(overrides?: CallOverrides): Promise; - "getMaxSlashablePercentage()"(overrides?: CallOverrides): Promise; + getPendingAdmin( + role: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getPowersCurrent( + user: string, + overrides?: CallOverrides, + ): Promise; getTotalRewardsBalance( - staker: string, - overrides?: CallOverrides + staker: string, + overrides?: CallOverrides, ): Promise; - "getTotalRewardsBalance(address)"( - staker: string, - overrides?: CallOverrides + getUserAssetData( + user: string, + asset: string, + overrides?: CallOverrides, ): Promise; - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; + ghoDebtToken(overrides?: CallOverrides): Promise; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; + inPostSlashingPeriod(overrides?: CallOverrides): Promise; - previewRedeem( - shares: BigNumberish, - overrides?: CallOverrides + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string }, ): Promise; - "previewRedeem(uint256)"( - shares: BigNumberish, - overrides?: CallOverrides + initialize(overrides?: Overrides & { from?: string }): Promise; + + metaDelegate( + delegator: string, + delegatee: string, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, ): Promise; - previewStake( - assets: BigNumberish, - overrides?: CallOverrides + metaDelegateByType( + delegator: string, + delegatee: string, + delegationType: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, ): Promise; - "previewStake(uint256)"( - assets: BigNumberish, - overrides?: CallOverrides + name(overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, ): Promise; - redeem( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; + previewRedeem( + shares: BigNumberish, + overrides?: CallOverrides, + ): Promise; - "redeem(address,uint256)"( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; + previewStake( + assets: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + redeem( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; redeemOnBehalf( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; - "redeemOnBehalf(address,address,uint256)"( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; + returnFunds( + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; - stake( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; + setCooldownSeconds( + cooldownSeconds: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; - "stake(address,uint256)"( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; + setMaxSlashablePercentage( + percentage: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + setPendingAdmin( + role: BigNumberish, + newPendingAdmin: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + settleSlashing( + overrides?: Overrides & { from?: string }, + ): Promise; + + slash( + destination: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + stake( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; stakeWithPermit( - from: string, - amount: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; + amount: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; - "stakeWithPermit(address,uint256,uint256,uint8,bytes32,bytes32)"( - from: string, - amount: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; + stakerRewardsToClaim( + arg0: string, + overrides?: CallOverrides, + ): Promise; + + stakersCooldowns( + arg0: string, + overrides?: CallOverrides, + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + }; + + populateTransaction: { + CLAIM_HELPER_ROLE(overrides?: CallOverrides): Promise; + + COOLDOWN_ADMIN_ROLE( + overrides?: CallOverrides, + ): Promise; + + COOLDOWN_SECONDS(overrides?: CallOverrides): Promise; - callStatic: { - REWARD_TOKEN(overrides?: CallOverrides): Promise; - - 'REWARD_TOKEN()'(overrides?: CallOverrides): Promise; - - STAKED_TOKEN(overrides?: CallOverrides): Promise; - - 'STAKED_TOKEN()'(overrides?: CallOverrides): Promise; - - COOLDOWN_SECONDS(overrides?: CallOverrides): Promise; - - "COOLDOWN_SECONDS()"(overrides?: CallOverrides): Promise; - - claimRewards( - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - "claimRewards(address,uint256)"( - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - claimRewardsAndRedeem( - to: string, - claimAmount: BigNumberish, - redeemAmount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - "claimRewardsAndRedeem(address,uint256,uint256)"( - to: string, - claimAmount: BigNumberish, - redeemAmount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - claimRewardsAndRedeemOnBehalf( - from: string, - to: string, - claimAmount: BigNumberish, - redeemAmount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - "claimRewardsAndRedeemOnBehalf(address,address,uint256,uint256)"( - from: string, - to: string, - claimAmount: BigNumberish, - redeemAmount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - claimRewardsAndStake( - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - "claimRewardsAndStake(address,uint256)"( - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - claimRewardsAndStakeOnBehalf( - from: string, - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - "claimRewardsAndStakeOnBehalf(address,address,uint256)"( - from: string, - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - claimRewardsOnBehalf( - from: string, - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - "claimRewardsOnBehalf(address,address,uint256)"( - from: string, - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - cooldown(overrides?: CallOverrides): Promise; - - "cooldown()"(overrides?: CallOverrides): Promise; - - cooldownOnBehalfOf(from: string, overrides?: CallOverrides): Promise; - - "cooldownOnBehalfOf(address)"( - from: string, - overrides?: CallOverrides - ): Promise; - - getCooldownSeconds(overrides?: CallOverrides): Promise; - - "getCooldownSeconds()"(overrides?: CallOverrides): Promise; - - getExchangeRate(overrides?: CallOverrides): Promise; - - "getExchangeRate()"(overrides?: CallOverrides): Promise; - - getExchangeRateSnapshot( - index: BigNumberish, - overrides?: CallOverrides - ): Promise<[number, BigNumber] & { blockNumber: number; value: BigNumber }>; - - "getExchangeRateSnapshot(uint32)"( - index: BigNumberish, - overrides?: CallOverrides - ): Promise<[number, BigNumber] & { blockNumber: number; value: BigNumber }>; - - getExchangeRateSnapshotsCount(overrides?: CallOverrides): Promise; - - "getExchangeRateSnapshotsCount()"( - overrides?: CallOverrides - ): Promise; - - getMaxSlashablePercentage(overrides?: CallOverrides): Promise; - - "getMaxSlashablePercentage()"( - overrides?: CallOverrides - ): Promise; - - getTotalRewardsBalance( - staker: string, - overrides?: CallOverrides - ): Promise; - - "getTotalRewardsBalance(address)"( - staker: string, - overrides?: CallOverrides - ): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise; - - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise; - - previewRedeem( - shares: BigNumberish, - overrides?: CallOverrides - ): Promise; - - "previewRedeem(uint256)"( - shares: BigNumberish, - overrides?: CallOverrides - ): Promise; - - previewStake( - assets: BigNumberish, - overrides?: CallOverrides - ): Promise; - - "previewStake(uint256)"( - assets: BigNumberish, - overrides?: CallOverrides - ): Promise; - - redeem( - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - "redeem(address,uint256)"( - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - redeemOnBehalf( - from: string, - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - "redeemOnBehalf(address,address,uint256)"( - from: string, - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - "slash(address,uint256)"( - destination: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - stake( - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - "stake(address,uint256)"( - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - stakeWithPermit( - from: string, - amount: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise; - - "stakeWithPermit(address,uint256,uint256,uint8,bytes32,bytes32)"( - from: string, - amount: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - Cooldown( - user: string | null, - amount: null - ): TypedEventFilter< - [string, BigNumber], - { user: string; amount: BigNumber } - >; - - CooldownSecondsChanged( - cooldownSeconds: null - ): TypedEventFilter<[BigNumber], { cooldownSeconds: BigNumber }>; - - ExchangeRateChanged( - exchangeRate: null - ): TypedEventFilter<[BigNumber], { exchangeRate: BigNumber }>; - - FundsReturned( - amount: null - ): TypedEventFilter<[BigNumber], { amount: BigNumber }>; - - GHODebtTokenChanged( - newDebtToken: string | null - ): TypedEventFilter<[string], { newDebtToken: string }>; - - MaxSlashablePercentageChanged( - newPercentage: null - ): TypedEventFilter<[BigNumber], { newPercentage: BigNumber }>; - - Redeem( - from: string | null, - to: string | null, - assets: null, - shares: null - ): TypedEventFilter< - [string, string, BigNumber, BigNumber], - { from: string; to: string; assets: BigNumber; shares: BigNumber } - >; - - RewardsAccrued( - user: null, - amount: null - ): TypedEventFilter< - [string, BigNumber], - { user: string; amount: BigNumber } - >; - - RewardsClaimed( - from: string | null, - to: string | null, - amount: null - ): TypedEventFilter< - [string, string, BigNumber], - { from: string; to: string; amount: BigNumber } - >; - - Slashed( - destination: string | null, - amount: null - ): TypedEventFilter< - [string, BigNumber], - { destination: string; amount: BigNumber } - >; - - SlashingExitWindowDurationChanged( - windowSeconds: null - ): TypedEventFilter<[BigNumber], { windowSeconds: BigNumber }>; - - SlashingSettled(): TypedEventFilter<[], {}>; - - Staked( - from: string | null, - to: string | null, - assets: null, - shares: null - ): TypedEventFilter< - [string, string, BigNumber, BigNumber], - { from: string; to: string; assets: BigNumber; shares: BigNumber } - >; - }; - - estimateGas: { - REWARD_TOKEN(overrides?: CallOverrides): Promise; - - 'REWARD_TOKEN()'(overrides?: CallOverrides): Promise; - - STAKED_TOKEN(overrides?: CallOverrides): Promise; - - 'STAKED_TOKEN()'(overrides?: CallOverrides): Promise; - - - COOLDOWN_SECONDS(overrides?: CallOverrides): Promise; - - "COOLDOWN_SECONDS()"(overrides?: CallOverrides): Promise; - - claimRewards( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "claimRewards(address,uint256)"( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - claimRewardsAndRedeem( - to: string, - claimAmount: BigNumberish, - redeemAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "claimRewardsAndRedeem(address,uint256,uint256)"( - to: string, - claimAmount: BigNumberish, - redeemAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - claimRewardsAndRedeemOnBehalf( - from: string, - to: string, - claimAmount: BigNumberish, - redeemAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "claimRewardsAndRedeemOnBehalf(address,address,uint256,uint256)"( - from: string, - to: string, - claimAmount: BigNumberish, - redeemAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - claimRewardsAndStake( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "claimRewardsAndStake(address,uint256)"( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - claimRewardsAndStakeOnBehalf( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "claimRewardsAndStakeOnBehalf(address,address,uint256)"( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - claimRewardsOnBehalf( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "claimRewardsOnBehalf(address,address,uint256)"( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - cooldown( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "cooldown()"( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - cooldownOnBehalfOf( - from: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "cooldownOnBehalfOf(address)"( - from: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getCooldownSeconds(overrides?: CallOverrides): Promise; - - "getCooldownSeconds()"(overrides?: CallOverrides): Promise; - - getExchangeRate(overrides?: CallOverrides): Promise; - - "getExchangeRate()"(overrides?: CallOverrides): Promise; - - getExchangeRateSnapshot( - index: BigNumberish, - overrides?: CallOverrides - ): Promise; - - "getExchangeRateSnapshot(uint32)"( - index: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getExchangeRateSnapshotsCount( - overrides?: CallOverrides - ): Promise; - - "getExchangeRateSnapshotsCount()"( - overrides?: CallOverrides - ): Promise; - - getMaxSlashablePercentage(overrides?: CallOverrides): Promise; - - "getMaxSlashablePercentage()"( - overrides?: CallOverrides - ): Promise; - - getTotalRewardsBalance( - staker: string, - overrides?: CallOverrides - ): Promise; - - "getTotalRewardsBalance(address)"( - staker: string, - overrides?: CallOverrides - ): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - previewRedeem( - shares: BigNumberish, - overrides?: CallOverrides - ): Promise; - - "previewRedeem(uint256)"( - shares: BigNumberish, - overrides?: CallOverrides - ): Promise; - - previewStake( - assets: BigNumberish, - overrides?: CallOverrides - ): Promise; - - "previewStake(uint256)"( - assets: BigNumberish, - overrides?: CallOverrides - ): Promise; - - redeem( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "redeem(address,uint256)"( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - redeemOnBehalf( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "redeemOnBehalf(address,address,uint256)"( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - stake( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "stake(address,uint256)"( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - stakeWithPermit( - from: string, - amount: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "stakeWithPermit(address,uint256,uint256,uint8,bytes32,bytes32)"( - from: string, - amount: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - COOLDOWN_SECONDS(overrides?: CallOverrides): Promise; - - "COOLDOWN_SECONDS()"( - overrides?: CallOverrides - ): Promise; - - REWARD_TOKEN(overrides?: CallOverrides): Promise; - - 'REWARD_TOKEN()'(overrides?: CallOverrides): Promise; - - STAKED_TOKEN(overrides?: CallOverrides): Promise; - - 'STAKED_TOKEN()'(overrides?: CallOverrides): Promise; - - claimRewards( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "claimRewards(address,uint256)"( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - claimRewardsAndRedeem( - to: string, - claimAmount: BigNumberish, - redeemAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "claimRewardsAndRedeem(address,uint256,uint256)"( - to: string, - claimAmount: BigNumberish, - redeemAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - claimRewardsAndRedeemOnBehalf( - from: string, - to: string, - claimAmount: BigNumberish, - redeemAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "claimRewardsAndRedeemOnBehalf(address,address,uint256,uint256)"( - from: string, - to: string, - claimAmount: BigNumberish, - redeemAmount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - claimRewardsAndStake( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "claimRewardsAndStake(address,uint256)"( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - claimRewardsAndStakeOnBehalf( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "claimRewardsAndStakeOnBehalf(address,address,uint256)"( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - claimRewardsOnBehalf( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "claimRewardsOnBehalf(address,address,uint256)"( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - cooldown( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "cooldown()"( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - cooldownOnBehalfOf( - from: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "cooldownOnBehalfOf(address)"( - from: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getCooldownSeconds( - overrides?: CallOverrides - ): Promise; - - "getCooldownSeconds()"( - overrides?: CallOverrides - ): Promise; - - getExchangeRate(overrides?: CallOverrides): Promise; - - "getExchangeRate()"( - overrides?: CallOverrides - ): Promise; - - getExchangeRateSnapshot( - index: BigNumberish, - overrides?: CallOverrides - ): Promise; - - "getExchangeRateSnapshot(uint32)"( - index: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getExchangeRateSnapshotsCount( - overrides?: CallOverrides - ): Promise; - - "getExchangeRateSnapshotsCount()"( - overrides?: CallOverrides - ): Promise; - - getMaxSlashablePercentage( - overrides?: CallOverrides - ): Promise; - - "getMaxSlashablePercentage()"( - overrides?: CallOverrides - ): Promise; - - getTotalRewardsBalance( - staker: string, - overrides?: CallOverrides - ): Promise; - - "getTotalRewardsBalance(address)"( - staker: string, - overrides?: CallOverrides - ): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - previewRedeem( - shares: BigNumberish, - overrides?: CallOverrides - ): Promise; - - "previewRedeem(uint256)"( - shares: BigNumberish, - overrides?: CallOverrides - ): Promise; - - previewStake( - assets: BigNumberish, - overrides?: CallOverrides - ): Promise; - - "previewStake(uint256)"( - assets: BigNumberish, - overrides?: CallOverrides - ): Promise; - - redeem( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "redeem(address,uint256)"( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - redeemOnBehalf( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "redeemOnBehalf(address,address,uint256)"( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - stake( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "stake(address,uint256)"( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - stakeWithPermit( - from: string, - amount: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - "stakeWithPermit(address,uint256,uint256,uint8,bytes32,bytes32)"( - from: string, - amount: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; + DELEGATE_BY_TYPE_TYPEHASH( + overrides?: CallOverrides, + ): Promise; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise; + + DISTRIBUTION_END(overrides?: CallOverrides): Promise; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + EIP712_REVISION(overrides?: CallOverrides): Promise; + + EMISSION_MANAGER(overrides?: CallOverrides): Promise; + + EXCHANGE_RATE_UNIT( + overrides?: CallOverrides, + ): Promise; + + INITIAL_EXCHANGE_RATE( + overrides?: CallOverrides, + ): Promise; + + LOWER_BOUND(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + POWER_SCALE_FACTOR( + overrides?: CallOverrides, + ): Promise; + + PRECISION(overrides?: CallOverrides): Promise; + + REVISION(overrides?: CallOverrides): Promise; + + REWARDS_VAULT(overrides?: CallOverrides): Promise; + + REWARD_TOKEN(overrides?: CallOverrides): Promise; + + SLASH_ADMIN_ROLE(overrides?: CallOverrides): Promise; + + STAKED_TOKEN(overrides?: CallOverrides): Promise; + + UNSTAKE_WINDOW(overrides?: CallOverrides): Promise; + + _nonces( + arg0: string, + overrides?: CallOverrides, + ): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides, + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + assets( + arg0: string, + overrides?: CallOverrides, + ): Promise; + + balanceOf( + account: string, + overrides?: CallOverrides, + ): Promise; + + claimRewards( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + claimRewardsAndRedeem( + to: string, + claimAmount: BigNumberish, + redeemAmount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + claimRewardsAndRedeemOnBehalf( + from: string, + to: string, + claimAmount: BigNumberish, + redeemAmount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + claimRewardsAndStake( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + claimRewardsAndStakeOnBehalf( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + claimRewardsOnBehalf( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + claimRoleAdmin( + role: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + configureAssets( + assetsConfigInput: DistributionTypes.AssetConfigInputStruct[], + overrides?: Overrides & { from?: string }, + ): Promise; + + cooldown( + overrides?: Overrides & { from?: string }, + ): Promise; + + cooldownOnBehalfOf( + from: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + eip712Domain(overrides?: CallOverrides): Promise; + + getAdmin( + role: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getCooldownSeconds( + overrides?: CallOverrides, + ): Promise; + + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getDelegates( + delegator: string, + overrides?: CallOverrides, + ): Promise; + + getExchangeRate(overrides?: CallOverrides): Promise; + + getMaxSlashablePercentage( + overrides?: CallOverrides, + ): Promise; + + getPendingAdmin( + role: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getPowersCurrent( + user: string, + overrides?: CallOverrides, + ): Promise; + + getTotalRewardsBalance( + staker: string, + overrides?: CallOverrides, + ): Promise; + + getUserAssetData( + user: string, + asset: string, + overrides?: CallOverrides, + ): Promise; + + ghoDebtToken(overrides?: CallOverrides): Promise; + + inPostSlashingPeriod( + overrides?: CallOverrides, + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + initialize( + overrides?: Overrides & { from?: string }, + ): Promise; + + metaDelegate( + delegator: string, + delegatee: string, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + metaDelegateByType( + delegator: string, + delegatee: string, + delegationType: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + name(overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + previewRedeem( + shares: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + previewStake( + assets: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + redeem( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + redeemOnBehalf( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + returnFunds( + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + setCooldownSeconds( + cooldownSeconds: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + setMaxSlashablePercentage( + percentage: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + setPendingAdmin( + role: BigNumberish, + newPendingAdmin: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + settleSlashing( + overrides?: Overrides & { from?: string }, + ): Promise; + + slash( + destination: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + stake( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + stakeWithPermit( + amount: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string }, + ): Promise; + + stakerRewardsToClaim( + arg0: string, + overrides?: CallOverrides, + ): Promise; + + stakersCooldowns( + arg0: string, + overrides?: CallOverrides, + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + transferFrom( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + }; } diff --git a/packages/contract-helpers/src/staking-contract/typechain/IStakedAaveV3__factory.ts b/packages/contract-helpers/src/staking-contract/typechain/IStakedAaveV3__factory.ts index af231f36..49892bce 100644 --- a/packages/contract-helpers/src/staking-contract/typechain/IStakedAaveV3__factory.ts +++ b/packages/contract-helpers/src/staking-contract/typechain/IStakedAaveV3__factory.ts @@ -1,820 +1,1102 @@ /* Autogenerated file. Do not edit manually. */ /* eslint-disable */ -import { Contract, Signer } from "ethers"; -import { Provider } from "@ethersproject/providers"; - -import type { IStakedAaveV3 } from "./IStakedAaveV3"; - -export class IStakedAaveV3__factory { - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IStakedAaveV3 { - return new Contract(address, _abi, signerOrProvider) as IStakedAaveV3; - } -} +import { Contract, Signer, utils } from 'ethers'; +import type { Provider } from '@ethersproject/providers'; +import type { StakedAaveV3, StakedAaveV3Interface } from './IStakedAaveV3'; const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "user", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "Cooldown", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "cooldownSeconds", - type: "uint256", - }, - ], - name: "CooldownSecondsChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint216", - name: "exchangeRate", - type: "uint216", - }, - ], - name: "ExchangeRateChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "FundsReturned", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newDebtToken", - type: "address", - }, - ], - name: "GHODebtTokenChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "newPercentage", - type: "uint256", - }, - ], - name: "MaxSlashablePercentageChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "assets", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "shares", - type: "uint256", - }, - ], - name: "Redeem", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "user", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "RewardsAccrued", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "RewardsClaimed", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "destination", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "Slashed", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "windowSeconds", - type: "uint256", - }, - ], - name: "SlashingExitWindowDurationChanged", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "SlashingSettled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "assets", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "shares", - type: "uint256", - }, - ], - name: "Staked", - type: "event", - }, - { - inputs: [], - name: 'REWARD_TOKEN', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'STAKED_TOKEN', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: "COOLDOWN_SECONDS", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "claimRewards", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "claimAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "redeemAmount", - type: "uint256", - }, - ], - name: "claimRewardsAndRedeem", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "claimAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "redeemAmount", - type: "uint256", - }, - ], - name: "claimRewardsAndRedeemOnBehalf", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "claimRewardsAndStake", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "claimRewardsAndStakeOnBehalf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "claimRewardsOnBehalf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, + { + inputs: [ + { internalType: 'contract IERC20', name: 'stakedToken', type: 'address' }, + { internalType: 'contract IERC20', name: 'rewardToken', type: 'address' }, + { internalType: 'uint256', name: 'unstakeWindow', type: 'uint256' }, + { internalType: 'address', name: 'rewardsVault', type: 'address' }, + { internalType: 'address', name: 'emissionManager', type: 'address' }, + { + internalType: 'uint128', + name: 'distributionDuration', + type: 'uint128', + }, + ], + stateMutability: 'nonpayable', + type: 'constructor', + }, + { inputs: [], name: 'ECDSAInvalidSignature', type: 'error' }, + { + inputs: [{ internalType: 'uint256', name: 'length', type: 'uint256' }], + name: 'ECDSAInvalidSignatureLength', + type: 'error', + }, + { + inputs: [{ internalType: 'bytes32', name: 's', type: 'bytes32' }], + name: 'ECDSAInvalidSignatureS', + type: 'error', + }, + { inputs: [], name: 'InvalidShortString', type: 'error' }, + { + inputs: [{ internalType: 'string', name: 'str', type: 'string' }], + name: 'StringTooLong', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + ], + name: 'Approval', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'asset', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'emission', + type: 'uint256', + }, + ], + name: 'AssetConfigUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'asset', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'index', + type: 'uint256', + }, + ], + name: 'AssetIndexUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'address', name: 'user', type: 'address' }, + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'Cooldown', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'cooldownSeconds', + type: 'uint256', + }, + ], + name: 'CooldownSecondsChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'delegator', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'delegatee', + type: 'address', + }, + { + indexed: false, + internalType: + 'enum IGovernancePowerDelegationToken.GovernancePowerType', + name: 'delegationType', + type: 'uint8', + }, + ], + name: 'DelegateChanged', + type: 'event', + }, + { anonymous: false, inputs: [], name: 'EIP712DomainChanged', type: 'event' }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint216', + name: 'exchangeRate', + type: 'uint216', + }, + ], + name: 'ExchangeRateChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'FundsReturned', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'newPercentage', + type: 'uint256', + }, + ], + name: 'MaxSlashablePercentageChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'newPendingAdmin', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'role', + type: 'uint256', + }, + ], + name: 'PendingAdminChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'address', name: 'from', type: 'address' }, + { indexed: true, internalType: 'address', name: 'to', type: 'address' }, + { + indexed: false, + internalType: 'uint256', + name: 'assets', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'shares', + type: 'uint256', + }, + ], + name: 'Redeem', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'user', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'RewardsAccrued', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'address', name: 'from', type: 'address' }, + { indexed: true, internalType: 'address', name: 'to', type: 'address' }, + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'RewardsClaimed', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'newAdmin', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'role', + type: 'uint256', + }, + ], + name: 'RoleClaimed', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'destination', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'Slashed', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'windowSeconds', + type: 'uint256', + }, + ], + name: 'SlashingExitWindowDurationChanged', + type: 'event', + }, + { anonymous: false, inputs: [], name: 'SlashingSettled', type: 'event' }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'address', name: 'from', type: 'address' }, + { indexed: true, internalType: 'address', name: 'to', type: 'address' }, + { + indexed: false, + internalType: 'uint256', + name: 'assets', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'shares', + type: 'uint256', + }, + ], + name: 'Staked', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'address', name: 'from', type: 'address' }, + { indexed: true, internalType: 'address', name: 'to', type: 'address' }, + { + indexed: false, + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + ], + name: 'Transfer', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'address', name: 'user', type: 'address' }, + { + indexed: true, + internalType: 'address', + name: 'asset', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'index', + type: 'uint256', + }, + ], + name: 'UserIndexUpdated', + type: 'event', + }, + { + inputs: [], + name: 'CLAIM_HELPER_ROLE', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'COOLDOWN_ADMIN_ROLE', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'COOLDOWN_SECONDS', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'DELEGATE_BY_TYPE_TYPEHASH', + outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'DELEGATE_TYPEHASH', + outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'DISTRIBUTION_END', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'DOMAIN_SEPARATOR', + outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'EIP712_REVISION', + outputs: [{ internalType: 'bytes', name: '', type: 'bytes' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'EMISSION_MANAGER', + outputs: [{ internalType: 'address', name: '', type: 'address' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'EXCHANGE_RATE_UNIT', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'INITIAL_EXCHANGE_RATE', + outputs: [{ internalType: 'uint216', name: '', type: 'uint216' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'LOWER_BOUND', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'PERMIT_TYPEHASH', + outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'POWER_SCALE_FACTOR', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'PRECISION', + outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'REVISION', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [], + name: 'REWARDS_VAULT', + outputs: [{ internalType: 'address', name: '', type: 'address' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'REWARD_TOKEN', + outputs: [{ internalType: 'contract IERC20', name: '', type: 'address' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'SLASH_ADMIN_ROLE', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'STAKED_TOKEN', + outputs: [{ internalType: 'contract IERC20', name: '', type: 'address' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'UNSTAKE_WINDOW', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [{ internalType: 'address', name: '', type: 'address' }], + name: '_nonces', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'owner', type: 'address' }, + { internalType: 'address', name: 'spender', type: 'address' }, + ], + name: 'allowance', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'spender', type: 'address' }, + { internalType: 'uint256', name: 'amount', type: 'uint256' }, + ], + name: 'approve', + outputs: [{ internalType: 'bool', name: '', type: 'bool' }], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [{ internalType: 'address', name: '', type: 'address' }], + name: 'assets', + outputs: [ + { internalType: 'uint128', name: 'emissionPerSecond', type: 'uint128' }, + { internalType: 'uint128', name: 'lastUpdateTimestamp', type: 'uint128' }, + { internalType: 'uint256', name: 'index', type: 'uint256' }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [{ internalType: 'address', name: 'account', type: 'address' }], + name: 'balanceOf', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'to', type: 'address' }, + { internalType: 'uint256', name: 'amount', type: 'uint256' }, + ], + name: 'claimRewards', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'to', type: 'address' }, + { internalType: 'uint256', name: 'claimAmount', type: 'uint256' }, + { internalType: 'uint256', name: 'redeemAmount', type: 'uint256' }, + ], + name: 'claimRewardsAndRedeem', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'from', type: 'address' }, + { internalType: 'address', name: 'to', type: 'address' }, + { internalType: 'uint256', name: 'claimAmount', type: 'uint256' }, + { internalType: 'uint256', name: 'redeemAmount', type: 'uint256' }, + ], + name: 'claimRewardsAndRedeemOnBehalf', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'to', type: 'address' }, + { internalType: 'uint256', name: 'amount', type: 'uint256' }, + ], + name: 'claimRewardsAndStake', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'from', type: 'address' }, + { internalType: 'address', name: 'to', type: 'address' }, + { internalType: 'uint256', name: 'amount', type: 'uint256' }, + ], + name: 'claimRewardsAndStakeOnBehalf', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'from', type: 'address' }, + { internalType: 'address', name: 'to', type: 'address' }, + { internalType: 'uint256', name: 'amount', type: 'uint256' }, + ], + name: 'claimRewardsOnBehalf', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [{ internalType: 'uint256', name: 'role', type: 'uint256' }], + name: 'claimRoleAdmin', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + components: [ + { + internalType: 'uint128', + name: 'emissionPerSecond', + type: 'uint128', + }, + { internalType: 'uint256', name: 'totalStaked', type: 'uint256' }, + { internalType: 'address', name: 'underlyingAsset', type: 'address' }, ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "cooldown", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - ], - name: "cooldownOnBehalfOf", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "getCooldownSeconds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getExchangeRate", - outputs: [ - { - internalType: "uint216", - name: "", - type: "uint216", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint32", - name: "index", - type: "uint32", - }, - ], - name: "getExchangeRateSnapshot", - outputs: [ - { - components: [ - { - internalType: "uint40", - name: "blockNumber", - type: "uint40", - }, - { - internalType: "uint216", - name: "value", - type: "uint216", - }, - ], - internalType: "struct IStakedAaveV3.ExchangeRateSnapshot", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getExchangeRateSnapshotsCount", - outputs: [ - { - internalType: "uint32", - name: "", - type: "uint32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getMaxSlashablePercentage", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "staker", - type: "address", - }, - ], - name: "getTotalRewardsBalance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "permit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "shares", - type: "uint256", - }, - ], - name: "previewRedeem", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "assets", - type: "uint256", - }, - ], - name: "previewStake", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "redeem", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "redeemOnBehalf", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "returnFunds", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "cooldownSeconds", - type: "uint256", - }, - ], - name: "setCooldownSeconds", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IGhoVariableDebtTokenTransferHook", - name: "newGHODebtToken", - type: "address", - }, - ], - name: "setGHODebtToken", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "percentage", - type: "uint256", - }, - ], - name: "setMaxSlashablePercentage", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "settleSlashing", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "destination", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "slash", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "stake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "stakeWithPermit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; + internalType: 'struct DistributionTypes.AssetConfigInput[]', + name: 'assetsConfigInput', + type: 'tuple[]', + }, + ], + name: 'configureAssets', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'cooldown', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [{ internalType: 'address', name: 'from', type: 'address' }], + name: 'cooldownOnBehalfOf', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'decimals', + outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'spender', type: 'address' }, + { internalType: 'uint256', name: 'subtractedValue', type: 'uint256' }, + ], + name: 'decreaseAllowance', + outputs: [{ internalType: 'bool', name: '', type: 'bool' }], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [{ internalType: 'address', name: 'delegatee', type: 'address' }], + name: 'delegate', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'delegatee', type: 'address' }, + { + internalType: + 'enum IGovernancePowerDelegationToken.GovernancePowerType', + name: 'delegationType', + type: 'uint8', + }, + ], + name: 'delegateByType', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'eip712Domain', + outputs: [ + { internalType: 'bytes1', name: 'fields', type: 'bytes1' }, + { internalType: 'string', name: 'name', type: 'string' }, + { internalType: 'string', name: 'version', type: 'string' }, + { internalType: 'uint256', name: 'chainId', type: 'uint256' }, + { internalType: 'address', name: 'verifyingContract', type: 'address' }, + { internalType: 'bytes32', name: 'salt', type: 'bytes32' }, + { internalType: 'uint256[]', name: 'extensions', type: 'uint256[]' }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [{ internalType: 'uint256', name: 'role', type: 'uint256' }], + name: 'getAdmin', + outputs: [{ internalType: 'address', name: '', type: 'address' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'getCooldownSeconds', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'delegator', type: 'address' }, + { + internalType: + 'enum IGovernancePowerDelegationToken.GovernancePowerType', + name: 'delegationType', + type: 'uint8', + }, + ], + name: 'getDelegateeByType', + outputs: [{ internalType: 'address', name: '', type: 'address' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [{ internalType: 'address', name: 'delegator', type: 'address' }], + name: 'getDelegates', + outputs: [ + { internalType: 'address', name: '', type: 'address' }, + { internalType: 'address', name: '', type: 'address' }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'getExchangeRate', + outputs: [{ internalType: 'uint216', name: '', type: 'uint216' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'getMaxSlashablePercentage', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [{ internalType: 'uint256', name: 'role', type: 'uint256' }], + name: 'getPendingAdmin', + outputs: [{ internalType: 'address', name: '', type: 'address' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'user', type: 'address' }, + { + internalType: + 'enum IGovernancePowerDelegationToken.GovernancePowerType', + name: 'delegationType', + type: 'uint8', + }, + ], + name: 'getPowerCurrent', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [{ internalType: 'address', name: 'user', type: 'address' }], + name: 'getPowersCurrent', + outputs: [ + { internalType: 'uint256', name: '', type: 'uint256' }, + { internalType: 'uint256', name: '', type: 'uint256' }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [{ internalType: 'address', name: 'staker', type: 'address' }], + name: 'getTotalRewardsBalance', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'user', type: 'address' }, + { internalType: 'address', name: 'asset', type: 'address' }, + ], + name: 'getUserAssetData', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'ghoDebtToken', + outputs: [ + { + internalType: 'contract IGhoVariableDebtTokenTransferHook', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'inPostSlashingPeriod', + outputs: [{ internalType: 'bool', name: '', type: 'bool' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'spender', type: 'address' }, + { internalType: 'uint256', name: 'addedValue', type: 'uint256' }, + ], + name: 'increaseAllowance', + outputs: [{ internalType: 'bool', name: '', type: 'bool' }], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'initialize', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'delegator', type: 'address' }, + { internalType: 'address', name: 'delegatee', type: 'address' }, + { internalType: 'uint256', name: 'deadline', type: 'uint256' }, + { internalType: 'uint8', name: 'v', type: 'uint8' }, + { internalType: 'bytes32', name: 'r', type: 'bytes32' }, + { internalType: 'bytes32', name: 's', type: 'bytes32' }, + ], + name: 'metaDelegate', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'delegator', type: 'address' }, + { internalType: 'address', name: 'delegatee', type: 'address' }, + { + internalType: + 'enum IGovernancePowerDelegationToken.GovernancePowerType', + name: 'delegationType', + type: 'uint8', + }, + { internalType: 'uint256', name: 'deadline', type: 'uint256' }, + { internalType: 'uint8', name: 'v', type: 'uint8' }, + { internalType: 'bytes32', name: 'r', type: 'bytes32' }, + { internalType: 'bytes32', name: 's', type: 'bytes32' }, + ], + name: 'metaDelegateByType', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'name', + outputs: [{ internalType: 'string', name: '', type: 'string' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'owner', type: 'address' }, + { internalType: 'address', name: 'spender', type: 'address' }, + { internalType: 'uint256', name: 'value', type: 'uint256' }, + { internalType: 'uint256', name: 'deadline', type: 'uint256' }, + { internalType: 'uint8', name: 'v', type: 'uint8' }, + { internalType: 'bytes32', name: 'r', type: 'bytes32' }, + { internalType: 'bytes32', name: 's', type: 'bytes32' }, + ], + name: 'permit', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [{ internalType: 'uint256', name: 'shares', type: 'uint256' }], + name: 'previewRedeem', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [{ internalType: 'uint256', name: 'assets', type: 'uint256' }], + name: 'previewStake', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'to', type: 'address' }, + { internalType: 'uint256', name: 'amount', type: 'uint256' }, + ], + name: 'redeem', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'from', type: 'address' }, + { internalType: 'address', name: 'to', type: 'address' }, + { internalType: 'uint256', name: 'amount', type: 'uint256' }, + ], + name: 'redeemOnBehalf', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [{ internalType: 'uint256', name: 'amount', type: 'uint256' }], + name: 'returnFunds', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'uint256', name: 'cooldownSeconds', type: 'uint256' }, + ], + name: 'setCooldownSeconds', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [{ internalType: 'uint256', name: 'percentage', type: 'uint256' }], + name: 'setMaxSlashablePercentage', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'uint256', name: 'role', type: 'uint256' }, + { internalType: 'address', name: 'newPendingAdmin', type: 'address' }, + ], + name: 'setPendingAdmin', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'settleSlashing', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'destination', type: 'address' }, + { internalType: 'uint256', name: 'amount', type: 'uint256' }, + ], + name: 'slash', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'to', type: 'address' }, + { internalType: 'uint256', name: 'amount', type: 'uint256' }, + ], + name: 'stake', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'uint256', name: 'amount', type: 'uint256' }, + { internalType: 'uint256', name: 'deadline', type: 'uint256' }, + { internalType: 'uint8', name: 'v', type: 'uint8' }, + { internalType: 'bytes32', name: 'r', type: 'bytes32' }, + { internalType: 'bytes32', name: 's', type: 'bytes32' }, + ], + name: 'stakeWithPermit', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [{ internalType: 'address', name: '', type: 'address' }], + name: 'stakerRewardsToClaim', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [{ internalType: 'address', name: '', type: 'address' }], + name: 'stakersCooldowns', + outputs: [ + { internalType: 'uint40', name: 'timestamp', type: 'uint40' }, + { internalType: 'uint216', name: 'amount', type: 'uint216' }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'symbol', + outputs: [{ internalType: 'string', name: '', type: 'string' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'totalSupply', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'to', type: 'address' }, + { internalType: 'uint256', name: 'amount', type: 'uint256' }, + ], + name: 'transfer', + outputs: [{ internalType: 'bool', name: '', type: 'bool' }], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'from', type: 'address' }, + { internalType: 'address', name: 'to', type: 'address' }, + { internalType: 'uint256', name: 'amount', type: 'uint256' }, + ], + name: 'transferFrom', + outputs: [{ internalType: 'bool', name: '', type: 'bool' }], + stateMutability: 'nonpayable', + type: 'function', + }, +] as const; + +export class StakedAaveV3__factory { + static readonly abi = _abi; + static createInterface(): StakedAaveV3Interface { + return new utils.Interface(_abi) as StakedAaveV3Interface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider, + ): StakedAaveV3 { + return new Contract(address, _abi, signerOrProvider) as StakedAaveV3; + } +}