diff --git a/packages/contract-helpers/CHANGELOG.md b/packages/contract-helpers/CHANGELOG.md index f23fbc8b..63875950 100644 --- a/packages/contract-helpers/CHANGELOG.md +++ b/packages/contract-helpers/CHANGELOG.md @@ -1,57 +1,38 @@ # Change Log -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +All notable changes to this project will be documented in this file. See +[Conventional Commits](https://conventionalcommits.org) for commit guidelines. # 1.24.0 (2024-02-05) - ### Features -* abpt v2 migration ([#573](https://github.com/aave/aave-utilities/issues/573)) ([75bb4c0](https://github.com/aave/aave-utilities/commit/75bb4c038ea10b8faf42630a7fb580e7317623b8)) - - - - +- abpt v2 migration ([#573](https://github.com/aave/aave-utilities/issues/573)) + ([75bb4c0](https://github.com/aave/aave-utilities/commit/75bb4c038ea10b8faf42630a7fb580e7317623b8)) ## 1.23.1 (2024-01-24) **Note:** Version bump only for package @aave/contract-helpers - - - - # 1.23.0 (2024-01-19) - ### Features -* add bnb ([#571](https://github.com/aave/aave-utilities/issues/571)) ([5b92d16](https://github.com/aave/aave-utilities/commit/5b92d16a39dfb47e0cae95fd3480863b8f9afc75)) - - - - +- add bnb ([#571](https://github.com/aave/aave-utilities/issues/571)) + ([5b92d16](https://github.com/aave/aave-utilities/commit/5b92d16a39dfb47e0cae95fd3480863b8f9afc75)) # 1.22.0 (2024-01-18) - ### Features -* gov v3 ([#564](https://github.com/aave/aave-utilities/issues/564)) ([335588e](https://github.com/aave/aave-utilities/commit/335588e2e04056b631a47b1ede50594baebd158e)), closes [#567](https://github.com/aave/aave-utilities/issues/567) - - - - +- gov v3 ([#564](https://github.com/aave/aave-utilities/issues/564)) + ([335588e](https://github.com/aave/aave-utilities/commit/335588e2e04056b631a47b1ede50594baebd158e)), + closes [#567](https://github.com/aave/aave-utilities/issues/567) ## 1.21.1 (2023-11-21) **Note:** Version bump only for package @aave/contract-helpers - - - - # Change Log All notable changes to this project will be documented in this file. See @@ -59,14 +40,11 @@ All notable changes to this project will be documented in this file. See # 1.21.0 (2023-10-04) - ### Features -* updated debt switch interface ([#559](https://github.com/aave/aave-utilities/issues/559)) ([b108c62](https://github.com/aave/aave-utilities/commit/b108c620cf0e3e446840c166b660695ebd66563b)) - - - - +- updated debt switch interface + ([#559](https://github.com/aave/aave-utilities/issues/559)) + ([b108c62](https://github.com/aave/aave-utilities/commit/b108c620cf0e3e446840c166b660695ebd66563b)) # 1.20.0 (2023-08-22) diff --git a/packages/contract-helpers/src/governance-v3/typechain/GovernanceDataHelper.d.ts b/packages/contract-helpers/src/governance-v3/typechain/GovernanceDataHelper.d.ts index 9f519677..da07dd71 100644 --- a/packages/contract-helpers/src/governance-v3/typechain/GovernanceDataHelper.d.ts +++ b/packages/contract-helpers/src/governance-v3/typechain/GovernanceDataHelper.d.ts @@ -9,15 +9,15 @@ import type { PopulatedTransaction, Signer, utils, -} from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; +} from 'ethers'; +import type { FunctionFragment, Result } from '@ethersproject/abi'; +import type { Listener, Provider } from '@ethersproject/providers'; import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, -} from "./common"; +} from './common'; export declare namespace IGovernanceCore { export type VotingConfigStruct = { @@ -33,7 +33,7 @@ export declare namespace IGovernanceCore { number, BigNumber, BigNumber, - BigNumber + BigNumber, ] & { coolDownBeforeVotingStart: number; votingDuration: number; @@ -75,7 +75,7 @@ export declare namespace IGovernanceCore { BigNumber, BigNumber, BigNumber, - PayloadsControllerUtils.PayloadStructOutput[] + PayloadsControllerUtils.PayloadStructOutput[], ] & { state: number; accessLevel: number; @@ -103,7 +103,7 @@ export declare namespace IGovernanceDataHelper { export type VotingConfigStructOutput = [ number, - IGovernanceCore.VotingConfigStructOutput + IGovernanceCore.VotingConfigStructOutput, ] & { accessLevel: number; config: IGovernanceCore.VotingConfigStructOutput }; export type ConstantsStruct = { @@ -119,7 +119,7 @@ export declare namespace IGovernanceDataHelper { BigNumber, BigNumber, BigNumber, - BigNumber + BigNumber, ] & { votingConfigs: IGovernanceDataHelper.VotingConfigStructOutput[]; precisionDivider: BigNumber; @@ -137,7 +137,7 @@ export declare namespace IGovernanceDataHelper { export type ProposalStructOutput = [ BigNumber, BigNumber, - IGovernanceCore.ProposalStructOutput + IGovernanceCore.ProposalStructOutput, ] & { id: BigNumber; votingChainId: BigNumber; @@ -183,42 +183,42 @@ export declare namespace PayloadsControllerUtils { export interface GovernanceDataHelperInterface extends utils.Interface { functions: { - "getConstants(address,uint8[])": FunctionFragment; - "getProposalsData(address,uint256,uint256,uint256)": FunctionFragment; - "getRepresentationData(address,address,uint256[])": FunctionFragment; + 'getConstants(address,uint8[])': FunctionFragment; + 'getProposalsData(address,uint256,uint256,uint256)': FunctionFragment; + 'getRepresentationData(address,address,uint256[])': FunctionFragment; }; getFunction( nameOrSignatureOrTopic: - | "getConstants" - | "getProposalsData" - | "getRepresentationData" + | 'getConstants' + | 'getProposalsData' + | 'getRepresentationData', ): FunctionFragment; encodeFunctionData( - functionFragment: "getConstants", - values: [string, BigNumberish[]] + functionFragment: 'getConstants', + values: [string, BigNumberish[]], ): string; encodeFunctionData( - functionFragment: "getProposalsData", - values: [string, BigNumberish, BigNumberish, BigNumberish] + functionFragment: 'getProposalsData', + values: [string, BigNumberish, BigNumberish, BigNumberish], ): string; encodeFunctionData( - functionFragment: "getRepresentationData", - values: [string, string, BigNumberish[]] + functionFragment: 'getRepresentationData', + values: [string, string, BigNumberish[]], ): string; decodeFunctionResult( - functionFragment: "getConstants", - data: BytesLike + functionFragment: 'getConstants', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "getProposalsData", - data: BytesLike + functionFragment: 'getProposalsData', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "getRepresentationData", - data: BytesLike + functionFragment: 'getRepresentationData', + data: BytesLike, ): Result; events: {}; @@ -234,15 +234,15 @@ export interface GovernanceDataHelper extends BaseContract { queryFilter( event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined + toBlock?: string | number | undefined, ): Promise>; listeners( - eventFilter?: TypedEventFilter + eventFilter?: TypedEventFilter, ): Array>; listeners(eventName?: string): Array; removeAllListeners( - eventFilter: TypedEventFilter + eventFilter: TypedEventFilter, ): this; removeAllListeners(eventName?: string): this; off: OnEvent; @@ -254,7 +254,7 @@ export interface GovernanceDataHelper extends BaseContract { getConstants( govCore: string, accessLevels: BigNumberish[], - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise<[IGovernanceDataHelper.ConstantsStructOutput]>; getProposalsData( @@ -262,18 +262,18 @@ export interface GovernanceDataHelper extends BaseContract { from: BigNumberish, to: BigNumberish, pageSize: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise<[IGovernanceDataHelper.ProposalStructOutput[]]>; getRepresentationData( govCore: string, wallet: string, chainIds: BigNumberish[], - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise< [ IGovernanceDataHelper.RepresentativesStructOutput[], - IGovernanceDataHelper.RepresentedStructOutput[] + IGovernanceDataHelper.RepresentedStructOutput[], ] >; }; @@ -281,7 +281,7 @@ export interface GovernanceDataHelper extends BaseContract { getConstants( govCore: string, accessLevels: BigNumberish[], - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; getProposalsData( @@ -289,18 +289,18 @@ export interface GovernanceDataHelper extends BaseContract { from: BigNumberish, to: BigNumberish, pageSize: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; getRepresentationData( govCore: string, wallet: string, chainIds: BigNumberish[], - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise< [ IGovernanceDataHelper.RepresentativesStructOutput[], - IGovernanceDataHelper.RepresentedStructOutput[] + IGovernanceDataHelper.RepresentedStructOutput[], ] >; @@ -308,7 +308,7 @@ export interface GovernanceDataHelper extends BaseContract { getConstants( govCore: string, accessLevels: BigNumberish[], - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; getProposalsData( @@ -316,18 +316,18 @@ export interface GovernanceDataHelper extends BaseContract { from: BigNumberish, to: BigNumberish, pageSize: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; getRepresentationData( govCore: string, wallet: string, chainIds: BigNumberish[], - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise< [ IGovernanceDataHelper.RepresentativesStructOutput[], - IGovernanceDataHelper.RepresentedStructOutput[] + IGovernanceDataHelper.RepresentedStructOutput[], ] >; }; @@ -338,7 +338,7 @@ export interface GovernanceDataHelper extends BaseContract { getConstants( govCore: string, accessLevels: BigNumberish[], - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; getProposalsData( @@ -346,14 +346,14 @@ export interface GovernanceDataHelper extends BaseContract { from: BigNumberish, to: BigNumberish, pageSize: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; getRepresentationData( govCore: string, wallet: string, chainIds: BigNumberish[], - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; }; @@ -361,7 +361,7 @@ export interface GovernanceDataHelper extends BaseContract { getConstants( govCore: string, accessLevels: BigNumberish[], - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; getProposalsData( @@ -369,14 +369,14 @@ export interface GovernanceDataHelper extends BaseContract { from: BigNumberish, to: BigNumberish, pageSize: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; getRepresentationData( govCore: string, wallet: string, chainIds: BigNumberish[], - overrides?: CallOverrides + 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 index 95471c25..b2c06bc4 100644 --- a/packages/contract-helpers/src/governance-v3/typechain/VotingMachine.ts +++ b/packages/contract-helpers/src/governance-v3/typechain/VotingMachine.ts @@ -11,19 +11,19 @@ import type { PopulatedTransaction, Signer, utils, -} from "ethers"; +} from 'ethers'; import type { FunctionFragment, Result, EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; +} from '@ethersproject/abi'; +import type { Listener, Provider } from '@ethersproject/providers'; import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, -} from "./common"; +} from './common'; export declare namespace IVotingMachineWithProofs { export type VotingAssetWithSlotStruct = { @@ -57,7 +57,7 @@ export declare namespace IVotingMachineWithProofs { BigNumber, BigNumber, BigNumber, - BigNumber + BigNumber, ] & { id: BigNumber; sentToGovernance: boolean; @@ -114,206 +114,206 @@ export declare namespace IVotingMachineWithProofs { 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; + '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" + | '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 + functionFragment: 'CROSS_CHAIN_CONTROLLER', + values?: undefined, ): string; encodeFunctionData( - functionFragment: "DATA_WAREHOUSE", - values?: undefined + functionFragment: 'DATA_WAREHOUSE', + values?: undefined, ): string; encodeFunctionData( - functionFragment: "DOMAIN_SEPARATOR", - values?: undefined + functionFragment: 'DOMAIN_SEPARATOR', + values?: undefined, ): string; encodeFunctionData( - functionFragment: "GOVERNANCE", - values?: undefined + functionFragment: 'GOVERNANCE', + values?: undefined, ): string; encodeFunctionData( - functionFragment: "L1_VOTING_PORTAL", - values?: undefined + functionFragment: 'L1_VOTING_PORTAL', + values?: undefined, ): string; encodeFunctionData( - functionFragment: "L1_VOTING_PORTAL_CHAIN_ID", - values?: undefined + functionFragment: 'L1_VOTING_PORTAL_CHAIN_ID', + values?: undefined, ): string; - encodeFunctionData(functionFragment: "NAME", values?: undefined): string; + encodeFunctionData(functionFragment: 'NAME', values?: undefined): string; encodeFunctionData( - functionFragment: "REPRESENTATIVES_SLOT", - values?: undefined + functionFragment: 'REPRESENTATIVES_SLOT', + values?: undefined, ): string; encodeFunctionData( - functionFragment: "VOTE_SUBMITTED_BY_REPRESENTATIVE_TYPEHASH", - values?: undefined + functionFragment: 'VOTE_SUBMITTED_BY_REPRESENTATIVE_TYPEHASH', + values?: undefined, ): string; encodeFunctionData( - functionFragment: "VOTE_SUBMITTED_TYPEHASH", - values?: undefined + functionFragment: 'VOTE_SUBMITTED_TYPEHASH', + values?: undefined, ): string; encodeFunctionData( - functionFragment: "VOTING_ASSET_WITH_SLOT_RAW", - values?: undefined + functionFragment: 'VOTING_ASSET_WITH_SLOT_RAW', + values?: undefined, ): string; encodeFunctionData( - functionFragment: "VOTING_ASSET_WITH_SLOT_TYPEHASH", - values?: undefined + functionFragment: 'VOTING_ASSET_WITH_SLOT_TYPEHASH', + values?: undefined, ): string; encodeFunctionData( - functionFragment: "VOTING_STRATEGY", - values?: undefined + functionFragment: 'VOTING_STRATEGY', + values?: undefined, ): string; encodeFunctionData( - functionFragment: "closeAndSendVote", - values: [BigNumberish] + functionFragment: 'closeAndSendVote', + values: [BigNumberish], ): string; encodeFunctionData( - functionFragment: "decodeMessage", - values: [BytesLike] + functionFragment: 'decodeMessage', + values: [BytesLike], ): string; encodeFunctionData( - functionFragment: "decodeProposalMessage", - values: [BytesLike] + functionFragment: 'decodeProposalMessage', + values: [BytesLike], ): string; encodeFunctionData( - functionFragment: "decodeVoteMessage", - values: [BytesLike] + functionFragment: 'decodeVoteMessage', + values: [BytesLike], ): string; encodeFunctionData( - functionFragment: "eip712Domain", - values?: undefined + functionFragment: 'eip712Domain', + values?: undefined, ): string; encodeFunctionData( - functionFragment: "getGasLimit", - values?: undefined + functionFragment: 'getGasLimit', + values?: undefined, ): string; encodeFunctionData( - functionFragment: "getProposalById", - values: [BigNumberish] + functionFragment: 'getProposalById', + values: [BigNumberish], ): string; encodeFunctionData( - functionFragment: "getProposalState", - values: [BigNumberish] + functionFragment: 'getProposalState', + values: [BigNumberish], ): string; encodeFunctionData( - functionFragment: "getProposalVoteConfiguration", - values: [BigNumberish] + functionFragment: 'getProposalVoteConfiguration', + values: [BigNumberish], ): string; encodeFunctionData( - functionFragment: "getProposalsVoteConfigurationIds", - values: [BigNumberish, BigNumberish] + functionFragment: 'getProposalsVoteConfigurationIds', + values: [BigNumberish, BigNumberish], ): string; encodeFunctionData( - functionFragment: "getUserProposalVote", - values: [string, BigNumberish] + functionFragment: 'getUserProposalVote', + values: [string, BigNumberish], ): string; - encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData(functionFragment: 'owner', values?: undefined): string; encodeFunctionData( - functionFragment: "receiveCrossChainMessage", - values: [string, BigNumberish, BytesLike] + functionFragment: 'receiveCrossChainMessage', + values: [string, BigNumberish, BytesLike], ): string; encodeFunctionData( - functionFragment: "renounceOwnership", - values?: undefined + functionFragment: 'renounceOwnership', + values?: undefined, ): string; encodeFunctionData( - functionFragment: "startProposalVote", - values: [BigNumberish] + functionFragment: 'startProposalVote', + values: [BigNumberish], ): string; encodeFunctionData( - functionFragment: "submitVote", + functionFragment: 'submitVote', values: [ BigNumberish, boolean, - IVotingMachineWithProofs.VotingBalanceProofStruct[] - ] + IVotingMachineWithProofs.VotingBalanceProofStruct[], + ], ): string; encodeFunctionData( - functionFragment: "submitVoteAsRepresentative", + functionFragment: 'submitVoteAsRepresentative', values: [ BigNumberish, boolean, string, BytesLike, - IVotingMachineWithProofs.VotingBalanceProofStruct[] - ] + IVotingMachineWithProofs.VotingBalanceProofStruct[], + ], ): string; encodeFunctionData( - functionFragment: "submitVoteAsRepresentativeBySignature", + functionFragment: 'submitVoteAsRepresentativeBySignature', values: [ BigNumberish, string, @@ -321,11 +321,11 @@ export interface VotingMachineInterface extends utils.Interface { boolean, BytesLike, IVotingMachineWithProofs.VotingBalanceProofStruct[], - IVotingMachineWithProofs.SignatureParamsStruct - ] + IVotingMachineWithProofs.SignatureParamsStruct, + ], ): string; encodeFunctionData( - functionFragment: "submitVoteBySignature", + functionFragment: 'submitVoteBySignature', values: [ BigNumberish, string, @@ -333,168 +333,168 @@ export interface VotingMachineInterface extends utils.Interface { IVotingMachineWithProofs.VotingBalanceProofStruct[], BigNumberish, BytesLike, - BytesLike - ] + BytesLike, + ], ): string; encodeFunctionData( - functionFragment: "transferOwnership", - values: [string] + functionFragment: 'transferOwnership', + values: [string], ): string; encodeFunctionData( - functionFragment: "updateGasLimit", - values: [BigNumberish] + functionFragment: 'updateGasLimit', + values: [BigNumberish], ): string; decodeFunctionResult( - functionFragment: "CROSS_CHAIN_CONTROLLER", - data: BytesLike + functionFragment: 'CROSS_CHAIN_CONTROLLER', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "DATA_WAREHOUSE", - data: BytesLike + functionFragment: 'DATA_WAREHOUSE', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "DOMAIN_SEPARATOR", - data: BytesLike + functionFragment: 'DOMAIN_SEPARATOR', + data: BytesLike, ): Result; - decodeFunctionResult(functionFragment: "GOVERNANCE", data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'GOVERNANCE', data: BytesLike): Result; decodeFunctionResult( - functionFragment: "L1_VOTING_PORTAL", - data: BytesLike + functionFragment: 'L1_VOTING_PORTAL', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "L1_VOTING_PORTAL_CHAIN_ID", - data: BytesLike + functionFragment: 'L1_VOTING_PORTAL_CHAIN_ID', + data: BytesLike, ): Result; - decodeFunctionResult(functionFragment: "NAME", data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'NAME', data: BytesLike): Result; decodeFunctionResult( - functionFragment: "REPRESENTATIVES_SLOT", - data: BytesLike + functionFragment: 'REPRESENTATIVES_SLOT', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "VOTE_SUBMITTED_BY_REPRESENTATIVE_TYPEHASH", - data: BytesLike + functionFragment: 'VOTE_SUBMITTED_BY_REPRESENTATIVE_TYPEHASH', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "VOTE_SUBMITTED_TYPEHASH", - data: BytesLike + functionFragment: 'VOTE_SUBMITTED_TYPEHASH', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "VOTING_ASSET_WITH_SLOT_RAW", - data: BytesLike + functionFragment: 'VOTING_ASSET_WITH_SLOT_RAW', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "VOTING_ASSET_WITH_SLOT_TYPEHASH", - data: BytesLike + functionFragment: 'VOTING_ASSET_WITH_SLOT_TYPEHASH', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "VOTING_STRATEGY", - data: BytesLike + functionFragment: 'VOTING_STRATEGY', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "closeAndSendVote", - data: BytesLike + functionFragment: 'closeAndSendVote', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "decodeMessage", - data: BytesLike + functionFragment: 'decodeMessage', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "decodeProposalMessage", - data: BytesLike + functionFragment: 'decodeProposalMessage', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "decodeVoteMessage", - data: BytesLike + functionFragment: 'decodeVoteMessage', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "eip712Domain", - data: BytesLike + functionFragment: 'eip712Domain', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "getGasLimit", - data: BytesLike + functionFragment: 'getGasLimit', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "getProposalById", - data: BytesLike + functionFragment: 'getProposalById', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "getProposalState", - data: BytesLike + functionFragment: 'getProposalState', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "getProposalVoteConfiguration", - data: BytesLike + functionFragment: 'getProposalVoteConfiguration', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "getProposalsVoteConfigurationIds", - data: BytesLike + functionFragment: 'getProposalsVoteConfigurationIds', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "getUserProposalVote", - data: BytesLike + functionFragment: 'getUserProposalVote', + data: BytesLike, ): Result; - decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result; decodeFunctionResult( - functionFragment: "receiveCrossChainMessage", - data: BytesLike + functionFragment: 'receiveCrossChainMessage', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "renounceOwnership", - data: BytesLike + functionFragment: 'renounceOwnership', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "startProposalVote", - data: BytesLike + functionFragment: 'startProposalVote', + data: BytesLike, ): Result; - decodeFunctionResult(functionFragment: "submitVote", data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'submitVote', data: BytesLike): Result; decodeFunctionResult( - functionFragment: "submitVoteAsRepresentative", - data: BytesLike + functionFragment: 'submitVoteAsRepresentative', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "submitVoteAsRepresentativeBySignature", - data: BytesLike + functionFragment: 'submitVoteAsRepresentativeBySignature', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "submitVoteBySignature", - data: BytesLike + functionFragment: 'submitVoteBySignature', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "transferOwnership", - data: BytesLike + functionFragment: 'transferOwnership', + data: BytesLike, ): Result; decodeFunctionResult( - functionFragment: "updateGasLimit", - data: BytesLike + 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; + '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: 'EIP712DomainChanged'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'GasLimitUpdated'): EventFragment; getEvent( - nameOrSignatureOrTopic: "IncorrectTypeMessageReceived" + nameOrSignatureOrTopic: 'IncorrectTypeMessageReceived', ): EventFragment; - getEvent(nameOrSignatureOrTopic: "MessageReceived"): EventFragment; - getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ProposalResultsSent"): EventFragment; + getEvent(nameOrSignatureOrTopic: 'MessageReceived'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'OwnershipTransferred'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'ProposalResultsSent'): EventFragment; getEvent( - nameOrSignatureOrTopic: "ProposalVoteConfigurationBridged" + nameOrSignatureOrTopic: 'ProposalVoteConfigurationBridged', ): EventFragment; - getEvent(nameOrSignatureOrTopic: "ProposalVoteStarted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "VoteEmitted"): EventFragment; + getEvent(nameOrSignatureOrTopic: 'ProposalVoteStarted'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'VoteEmitted'): EventFragment; } export interface EIP712DomainChangedEventObject {} @@ -621,15 +621,15 @@ export interface VotingMachine extends BaseContract { queryFilter( event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined + toBlock?: string | number | undefined, ): Promise>; listeners( - eventFilter?: TypedEventFilter + eventFilter?: TypedEventFilter, ): Array>; listeners(eventName?: string): Array; removeAllListeners( - eventFilter: TypedEventFilter + eventFilter: TypedEventFilter, ): this; removeAllListeners(eventName?: string): this; off: OnEvent; @@ -655,7 +655,7 @@ export interface VotingMachine extends BaseContract { REPRESENTATIVES_SLOT(overrides?: CallOverrides): Promise<[BigNumber]>; VOTE_SUBMITTED_BY_REPRESENTATIVE_TYPEHASH( - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise<[string]>; VOTE_SUBMITTED_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; @@ -663,41 +663,39 @@ export interface VotingMachine extends BaseContract { VOTING_ASSET_WITH_SLOT_RAW(overrides?: CallOverrides): Promise<[string]>; VOTING_ASSET_WITH_SLOT_TYPEHASH( - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise<[string]>; VOTING_STRATEGY(overrides?: CallOverrides): Promise<[string]>; closeAndSendVote( proposalId: BigNumberish, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; decodeMessage( message: BytesLike, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise<[number, string]>; decodeProposalMessage( message: BytesLike, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise<[BigNumber, string, number]>; decodeVoteMessage( message: BytesLike, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise< [ BigNumber, string, boolean, - IVotingMachineWithProofs.VotingAssetWithSlotStructOutput[] + IVotingMachineWithProofs.VotingAssetWithSlotStructOutput[], ] >; - eip712Domain( - overrides?: CallOverrides - ): Promise< + eip712Domain(overrides?: CallOverrides): Promise< [string, string, string, BigNumber, string, string, BigNumber[]] & { fields: string; name: string; @@ -713,17 +711,17 @@ export interface VotingMachine extends BaseContract { getProposalById( proposalId: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise<[IVotingMachineWithProofs.ProposalWithoutVotesStructOutput]>; getProposalState( proposalId: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise<[number]>; getProposalVoteConfiguration( proposalId: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise< [IVotingMachineWithProofs.ProposalVoteConfigurationStructOutput] >; @@ -731,13 +729,13 @@ export interface VotingMachine extends BaseContract { getProposalsVoteConfigurationIds( skip: BigNumberish, size: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise<[BigNumber[]]>; getUserProposalVote( user: string, proposalId: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise<[IVotingMachineWithProofs.VoteStructOutput]>; owner(overrides?: CallOverrides): Promise<[string]>; @@ -746,23 +744,23 @@ export interface VotingMachine extends BaseContract { originSender: string, originChainId: BigNumberish, messageWithType: BytesLike, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; renounceOwnership( - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; startProposalVote( proposalId: BigNumberish, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; submitVote( proposalId: BigNumberish, support: boolean, votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; submitVoteAsRepresentative( @@ -771,7 +769,7 @@ export interface VotingMachine extends BaseContract { voter: string, proofOfRepresentation: BytesLike, votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; submitVoteAsRepresentativeBySignature( @@ -782,7 +780,7 @@ export interface VotingMachine extends BaseContract { proofOfRepresentation: BytesLike, votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], signatureParams: IVotingMachineWithProofs.SignatureParamsStruct, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; submitVoteBySignature( @@ -793,17 +791,17 @@ export interface VotingMachine extends BaseContract { v: BigNumberish, r: BytesLike, s: BytesLike, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; transferOwnership( newOwner: string, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; updateGasLimit( gasLimit: BigNumberish, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; }; @@ -824,7 +822,7 @@ export interface VotingMachine extends BaseContract { REPRESENTATIVES_SLOT(overrides?: CallOverrides): Promise; VOTE_SUBMITTED_BY_REPRESENTATIVE_TYPEHASH( - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; VOTE_SUBMITTED_TYPEHASH(overrides?: CallOverrides): Promise; @@ -837,34 +835,32 @@ export interface VotingMachine extends BaseContract { closeAndSendVote( proposalId: BigNumberish, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; decodeMessage( message: BytesLike, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise<[number, string]>; decodeProposalMessage( message: BytesLike, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise<[BigNumber, string, number]>; decodeVoteMessage( message: BytesLike, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise< [ BigNumber, string, boolean, - IVotingMachineWithProofs.VotingAssetWithSlotStructOutput[] + IVotingMachineWithProofs.VotingAssetWithSlotStructOutput[], ] >; - eip712Domain( - overrides?: CallOverrides - ): Promise< + eip712Domain(overrides?: CallOverrides): Promise< [string, string, string, BigNumber, string, string, BigNumber[]] & { fields: string; name: string; @@ -880,29 +876,29 @@ export interface VotingMachine extends BaseContract { getProposalById( proposalId: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; getProposalState( proposalId: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; getProposalVoteConfiguration( proposalId: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; getProposalsVoteConfigurationIds( skip: BigNumberish, size: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; getUserProposalVote( user: string, proposalId: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; owner(overrides?: CallOverrides): Promise; @@ -911,23 +907,23 @@ export interface VotingMachine extends BaseContract { originSender: string, originChainId: BigNumberish, messageWithType: BytesLike, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; renounceOwnership( - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; startProposalVote( proposalId: BigNumberish, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; submitVote( proposalId: BigNumberish, support: boolean, votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; submitVoteAsRepresentative( @@ -936,7 +932,7 @@ export interface VotingMachine extends BaseContract { voter: string, proofOfRepresentation: BytesLike, votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; submitVoteAsRepresentativeBySignature( @@ -947,7 +943,7 @@ export interface VotingMachine extends BaseContract { proofOfRepresentation: BytesLike, votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], signatureParams: IVotingMachineWithProofs.SignatureParamsStruct, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; submitVoteBySignature( @@ -958,17 +954,17 @@ export interface VotingMachine extends BaseContract { v: BigNumberish, r: BytesLike, s: BytesLike, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; transferOwnership( newOwner: string, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; updateGasLimit( gasLimit: BigNumberish, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; callStatic: { @@ -989,7 +985,7 @@ export interface VotingMachine extends BaseContract { REPRESENTATIVES_SLOT(overrides?: CallOverrides): Promise; VOTE_SUBMITTED_BY_REPRESENTATIVE_TYPEHASH( - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; VOTE_SUBMITTED_TYPEHASH(overrides?: CallOverrides): Promise; @@ -1002,34 +998,32 @@ export interface VotingMachine extends BaseContract { closeAndSendVote( proposalId: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; decodeMessage( message: BytesLike, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise<[number, string]>; decodeProposalMessage( message: BytesLike, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise<[BigNumber, string, number]>; decodeVoteMessage( message: BytesLike, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise< [ BigNumber, string, boolean, - IVotingMachineWithProofs.VotingAssetWithSlotStructOutput[] + IVotingMachineWithProofs.VotingAssetWithSlotStructOutput[], ] >; - eip712Domain( - overrides?: CallOverrides - ): Promise< + eip712Domain(overrides?: CallOverrides): Promise< [string, string, string, BigNumber, string, string, BigNumber[]] & { fields: string; name: string; @@ -1045,29 +1039,29 @@ export interface VotingMachine extends BaseContract { getProposalById( proposalId: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; getProposalState( proposalId: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; getProposalVoteConfiguration( proposalId: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; getProposalsVoteConfigurationIds( skip: BigNumberish, size: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; getUserProposalVote( user: string, proposalId: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; owner(overrides?: CallOverrides): Promise; @@ -1076,21 +1070,21 @@ export interface VotingMachine extends BaseContract { originSender: string, originChainId: BigNumberish, messageWithType: BytesLike, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; renounceOwnership(overrides?: CallOverrides): Promise; startProposalVote( proposalId: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; submitVote( proposalId: BigNumberish, support: boolean, votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; submitVoteAsRepresentative( @@ -1099,7 +1093,7 @@ export interface VotingMachine extends BaseContract { voter: string, proofOfRepresentation: BytesLike, votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; submitVoteAsRepresentativeBySignature( @@ -1110,7 +1104,7 @@ export interface VotingMachine extends BaseContract { proofOfRepresentation: BytesLike, votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], signatureParams: IVotingMachineWithProofs.SignatureParamsStruct, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; submitVoteBySignature( @@ -1121,49 +1115,49 @@ export interface VotingMachine extends BaseContract { v: BigNumberish, r: BytesLike, s: BytesLike, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; transferOwnership( newOwner: string, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; updateGasLimit( gasLimit: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; }; filters: { - "EIP712DomainChanged()"(): EIP712DomainChangedEventFilter; + 'EIP712DomainChanged()'(): EIP712DomainChangedEventFilter; EIP712DomainChanged(): EIP712DomainChangedEventFilter; - "GasLimitUpdated(uint256)"( - gasLimit?: BigNumberish | null + 'GasLimitUpdated(uint256)'( + gasLimit?: BigNumberish | null, ): GasLimitUpdatedEventFilter; GasLimitUpdated(gasLimit?: BigNumberish | null): GasLimitUpdatedEventFilter; - "IncorrectTypeMessageReceived(address,uint256,bytes,bytes)"( + 'IncorrectTypeMessageReceived(address,uint256,bytes,bytes)'( originSender?: string | null, originChainId?: BigNumberish | null, message?: null, - reason?: null + reason?: null, ): IncorrectTypeMessageReceivedEventFilter; IncorrectTypeMessageReceived( originSender?: string | null, originChainId?: BigNumberish | null, message?: null, - reason?: null + reason?: null, ): IncorrectTypeMessageReceivedEventFilter; - "MessageReceived(address,uint256,bool,uint8,bytes,bytes)"( + 'MessageReceived(address,uint256,bool,uint8,bytes,bytes)'( originSender?: string | null, originChainId?: BigNumberish | null, delivered?: boolean | null, messageType?: null, message?: null, - reason?: null + reason?: null, ): MessageReceivedEventFilter; MessageReceived( originSender?: string | null, @@ -1171,66 +1165,66 @@ export interface VotingMachine extends BaseContract { delivered?: boolean | null, messageType?: null, message?: null, - reason?: null + reason?: null, ): MessageReceivedEventFilter; - "OwnershipTransferred(address,address)"( + 'OwnershipTransferred(address,address)'( previousOwner?: string | null, - newOwner?: string | null + newOwner?: string | null, ): OwnershipTransferredEventFilter; OwnershipTransferred( previousOwner?: string | null, - newOwner?: string | null + newOwner?: string | null, ): OwnershipTransferredEventFilter; - "ProposalResultsSent(uint256,uint256,uint256)"( + 'ProposalResultsSent(uint256,uint256,uint256)'( proposalId?: BigNumberish | null, forVotes?: null, - againstVotes?: null + againstVotes?: null, ): ProposalResultsSentEventFilter; ProposalResultsSent( proposalId?: BigNumberish | null, forVotes?: null, - againstVotes?: null + againstVotes?: null, ): ProposalResultsSentEventFilter; - "ProposalVoteConfigurationBridged(uint256,bytes32,uint24,bool)"( + 'ProposalVoteConfigurationBridged(uint256,bytes32,uint24,bool)'( proposalId?: BigNumberish | null, blockHash?: BytesLike | null, votingDuration?: null, - voteCreated?: boolean | null + voteCreated?: boolean | null, ): ProposalVoteConfigurationBridgedEventFilter; ProposalVoteConfigurationBridged( proposalId?: BigNumberish | null, blockHash?: BytesLike | null, votingDuration?: null, - voteCreated?: boolean | null + voteCreated?: boolean | null, ): ProposalVoteConfigurationBridgedEventFilter; - "ProposalVoteStarted(uint256,bytes32,uint256,uint256)"( + 'ProposalVoteStarted(uint256,bytes32,uint256,uint256)'( proposalId?: BigNumberish | null, l1BlockHash?: BytesLike | null, startTime?: null, - endTime?: null + endTime?: null, ): ProposalVoteStartedEventFilter; ProposalVoteStarted( proposalId?: BigNumberish | null, l1BlockHash?: BytesLike | null, startTime?: null, - endTime?: null + endTime?: null, ): ProposalVoteStartedEventFilter; - "VoteEmitted(uint256,address,bool,uint256)"( + 'VoteEmitted(uint256,address,bool,uint256)'( proposalId?: BigNumberish | null, voter?: string | null, support?: boolean | null, - votingPower?: null + votingPower?: null, ): VoteEmittedEventFilter; VoteEmitted( proposalId?: BigNumberish | null, voter?: string | null, support?: boolean | null, - votingPower?: null + votingPower?: null, ): VoteEmittedEventFilter; }; @@ -1252,7 +1246,7 @@ export interface VotingMachine extends BaseContract { REPRESENTATIVES_SLOT(overrides?: CallOverrides): Promise; VOTE_SUBMITTED_BY_REPRESENTATIVE_TYPEHASH( - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; VOTE_SUBMITTED_TYPEHASH(overrides?: CallOverrides): Promise; @@ -1260,29 +1254,29 @@ export interface VotingMachine extends BaseContract { VOTING_ASSET_WITH_SLOT_RAW(overrides?: CallOverrides): Promise; VOTING_ASSET_WITH_SLOT_TYPEHASH( - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; VOTING_STRATEGY(overrides?: CallOverrides): Promise; closeAndSendVote( proposalId: BigNumberish, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; decodeMessage( message: BytesLike, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; decodeProposalMessage( message: BytesLike, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; decodeVoteMessage( message: BytesLike, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; eip712Domain(overrides?: CallOverrides): Promise; @@ -1291,29 +1285,29 @@ export interface VotingMachine extends BaseContract { getProposalById( proposalId: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; getProposalState( proposalId: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; getProposalVoteConfiguration( proposalId: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; getProposalsVoteConfigurationIds( skip: BigNumberish, size: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; getUserProposalVote( user: string, proposalId: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; owner(overrides?: CallOverrides): Promise; @@ -1322,23 +1316,23 @@ export interface VotingMachine extends BaseContract { originSender: string, originChainId: BigNumberish, messageWithType: BytesLike, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; renounceOwnership( - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; startProposalVote( proposalId: BigNumberish, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; submitVote( proposalId: BigNumberish, support: boolean, votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; submitVoteAsRepresentative( @@ -1347,7 +1341,7 @@ export interface VotingMachine extends BaseContract { voter: string, proofOfRepresentation: BytesLike, votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; submitVoteAsRepresentativeBySignature( @@ -1358,7 +1352,7 @@ export interface VotingMachine extends BaseContract { proofOfRepresentation: BytesLike, votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], signatureParams: IVotingMachineWithProofs.SignatureParamsStruct, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; submitVoteBySignature( @@ -1369,23 +1363,23 @@ export interface VotingMachine extends BaseContract { v: BigNumberish, r: BytesLike, s: BytesLike, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; transferOwnership( newOwner: string, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; updateGasLimit( gasLimit: BigNumberish, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; }; populateTransaction: { CROSS_CHAIN_CONTROLLER( - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; DATA_WAREHOUSE(overrides?: CallOverrides): Promise; @@ -1397,51 +1391,51 @@ export interface VotingMachine extends BaseContract { L1_VOTING_PORTAL(overrides?: CallOverrides): Promise; L1_VOTING_PORTAL_CHAIN_ID( - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; NAME(overrides?: CallOverrides): Promise; REPRESENTATIVES_SLOT( - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; VOTE_SUBMITTED_BY_REPRESENTATIVE_TYPEHASH( - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; VOTE_SUBMITTED_TYPEHASH( - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; VOTING_ASSET_WITH_SLOT_RAW( - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; VOTING_ASSET_WITH_SLOT_TYPEHASH( - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; VOTING_STRATEGY(overrides?: CallOverrides): Promise; closeAndSendVote( proposalId: BigNumberish, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; decodeMessage( message: BytesLike, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; decodeProposalMessage( message: BytesLike, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; decodeVoteMessage( message: BytesLike, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; eip712Domain(overrides?: CallOverrides): Promise; @@ -1450,29 +1444,29 @@ export interface VotingMachine extends BaseContract { getProposalById( proposalId: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; getProposalState( proposalId: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; getProposalVoteConfiguration( proposalId: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; getProposalsVoteConfigurationIds( skip: BigNumberish, size: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; getUserProposalVote( user: string, proposalId: BigNumberish, - overrides?: CallOverrides + overrides?: CallOverrides, ): Promise; owner(overrides?: CallOverrides): Promise; @@ -1481,23 +1475,23 @@ export interface VotingMachine extends BaseContract { originSender: string, originChainId: BigNumberish, messageWithType: BytesLike, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; renounceOwnership( - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; startProposalVote( proposalId: BigNumberish, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; submitVote( proposalId: BigNumberish, support: boolean, votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; submitVoteAsRepresentative( @@ -1506,7 +1500,7 @@ export interface VotingMachine extends BaseContract { voter: string, proofOfRepresentation: BytesLike, votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; submitVoteAsRepresentativeBySignature( @@ -1517,7 +1511,7 @@ export interface VotingMachine extends BaseContract { proofOfRepresentation: BytesLike, votingBalanceProofs: IVotingMachineWithProofs.VotingBalanceProofStruct[], signatureParams: IVotingMachineWithProofs.SignatureParamsStruct, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; submitVoteBySignature( @@ -1528,17 +1522,17 @@ export interface VotingMachine extends BaseContract { v: BigNumberish, r: BytesLike, s: BytesLike, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; transferOwnership( newOwner: string, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; updateGasLimit( gasLimit: BigNumberish, - overrides?: Overrides & { from?: string } + overrides?: Overrides & { from?: string }, ): Promise; }; } diff --git a/packages/contract-helpers/src/governance-v3/typechain/common.ts b/packages/contract-helpers/src/governance-v3/typechain/common.ts index 3e1b0b2b..0fb82cd3 100644 --- a/packages/contract-helpers/src/governance-v3/typechain/common.ts +++ b/packages/contract-helpers/src/governance-v3/typechain/common.ts @@ -1,11 +1,11 @@ /* Autogenerated file. Do not edit manually. */ /* eslint-disable */ -import type { Listener } from "@ethersproject/providers"; -import type { Event, EventFilter } from "ethers"; +import type { Listener } from '@ethersproject/providers'; +import type { Event, EventFilter } from 'ethers'; export interface TypedEvent< TArgsArray extends Array = any, - TArgsObject = any + TArgsObject = any, > extends Event { args: TArgsArray & TArgsObject; } @@ -22,7 +22,7 @@ type __TypechainArgsArray = T extends TypedEvent ? U : never; export interface OnEvent { ( eventFilter: TypedEventFilter, - listener: TypedListener + listener: TypedListener, ): TRes; (eventName: string, listener: Listener): TRes; } @@ -39,5 +39,5 @@ export type GetContractTypeFromFactory = F extends MinEthersFactory< : never; export type GetARGsTypeFromFactory = F extends MinEthersFactory - ? Parameters + ? Parameters : never; 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 index 88617dee..3f673091 100644 --- a/packages/contract-helpers/src/governance-v3/typechain/factories/GovernanceDataHelper__factory.ts +++ b/packages/contract-helpers/src/governance-v3/typechain/factories/GovernanceDataHelper__factory.ts @@ -1,311 +1,311 @@ /* Autogenerated file. Do not edit manually. */ /* eslint-disable */ -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; +import { Contract, Signer, utils } from 'ethers'; +import type { Provider } from '@ethersproject/providers'; import type { GovernanceDataHelper, GovernanceDataHelperInterface, -} from "../GovernanceDataHelper"; +} from '../GovernanceDataHelper'; const _abi = [ { inputs: [ { - internalType: "contract IGovernanceCore", - name: "govCore", - type: "address", + internalType: 'contract IGovernanceCore', + name: 'govCore', + type: 'address', }, { - internalType: "enum PayloadsControllerUtils.AccessControl[]", - name: "accessLevels", - type: "uint8[]", + internalType: 'enum PayloadsControllerUtils.AccessControl[]', + name: 'accessLevels', + type: 'uint8[]', }, ], - name: "getConstants", + name: 'getConstants', outputs: [ { components: [ { components: [ { - internalType: "enum PayloadsControllerUtils.AccessControl", - name: "accessLevel", - type: "uint8", + internalType: 'enum PayloadsControllerUtils.AccessControl', + name: 'accessLevel', + type: 'uint8', }, { components: [ { - internalType: "uint24", - name: "coolDownBeforeVotingStart", - type: "uint24", + internalType: 'uint24', + name: 'coolDownBeforeVotingStart', + type: 'uint24', }, { - internalType: "uint24", - name: "votingDuration", - type: "uint24", + internalType: 'uint24', + name: 'votingDuration', + type: 'uint24', }, { - internalType: "uint56", - name: "yesThreshold", - type: "uint56", + internalType: 'uint56', + name: 'yesThreshold', + type: 'uint56', }, { - internalType: "uint56", - name: "yesNoDifferential", - type: "uint56", + internalType: 'uint56', + name: 'yesNoDifferential', + type: 'uint56', }, { - internalType: "uint56", - name: "minPropositionPower", - type: "uint56", + internalType: 'uint56', + name: 'minPropositionPower', + type: 'uint56', }, ], - internalType: "struct IGovernanceCore.VotingConfig", - name: "config", - type: "tuple", + internalType: 'struct IGovernanceCore.VotingConfig', + name: 'config', + type: 'tuple', }, ], - internalType: "struct IGovernanceDataHelper.VotingConfig[]", - name: "votingConfigs", - type: "tuple[]", + internalType: 'struct IGovernanceDataHelper.VotingConfig[]', + name: 'votingConfigs', + type: 'tuple[]', }, { - internalType: "uint256", - name: "precisionDivider", - type: "uint256", + internalType: 'uint256', + name: 'precisionDivider', + type: 'uint256', }, { - internalType: "uint256", - name: "cooldownPeriod", - type: "uint256", + internalType: 'uint256', + name: 'cooldownPeriod', + type: 'uint256', }, { - internalType: "uint256", - name: "expirationTime", - type: "uint256", + internalType: 'uint256', + name: 'expirationTime', + type: 'uint256', }, { - internalType: "uint256", - name: "cancellationFee", - type: "uint256", + internalType: 'uint256', + name: 'cancellationFee', + type: 'uint256', }, ], - internalType: "struct IGovernanceDataHelper.Constants", - name: "", - type: "tuple", + internalType: 'struct IGovernanceDataHelper.Constants', + name: '', + type: 'tuple', }, ], - stateMutability: "view", - type: "function", + stateMutability: 'view', + type: 'function', }, { inputs: [ { - internalType: "contract IGovernanceCore", - name: "govCore", - type: "address", + internalType: 'contract IGovernanceCore', + name: 'govCore', + type: 'address', }, { - internalType: "uint256", - name: "from", - type: "uint256", + internalType: 'uint256', + name: 'from', + type: 'uint256', }, { - internalType: "uint256", - name: "to", - type: "uint256", + internalType: 'uint256', + name: 'to', + type: 'uint256', }, { - internalType: "uint256", - name: "pageSize", - type: "uint256", + internalType: 'uint256', + name: 'pageSize', + type: 'uint256', }, ], - name: "getProposalsData", + name: 'getProposalsData', outputs: [ { components: [ { - internalType: "uint256", - name: "id", - type: "uint256", + internalType: 'uint256', + name: 'id', + type: 'uint256', }, { - internalType: "uint256", - name: "votingChainId", - type: "uint256", + internalType: 'uint256', + name: 'votingChainId', + type: 'uint256', }, { components: [ { - internalType: "enum IGovernanceCore.State", - name: "state", - type: "uint8", + internalType: 'enum IGovernanceCore.State', + name: 'state', + type: 'uint8', }, { - internalType: "enum PayloadsControllerUtils.AccessControl", - name: "accessLevel", - type: "uint8", + internalType: 'enum PayloadsControllerUtils.AccessControl', + name: 'accessLevel', + type: 'uint8', }, { - internalType: "uint40", - name: "creationTime", - type: "uint40", + internalType: 'uint40', + name: 'creationTime', + type: 'uint40', }, { - internalType: "uint24", - name: "votingDuration", - type: "uint24", + internalType: 'uint24', + name: 'votingDuration', + type: 'uint24', }, { - internalType: "uint40", - name: "votingActivationTime", - type: "uint40", + internalType: 'uint40', + name: 'votingActivationTime', + type: 'uint40', }, { - internalType: "uint40", - name: "queuingTime", - type: "uint40", + internalType: 'uint40', + name: 'queuingTime', + type: 'uint40', }, { - internalType: "uint40", - name: "cancelTimestamp", - type: "uint40", + internalType: 'uint40', + name: 'cancelTimestamp', + type: 'uint40', }, { - internalType: "address", - name: "creator", - type: "address", + internalType: 'address', + name: 'creator', + type: 'address', }, { - internalType: "address", - name: "votingPortal", - type: "address", + internalType: 'address', + name: 'votingPortal', + type: 'address', }, { - internalType: "bytes32", - name: "snapshotBlockHash", - type: "bytes32", + internalType: 'bytes32', + name: 'snapshotBlockHash', + type: 'bytes32', }, { - internalType: "bytes32", - name: "ipfsHash", - type: "bytes32", + internalType: 'bytes32', + name: 'ipfsHash', + type: 'bytes32', }, { - internalType: "uint128", - name: "forVotes", - type: "uint128", + internalType: 'uint128', + name: 'forVotes', + type: 'uint128', }, { - internalType: "uint128", - name: "againstVotes", - type: "uint128", + internalType: 'uint128', + name: 'againstVotes', + type: 'uint128', }, { - internalType: "uint256", - name: "cancellationFee", - type: "uint256", + internalType: 'uint256', + name: 'cancellationFee', + type: 'uint256', }, { components: [ { - internalType: "uint256", - name: "chain", - type: "uint256", + internalType: 'uint256', + name: 'chain', + type: 'uint256', }, { - internalType: "enum PayloadsControllerUtils.AccessControl", - name: "accessLevel", - type: "uint8", + internalType: 'enum PayloadsControllerUtils.AccessControl', + name: 'accessLevel', + type: 'uint8', }, { - internalType: "address", - name: "payloadsController", - type: "address", + internalType: 'address', + name: 'payloadsController', + type: 'address', }, { - internalType: "uint40", - name: "payloadId", - type: "uint40", + internalType: 'uint40', + name: 'payloadId', + type: 'uint40', }, ], - internalType: "struct PayloadsControllerUtils.Payload[]", - name: "payloads", - type: "tuple[]", + internalType: 'struct PayloadsControllerUtils.Payload[]', + name: 'payloads', + type: 'tuple[]', }, ], - internalType: "struct IGovernanceCore.Proposal", - name: "proposalData", - type: "tuple", + internalType: 'struct IGovernanceCore.Proposal', + name: 'proposalData', + type: 'tuple', }, ], - internalType: "struct IGovernanceDataHelper.Proposal[]", - name: "", - type: "tuple[]", + internalType: 'struct IGovernanceDataHelper.Proposal[]', + name: '', + type: 'tuple[]', }, ], - stateMutability: "view", - type: "function", + stateMutability: 'view', + type: 'function', }, { inputs: [ { - internalType: "contract IGovernanceCore", - name: "govCore", - type: "address", + internalType: 'contract IGovernanceCore', + name: 'govCore', + type: 'address', }, { - internalType: "address", - name: "wallet", - type: "address", + internalType: 'address', + name: 'wallet', + type: 'address', }, { - internalType: "uint256[]", - name: "chainIds", - type: "uint256[]", + internalType: 'uint256[]', + name: 'chainIds', + type: 'uint256[]', }, ], - name: "getRepresentationData", + name: 'getRepresentationData', outputs: [ { components: [ { - internalType: "uint256", - name: "chainId", - type: "uint256", + internalType: 'uint256', + name: 'chainId', + type: 'uint256', }, { - internalType: "address", - name: "representative", - type: "address", + internalType: 'address', + name: 'representative', + type: 'address', }, ], - internalType: "struct IGovernanceDataHelper.Representatives[]", - name: "", - type: "tuple[]", + internalType: 'struct IGovernanceDataHelper.Representatives[]', + name: '', + type: 'tuple[]', }, { components: [ { - internalType: "uint256", - name: "chainId", - type: "uint256", + internalType: 'uint256', + name: 'chainId', + type: 'uint256', }, { - internalType: "address[]", - name: "votersRepresented", - type: "address[]", + internalType: 'address[]', + name: 'votersRepresented', + type: 'address[]', }, ], - internalType: "struct IGovernanceDataHelper.Represented[]", - name: "", - type: "tuple[]", + internalType: 'struct IGovernanceDataHelper.Represented[]', + name: '', + type: 'tuple[]', }, ], - stateMutability: "view", - type: "function", + stateMutability: 'view', + type: 'function', }, ] as const; @@ -316,12 +316,12 @@ export class GovernanceDataHelper__factory { } static connect( address: string, - signerOrProvider: Signer | Provider + signerOrProvider: Signer | Provider, ): GovernanceDataHelper { return new Contract( address, _abi, - signerOrProvider + signerOrProvider, ) as GovernanceDataHelper; } } 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 index db54fd7a..6abd3200 100644 --- a/packages/contract-helpers/src/governance-v3/typechain/factories/VotingMachine__factory.ts +++ b/packages/contract-helpers/src/governance-v3/typechain/factories/VotingMachine__factory.ts @@ -1,1148 +1,1148 @@ /* 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"; +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: 'address', + name: 'crossChainController', + type: 'address', }, { - internalType: "uint256", - name: "gasLimit", - type: "uint256", + internalType: 'uint256', + name: 'gasLimit', + type: 'uint256', }, { - internalType: "uint256", - name: "l1VotingPortalChainId", - type: "uint256", + internalType: 'uint256', + name: 'l1VotingPortalChainId', + type: 'uint256', }, { - internalType: "contract IVotingStrategy", - name: "votingStrategy", - type: "address", + internalType: 'contract IVotingStrategy', + name: 'votingStrategy', + type: 'address', }, { - internalType: "address", - name: "l1VotingPortal", - type: "address", + internalType: 'address', + name: 'l1VotingPortal', + type: 'address', }, { - internalType: "address", - name: "governance", - type: "address", + internalType: 'address', + name: 'governance', + type: 'address', }, ], - stateMutability: "nonpayable", - type: "constructor", + stateMutability: 'nonpayable', + type: 'constructor', }, { inputs: [], - name: "ECDSAInvalidSignature", - type: "error", + name: 'ECDSAInvalidSignature', + type: 'error', }, { inputs: [ { - internalType: "uint256", - name: "length", - type: "uint256", + internalType: 'uint256', + name: 'length', + type: 'uint256', }, ], - name: "ECDSAInvalidSignatureLength", - type: "error", + name: 'ECDSAInvalidSignatureLength', + type: 'error', }, { inputs: [ { - internalType: "bytes32", - name: "s", - type: "bytes32", + internalType: 'bytes32', + name: 's', + type: 'bytes32', }, ], - name: "ECDSAInvalidSignatureS", - type: "error", + name: 'ECDSAInvalidSignatureS', + type: 'error', }, { inputs: [], - name: "InvalidShortString", - type: "error", + name: 'InvalidShortString', + type: 'error', }, { inputs: [ { - internalType: "string", - name: "str", - type: "string", + internalType: 'string', + name: 'str', + type: 'string', }, ], - name: "StringTooLong", - type: "error", + name: 'StringTooLong', + type: 'error', }, { anonymous: false, inputs: [], - name: "EIP712DomainChanged", - type: "event", + name: 'EIP712DomainChanged', + type: 'event', }, { anonymous: false, inputs: [ { indexed: true, - internalType: "uint256", - name: "gasLimit", - type: "uint256", + internalType: 'uint256', + name: 'gasLimit', + type: 'uint256', }, ], - name: "GasLimitUpdated", - type: "event", + name: 'GasLimitUpdated', + type: 'event', }, { anonymous: false, inputs: [ { indexed: true, - internalType: "address", - name: "originSender", - type: "address", + internalType: 'address', + name: 'originSender', + type: 'address', }, { indexed: true, - internalType: "uint256", - name: "originChainId", - type: "uint256", + internalType: 'uint256', + name: 'originChainId', + type: 'uint256', }, { indexed: false, - internalType: "bytes", - name: "message", - type: "bytes", + internalType: 'bytes', + name: 'message', + type: 'bytes', }, { indexed: false, - internalType: "bytes", - name: "reason", - type: "bytes", + internalType: 'bytes', + name: 'reason', + type: 'bytes', }, ], - name: "IncorrectTypeMessageReceived", - type: "event", + name: 'IncorrectTypeMessageReceived', + type: 'event', }, { anonymous: false, inputs: [ { indexed: true, - internalType: "address", - name: "originSender", - type: "address", + internalType: 'address', + name: 'originSender', + type: 'address', }, { indexed: true, - internalType: "uint256", - name: "originChainId", - type: "uint256", + internalType: 'uint256', + name: 'originChainId', + type: 'uint256', }, { indexed: true, - internalType: "bool", - name: "delivered", - type: "bool", + internalType: 'bool', + name: 'delivered', + type: 'bool', }, { indexed: false, - internalType: "enum IVotingPortal.MessageType", - name: "messageType", - type: "uint8", + internalType: 'enum IVotingPortal.MessageType', + name: 'messageType', + type: 'uint8', }, { indexed: false, - internalType: "bytes", - name: "message", - type: "bytes", + internalType: 'bytes', + name: 'message', + type: 'bytes', }, { indexed: false, - internalType: "bytes", - name: "reason", - type: "bytes", + internalType: 'bytes', + name: 'reason', + type: 'bytes', }, ], - name: "MessageReceived", - type: "event", + name: 'MessageReceived', + type: 'event', }, { anonymous: false, inputs: [ { indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", + internalType: 'address', + name: 'previousOwner', + type: 'address', }, { indexed: true, - internalType: "address", - name: "newOwner", - type: "address", + internalType: 'address', + name: 'newOwner', + type: 'address', }, ], - name: "OwnershipTransferred", - type: "event", + name: 'OwnershipTransferred', + type: 'event', }, { anonymous: false, inputs: [ { indexed: true, - internalType: "uint256", - name: "proposalId", - type: "uint256", + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', }, { indexed: false, - internalType: "uint256", - name: "forVotes", - type: "uint256", + internalType: 'uint256', + name: 'forVotes', + type: 'uint256', }, { indexed: false, - internalType: "uint256", - name: "againstVotes", - type: "uint256", + internalType: 'uint256', + name: 'againstVotes', + type: 'uint256', }, ], - name: "ProposalResultsSent", - type: "event", + name: 'ProposalResultsSent', + type: 'event', }, { anonymous: false, inputs: [ { indexed: true, - internalType: "uint256", - name: "proposalId", - type: "uint256", + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', }, { indexed: true, - internalType: "bytes32", - name: "blockHash", - type: "bytes32", + internalType: 'bytes32', + name: 'blockHash', + type: 'bytes32', }, { indexed: false, - internalType: "uint24", - name: "votingDuration", - type: "uint24", + internalType: 'uint24', + name: 'votingDuration', + type: 'uint24', }, { indexed: true, - internalType: "bool", - name: "voteCreated", - type: "bool", + internalType: 'bool', + name: 'voteCreated', + type: 'bool', }, ], - name: "ProposalVoteConfigurationBridged", - type: "event", + name: 'ProposalVoteConfigurationBridged', + type: 'event', }, { anonymous: false, inputs: [ { indexed: true, - internalType: "uint256", - name: "proposalId", - type: "uint256", + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', }, { indexed: true, - internalType: "bytes32", - name: "l1BlockHash", - type: "bytes32", + internalType: 'bytes32', + name: 'l1BlockHash', + type: 'bytes32', }, { indexed: false, - internalType: "uint256", - name: "startTime", - type: "uint256", + internalType: 'uint256', + name: 'startTime', + type: 'uint256', }, { indexed: false, - internalType: "uint256", - name: "endTime", - type: "uint256", + internalType: 'uint256', + name: 'endTime', + type: 'uint256', }, ], - name: "ProposalVoteStarted", - type: "event", + name: 'ProposalVoteStarted', + type: 'event', }, { anonymous: false, inputs: [ { indexed: true, - internalType: "uint256", - name: "proposalId", - type: "uint256", + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', }, { indexed: true, - internalType: "address", - name: "voter", - type: "address", + internalType: 'address', + name: 'voter', + type: 'address', }, { indexed: true, - internalType: "bool", - name: "support", - type: "bool", + internalType: 'bool', + name: 'support', + type: 'bool', }, { indexed: false, - internalType: "uint256", - name: "votingPower", - type: "uint256", + internalType: 'uint256', + name: 'votingPower', + type: 'uint256', }, ], - name: "VoteEmitted", - type: "event", + name: 'VoteEmitted', + type: 'event', }, { inputs: [], - name: "CROSS_CHAIN_CONTROLLER", + name: 'CROSS_CHAIN_CONTROLLER', outputs: [ { - internalType: "address", - name: "", - type: "address", + internalType: 'address', + name: '', + type: 'address', }, ], - stateMutability: "view", - type: "function", + stateMutability: 'view', + type: 'function', }, { inputs: [], - name: "DATA_WAREHOUSE", + name: 'DATA_WAREHOUSE', outputs: [ { - internalType: "contract IDataWarehouse", - name: "", - type: "address", + internalType: 'contract IDataWarehouse', + name: '', + type: 'address', }, ], - stateMutability: "view", - type: "function", + stateMutability: 'view', + type: 'function', }, { inputs: [], - name: "DOMAIN_SEPARATOR", + name: 'DOMAIN_SEPARATOR', outputs: [ { - internalType: "bytes32", - name: "", - type: "bytes32", + internalType: 'bytes32', + name: '', + type: 'bytes32', }, ], - stateMutability: "view", - type: "function", + stateMutability: 'view', + type: 'function', }, { inputs: [], - name: "GOVERNANCE", + name: 'GOVERNANCE', outputs: [ { - internalType: "address", - name: "", - type: "address", + internalType: 'address', + name: '', + type: 'address', }, ], - stateMutability: "view", - type: "function", + stateMutability: 'view', + type: 'function', }, { inputs: [], - name: "L1_VOTING_PORTAL", + name: 'L1_VOTING_PORTAL', outputs: [ { - internalType: "address", - name: "", - type: "address", + internalType: 'address', + name: '', + type: 'address', }, ], - stateMutability: "view", - type: "function", + stateMutability: 'view', + type: 'function', }, { inputs: [], - name: "L1_VOTING_PORTAL_CHAIN_ID", + name: 'L1_VOTING_PORTAL_CHAIN_ID', outputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: 'uint256', + name: '', + type: 'uint256', }, ], - stateMutability: "view", - type: "function", + stateMutability: 'view', + type: 'function', }, { inputs: [], - name: "NAME", + name: 'NAME', outputs: [ { - internalType: "string", - name: "", - type: "string", + internalType: 'string', + name: '', + type: 'string', }, ], - stateMutability: "view", - type: "function", + stateMutability: 'view', + type: 'function', }, { inputs: [], - name: "REPRESENTATIVES_SLOT", + name: 'REPRESENTATIVES_SLOT', outputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: 'uint256', + name: '', + type: 'uint256', }, ], - stateMutability: "view", - type: "function", + stateMutability: 'view', + type: 'function', }, { inputs: [], - name: "VOTE_SUBMITTED_BY_REPRESENTATIVE_TYPEHASH", + name: 'VOTE_SUBMITTED_BY_REPRESENTATIVE_TYPEHASH', outputs: [ { - internalType: "bytes32", - name: "", - type: "bytes32", + internalType: 'bytes32', + name: '', + type: 'bytes32', }, ], - stateMutability: "view", - type: "function", + stateMutability: 'view', + type: 'function', }, { inputs: [], - name: "VOTE_SUBMITTED_TYPEHASH", + name: 'VOTE_SUBMITTED_TYPEHASH', outputs: [ { - internalType: "bytes32", - name: "", - type: "bytes32", + internalType: 'bytes32', + name: '', + type: 'bytes32', }, ], - stateMutability: "view", - type: "function", + stateMutability: 'view', + type: 'function', }, { inputs: [], - name: "VOTING_ASSET_WITH_SLOT_RAW", + name: 'VOTING_ASSET_WITH_SLOT_RAW', outputs: [ { - internalType: "string", - name: "", - type: "string", + internalType: 'string', + name: '', + type: 'string', }, ], - stateMutability: "view", - type: "function", + stateMutability: 'view', + type: 'function', }, { inputs: [], - name: "VOTING_ASSET_WITH_SLOT_TYPEHASH", + name: 'VOTING_ASSET_WITH_SLOT_TYPEHASH', outputs: [ { - internalType: "bytes32", - name: "", - type: "bytes32", + internalType: 'bytes32', + name: '', + type: 'bytes32', }, ], - stateMutability: "view", - type: "function", + stateMutability: 'view', + type: 'function', }, { inputs: [], - name: "VOTING_STRATEGY", + name: 'VOTING_STRATEGY', outputs: [ { - internalType: "contract IVotingStrategy", - name: "", - type: "address", + internalType: 'contract IVotingStrategy', + name: '', + type: 'address', }, ], - stateMutability: "view", - type: "function", + stateMutability: 'view', + type: 'function', }, { inputs: [ { - internalType: "uint256", - name: "proposalId", - type: "uint256", + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', }, ], - name: "closeAndSendVote", + name: 'closeAndSendVote', outputs: [], - stateMutability: "nonpayable", - type: "function", + stateMutability: 'nonpayable', + type: 'function', }, { inputs: [ { - internalType: "bytes", - name: "message", - type: "bytes", + internalType: 'bytes', + name: 'message', + type: 'bytes', }, ], - name: "decodeMessage", + name: 'decodeMessage', outputs: [ { - internalType: "enum IVotingPortal.MessageType", - name: "", - type: "uint8", + internalType: 'enum IVotingPortal.MessageType', + name: '', + type: 'uint8', }, { - internalType: "bytes", - name: "", - type: "bytes", + internalType: 'bytes', + name: '', + type: 'bytes', }, ], - stateMutability: "pure", - type: "function", + stateMutability: 'pure', + type: 'function', }, { inputs: [ { - internalType: "bytes", - name: "message", - type: "bytes", + internalType: 'bytes', + name: 'message', + type: 'bytes', }, ], - name: "decodeProposalMessage", + name: 'decodeProposalMessage', outputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: 'uint256', + name: '', + type: 'uint256', }, { - internalType: "bytes32", - name: "", - type: "bytes32", + internalType: 'bytes32', + name: '', + type: 'bytes32', }, { - internalType: "uint24", - name: "", - type: "uint24", + internalType: 'uint24', + name: '', + type: 'uint24', }, ], - stateMutability: "pure", - type: "function", + stateMutability: 'pure', + type: 'function', }, { inputs: [ { - internalType: "bytes", - name: "message", - type: "bytes", + internalType: 'bytes', + name: 'message', + type: 'bytes', }, ], - name: "decodeVoteMessage", + name: 'decodeVoteMessage', outputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: 'uint256', + name: '', + type: 'uint256', }, { - internalType: "address", - name: "", - type: "address", + internalType: 'address', + name: '', + type: 'address', }, { - internalType: "bool", - name: "", - type: "bool", + internalType: 'bool', + name: '', + type: 'bool', }, { components: [ { - internalType: "address", - name: "underlyingAsset", - type: "address", + internalType: 'address', + name: 'underlyingAsset', + type: 'address', }, { - internalType: "uint128", - name: "slot", - type: "uint128", + internalType: 'uint128', + name: 'slot', + type: 'uint128', }, ], - internalType: "struct IVotingMachineWithProofs.VotingAssetWithSlot[]", - name: "", - type: "tuple[]", + internalType: 'struct IVotingMachineWithProofs.VotingAssetWithSlot[]', + name: '', + type: 'tuple[]', }, ], - stateMutability: "pure", - type: "function", + stateMutability: 'pure', + type: 'function', }, { inputs: [], - name: "eip712Domain", + name: 'eip712Domain', outputs: [ { - internalType: "bytes1", - name: "fields", - type: "bytes1", + internalType: 'bytes1', + name: 'fields', + type: 'bytes1', }, { - internalType: "string", - name: "name", - type: "string", + internalType: 'string', + name: 'name', + type: 'string', }, { - internalType: "string", - name: "version", - type: "string", + internalType: 'string', + name: 'version', + type: 'string', }, { - internalType: "uint256", - name: "chainId", - type: "uint256", + internalType: 'uint256', + name: 'chainId', + type: 'uint256', }, { - internalType: "address", - name: "verifyingContract", - type: "address", + internalType: 'address', + name: 'verifyingContract', + type: 'address', }, { - internalType: "bytes32", - name: "salt", - type: "bytes32", + internalType: 'bytes32', + name: 'salt', + type: 'bytes32', }, { - internalType: "uint256[]", - name: "extensions", - type: "uint256[]", + internalType: 'uint256[]', + name: 'extensions', + type: 'uint256[]', }, ], - stateMutability: "view", - type: "function", + stateMutability: 'view', + type: 'function', }, { inputs: [], - name: "getGasLimit", + name: 'getGasLimit', outputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: 'uint256', + name: '', + type: 'uint256', }, ], - stateMutability: "view", - type: "function", + stateMutability: 'view', + type: 'function', }, { inputs: [ { - internalType: "uint256", - name: "proposalId", - type: "uint256", + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', }, ], - name: "getProposalById", + name: 'getProposalById', outputs: [ { components: [ { - internalType: "uint256", - name: "id", - type: "uint256", + internalType: 'uint256', + name: 'id', + type: 'uint256', }, { - internalType: "bool", - name: "sentToGovernance", - type: "bool", + internalType: 'bool', + name: 'sentToGovernance', + type: 'bool', }, { - internalType: "uint40", - name: "startTime", - type: "uint40", + internalType: 'uint40', + name: 'startTime', + type: 'uint40', }, { - internalType: "uint40", - name: "endTime", - type: "uint40", + internalType: 'uint40', + name: 'endTime', + type: 'uint40', }, { - internalType: "uint40", - name: "votingClosedAndSentTimestamp", - type: "uint40", + internalType: 'uint40', + name: 'votingClosedAndSentTimestamp', + type: 'uint40', }, { - internalType: "uint128", - name: "forVotes", - type: "uint128", + internalType: 'uint128', + name: 'forVotes', + type: 'uint128', }, { - internalType: "uint128", - name: "againstVotes", - type: "uint128", + internalType: 'uint128', + name: 'againstVotes', + type: 'uint128', }, { - internalType: "uint256", - name: "creationBlockNumber", - type: "uint256", + internalType: 'uint256', + name: 'creationBlockNumber', + type: 'uint256', }, { - internalType: "uint256", - name: "votingClosedAndSentBlockNumber", - type: "uint256", + internalType: 'uint256', + name: 'votingClosedAndSentBlockNumber', + type: 'uint256', }, ], - internalType: "struct IVotingMachineWithProofs.ProposalWithoutVotes", - name: "", - type: "tuple", + internalType: 'struct IVotingMachineWithProofs.ProposalWithoutVotes', + name: '', + type: 'tuple', }, ], - stateMutability: "view", - type: "function", + stateMutability: 'view', + type: 'function', }, { inputs: [ { - internalType: "uint256", - name: "proposalId", - type: "uint256", + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', }, ], - name: "getProposalState", + name: 'getProposalState', outputs: [ { - internalType: "enum IVotingMachineWithProofs.ProposalState", - name: "", - type: "uint8", + internalType: 'enum IVotingMachineWithProofs.ProposalState', + name: '', + type: 'uint8', }, ], - stateMutability: "view", - type: "function", + stateMutability: 'view', + type: 'function', }, { inputs: [ { - internalType: "uint256", - name: "proposalId", - type: "uint256", + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', }, ], - name: "getProposalVoteConfiguration", + name: 'getProposalVoteConfiguration', outputs: [ { components: [ { - internalType: "uint24", - name: "votingDuration", - type: "uint24", + internalType: 'uint24', + name: 'votingDuration', + type: 'uint24', }, { - internalType: "bytes32", - name: "l1ProposalBlockHash", - type: "bytes32", + internalType: 'bytes32', + name: 'l1ProposalBlockHash', + type: 'bytes32', }, ], internalType: - "struct IVotingMachineWithProofs.ProposalVoteConfiguration", - name: "", - type: "tuple", + 'struct IVotingMachineWithProofs.ProposalVoteConfiguration', + name: '', + type: 'tuple', }, ], - stateMutability: "view", - type: "function", + stateMutability: 'view', + type: 'function', }, { inputs: [ { - internalType: "uint256", - name: "skip", - type: "uint256", + internalType: 'uint256', + name: 'skip', + type: 'uint256', }, { - internalType: "uint256", - name: "size", - type: "uint256", + internalType: 'uint256', + name: 'size', + type: 'uint256', }, ], - name: "getProposalsVoteConfigurationIds", + name: 'getProposalsVoteConfigurationIds', outputs: [ { - internalType: "uint256[]", - name: "", - type: "uint256[]", + internalType: 'uint256[]', + name: '', + type: 'uint256[]', }, ], - stateMutability: "view", - type: "function", + stateMutability: 'view', + type: 'function', }, { inputs: [ { - internalType: "address", - name: "user", - type: "address", + internalType: 'address', + name: 'user', + type: 'address', }, { - internalType: "uint256", - name: "proposalId", - type: "uint256", + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', }, ], - name: "getUserProposalVote", + name: 'getUserProposalVote', outputs: [ { components: [ { - internalType: "bool", - name: "support", - type: "bool", + internalType: 'bool', + name: 'support', + type: 'bool', }, { - internalType: "uint248", - name: "votingPower", - type: "uint248", + internalType: 'uint248', + name: 'votingPower', + type: 'uint248', }, ], - internalType: "struct IVotingMachineWithProofs.Vote", - name: "", - type: "tuple", + internalType: 'struct IVotingMachineWithProofs.Vote', + name: '', + type: 'tuple', }, ], - stateMutability: "view", - type: "function", + stateMutability: 'view', + type: 'function', }, { inputs: [], - name: "owner", + name: 'owner', outputs: [ { - internalType: "address", - name: "", - type: "address", + internalType: 'address', + name: '', + type: 'address', }, ], - stateMutability: "view", - type: "function", + stateMutability: 'view', + type: 'function', }, { inputs: [ { - internalType: "address", - name: "originSender", - type: "address", + internalType: 'address', + name: 'originSender', + type: 'address', }, { - internalType: "uint256", - name: "originChainId", - type: "uint256", + internalType: 'uint256', + name: 'originChainId', + type: 'uint256', }, { - internalType: "bytes", - name: "messageWithType", - type: "bytes", + internalType: 'bytes', + name: 'messageWithType', + type: 'bytes', }, ], - name: "receiveCrossChainMessage", + name: 'receiveCrossChainMessage', outputs: [], - stateMutability: "nonpayable", - type: "function", + stateMutability: 'nonpayable', + type: 'function', }, { inputs: [], - name: "renounceOwnership", + name: 'renounceOwnership', outputs: [], - stateMutability: "nonpayable", - type: "function", + stateMutability: 'nonpayable', + type: 'function', }, { inputs: [ { - internalType: "uint256", - name: "proposalId", - type: "uint256", + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', }, ], - name: "startProposalVote", + name: 'startProposalVote', outputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: 'uint256', + name: '', + type: 'uint256', }, ], - stateMutability: "nonpayable", - type: "function", + stateMutability: 'nonpayable', + type: 'function', }, { inputs: [ { - internalType: "uint256", - name: "proposalId", - type: "uint256", + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', }, { - internalType: "bool", - name: "support", - type: "bool", + internalType: 'bool', + name: 'support', + type: 'bool', }, { components: [ { - internalType: "address", - name: "underlyingAsset", - type: "address", + internalType: 'address', + name: 'underlyingAsset', + type: 'address', }, { - internalType: "uint128", - name: "slot", - type: "uint128", + internalType: 'uint128', + name: 'slot', + type: 'uint128', }, { - internalType: "bytes", - name: "proof", - type: "bytes", + internalType: 'bytes', + name: 'proof', + type: 'bytes', }, ], - internalType: "struct IVotingMachineWithProofs.VotingBalanceProof[]", - name: "votingBalanceProofs", - type: "tuple[]", + internalType: 'struct IVotingMachineWithProofs.VotingBalanceProof[]', + name: 'votingBalanceProofs', + type: 'tuple[]', }, ], - name: "submitVote", + name: 'submitVote', outputs: [], - stateMutability: "nonpayable", - type: "function", + stateMutability: 'nonpayable', + type: 'function', }, { inputs: [ { - internalType: "uint256", - name: "proposalId", - type: "uint256", + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', }, { - internalType: "bool", - name: "support", - type: "bool", + internalType: 'bool', + name: 'support', + type: 'bool', }, { - internalType: "address", - name: "voter", - type: "address", + internalType: 'address', + name: 'voter', + type: 'address', }, { - internalType: "bytes", - name: "proofOfRepresentation", - type: "bytes", + internalType: 'bytes', + name: 'proofOfRepresentation', + type: 'bytes', }, { components: [ { - internalType: "address", - name: "underlyingAsset", - type: "address", + internalType: 'address', + name: 'underlyingAsset', + type: 'address', }, { - internalType: "uint128", - name: "slot", - type: "uint128", + internalType: 'uint128', + name: 'slot', + type: 'uint128', }, { - internalType: "bytes", - name: "proof", - type: "bytes", + internalType: 'bytes', + name: 'proof', + type: 'bytes', }, ], - internalType: "struct IVotingMachineWithProofs.VotingBalanceProof[]", - name: "votingBalanceProofs", - type: "tuple[]", + internalType: 'struct IVotingMachineWithProofs.VotingBalanceProof[]', + name: 'votingBalanceProofs', + type: 'tuple[]', }, ], - name: "submitVoteAsRepresentative", + name: 'submitVoteAsRepresentative', outputs: [], - stateMutability: "nonpayable", - type: "function", + stateMutability: 'nonpayable', + type: 'function', }, { inputs: [ { - internalType: "uint256", - name: "proposalId", - type: "uint256", + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', }, { - internalType: "address", - name: "voter", - type: "address", + internalType: 'address', + name: 'voter', + type: 'address', }, { - internalType: "address", - name: "representative", - type: "address", + internalType: 'address', + name: 'representative', + type: 'address', }, { - internalType: "bool", - name: "support", - type: "bool", + internalType: 'bool', + name: 'support', + type: 'bool', }, { - internalType: "bytes", - name: "proofOfRepresentation", - type: "bytes", + internalType: 'bytes', + name: 'proofOfRepresentation', + type: 'bytes', }, { components: [ { - internalType: "address", - name: "underlyingAsset", - type: "address", + internalType: 'address', + name: 'underlyingAsset', + type: 'address', }, { - internalType: "uint128", - name: "slot", - type: "uint128", + internalType: 'uint128', + name: 'slot', + type: 'uint128', }, { - internalType: "bytes", - name: "proof", - type: "bytes", + internalType: 'bytes', + name: 'proof', + type: 'bytes', }, ], - internalType: "struct IVotingMachineWithProofs.VotingBalanceProof[]", - name: "votingBalanceProofs", - type: "tuple[]", + internalType: 'struct IVotingMachineWithProofs.VotingBalanceProof[]', + name: 'votingBalanceProofs', + type: 'tuple[]', }, { components: [ { - internalType: "uint8", - name: "v", - type: "uint8", + internalType: 'uint8', + name: 'v', + type: 'uint8', }, { - internalType: "bytes32", - name: "r", - type: "bytes32", + internalType: 'bytes32', + name: 'r', + type: 'bytes32', }, { - internalType: "bytes32", - name: "s", - type: "bytes32", + internalType: 'bytes32', + name: 's', + type: 'bytes32', }, ], - internalType: "struct IVotingMachineWithProofs.SignatureParams", - name: "signatureParams", - type: "tuple", + internalType: 'struct IVotingMachineWithProofs.SignatureParams', + name: 'signatureParams', + type: 'tuple', }, ], - name: "submitVoteAsRepresentativeBySignature", + name: 'submitVoteAsRepresentativeBySignature', outputs: [], - stateMutability: "nonpayable", - type: "function", + stateMutability: 'nonpayable', + type: 'function', }, { inputs: [ { - internalType: "uint256", - name: "proposalId", - type: "uint256", + internalType: 'uint256', + name: 'proposalId', + type: 'uint256', }, { - internalType: "address", - name: "voter", - type: "address", + internalType: 'address', + name: 'voter', + type: 'address', }, { - internalType: "bool", - name: "support", - type: "bool", + internalType: 'bool', + name: 'support', + type: 'bool', }, { components: [ { - internalType: "address", - name: "underlyingAsset", - type: "address", + internalType: 'address', + name: 'underlyingAsset', + type: 'address', }, { - internalType: "uint128", - name: "slot", - type: "uint128", + internalType: 'uint128', + name: 'slot', + type: 'uint128', }, { - internalType: "bytes", - name: "proof", - type: "bytes", + internalType: 'bytes', + name: 'proof', + type: 'bytes', }, ], - internalType: "struct IVotingMachineWithProofs.VotingBalanceProof[]", - name: "votingBalanceProofs", - type: "tuple[]", + internalType: 'struct IVotingMachineWithProofs.VotingBalanceProof[]', + name: 'votingBalanceProofs', + type: 'tuple[]', }, { - internalType: "uint8", - name: "v", - type: "uint8", + internalType: 'uint8', + name: 'v', + type: 'uint8', }, { - internalType: "bytes32", - name: "r", - type: "bytes32", + internalType: 'bytes32', + name: 'r', + type: 'bytes32', }, { - internalType: "bytes32", - name: "s", - type: "bytes32", + internalType: 'bytes32', + name: 's', + type: 'bytes32', }, ], - name: "submitVoteBySignature", + name: 'submitVoteBySignature', outputs: [], - stateMutability: "nonpayable", - type: "function", + stateMutability: 'nonpayable', + type: 'function', }, { inputs: [ { - internalType: "address", - name: "newOwner", - type: "address", + internalType: 'address', + name: 'newOwner', + type: 'address', }, ], - name: "transferOwnership", + name: 'transferOwnership', outputs: [], - stateMutability: "nonpayable", - type: "function", + stateMutability: 'nonpayable', + type: 'function', }, { inputs: [ { - internalType: "uint256", - name: "gasLimit", - type: "uint256", + internalType: 'uint256', + name: 'gasLimit', + type: 'uint256', }, ], - name: "updateGasLimit", + name: 'updateGasLimit', outputs: [], - stateMutability: "nonpayable", - type: "function", + stateMutability: 'nonpayable', + type: 'function', }, ] as const; @@ -1153,7 +1153,7 @@ export class VotingMachine__factory { } static connect( address: string, - signerOrProvider: Signer | Provider + 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 index 33af0453..7ecdd505 100644 --- a/packages/contract-helpers/src/governance-v3/typechain/factories/index.ts +++ b/packages/contract-helpers/src/governance-v3/typechain/factories/index.ts @@ -1,5 +1,5 @@ /* Autogenerated file. Do not edit manually. */ -/* eslint-disable */ + 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/index.ts b/packages/contract-helpers/src/index.ts index 198b8348..82be851e 100644 --- a/packages/contract-helpers/src/index.ts +++ b/packages/contract-helpers/src/index.ts @@ -32,6 +32,7 @@ export * from './v3-migration-contract'; 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'; diff --git a/packages/contract-helpers/src/token-wrapper/index.ts b/packages/contract-helpers/src/token-wrapper/index.ts new file mode 100644 index 00000000..5dabc168 --- /dev/null +++ b/packages/contract-helpers/src/token-wrapper/index.ts @@ -0,0 +1,162 @@ +import { Signature, SignatureLike, splitSignature } from '@ethersproject/bytes'; +import { BigNumber, PopulatedTransaction, providers } from 'ethers'; +import BaseService from '../commons/BaseService'; +import { + BaseTokenWrapper, + BaseTokenWrapperInterface, + IBaseTokenWrapper, +} from './typechain/TokenWrapper'; +import { BaseTokenWrapper__factory } from './typechain/TokenWrapper_factory'; + +interface SupplyTokenWithPermitParams { + amount: string; + onBehalfOf: string; + referralCode: string; + deadline: string; + signature: SignatureLike; +} + +export interface TokenWrapperServiceInterface { + getTokenInForTokenOut: (amount: string) => Promise; + getTokenOutForTokenIn: (amount: string) => Promise; + supplyToken: ( + amount: string, + onBehalfOf: string, + referralCode: string, + ) => PopulatedTransaction; + supplyTokenWithPermit: ({ + amount, + onBehalfOf, + referralCode, + deadline, + signature, + }: SupplyTokenWithPermitParams) => PopulatedTransaction; + withdrawToken: (amount: string, user: string) => PopulatedTransaction; + withdrawTokenWithPermit: ( + amount: string, + user: string, + deadline: string, + signature: SignatureLike, + ) => PopulatedTransaction; +} + +export class TokenWrapperService + extends BaseService + implements TokenWrapperServiceInterface +{ + readonly tokenWrapperAddress: string; + readonly contractInterface: BaseTokenWrapperInterface; + + private readonly _contract: BaseTokenWrapper; + + constructor(provider: providers.Provider, tokenWrapperAddress: string) { + super(provider, BaseTokenWrapper__factory); + this.tokenWrapperAddress = tokenWrapperAddress; + this.contractInterface = BaseTokenWrapper__factory.createInterface(); + this._contract = BaseTokenWrapper__factory.connect( + tokenWrapperAddress, + provider, + ); + + this.getTokenInForTokenOut = this.getTokenInForTokenOut.bind(this); + this.getTokenOutForTokenIn = this.getTokenOutForTokenIn.bind(this); + this.supplyToken = this.supplyToken.bind(this); + this.supplyTokenWithPermit = this.supplyTokenWithPermit.bind(this); + this.withdrawToken = this.withdrawToken.bind(this); + this.withdrawTokenWithPermit = this.withdrawTokenWithPermit.bind(this); + } + + public async getTokenInForTokenOut(amount: string): Promise { + return this._contract.getTokenInForTokenOut(amount); + } + + public async getTokenOutForTokenIn(amount: string): Promise { + return this._contract.getTokenOutForTokenIn(amount); + } + + public supplyToken( + amount: string, + onBehalfOf: string, + referralCode: string, + ): PopulatedTransaction { + const data = this.contractInterface.encodeFunctionData('supplyToken', [ + amount, + onBehalfOf, + referralCode, + ]); + + return { + to: this.tokenWrapperAddress, + from: onBehalfOf, + data, + }; + } + + public supplyTokenWithPermit({ + amount, + onBehalfOf, + referralCode, + deadline, + signature, + }: SupplyTokenWithPermitParams): PopulatedTransaction { + const sig: Signature = splitSignature(signature); + + const permitStruct: IBaseTokenWrapper.PermitSignatureStruct = { + deadline, + v: sig.v, + r: sig.r, + s: sig.s, + }; + + const data = this.contractInterface.encodeFunctionData( + 'supplyTokenWithPermit', + [amount, onBehalfOf, referralCode, permitStruct], + ); + + return { + to: this.tokenWrapperAddress, + from: onBehalfOf, + data, + }; + } + + public withdrawToken(amount: string, user: string): PopulatedTransaction { + const data = this.contractInterface.encodeFunctionData('withdrawToken', [ + amount, + user, + ]); + + return { + to: this.tokenWrapperAddress, + from: user, + data, + }; + } + + public withdrawTokenWithPermit( + amount: string, + user: string, + deadline: string, + signature: SignatureLike, + ): PopulatedTransaction { + const sig: Signature = splitSignature(signature); + + const permitStruct: IBaseTokenWrapper.PermitSignatureStruct = { + deadline, + v: sig.v, + r: sig.r, + s: sig.s, + }; + + const data = this.contractInterface.encodeFunctionData( + 'withdrawTokenWithPermit', + [amount, user, permitStruct], + ); + + return { + to: this.tokenWrapperAddress, + from: user, + data, + }; + } +} diff --git a/packages/contract-helpers/src/token-wrapper/token-wrapper.test.ts b/packages/contract-helpers/src/token-wrapper/token-wrapper.test.ts new file mode 100644 index 00000000..5a73df95 --- /dev/null +++ b/packages/contract-helpers/src/token-wrapper/token-wrapper.test.ts @@ -0,0 +1,99 @@ +import { providers } from 'ethers'; +import { TokenWrapperService } from './index'; + +describe('SavingsDaiTokenWrapperService', () => { + const tokenWrapperAddress = '0x0000000000000000000000000000000000000001'; + const provider = new providers.JsonRpcProvider(); + describe('Initialization', () => { + it('should initialize SavingsDaiTokenWrapperService', () => { + expect( + () => new TokenWrapperService(provider, tokenWrapperAddress), + ).not.toThrow(); + }); + it('generates supply token tx', () => { + const onBehalfOf = '0x0000000000000000000000000000000000000004'; + const tokenWrapperService = new TokenWrapperService( + provider, + tokenWrapperAddress, + ); + const tx = tokenWrapperService.supplyToken( + '10000000000000000000', + onBehalfOf, + '0', + ); + expect(tx.to).toEqual(tokenWrapperAddress); + expect(tx.from).toEqual(onBehalfOf); + expect(tx.data).toEqual( + '0x1461e2160000000000000000000000000000000000000000000000008ac7230489e8000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000', + ); + }); + it('generates supply with permit tx', () => { + const onBehalfOf = '0x0000000000000000000000000000000000000004'; + const tokenWrapperService = new TokenWrapperService( + provider, + tokenWrapperAddress, + ); + const tx = tokenWrapperService.supplyTokenWithPermit({ + amount: '10000000000000000000', + onBehalfOf, + referralCode: '0', + deadline: '10000', + signature: + '0x532f8df4e2502bd869fb35e9301156f9b307380afdcc25cfbc87b2e939f16f7e47c326dc26eb918d327358797ee67ad7415d871ef7eaf0d4f6352d3ad021fbb41c', + }); + expect(tx.to).toEqual(tokenWrapperAddress); + expect(tx.from).toEqual(onBehalfOf); + expect(tx.data).toEqual( + '0x4f4663a10000000000000000000000000000000000000000000000008ac7230489e80000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000001c532f8df4e2502bd869fb35e9301156f9b307380afdcc25cfbc87b2e939f16f7e47c326dc26eb918d327358797ee67ad7415d871ef7eaf0d4f6352d3ad021fbb4', + ); + }); + it('generates withdraw token tx', () => { + const user = '0x0000000000000000000000000000000000000004'; + const tokenWrapperService = new TokenWrapperService( + provider, + tokenWrapperAddress, + ); + const tx = tokenWrapperService.withdrawToken( + '10000000000000000000', + user, + ); + expect(tx.to).toEqual(tokenWrapperAddress); + expect(tx.from).toEqual(user); + expect(tx.data).toEqual( + '0xbe4b17720000000000000000000000000000000000000000000000008ac7230489e800000000000000000000000000000000000000000000000000000000000000000004', + ); + }); + it('generates withdraw token with permit tx', () => { + const user = '0x0000000000000000000000000000000000000004'; + const tokenWrapperService = new TokenWrapperService( + provider, + tokenWrapperAddress, + ); + const tx = tokenWrapperService.withdrawTokenWithPermit( + '10000000000000000000', + user, + '10000', + '0x532f8df4e2502bd869fb35e9301156f9b307380afdcc25cfbc87b2e939f16f7e47c326dc26eb918d327358797ee67ad7415d871ef7eaf0d4f6352d3ad021fbb41c', + ); + expect(tx.to).toEqual(tokenWrapperAddress); + expect(tx.from).toEqual(user); + expect(tx.data).toEqual( + '0xe94875ca0000000000000000000000000000000000000000000000008ac7230489e8000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000001c532f8df4e2502bd869fb35e9301156f9b307380afdcc25cfbc87b2e939f16f7e47c326dc26eb918d327358797ee67ad7415d871ef7eaf0d4f6352d3ad021fbb4', + ); + }); + }); + describe('get token preview', () => { + it('should not throw for token in', async () => { + const service = new TokenWrapperService(provider, tokenWrapperAddress); + await expect( + service.getTokenInForTokenOut('10000000000000000000'), + ).rejects.toThrow(); + }); + it('should not throw for token out', async () => { + const service = new TokenWrapperService(provider, tokenWrapperAddress); + await expect( + service.getTokenOutForTokenIn('10000000000000000000'), + ).rejects.toThrow(); + }); + }); +}); diff --git a/packages/contract-helpers/src/token-wrapper/typechain/TokenWrapper.d.ts b/packages/contract-helpers/src/token-wrapper/typechain/TokenWrapper.d.ts new file mode 100644 index 00000000..b5f72bcb --- /dev/null +++ b/packages/contract-helpers/src/token-wrapper/typechain/TokenWrapper.d.ts @@ -0,0 +1,573 @@ +/* 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 IBaseTokenWrapper { + export type PermitSignatureStruct = { + deadline: BigNumberish; + v: BigNumberish; + r: BytesLike; + s: BytesLike; + }; + + export type PermitSignatureStructOutput = [ + BigNumber, + number, + string, + string, + ] & { deadline: BigNumber; v: number; r: string; s: string }; +} + +export interface BaseTokenWrapperInterface extends utils.Interface { + functions: { + 'POOL()': FunctionFragment; + 'TOKEN_IN()': FunctionFragment; + 'TOKEN_OUT()': FunctionFragment; + 'getTokenInForTokenOut(uint256)': FunctionFragment; + 'getTokenOutForTokenIn(uint256)': FunctionFragment; + 'owner()': FunctionFragment; + 'renounceOwnership()': FunctionFragment; + 'rescueETH(address,uint256)': FunctionFragment; + 'rescueTokens(address,address,uint256)': FunctionFragment; + 'supplyToken(uint256,address,uint16)': FunctionFragment; + 'supplyTokenWithPermit(uint256,address,uint16,(uint256,uint8,bytes32,bytes32))': FunctionFragment; + 'transferOwnership(address)': FunctionFragment; + 'withdrawToken(uint256,address)': FunctionFragment; + 'withdrawTokenWithPermit(uint256,address,(uint256,uint8,bytes32,bytes32))': FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | 'POOL' + | 'TOKEN_IN' + | 'TOKEN_OUT' + | 'getTokenInForTokenOut' + | 'getTokenOutForTokenIn' + | 'owner' + | 'renounceOwnership' + | 'rescueETH' + | 'rescueTokens' + | 'supplyToken' + | 'supplyTokenWithPermit' + | 'transferOwnership' + | 'withdrawToken' + | 'withdrawTokenWithPermit', + ): FunctionFragment; + + encodeFunctionData(functionFragment: 'POOL', values?: undefined): string; + encodeFunctionData(functionFragment: 'TOKEN_IN', values?: undefined): string; + encodeFunctionData(functionFragment: 'TOKEN_OUT', values?: undefined): string; + encodeFunctionData( + functionFragment: 'getTokenInForTokenOut', + values: [BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'getTokenOutForTokenIn', + values: [BigNumberish], + ): string; + encodeFunctionData(functionFragment: 'owner', values?: undefined): string; + encodeFunctionData( + functionFragment: 'renounceOwnership', + values?: undefined, + ): string; + encodeFunctionData( + functionFragment: 'rescueETH', + values: [string, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'rescueTokens', + values: [string, string, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'supplyToken', + values: [BigNumberish, string, BigNumberish], + ): string; + encodeFunctionData( + functionFragment: 'supplyTokenWithPermit', + values: [ + BigNumberish, + string, + BigNumberish, + IBaseTokenWrapper.PermitSignatureStruct, + ], + ): string; + encodeFunctionData( + functionFragment: 'transferOwnership', + values: [string], + ): string; + encodeFunctionData( + functionFragment: 'withdrawToken', + values: [BigNumberish, string], + ): string; + encodeFunctionData( + functionFragment: 'withdrawTokenWithPermit', + values: [BigNumberish, string, IBaseTokenWrapper.PermitSignatureStruct], + ): string; + + decodeFunctionResult(functionFragment: 'POOL', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'TOKEN_IN', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'TOKEN_OUT', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'getTokenInForTokenOut', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'getTokenOutForTokenIn', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'renounceOwnership', + data: BytesLike, + ): Result; + decodeFunctionResult(functionFragment: 'rescueETH', data: BytesLike): Result; + decodeFunctionResult( + functionFragment: 'rescueTokens', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'supplyToken', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'supplyTokenWithPermit', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'transferOwnership', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'withdrawToken', + data: BytesLike, + ): Result; + decodeFunctionResult( + functionFragment: 'withdrawTokenWithPermit', + data: BytesLike, + ): Result; + + events: { + 'OwnershipTransferred(address,address)': EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: 'OwnershipTransferred'): EventFragment; +} + +export interface OwnershipTransferredEventObject { + previousOwner: string; + newOwner: string; +} +export type OwnershipTransferredEvent = TypedEvent< + [string, string], + OwnershipTransferredEventObject +>; + +export type OwnershipTransferredEventFilter = + TypedEventFilter; + +export interface BaseTokenWrapper extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: BaseTokenWrapperInterface; + + 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: { + POOL(overrides?: CallOverrides): Promise<[string]>; + + TOKEN_IN(overrides?: CallOverrides): Promise<[string]>; + + TOKEN_OUT(overrides?: CallOverrides): Promise<[string]>; + + getTokenInForTokenOut( + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + getTokenOutForTokenIn( + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + owner(overrides?: CallOverrides): Promise<[string]>; + + renounceOwnership( + overrides?: Overrides & { from?: string }, + ): Promise; + + rescueETH( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + rescueTokens( + token: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + supplyToken( + amount: BigNumberish, + onBehalfOf: string, + referralCode: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + supplyTokenWithPermit( + amount: BigNumberish, + onBehalfOf: string, + referralCode: BigNumberish, + signature: IBaseTokenWrapper.PermitSignatureStruct, + overrides?: Overrides & { from?: string }, + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + withdrawToken( + amount: BigNumberish, + to: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + withdrawTokenWithPermit( + amount: BigNumberish, + to: string, + signature: IBaseTokenWrapper.PermitSignatureStruct, + overrides?: Overrides & { from?: string }, + ): Promise; + }; + + POOL(overrides?: CallOverrides): Promise; + + TOKEN_IN(overrides?: CallOverrides): Promise; + + TOKEN_OUT(overrides?: CallOverrides): Promise; + + getTokenInForTokenOut( + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getTokenOutForTokenIn( + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string }, + ): Promise; + + rescueETH( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + rescueTokens( + token: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + supplyToken( + amount: BigNumberish, + onBehalfOf: string, + referralCode: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + supplyTokenWithPermit( + amount: BigNumberish, + onBehalfOf: string, + referralCode: BigNumberish, + signature: IBaseTokenWrapper.PermitSignatureStruct, + overrides?: Overrides & { from?: string }, + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + withdrawToken( + amount: BigNumberish, + to: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + withdrawTokenWithPermit( + amount: BigNumberish, + to: string, + signature: IBaseTokenWrapper.PermitSignatureStruct, + overrides?: Overrides & { from?: string }, + ): Promise; + + callStatic: { + POOL(overrides?: CallOverrides): Promise; + + TOKEN_IN(overrides?: CallOverrides): Promise; + + TOKEN_OUT(overrides?: CallOverrides): Promise; + + getTokenInForTokenOut( + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getTokenOutForTokenIn( + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + rescueETH( + to: string, + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + rescueTokens( + token: string, + to: string, + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + supplyToken( + amount: BigNumberish, + onBehalfOf: string, + referralCode: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + supplyTokenWithPermit( + amount: BigNumberish, + onBehalfOf: string, + referralCode: BigNumberish, + signature: IBaseTokenWrapper.PermitSignatureStruct, + overrides?: CallOverrides, + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: CallOverrides, + ): Promise; + + withdrawToken( + amount: BigNumberish, + to: string, + overrides?: CallOverrides, + ): Promise; + + withdrawTokenWithPermit( + amount: BigNumberish, + to: string, + signature: IBaseTokenWrapper.PermitSignatureStruct, + overrides?: CallOverrides, + ): Promise; + }; + + filters: { + 'OwnershipTransferred(address,address)'( + previousOwner?: string | null, + newOwner?: string | null, + ): OwnershipTransferredEventFilter; + OwnershipTransferred( + previousOwner?: string | null, + newOwner?: string | null, + ): OwnershipTransferredEventFilter; + }; + + estimateGas: { + POOL(overrides?: CallOverrides): Promise; + + TOKEN_IN(overrides?: CallOverrides): Promise; + + TOKEN_OUT(overrides?: CallOverrides): Promise; + + getTokenInForTokenOut( + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getTokenOutForTokenIn( + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string }, + ): Promise; + + rescueETH( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + rescueTokens( + token: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + supplyToken( + amount: BigNumberish, + onBehalfOf: string, + referralCode: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + supplyTokenWithPermit( + amount: BigNumberish, + onBehalfOf: string, + referralCode: BigNumberish, + signature: IBaseTokenWrapper.PermitSignatureStruct, + overrides?: Overrides & { from?: string }, + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + withdrawToken( + amount: BigNumberish, + to: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + withdrawTokenWithPermit( + amount: BigNumberish, + to: string, + signature: IBaseTokenWrapper.PermitSignatureStruct, + overrides?: Overrides & { from?: string }, + ): Promise; + }; + + populateTransaction: { + POOL(overrides?: CallOverrides): Promise; + + TOKEN_IN(overrides?: CallOverrides): Promise; + + TOKEN_OUT(overrides?: CallOverrides): Promise; + + getTokenInForTokenOut( + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + getTokenOutForTokenIn( + amount: BigNumberish, + overrides?: CallOverrides, + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string }, + ): Promise; + + rescueETH( + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + rescueTokens( + token: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + supplyToken( + amount: BigNumberish, + onBehalfOf: string, + referralCode: BigNumberish, + overrides?: Overrides & { from?: string }, + ): Promise; + + supplyTokenWithPermit( + amount: BigNumberish, + onBehalfOf: string, + referralCode: BigNumberish, + signature: IBaseTokenWrapper.PermitSignatureStruct, + overrides?: Overrides & { from?: string }, + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + withdrawToken( + amount: BigNumberish, + to: string, + overrides?: Overrides & { from?: string }, + ): Promise; + + withdrawTokenWithPermit( + amount: BigNumberish, + to: string, + signature: IBaseTokenWrapper.PermitSignatureStruct, + overrides?: Overrides & { from?: string }, + ): Promise; + }; +} diff --git a/packages/contract-helpers/src/token-wrapper/typechain/TokenWrapper_factory.ts b/packages/contract-helpers/src/token-wrapper/typechain/TokenWrapper_factory.ts new file mode 100644 index 00000000..ad60a6b8 --- /dev/null +++ b/packages/contract-helpers/src/token-wrapper/typechain/TokenWrapper_factory.ts @@ -0,0 +1,343 @@ +/* Autogenerated file. Do not edit manually. */ +/* eslint-disable */ + +import { Contract, Signer, utils } from 'ethers'; +import type { Provider } from '@ethersproject/providers'; +import type { + BaseTokenWrapper, + BaseTokenWrapperInterface, +} from './TokenWrapper'; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'previousOwner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'OwnershipTransferred', + type: 'event', + }, + { + inputs: [], + name: 'POOL', + outputs: [ + { + internalType: 'contract IPool', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'TOKEN_IN', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'TOKEN_OUT', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'getTokenInForTokenOut', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'getTokenOutForTokenIn', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'owner', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'renounceOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'rescueETH', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'contract IERC20', + name: 'token', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'rescueTokens', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + { + internalType: 'address', + name: 'onBehalfOf', + type: 'address', + }, + { + internalType: 'uint16', + name: 'referralCode', + type: 'uint16', + }, + ], + name: 'supplyToken', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + { + internalType: 'address', + name: 'onBehalfOf', + type: 'address', + }, + { + internalType: 'uint16', + name: 'referralCode', + type: 'uint16', + }, + { + components: [ + { + 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 IBaseTokenWrapper.PermitSignature', + name: 'signature', + type: 'tuple', + }, + ], + name: 'supplyTokenWithPermit', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'transferOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + ], + name: 'withdrawToken', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + components: [ + { + 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 IBaseTokenWrapper.PermitSignature', + name: 'signature', + type: 'tuple', + }, + ], + name: 'withdrawTokenWithPermit', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, +] as const; + +export class BaseTokenWrapper__factory { + static readonly abi = _abi; + static createInterface(): BaseTokenWrapperInterface { + return new utils.Interface(_abi) as BaseTokenWrapperInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider, + ): BaseTokenWrapper { + return new Contract(address, _abi, signerOrProvider) as BaseTokenWrapper; + } +} diff --git a/packages/math-utils/CHANGELOG.md b/packages/math-utils/CHANGELOG.md index 5b2df6eb..697a0f6f 100644 --- a/packages/math-utils/CHANGELOG.md +++ b/packages/math-utils/CHANGELOG.md @@ -1,57 +1,38 @@ # Change Log -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +All notable changes to this project will be documented in this file. See +[Conventional Commits](https://conventionalcommits.org) for commit guidelines. # 1.24.0 (2024-02-05) - ### Features -* abpt v2 migration ([#573](https://github.com/aave/aave-utilities/issues/573)) ([75bb4c0](https://github.com/aave/aave-utilities/commit/75bb4c038ea10b8faf42630a7fb580e7317623b8)) - - - - +- abpt v2 migration ([#573](https://github.com/aave/aave-utilities/issues/573)) + ([75bb4c0](https://github.com/aave/aave-utilities/commit/75bb4c038ea10b8faf42630a7fb580e7317623b8)) ## 1.23.1 (2024-01-24) **Note:** Version bump only for package @aave/math-utils - - - - # 1.23.0 (2024-01-19) - ### Features -* add bnb ([#571](https://github.com/aave/aave-utilities/issues/571)) ([5b92d16](https://github.com/aave/aave-utilities/commit/5b92d16a39dfb47e0cae95fd3480863b8f9afc75)) - - - - +- add bnb ([#571](https://github.com/aave/aave-utilities/issues/571)) + ([5b92d16](https://github.com/aave/aave-utilities/commit/5b92d16a39dfb47e0cae95fd3480863b8f9afc75)) # 1.22.0 (2024-01-18) - ### Features -* gov v3 ([#564](https://github.com/aave/aave-utilities/issues/564)) ([335588e](https://github.com/aave/aave-utilities/commit/335588e2e04056b631a47b1ede50594baebd158e)), closes [#567](https://github.com/aave/aave-utilities/issues/567) - - - - +- gov v3 ([#564](https://github.com/aave/aave-utilities/issues/564)) + ([335588e](https://github.com/aave/aave-utilities/commit/335588e2e04056b631a47b1ede50594baebd158e)), + closes [#567](https://github.com/aave/aave-utilities/issues/567) ## 1.21.1 (2023-11-21) **Note:** Version bump only for package @aave/math-utils - - - - # Change Log All notable changes to this project will be documented in this file. See @@ -59,14 +40,11 @@ All notable changes to this project will be documented in this file. See # 1.21.0 (2023-10-04) - ### Features -* updated debt switch interface ([#559](https://github.com/aave/aave-utilities/issues/559)) ([b108c62](https://github.com/aave/aave-utilities/commit/b108c620cf0e3e446840c166b660695ebd66563b)) - - - - +- updated debt switch interface + ([#559](https://github.com/aave/aave-utilities/issues/559)) + ([b108c62](https://github.com/aave/aave-utilities/commit/b108c620cf0e3e446840c166b660695ebd66563b)) # 1.20.0 (2023-08-22)