UNPKG

@q-dev/gdk-sdk

Version:

Typescript Library to interact with GDK Contracts

1,530 lines 80.4 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GeneralDAOVoting__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: "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: "", 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 = "0x60a080604052346100315730608052613dda9081610037823960805181818161171e015281816117e20152611c970152f35b600080fdfe608060408181526004908136101561001657600080fd5b60009283803560e01c918262707322146126315750508063013cf08b146124e157806301ffc9a71461247157806307325a301461236757806309914cba146123425780630d61b5191461231757806311911cae146122de5780631d28dec7146120665780632a2b6ba01461203d5780632b52b07e146120145780633605f30714611f425780633659cfe614611c71578381633885bfeb14611bea575080633e3b5b1914611bb4578063401853b714611b6f5780634e68c99b14610a525780634f1ef286146117cb57806352d1902d146117095780635903bd6c146116e05780635c60da1b146116aa57806369130451146115395783816371834626146114675750806373708b1b146113f1578063750e443a1461126a57806375706ff2146111da57806377f8e93b146110f157806386a5053514610e7a5780638cb941cc14610e45578063ab663d0f14610e07578063b034012314610dde578063b66bfb5f14610a77578063bb65dc8314610a52578063c7f758a81461095c578063cc7a204914610933578063d047d8771461084b578063d12a79211461081f578063d8ad4e1c1461075c578063da35c6641461073e578063dc296ae1146106f8578063e83d587314610688578063eb741a24146106425763f5fcd084146101f757600080fd5b3461063e57606036600319011261063e57610210612d18565b6001600160401b0360243581811161063a5761022f903690860161283b565b60443582811161063657610246903690870161283b565b9086549560ff8760081c161594858096610629575b8015610612575b156105b857600197868960ff198316178b556105a7575b508351858111610594578061028e8a54612952565b95601f96878111610527575b506020908783116001146104aa578c9261049f575b5050600019600383901b1c191690891b1788555b60018060a01b03166bffffffffffffffffffffffff60a01b6003541617600355815193841161048c57509082916102fb600254612952565b82811161041c575b50602091831160011461039d578792610392575b5050600019600383901b1c191690841b176002555b6000197f69ff26ae7567e3e590df6e0174c58cf39f6d291d404355c047056a744cc2c45755610359578280f35b825461ff0019168355519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602090a138808280f35b015190503880610317565b600288528693507f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace9190601f198416895b818110610404575084116103eb575b505050811b0160025561032c565b015160001960f88460031b161c191690553880806103dd565b828401518555899690940193602093840193016103ce565b90919250600288527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8380860160051c82019260208710610483575b9186958a929594930160051c01915b828110610475575050610303565b8a8155869550899101610467565b92508192610458565b634e487b7160e01b885260419052602487fd5b0151905038806102af565b8b8d528b93507fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf69190601f1984168e5b81811061050f575084116104f6575b505050811b0188556102c3565b015160001960f88460031b161c191690553880806104e9565b8284015185558e9690940193602093840193016104da565b9091508a8c527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf68780850160051c8201926020861061058b575b918d91869594930160051c01915b82811061057d57505061029a565b8e81558594508d910161056f565b92508192610561565b634e487b7160e01b8a526041835260248afd5b61ffff191661010117895538610279565b865162461bcd60e51b8152602081840152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608490fd5b50303b1580156102625750600160ff891614610262565b50600160ff89161061025b565b8680fd5b8580fd5b828