-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
542 additions
and
38 deletions.
There are no files selected for viewing
28 changes: 1 addition & 27 deletions
28
packages/contract-helpers/src/governance-v3/governance-data-helper/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
packages/contract-helpers/src/governance-v3/typechain/VotingMachine.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
208 changes: 208 additions & 0 deletions
208
packages/contract-helpers/src/governance-v3/typechain/VotingMachineDataHelper.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,208 @@ | ||
/* Autogenerated file. Do not edit manually. */ | ||
/* eslint-disable */ | ||
import type { | ||
BaseContract, | ||
BigNumber, | ||
BigNumberish, | ||
BytesLike, | ||
CallOverrides, | ||
PopulatedTransaction, | ||
Signer, | ||
utils, | ||
} from 'ethers'; | ||
import type { FunctionFragment, Result } from '@ethersproject/abi'; | ||
import type { Listener, Provider } from '@ethersproject/providers'; | ||
import type { | ||
TypedEventFilter, | ||
TypedEvent, | ||
TypedListener, | ||
OnEvent, | ||
} from './common'; | ||
|
||
export declare namespace IVotingMachineDataHelper { | ||
export type InitialProposalStruct = { | ||
id: BigNumberish; | ||
snapshotBlockHash: BytesLike; | ||
}; | ||
|
||
export type InitialProposalStructOutput = [BigNumber, string] & { | ||
id: BigNumber; | ||
snapshotBlockHash: string; | ||
}; | ||
|
||
export type VotedInfoStruct = { support: boolean; votingPower: BigNumberish }; | ||
|
||
export type VotedInfoStructOutput = [boolean, BigNumber] & { | ||
support: boolean; | ||
votingPower: BigNumber; | ||
}; | ||
|
||
export type ProposalStruct = { | ||
proposalData: IVotingMachineWithProofs.ProposalWithoutVotesStruct; | ||
votedInfo: IVotingMachineDataHelper.VotedInfoStruct; | ||
strategy: string; | ||
dataWarehouse: string; | ||
votingAssets: string[]; | ||
hasRequiredRoots: boolean; | ||
voteConfig: IVotingMachineWithProofs.ProposalVoteConfigurationStruct; | ||
state: BigNumberish; | ||
}; | ||
|
||
export type ProposalStructOutput = [ | ||
IVotingMachineWithProofs.ProposalWithoutVotesStructOutput, | ||
IVotingMachineDataHelper.VotedInfoStructOutput, | ||
string, | ||
string, | ||
string[], | ||
boolean, | ||
IVotingMachineWithProofs.ProposalVoteConfigurationStructOutput, | ||
number, | ||
] & { | ||
proposalData: IVotingMachineWithProofs.ProposalWithoutVotesStructOutput; | ||
votedInfo: IVotingMachineDataHelper.VotedInfoStructOutput; | ||
strategy: string; | ||
dataWarehouse: string; | ||
votingAssets: string[]; | ||
hasRequiredRoots: boolean; | ||
voteConfig: IVotingMachineWithProofs.ProposalVoteConfigurationStructOutput; | ||
state: number; | ||
}; | ||
} | ||
|
||
export declare namespace IVotingMachineWithProofs { | ||
export type ProposalWithoutVotesStruct = { | ||
id: BigNumberish; | ||
sentToGovernance: boolean; | ||
startTime: BigNumberish; | ||
endTime: BigNumberish; | ||
votingClosedAndSentTimestamp: BigNumberish; | ||
forVotes: BigNumberish; | ||
againstVotes: BigNumberish; | ||
creationBlockNumber: BigNumberish; | ||
votingClosedAndSentBlockNumber: BigNumberish; | ||
}; | ||
|
||
export type ProposalWithoutVotesStructOutput = [ | ||
BigNumber, | ||
boolean, | ||
number, | ||
number, | ||
number, | ||
BigNumber, | ||
BigNumber, | ||
BigNumber, | ||
BigNumber, | ||
] & { | ||
id: BigNumber; | ||
sentToGovernance: boolean; | ||
startTime: number; | ||
endTime: number; | ||
votingClosedAndSentTimestamp: number; | ||
forVotes: BigNumber; | ||
againstVotes: BigNumber; | ||
creationBlockNumber: BigNumber; | ||
votingClosedAndSentBlockNumber: BigNumber; | ||
}; | ||
|
||
export type ProposalVoteConfigurationStruct = { | ||
votingDuration: BigNumberish; | ||
l1ProposalBlockHash: BytesLike; | ||
}; | ||
|
||
export type ProposalVoteConfigurationStructOutput = [number, string] & { | ||
votingDuration: number; | ||
l1ProposalBlockHash: string; | ||
}; | ||
} | ||
|
||
export interface VotingMachineDataHelperInterface extends utils.Interface { | ||
functions: { | ||
'getProposalsData(address,(uint256,bytes32)[],address)': FunctionFragment; | ||
}; | ||
|
||
getFunction(nameOrSignatureOrTopic: 'getProposalsData'): FunctionFragment; | ||
|
||
encodeFunctionData( | ||
functionFragment: 'getProposalsData', | ||
values: [string, IVotingMachineDataHelper.InitialProposalStruct[], string], | ||
): string; | ||
|
||
decodeFunctionResult( | ||
functionFragment: 'getProposalsData', | ||
data: BytesLike, | ||
): Result; | ||
|
||
events: {}; | ||
} | ||
|
||
export interface VotingMachineDataHelper extends BaseContract { | ||
connect(signerOrProvider: Signer | Provider | string): this; | ||
attach(addressOrName: string): this; | ||
deployed(): Promise<this>; | ||
|
||
interface: VotingMachineDataHelperInterface; | ||
|
||
queryFilter<TEvent extends TypedEvent>( | ||
event: TypedEventFilter<TEvent>, | ||
fromBlockOrBlockhash?: string | number | undefined, | ||
toBlock?: string | number | undefined, | ||
): Promise<Array<TEvent>>; | ||
|
||
listeners<TEvent extends TypedEvent>( | ||
eventFilter?: TypedEventFilter<TEvent>, | ||
): Array<TypedListener<TEvent>>; | ||
listeners(eventName?: string): Array<Listener>; | ||
removeAllListeners<TEvent extends TypedEvent>( | ||
eventFilter: TypedEventFilter<TEvent>, | ||
): this; | ||
removeAllListeners(eventName?: string): this; | ||
off: OnEvent<this>; | ||
on: OnEvent<this>; | ||
once: OnEvent<this>; | ||
removeListener: OnEvent<this>; | ||
|
||
functions: { | ||
getProposalsData( | ||
votingMachine: string, | ||
initialProposals: IVotingMachineDataHelper.InitialProposalStruct[], | ||
user: string, | ||
overrides?: CallOverrides, | ||
): Promise<[IVotingMachineDataHelper.ProposalStructOutput[]]>; | ||
}; | ||
|
||
getProposalsData( | ||
votingMachine: string, | ||
initialProposals: IVotingMachineDataHelper.InitialProposalStruct[], | ||
user: string, | ||
overrides?: CallOverrides, | ||
): Promise<IVotingMachineDataHelper.ProposalStructOutput[]>; | ||
|
||
callStatic: { | ||
getProposalsData( | ||
votingMachine: string, | ||
initialProposals: IVotingMachineDataHelper.InitialProposalStruct[], | ||
user: string, | ||
overrides?: CallOverrides, | ||
): Promise<IVotingMachineDataHelper.ProposalStructOutput[]>; | ||
}; | ||
|
||
filters: {}; | ||
|
||
estimateGas: { | ||
getProposalsData( | ||
votingMachine: string, | ||
initialProposals: IVotingMachineDataHelper.InitialProposalStruct[], | ||
user: string, | ||
overrides?: CallOverrides, | ||
): Promise<BigNumber>; | ||
}; | ||
|
||
populateTransaction: { | ||
getProposalsData( | ||
votingMachine: string, | ||
initialProposals: IVotingMachineDataHelper.InitialProposalStruct[], | ||
user: string, | ||
overrides?: CallOverrides, | ||
): Promise<PopulatedTransaction>; | ||
}; | ||
} |
Oops, something went wrong.