UNPKG

@q-dev/gdk-sdk

Version:

Typescript Library to interact with GDK Contracts

1,543 lines 82.5 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ExpertsDAOVoting__factory = void 0; /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ const ethers_1 = require("ethers"); const _abi = [ { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "previousAdmin", type: "address", }, { indexed: false, internalType: "address", name: "newAdmin", type: "address", }, ], name: "AdminChanged", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "beacon", type: "address", }, ], name: "BeaconUpgraded", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint8", name: "version", type: "uint8", }, ], name: "Initialized", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "uint256", name: "id", type: "uint256", }, { indexed: true, internalType: "address", name: "proposer", type: "address", }, { components: [ { internalType: "uint256", name: "id", type: "uint256", }, { internalType: "string", name: "remark", type: "string", }, { internalType: "string", name: "relatedExpertPanel", type: "string", }, { internalType: "string", name: "relatedVotingSituation", type: "string", }, { internalType: "bytes", name: "callData", type: "bytes", }, { internalType: "address", name: "target", type: "address", }, { components: [ { internalType: "enum VotingType", name: "votingType", type: "uint8", }, { internalType: "uint256", name: "votingStartTime", type: "uint256", }, { internalType: "uint256", name: "votingEndTime", type: "uint256", }, { internalType: "uint256", name: "vetoEndTime", type: "uint256", }, { internalType: "uint256", name: "proposalExecutionPeriod", type: "uint256", }, { internalType: "uint256", name: "requiredQuorum", type: "uint256", }, { internalType: "uint256", name: "requiredMajority", type: "uint256", }, { internalType: "uint256", name: "requiredVetoQuorum", type: "uint256", }, ], internalType: "struct IDAOVoting.VotingParams", name: "params", type: "tuple", }, { components: [ { internalType: "uint256", name: "votedFor", type: "uint256", }, { internalType: "uint256", name: "votedAgainst", type: "uint256", }, { internalType: "uint256", name: "vetoesCount", type: "uint256", }, ], internalType: "struct IDAOVoting.VotingCounters", name: "counters", type: "tuple", }, { internalType: "bool", name: "executed", type: "bool", }, ], indexed: false, internalType: "struct IDAOVoting.DAOProposal", name: "proposal", type: "tuple", }, ], name: "ProposalCreated", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "uint256", name: "id", type: "uint256", }, ], name: "ProposalExecuted", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "implementation", type: "address", }, ], name: "Upgraded", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "uint256", name: "id", type: "uint256", }, { indexed: true, internalType: "address", name: "voter", type: "address", }, ], name: "UserVetoed", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "uint256", name: "id", type: "uint256", }, { indexed: true, internalType: "address", name: "voter", type: "address", }, { indexed: false, internalType: "uint256", name: "votingPower", type: "uint256", }, { indexed: false, internalType: "uint8", name: "option", type: "uint8", }, ], name: "UserVoted", type: "event", }, { inputs: [], name: "DAO_VOTING_RESOURCE", outputs: [ { internalType: "string", name: "", type: "string", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "votingToken_", type: "address", }, { internalType: "string", name: "panelName_", type: "string", }, { internalType: "string", name: "resource_", type: "string", }, ], name: "__DAOVoting_init", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "member_", type: "address", }, { internalType: "string", name: "permission_", type: "string", }, ], name: "checkPermission", outputs: [ { internalType: "bool", name: "", type: "bool", }, ], stateMutability: "view", type: "function", }, { inputs: [ { components: [ { internalType: "string", name: "votingSituationName", type: "string", }, { components: [ { internalType: "uint256", name: "votingPeriod", type: "uint256", }, { internalType: "uint256", name: "vetoPeriod", type: "uint256", }, { internalType: "uint256", name: "proposalExecutionPeriod", type: "uint256", }, { internalType: "uint256", name: "requiredQuorum", type: "uint256", }, { internalType: "uint256", name: "requiredMajority", type: "uint256", }, { internalType: "uint256", name: "requiredVetoQuorum", type: "uint256", }, { internalType: "uint256", name: "votingType", type: "uint256", }, { internalType: "string", name: "votingTarget", type: "string", }, { internalType: "uint256", name: "votingMinAmount", type: "uint256", }, ], internalType: "struct IDAOVoting.DAOVotingValues", name: "votingValues", type: "tuple", }, ], internalType: "struct IDAOVoting.InitialSituation", name: "conf_", type: "tuple", }, ], name: "createDAOVotingSituation", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { components: [ { components: [ { internalType: "string", name: "votingSituationName", type: "string", }, { components: [ { internalType: "uint256", name: "votingPeriod", type: "uint256", }, { internalType: "uint256", name: "vetoPeriod", type: "uint256", }, { internalType: "uint256", name: "proposalExecutionPeriod", type: "uint256", }, { internalType: "uint256", name: "requiredQuorum", type: "uint256", }, { internalType: "uint256", name: "requiredMajority", type: "uint256", }, { internalType: "uint256", name: "requiredVetoQuorum", type: "uint256", }, { internalType: "uint256", name: "votingType", type: "uint256", }, { internalType: "string", name: "votingTarget", type: "string", }, { internalType: "uint256", name: "votingMinAmount", type: "uint256", }, ], internalType: "struct IDAOVoting.DAOVotingValues", name: "votingValues", type: "tuple", }, ], internalType: "struct IDAOVoting.InitialSituation", name: "initialSituation", type: "tuple", }, { internalType: "string", name: "externalLink", type: "string", }, ], internalType: "struct IDAOVoting.ExtendedSituation", name: "conf_", type: "tuple", }, ], name: "createDAOVotingSituationWithLink", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "string", name: "situation_", type: "string", }, { internalType: "string", name: "remark_", type: "string", }, { internalType: "bytes", name: "callData_", type: "bytes", }, ], name: "createProposal", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "nonpayable", type: "function", }, { inputs: [], name: "daoMemberStorage", outputs: [ { internalType: "contract DAOMemberStorage", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "daoParameterStorage", outputs: [ { internalType: "contract DAOParameterStorage", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "daoRegistry", outputs: [ { internalType: "contract DAORegistry", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "daoVault", outputs: [ { internalType: "contract DAOVault", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", name: "proposalId_", type: "uint256", }, ], name: "executeProposal", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", name: "proposalId_", type: "uint256", }, { internalType: "bytes", name: "signature_", type: "bytes", }, ], name: "executeProposalWithSignature", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], name: "getCurrentExecutingProposalId", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "getInjector", outputs: [ { internalType: "address", name: "injector_", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", name: "proposalId_", type: "uint256", }, ], name: "getProposal", outputs: [ { components: [ { internalType: "uint256", name: "id", type: "uint256", }, { internalType: "string", name: "remark", type: "string", }, { internalType: "string", name: "relatedExpertPanel", type: "string", }, { internalType: "string", name: "relatedVotingSituation", type: "string", }, { internalType: "bytes", name: "callData", type: "bytes", }, { internalType: "address", name: "target", type: "address", }, { components: [ { internalType: "enum VotingType", name: "votingType", type: "uint8", }, { internalType: "uint256", name: "votingStartTime", type: "uint256", }, { internalType: "uint256", name: "votingEndTime", type: "uint256", }, { internalType: "uint256", name: "vetoEndTime", type: "uint256", }, { internalType: "uint256", name: "proposalExecutionPeriod", type: "uint256", }, { internalType: "uint256", name: "requiredQuorum", type: "uint256", }, { internalType: "uint256", name: "requiredMajority", type: "uint256", }, { internalType: "uint256", name: "requiredVetoQuorum", type: "uint256", }, ], internalType: "struct IDAOVoting.VotingParams", name: "params", type: "tuple", }, { components: [ { internalType: "uint256", name: "votedFor", type: "uint256", }, { internalType: "uint256", name: "votedAgainst", type: "uint256", }, { internalType: "uint256", name: "vetoesCount", type: "uint256", }, ], internalType: "struct IDAOVoting.VotingCounters", name: "counters", type: "tuple", }, { internalType: "bool", name: "executed", type: "bool", }, ], internalType: "struct IDAOVoting.DAOProposal", name: "", type: "tuple", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", name: "offset_", type: "uint256", }, { internalType: "uint256", name: "limit_", type: "uint256", }, ], name: "getProposalList", outputs: [ { components: [ { internalType: "uint256", name: "id", type: "uint256", }, { internalType: "string", name: "remark", type: "string", }, { internalType: "string", name: "relatedExpertPanel", type: "string", }, { internalType: "string", name: "relatedVotingSituation", type: "string", }, { internalType: "bytes", name: "callData", type: "bytes", }, { internalType: "address", name: "target", type: "address", }, { components: [ { internalType: "enum VotingType", name: "votingType", type: "uint8", }, { internalType: "uint256", name: "votingStartTime", type: "uint256", }, { internalType: "uint256", name: "votingEndTime", type: "uint256", }, { internalType: "uint256", name: "vetoEndTime", type: "uint256", }, { internalType: "uint256", name: "proposalExecutionPeriod", type: "uint256", }, { internalType: "uint256", name: "requiredQuorum", type: "uint256", }, { internalType: "uint256", name: "requiredMajority", type: "uint256", }, { internalType: "uint256", name: "requiredVetoQuorum", type: "uint256", }, ], internalType: "struct IDAOVoting.VotingParams", name: "params", type: "tuple", }, { components: [ { internalType: "uint256", name: "votedFor", type: "uint256", }, { internalType: "uint256", name: "votedAgainst", type: "uint256", }, { internalType: "uint256", name: "vetoesCount", type: "uint256", }, ], internalType: "struct IDAOVoting.VotingCounters", name: "counters", type: "tuple", }, { internalType: "bool", name: "executed", type: "bool", }, ], internalType: "struct IDAOVoting.DAOProposal[]", name: "", type: "tuple[]", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", name: "offset_", type: "uint256", }, { internalType: "uint256", name: "limit_", type: "uint256", }, ], name: "getProposalSituationLinkList", outputs: [ { internalType: "string[]", name: "", type: "string[]", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", name: "proposalId_", type: "uint256", }, ], name: "getProposalStatus", outputs: [ { internalType: "enum IDAOVoting.ProposalStatus", name: "", type: "uint8", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", name: "proposalId_", type: "uint256", }, ], name: "getProposalVotingStats", outputs: [ { components: [ { internalType: "uint256", name: "requiredQuorum", type: "uint256", }, { internalType: "uint256", name: "currentQuorum", type: "uint256", }, { internalType: "uint256", name: "requiredMajority", type: "uint256", }, { internalType: "uint256", name: "currentMajority", type: "uint256", }, { internalType: "uint256", name: "currentVetoQuorum", type: "uint256", }, { internalType: "uint256", name: "requiredVetoQuorum", type: "uint256", }, ], internalType: "struct IDAOVoting.VotingStats", name: "", type: "tuple", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "getResource", outputs: [ { internalType: "string", name: "", type: "string", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "string", name: "situation_", type: "string", }, ], name: "getVotingSituationExternalLink", outputs: [ { internalType: "string", name: "", type: "string", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "string", name: "situation_", type: "string", }, ], name: "getVotingSituationInfo", outputs: [ { components: [ { internalType: "uint256", name: "votingPeriod", type: "uint256", }, { internalType: "uint256", name: "vetoPeriod", type: "uint256", }, { internalType: "uint256", name: "proposalExecutionPeriod", type: "uint256", }, { internalType: "uint256", name: "requiredQuorum", type: "uint256", }, { internalType: "uint256", name: "requiredMajority", type: "uint256", }, { internalType: "uint256", name: "requiredVetoQuorum", type: "uint256", }, { internalType: "uint256", name: "votingType", type: "uint256", }, { internalType: "string", name: "votingTarget", type: "string", }, { internalType: "uint256", name: "votingMinAmount", type: "uint256", }, ], internalType: "struct IDAOVoting.DAOVotingValues", name: "", type: "tuple", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "string", name: "situation_", type: "string", }, ], name: "getVotingSituationInfoWithLink", outputs: [ { components: [ { internalType: "uint256", name: "votingPeriod", type: "uint256", }, { internalType: "uint256", name: "vetoPeriod", type: "uint256", }, { internalType: "uint256", name: "proposalExecutionPeriod", type: "uint256", }, { internalType: "uint256", name: "requiredQuorum", type: "uint256", }, { internalType: "uint256", name: "requiredMajority", type: "uint256", }, { internalType: "uint256", name: "requiredVetoQuorum", type: "uint256", }, { internalType: "uint256", name: "votingType", type: "uint256", }, { internalType: "string", name: "votingTarget", type: "string", }, { internalType: "uint256", name: "votingMinAmount", type: "uint256", }, ], internalType: "struct IDAOVoting.DAOVotingValues", name: "", type: "tuple", }, { internalType: "string", name: "", type: "string", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "getVotingSituations", outputs: [ { internalType: "string[]", name: "", type: "string[]", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", name: "proposalId", type: "uint256", }, { internalType: "address", name: "user", type: "address", }, ], name: "hasUserVetoed", outputs: [ { internalType: "bool", name: "", type: "bool", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", name: "proposalId", type: "uint256", }, { internalType: "address", name: "user", type: "address", }, ], name: "hasUserVoted", outputs: [ { internalType: "bool", name: "", type: "bool", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "implementation", outputs: [ { internalType: "address", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "permissionManager", outputs: [ { internalType: "contract PermissionManager", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "proposalCount", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", name: "proposalId_", type: "uint256", }, ], name: "proposalSituationLink", outputs: [ { internalType: "string", name: "", type: "string", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], name: "proposals", outputs: [ { internalType: "uint256", name: "id", type: "uint256", }, { internalType: "string", name: "remark", type: "string", }, { internalType: "string", name: "relatedExpertPanel", type: "string", }, { internalType: "string", name: "relatedVotingSituation", type: "string", }, { internalType: "bytes", name: "callData", type: "bytes", }, { internalType: "address", name: "target", type: "address", }, { components: [ { internalType: "enum VotingType", name: "votingType", type: "uint8", }, { internalType: "uint256", name: "votingStartTime", type: "uint256", }, { internalType: "uint256", name: "votingEndTime", type: "uint256", }, { internalType: "uint256", name: "vetoEndTime", type: "uint256", }, { internalType: "uint256", name: "proposalExecutionPeriod", type: "uint256", }, { internalType: "uint256", name: "requiredQuorum", type: "uint256", }, { internalType: "uint256", name: "requiredMajority", type: "uint256", }, { internalType: "uint256", name: "requiredVetoQuorum", type: "uint256", }, ], internalType: "struct IDAOVoting.VotingParams", name: "params", type: "tuple", }, { components: [ { internalType: "uint256", name: "votedFor", type: "uint256", }, { internalType: "uint256", name: "votedAgainst", type: "uint256", }, { internalType: "uint256", name: "vetoesCount", type: "uint256", }, ], internalType: "struct IDAOVoting.VotingCounters", name: "counters", type: "tuple", }, { internalType: "bool", name: "executed", type: "bool", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "proxiableUUID", outputs: [ { internalType: "bytes32", name: "", type: "bytes32", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "string", name: "situation_", type: "string", }, ], name: "removeVotingSituation", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "registryAddress_", type: "address", }, { internalType: "bytes", name: "data_", type: "bytes", }, ], name: "setDependencies", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "injector_", type: "address", }, ], name: "setInjector", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "bytes4", name: "interfaceId", type: "bytes4", }, ], name: "supportsInterface", outputs: [ { internalType: "bool", name: "", type: "bool", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "targetPanel", outputs: [ { internalType: "string", name: "", type: "string", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "newImplementation", type: "address", }, ], name: "upgradeTo", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "newImplementation", type: "address", }, { internalType: "bytes", name: "data", type: "bytes", }, ], name: "upgradeToAndCall", outputs: [], stateMutability: "payable", type: "function", }, { inputs: [ { internalType: "uint256", name: "proposalId_", type: "uint256", }, ], name: "veto", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", name: "proposalId_", type: "uint256", }, ], name: "voteAgainst", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", name: "proposalId_", type: "uint256", }, ], name: "voteFor", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], name: "votingToken", outputs: [ { internalType: "address", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, ]; const _bytecode = "0x60a080604052346100315730608052614145908161003782396080518181816116c90152818161178d0152611c420152f35b600080fdfe608060408181526004908136101561001657600080fd5b60009283803560e01c918262707322146125dc5750508063013cf08b1461248c57806301ffc9a71461241c57806307325a301461231257806309914cba146122ed5780630d61b519146122c257806311911cae146122895780631d28dec7146120115780632a2b6ba014611fe85780632b52b07e14611fbf5780633605f30714611eed5780633659cfe614611c1c578381633885bfeb14611b95575080633e3b5b1914611b5f578063401853b714611b1a5780634e68c99b14610a5d5780634f1ef2861461177657806352d1902d146116b45780635903bd6c1461168b5780635c60da1b1461165557806369130451146114835783816371834626146113b15750806373708b1b1461133b578063750e443a1461120457806375706ff21461117457806377f8e93b1461108b57806386a5053514610e645780638cb941cc14610e2f578063ab663d0f14610df1578063af9728fb14610dc8578063b034012314610d9f578063b66bfb5f14610a82578063bb65dc8314610a5d578063c7f758a814610967578063cc7a20491461093e578063d047d87714610856578063d12a79211461082a578063d8ad4e1c14610767578063da35c66414610749578063dc296ae114610703578063e83d587314610693578063eb741a241461064d5763f5fcd0841461020257600080fd5b346106495760603660031901126106495761021b612cc3565b6001600160401b036024358181116106455761023a90369086016127e6565b6044358281116106415761025190369087016127e6565b9086549560ff8760081c161594858096610634575b801561061d575b156105c357600197868960ff198316178b556105b2575b50835185811161059f57806102998a546128fd565b95601f96878111610532575b506020908783116001146104b5578c926104aa575b5050600019600383901b1c191690891b1788555b60018060a01b03166bffffffffffffffffffffffff60a01b6003541617600355815193841161049757509082916103066002546128fd565b828111610427575b5060209183116001146103a857879261039d575b5050600019600383901b1c191690841b176002555b6000197f69ff26ae7567e3e590df6e0174c58cf39f6d291d404355c047056a744cc2c45755610364578280f35b825461ff0019168355519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602090a138808280f35b015190503880610322565b600288528693507f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace9190601f198416895b81811061040f575084116103f6575b505050811b01600255610337565b015160001960f88460031b161c191690553880806103e8565b828401518555899690940193602093840193016103d9565b90919250600288527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8380860160051c8201926020871061048e575b9186958a929594930160051c01915b82811061048057505061030e565b8a8155869550899101610472565b92508192610463565b634e487b7160e01b885260419052602487fd5b0151905038806102ba565b8b8d528b93507fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf69190601f1984168e5b81811061051a57508411610501575b505050811b0188556102ce565b015160001960f88460031b161c191690553880806104f4565b8284015185558e9690940193602093840193016104e5565b9091508a8c527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf68780850160051c82019260208610610596575b918d91869594930160051c01915b8281106105885750506102a5565b8e81558594508d910161057a565b9250819261056c565b634e487b7160e