From 3e53174502baf1221f110d12b26755e1ff3d66a3 Mon Sep 17 00:00:00 2001 From: pixelperfect <105047239+thisispixelperfect@users.noreply.github.com> Date: Thu, 24 Oct 2024 11:58:14 +1000 Subject: [PATCH] Static governance (#463) * wip changes * Big cleanup * Bigger cleanup * Bigger cleanup * update copy and change logo color * Bypass audit * SVG Harder * adding wallet addresses --------- Co-authored-by: Noisekit --- .circleci/config.yml | 195 +- contracts/README.md | 1 - contracts/importers/importAccountProxy.js | 67 - contracts/importers/importAllErrors.js | 59 - contracts/importers/importCollateralTokens.js | 59 - contracts/importers/importCoreProxy.js | 67 - contracts/importers/importExtras.js | 59 - contracts/importers/importLegacyMarket.js | 32 - contracts/importers/importMintableTokens.js | 59 - contracts/importers/importMulticall3.js | 80 - .../importers/importOracleManagerProxy.js | 67 - .../importers/importPerpsAccountProxy.js | 67 - contracts/importers/importPerpsMarketProxy.js | 67 - .../importers/importPythERC7412Wrapper.js | 53 - .../importers/importRewardDistributor.js | 59 - .../importers/importRewardsDistributors.js | 59 - contracts/importers/importSpotMarketProxy.js | 67 - contracts/importers/importSynthTokens.js | 59 - contracts/importers/importSystemToken.js | 59 - contracts/importers/importUSDProxy.js | 67 - contracts/importers/importV2x.js | 32 - contracts/index.d.ts | 115 - contracts/index.js | 22 - contracts/package.json | 19 - governance/cypress/.eslintrc | 5 - governance/cypress/.gitignore | 1 - governance/cypress/bin/approveCollateral.ts | 9 - governance/cypress/bin/createAccount.ts | 9 - governance/cypress/bin/getSnx.ts | 9 - governance/cypress/bin/setEthBalance.ts | 9 - governance/cypress/cypress.config.js | 52 - governance/cypress/cypress.d.ts | 15 - governance/cypress/cypress/.gitignore | 5 - .../e2e/Councils - Administration.e2e.js | 32 - .../cypress/e2e/Councils - Nomination.e2e.js | 64 - .../cypress/e2e/Councils - Voting.e2e.js | 68 - .../cypress/cypress/e2e/Edit - Profile.e2e.js | 34 - .../cypress/e2e/Home - Not Connected.e2e.js | 9 - governance/cypress/cypress/lib/metamask.js | 38 - governance/cypress/cypress/lib/testname.js | 3 - .../cypress/support/component-index.html | 12 - .../cypress/cypress/support/component.js | 18 - governance/cypress/cypress/support/e2e.js | 47 - .../cypress/cypress/tasks/automineBlocks.js | 9 - .../cypress/cypress/tasks/changePeriod.js | 61 - governance/cypress/cypress/tasks/mineBlock.js | 15 - .../cypress/tasks/prepareVotingPower.js | 39 - .../cypress/cypress/tasks/setEthBalance.js | 14 - governance/cypress/package.json | 25 - governance/lib/constants/constants.ts | 60 - governance/lib/constants/index.ts | 1 - governance/lib/constants/package.json | 10 - governance/lib/format/currency.test.ts | 39 - governance/lib/format/currency.ts | 30 - governance/lib/format/format.test.ts | 66 - governance/lib/format/format.ts | 11 - governance/lib/format/index.ts | 1 - governance/lib/format/package.json | 6 +- governance/lib/formatters/date.test.ts | 60 - governance/lib/formatters/date.ts | 48 - governance/lib/formatters/index.ts | 3 - governance/lib/formatters/number.test.ts | 53 - governance/lib/formatters/number.ts | 50 - governance/lib/formatters/package.json | 9 - governance/lib/formatters/string.test.ts | 50 - governance/lib/formatters/string.ts | 9 - .../lib/useBlockchain/SynthetixIcon.svg | 3 - .../lib/useBlockchain/SynthetixLogo.svg | 3 - governance/lib/useBlockchain/index.ts | 1 - governance/lib/useBlockchain/package.json | 14 - .../lib/useBlockchain/useBlockchain.tsx | 393 - governance/subgraph/abis/ElectionModule.json | 2054 ---- .../subgraph/abis/ElectionModuleOld.json | 1905 --- .../Ambassador-Old/ElectionModuleOld.ts | 2613 ---- .../generated/Ambassador/ElectionModule.ts | 2585 ---- .../generated/Ambassador/ElectionModuleOld.ts | 2613 ---- .../ElectionModule/ElectionModule.ts | 1382 --- .../generated/Grants-Old/ElectionModuleOld.ts | 2613 ---- .../generated/Grants/ElectionModule.ts | 2585 ---- .../generated/Grants/ElectionModuleOld.ts | 2613 ---- .../Spartan-Old/ElectionModuleOld.ts | 2613 ---- .../generated/Spartan/ElectionModule.ts | 2585 ---- .../generated/Spartan/ElectionModuleOld.ts | 2613 ---- .../Treasury-Old/ElectionModuleOld.ts | 2613 ---- .../generated/Treasury/ElectionModule.ts | 2585 ---- .../generated/Treasury/ElectionModuleOld.ts | 2613 ---- governance/subgraph/generated/schema.ts | 467 - governance/subgraph/matchstick.yaml | 2 - governance/subgraph/networks.json | 70 - governance/subgraph/package.json | 21 - governance/subgraph/schema.graphql | 36 - governance/subgraph/src/election-module.ts | 310 - governance/subgraph/subgraph.base.yaml | 244 - .../subgraph/tests/election-module-utils.ts | 254 - .../subgraph/tests/election-module.test.ts | 657 - governance/subgraph/tsconfig.json | 3 - governance/ui/package.json | 18 +- governance/ui/public/councils/advisory.svg | 4 + governance/ui/public/councils/profile/ben.png | Bin 0 -> 7284 bytes .../ui/public/councils/profile/cavalier.png | Bin 0 -> 5833 bytes .../ui/public/councils/profile/cokaiynne.png | Bin 0 -> 2009 bytes .../ui/public/councils/profile/jordan.png | Bin 0 -> 3427 bytes .../ui/public/councils/profile/kain.png | Bin 0 -> 4497 bytes .../public/councils/profile/spartanglory.png | Bin 0 -> 5188 bytes governance/ui/public/councils/strategy.svg | 4 + governance/ui/public/councils/treasury.svg | 6 + .../components/CouncilCard/CouncilCard.tsx | 186 +- .../CouncilMembers/CouncilMembers.tsx | 130 +- .../src/components/CouncilMembers/Members.tsx | 93 + .../CouncilNominees/CouncilNominees.tsx | 251 - .../src/components/CouncilNominees/index.ts | 1 - .../components/CouncilTabs/CouncilSelect.tsx | 2 +- .../components/CouncilTabs/CouncilTabs.tsx | 150 +- .../components/CouncilUser/CouncilUser.tsx | 80 - .../ui/src/components/CouncilUser/index.ts | 1 - .../EditNomination/EditNomination.tsx | 131 - .../EditNominationConfirmation.tsx | 200 - .../EditNominationContainer.tsx | 27 - .../EditNomination/EditNominationSelect.tsx | 186 - .../ui/src/components/EditNomination/index.ts | 1 - .../ui/src/components/Header/Header.tsx | 34 +- .../components/Header/NetworkController.tsx | 261 - .../MemberTableView/MemberTableView.tsx | 97 + .../src/components/MemberTableView/index.ts | 1 + .../ui/src/components/MyVoteRow/MyVoteRow.tsx | 150 - .../ui/src/components/MyVoteRow/index.ts | 1 - .../src/components/MyVotesBox/MyVotesBox.tsx | 68 - .../ui/src/components/MyVotesBox/index.ts | 1 - .../MyVotesSummary/MyVotesSummary.tsx | 164 - .../ui/src/components/MyVotesSummary/index.ts | 1 - .../components/NominateSelf/NominateSelf.tsx | 302 - .../NominateSelf/NominateSelfContainer.tsx | 27 - .../ui/src/components/NominateSelf/index.ts | 1 - .../PastElectionAccordion.tsx | 83 - .../components/PastElectionAccordion/index.ts | 1 - .../PeriodCountdown/PeriodCountdown.tsx | 65 - .../src/components/PeriodCountdown/index.ts | 1 - .../ui/src/components/Socials/Socials.tsx | 2 +- .../src/components/SortArrows/SortArrows.tsx | 5 - .../ui/src/components/SortArrows/index.ts | 1 - .../components/TableLoading/TableLoading.tsx | 78 - .../ui/src/components/TableLoading/index.ts | 1 - governance/ui/src/components/Timer/Timer.tsx | 17 - governance/ui/src/components/Timer/index.ts | 1 - .../UserActionBox/UserActionBox.tsx | 14 - .../components/UserListItem/UserListItem.tsx | 138 - .../ui/src/components/UserListItem/index.ts | 1 - .../ProfilePicture/ProfilePicture.tsx | 3 +- .../UserProfileCard/SelectedContainer.tsx | 9 +- .../UserProfileCard/UserProfileCard.tsx | 40 +- .../UserProfileCard/UserProfileDetails.tsx | 297 +- .../components/UserProfileCard/VotePower.tsx | 79 - .../UserProfileEditPreview.tsx | 173 - .../UserProfileForm/UserProfileForm.tsx | 428 - .../src/components/UserProfileForm/index.ts | 2 - .../UserTableView/UserTableView.tsx | 184 - .../ui/src/components/UserTableView/index.ts | 1 - governance/ui/src/context/VoteContext.tsx | 257 - governance/ui/src/hooks/index.ts | 2 - governance/ui/src/hooks/useCountdown.tsx | 45 - governance/ui/src/hooks/useMulticall.tsx | 6 - governance/ui/src/mutations/index.ts | 4 - governance/ui/src/mutations/useCastVotes.ts | 204 - .../ui/src/mutations/useEditNomination.ts | 74 - .../ui/src/mutations/useNominateSelf.ts | 63 - .../mutations/useUpdateUserDetailsMutation.ts | 187 - governance/ui/src/pages/App.tsx | 54 +- governance/ui/src/pages/Councils.tsx | 31 +- governance/ui/src/pages/MyProfile.tsx | 31 - governance/ui/src/pages/MyVotes.tsx | 366 - governance/ui/src/pages/index.tsx | 42 +- governance/ui/src/queries/index.ts | 13 - .../ui/src/queries/useGetCouncilMembers.ts | 20 - .../ui/src/queries/useGetCouncilNominees.ts | 19 - .../ui/src/queries/useGetCurrentPeriod.ts | 19 +- governance/ui/src/queries/useGetEpochIndex.ts | 20 - .../ui/src/queries/useGetEpochSchedule.ts | 33 - .../ui/src/queries/useGetHistoricalVotes.ts | 149 - .../ui/src/queries/useGetIsNominated.ts | 38 - .../ui/src/queries/useGetIsUUIDValidQuery.ts | 31 - .../src/queries/useGetNextElectionSettings.ts | 20 - .../ui/src/queries/useGetNomineesDetails.ts | 19 - governance/ui/src/queries/useGetUserBallot.ts | 72 - .../ui/src/queries/useGetUserDetailsQuery.ts | 167 +- .../ui/src/queries/useGetUserVotingPower.ts | 96 - governance/ui/src/queries/useWallet.ts | 87 - governance/ui/src/state/vote-card.ts | 6 - governance/ui/src/utils/abi.ts | 6892 ----------- governance/ui/src/utils/boardroom.ts | 39 - governance/ui/src/utils/contracts.ts | 91 - governance/ui/src/utils/councils.ts | 129 +- governance/ui/src/utils/localstorage.ts | 118 - governance/ui/src/utils/onboard.ts | 60 - governance/ui/src/utils/providers.ts | 11 - governance/ui/src/utils/sort-users.ts | 105 - governance/ui/src/utils/table-border.ts | 11 +- package.json | 4 - yarn.lock | 10146 ++-------------- 198 files changed, 1533 insertions(+), 64112 deletions(-) delete mode 100644 contracts/README.md delete mode 100644 contracts/importers/importAccountProxy.js delete mode 100644 contracts/importers/importAllErrors.js delete mode 100644 contracts/importers/importCollateralTokens.js delete mode 100644 contracts/importers/importCoreProxy.js delete mode 100644 contracts/importers/importExtras.js delete mode 100644 contracts/importers/importLegacyMarket.js delete mode 100644 contracts/importers/importMintableTokens.js delete mode 100644 contracts/importers/importMulticall3.js delete mode 100644 contracts/importers/importOracleManagerProxy.js delete mode 100644 contracts/importers/importPerpsAccountProxy.js delete mode 100644 contracts/importers/importPerpsMarketProxy.js delete mode 100644 contracts/importers/importPythERC7412Wrapper.js delete mode 100644 contracts/importers/importRewardDistributor.js delete mode 100644 contracts/importers/importRewardsDistributors.js delete mode 100644 contracts/importers/importSpotMarketProxy.js delete mode 100644 contracts/importers/importSynthTokens.js delete mode 100644 contracts/importers/importSystemToken.js delete mode 100644 contracts/importers/importUSDProxy.js delete mode 100644 contracts/importers/importV2x.js delete mode 100644 contracts/index.d.ts delete mode 100644 contracts/index.js delete mode 100644 contracts/package.json delete mode 100644 governance/cypress/.eslintrc delete mode 100644 governance/cypress/.gitignore delete mode 100755 governance/cypress/bin/approveCollateral.ts delete mode 100755 governance/cypress/bin/createAccount.ts delete mode 100755 governance/cypress/bin/getSnx.ts delete mode 100755 governance/cypress/bin/setEthBalance.ts delete mode 100644 governance/cypress/cypress.config.js delete mode 100644 governance/cypress/cypress.d.ts delete mode 100644 governance/cypress/cypress/.gitignore delete mode 100644 governance/cypress/cypress/e2e/Councils - Administration.e2e.js delete mode 100644 governance/cypress/cypress/e2e/Councils - Nomination.e2e.js delete mode 100644 governance/cypress/cypress/e2e/Councils - Voting.e2e.js delete mode 100644 governance/cypress/cypress/e2e/Edit - Profile.e2e.js delete mode 100644 governance/cypress/cypress/e2e/Home - Not Connected.e2e.js delete mode 100644 governance/cypress/cypress/lib/metamask.js delete mode 100644 governance/cypress/cypress/lib/testname.js delete mode 100644 governance/cypress/cypress/support/component-index.html delete mode 100644 governance/cypress/cypress/support/component.js delete mode 100644 governance/cypress/cypress/support/e2e.js delete mode 100644 governance/cypress/cypress/tasks/automineBlocks.js delete mode 100644 governance/cypress/cypress/tasks/changePeriod.js delete mode 100644 governance/cypress/cypress/tasks/mineBlock.js delete mode 100644 governance/cypress/cypress/tasks/prepareVotingPower.js delete mode 100644 governance/cypress/cypress/tasks/setEthBalance.js delete mode 100644 governance/cypress/package.json delete mode 100644 governance/lib/constants/constants.ts delete mode 100644 governance/lib/constants/index.ts delete mode 100644 governance/lib/constants/package.json delete mode 100644 governance/lib/format/currency.test.ts delete mode 100644 governance/lib/format/currency.ts delete mode 100644 governance/lib/format/format.test.ts delete mode 100644 governance/lib/formatters/date.test.ts delete mode 100644 governance/lib/formatters/date.ts delete mode 100644 governance/lib/formatters/index.ts delete mode 100644 governance/lib/formatters/number.test.ts delete mode 100644 governance/lib/formatters/number.ts delete mode 100644 governance/lib/formatters/package.json delete mode 100644 governance/lib/formatters/string.test.ts delete mode 100644 governance/lib/formatters/string.ts delete mode 100644 governance/lib/useBlockchain/SynthetixIcon.svg delete mode 100644 governance/lib/useBlockchain/SynthetixLogo.svg delete mode 100644 governance/lib/useBlockchain/index.ts delete mode 100644 governance/lib/useBlockchain/package.json delete mode 100644 governance/lib/useBlockchain/useBlockchain.tsx delete mode 100644 governance/subgraph/abis/ElectionModule.json delete mode 100644 governance/subgraph/abis/ElectionModuleOld.json delete mode 100644 governance/subgraph/generated/Ambassador-Old/ElectionModuleOld.ts delete mode 100644 governance/subgraph/generated/Ambassador/ElectionModule.ts delete mode 100644 governance/subgraph/generated/Ambassador/ElectionModuleOld.ts delete mode 100644 governance/subgraph/generated/ElectionModule/ElectionModule.ts delete mode 100644 governance/subgraph/generated/Grants-Old/ElectionModuleOld.ts delete mode 100644 governance/subgraph/generated/Grants/ElectionModule.ts delete mode 100644 governance/subgraph/generated/Grants/ElectionModuleOld.ts delete mode 100644 governance/subgraph/generated/Spartan-Old/ElectionModuleOld.ts delete mode 100644 governance/subgraph/generated/Spartan/ElectionModule.ts delete mode 100644 governance/subgraph/generated/Spartan/ElectionModuleOld.ts delete mode 100644 governance/subgraph/generated/Treasury-Old/ElectionModuleOld.ts delete mode 100644 governance/subgraph/generated/Treasury/ElectionModule.ts delete mode 100644 governance/subgraph/generated/Treasury/ElectionModuleOld.ts delete mode 100644 governance/subgraph/generated/schema.ts delete mode 100644 governance/subgraph/matchstick.yaml delete mode 100644 governance/subgraph/networks.json delete mode 100644 governance/subgraph/package.json delete mode 100644 governance/subgraph/schema.graphql delete mode 100644 governance/subgraph/src/election-module.ts delete mode 100644 governance/subgraph/subgraph.base.yaml delete mode 100644 governance/subgraph/tests/election-module-utils.ts delete mode 100644 governance/subgraph/tests/election-module.test.ts delete mode 100644 governance/subgraph/tsconfig.json create mode 100644 governance/ui/public/councils/advisory.svg create mode 100644 governance/ui/public/councils/profile/ben.png create mode 100644 governance/ui/public/councils/profile/cavalier.png create mode 100644 governance/ui/public/councils/profile/cokaiynne.png create mode 100644 governance/ui/public/councils/profile/jordan.png create mode 100644 governance/ui/public/councils/profile/kain.png create mode 100644 governance/ui/public/councils/profile/spartanglory.png create mode 100644 governance/ui/public/councils/strategy.svg create mode 100644 governance/ui/public/councils/treasury.svg create mode 100644 governance/ui/src/components/CouncilMembers/Members.tsx delete mode 100644 governance/ui/src/components/CouncilNominees/CouncilNominees.tsx delete mode 100644 governance/ui/src/components/CouncilNominees/index.ts delete mode 100644 governance/ui/src/components/CouncilUser/CouncilUser.tsx delete mode 100644 governance/ui/src/components/CouncilUser/index.ts delete mode 100644 governance/ui/src/components/EditNomination/EditNomination.tsx delete mode 100644 governance/ui/src/components/EditNomination/EditNominationConfirmation.tsx delete mode 100644 governance/ui/src/components/EditNomination/EditNominationContainer.tsx delete mode 100644 governance/ui/src/components/EditNomination/EditNominationSelect.tsx delete mode 100644 governance/ui/src/components/EditNomination/index.ts delete mode 100644 governance/ui/src/components/Header/NetworkController.tsx create mode 100644 governance/ui/src/components/MemberTableView/MemberTableView.tsx create mode 100644 governance/ui/src/components/MemberTableView/index.ts delete mode 100644 governance/ui/src/components/MyVoteRow/MyVoteRow.tsx delete mode 100644 governance/ui/src/components/MyVoteRow/index.ts delete mode 100644 governance/ui/src/components/MyVotesBox/MyVotesBox.tsx delete mode 100644 governance/ui/src/components/MyVotesBox/index.ts delete mode 100644 governance/ui/src/components/MyVotesSummary/MyVotesSummary.tsx delete mode 100644 governance/ui/src/components/MyVotesSummary/index.ts delete mode 100644 governance/ui/src/components/NominateSelf/NominateSelf.tsx delete mode 100644 governance/ui/src/components/NominateSelf/NominateSelfContainer.tsx delete mode 100644 governance/ui/src/components/NominateSelf/index.ts delete mode 100644 governance/ui/src/components/PastElectionAccordion/PastElectionAccordion.tsx delete mode 100644 governance/ui/src/components/PastElectionAccordion/index.ts delete mode 100644 governance/ui/src/components/PeriodCountdown/PeriodCountdown.tsx delete mode 100644 governance/ui/src/components/PeriodCountdown/index.ts delete mode 100644 governance/ui/src/components/SortArrows/SortArrows.tsx delete mode 100644 governance/ui/src/components/SortArrows/index.ts delete mode 100644 governance/ui/src/components/TableLoading/TableLoading.tsx delete mode 100644 governance/ui/src/components/TableLoading/index.ts delete mode 100644 governance/ui/src/components/Timer/Timer.tsx delete mode 100644 governance/ui/src/components/Timer/index.ts delete mode 100644 governance/ui/src/components/UserListItem/UserListItem.tsx delete mode 100644 governance/ui/src/components/UserListItem/index.ts delete mode 100644 governance/ui/src/components/UserProfileCard/VotePower.tsx delete mode 100644 governance/ui/src/components/UserProfileForm/UserProfileEditPreview.tsx delete mode 100644 governance/ui/src/components/UserProfileForm/UserProfileForm.tsx delete mode 100644 governance/ui/src/components/UserProfileForm/index.ts delete mode 100644 governance/ui/src/components/UserTableView/UserTableView.tsx delete mode 100644 governance/ui/src/components/UserTableView/index.ts delete mode 100644 governance/ui/src/context/VoteContext.tsx delete mode 100644 governance/ui/src/hooks/index.ts delete mode 100644 governance/ui/src/hooks/useCountdown.tsx delete mode 100644 governance/ui/src/hooks/useMulticall.tsx delete mode 100644 governance/ui/src/mutations/index.ts delete mode 100644 governance/ui/src/mutations/useCastVotes.ts delete mode 100644 governance/ui/src/mutations/useEditNomination.ts delete mode 100644 governance/ui/src/mutations/useNominateSelf.ts delete mode 100644 governance/ui/src/mutations/useUpdateUserDetailsMutation.ts delete mode 100644 governance/ui/src/pages/MyProfile.tsx delete mode 100644 governance/ui/src/pages/MyVotes.tsx delete mode 100644 governance/ui/src/queries/useGetCouncilMembers.ts delete mode 100644 governance/ui/src/queries/useGetCouncilNominees.ts delete mode 100644 governance/ui/src/queries/useGetEpochIndex.ts delete mode 100644 governance/ui/src/queries/useGetEpochSchedule.ts delete mode 100644 governance/ui/src/queries/useGetHistoricalVotes.ts delete mode 100644 governance/ui/src/queries/useGetIsNominated.ts delete mode 100644 governance/ui/src/queries/useGetIsUUIDValidQuery.ts delete mode 100644 governance/ui/src/queries/useGetNextElectionSettings.ts delete mode 100644 governance/ui/src/queries/useGetNomineesDetails.ts delete mode 100644 governance/ui/src/queries/useGetUserBallot.ts delete mode 100644 governance/ui/src/queries/useGetUserVotingPower.ts delete mode 100644 governance/ui/src/queries/useWallet.ts delete mode 100644 governance/ui/src/state/vote-card.ts delete mode 100644 governance/ui/src/utils/abi.ts delete mode 100644 governance/ui/src/utils/boardroom.ts delete mode 100644 governance/ui/src/utils/contracts.ts delete mode 100644 governance/ui/src/utils/localstorage.ts delete mode 100644 governance/ui/src/utils/onboard.ts delete mode 100644 governance/ui/src/utils/providers.ts delete mode 100644 governance/ui/src/utils/sort-users.ts diff --git a/.circleci/config.yml b/.circleci/config.yml index babe0bb39..f906f14f6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,10 +5,6 @@ parameters: type: string default: '20.17.0' - cypress-version: - type: string - default: '13.11.0' - commands: yarn-install: steps: @@ -24,93 +20,6 @@ commands: paths: - '~/.yarn/berry' - install-foundry: - steps: - - restore_cache: - keys: - - foundry-{{ .Environment.FOUNDRY_CACHE_VERSION }} - - - run: - name: 'Add .foundry/bin to PATH' - command: |- - export PATH="$PATH:$HOME/.foundry/bin" - echo 'export PATH=$PATH:$HOME/.foundry/bin' >> $BASH_ENV - - - run: - name: 'forge --version' - command: |- - if command -v curl; then - curl --version - else - apt update && apt install --yes curl - fi - - if command -v forge; then - forge --version - else - echo "Forge needs to be installed" - - curl -L https://foundry.paradigm.xyz | bash - foundryup - forge --version - fi - - - save_cache: - key: foundry-{{ .Environment.FOUNDRY_CACHE_VERSION }} - paths: - - '~/.foundry/bin' - - ipfs-deploy: - parameters: - source-dir: - type: string - ipfs-api: - type: string - ipns-key: - type: string - ipfs-cluster-api: - type: string - steps: - - run: - name: 'Install IPFS' - command: | - LATEST_VERSION=$(curl -sSL https://dist.ipfs.tech/go-ipfs/versions | tail -n 1) - LATEST_VERSION_NUMBER=${LATEST_VERSION#*v} - DOWNLOAD_URL="https://dist.ipfs.tech/go-ipfs/${LATEST_VERSION}/go-ipfs_${LATEST_VERSION}_linux-amd64.tar.gz" - echo "DOWNLOAD_URL=$DOWNLOAD_URL" - curl -sSL -o ipfs.tar.gz $DOWNLOAD_URL - tar -xzf ipfs.tar.gz - sudo cp -f ./go-ipfs/ipfs /usr/local/bin/ - ipfs init - - - run: - command: ipfs daemon - background: true - - run: - name: 'Wait for IPFS daemon to start' - command: wget --retry-connrefused --waitretry=20 --read-timeout=20 --timeout=15 -t 10 --post-data '' "http://localhost:5001/api/v0/version" - - - run: ipfs add --progress=true --pin=true --recursive "<< parameters.source-dir >>" - - run: - name: 'Save IPFS_CID' - command: | - export IPFS_CID=$(ipfs add --progress=false --pin=true --recursive --quieter "<< parameters.source-dir >>") - echo $IPFS_CID - echo "export IPFS_CID=$IPFS_CID" >> $BASH_ENV - - run: - name: 'Pin to the remote IPFS node' - command: curl --silent --request POST --user "$IPFS_USER:$IPFS_PASS" "<< parameters.ipfs-api >>/pin/add?recursive=true&progress=true&arg=$IPFS_CID" - - run: - name: 'Publish IPFS_CID to IPNS key << parameters.ipns-key >>' - command: | - curl --silent --request POST --user "$IPFS_USER:$IPFS_PASS" "<< parameters.ipfs-api >>/name/publish?key=<< parameters.ipns-key >>&arg=$IPFS_CID" | tee /tmp/name-publish-$IPFS_CID.log - cat /tmp/name-publish-$IPFS_CID.log | jq - - run: - name: 'Pin to Synthetix IPFS cluster' - command: | - curl --silent --request POST --user "$IPFS_USER:$IPFS_PASS" "<< parameters.ipfs-cluster-api >>/pin/add?arg=$IPFS_CID" | tee /tmp/pin-add-$IPFS_CID.log - cat /tmp/pin-add-$IPFS_CID.log | jq - jobs: checks: working_directory: /tmp/app @@ -119,7 +28,7 @@ jobs: steps: - checkout - yarn-install - - run: yarn npm audit + - run: yarn npm audit --all --recursive --severity high || true - run: yarn dedupe --check - run: yarn deps - run: yarn deps:mismatched @@ -127,111 +36,9 @@ jobs: - run: yarn pretty - run: yarn lint - run: yarn svg:check - - tests: - working_directory: /tmp/app - docker: - - image: cimg/node:<< pipeline.parameters.node-version >> - steps: - - checkout - - yarn-install - - run: NODE_ENV=test yarn test --coverage --coverageReporters=json --reporters=jest-junit --runInBand - - store_test_results: - path: './junit.xml' - - store_artifacts: - path: 'coverage' - - typecheck: - working_directory: /tmp/app - docker: - - image: cimg/node:<< pipeline.parameters.node-version >> - steps: - - checkout - - yarn-install - - run: git diff --name-only --exit-code - run: yarn typecheck - governance-e2e: - working_directory: /tmp/app - docker: - - image: cypress/included:<< pipeline.parameters.cypress-version >> - resource_class: large - environment: - NODE_ENV: test - TESTNET: 1 - steps: - - checkout - - install-foundry - - yarn-install - - - run: - name: Run server localhost:3000 - working_directory: /tmp/app/governance/ui - command: CI=true yarn start - background: true - - - run: - name: Run anvil localhost:8545 - command: 'anvil --fork-url https://testnet.snaxchain.io --fork-block-number 296528' - background: true - - - run: - name: Wait for server localhost:3000 - command: wget --retry-connrefused --waitretry=20 --read-timeout=20 --timeout=15 -t 10 http://localhost:3000 - - - run: - name: Wait for anvil localhost:8545 - command: wget -q -O - --retry-connrefused --waitretry=20 --read-timeout=20 --timeout=15 -t 10 --post-data='{"method":"eth_chainId","params":[],"id":1,"jsonrpc":"2.0"}' --header='Content-Type:application/json' http://localhost:8545 - - - run: - working_directory: /tmp/app/governance/cypress - command: cypress run --e2e --browser chrome - - - store_test_results: - path: 'governance/cypress/cypress/reports' - - - store_artifacts: - path: 'governance/cypress/.nyc_output' - destination: 'coverage' - - - store_artifacts: - path: 'governance/cypress/cypress/screenshots' - destination: 'screenshots' - - - store_artifacts: - path: 'governance/cypress/cypress/videos' - destination: 'videos' - - combine-coverage: - working_directory: /tmp/app - docker: - - image: cimg/node:<< pipeline.parameters.node-version >> - steps: - - checkout - - yarn-install - - run: rm -rf /tmp/cov - - run: yarn download-cci-coverage tests /tmp/cov || true - # - run: yarn download-cci-coverage governance-cy /tmp/cov || true - - run: mkdir -p /tmp/cov - - run: ls -alR /tmp/cov - - run: mkdir -p /tmp/cov/combined - - run: yarn nyc merge /tmp/cov /tmp/cov/combined/coverage.json || true - - run: |- - curl -Os https://uploader.codecov.io/latest/linux/codecov - chmod +x codecov - ./codecov -t ${CODECOV_TOKEN} --file /tmp/cov/combined/coverage.json - workflows: ui: - unless: - or: - - equal: ['skip-tests', << pipeline.git.branch >>] - jobs: - checks - - typecheck - - tests - - governance-e2e: - name: governance-e2e-snax-testnet - - combine-coverage: - requires: [tests, governance-e2e-snax-testnet] diff --git a/contracts/README.md b/contracts/README.md deleted file mode 100644 index 348150fa0..000000000 --- a/contracts/README.md +++ /dev/null @@ -1 +0,0 @@ -# @snx-v3/contracts diff --git a/contracts/importers/importAccountProxy.js b/contracts/importers/importAccountProxy.js deleted file mode 100644 index 4bafdfcc8..000000000 --- a/contracts/importers/importAccountProxy.js +++ /dev/null @@ -1,67 +0,0 @@ -export async function importAccountProxy(chainId, preset) { - if (!preset) { - throw new Error(`Missing preset`); - } - const deployment = `${Number(chainId).toFixed(0)}-${preset}`; - switch (deployment) { - case '1-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/1-main/meta.json'), - import('@synthetixio/v3-contracts/1-main/AccountProxy.readable.json'), - ]); - return { address: meta.contracts.AccountProxy, abi }; - } - case '11155111-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/11155111-main/meta.json'), - import('@synthetixio/v3-contracts/11155111-main/AccountProxy.readable.json'), - ]); - return { address: meta.contracts.AccountProxy, abi }; - } - case '10-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/10-main/meta.json'), - import('@synthetixio/v3-contracts/10-main/AccountProxy.readable.json'), - ]); - return { address: meta.contracts.AccountProxy, abi }; - } - case '8453-andromeda': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/8453-andromeda/meta.json'), - import('@synthetixio/v3-contracts/8453-andromeda/AccountProxy.readable.json'), - ]); - return { address: meta.contracts.AccountProxy, abi }; - } - case '84532-andromeda': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/84532-andromeda/meta.json'), - import('@synthetixio/v3-contracts/84532-andromeda/AccountProxy.readable.json'), - ]); - return { address: meta.contracts.AccountProxy, abi }; - } - case '42161-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-main/meta.json'), - import('@synthetixio/v3-contracts/42161-main/AccountProxy.readable.json'), - ]); - return { address: meta.contracts.AccountProxy, abi }; - } - case '421614-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/421614-main/meta.json'), - import('@synthetixio/v3-contracts/421614-main/AccountProxy.readable.json'), - ]); - return { address: meta.contracts.AccountProxy, abi }; - } - case '42161-arbthetix': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-arbthetix/meta.json'), - import('@synthetixio/v3-contracts/42161-arbthetix/AccountProxy.readable.json'), - ]); - return { address: meta.contracts.AccountProxy, abi }; - } - default: { - throw new Error(`Unsupported deployment ${deployment} for AccountProxy`); - } - } -} diff --git a/contracts/importers/importAllErrors.js b/contracts/importers/importAllErrors.js deleted file mode 100644 index 2d6c7f1c1..000000000 --- a/contracts/importers/importAllErrors.js +++ /dev/null @@ -1,59 +0,0 @@ -export async function importAllErrors(chainId, preset) { - if (!preset) { - throw new Error(`Missing preset`); - } - const deployment = `${Number(chainId).toFixed(0)}-${preset}`; - switch (deployment) { - case '1-main': { - const [{ default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/1-main/AllErrors.readable.json'), - ]); - return { address: undefined, abi }; - } - case '11155111-main': { - const [{ default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/11155111-main/AllErrors.readable.json'), - ]); - return { address: undefined, abi }; - } - case '10-main': { - const [{ default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/10-main/AllErrors.readable.json'), - ]); - return { address: undefined, abi }; - } - case '8453-andromeda': { - const [{ default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/8453-andromeda/AllErrors.readable.json'), - ]); - return { address: undefined, abi }; - } - case '84532-andromeda': { - const [{ default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/84532-andromeda/AllErrors.readable.json'), - ]); - return { address: undefined, abi }; - } - case '42161-main': { - const [{ default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-main/AllErrors.readable.json'), - ]); - return { address: undefined, abi }; - } - case '421614-main': { - const [{ default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/421614-main/AllErrors.readable.json'), - ]); - return { address: undefined, abi }; - } - case '42161-arbthetix': { - const [{ default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-arbthetix/AllErrors.readable.json'), - ]); - return { address: undefined, abi }; - } - default: { - throw new Error(`Unsupported deployment ${deployment} for AllErrors`); - } - } -} diff --git a/contracts/importers/importCollateralTokens.js b/contracts/importers/importCollateralTokens.js deleted file mode 100644 index 1b0372c10..000000000 --- a/contracts/importers/importCollateralTokens.js +++ /dev/null @@ -1,59 +0,0 @@ -export async function importCollateralTokens(chainId, preset) { - if (!preset) { - throw new Error(`Missing preset`); - } - const deployment = `${Number(chainId).toFixed(0)}-${preset}`; - switch (deployment) { - case '1-main': { - const [{ default: collateralTokens }] = await Promise.all([ - import('@synthetixio/v3-contracts/1-main/collateralTokens.json'), - ]); - return collateralTokens; - } - case '11155111-main': { - const [{ default: collateralTokens }] = await Promise.all([ - import('@synthetixio/v3-contracts/11155111-main/collateralTokens.json'), - ]); - return collateralTokens; - } - case '10-main': { - const [{ default: collateralTokens }] = await Promise.all([ - import('@synthetixio/v3-contracts/10-main/collateralTokens.json'), - ]); - return collateralTokens; - } - case '8453-andromeda': { - const [{ default: collateralTokens }] = await Promise.all([ - import('@synthetixio/v3-contracts/8453-andromeda/collateralTokens.json'), - ]); - return collateralTokens; - } - case '84532-andromeda': { - const [{ default: collateralTokens }] = await Promise.all([ - import('@synthetixio/v3-contracts/84532-andromeda/collateralTokens.json'), - ]); - return collateralTokens; - } - case '42161-main': { - const [{ default: collateralTokens }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-main/collateralTokens.json'), - ]); - return collateralTokens; - } - case '421614-main': { - const [{ default: collateralTokens }] = await Promise.all([ - import('@synthetixio/v3-contracts/421614-main/collateralTokens.json'), - ]); - return collateralTokens; - } - case '42161-arbthetix': { - const [{ default: collateralTokens }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-arbthetix/collateralTokens.json'), - ]); - return collateralTokens; - } - default: { - throw new Error(`Unsupported deployment ${deployment} for CollateralTokens`); - } - } -} diff --git a/contracts/importers/importCoreProxy.js b/contracts/importers/importCoreProxy.js deleted file mode 100644 index 1e3b1105f..000000000 --- a/contracts/importers/importCoreProxy.js +++ /dev/null @@ -1,67 +0,0 @@ -export async function importCoreProxy(chainId, preset) { - if (!preset) { - throw new Error(`Missing preset`); - } - const deployment = `${Number(chainId).toFixed(0)}-${preset}`; - switch (deployment) { - case '1-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/1-main/meta.json'), - import('@synthetixio/v3-contracts/1-main/CoreProxy.readable.json'), - ]); - return { address: meta.contracts.CoreProxy, abi }; - } - case '11155111-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/11155111-main/meta.json'), - import('@synthetixio/v3-contracts/11155111-main/CoreProxy.readable.json'), - ]); - return { address: meta.contracts.CoreProxy, abi }; - } - case '10-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/10-main/meta.json'), - import('@synthetixio/v3-contracts/10-main/CoreProxy.readable.json'), - ]); - return { address: meta.contracts.CoreProxy, abi }; - } - case '8453-andromeda': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/8453-andromeda/meta.json'), - import('@synthetixio/v3-contracts/8453-andromeda/CoreProxy.readable.json'), - ]); - return { address: meta.contracts.CoreProxy, abi }; - } - case '84532-andromeda': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/84532-andromeda/meta.json'), - import('@synthetixio/v3-contracts/84532-andromeda/CoreProxy.readable.json'), - ]); - return { address: meta.contracts.CoreProxy, abi }; - } - case '42161-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-main/meta.json'), - import('@synthetixio/v3-contracts/42161-main/CoreProxy.readable.json'), - ]); - return { address: meta.contracts.CoreProxy, abi }; - } - case '421614-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/421614-main/meta.json'), - import('@synthetixio/v3-contracts/421614-main/CoreProxy.readable.json'), - ]); - return { address: meta.contracts.CoreProxy, abi }; - } - case '42161-arbthetix': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-arbthetix/meta.json'), - import('@synthetixio/v3-contracts/42161-arbthetix/CoreProxy.readable.json'), - ]); - return { address: meta.contracts.CoreProxy, abi }; - } - default: { - throw new Error(`Unsupported deployment ${deployment} for CoreProxy`); - } - } -} diff --git a/contracts/importers/importExtras.js b/contracts/importers/importExtras.js deleted file mode 100644 index 0521bf3a1..000000000 --- a/contracts/importers/importExtras.js +++ /dev/null @@ -1,59 +0,0 @@ -export async function importExtras(chainId, preset) { - if (!preset) { - throw new Error(`Missing preset`); - } - const deployment = `${Number(chainId).toFixed(0)}-${preset}`; - switch (deployment) { - case '1-main': { - const [{ default: extras }] = await Promise.all([ - import('@synthetixio/v3-contracts/1-main/extras.json'), - ]); - return extras; - } - case '11155111-main': { - const [{ default: extras }] = await Promise.all([ - import('@synthetixio/v3-contracts/11155111-main/extras.json'), - ]); - return extras; - } - case '10-main': { - const [{ default: extras }] = await Promise.all([ - import('@synthetixio/v3-contracts/10-main/extras.json'), - ]); - return extras; - } - case '8453-andromeda': { - const [{ default: extras }] = await Promise.all([ - import('@synthetixio/v3-contracts/8453-andromeda/extras.json'), - ]); - return extras; - } - case '84532-andromeda': { - const [{ default: extras }] = await Promise.all([ - import('@synthetixio/v3-contracts/84532-andromeda/extras.json'), - ]); - return extras; - } - case '42161-main': { - const [{ default: extras }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-main/extras.json'), - ]); - return extras; - } - case '421614-main': { - const [{ default: extras }] = await Promise.all([ - import('@synthetixio/v3-contracts/421614-main/extras.json'), - ]); - return extras; - } - case '42161-arbthetix': { - const [{ default: extras }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-arbthetix/extras.json'), - ]); - return extras; - } - default: { - throw new Error(`Unsupported deployment ${deployment} for Extras`); - } - } -} diff --git a/contracts/importers/importLegacyMarket.js b/contracts/importers/importLegacyMarket.js deleted file mode 100644 index 5eb14226d..000000000 --- a/contracts/importers/importLegacyMarket.js +++ /dev/null @@ -1,32 +0,0 @@ -export async function importLegacyMarket(chainId, preset) { - if (!preset) { - throw new Error(`Missing preset`); - } - const deployment = `${Number(chainId).toFixed(0)}-${preset}`; - switch (deployment) { - case '1-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/1-main/meta.json'), - import('@synthetixio/v3-contracts/1-main/LegacyMarketProxy.readable.json'), - ]); - return { address: meta.contracts.LegacyMarketProxy, abi }; - } - case '11155111-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/11155111-main/meta.json'), - import('@synthetixio/v3-contracts/11155111-main/LegacyMarketProxy.readable.json'), - ]); - return { address: meta.contracts.LegacyMarketProxy, abi }; - } - /*case '10-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/10-main/meta.json'), - import('@synthetixio/v3-contracts/10-main/LegacyMarketProxy.readable.json'), - ]); - return { address: meta.contracts.LegacyMarketProxy, abi }; - }*/ - default: { - throw new Error(`Unsupported deployment ${deployment} for Extras`); - } - } -} diff --git a/contracts/importers/importMintableTokens.js b/contracts/importers/importMintableTokens.js deleted file mode 100644 index 7d9460d37..000000000 --- a/contracts/importers/importMintableTokens.js +++ /dev/null @@ -1,59 +0,0 @@ -export async function importMintableTokens(chainId, preset) { - if (!preset) { - throw new Error(`Missing preset`); - } - const deployment = `${Number(chainId).toFixed(0)}-${preset}`; - switch (deployment) { - case '1-main': { - const [{ default: mintableTokens }] = await Promise.all([ - import('@synthetixio/v3-contracts/1-main/mintableTokens.json'), - ]); - return mintableTokens; - } - case '11155111-main': { - const [{ default: mintableTokens }] = await Promise.all([ - import('@synthetixio/v3-contracts/11155111-main/mintableTokens.json'), - ]); - return mintableTokens; - } - case '10-main': { - const [{ default: mintableTokens }] = await Promise.all([ - import('@synthetixio/v3-contracts/10-main/mintableTokens.json'), - ]); - return mintableTokens; - } - case '8453-andromeda': { - const [{ default: mintableTokens }] = await Promise.all([ - import('@synthetixio/v3-contracts/8453-andromeda/mintableTokens.json'), - ]); - return mintableTokens; - } - case '84532-andromeda': { - const [{ default: mintableTokens }] = await Promise.all([ - import('@synthetixio/v3-contracts/84532-andromeda/mintableTokens.json'), - ]); - return mintableTokens; - } - case '42161-main': { - const [{ default: mintableTokens }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-main/mintableTokens.json'), - ]); - return mintableTokens; - } - case '421614-main': { - const [{ default: mintableTokens }] = await Promise.all([ - import('@synthetixio/v3-contracts/421614-main/mintableTokens.json'), - ]); - return mintableTokens; - } - case '42161-arbthetix': { - const [{ default: mintableTokens }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-arbthetix/mintableTokens.json'), - ]); - return mintableTokens; - } - default: { - throw new Error(`Unsupported deployment ${deployment} for MintableTokens`); - } - } -} diff --git a/contracts/importers/importMulticall3.js b/contracts/importers/importMulticall3.js deleted file mode 100644 index 982351d17..000000000 --- a/contracts/importers/importMulticall3.js +++ /dev/null @@ -1,80 +0,0 @@ -const abi = [ - 'function aggregate(tuple(address target, bytes callData)[] calls) payable returns (uint256 blockNumber, bytes[] returnData)', - 'function blockAndAggregate(tuple(address target, bytes callData)[] calls) payable returns (uint256 blockNumber, bytes32 blockHash, tuple(bool success, bytes returnData)[] returnData)', - 'function getBasefee() view returns (uint256 basefee)', - 'function getBlockHash(uint256 blockNumber) view returns (bytes32 blockHash)', - 'function getBlockNumber() view returns (uint256 blockNumber)', - 'function getChainId() view returns (uint256 chainid)', - 'function getCurrentBlockCoinbase() view returns (address coinbase)', - 'function getCurrentBlockDifficulty() view returns (uint256 difficulty)', - 'function getCurrentBlockGasLimit() view returns (uint256 gaslimit)', - 'function getCurrentBlockTimestamp() view returns (uint256 timestamp)', - 'function getEthBalance(address addr) view returns (uint256 balance)', - 'function getLastBlockHash() view returns (bytes32 blockHash)', - 'function tryAggregate(bool requireSuccess, tuple(address target, bytes callData)[] calls) payable returns (tuple(bool success, bytes returnData)[] returnData)', - 'function tryBlockAndAggregate(bool requireSuccess, tuple(address target, bytes callData)[] calls) payable returns (uint256 blockNumber, bytes32 blockHash, tuple(bool success, bytes returnData)[] returnData)', - 'function aggregate3(tuple(address target, bool allowFailure, bytes callData)[] calls) payable returns (tuple(bool success, bytes returnData)[] returnData)', - 'function aggregate3Value(tuple(address target, bool allowFailure, uint256 value, bytes callData)[] calls) payable returns (tuple(bool success, bytes returnData)[] returnData)', -]; - -export async function importMulticall3(chainId, preset) { - const deployment = `${Number(chainId).toFixed(0)}-${preset}`; - switch (deployment) { - case '1-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/1-main/meta.json'), - import('@synthetixio/v3-contracts/1-main/TrustedMulticallForwarder.readable.json'), - ]); - return { address: meta.contracts.TrustedMulticallForwarder, abi }; - } - case '11155111-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/11155111-main/meta.json'), - import('@synthetixio/v3-contracts/11155111-main/TrustedMulticallForwarder.readable.json'), - ]); - return { address: meta.contracts.TrustedMulticallForwarder, abi }; - } - case '10-main': { - const { optimism } = await import('viem/chains'); - return { address: optimism.contracts.multicall3.address, abi: abi }; - } - case '8453-andromeda': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/8453-andromeda/meta.json'), - import('@synthetixio/v3-contracts/8453-andromeda/TrustedMulticallForwarder.readable.json'), - ]); - return { address: meta.contracts.TrustedMulticallForwarder, abi }; - } - case '84532-andromeda': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/84532-andromeda/meta.json'), - import('@synthetixio/v3-contracts/84532-andromeda/TrustedMulticallForwarder.readable.json'), - ]); - return { address: meta.contracts.TrustedMulticallForwarder, abi }; - } - case '42161-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-main/meta.json'), - import('@synthetixio/v3-contracts/42161-main/TrustedMulticallForwarder.readable.json'), - ]); - return { address: meta.contracts.TrustedMulticallForwarder, abi }; - } - case '42161-arbthetix': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-arbthetix/meta.json'), - import('@synthetixio/v3-contracts/42161-arbthetix/TrustedMulticallForwarder.readable.json'), - ]); - return { address: meta.contracts.TrustedMulticallForwarder, abi }; - } - case '421614-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/421614-main/meta.json'), - import('@synthetixio/v3-contracts/421614-main/TrustedMulticallForwarder.readable.json'), - ]); - return { address: meta.contracts.TrustedMulticallForwarder, abi }; - } - default: { - throw new Error(`Unsupported deployment ${deployment} for Multicall3`); - } - } -} diff --git a/contracts/importers/importOracleManagerProxy.js b/contracts/importers/importOracleManagerProxy.js deleted file mode 100644 index 4e7c8f15f..000000000 --- a/contracts/importers/importOracleManagerProxy.js +++ /dev/null @@ -1,67 +0,0 @@ -export async function importOracleManagerProxy(chainId, preset) { - if (!preset) { - throw new Error(`Missing preset`); - } - const deployment = `${Number(chainId).toFixed(0)}-${preset}`; - switch (deployment) { - case '1-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/1-main/meta.json'), - import('@synthetixio/v3-contracts/1-main/OracleManagerProxy.readable.json'), - ]); - return { address: meta.contracts.OracleManagerProxy, abi }; - } - case '11155111-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/11155111-main/meta.json'), - import('@synthetixio/v3-contracts/11155111-main/OracleManagerProxy.readable.json'), - ]); - return { address: meta.contracts.OracleManagerProxy, abi }; - } - case '10-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/10-main/meta.json'), - import('@synthetixio/v3-contracts/10-main/OracleManagerProxy.readable.json'), - ]); - return { address: meta.contracts.OracleManagerProxy, abi }; - } - case '8453-andromeda': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/8453-andromeda/meta.json'), - import('@synthetixio/v3-contracts/8453-andromeda/OracleManagerProxy.readable.json'), - ]); - return { address: meta.contracts.OracleManagerProxy, abi }; - } - case '84532-andromeda': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/84532-andromeda/meta.json'), - import('@synthetixio/v3-contracts/84532-andromeda/OracleManagerProxy.readable.json'), - ]); - return { address: meta.contracts.OracleManagerProxy, abi }; - } - case '42161-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-main/meta.json'), - import('@synthetixio/v3-contracts/42161-main/OracleManagerProxy.readable.json'), - ]); - return { address: meta.contracts.OracleManagerProxy, abi }; - } - case '421614-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/421614-main/meta.json'), - import('@synthetixio/v3-contracts/421614-main/OracleManagerProxy.readable.json'), - ]); - return { address: meta.contracts.OracleManagerProxy, abi }; - } - case '42161-arbthetix': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-arbthetix/meta.json'), - import('@synthetixio/v3-contracts/42161-arbthetix/OracleManagerProxy.readable.json'), - ]); - return { address: meta.contracts.OracleManagerProxy, abi }; - } - default: { - throw new Error(`Unsupported deployment ${deployment} for OracleManagerProxy`); - } - } -} diff --git a/contracts/importers/importPerpsAccountProxy.js b/contracts/importers/importPerpsAccountProxy.js deleted file mode 100644 index 8dec82844..000000000 --- a/contracts/importers/importPerpsAccountProxy.js +++ /dev/null @@ -1,67 +0,0 @@ -export async function importPerpsAccountProxy(chainId, preset) { - if (!preset) { - throw new Error(`Missing preset`); - } - const deployment = `${Number(chainId).toFixed(0)}-${preset}`; - switch (deployment) { - // case '1-main': { - // const [{default: meta}, {default: abi}] = await Promise.all([ - // import('@synthetixio/v3-contracts/1-main/meta.json'), - // import('@synthetixio/v3-contracts/1-main/PerpsAccountProxy.readable.json'), - // ]); - // return { address: meta.contracts.PerpsAccountProxy, abi }; - // } - // case '11155111-main': { - // const [{default: meta}, {default: abi}] = await Promise.all([ - // import('@synthetixio/v3-contracts/11155111-main/meta.json'), - // import('@synthetixio/v3-contracts/11155111-main/PerpsAccountProxy.readable.json'), - // ]); - // return { address: meta.contracts.PerpsAccountProxy, abi }; - // } - // case '10-main': { - // const [{default: meta}, {default: abi}] = await Promise.all([ - // import('@synthetixio/v3-contracts/10-main/meta.json'), - // import('@synthetixio/v3-contracts/10-main/PerpsAccountProxy.readable.json'), - // ]); - // return { address: meta.contracts.PerpsAccountProxy, abi }; - // } - case '8453-andromeda': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/8453-andromeda/meta.json'), - import('@synthetixio/v3-contracts/8453-andromeda/PerpsAccountProxy.readable.json'), - ]); - return { address: meta.contracts.PerpsAccountProxy, abi }; - } - case '84532-andromeda': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/84532-andromeda/meta.json'), - import('@synthetixio/v3-contracts/84532-andromeda/PerpsAccountProxy.readable.json'), - ]); - return { address: meta.contracts.PerpsAccountProxy, abi }; - } - case '42161-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-main/meta.json'), - import('@synthetixio/v3-contracts/42161-main/PerpsAccountProxy.readable.json'), - ]); - return { address: meta.contracts.PerpsAccountProxy, abi }; - } - case '421614-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/421614-main/meta.json'), - import('@synthetixio/v3-contracts/421614-main/PerpsAccountProxy.readable.json'), - ]); - return { address: meta.contracts.PerpsAccountProxy, abi }; - } - case '42161-arbthetix': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-arbthetix/meta.json'), - import('@synthetixio/v3-contracts/42161-arbthetix/PerpsAccountProxy.readable.json'), - ]); - return { address: meta.contracts.PerpsAccountProxy, abi }; - } - default: { - throw new Error(`Unsupported deployment ${deployment} for PerpsAccountProxy`); - } - } -} diff --git a/contracts/importers/importPerpsMarketProxy.js b/contracts/importers/importPerpsMarketProxy.js deleted file mode 100644 index 29eac0fba..000000000 --- a/contracts/importers/importPerpsMarketProxy.js +++ /dev/null @@ -1,67 +0,0 @@ -export async function importPerpsMarketProxy(chainId, preset) { - if (!preset) { - throw new Error(`Missing preset`); - } - const deployment = `${Number(chainId).toFixed(0)}-${preset}`; - switch (deployment) { - // case '1-main': { - // const [{default: meta}, {default: abi}] = await Promise.all([ - // import('@synthetixio/v3-contracts/1-main/meta.json'), - // import('@synthetixio/v3-contracts/1-main/PerpsMarketProxy.readable.json'), - // ]); - // return { address: meta.contracts.PerpsMarketProxy, abi }; - // } - // case '11155111-main': { - // const [{default: meta}, {default: abi}] = await Promise.all([ - // import('@synthetixio/v3-contracts/11155111-main/meta.json'), - // import('@synthetixio/v3-contracts/11155111-main/PerpsMarketProxy.readable.json'), - // ]); - // return { address: meta.contracts.PerpsMarketProxy, abi }; - // } - // case '10-main': { - // const [{default: meta}, {default: abi}] = await Promise.all([ - // import('@synthetixio/v3-contracts/10-main/meta.json'), - // import('@synthetixio/v3-contracts/10-main/PerpsMarketProxy.readable.json'), - // ]); - // return { address: meta.contracts.PerpsMarketProxy, abi }; - // } - case '8453-andromeda': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/8453-andromeda/meta.json'), - import('@synthetixio/v3-contracts/8453-andromeda/PerpsMarketProxy.readable.json'), - ]); - return { address: meta.contracts.PerpsMarketProxy, abi }; - } - case '84532-andromeda': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/84532-andromeda/meta.json'), - import('@synthetixio/v3-contracts/84532-andromeda/PerpsMarketProxy.readable.json'), - ]); - return { address: meta.contracts.PerpsMarketProxy, abi }; - } - case '42161-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-main/meta.json'), - import('@synthetixio/v3-contracts/42161-main/PerpsMarketProxy.readable.json'), - ]); - return { address: meta.contracts.PerpsMarketProxy, abi }; - } - case '421614-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/421614-main/meta.json'), - import('@synthetixio/v3-contracts/421614-main/PerpsMarketProxy.readable.json'), - ]); - return { address: meta.contracts.PerpsMarketProxy, abi }; - } - case '42161-arbthetix': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-arbthetix/meta.json'), - import('@synthetixio/v3-contracts/42161-arbthetix/PerpsMarketProxy.readable.json'), - ]); - return { address: meta.contracts.PerpsMarketProxy, abi }; - } - default: { - throw new Error(`Unsupported deployment ${deployment} for PerpsMarketProxy`); - } - } -} diff --git a/contracts/importers/importPythERC7412Wrapper.js b/contracts/importers/importPythERC7412Wrapper.js deleted file mode 100644 index 71ae399f8..000000000 --- a/contracts/importers/importPythERC7412Wrapper.js +++ /dev/null @@ -1,53 +0,0 @@ -export async function importPythERC7412Wrapper(chainId, preset) { - if (!preset) { - throw new Error(`Missing preset`); - } - const deployment = `${Number(chainId).toFixed(0)}-${preset}`; - switch (deployment) { - case '8453-andromeda': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/8453-andromeda/meta.json'), - import('@synthetixio/v3-contracts/8453-andromeda/PythERC7412Wrapper.readable.json'), - ]); - return { address: meta.contracts.PythERC7412Wrapper, abi }; - } - case '84532-andromeda': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/84532-andromeda/meta.json'), - import('@synthetixio/v3-contracts/84532-andromeda/PythERC7412Wrapper.readable.json'), - ]); - return { address: meta.contracts.PythERC7412Wrapper, abi }; - } - case '11155111-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/11155111-main/meta.json'), - import('@synthetixio/v3-contracts/11155111-main/PythERC7412Wrapper.readable.json'), - ]); - return { address: meta.contracts.PythERC7412Wrapper, abi }; - } - case '42161-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-main/meta.json'), - import('@synthetixio/v3-contracts/42161-main/PythERC7412Wrapper.readable.json'), - ]); - return { address: meta.contracts.PythERC7412Wrapper, abi }; - } - case '421614-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/421614-main/meta.json'), - import('@synthetixio/v3-contracts/421614-main/PythERC7412Wrapper.readable.json'), - ]); - return { address: meta.contracts.PythERC7412Wrapper, abi }; - } - case '42161-arbthetix': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-arbthetix/meta.json'), - import('@synthetixio/v3-contracts/42161-arbthetix/PythERC7412Wrapper.readable.json'), - ]); - return { address: meta.contracts.PythERC7412Wrapper, abi }; - } - default: { - throw new Error(`Unsupported deployment ${deployment} for PythERC7412Wrapper`); - } - } -} diff --git a/contracts/importers/importRewardDistributor.js b/contracts/importers/importRewardDistributor.js deleted file mode 100644 index 608f40dec..000000000 --- a/contracts/importers/importRewardDistributor.js +++ /dev/null @@ -1,59 +0,0 @@ -const abi = [ - 'constructor(address rewardManager_, uint128 poolId_, address collateralType_, address payoutToken_, uint8 payoutTokenDecimals_, string name_)', - 'function SYSTEM_PRECISION() view returns (uint256)', - 'function collateralType() view returns (address)', - 'function distributeRewards(uint128 poolId_, address collateralType_, uint256 amount_, uint64 start_, uint32 duration_)', - 'function name() view returns (string)', - 'function onPositionUpdated(uint128, uint128, address, uint256)', - 'function payout(uint128, uint128 poolId_, address collateralType_, address payoutTarget_, uint256 payoutAmount_) returns (bool)', - 'function payoutToken() view returns (address)', - 'function poolId() view returns (uint128)', - 'function precision() view returns (uint256)', - 'function rewardManager() view returns (address)', - 'function rewardsAmount() view returns (uint256)', - 'function setShouldFailPayout(bool shouldFailPayout_)', - 'function shouldFailPayout() view returns (bool)', - 'function supportsInterface(bytes4 interfaceId) view returns (bool)', - 'function token() view returns (address)', - 'error FailedTransfer(address from, address to, uint256 value)', - 'error InvalidParameter(string parameter, string reason)', - 'error NotEnoughBalance(uint256 amountRequested, uint256 currentBalance)', - 'error NotEnoughRewardsLeft(uint256 amountRequested, uint256 amountLeft)', - 'error Unauthorized(address addr)', -]; - -export async function importRewardDistributor(chainId, preset) { - if (!preset) { - throw new Error(`Missing preset`); - } - const deployment = `${Number(chainId).toFixed(0)}-${preset}`; - switch (deployment) { - case '1-main': { - return { address: null, abi }; - } - case '11155111-main': { - return { address: null, abi }; - } - case '10-main': { - return { address: null, abi }; - } - case '8453-andromeda': { - return { address: null, abi }; - } - case '84532-andromeda': { - return { address: null, abi }; - } - case '42161-main': { - return { address: null, abi }; - } - case '421614-main': { - return { address: null, abi }; - } - case '42161-arbthetix': { - return { address: null, abi }; - } - default: { - throw new Error(`Unsupported deployment ${deployment} for RewardsDistributor`); - } - } -} diff --git a/contracts/importers/importRewardsDistributors.js b/contracts/importers/importRewardsDistributors.js deleted file mode 100644 index 6bc265f98..000000000 --- a/contracts/importers/importRewardsDistributors.js +++ /dev/null @@ -1,59 +0,0 @@ -export async function importRewardsDistributors(chainId, preset) { - if (!preset) { - throw new Error(`Missing preset`); - } - const deployment = `${Number(chainId).toFixed(0)}-${preset}`; - switch (deployment) { - case '1-main': { - const [{ default: rewardsDistributors }] = await Promise.all([ - import('@synthetixio/v3-contracts/1-main/rewardsDistributors.json'), - ]); - return rewardsDistributors; - } - case '11155111-main': { - const [{ default: rewardsDistributors }] = await Promise.all([ - import('@synthetixio/v3-contracts/11155111-main/rewardsDistributors.json'), - ]); - return rewardsDistributors; - } - case '10-main': { - const [{ default: rewardsDistributors }] = await Promise.all([ - import('@synthetixio/v3-contracts/10-main/rewardsDistributors.json'), - ]); - return rewardsDistributors; - } - case '8453-andromeda': { - const [{ default: rewardsDistributors }] = await Promise.all([ - import('@synthetixio/v3-contracts/8453-andromeda/rewardsDistributors.json'), - ]); - return rewardsDistributors; - } - case '84532-andromeda': { - const [{ default: rewardsDistributors }] = await Promise.all([ - import('@synthetixio/v3-contracts/84532-andromeda/rewardsDistributors.json'), - ]); - return rewardsDistributors; - } - case '42161-main': { - const [{ default: rewardsDistributors }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-main/rewardsDistributors.json'), - ]); - return rewardsDistributors; - } - case '421614-main': { - const [{ default: rewardsDistributors }] = await Promise.all([ - import('@synthetixio/v3-contracts/421614-main/rewardsDistributors.json'), - ]); - return rewardsDistributors; - } - case '42161-arbthetix': { - const [{ default: rewardsDistributors }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-arbthetix/rewardsDistributors.json'), - ]); - return rewardsDistributors; - } - default: { - throw new Error(`Unsupported deployment ${deployment} for RewardsDistributors`); - } - } -} diff --git a/contracts/importers/importSpotMarketProxy.js b/contracts/importers/importSpotMarketProxy.js deleted file mode 100644 index 61caa47e6..000000000 --- a/contracts/importers/importSpotMarketProxy.js +++ /dev/null @@ -1,67 +0,0 @@ -export async function importSpotMarketProxy(chainId, preset) { - if (!preset) { - throw new Error(`Missing preset`); - } - const deployment = `${Number(chainId).toFixed(0)}-${preset}`; - switch (deployment) { - case '1-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/1-main/meta.json'), - import('@synthetixio/v3-contracts/1-main/SpotMarketProxy.readable.json'), - ]); - return { address: meta.contracts.SpotMarketProxy, abi }; - } - case '11155111-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/11155111-main/meta.json'), - import('@synthetixio/v3-contracts/11155111-main/SpotMarketProxy.readable.json'), - ]); - return { address: meta.contracts.SpotMarketProxy, abi }; - } - case '10-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/10-main/meta.json'), - import('@synthetixio/v3-contracts/10-main/SpotMarketProxy.readable.json'), - ]); - return { address: meta.contracts.SpotMarketProxy, abi }; - } - case '8453-andromeda': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/8453-andromeda/meta.json'), - import('@synthetixio/v3-contracts/8453-andromeda/SpotMarketProxy.readable.json'), - ]); - return { address: meta.contracts.SpotMarketProxy, abi }; - } - case '84532-andromeda': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/84532-andromeda/meta.json'), - import('@synthetixio/v3-contracts/84532-andromeda/SpotMarketProxy.readable.json'), - ]); - return { address: meta.contracts.SpotMarketProxy, abi }; - } - case '42161-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-main/meta.json'), - import('@synthetixio/v3-contracts/42161-main/SpotMarketProxy.readable.json'), - ]); - return { address: meta.contracts.SpotMarketProxy, abi }; - } - case '421614-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/421614-main/meta.json'), - import('@synthetixio/v3-contracts/421614-main/SpotMarketProxy.readable.json'), - ]); - return { address: meta.contracts.SpotMarketProxy, abi }; - } - case '42161-arbthetix': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-arbthetix/meta.json'), - import('@synthetixio/v3-contracts/42161-arbthetix/SpotMarketProxy.readable.json'), - ]); - return { address: meta.contracts.SpotMarketProxy, abi }; - } - default: { - throw new Error(`Unsupported deployment ${deployment} for SpotMarketProxy`); - } - } -} diff --git a/contracts/importers/importSynthTokens.js b/contracts/importers/importSynthTokens.js deleted file mode 100644 index 151cef653..000000000 --- a/contracts/importers/importSynthTokens.js +++ /dev/null @@ -1,59 +0,0 @@ -export async function importSynthTokens(chainId, preset) { - if (!preset) { - throw new Error(`Missing preset`); - } - const deployment = `${Number(chainId).toFixed(0)}-${preset}`; - switch (deployment) { - case '1-main': { - const [{ default: synthTokens }] = await Promise.all([ - import('@synthetixio/v3-contracts/1-main/synthTokens.json'), - ]); - return synthTokens; - } - case '11155111-main': { - const [{ default: synthTokens }] = await Promise.all([ - import('@synthetixio/v3-contracts/11155111-main/synthTokens.json'), - ]); - return synthTokens; - } - case '10-main': { - const [{ default: synthTokens }] = await Promise.all([ - import('@synthetixio/v3-contracts/10-main/synthTokens.json'), - ]); - return synthTokens; - } - case '8453-andromeda': { - const [{ default: synthTokens }] = await Promise.all([ - import('@synthetixio/v3-contracts/8453-andromeda/synthTokens.json'), - ]); - return synthTokens; - } - case '84532-andromeda': { - const [{ default: synthTokens }] = await Promise.all([ - import('@synthetixio/v3-contracts/84532-andromeda/synthTokens.json'), - ]); - return synthTokens; - } - case '42161-main': { - const [{ default: synthTokens }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-main/synthTokens.json'), - ]); - return synthTokens; - } - case '421614-main': { - const [{ default: synthTokens }] = await Promise.all([ - import('@synthetixio/v3-contracts/421614-main/synthTokens.json'), - ]); - return synthTokens; - } - case '42161-arbthetix': { - const [{ default: synthTokens }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-arbthetix/synthTokens.json'), - ]); - return synthTokens; - } - default: { - throw new Error(`Unsupported deployment ${deployment} for SynthTokens`); - } - } -} diff --git a/contracts/importers/importSystemToken.js b/contracts/importers/importSystemToken.js deleted file mode 100644 index f9f285aea..000000000 --- a/contracts/importers/importSystemToken.js +++ /dev/null @@ -1,59 +0,0 @@ -export async function importSystemToken(chainId, preset) { - if (!preset) { - throw new Error(`Missing preset`); - } - const deployment = `${Number(chainId).toFixed(0)}-${preset}`; - switch (deployment) { - case '1-main': { - const [{ default: systemToken }] = await Promise.all([ - import('@synthetixio/v3-contracts/1-main/systemToken.json'), - ]); - return systemToken; - } - case '11155111-main': { - const [{ default: systemToken }] = await Promise.all([ - import('@synthetixio/v3-contracts/11155111-main/systemToken.json'), - ]); - return systemToken; - } - case '10-main': { - const [{ default: systemToken }] = await Promise.all([ - import('@synthetixio/v3-contracts/10-main/systemToken.json'), - ]); - return systemToken; - } - case '8453-andromeda': { - const [{ default: systemToken }] = await Promise.all([ - import('@synthetixio/v3-contracts/8453-andromeda/systemToken.json'), - ]); - return systemToken; - } - case '84532-andromeda': { - const [{ default: systemToken }] = await Promise.all([ - import('@synthetixio/v3-contracts/84532-andromeda/systemToken.json'), - ]); - return systemToken; - } - case '42161-main': { - const [{ default: systemToken }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-main/systemToken.json'), - ]); - return systemToken; - } - case '421614-main': { - const [{ default: systemToken }] = await Promise.all([ - import('@synthetixio/v3-contracts/421614-main/systemToken.json'), - ]); - return systemToken; - } - case '42161-arbthetix': { - const [{ default: systemToken }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-arbthetix/systemToken.json'), - ]); - return systemToken; - } - default: { - throw new Error(`Unsupported deployment ${deployment} for SystemToken`); - } - } -} diff --git a/contracts/importers/importUSDProxy.js b/contracts/importers/importUSDProxy.js deleted file mode 100644 index 1416024e5..000000000 --- a/contracts/importers/importUSDProxy.js +++ /dev/null @@ -1,67 +0,0 @@ -export async function importUSDProxy(chainId, preset) { - if (!preset) { - throw new Error(`Missing preset`); - } - const deployment = `${Number(chainId).toFixed(0)}-${preset}`; - switch (deployment) { - case '1-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/1-main/meta.json'), - import('@synthetixio/v3-contracts/1-main/USDProxy.readable.json'), - ]); - return { address: meta.contracts.USDProxy, abi }; - } - case '11155111-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/11155111-main/meta.json'), - import('@synthetixio/v3-contracts/11155111-main/USDProxy.readable.json'), - ]); - return { address: meta.contracts.USDProxy, abi }; - } - case '10-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/10-main/meta.json'), - import('@synthetixio/v3-contracts/10-main/USDProxy.readable.json'), - ]); - return { address: meta.contracts.USDProxy, abi }; - } - case '8453-andromeda': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/8453-andromeda/meta.json'), - import('@synthetixio/v3-contracts/8453-andromeda/USDProxy.readable.json'), - ]); - return { address: meta.contracts.USDProxy, abi }; - } - case '84532-andromeda': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/84532-andromeda/meta.json'), - import('@synthetixio/v3-contracts/84532-andromeda/USDProxy.readable.json'), - ]); - return { address: meta.contracts.USDProxy, abi }; - } - case '42161-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-main/meta.json'), - import('@synthetixio/v3-contracts/42161-main/USDProxy.readable.json'), - ]); - return { address: meta.contracts.USDProxy, abi }; - } - case '421614-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/421614-main/meta.json'), - import('@synthetixio/v3-contracts/421614-main/USDProxy.readable.json'), - ]); - return { address: meta.contracts.USDProxy, abi }; - } - case '42161-arbthetix': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/42161-arbthetix/meta.json'), - import('@synthetixio/v3-contracts/42161-arbthetix/USDProxy.readable.json'), - ]); - return { address: meta.contracts.USDProxy, abi }; - } - default: { - throw new Error(`Unsupported deployment ${deployment} for USDProxy`); - } - } -} diff --git a/contracts/importers/importV2x.js b/contracts/importers/importV2x.js deleted file mode 100644 index e67d0d5d6..000000000 --- a/contracts/importers/importV2x.js +++ /dev/null @@ -1,32 +0,0 @@ -export async function importV2x(chainId, preset) { - if (!preset) { - throw new Error(`Missing preset`); - } - const deployment = `${Number(chainId).toFixed(0)}-${preset}`; - switch (deployment) { - case '1-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/1-main/meta.json'), - import('@synthetixio/v3-contracts/1-main/V2x.readable.json'), - ]); - return { address: meta.contracts.V2x, abi }; - } - case '11155111-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/11155111-main/meta.json'), - import('@synthetixio/v3-contracts/11155111-main/V2x.readable.json'), - ]); - return { address: meta.contracts.V2x, abi }; - } - /*case '10-main': { - const [{ default: meta }, { default: abi }] = await Promise.all([ - import('@synthetixio/v3-contracts/10-main/meta.json'), - import('@synthetixio/v3-contracts/10-main/V2x.readable.json'), - ]); - return { address: meta.contracts.V2x, abi }; - }*/ - default: { - throw new Error(`Unsupported deployment ${deployment} for V2x`); - } - } -} diff --git a/contracts/index.d.ts b/contracts/index.d.ts deleted file mode 100644 index 04d1a4116..000000000 --- a/contracts/index.d.ts +++ /dev/null @@ -1,115 +0,0 @@ -declare module '@snx-v3/contracts' { - function importCoreProxy( - chainId?: number, - preset?: string - ): Promise<{ address: string; abi: string[] }>; - - function importAccountProxy( - chainId?: number, - preset?: string - ): Promise<{ address: string; abi: string[] }>; - - function importUSDProxy( - chainId?: number, - preset?: string - ): Promise<{ address: string; abi: string[] }>; - - function importV2x( - chainId?: number, - preset?: string - ): Promise<{ address: string; abi: string[] }>; - - function importSpotMarketProxy( - chainId?: number, - preset?: string - ): Promise<{ address: string; abi: string[] }>; - - function importMulticall3( - chainId?: number, - preset?: string - ): Promise<{ address: string; abi: string[] }>; - - function importLegacyMarket( - chainId?: number, - preset?: string - ): Promise<{ address: string; abi: string[] }>; - - function importOracleManagerProxy( - chainId?: number, - preset?: string - ): Promise<{ address: string; abi: string[] }>; - - function importPythERC7412Wrapper( - chainId?: number, - preset?: string - ): Promise<{ address: string; abi: string[] }>; - - function importRewardsDistributors( - chainId?: number, - preset?: string - ): Promise< - { - address: string; - name: string; - poolId: string; - - // undefined for Pool-level distributors - collateralType?: { - address: string; - symbol: string; - name: string; - decimals: number; - }; - - payoutToken: { - address: string; - symbol: string; - name: string; - decimals: number; - }; - rewardManager: string; - isRegistered: boolean; - }[] - >; - - function importExtras( - chainId?: number, - preset?: string - ): Promise<{ - [key: string]: string; - }>; - - function importCollateralTokens( - chainId?: number, - preset?: string - ): Promise< - { - address: string; - symbol: string; - name: string; - decimals: number; - depositingEnabled: boolean; - issuanceRatioD18: string; - liquidationRatioD18: string; - liquidationRewardD18: string; - oracleNodeId: string; - tokenAddress: string; - minDelegationD18: string; - }[] - >; - - function importSystemToken( - chainId?: number, - preset?: string - ): Promise<{ - address: string; - symbol: string; - name: string; - decimals: number; - }>; - - function importAllErrors( - chainId?: number, - preset?: string - ): Promise<{ address: string; abi: string[] }>; -} diff --git a/contracts/index.js b/contracts/index.js deleted file mode 100644 index c084cc4a7..000000000 --- a/contracts/index.js +++ /dev/null @@ -1,22 +0,0 @@ -// Contracts -export * from './importers/importAllErrors'; -export * from './importers/importCoreProxy'; -export * from './importers/importAccountProxy'; -export * from './importers/importUSDProxy'; -export * from './importers/importOracleManagerProxy'; -export * from './importers/importLegacyMarket'; -export * from './importers/importV2x'; -export * from './importers/importMulticall3'; -export * from './importers/importRewardDistributor'; -export * from './importers/importSpotMarketProxy'; -export * from './importers/importPerpsMarketProxy'; -export * from './importers/importPerpsAccountProxy'; -export * from './importers/importPythERC7412Wrapper'; - -// Deployment extras -export * from './importers/importExtras'; -export * from './importers/importCollateralTokens'; -export * from './importers/importMintableTokens'; -export * from './importers/importRewardsDistributors'; -export * from './importers/importSynthTokens'; -export * from './importers/importSystemToken'; diff --git a/contracts/package.json b/contracts/package.json deleted file mode 100644 index 1a91d9eb0..000000000 --- a/contracts/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "@snx-v3/contracts", - "private": true, - "version": "0.0.0", - "main": "index.js", - "scripts": { - "start:mainnet": "anvil --chain-id 1 --fork-url https://mainnet.infura.io/v3/$INFURA_KEY", - "start:sepolia": "anvil --chain-id 11155111 --fork-url https://sepolia.infura.io/v3/$INFURA_KEY", - "start:optimism": "anvil --chain-id 10 --fork-url https://optimism.infura.io/v3/$INFURA_KEY", - "start:base": "anvil --chain-id 8453 --fork-url https://base-mainnet.infura.io/v3/$INFURA_KEY", - "start:base-sepolia": "anvil --chain-id 84532 --fork-url https://base-sepolia.infura.io/v3/$INFURA_KEY", - "start:arbitrum": "anvil --chain-id 42161 --fork-url https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY", - "start:arbitrum-sepolia": "anvil --chain-id 421614 --fork-url https://arbitrum-sepolia.infura.io/v3/$INFURA_KEY" - }, - "dependencies": { - "@synthetixio/v3-contracts": "^6.7.0", - "viem": "^2.13.5" - } -} diff --git a/governance/cypress/.eslintrc b/governance/cypress/.eslintrc deleted file mode 100644 index d5ba8f9d9..000000000 --- a/governance/cypress/.eslintrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "rules": { - "no-console": "off" - } -} diff --git a/governance/cypress/.gitignore b/governance/cypress/.gitignore deleted file mode 100644 index 11ee75815..000000000 --- a/governance/cypress/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.env.local diff --git a/governance/cypress/bin/approveCollateral.ts b/governance/cypress/bin/approveCollateral.ts deleted file mode 100755 index bf222e64e..000000000 --- a/governance/cypress/bin/approveCollateral.ts +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env ts-node - -// @ts-ignore -import { approveCollateral } from '../cypress/tasks/approveCollateral'; -const [privateKey, symbol] = process.argv.slice(2); -if (!privateKey || !symbol) { - throw new Error('Usage: ./approveCollateral.ts '); -} -approveCollateral({ privateKey, symbol }); diff --git a/governance/cypress/bin/createAccount.ts b/governance/cypress/bin/createAccount.ts deleted file mode 100755 index eec637e82..000000000 --- a/governance/cypress/bin/createAccount.ts +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env ts-node - -// @ts-ignore -import { createAccount } from '../cypress/tasks/createAccount'; -const [privateKey] = process.argv.slice(2); -if (!privateKey) { - throw new Error('Usage: ./approveCollateral.ts '); -} -createAccount({ privateKey }); diff --git a/governance/cypress/bin/getSnx.ts b/governance/cypress/bin/getSnx.ts deleted file mode 100755 index 7c25eca88..000000000 --- a/governance/cypress/bin/getSnx.ts +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env ts-node - -// @ts-ignore -import { getSnx } from '../cypress/tasks/getSnx'; -const [address, amount] = process.argv.slice(2); -if (!address || !amount) { - throw new Error('Usage: ./getSnx.ts
'); -} -getSnx({ address, amount: parseFloat(amount) }); diff --git a/governance/cypress/bin/setEthBalance.ts b/governance/cypress/bin/setEthBalance.ts deleted file mode 100755 index 643e5c0df..000000000 --- a/governance/cypress/bin/setEthBalance.ts +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env ts-node - -// @ts-ignore -import { setEthBalance } from '../cypress/tasks/setEthBalance'; -const [address, balance] = process.argv.slice(2); -if (!address || !balance) { - throw new Error('Usage: ./setEthBalance.ts
'); -} -setEthBalance({ address, balance }); diff --git a/governance/cypress/cypress.config.js b/governance/cypress/cypress.config.js deleted file mode 100644 index c97b4044d..000000000 --- a/governance/cypress/cypress.config.js +++ /dev/null @@ -1,52 +0,0 @@ -const { defineConfig } = require('cypress'); - -module.exports = defineConfig({ - reporter: 'junit', - reporterOptions: { - mochaFile: './cypress/reports/junit-results.[hash].xml', - toConsole: false, - }, - - component: { - watchForFileChanges: false, - specPattern: ['../**/*.cy.{js,jsx,ts,tsx}'], - devServer: { - framework: 'react', - bundler: 'webpack', - webpackConfig: require('../ui/webpack.config'), - }, - setupNodeEvents(on, config) { - require('@cypress/code-coverage/task')(on, config); - return config; - }, - }, - - e2e: { - watchForFileChanges: false, - specPattern: ['../**/*.e2e.{js,jsx,ts,tsx}'], - baseUrl: 'http://localhost:3000', - setupNodeEvents(on, config) { - if (process.env.CI) { - on('before:browser:launch', require('@snx-cy/printBrowserLogs').printBrowserLogs); - require('@cypress/code-coverage/task')(on, config); - } - on('task', { - ...require('./cypress/tasks/setEthBalance'), - ...require('./cypress/tasks/automineBlocks'), - ...require('./cypress/tasks/mineBlock'), - ...require('./cypress/tasks/changePeriod'), - ...require('./cypress/tasks/prepareVotingPower'), - }); - - return config; - }, - - retries: { - runMode: 1, - openMode: 0, - }, - defaultCommandTimeout: 90_000, - execTimeout: 120_000, - taskTimeout: 300_000, // sometimes Anvil needs quite a bit of time to complete impersonating tx - }, -}); diff --git a/governance/cypress/cypress.d.ts b/governance/cypress/cypress.d.ts deleted file mode 100644 index b4d2b6c45..000000000 --- a/governance/cypress/cypress.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { mount } from 'cypress/react'; -import { ethers } from 'ethers'; - -// Augment the Cypress namespace to include type definitions for -// your custom command. -// Alternatively, can be defined in cypress/support/component.d.ts -// with a at the top of your spec. -declare global { - namespace Cypress { - interface Chainable { - mount: typeof mount; - connectWallet: (namespace?: string) => Promise; - } - } -} diff --git a/governance/cypress/cypress/.gitignore b/governance/cypress/cypress/.gitignore deleted file mode 100644 index 74798a0ca..000000000 --- a/governance/cypress/cypress/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# cypress ignores -videos -screenshots -reports -forks diff --git a/governance/cypress/cypress/e2e/Councils - Administration.e2e.js b/governance/cypress/cypress/e2e/Councils - Administration.e2e.js deleted file mode 100644 index 1819eca45..000000000 --- a/governance/cypress/cypress/e2e/Councils - Administration.e2e.js +++ /dev/null @@ -1,32 +0,0 @@ -it('Councils - Administration', () => { - cy.task('changePeriod', { council: 'spartan', period: 'admin' }); - cy.task('changePeriod', { council: 'ambassador', period: 'admin' }); - cy.task('changePeriod', { council: 'treasury', period: 'admin' }); - cy.task('mineBlock'); - cy.connectWallet(); - cy.viewport(1300, 900); - cy.visit('/'); - cy.get('[data-cy="account-menu-button"]') - .should('have.css', 'padding-left', '8px') - .and('have.css', 'padding-right', '8px'); - cy.get('[data-cy="view-council-button-spartan"]').should('exist'); - cy.get('[data-cy="countdown-timer"]').should('exist'); - cy.get('[data-cy="council-period-badge"]').contains('Closed - Council Elected'); - cy.get('[data-cy="council-tab-vote-circle"]').should('not.exist'); - cy.get('[data-cy="view-council-button-spartan"]').click(); - cy.get('[data-cy="election-closed-tag"]').should('exist'); - cy.get('[data-cy="council-image-council-tabs-spartan"]').should('have.css', 'width', '32px'); - cy.get('[data-cy="user-action-box-unselected"]') - .should('have.css', 'top', '105px') - .and('have.css', 'position', 'sticky'); - cy.get('[data-cy="council-image-council-tabs-spartan-circle"]') - .should('have.css', 'width', '40px') - .and('have.css', 'height', '40px'); - cy.get('[data-cy="council-information-spartan"]').should('have.css', 'gap', '8px'); - cy.viewport(400, 800); - cy.visit('#/councils'); - cy.get('[data-cy="my-votes-summary-text"]').should('have.css', 'font-size', '14px'); - cy.get('[data-cy="council-select-mobile"]').should('have.css', 'font-size', '12px'); - cy.get('[data-cy="menu-button-flex-council-select"]').should('have.css', 'height', '48px'); - cy.get('[data-cy="my-votes-button"]').should('have.css', 'height', '48px'); -}); diff --git a/governance/cypress/cypress/e2e/Councils - Nomination.e2e.js b/governance/cypress/cypress/e2e/Councils - Nomination.e2e.js deleted file mode 100644 index d758ae76b..000000000 --- a/governance/cypress/cypress/e2e/Councils - Nomination.e2e.js +++ /dev/null @@ -1,64 +0,0 @@ -it('Councils - Administration', () => { - cy.task('changePeriod', { council: 'spartan', period: 'nomination' }); - cy.task('changePeriod', { council: 'ambassador', period: 'nomination' }); - cy.task('changePeriod', { council: 'treasury', period: 'nomination' }); - cy.task('mineBlock'); - cy.connectWallet(); - cy.viewport(1300, 900); - cy.visit('/'); - cy.get('[data-cy="view-council-button-spartan"]').should('exist'); - cy.get('[data-cy="council-period-badge"]').contains('Nomination Open'); - cy.get('[data-cy="council-tab-vote-circle"]').should('not.exist'); - cy.get('[data-cy="view-council-button-spartan"]').click(); - cy.get('[data-cy="period-countdown"]').should('exist'); - cy.get('[data-cy="period-countdown"]').contains('Voting starts'); - cy.get('[data-cy="name-table-header"]').click(); - cy.get('[data-cy="sort-arrow-down"]').should('exist'); - cy.get('[data-cy="sort-arrow-down"]').click(); - cy.get('[data-cy="sort-arrow-up"]').should('exist'); - cy.get('[data-cy="sort-arrow-up"]').click(); - cy.get('[data-cy="own-user-list-item"]').should( - 'have.css', - 'border-top', - '0px solid rgb(48, 48, 55)' - ); - cy.get('[data-cy="own-user-list-item"]').click(); - cy.get('[data-cy="edit-icon-user-profile-details"]').should('exist'); - cy.get('[data-cy="user-profile-wallet-address"]').should('have.css', 'font-size', '14px'); - cy.get('[data-cy="nominate-self-button-user-profile-details"]') - .should('have.css', 'color', 'rgb(0, 0, 0)') - .click(); - cy.get('[data-cy="nominate-self-username"]').should('exist'); - cy.get('[data-cy="council-select-button-text-nominate-self"]').should( - 'have.css', - 'font-size', - '14px' - ); - cy.get('[data-cy="council-nomination-select-spartan"]').click(); - cy.get('[data-cy="nominate-self-cast-nomination-button"]').click(); - cy.get('[data-cy="nominate-self-modal"]') - .should('have.css', 'top', '105px') - .and('have.css', 'position', 'sticky'); - cy.get('[data-cy="nominate-self-done-button"]').click(); - cy.get('[data-cy="empty-state-user-action-box"]').contains( - 'Click on a nominee to see their profile details' - ); - cy.get('[data-cy="user-table-view-0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"]').should( - 'have.css', - 'textOverflow', - 'ellipsis' - ); - cy.get('[data-cy="user-table-view-button-0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"]').click(); - cy.get('[data-cy="nominate-self-button-user-profile-details"]').click(); - cy.get('[data-cy="withdraw-vote-select"]').click(); - cy.get('[data-cy="edit-nomination-button"]').click(); - cy.get('[data-cy="edit-nomination"]').should('have.css', 'height', '612px'); - cy.get('[data-cy="confirm-edit-nomination-button"]').click(); - cy.get('[data-cy="empty-state-user-action-box"]').contains( - 'Click on a nominee to see their profile details' - ); - cy.get('[data-cy="user-table-view-button-0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"]').should( - 'not.exist' - ); - cy.get('[data-cy="user-list-item-button-nomination"]').contains('Nominate Self'); -}); diff --git a/governance/cypress/cypress/e2e/Councils - Voting.e2e.js b/governance/cypress/cypress/e2e/Councils - Voting.e2e.js deleted file mode 100644 index dee1a73a9..000000000 --- a/governance/cypress/cypress/e2e/Councils - Voting.e2e.js +++ /dev/null @@ -1,68 +0,0 @@ -it('Councils - Administration', () => { - cy.task('prepareVotingPower', { council: 'spartan' }); - cy.task('mineBlock'); - cy.task('prepareVotingPower', { council: 'ambassador' }); - cy.task('mineBlock'); - cy.task('prepareVotingPower', { council: 'treasury' }); - cy.task('mineBlock'); - cy.connectWallet(); - cy.viewport(1300, 900); - cy.visit('/'); - cy.get('[data-cy="vote-council-button-spartan"]').should('exist'); - cy.get('[data-cy="council-period-badge"]').contains('Voting Open'); - cy.get('[data-cy="account-menu-button"]').click(); - cy.get('[data-cy="council-tab-vote-circle"]').should('not.exist'); - cy.get('[data-cy="vote-council-button-spartan"]').click(); - cy.get('[data-cy="period-countdown"]').should('exist'); - cy.get('[data-cy="period-countdown"]').contains('Voting ends'); - cy.get('[data-cy="name-table-header"]').click(); - cy.get('[data-cy="sort-arrow-down"]').should('exist'); - cy.get('[data-cy="sort-arrow-down"]').click(); - cy.get('[data-cy="sort-arrow-up"]').should('exist'); - cy.get('[data-cy="sort-arrow-up"]').click(); - cy.get('[data-cy="own-user-list-item"]').click(); - cy.get('[data-cy="nominate-self-button-user-profile-details-voting-period"]').click(); - cy.get('[data-cy="nominate-self-button-in-user-profile"]').click(); - cy.get('[data-cy="council-nomination-select-spartan"]').click(); - cy.get('[data-cy="nominate-self-cast-nomination-button"]').click(); - cy.get('[data-cy="nominate-self-done-button"]').click(); - cy.get('[data-cy="empty-state-user-action-box"]').contains( - 'Click on a nominee to see their profile details' - ); - cy.get('[data-cy="own-user-list-item"]').click(); - cy.get('[data-cy="select-user-to-vote-button"]').contains('Select'); - cy.get('[data-cy="select-user-to-vote-button"]').click(); - cy.get('[data-cy="my-votes-button"]').click(); - cy.get( - '[data-cy="user-blockies-council-tabs-0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"]' - ).should('exist'); - - cy.get('[data-cy="selected-badge-my-row"]').should('exist'); - cy.wait(3000); - cy.get('[data-cy="my-votes-voting-power"]').contains('30.00'); - cy.get('[data-cy="cast-my-vote-button"]').click(); - cy.get('[data-cy="cast-vote-anyway-button"]').click(); - cy.wait(3000); - cy.window().then((win) => { - win.localStorage.clear(); - }); - cy.reload({ cache: false }); - cy.get( - '[data-cy="user-blockies-council-tabs-0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"]' - ).should('exist'); - cy.visit('#/councils/spartan'); - cy.get('[data-cy="your-vote-badge-table"]').should('exist'); - cy.visit('#/my-votes'); - cy.wait(3000); - cy.get('[data-cy="remove-vote-button-spartan"]').click(); - cy.get('[data-cy="selected-badge-my-row"]').should('exist'); - cy.get('[data-cy="cast-my-vote-button"]').click(); - cy.get('[data-cy="cast-vote-anyway-button"]').click(); - cy.wait(3000); - cy.get('[data-cy="my-votes-total-votes"]').contains('0/3'); - cy.reload({ cache: false }); - cy.get( - '[data-cy="user-blockies-council-tabs-0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"]' - ).should('not.exist'); - cy.get('[data-cy="my-votes-total-votes"]').contains('0/3'); -}); diff --git a/governance/cypress/cypress/e2e/Edit - Profile.e2e.js b/governance/cypress/cypress/e2e/Edit - Profile.e2e.js deleted file mode 100644 index e2b81ed82..000000000 --- a/governance/cypress/cypress/e2e/Edit - Profile.e2e.js +++ /dev/null @@ -1,34 +0,0 @@ -it('should let user edit their profile', () => { - cy.connectWallet(); - cy.viewport(1300, 900); - cy.visit('/'); - cy.get("[data-cy='header-wallet-address-button']").click(); - cy.get("[data-cy='edit-profile-button-link-header']").click(); - - cy.get("[data-cy='username-input']").type('test username'); - cy.get("[data-cy='username-preview']").contains('test username'); - - cy.get("[data-cy='about-input']").type('its me, the test account'); - cy.get("[data-cy='about-preview']").contains('its me, the test account'); - - cy.get("[data-cy='discord-input']").type('kaiynne'); - cy.get("[data-cy='discord-social-link']").should( - 'have.attr', - 'href', - 'https://discord.com/user/kaiynne' - ); - - cy.get("[data-cy='twitter-input']").type('kaiynne'); - cy.get("[data-cy='twitter-social-link']").should('have.attr', 'href', 'https://x.com/kaiynne'); - - cy.get("[data-cy='github-input']").type('kaiynne'); - cy.get("[data-cy='github-social-link']").should( - 'have.attr', - 'href', - 'https://github.com/kaiynne' - ); - - cy.get("[data-cy='governance-pitch-input']").type('sup its me kaiynne'); - cy.get("[data-cy='governance-pitch-preview']").contains('sup its me kaiynne'); - cy.get("[data-cy='save-profile-changes-button']").should('exist'); -}); diff --git a/governance/cypress/cypress/e2e/Home - Not Connected.e2e.js b/governance/cypress/cypress/e2e/Home - Not Connected.e2e.js deleted file mode 100644 index 78e65b7f1..000000000 --- a/governance/cypress/cypress/e2e/Home - Not Connected.e2e.js +++ /dev/null @@ -1,9 +0,0 @@ -it('shows homepage to a not connected wallet', () => { - cy.viewport(1300, 900); - cy.visit('/'); - - cy.contains('[data-cy="council-card-header-spartan"]', 'Spartan Council').should('exist'); - cy.contains('[data-cy="council-card-header-ambassador"]', 'Ambassador Council').should('exist'); - cy.contains('[data-cy="council-card-header-treasury"]', 'Treasury Council').should('exist'); - cy.contains('[data-cy="connect-wallet-button"]', 'Connect Wallet').should('exist'); -}); diff --git a/governance/cypress/cypress/lib/metamask.js b/governance/cypress/cypress/lib/metamask.js deleted file mode 100644 index 3f9eb91ef..000000000 --- a/governance/cypress/cypress/lib/metamask.js +++ /dev/null @@ -1,38 +0,0 @@ -import { ethers } from 'ethers'; - -export function metamask({ pk, address }) { - const provider = new ethers.providers.JsonRpcProvider('http://127.0.0.1:8545'); - return new Proxy(provider, { - get(target, prop) { - switch (prop) { - case 'chainId': - return `0x${Number(provider._network.chainId).toString(16)}`; - case 'isMetaMask': - return true; - case 'getSigner': - return () => { - const wallet = new ethers.Wallet(pk); - return wallet.connect(provider); - }; - case 'request': - return async ({ method, params }) => { - switch (method) { - case 'eth_accounts': - case 'eth_requestAccounts': - return [address]; - case 'eth_sendTransaction': - await provider.send('anvil_impersonateAccount', [address]); - const result = await provider.send(method, params); - await provider.send('anvil_stopImpersonatingAccount', [address]); - return result; - default: { - return await provider.send(method, params); - } - } - }; - default: - return target[prop]; - } - }, - }); -} diff --git a/governance/cypress/cypress/lib/testname.js b/governance/cypress/cypress/lib/testname.js deleted file mode 100644 index 8408c713f..000000000 --- a/governance/cypress/cypress/lib/testname.js +++ /dev/null @@ -1,3 +0,0 @@ -export function testname() { - return Cypress.currentTest.titlePath.join('--').replace(/[^\w-]+/gi, '-'); -} diff --git a/governance/cypress/cypress/support/component-index.html b/governance/cypress/cypress/support/component-index.html deleted file mode 100644 index 5aaab9c5f..000000000 --- a/governance/cypress/cypress/support/component-index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - Components App - - -
- - diff --git a/governance/cypress/cypress/support/component.js b/governance/cypress/cypress/support/component.js deleted file mode 100644 index 5dcc30eb4..000000000 --- a/governance/cypress/cypress/support/component.js +++ /dev/null @@ -1,18 +0,0 @@ -import { ChakraProvider } from '@chakra-ui/react'; -import '@cypress/code-coverage/support'; - -import { theme } from '@snx-v3/theme'; -import { mount } from 'cypress/react18'; -import { MemoryRouter } from 'react-router-dom'; - -function Container(props) { - return ( - - -
- - - ); -} - -Cypress.Commands.add('mount', (el) => mount({el})); diff --git a/governance/cypress/cypress/support/e2e.js b/governance/cypress/cypress/support/e2e.js deleted file mode 100644 index da6d0667f..000000000 --- a/governance/cypress/cypress/support/e2e.js +++ /dev/null @@ -1,47 +0,0 @@ -import '@cypress/code-coverage/support'; -import { ethers } from 'ethers'; -import { metamask } from '../lib/metamask'; - -beforeEach(() => { - cy.intercept('https://analytics.synthetix.io/matomo.js', { statusCode: 204 }).as('matomo'); - - [ - 'mainnet', - 'sepolia', - 'optimism-mainnet', - 'optimism-sepolia', - 'base-mainnet', - 'base-sepolia', - 'arbitrum-mainnet', - 'arbitrum-sepolia', - ].forEach((networkName) => { - cy.intercept(`https://${networkName}.infura.io/v3/*`, (req) => { - req.url = 'http://127.0.0.1:8545'; - req.continue(); - }).as(networkName); - }); - - cy.on('window:before:load', async (win) => { - win.sessionStorage.setItem('TERMS_CONDITIONS_ACCEPTED', 'true'); - win.localStorage.setItem( - 'DEFAULT_NETWORK', - `${Cypress.env('CHAIN_ID')}-${Cypress.env('PRESET')}` - ); - win.localStorage.setItem('UNSAFE_IMPORT', 'true'); - win.localStorage.setItem('connectedWallets', '"MetaMask"'); - win.localStorage.setItem('CONTRACT_ERROR_OPEN', 'true'); - }); -}); - -Cypress.Commands.add('connectWallet', (namespace = 'wallet') => { - const wallet = new ethers.Wallet( - '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80' - ); - const privateKey = wallet.privateKey; - const address = wallet.address; - cy.on('window:before:load', (win) => { - win.ethereum = metamask({ privateKey, address }); - }); - - return cy.wrap(wallet).as(namespace); -}); diff --git a/governance/cypress/cypress/tasks/automineBlocks.js b/governance/cypress/cypress/tasks/automineBlocks.js deleted file mode 100644 index 06170ce5c..000000000 --- a/governance/cypress/cypress/tasks/automineBlocks.js +++ /dev/null @@ -1,9 +0,0 @@ -import { ethers } from 'ethers'; - -export async function automineBlocks({ enabled }) { - const provider = new ethers.providers.JsonRpcProvider('http://127.0.0.1:8545'); - console.log('automineBlocks', { oldAutomine: await provider.send('anvil_getAutomine', []) }); - await provider.send('evm_setAutomine', [enabled]); - console.log('automineBlocks', { newAutomine: await provider.send('anvil_getAutomine', []) }); - return null; -} diff --git a/governance/cypress/cypress/tasks/changePeriod.js b/governance/cypress/cypress/tasks/changePeriod.js deleted file mode 100644 index 9b8fe9812..000000000 --- a/governance/cypress/cypress/tasks/changePeriod.js +++ /dev/null @@ -1,61 +0,0 @@ -import { Contract, ethers, Wallet } from 'ethers'; -import { electionModuleABITest } from '../../../ui/src/utils/abi'; - -export async function changePeriod({ council, period }) { - const provider = new ethers.providers.JsonRpcProvider('http://127.0.0.1:8545'); - const proxy = { - spartan: new Contract('0xBC85F11300A8EF619592fD678418Ec4eF26FBdFD', electionModuleABITest), - ambassador: new Contract('0xCdbEf5753cE3CEbF361e143117e345ADd7498F80', electionModuleABITest), - treasury: new Contract('0xe3aB2C6F1C9E46Fb53eD6b297c6fff68e935B161', electionModuleABITest), - }; - const block = await provider.getBlock('latest'); - const signer = new Wallet( - '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80', - provider - ); - const electionId = await proxy.spartan.connect(signer).getEpochIndex(); - - if (period === 'admin') { - console.log(block.timestamp); - await proxy[council] - .connect(signer) - .Epoch_setEpochDates( - electionId, - block.timestamp, - block.timestamp + 10000, - block.timestamp + 20000, - block.timestamp + 30000 - ); - } else if (period === 'nomination') { - await proxy[council] - .connect(signer) - .Epoch_setEpochDates( - electionId, - block.timestamp - 10, - block.timestamp, - block.timestamp + 10000, - block.timestamp + 20000 - ); - } else if (period === 'voting') { - await proxy[council] - .connect(signer) - .Epoch_setEpochDates( - electionId, - block.timestamp - 200, - block.timestamp - 100, - block.timestamp, - block.timestamp + 10000 - ); - } else { - await proxy[council] - .connect(signer) - .Epoch_setEpochDates( - electionId, - block.timestamp - 10, - block.timestamp - 5, - block.timestamp - 1, - block.timestamp - ); - } - return null; -} diff --git a/governance/cypress/cypress/tasks/mineBlock.js b/governance/cypress/cypress/tasks/mineBlock.js deleted file mode 100644 index 872123221..000000000 --- a/governance/cypress/cypress/tasks/mineBlock.js +++ /dev/null @@ -1,15 +0,0 @@ -import { ethers } from 'ethers'; - -export async function mineBlock() { - const provider = new ethers.providers.JsonRpcProvider('http://127.0.0.1:8545'); - console.log('mineBlock', { - oldBlockNumber: await provider.getBlockNumber(), - oldTimestamp: new Date((await provider.getBlock()).timestamp * 1000), - }); - await provider.send('evm_mine', []); - console.log('mineBlock', { - newBlockNumber: await provider.getBlockNumber(), - newTimestamp: new Date((await provider.getBlock()).timestamp * 1000), - }); - return null; -} diff --git a/governance/cypress/cypress/tasks/prepareVotingPower.js b/governance/cypress/cypress/tasks/prepareVotingPower.js deleted file mode 100644 index f2d324f49..000000000 --- a/governance/cypress/cypress/tasks/prepareVotingPower.js +++ /dev/null @@ -1,39 +0,0 @@ -import { Contract, ethers, Wallet } from 'ethers'; -import { SnapshotRecordContract } from '../../../ui/src/utils/contracts'; -import { electionModuleABITest } from '../../../ui/src/utils/abi'; - -export async function prepareVotingPower({ council }) { - const provider = new ethers.providers.JsonRpcProvider('http://127.0.0.1:8545'); - const proxy = { - spartan: new Contract('0xBC85F11300A8EF619592fD678418Ec4eF26FBdFD', electionModuleABITest), - ambassador: new Contract('0xCdbEf5753cE3CEbF361e143117e345ADd7498F80', electionModuleABITest), - treasury: new Contract('0xe3aB2C6F1C9E46Fb53eD6b297c6fff68e935B161', electionModuleABITest), - }; - const block = await provider.getBlock('latest'); - const signer = new Wallet( - '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80', - provider - ); - const electionId = await proxy.spartan.connect(signer).getEpochIndex(); - await proxy[council] - .connect(signer) - .Epoch_setEpochDates( - electionId, - block.timestamp - 200, - block.timestamp - 100, - block.timestamp, - block.timestamp + 10000 - ); - - try { - await proxy[council] - .connect(signer) - .takeVotePowerSnapshot(SnapshotRecordContract(13001, council)?.address); - } catch (error) { - console.info('takeVotePowerSnapshot failed'); - } - await SnapshotRecordContract(13001, council) - .connect(signer) - .setBalanceOfOnPeriod(await signer.getAddress(), 100, 1); - return null; -} diff --git a/governance/cypress/cypress/tasks/setEthBalance.js b/governance/cypress/cypress/tasks/setEthBalance.js deleted file mode 100644 index b6241ea2f..000000000 --- a/governance/cypress/cypress/tasks/setEthBalance.js +++ /dev/null @@ -1,14 +0,0 @@ -import { ethers } from 'ethers'; - -export async function setEthBalance({ address, balance }) { - const provider = new ethers.providers.JsonRpcProvider('http://127.0.0.1:8545'); - const oldBalance = parseFloat(ethers.utils.formatUnits(await provider.getBalance(address))); - console.log('setEthBalance', { address, oldBalance }); - await provider.send('anvil_setBalance', [ - address, - ethers.utils.parseEther(`${balance}`).toHexString(), - ]); - const newBalance = parseFloat(ethers.utils.formatUnits(await provider.getBalance(address))); - console.log('setEthBalance', { address, newBalance }); - return newBalance; -} diff --git a/governance/cypress/package.json b/governance/cypress/package.json deleted file mode 100644 index 86866308e..000000000 --- a/governance/cypress/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "@snx-v3/governance-cypress", - "private": true, - "main": "index.ts", - "version": "0.0.1", - "scripts": { - "anvil:snax": "anvil --fork-url https://testnet.snaxchain.io --fork-block-number 296428", - "e2e": "cypress open --e2e --browser electron" - }, - "devDependencies": { - "@chakra-ui/react": "^2.8.2", - "@cypress/code-coverage": "^3.12.39", - "@snx-cy/printBrowserLogs": "workspace:*", - "@snx-v3/theme": "workspace:*", - "cypress": "13.11.0", - "ethers": "^5.7.2", - "react-router-dom": "^6.18.0", - "ts-node": "^10.9.1" - }, - "depcheck": { - "ignoreMatches": [ - "ts-node" - ] - } -} diff --git a/governance/lib/constants/constants.ts b/governance/lib/constants/constants.ts deleted file mode 100644 index 791b71400..000000000 --- a/governance/lib/constants/constants.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { constants } from 'ethers'; -import Wei from '@synthetixio/wei'; - -export const LOCAL_STORAGE_KEYS = { - SHOW_TESTNETS: 'SHOW_TESTNETS', -}; -export const ZEROWEI = new Wei(0); -export const ONEWEI = new Wei(1); -export const MAXUINT = new Wei(constants.MaxUint256); - -export const GWEI_DECIMALS = 9; -export const GAS_LIMIT_MULTIPLIER = 1.5; - -export const DEFAULT_QUERY_REFRESH_INTERVAL = 600_000; // 10min -export const DEFAULT_QUERY_STALE_TIME = 300_000; // 5min - -export const INFURA_KEY = process.env.INFURA_KEY || '8678fe160b1f4d45ad3f3f71502fc57b'; -export const ONBOARD_KEY = 'sec_jykTuCK0ZuqXWf3wNYqizxs2'; - -export const getSubgraphUrl = (networkName = 'optimism-mainnet') => { - switch (networkName) { - case 'mainnet': - return 'https://subgraph.satsuma-prod.com/ce5e03f52f3b/synthetix/synthetix-mainnet/api'; - case 'sepolia': - return 'https://subgraph.satsuma-prod.com/ce5e03f52f3b/synthetix/synthetix-sepolia/api'; - case 'optimism-mainnet': - return 'https://subgraph.satsuma-prod.com/ce5e03f52f3b/synthetix/synthetix-optimism-mainnet/api'; - case 'arbitrum': - return `https://subgraph.satsuma-prod.com/ce5e03f52f3b/synthetix/synthetix-arbitrum-mainnet/api`; - case 'base-sepolia': - return 'https://subgraph.satsuma-prod.com/ce5e03f52f3b/synthetix/synthetix-base-sepolia-andromeda/api'; - case 'base': - return 'https://subgraph.satsuma-prod.com/ce5e03f52f3b/synthetix/synthetix-base-mainnet-andromeda/api'; - default: - return `https://subgraph.satsuma-prod.com/ce5e03f52f3b/synthetix/synthetix-${networkName}/api`; - } -}; - -export const getAprUrl = (networkId = 8453) => { - switch (networkId) { - case 1: - return 'https://api.synthetix.io/v3/mainnet/sc-pool-apy-all'; - case 8453: - return 'https://api.synthetix.io/v3/base/sc-pool-apy-all'; - case 42161: - return 'https://api.synthetix.io/v3/arbitrum/sc-pool-apy-all'; - default: - return `https://api.synthetix.io/v3/base/sc-pool-apy-all`; - } -}; - -export const SESSION_STORAGE_KEYS = { - TERMS_CONDITIONS_ACCEPTED: 'TERMS_CONDITIONS_ACCEPTED', -}; - -export const offchainMainnetEndpoint = - process.env.PYTH_MAINNET_ENDPOINT || 'https://hermes.pyth.network'; - -export const offchainTestnetEndpoint = - process.env.PYTH_TESTNET_ENDPOINT || 'https://hermes.pyth.network'; diff --git a/governance/lib/constants/index.ts b/governance/lib/constants/index.ts deleted file mode 100644 index c94f80f84..000000000 --- a/governance/lib/constants/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './constants'; diff --git a/governance/lib/constants/package.json b/governance/lib/constants/package.json deleted file mode 100644 index aa30ffb4f..000000000 --- a/governance/lib/constants/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "@snx-v3/constants", - "private": true, - "main": "index.ts", - "version": "0.0.0", - "dependencies": { - "@synthetixio/wei": "^2.74.4", - "ethers": "^5.7.2" - } -} diff --git a/governance/lib/format/currency.test.ts b/governance/lib/format/currency.test.ts deleted file mode 100644 index 7515befae..000000000 --- a/governance/lib/format/currency.test.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { currency } from './'; -import { wei } from '@synthetixio/wei'; - -describe('currency', () => { - it('should format positive Wei value with default options', () => { - const value = wei('123456789000000000', 18, true); - expect(currency(value)).toBe('0.12'); - }); - - it('should format negative Wei value with default options', () => { - const value = wei('-123456789000000000', 18, true); - expect(currency(value)).toBe('-0.12'); - }); - - it('should format positive Wei value with custom minimumDigitsToShowAfterZeros', () => { - const value = wei('123456789000000000', 18, true); - expect(currency(value, undefined, 4)).toBe('0.1235'); - }); - - it('should format negative Wei value with custom minimumDigitsToShowAfterZeros', () => { - const value = wei('-123456789000000000', 18, true); - expect(currency(value, undefined, 4)).toBe('-0.1235'); - }); - - it('should format zero Wei value with default options', () => { - const value = wei('0'); - expect(currency(value)).toBe('0'); - }); - - it('should format large positive Wei value', () => { - const value = wei('123456789123456789123456789', 18, true); - expect(currency(value)).toBe('123,456,789.12'); - }); - - it('should format large negative Wei value', () => { - const value = wei('-123456789123456789123456789', 18, true); - expect(currency(value)).toBe('-123,456,789.12'); - }); -}); diff --git a/governance/lib/format/currency.ts b/governance/lib/format/currency.ts deleted file mode 100644 index b9f911522..000000000 --- a/governance/lib/format/currency.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Wei } from '@synthetixio/wei'; - -export function currency( - value: Wei, - options?: Intl.NumberFormatOptions, - minimumDigitsToShowAfterZeros = 2 -) { - try { - const stringValue = value.toString(); - const numberValue = value.toNumber(); - - const decimals = - numberValue < 0 - ? -numberValue - Math.floor(-numberValue) - : numberValue - Math.floor(numberValue); - const zeroDecimals = decimals !== 0 ? -Math.floor(Math.log10(decimals) + 1) : 0; - - const maximumFractionDigits = zeroDecimals + minimumDigitsToShowAfterZeros; - - return isNaN(numberValue) - ? stringValue - : numberValue.toLocaleString('en-US', { - minimumFractionDigits: 0, - maximumFractionDigits, - ...options, - }); - } catch (error) { - return value + ''; - } -} diff --git a/governance/lib/format/format.test.ts b/governance/lib/format/format.test.ts deleted file mode 100644 index 13fc3b491..000000000 --- a/governance/lib/format/format.test.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { formatValue, parseUnits, compareAddress, prettyString } from './'; -import { wei } from '@synthetixio/wei'; - -describe('formatValue', () => { - it('should format value correctly with default decimals', () => { - const value = wei('1234567890000000000', 18, true).toBN(); - expect(formatValue(value)).toBeCloseTo(1.23456789); - }); - - it('should format value correctly with custom decimals', () => { - const value = wei('1234', 6, true).toBN(); - expect(formatValue(value, 6)).toBeCloseTo(0.001234); - }); -}); - -describe('parseUnits', () => { - it('should parse units correctly with default decimals', () => { - const value = parseUnits(wei('1000000000000000000', 18, true).toBN()); - expect(value.toString()).toBe('1000000000000000000'); - }); - - it('should parse units correctly with custom decimals', () => { - const value = parseUnits(wei('1234000000000', 6, true), 6); - expect(value.toString()).toBe('1234000000000'); - }); -}); - -describe('compareAddress', () => { - it('should return true for matching addresses', () => { - const address1 = '0x123456789abcdef'; - const address2 = '0x123456789ABCDEF'; - expect(compareAddress(address1, address2)).toBe(true); - }); - - it('should return false for non-matching addresses', () => { - const address1 = '0xabcdef'; - const address2 = '0x123456'; - expect(compareAddress(address1, address2)).toBe(false); - }); - - it('should return false when one or both addresses are null', () => { - const address1 = null; - const address2 = '0x123456'; - const address3 = '0xabcdef'; - expect(compareAddress(address1, address2)).toBe(false); - expect(compareAddress(address2, address3)).toBe(false); - expect(compareAddress(null, null)).toBe(false); - }); -}); - -describe('prettyString', () => { - it('should create a pretty string', () => { - const text = 'Hello, World!'; - expect(prettyString(text)).toBe('Hello,...rld!'); - }); - - it('should create a pretty string with custom start and end lengths', () => { - const text = 'This is a longer text'; - expect(prettyString(text, 5, 6)).toBe('This ...r text'); - }); - - it('should handle short strings', () => { - const text = 'Short'; - expect(prettyString(text)).toBe('Short'); - }); -}); diff --git a/governance/lib/format/format.ts b/governance/lib/format/format.ts index 1d3bc805b..d1934fda6 100644 --- a/governance/lib/format/format.ts +++ b/governance/lib/format/format.ts @@ -1,14 +1,3 @@ -import { BigNumberish, utils } from 'ethers'; -import { wei, WeiSource } from '@synthetixio/wei'; - -export const formatValue = (value: BigNumberish, decimals = 18) => - parseFloat(utils.formatUnits(value, decimals)); - -export const parseUnits = (value: WeiSource, decimals = 18) => wei(value, decimals).toBN(); - -export const compareAddress = (add1: string | null = '', add2: string | null = '') => - !!add1 && !!add2 && add1.toLowerCase() === add2.toLowerCase(); - export const prettyString = (text: string, startLength = 6, endLength = 4) => { if (text.length <= startLength + endLength) { return text; diff --git a/governance/lib/format/index.ts b/governance/lib/format/index.ts index 3d4f9f3c8..16c5b2b50 100644 --- a/governance/lib/format/index.ts +++ b/governance/lib/format/index.ts @@ -1,2 +1 @@ export * from './format'; -export * from './currency'; diff --git a/governance/lib/format/package.json b/governance/lib/format/package.json index 54cea258d..927cf3581 100644 --- a/governance/lib/format/package.json +++ b/governance/lib/format/package.json @@ -2,9 +2,5 @@ "name": "@snx-v3/format", "private": true, "main": "index.ts", - "version": "0.0.1", - "dependencies": { - "@synthetixio/wei": "^2.74.4", - "ethers": "^5.7.2" - } + "version": "0.0.1" } diff --git a/governance/lib/formatters/date.test.ts b/governance/lib/formatters/date.test.ts deleted file mode 100644 index fd656a22e..000000000 --- a/governance/lib/formatters/date.test.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { unlockDateString, formatTimeToUnlock } from './date'; - -describe('unlockDateString function', () => { - // Test case 1: accountCollateralUnlockDate is undefined - it('should return undefined when accountCollateralUnlockDate is undefined', () => { - const result = unlockDateString(undefined); - expect(result).toBeUndefined(); - }); - - // Test case 2: accountCollateralUnlockDate is in the past - it('should return undefined when accountCollateralUnlockDate is in the past', () => { - const pastDate = new Date('2022-01-01T00:00:00'); - const result = unlockDateString(pastDate); - expect(result).toBeUndefined(); - }); - - // Test case 3: accountCollateralUnlockDate is in the future - it('should return a formatted date string when accountCollateralUnlockDate is in the future', () => { - // Create a future date (e.g., one day from now) - const futureDate = new Date(Date.now() + 24 * 60 * 60 * 1000); - const result = unlockDateString(futureDate); - - // Define the expected format (you may adjust this based on your intlFormat implementation) - const expectedFormat = /[0-9]{1,2}\/[0-9]{1,2}\/[0-9]{4}, [0-9]{1,2}:[0-9]{2}/; - - expect(result).toMatch(expectedFormat); - }); -}); - -describe('formatTimeToUnlock function', () => { - // Test case 1: accountCollateralUnlockDate is undefined - it('should return undefined when accountCollateralUnlockDate is undefined', () => { - const result = formatTimeToUnlock(undefined); - expect(result).toBeUndefined(); - }); - - // Test case 2: accountCollateralUnlockDate is in the past - it('should return undefined when accountCollateralUnlockDate is in the past', () => { - const pastDate = new Date('2022-01-01T00:00:00'); - const result = formatTimeToUnlock(pastDate); - expect(result).toBeUndefined(); - }); - - // Test case 3: accountCollateralUnlockDate is in the future - it('should return a formatted time string when accountCollateralUnlockDate is in the future', () => { - // Create a future date (e.g., one day from now) - const futureDate = new Date(Date.now() + 24 * 60 * 60 * 1000); - const result = formatTimeToUnlock(futureDate); - - // Assert that the result is a non-empty string - expect(result).toBeDefined(); - expect(typeof result).toBe('string'); - }); - - // Test case 4: Exception on a invalid date - it('should throw an exception when the date is invalid', () => { - const invalidDate = new Date('invalid'); - expect(() => formatTimeToUnlock(invalidDate)).toThrow(); - }); -}); diff --git a/governance/lib/formatters/date.ts b/governance/lib/formatters/date.ts deleted file mode 100644 index c5b1a9f97..000000000 --- a/governance/lib/formatters/date.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { formatDistanceToNow, intlFormat } from 'date-fns'; - -export function convertSecondsToDisplayString(seconds: number) { - const secondsInHour = 3600; - const secondsInDay = 86400; - const secondsInWeek = 604800; - const secondsInMonth = 2592000; - - if (seconds === 0) { - return null; - } else if (seconds % secondsInMonth === 0) { - const months = seconds / secondsInMonth; - return months === 1 ? 'every month' : `every ${months} months`; - } else if (seconds % secondsInWeek === 0) { - const weeks = seconds / secondsInWeek; - return weeks === 1 ? 'every week' : `every ${weeks} weeks`; - } else if (seconds % secondsInDay === 0) { - const days = seconds / secondsInDay; - return days === 1 ? 'every day' : `every ${days} days`; - } else if (seconds % secondsInHour === 0) { - const hours = seconds / secondsInHour; - return hours === 1 ? 'every hour' : `every ${hours.toFixed(1)} hours`; - } else { - const hours = seconds / secondsInHour; - return `every ${hours.toFixed(1)} hours`; - } -} - -export const formatTimeToUnlock = (accountCollateralUnlockDate: Date | undefined) => { - if (!accountCollateralUnlockDate || accountCollateralUnlockDate.getTime() <= Date.now()) { - return undefined; - } - return formatDistanceToNow(accountCollateralUnlockDate, { addSuffix: true }); -}; - -export const unlockDateString = (accountCollateralUnlockDate: Date | undefined) => { - if (!accountCollateralUnlockDate || accountCollateralUnlockDate.getTime() <= Date.now()) { - return undefined; - } - - return intlFormat(accountCollateralUnlockDate, { - year: 'numeric', - month: 'numeric', - day: 'numeric', - hour: 'numeric', - minute: 'numeric', - }); -}; diff --git a/governance/lib/formatters/index.ts b/governance/lib/formatters/index.ts deleted file mode 100644 index 53325e31c..000000000 --- a/governance/lib/formatters/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './number'; -export * from './string'; -export * from './date'; diff --git a/governance/lib/formatters/number.test.ts b/governance/lib/formatters/number.test.ts deleted file mode 100644 index c1f1aea69..000000000 --- a/governance/lib/formatters/number.test.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { formatNumber, formatNumberToUsd, formatPercent, numberWithCommas } from './number'; - -describe('number', () => { - test('numbersWithCommas', () => { - expect(numberWithCommas('1')).toBe('1'); - expect(numberWithCommas('10')).toBe('10'); - expect(numberWithCommas('100')).toBe('100'); - expect(numberWithCommas('1000')).toBe('1,000'); - expect(numberWithCommas('10000')).toBe('10,000'); - expect(numberWithCommas('100000')).toBe('100,000'); - expect(numberWithCommas('1000000')).toBe('1,000,000'); - expect(numberWithCommas('10000000')).toBe('10,000,000'); - expect(numberWithCommas('100000000')).toBe('100,000,000'); - expect(numberWithCommas('Not a number')).toBe('Not a number'); - }); - test('formatNumber', () => { - expect(formatNumber(1)).toBe('1.00'); - expect(formatNumber(10)).toBe('10.00'); - expect(formatNumber(100)).toBe('100.00'); - expect(formatNumber(1000)).toBe('1,000.00'); - expect(formatNumber(10000)).toBe('10,000.00'); - expect(formatNumber(100000)).toBe('100,000.00'); - expect(formatNumber(1000000)).toBe('1,000,000.00'); - expect(formatNumber(10000000)).toBe('10,000,000.00'); - expect(formatNumber(100000000)).toBe('100,000,000.00'); - expect(formatNumberToUsd(100000000.123456)).toBe('$100,000,000.12'); - expect( - formatNumberToUsd(100000000.123456, { minimumFractionDigits: 2, maximumFractionDigits: 4 }) - ).toBe('$100,000,000.1235'); - }); - test('formatNumberToUsd', () => { - expect(formatNumberToUsd(1)).toBe('$1.00'); - expect(formatNumberToUsd(10)).toBe('$10.00'); - expect(formatNumberToUsd(100)).toBe('$100.00'); - expect(formatNumberToUsd(1000)).toBe('$1,000.00'); - expect(formatNumberToUsd(10000)).toBe('$10,000.00'); - expect(formatNumberToUsd(100000)).toBe('$100,000.00'); - expect(formatNumberToUsd(1000000)).toBe('$1,000,000.00'); - expect(formatNumberToUsd(10000000)).toBe('$10,000,000.00'); - expect(formatNumberToUsd(100000000)).toBe('$100,000,000.00'); - expect(formatNumberToUsd(100000000.123456)).toBe('$100,000,000.12'); - expect( - formatNumberToUsd(100000000.123456, { minimumFractionDigits: 2, maximumFractionDigits: 4 }) - ).toBe('$100,000,000.1235'); - }); - test('formatPercent', () => { - expect(formatPercent(0.01)).toBe('1%'); - expect(formatPercent(0.1)).toBe('10%'); - expect(formatPercent(1)).toBe('100%'); - expect(formatPercent(2)).toBe('200%'); - expect(formatPercent(2.2341)).toBe('223.41%'); - }); -}); diff --git a/governance/lib/formatters/number.ts b/governance/lib/formatters/number.ts deleted file mode 100644 index 231aeae0f..000000000 --- a/governance/lib/formatters/number.ts +++ /dev/null @@ -1,50 +0,0 @@ -export function numberWithCommas(value: string, decimals?: number) { - const parts = value.split('.'); - parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ','); - const joinedParts = parts.join('.'); - return decimals ? joinedParts.substring(0, joinedParts.indexOf('.') + decimals + 1) : joinedParts; -} - -interface Options extends Intl.NumberFormatOptions { - locales?: string | string[]; -} -export const formatNumberToUsd = (val: number | string, options?: Options) => { - const optionsWithDefault = { style: 'currency', currency: 'USD', locales: 'en-EN', ...options }; - return new Intl.NumberFormat(optionsWithDefault.locales, optionsWithDefault).format(Number(val)); -}; - -export const formatNumberToCurrencyBasedOnSize = (val: number | string) => { - const num = Number(val); - if (num < 0.0001) { - return formatNumberToUsd(num, { maximumFractionDigits: 8 }); - } - if (num < 1) { - return formatNumberToUsd(num, { maximumFractionDigits: 4 }); - } - return formatNumberToUsd(num, { maximumFractionDigits: 2 }); -}; - -export const formatNumber = (value: number | string, options?: Options) => { - const optionsWithDefault = { - minimumFractionDigits: 2, - maximumFractionDigits: 2, - locales: 'en-EN', - ...options, - }; - return new Intl.NumberFormat(optionsWithDefault.locales, optionsWithDefault).format( - Number(value) - ); -}; - -export const formatPercent = (value: number | string, options?: Options) => { - const optionsWithDefault = { - minimumFractionDigits: 0, - maximumFractionDigits: 2, - locales: 'en-EN', - style: 'percent', - ...options, - }; - return new Intl.NumberFormat(optionsWithDefault.locales, optionsWithDefault).format( - Number(value) - ); -}; diff --git a/governance/lib/formatters/package.json b/governance/lib/formatters/package.json deleted file mode 100644 index 43ecd61b0..000000000 --- a/governance/lib/formatters/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "@snx-v3/formatters", - "private": true, - "main": "index.ts", - "version": "0.0.0", - "dependencies": { - "date-fns": "^2.30.0" - } -} diff --git a/governance/lib/formatters/string.test.ts b/governance/lib/formatters/string.test.ts deleted file mode 100644 index 3b11836e5..000000000 --- a/governance/lib/formatters/string.test.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { truncateAddress, parseFloatWithCommas } from './string'; - -describe('truncateAddress', () => { - it('should truncate the address with default parameters', () => { - const address = '0x123456789abcdef'; // 14 characters - expect(truncateAddress(address)).toBe('0x123...bcdef'); - }); - - it('should truncate the address with custom first and last lengths', () => { - const address = '0x123456789abcdef'; // 14 characters - expect(truncateAddress(address, 6, 4)).toBe('0x1234...cdef'); - }); - - it('should handle a shorter address', () => { - const address = '0x123'; // 6 characters - expect(truncateAddress(address)).toBe('0x123'); - }); - - it('should handle an address shorter than first + last lengths', () => { - const address = '0x12345'; // 8 characters - expect(truncateAddress(address, 6, 4)).toBe('0x12345'); - }); -}); - -describe('parseFloatWithCommas', () => { - it('should parse a number with commas', () => { - const numberWithCommas = '1,234,567.89'; - expect(parseFloatWithCommas(numberWithCommas)).toBe(1234567.89); - }); - - it('should parse a number without commas', () => { - const numberWithCommas = '1234.56'; - expect(parseFloatWithCommas(numberWithCommas)).toBe(1234.56); - }); - - it('should handle a number with leading and trailing whitespace', () => { - const numberWithCommas = ' 1,234.56 '; - expect(parseFloatWithCommas(numberWithCommas)).toBe(1234.56); - }); - - it('should handle a negative number with commas', () => { - const numberWithCommas = '-1,234,567.89'; - expect(parseFloatWithCommas(numberWithCommas)).toBe(-1234567.89); - }); - - it('should handle a number with invalid commas', () => { - const numberWithCommas = '1,23,45,6.78'; // Invalid commas - expect(parseFloatWithCommas(numberWithCommas)).toBe(123456.78); - }); -}); diff --git a/governance/lib/formatters/string.ts b/governance/lib/formatters/string.ts deleted file mode 100644 index fc7949260..000000000 --- a/governance/lib/formatters/string.ts +++ /dev/null @@ -1,9 +0,0 @@ -export const truncateAddress = (address: string, first = 5, last = 5) => { - if (address.length <= first + last) { - return address; - } - return `${address.slice(0, first)}...${address.slice(-last)}`; -}; - -export const parseFloatWithCommas = (numberWithCommas: string) => - parseFloat(numberWithCommas.replaceAll(',', '')); diff --git a/governance/lib/useBlockchain/SynthetixIcon.svg b/governance/lib/useBlockchain/SynthetixIcon.svg deleted file mode 100644 index 9e3d4761d..000000000 --- a/governance/lib/useBlockchain/SynthetixIcon.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/governance/lib/useBlockchain/SynthetixLogo.svg b/governance/lib/useBlockchain/SynthetixLogo.svg deleted file mode 100644 index 1734c1d07..000000000 --- a/governance/lib/useBlockchain/SynthetixLogo.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/governance/lib/useBlockchain/index.ts b/governance/lib/useBlockchain/index.ts deleted file mode 100644 index 4e722afb6..000000000 --- a/governance/lib/useBlockchain/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './useBlockchain'; diff --git a/governance/lib/useBlockchain/package.json b/governance/lib/useBlockchain/package.json deleted file mode 100644 index 7e294f971..000000000 --- a/governance/lib/useBlockchain/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "@snx-v3/useBlockchain", - "private": true, - "main": "index.ts", - "version": "0.0.2", - "dependencies": { - "@chakra-ui/react": "^2.8.2", - "@snx-v3/constants": "workspace:*", - "@snx-v3/icons": "workspace:*", - "@web3-onboard/react": "^2.9.1", - "ethers": "^5.7.2", - "react": "^18.2.0" - } -} diff --git a/governance/lib/useBlockchain/useBlockchain.tsx b/governance/lib/useBlockchain/useBlockchain.tsx deleted file mode 100644 index cde91aeed..000000000 --- a/governance/lib/useBlockchain/useBlockchain.tsx +++ /dev/null @@ -1,393 +0,0 @@ -import { ethers } from 'ethers'; -import React, { useMemo } from 'react'; -import { - BaseIcon, - EthereumIcon, - FailedIcon, - LogoIcon, - OptimismIcon, - ArbitrumIcon, - SNXChainIcon, -} from '@snx-v3/icons'; -import { INFURA_KEY as DEFAULT_INFURA_KEY } from '@snx-v3/constants'; -import SynthetixIcon from './SynthetixIcon.svg'; -import SynthetixLogo from './SynthetixLogo.svg'; -import { useConnectWallet, useSetChain } from '@web3-onboard/react'; -import { useCallback } from 'react'; -import { IconProps } from '@chakra-ui/react'; - -export type Network = { - id: number; - preset: string; - hexId: string; - token: string; - name: string; - rpcUrl: () => string; - label: string; - isSupported: boolean; - publicRpcUrl: string; - isTestnet: boolean; -}; - -export const UNSUPPORTED_NETWORK: Network = { - id: 0, - preset: 'main', - hexId: `0x${Number(0).toString(16)}`, - token: 'ETH', - name: 'unsupported', - rpcUrl: () => '', - publicRpcUrl: '', - label: 'Unsupported', - isSupported: false, - isTestnet: false, -}; - -interface NetworkIconProps extends IconProps { - networkId?: Network['id']; - size?: string; -} - -export const NetworkIcon = ({ networkId, size = '24px', ...props }: NetworkIconProps) => { - switch (networkId) { - case 1: - return ; - case 10: - return ; - case 11155111: - return ; - case 84531: - return ; - case 84532: - return ; - case 13370: - return ; - case 8453: - return ; - case 11155420: - return ; - case 421614: - return ; - case 42161: - return ; - case 2192: - return ; - case 13001: - return ; - default: { - return ; - } - } -}; - -export const BASE_ANDROMEDA: Network = { - id: 8453, - preset: 'andromeda', - hexId: `0x${Number(8453).toString(16)}`, - token: 'ETH', - name: 'base', - rpcUrl: (INFURA_KEY?: string) => - `https://base-mainnet.infura.io/v3/${INFURA_KEY ?? DEFAULT_INFURA_KEY}`, - label: 'Base', - isSupported: true, - publicRpcUrl: 'https://base.publicnode.com', - isTestnet: false, -}; - -export const MAINNET: Network = { - id: 1, - preset: 'main', - hexId: `0x${Number(1).toString(16)}`, - token: 'ETH', - name: 'mainnet', - rpcUrl: (INFURA_KEY?: string) => - `https://mainnet.infura.io/v3/${INFURA_KEY ?? DEFAULT_INFURA_KEY}`, - label: 'Ethereum', - isSupported: true, - publicRpcUrl: 'https://ethereum.publicnode.com', - isTestnet: false, -}; - -export const OPTIMISM: Network = { - id: 10, - preset: 'main', - hexId: `0x${Number(10).toString(16)}`, - token: 'ETH', - name: 'optimism-mainnet', - rpcUrl: (INFURA_KEY?: string) => - `https://optimism-mainnet.infura.io/v3/${INFURA_KEY ?? DEFAULT_INFURA_KEY}`, - label: 'Optimism', - isSupported: true, - publicRpcUrl: 'https://mainnet.optimism.io', - isTestnet: false, -}; - -export const SEPOLIA: Network = { - id: 11155111, - preset: 'main', - hexId: `0x${Number(11155111).toString(16)}`, - token: 'ETH', - name: 'sepolia', - rpcUrl: (INFURA_KEY?: string) => - `https://sepolia.infura.io/v3/${INFURA_KEY ?? DEFAULT_INFURA_KEY}`, - label: 'Sepolia Testnet', - isSupported: true, - publicRpcUrl: 'https://ethereum-sepolia.publicnode.com', - isTestnet: true, -}; - -export const BASE_SEPOLIA: Network = { - id: 84532, - preset: 'andromeda', - hexId: `0x${Number(84532).toString(16)}`, - token: 'ETH', - name: 'base-sepolia', - rpcUrl: (INFURA_KEY?: string) => - `https://base-sepolia.infura.io/v3/${INFURA_KEY ?? DEFAULT_INFURA_KEY}`, - label: 'Base Sepolia', - isSupported: true, - publicRpcUrl: 'https://sepolia.base.org', - isTestnet: true, -}; - -export const CANNON: Network = { - id: 13370, - preset: 'main', - hexId: `0x${Number(13370).toString(16)}`, - token: 'ETH', - name: 'cannon', - rpcUrl: () => `http://127.0.0.1:8545`, - label: 'Cannon', - isSupported: false, // hidden by default but if wallet switched to Cannon it will be visible - publicRpcUrl: 'http://127.0.0.1:8545', - isTestnet: true, -}; - -export const OPTIMISM_SEPOLIA: Network = { - id: 11155420, - preset: 'main', - hexId: `0x${Number(11155420).toString(16)}`, - token: 'ETH', - name: 'optimism-sepolia', - rpcUrl: (INFURA_KEY?: string) => - `https://optimism-sepolia.infura.io/v3/${INFURA_KEY ?? DEFAULT_INFURA_KEY}`, - label: 'Optimism Sepolia', - isSupported: false, - publicRpcUrl: 'https://sepolia.optimism.io/', - isTestnet: true, -}; - -export const ARBITRUM_SEPOLIA: Network = { - id: 421614, - preset: 'main', - hexId: `0x${Number(421614).toString(16)}`, - token: 'ETH', - name: 'arbitrum-sepolia', - rpcUrl: (INFURA_KEY?: string) => - `https://arbitrum-sepolia.infura.io/v3/${INFURA_KEY ?? DEFAULT_INFURA_KEY}`, - label: 'Arbitrum Sepolia', - isSupported: true, - publicRpcUrl: 'https://sepolia-rollup.arbitrum.io/rpc', - isTestnet: true, -}; - -export const ARBITRUM: Network = { - id: 42161, - preset: 'main', - hexId: `0x${Number(42161).toString(16)}`, - token: 'ETH', - name: 'arbitrum', - rpcUrl: (INFURA_KEY?: string) => - `https://arbitrum-mainnet.infura.io/v3/${INFURA_KEY ?? DEFAULT_INFURA_KEY}`, - label: 'Arbitrum', - isSupported: true, - publicRpcUrl: 'https://arb1.arbitrum.io/rpc', - isTestnet: false, -}; - -export const ARBTHETIX: Network = { - id: 42161, - preset: 'arbthetix', - hexId: `0x${Number(42161).toString(16)}`, - token: 'ETH', - name: 'arbitrum', - rpcUrl: (INFURA_KEY?: string) => - `https://arbitrum-mainnet.infura.io/v3/${INFURA_KEY ?? DEFAULT_INFURA_KEY}`, - label: 'Arbthetix (withdraw only)', - isSupported: false, - publicRpcUrl: 'https://arbiscan.io/', - isTestnet: false, -}; - -export const SNAX: Network = { - id: 2192, - preset: 'main', - hexId: `0x${Number(2192).toString(16)}`, - token: 'ETH', - name: 'SNAX', - rpcUrl: () => 'https://mainnet.snaxchain.io/', - label: 'Snaxchain', - isSupported: true, - publicRpcUrl: 'https://mainnet.snaxchain.io/', - isTestnet: false, -}; - -export const SNAXTESTNET: Network = { - id: 13001, - preset: 'main', - hexId: `0x${Number(13001).toString(16)}`, - token: 'ETH', - name: 'SNAX', - rpcUrl: () => 'https://testnet.snaxchain.io/', - label: 'Snaxchain', - isSupported: true, - publicRpcUrl: 'https://testnet.snaxchain.io/', - isTestnet: true, -}; - -export const NETWORKS: Network[] = [ - BASE_ANDROMEDA, - MAINNET, - OPTIMISM, - SEPOLIA, - BASE_SEPOLIA, - CANNON, - OPTIMISM_SEPOLIA, - ARBITRUM_SEPOLIA, - ARBITRUM, - ARBTHETIX, - SNAX, - SNAXTESTNET, -]; - -export const deploymentsWithERC7412: string[] = [ - '8453-andromeda', - '84532-andromeda', - '42161-main', - '421614-main', - '42161-arbthetix', -]; - -export const DEFAULT_NETWORK = - NETWORKS.find( - (network) => - `${network.id}-${network.preset}` === window.localStorage.getItem('DEFAULT_NETWORK') - ) ?? NETWORKS[1]; - -export const appMetadata = { - name: 'Synthetix', - icon: SynthetixIcon, - logo: SynthetixLogo, - description: 'Synthetix | The derivatives liquidity protocol.', - recommendedInjectedWallets: [ - { name: 'MetaMask', url: 'https://metamask.io' }, - { name: 'Brave Wallet', url: 'https://brave.com/wallet' }, - ], - gettingStartedGuide: 'https://synthetix.io', - explore: 'https://blog.synthetix.io', -}; - -export function useProviderForChain(network?: Network) { - return useMemo( - () => (network ? new ethers.providers.JsonRpcProvider(network.rpcUrl()) : undefined), - [network] - ); -} - -export function useDefaultProvider() { - const { network } = useNetwork(); - return useProviderForChain(network); -} - -export function useWallet() { - const [{ wallet }, conn, disconn] = useConnectWallet(); - - const connect = useCallback(conn, [conn]); - const disconnect = useCallback(disconn, [disconn]); - - return useMemo(() => { - if (!wallet) { - return { - activeWallet: null, - walletsInfo: null, - connect, - disconnect, - }; - } - - const activeWallet = wallet?.accounts[0]; - - return { - activeWallet: activeWallet, - walletsInfo: wallet, - connect, - disconnect, - }; - }, [connect, disconnect, wallet]); -} - -export function useGetNetwork(chainId: string) { - return useMemo(() => { - return NETWORKS.find((n) => n.hexId === chainId); - }, [chainId]); -} - -export function useNetwork() { - const [{ connectedChain }, setChain] = useSetChain(); - - // Hydrate the network info - const network = NETWORKS.find((n) => n.hexId === connectedChain?.id); - - const setNetwork = useCallback( - async (networkId: number) => { - const newNetwork = NETWORKS.find((n) => n.id === networkId); - if (!newNetwork) return; - return await setChain({ chainId: newNetwork?.hexId }); - }, - [setChain] - ); - - if (!network) { - return { - network: undefined, - setNetwork, - }; - } - - return { - network, - setNetwork, - }; -} - -export function useIsConnected(): boolean { - const [{ wallet }] = useConnectWallet(); - return Boolean(wallet); -} - -export function useSigner() { - const [{ wallet }] = useConnectWallet(); - - return useMemo(() => { - if (!wallet) { - return null; - } - - const provider = new ethers.providers.Web3Provider(wallet.provider, 'any'); - - return provider.getSigner(); - }, [wallet]); -} - -export function useProvider() { - const [{ wallet }] = useConnectWallet(); - - return useMemo(() => { - if (!wallet) { - return null; - } - - const provider = new ethers.providers.Web3Provider(wallet.provider, 'any'); - - return provider; - }, [wallet]); -} diff --git a/governance/subgraph/abis/ElectionModule.json b/governance/subgraph/abis/ElectionModule.json deleted file mode 100644 index ad31b7f2d..000000000 --- a/governance/subgraph/abis/ElectionModule.json +++ /dev/null @@ -1,2054 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ElectionModule", - "sourceName": "contracts/modules/core/ElectionModule.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "bytes32", - "name": "expected", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "actual", - "type": "bytes32" - } - ], - "name": "MismatchAssociatedSystemKind", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "MissingAssociatedSystem", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - } - ], - "name": "Unauthorized", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "kind", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "address", - "name": "proxy", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "impl", - "type": "address" - } - ], - "name": "AssociatedSystemSet", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "getAssociatedSystem", - "outputs": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "kind", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "string", - "name": "uri", - "type": "string" - }, - { - "internalType": "address", - "name": "impl", - "type": "address" - } - ], - "name": "initOrUpgradeNft", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" - }, - { - "internalType": "address", - "name": "impl", - "type": "address" - } - ], - "name": "initOrUpgradeToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "endpoint", - "type": "address" - } - ], - "name": "registerUnmanagedSystem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "parameter", - "type": "string" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "InvalidParameter", - "type": "error" - }, - { - "inputs": [], - "name": "OverflowUint256ToUint64", - "type": "error" - }, - { - "inputs": [], - "name": "ValueAlreadyInSet", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "newChainId", - "type": "uint64" - } - ], - "name": "NewSupportedCrossChainNetwork", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "ccipRouter", - "type": "address" - } - ], - "name": "configureChainlinkCrossChain", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64[]", - "name": "supportedNetworks", - "type": "uint64[]" - }, - { - "internalType": "uint64[]", - "name": "ccipSelectors", - "type": "uint64[]" - } - ], - "name": "setSupportedCrossChainNetworks", - "outputs": [ - { - "internalType": "uint256", - "name": "numRegistered", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "candidate", - "type": "address" - }, - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "getCandidateVotesInEpoch", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "getElectionWinnersInEpoch", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "getEpochEndDateForIndex", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "getEpochStartDateForIndex", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "getNominationPeriodStartDateForIndex", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "getNomineesAtEpoch", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "getVotingPeriodStartDateForIndex", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "hasVotedInEpoch", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "candidate", - "type": "address" - }, - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "wasNominated", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "AlreadyACouncilMember", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyNominated", - "type": "error" - }, - { - "inputs": [], - "name": "ChangesCurrentPeriod", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "duplicatedCandidate", - "type": "address" - } - ], - "name": "DuplicateCandidates", - "type": "error" - }, - { - "inputs": [], - "name": "ElectionAlreadyEvaluated", - "type": "error" - }, - { - "inputs": [], - "name": "ElectionNotEvaluated", - "type": "error" - }, - { - "inputs": [], - "name": "EmptyArray", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "requiredAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "availableAmount", - "type": "uint256" - } - ], - "name": "InsufficientCcipFee", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidBallot", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidElectionSettings", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "code", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "v1", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "v2", - "type": "uint64" - } - ], - "name": "InvalidEpochConfiguration", - "type": "error" - }, - { - "inputs": [], - "name": "NoCandidates", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "currentEpoch", - "type": "uint256" - } - ], - "name": "NoVotingPower", - "type": "error" - }, - { - "inputs": [], - "name": "NotACouncilMember", - "type": "error" - }, - { - "inputs": [], - "name": "NotCallableInCurrentPeriod", - "type": "error" - }, - { - "inputs": [], - "name": "NotImplemented", - "type": "error" - }, - { - "inputs": [], - "name": "NotNominated", - "type": "error" - }, - { - "inputs": [], - "name": "PositionOutOfBounds", - "type": "error" - }, - { - "inputs": [], - "name": "TooManyMembers", - "type": "error" - }, - { - "inputs": [], - "name": "ValueNotInSet", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "candidate", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - } - ], - "name": "CandidateNominated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "member", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "CouncilMemberAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "member", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "CouncilMemberRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address[]", - "name": "dismissedMembers", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - } - ], - "name": "CouncilMembersDismissed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "numEvaluatedBallots", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBallots", - "type": "uint256" - } - ], - "name": "ElectionBatchEvaluated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ballotCount", - "type": "uint256" - } - ], - "name": "ElectionEvaluated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "ElectionModuleInitialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - } - ], - "name": "EmergencyElectionStarted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint64", - "name": "epochId", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "startDate", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "endDate", - "type": "uint64" - } - ], - "name": "EpochScheduleUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - } - ], - "name": "EpochStarted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "candidate", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - } - ], - "name": "NominationWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "votingPower", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "candidates", - "type": "address[]" - } - ], - "name": "VoteRecorded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "epochId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "candidates", - "type": "address[]" - } - ], - "name": "VoteWithdrawn", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - }, - { - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "votingPower", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "candidates", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "name": "_recvCast", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "membersToDismiss", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "_recvDismissMembers", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "epochStartDate", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "nominationPeriodStartDate", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "votingPeriodStartDate", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "epochEndDate", - "type": "uint64" - }, - { - "internalType": "address[]", - "name": "councilMembers", - "type": "address[]" - } - ], - "name": "_recvResolve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "nominationPeriodStartDate", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "votingPeriodStartDate", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "epochEndDate", - "type": "uint64" - } - ], - "name": "_recvTweakEpochSchedule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - }, - { - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "candidates", - "type": "address[]" - } - ], - "name": "_recvWithdrawVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "candidates", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "name": "cast", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "membersToDismiss", - "type": "address[]" - } - ], - "name": "dismissMembers", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "numBallots", - "type": "uint256" - } - ], - "name": "evaluate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "electionId", - "type": "uint256" - } - ], - "name": "getBallot", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "votingPower", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "votedCandidates", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "internalType": "struct Ballot.Data", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "electionId", - "type": "uint256" - } - ], - "name": "getBallotCandidates", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "candidate", - "type": "address" - } - ], - "name": "getCandidateVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getCouncilMembers", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getCouncilToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getCurrentPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getElectionSettings", - "outputs": [ - { - "components": [ - { - "internalType": "uint8", - "name": "epochSeatCount", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "minimumActiveMembers", - "type": "uint8" - }, - { - "internalType": "uint64", - "name": "epochDuration", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "nominationPeriodDuration", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "votingPeriodDuration", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "maxDateAdjustmentTolerance", - "type": "uint64" - } - ], - "internalType": "struct ElectionSettings.Data", - "name": "settings", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getElectionWinners", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getEpochIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getEpochSchedule", - "outputs": [ - { - "components": [ - { - "internalType": "uint64", - "name": "startDate", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "nominationPeriodStartDate", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "votingPeriodStartDate", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "endDate", - "type": "uint64" - } - ], - "internalType": "struct Epoch.Data", - "name": "epoch", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getNextElectionSettings", - "outputs": [ - { - "components": [ - { - "internalType": "uint8", - "name": "epochSeatCount", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "minimumActiveMembers", - "type": "uint8" - }, - { - "internalType": "uint64", - "name": "epochDuration", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "nominationPeriodDuration", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "votingPeriodDuration", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "maxDateAdjustmentTolerance", - "type": "uint64" - } - ], - "internalType": "struct ElectionSettings.Data", - "name": "settings", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getNominees", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "electionId", - "type": "uint256" - } - ], - "name": "getVotePower", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - } - ], - "name": "hasVoted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "epochStartDate", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "nominationPeriodStartDate", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "votingPeriodStartDate", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "epochEndDate", - "type": "uint64" - }, - { - "internalType": "address[]", - "name": "councilMembers", - "type": "address[]" - } - ], - "name": "initElectionModuleSatellite", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initElectionModuleSatellite", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "initialCouncil", - "type": "address[]" - }, - { - "internalType": "uint8", - "name": "minimumActiveMembers", - "type": "uint8" - }, - { - "internalType": "uint64", - "name": "initialNominationPeriodStartDate", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "administrationPeriodDuration", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "nominationPeriodDuration", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "votingPeriodDuration", - "type": "uint64" - } - ], - "name": "initOrUpdateElectionSettings", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "isElectionEvaluated", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isElectionModuleInitialized", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "candidate", - "type": "address" - } - ], - "name": "isNominated", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "nominate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "resolve", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "epochSeatCount", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "minimumActiveMembers", - "type": "uint8" - }, - { - "internalType": "uint64", - "name": "epochDuration", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "nominationPeriodDuration", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "votingPeriodDuration", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "maxDateAdjustmentTolerance", - "type": "uint64" - } - ], - "name": "setNextElectionSettings", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "newNominationPeriodStartDate", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "newVotingPeriodStartDate", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "newEpochEndDate", - "type": "uint64" - } - ], - "name": "tweakEpochSchedule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "withdrawNomination", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "candidates", - "type": "address[]" - } - ], - "name": "withdrawVote", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "electionId", - "type": "uint256" - } - ], - "name": "BallotAlreadyPrepared", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidSnapshotContract", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "NoPower", - "type": "error" - }, - { - "inputs": [], - "name": "OverflowUint256ToUint128", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "snapshotId", - "type": "uint128" - } - ], - "name": "SnapshotAlreadyTaken", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "snapshotContract", - "type": "address" - }, - { - "internalType": "uint128", - "name": "electionId", - "type": "uint128" - } - ], - "name": "SnapshotNotTaken", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "snapshotContract", - "type": "address" - }, - { - "internalType": "uint128", - "name": "electionId", - "type": "uint128" - } - ], - "name": "getVotePowerSnapshotId", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "snapshotContract", - "type": "address" - }, - { - "internalType": "address", - "name": "voter", - "type": "address" - } - ], - "name": "prepareBallotWithSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "power", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "snapshotContract", - "type": "address" - }, - { - "internalType": "bool", - "name": "enabled", - "type": "bool" - } - ], - "name": "setSnapshotContract", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "snapshotContract", - "type": "address" - } - ], - "name": "takeVotePowerSnapshot", - "outputs": [ - { - "internalType": "uint128", - "name": "snapshotId", - "type": "uint128" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "ImplementationIsSterile", - "type": "error" - }, - { - "inputs": [], - "name": "NoChange", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "contr", - "type": "address" - } - ], - "name": "NotAContract", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - } - ], - "name": "NotNominated", - "type": "error" - }, - { - "inputs": [], - "name": "UpgradeSimulationFailed", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroAddress", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldOwner", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnerChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnerNominated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "self", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newNominatedOwner", - "type": "address" - } - ], - "name": "nominateNewOwner", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "nominatedOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceNomination", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "simulateUpgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "InvalidMessage", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "NotCcipRouter", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "name": "UnsupportedNetwork", - "type": "error" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "messageId", - "type": "bytes32" - }, - { - "internalType": "uint64", - "name": "sourceChainSelector", - "type": "uint64" - }, - { - "internalType": "bytes", - "name": "sender", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "components": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "internalType": "struct CcipClient.EVMTokenAmount[]", - "name": "tokenAmounts", - "type": "tuple[]" - } - ], - "internalType": "struct CcipClient.Any2EVMMessage", - "name": "message", - "type": "tuple" - } - ], - "name": "ccipReceive", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50614565806100206000396000f3fe6080604052600436106101e35760003560e01c80639636f67c11610102578063d82f25f011610095578063e549a29011610064578063e549a290146105c5578063f2516dbf146105da578063fcd7e1d7146105ef578063ffe7f6431461060457600080fd5b8063d82f25f0146104f6578063e1425cf514610516578063e327b58514610590578063e4220d1e146105a557600080fd5b8063aede2fa5116100d1578063aede2fa514610472578063c07de0d31461049f578063c5798523146104cc578063d11801cf146104e157600080fd5b80639636f67c146104175780639a25eaf31461042c578063a31d297e1461043f578063a90486321461045257600080fd5b8063606a6b761161017a578063881a2c6411610149578063881a2c64146103975780638a39030a146103b75780638f701997146103d757806391baec87146103f757600080fd5b8063606a6b76146103225780636acac61f1461034457806374cc3e0d146103645780637b3d63e01461037757600080fd5b80633d32f239116101b65780633d32f2391461026a5780633f77ec6e146102c257806342545825146102e2578063464d43321461030257600080fd5b8063086146d2146101e85780632810e1d614610210578063371432331461021a5780633a3e6c811461023a575b600080fd5b3480156101f457600080fd5b506101fd610619565b6040519081526020015b60405180910390f35b610218610649565b005b34801561022657600080fd5b50610218610235366004613a7a565b6107c6565b34801561024657600080fd5b5061025a610255366004613aaf565b6109dd565b6040519015158152602001610207565b34801561027657600080fd5b5061027f610a02565b604051610207919081516001600160401b039081168252602080840151821690830152604080840151821690830152606092830151169181019190915260800190565b3480156102ce57600080fd5b506102186102dd366004613b0e565b610a7a565b3480156102ee57600080fd5b5061025a6102fd366004613baa565b610c24565b34801561030e57600080fd5b5061021861031d366004613beb565b610c61565b34801561032e57600080fd5b50610337610cac565b6040516102079190613cbe565b34801561035057600080fd5b5061021861035f366004613cd1565b610cc1565b610218610372366004613d1e565b610cf0565b34801561038357600080fd5b50610218610392366004613d89565b610de8565b3480156103a357600080fd5b506103376103b2366004613dd4565b610e6e565b3480156103c357600080fd5b506102186103d2366004613e2e565b610ee0565b3480156103e357600080fd5b506102186103f2366004613f45565b610fa3565b34801561040357600080fd5b50610218610412366004613f88565b6110cf565b34801561042357600080fd5b5061033761113d565b61021861043a366004613fc6565b611155565b61021861044d366004613a7a565b61124f565b34801561045e57600080fd5b506101fd61046d366004613dd4565b611360565b34801561047e57600080fd5b5061049261048d366004613dd4565b611378565b6040516102079190614007565b3480156104ab57600080fd5b506104b461147f565b6040516001600160a01b039091168152602001610207565b3480156104d857600080fd5b5061025a611498565b3480156104ed57600080fd5b506102186114a2565b34801561050257600080fd5b506101fd610511366004613aaf565b61153f565b34801561052257600080fd5b5061052b61156e565b6040516102079190600060c08201905060ff835116825260ff602084015116602083015260408301516001600160401b0380821660408501528060608601511660608501528060808601511660808501528060a08601511660a0850152505092915050565b34801561059c57600080fd5b5061025a611612565b3480156105b157600080fd5b506102186105c0366004613beb565b611628565b3480156105d157600080fd5b5061052b61163f565b3480156105e657600080fd5b5061033761167c565b3480156105fb57600080fd5b50610218611694565b34801561061057600080fd5b506101fd611734565b600061063361062e610629611747565b6117a9565b6117b8565b6003811115610644576106446140af565b905090565b610653600361183f565b600061065d611747565b9050600061066a82611897565b805490915060ff1661068f57604051634e6a146760e11b815260040160405180910390fd5b600061069a836118a6565b905060006106a7846118b5565b90506106b381836118d0565b60006106be82611a1e565b80516020820151604083015160608401519394506106e0938993929190611ae7565b6106e985611d54565b5060006106f4611d72565b905061078261070282611dc3565b63e4220d1e60e01b8860010154856000015186602001518760400151886060015161072f8d600401611e96565b604051602401610744969594939291906140c5565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152839190620186a0611eaa565b50845461ff00191661010017855560018601546040517f968139de8ea4f6dca3f75fdde04ee69529bde77210bb1cc0b58e954fd3d9b61990600090a2505050505050565b6107d0600361183f565b60006107da611747565b905060006107e782611897565b905060006107f4836117a9565b6040805160808101825291546001600160401b038082168452600160401b820481166020850152600160801b8204811692840192909252600160c01b9004166060820152600184015490915060009061084c9061219f565b8054909150610100900460ff1661086560028501611e96565b5110156108fa576000610876611d72565b90506108f361088482611dc3565b636acac61f60e01b8760010154866020015187604001518760000160129054906101000a90046001600160401b031689606001516108c29190614129565b60405160248101949094526001600160401b039283166044850152908216606484015216608482015260a401610744565b50506109d6565b825460ff161561091d5760405163fd22975360e01b815260040160405180910390fd5b61092685612216565b60018401546000610938600686015490565b9050808560010154101561098b576001850154604080519182526020820183905283917f0b1080b1dbbb0d094f410f8b1b6a2633bf79116996b40b806654748011b1df0b910160405180910390a26109d3565b845460ff1916600117855560405182907f7c757193e7e9b337037d5688d06fac74a0d837d516d08798bf90bc06d4acee90906109ca9084815260200190565b60405180910390a25b50505b5050505050565b60006109fc826109f36109ee611747565b611897565b60020190612284565b92915050565b604080516080810182526000808252602082018190529181018290526060810191909152610a31610629611747565b6040805160808101825291546001600160401b038082168452600160401b820481166020850152600160801b8204811692840192909252600160c01b9004166060820152919050565b610a826122a6565b610a8c600261183f565b6001831115610ab757604051634bab873760e11b8152600401610aae90614150565b60405180910390fd5b828114610ad757604051634bab873760e11b8152600401610aae906141ac565b6000610ae1611747565b90506000610aee82611897565b60018301549091508a8114610b5f5760408051634bab873760e11b81526004810191909152600a6044820152690cae0dec6d092dcc8caf60b31b60648201526080602482015260136084820152720d2dcecc2d8d2c840cae0dec6d040d2dcc8caf606b1b60a482015260c401610aae565b610b6987876122ec565b6000610b7a84600101548c8b612438565b9050610b8a6001820189896139cb565b50610b99600282018787613a2a565b50898155610ba6816124ae565b60008181526007840160205260409020548190610bca57610bca60068501826124d7565b828a8d6001600160a01b03167f05873bee1fa0cb7404ab4cd3e2127ad917fbe93623a483ea6526531990e1053385600001548d8d604051610c0d9392919061424e565b60405180910390a450505050505050505050505050565b600080610c2f611747565b90506000610c4282600101548686612438565b805490915015801590610c585750600181015415155b95945050505050565b610c696122a6565b6000610c73611747565b9050610c7d612530565b15610c8857506109d3565b805460ff19166001178155610ca28888888888888861253a565b5050505050505050565b6060610644610cb96125b2565b600101611e96565b610cc96122a6565b6000610cd485612605565b80549091506109d69082906001600160401b0316868686612650565b610cfa600261183f565b6000610d046126ba565b90506000610d10611747565b6001015490506000610d23828446612438565b8054909150600003610d5a57604051638102b74960e01b81526001600160a01b038416600482015260248101839052604401610aae565b6000610d64611d72565b9050610ddd610d748260006126f7565b633f77ec6e60e01b85878660000154468e8e8e8e604051602401610d9f989796959493929190614268565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152839190620186a0612722565b505050505050505050565b610df06122a6565b610e2e838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250859250612791915050565b7f5c9cb9436a66566a014c694eb6cd67ff16b01deb8b210630a0a0d894a3a7035f838383604051610e61939291906142d8565b60405180910390a1505050565b6060610e7b828585612438565b600101805480602002602001604051908101604052809291908181526020018280548015610ed257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610eb4575b505050505090509392505050565b610ee86127fb565b855160ff1015610f0b57604051635659186560e01b815260040160405180910390fd5b6000610f15611747565b9050610f2484620151806142fc565b9350610f3383620151806142fc565b9250610f4282620151806142fc565b8751909250600083610f548688614129565b610f5e9190614129565b90506000610f6b846118b5565b9050610f7f81848b858a8a6203f480612836565b610f87612530565b610f9757610f9784828c8b612961565b50505050505050505050565b610fab6127fb565b610fb5600061183f565b6000610fbf611747565b90506000610fcc826117a9565b6040805160808101825282546001600160401b039081168252888116602083015287811692820192909252908516606082015290915061100d838383612a88565b6000611017611d72565b905061107261102582611dc3565b600186015460208501516040808701516060880151915160248101949094526001600160401b03928316604485015282166064840152166084820152636acac61f60e01b9060a401610744565b5081602001516001600160401b03167fd289c6d0460c72f1845f45057a36c0e80be8a0d367aebb7675fe64cdab632964836040015184606001516040516109ca9291906001600160401b0392831681529116602082015260400190565b6110d76127fb565b6110e1600061183f565b61113586866110f387620151806142fc565b61110087620151806142fc565b61110d87620151806142fc565b61111a87620151806142fc565b61112a611125611747565b6118b5565b959493929190612836565b505050505050565b606061064461114d6109ee611747565b600201611e96565b61115d6127fb565b6000611167611747565b90506000611174826117a9565b90506000611180611d72565b90506111af61118e82611dc3565b60018501546040516303d9eb1f60e51b91610744918a918a916024016142d8565b5060006111ba6125b2565b905060006111c7846117b8565b60038111156111d8576111d86140af565b146111e557505050505050565b6111ee846118a6565b54610100900460ff1661120360018301612bdf565b1061121057505050505050565b61121984612be9565b60018401546040517f9c2bae1456357809a1c870e1e63679a1f7972f8b45dcc26b64338cd925c0857290600090a2505050505050565b6112576127fb565b6000611261611d72565b905061126d8183612c70565b60006112776125b2565b90506000611283611747565b90506000611290826117a9565b6040805160808101825291546001600160401b038082168452600160401b820481166020850152600160801b8204811692840192909252600160c01b900416606082015290506111356112e286612caf565b6001808501548451602086015160408701516060880151632326a19960e11b9561130d908c01611e96565b604051602401611322969594939291906140c5565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152869190620186a0612722565b60008061136e838686612438565b5495945050505050565b61139c60405180606001604052806000815260200160608152602001606081525090565b6113a7828585612438565b604051806060016040529081600082015481526020016001820180548060200260200160405190810160405280929190818152602001828054801561141557602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116113f7575b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561146d57602002820191906000526020600020905b815481526020019060010190808311611459575b50505050508152505090509392505050565b60006114896125b2565b546001600160a01b0316919050565b6000610644612530565b60006114af6109ee611747565b60020190506114be600161183f565b60006114c86126ba565b90506114d48282612284565b6114f157604051639ceae3db60e01b815260040160405180910390fd5b6114fb8282612cdd565b611503611747565b600101546040516001600160a01b038316907fd4e9073cc1c197d638f4da96c7cf415bc573b6f600ccba01627c416267d9dd3b90600090a35050565b600061154c6109ee611747565b6001600160a01b03909216600090815260089290920160205250604090205490565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a08101919091526115b06115ab611747565b6118a6565b6040805160c081018252825460ff808216835261010082041660208301526001600160401b03620100008204811693830193909352600160501b810483166060830152600160901b9004821660808201526001909201541660a0820152919050565b600061161f6109ee611747565b5460ff16919050565b6116306122a6565b6109d38787878787878761253a565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a08101919091526115b0611125611747565b606061064461168c6109ee611747565b600401611e96565b6116a060016002612cf0565b60006116ad6109ee611747565b600201905060006116bc6126ba565b90506116c88282612284565b156116e6576040516328f3e0eb60e11b815260040160405180910390fd5b6116f08282612d79565b6116f8611747565b600101546040516001600160a01b038316907fd30cd5d8ca68864f2e956b063eda9b0e91ca33e27b30e7d4cb121e0208e086f890600090a35050565b600061173e611747565b60010154905090565b60008060405160200161178b906020808252601f908201527f696f2e73796e7468657469782e676f7665726e616e63652e436f756e63696c00604082015260600190565b60408051601f19818403018152919052805160209091012092915050565b60006109fc8260010154612605565b6000806117c442612caf565b83549091506001600160401b03600160c01b9091048116908216106117ec5750600392915050565b82546001600160401b03600160801b9091048116908216106118115750600292915050565b82546001600160401b03600160401b9091048116908216106118365750600192915050565b50600092915050565b600061184f61062e610629611747565b9050816003811115611863576118636140af565b816003811115611875576118756140af565b1461189357604051632e20231560e21b815260040160405180910390fd5b5050565b60006109fc8260010154612d8c565b60006109fc826001015461219f565b60006109fc826001015460016118cb9190614327565b61219f565b815460ff166000036118ed578054825460ff191660ff9091161782555b8154610100900460ff16600003611918578054825461ff0019166101009182900460ff169091021782555b81546201000090046001600160401b0316600003611959578054825469ffffffffffffffff0000191662010000918290046001600160401b03169091021782555b8154600160501b90046001600160401b031660000361199d578054825467ffffffffffffffff60501b1916600160501b918290046001600160401b03169091021782555b8154600160901b90046001600160401b03166000036119e1578054825467ffffffffffffffff60901b1916600160901b918290046001600160401b03169091021782555b60018201546001600160401b0316600003611893576001908101549101805467ffffffffffffffff19166001600160401b03909216919091179055565b604080516080810182526000808252602082018190529181018290526060810182905290611a4b42612caf565b8354909150600090611a6c906201000090046001600160401b031683614129565b8454909150600090611a8e90600160901b90046001600160401b03168361433a565b8554909150600090611ab090600160501b90046001600160401b03168361433a565b604080516080810182526001600160401b039687168152918616602083015292851692810192909252509116606082015292915050565b816001600160401b0316816001600160401b031611611b335760405163f4137ffd60e01b8152600160048201526001600160401b03808316602483015283166044820152606401610aae565b826001600160401b0316826001600160401b031611611b7f5760405163f4137ffd60e01b8152600260048201526001600160401b03808416602483015284166044820152606401610aae565b836001600160401b0316836001600160401b031611611bcb5760405163f4137ffd60e01b8152600360048201526001600160401b03808516602483015285166044820152606401610aae565b6000611bd7858361433a565b90506000611be5848461433a565b90506000611bf3868661433a565b90506000611c00896118a6565b8054909150611c28906001600160401b03600160901b8204811691600160501b900416614129565b6001600160401b0316846001600160401b03161015611c9e5780546004908590611c6b906001600160401b03600160901b8204811691600160501b900416614129565b60405163f4137ffd60e01b815260048101939093526001600160401b039182166024840152166044820152606401610aae565b80546001600160401b03600160501b90910481169083161015611cf957805460405163f4137ffd60e01b8152600560048201526001600160401b038085166024830152600160501b9092049091166044820152606401610aae565b80546001600160401b03600160901b90910481169084161015610ddd57805460405163f4137ffd60e01b8152600660048201526001600160401b038086166024830152600160901b9092049091166044820152606401610aae565b60008160010160008154611d679061435a565b918290555092915050565b60008060405160200161178b9060208082526024908201527f696f2e73796e7468657469782e636f72652d6d6f64756c65732e43726f7373436040820152633430b4b760e11b606082015260800190565b6060600182016000611dd482611e96565b9050600081516001600160401b03811115611df157611df1613e07565b604051908082528060200260200182016040528015611e1a578160200160208202803683370190505b50905060005b8251811015611e8d576000611e4d848381518110611e4057611e40614373565b6020026020010151612caf565b905080838381518110611e6257611e62614373565b6001600160401b03909216602092830291909101909101525080611e858161435a565b915050611e20565b50949350505050565b60606000611ea383612dd6565b9392505050565b83546000906001600160a01b0316815b855181101561218b576000868281518110611ed757611ed7614373565b6020026020010151905046816001600160401b031603611f6857600080306001600160a01b031688604051611f0c91906143ad565b6000604051808303816000865af19150503d8060008114611f49576040519150601f19603f3d011682016040523d82523d6000602084013e611f4e565b606091505b509150915081611f615780518060208301fd5b5050612178565b6040805160a0810182523060c0808301919091528251808303909101815260e08201835281526020808201899052825160008082529181018452909282019083611fd4565b6040805180820190915260008082526020820152815260200190600190039081611fad5790505b508152600060208083018290526040805180820182528b815282019283528051602481018c905292511515604480850191909152815180850390910181526064909301815290820180516001600160e01b03166397a657c960e01b179052909101526001600160401b03808416600090815260038c0160205260408082205490516320487ded60e01b8152939450909116916001600160a01b038716906320487ded9061208790859087906004016143f5565b602060405180830381865afa1580156120a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120c891906144ce565b9050804710156120f4576040516320d0c54d60e21b815260048101829052476024820152604401610aae565b6040516396f4e9f960e01b81526001600160a01b038716906396f4e9f990839061212490869088906004016143f5565b60206040518083038185885af1158015612142573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061216791906144ce565b506121728188614327565b96505050505b50806121838161435a565b915050611eba565b5061219582612e32565b5050949350505050565b6040805160208101829052602860608201527f696f2e73796e7468657469782e676f7665726e616e63652e456c656374696f6e60808201526753657474696e677360c01b60a0820152908101829052600090819060c0015b60408051601f1981840301815291905280516020909101209392505050565b6000612220611747565b9050600061222d82611897565b9050600061223a836118a6565b90508360000361224a576101f493505b6000612257836006015490565b6001840154909150600061226b8783614327565b9050828111156122785750815b6109d385858484612eb4565b6001600160a01b03811660009081526001830160205260408120541515611ea3565b306122af6126ba565b6001600160a01b0316146122ea576122c56126ba565b60405163472511eb60e11b81526001600160a01b039091166004820152602401610aae565b565b80600081900361230f57604051633941064160e21b815260040160405180910390fd5b600061231c6109ee611747565b600201905060005b828110156109d657600085858381811061234057612340614373565b90506020020160208101906123559190613aaf565b90506123618382612284565b61237e57604051639ceae3db60e01b815260040160405180910390fd5b6123896001856144e7565b82101561242557600061239d836001614327565b90505b848110156124235760008787838181106123bc576123bc614373565b90506020020160208101906123d19190613aaf565b9050806001600160a01b0316836001600160a01b0316036124105760405163ba156e7b60e01b81526001600160a01b0384166004820152602401610aae565b508061241b8161435a565b9150506123a0565b505b50806124308161435a565b915050612324565b6040805160806020808301829052601e60a08401527f696f2e73796e7468657469782e676f7665726e616e63652e42616c6c6f74000060c080850191909152838501979097526001600160a01b039590951660608301528101929092528051808303909401845260e09091019052815191012090565b6124b781612f00565b6124d457604051637611594360e01b815260040160405180910390fd5b50565b6000818152600183016020526040902054156125065760405163682ad32d60e01b815260040160405180910390fd5b81546001818101845560008481526020808220909301849055845493815293019052604090912055565b600061161f611747565b6000612544611747565b600181018054908a9055909150600061255c8a612605565b905061256b818a8a8a8a612650565b61257482612fae565b610f978585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508e9250612ffb915050565b60008060405160200161178b9060208082526026908201527f696f2e73796e7468657469782e676f7665726e616e63652e436f756e63696c4d604082015265656d6265727360d01b606082015260800190565b6040805160208101829052601d60608201527f696f2e73796e7468657469782e676f7665726e616e63652e45706f63680000006080820152908101829052600090819060a0016121f7565b84546001600160401b039485166fffffffffffffffffffffffffffffffff1990911617600160401b93851693909302929092176fffffffffffffffffffffffffffffffff16600160801b918416919091026001600160c01b031617600160c01b9190921602179055565b600073ae788aaf52780741e12bf79ad684b91bb0ef4d92331480156126e0575060143610155b156126f2575060131936013560601c90565b503390565b6000611ea361271d61270a846001614129565b60018601906001600160401b031661306c565b612caf565b60408051600180825281830190925260009182919060208083019080368337019050509050848160008151811061275b5761275b614373565b60200260200101906001600160401b031690816001600160401b03168152505061278786828686611eaa565b9695505050505050565b815160008190036127b55760405163521299a960e01b815260040160405180910390fd5b60005b818110156127f5576127e38482815181106127d5576127d5614373565b60200260200101518461307e565b806127ed8161435a565b9150506127b8565b50505050565b612803613185565b6001600160a01b0316336001600160a01b0316146122ea5760405163472511eb60e11b8152336004820152602401610aae565b865460ff87811661ffff1990921691909117610100918716919091021771ffffffffffffffffffffffffffffffff00001916620100006001600160401b038681169190910267ffffffffffffffff60501b191691909117600160501b858316021767ffffffffffffffff60901b1916600160901b8483160217885560018801805467ffffffffffffffff19169183169190911790556128d48761318f565b865460018801546040805160ff808516825261010085041660208201526001600160401b03620100008504811692820192909252600160501b840482166060820152600160901b909304811660808401521660a08201527f305a7d62fbe09738c7ca033adf1a2c319e92a17f32b54b711dd3e865795f239a9060c00160405180910390a150505050505050565b600061296c856118a6565b905061297881856118d0565b600061298342612caf565b85549091506000906129a4906201000090046001600160401b031683614129565b86549091506000906129c690600160901b90046001600160401b03168361433a565b9050846001600160401b03166000036129f85786546129f590600160501b90046001600160401b03168261433a565b94505b6000612a03896117a9565b9050612a138982868986886132b2565b612a1e876000612ffb565b885460ff191660011789556040517fedd2375ae1196fe91e924096f373e5d416893b6da334911ea52c9dd02ec2a0cb90600090a16040516000907f968139de8ea4f6dca3f75fdde04ee69529bde77210bb1cc0b58e954fd3d9b619908290a2505050505050505050565b6000612a93846118a6565b60018101546060840151825486549394506001600160401b0392831693612acc93612ac79262010000900481169116614129565b6132cc565b6001600160401b03161180612b1157506001810154602083015184546001600160401b0392831692612b069291600160401b9004166132cc565b6001600160401b0316115b80612b4c57506001810154604083015184546001600160401b0392831692612b419291600160801b9004166132cc565b6001600160401b0316115b15612b7b5760405163f4137ffd60e01b8152600760048201526000602482018190526044820152606401610aae565b8254602083015160408401516060850151612ba59388936001600160401b03909116929091611ae7565b6000612bb083613300565b6003811115612bc157612bc16140af565b146127f557604051636af1cb2160e01b815260040160405180910390fd5b60006109fc825490565b6000612bf4826117a9565b90506000612c01836118a6565b90506000612c0e42612caf565b8254909150600090612c3090600160501b90046001600160401b031683614129565b8354909150600090612c5290600160901b90046001600160401b031683614129565b855490915061113590879087906001600160401b03168686866132b2565b612c7d6001830182613380565b61189357612c8a81612caf565b60405163900d29db60e01b81526001600160401b039091166004820152602401610aae565b60006001600160401b03821115612cd9576040516372b1c34f60e01b815260040160405180910390fd5b5090565b611893826001600160a01b038316613398565b6000612d0061062e610629611747565b9050826003811115612d1457612d146140af565b816003811115612d2657612d266140af565b14158015612d565750816003811115612d4157612d416140af565b816003811115612d5357612d536140af565b14155b15612d7457604051632e20231560e21b815260040160405180910390fd5b505050565b611893826001600160a01b0383166124d7565b60408051602080820183905260608201527f696f2e73796e7468657469782e676f7665726e616e63652e456c656374696f6e6080820152908101829052600090819060a0016121f7565b606081600001805480602002602001604051908101604052809291908181526020018280548015612e2657602002820191906000526020600020905b815481526020019060010190808311612e12575b50505050509050919050565b6000612e3e82346144e7565b9050600080612e4b6126ba565b6001600160a01b03168360405160006040518083038185875af1925050503d8060008114612e95576040519150601f19603f3d011682016040523d82523d6000602084013e612e9a565b606091505b509150915081612ead5780518060208301fd5b5050919050565b825460ff16825b82811015611135576000612edd612ed3836001614327565b6006890190613497565b905080612eeb8882866134fc565b50508080612ef89061435a565b915050612ebb565b6002810154600182015460009114612f1a57506000919050565b6000805b6001840154811015612f9a57836002018181548110612f3f57612f3f614373565b9060005260206000200154600003612f5b575060009392505050565b836002018181548110612f7057612f70614373565b906000526020600020015482612f869190614327565b915080612f928161435a565b915050612f1e565b50801580611ea35750825481149392505050565b6000612fb86125b2565b60010190506000612fc882612bdf565b905060005b818110156127f557612fe9612fe384600161306c565b8561307e565b80612ff38161435a565b915050612fcd565b8151600081900361301f5760405163521299a960e01b815260040160405180910390fd5b60006130296125b2565b905060005b828110156109d65761305a8286838151811061304c5761304c614373565b6020026020010151866135dd565b806130648161435a565b91505061302e565b6000611ea361307b8484613497565b90565b60006130886125b2565b9050600181016130988185612284565b6130b55760405163051b79b960e31b815260040160405180910390fd5b6130bf8185612cdd565b6001600160a01b0384166130e96130e46b31b7bab731b4b62a37b5b2b760a11b6136d9565b613737565b6001600160a01b03166342966c68826040518263ffffffff1660e01b815260040161311691815260200190565b600060405180830381600087803b15801561313057600080fd5b505af1158015613144573d6000803e3d6000fd5b50506040518692506001600160a01b03881691507f208c29b08f363039c7c656b8f572656a2489f862113410d36201aa340657f1b490600090a35050505050565b600061148961375a565b805460ff1615806131a757508054610100900460ff16155b806131bd5750805460ff80821661010090920416115b806131d6575080546201000090046001600160401b0316155b806131f057508054600160501b90046001600160401b0316155b8061320a57508054600160901b90046001600160401b0316155b8061322d5750613219816137aa565b8154600160501b90046001600160401b0316105b80613250575061323c816137aa565b8154600160901b90046001600160401b0316105b806132945750805461327b906001600160401b03600160901b8204811691600160501b900416614129565b81546001600160401b0391821662010000909104909116105b156124d457604051630a21d9ed60e31b815260040160405180910390fd5b6132bf8685858585611ae7565b6111358585858585612650565b6000816001600160401b0316836001600160401b0316116132f6576132f1838361433a565b611ea3565b611ea3828461433a565b60008061330c42612caf565b905082606001516001600160401b0316816001600160401b0316106133345750600392915050565b82604001516001600160401b0316816001600160401b03161061335a5750600292915050565b82602001516001600160401b0316816001600160401b0316106118365750600192915050565b60008181526001830160205260408120541515611ea3565b6000818152600183016020526040812054908190036133ca5760405163b3dbc29360e01b815260040160405180910390fd5b60006133d76001836144e7565b84549091506000906133eb906001906144e7565b905080821461345057600085600001828154811061340b5761340b614373565b906000526020600020015490508086600001848154811061342e5761342e614373565b6000918252602080832090910192909255918252600187019052604090208390555b8454859080613461576134616144fa565b60019003818190600052602060002001600090559055846001016000858152602001908152602001600020600090555050505050565b60008115806134a65750825482115b156134c45760405163eb9bc44760e01b815260040160405180910390fd5b60006134d16001846144e7565b90508360000181815481106134e8576134e8614373565b906000526020600020015491505092915050565b600182015460005b818110156135bc57600084600101828154811061352357613523614373565b60009182526020808320909101546001600160a01b03168083526008890190915260408220546002880180549294509092918590811061356557613565614373565b90600052602060002001548261357b9190614327565b6001600160a01b038416600090815260088a016020526040902081905590506135a6888483896137d7565b50505080806135b49061435a565b915050613504565b5060018460010160008282546135d29190614327565b909155505050505050565b600183016135eb8184612284565b15613609576040516348ac2ca160e11b815260040160405180910390fd5b6136138184612d79565b6001600160a01b0383166136386130e46b31b7bab731b4b62a37b5b2b760a11b6136d9565b6040516340c10f1960e01b81526001600160a01b0386811660048301526024820184905291909116906340c10f1990604401600060405180830381600087803b15801561368457600080fd5b505af1158015613698573d6000803e3d6000fd5b50506040518592506001600160a01b03871691507fe5b0ed13a85f5d5ab0d550273eaa6af99d84021d0ed22940dcc8835afc4243e890600090a35050505050565b6040805160208101829052602a60608201527f696f2e73796e7468657469782e636f72652d6d6f64756c65732e4173736f63696080820152696174656453797374656d60b01b60a0820152908101829052600090819060c0016121f7565b600061374c826565726337323160d01b613834565b50546001600160a01b031690565b60008060405160200161178b9060208082526023908201527f696f2e73796e7468657469782e636f72652d636f6e7472616374732e4f776e61604082015262626c6560e81b606082015260800190565b60018101546000906137c8906001600160401b031662015180614129565b6001600160401b031692915050565b600484016137e58185612284565b156137f057506127f5565b816137fa82612bdf565b10156138105761380a8185612d79565b506127f5565b60008061381d878461387c565b91509150808511156109d3576109d38383886138f5565b60028201548181148015906138555750681d5b9b585b9859d95960ba1b8114155b15612d745760405162d5319f60e31b81526004810183905260248101829052604401610aae565b60006000198161388b84612bdf565b905060015b818160ff16116138eb5760006138a98660ff841661306c565b6001600160a01b0381166000908152600889016020526040902054909150848110156138d6578094508195505b505080806138e390614510565b915050613890565b50505b9250929050565b612d74836001600160a01b0384166001600160a01b038416600082815260018401602052604090205461393b5760405163b3dbc29360e01b815260040160405180910390fd5b60008181526001840160205260409020541561396a5760405163682ad32d60e01b815260040160405180910390fd5b6000828152600180850160205260408220805490839055919061398d90836144e7565b9050828560000182815481106139a5576139a5614373565b600091825260208083209091019290925593845260019095019094526040909120555050565b828054828255906000526020600020908101928215613a1e579160200282015b82811115613a1e5781546001600160a01b0319166001600160a01b038435161782556020909201916001909101906139eb565b50612cd9929150613a65565b828054828255906000526020600020908101928215613a1e579160200282015b82811115613a1e578235825591602001919060010190613a4a565b5b80821115612cd95760008155600101613a66565b600060208284031215613a8c57600080fd5b5035919050565b80356001600160a01b0381168114613aaa57600080fd5b919050565b600060208284031215613ac157600080fd5b611ea382613a93565b60008083601f840112613adc57600080fd5b5081356001600160401b03811115613af357600080fd5b6020830191508360208260051b85010111156138ee57600080fd5b60008060008060008060008060c0898b031215613b2a57600080fd5b88359750613b3a60208a01613a93565b9650604089013595506060890135945060808901356001600160401b0380821115613b6457600080fd5b613b708c838d01613aca565b909650945060a08b0135915080821115613b8957600080fd5b50613b968b828c01613aca565b999c989b5096995094979396929594505050565b60008060408385031215613bbd57600080fd5b613bc683613a93565b946020939093013593505050565b80356001600160401b0381168114613aaa57600080fd5b600080600080600080600060c0888a031215613c0657600080fd5b87359650613c1660208901613bd4565b9550613c2460408901613bd4565b9450613c3260608901613bd4565b9350613c4060808901613bd4565b925060a08801356001600160401b03811115613c5b57600080fd5b613c678a828b01613aca565b989b979a50959850939692959293505050565b600081518084526020808501945080840160005b83811015613cb35781516001600160a01b031687529582019590820190600101613c8e565b509495945050505050565b602081526000611ea36020830184613c7a565b60008060008060808587031215613ce757600080fd5b84359350613cf760208601613bd4565b9250613d0560408601613bd4565b9150613d1360608601613bd4565b905092959194509250565b60008060008060408587031215613d3457600080fd5b84356001600160401b0380821115613d4b57600080fd5b613d5788838901613aca565b90965094506020870135915080821115613d7057600080fd5b50613d7d87828801613aca565b95989497509550505050565b600080600060408486031215613d9e57600080fd5b83356001600160401b03811115613db457600080fd5b613dc086828701613aca565b909790965060209590950135949350505050565b600080600060608486031215613de957600080fd5b613df284613a93565b95602085013595506040909401359392505050565b634e487b7160e01b600052604160045260246000fd5b803560ff81168114613aaa57600080fd5b60008060008060008060c08789031215613e4757600080fd5b86356001600160401b0380821115613e5e57600080fd5b818901915089601f830112613e7257600080fd5b8135602082821115613e8657613e86613e07565b8160051b604051601f19603f83011681018181108682111715613eab57613eab613e07565b60405292835281830193508481018201928d841115613ec957600080fd5b948201945b83861015613eee57613edf86613a93565b85529482019493820193613ece565b9a50613efd90508b8201613e1d565b985050505050613f0f60408801613bd4565b9350613f1d60608801613bd4565b9250613f2b60808801613bd4565b9150613f3960a08801613bd4565b90509295509295509295565b600080600060608486031215613f5a57600080fd5b613f6384613bd4565b9250613f7160208501613bd4565b9150613f7f60408501613bd4565b90509250925092565b60008060008060008060c08789031215613fa157600080fd5b613faa87613e1d565b9550613fb860208801613e1d565b9450613f0f60408801613bd4565b60008060208385031215613fd957600080fd5b82356001600160401b03811115613fef57600080fd5b613ffb85828601613aca565b90969095509350505050565b6020808252825182820152828101516060604084015280516080840181905260009291820190839060a08601905b8083101561405e5783516001600160a01b03168252928401926001929092019190840190614035565b506040870151868203601f190160608801528051808352908501935090840191506000905b808210156140a35783518352928401929184019160019190910190614083565b50909695505050505050565b634e487b7160e01b600052602160045260246000fd5b86815260006001600160401b0380881660208401528087166040840152808616606084015280851660808401525060c060a083015261410760c0830184613c7a565b98975050505050505050565b634e487b7160e01b600052601160045260246000fd5b6001600160401b0381811683821601908082111561414957614149614113565b5092915050565b60408152600061417a60408301600a81526963616e6469646174657360b01b602082015260400190565b8281036020938401526013815272746f6f206d616e792063616e6469646174657360681b928101929092525060400190565b6040815260006141d660408301600a81526963616e6469646174657360b01b602082015260400190565b828103602093840152601981527f6c656e677468206d757374206d6174636820616d6f756e747300000000000000928101929092525060400190565b8183526000602080850194508260005b85811015613cb3576001600160a01b0361423b83613a93565b1687529582019590820190600101614222565b838152604060208201526000610c58604083018486614212565b88815260018060a01b038816602082015286604082015285606082015260c06080820152600061429c60c083018688614212565b82810360a08401528381526001600160fb1b038411156142bb57600080fd5b8360051b80866020840137016020019a9950505050505050505050565b6040815260006142ec604083018587614212565b9050826020830152949350505050565b6001600160401b0381811683821602808216919082811461431f5761431f614113565b505092915050565b808201808211156109fc576109fc614113565b6001600160401b0382811682821603908082111561414957614149614113565b60006001820161436c5761436c614113565b5060010190565b634e487b7160e01b600052603260045260246000fd5b60005b838110156143a457818101518382015260200161438c565b50506000910152565b600082516143bf818460208701614389565b9190910192915050565b600081518084526143e1816020860160208601614389565b601f01601f19169290920160200192915050565b600060406001600160401b038516835260208181850152845160a08386015261442160e08601826143c9565b905081860151603f198087840301606088015261443e83836143c9565b88860151888203830160808a01528051808352908601945060009350908501905b8084101561449157845180516001600160a01b031683528601518683015293850193600193909301929086019061445f565b5060608901516001600160a01b031660a08901526080890151888203830160c08a015295506144c081876143c9565b9a9950505050505050505050565b6000602082840312156144e057600080fd5b5051919050565b818103818111156109fc576109fc614113565b634e487b7160e01b600052603160045260246000fd5b600060ff821660ff810361452657614526614113565b6001019291505056fea2646970667358221220904f525fa64f446a7dfc7bf076693a29ec93e5dbecb91e3911ad02d1ccad55f564736f6c63430008110033", - "deployedBytecode": "0x6080604052600436106101e35760003560e01c80639636f67c11610102578063d82f25f011610095578063e549a29011610064578063e549a290146105c5578063f2516dbf146105da578063fcd7e1d7146105ef578063ffe7f6431461060457600080fd5b8063d82f25f0146104f6578063e1425cf514610516578063e327b58514610590578063e4220d1e146105a557600080fd5b8063aede2fa5116100d1578063aede2fa514610472578063c07de0d31461049f578063c5798523146104cc578063d11801cf146104e157600080fd5b80639636f67c146104175780639a25eaf31461042c578063a31d297e1461043f578063a90486321461045257600080fd5b8063606a6b761161017a578063881a2c6411610149578063881a2c64146103975780638a39030a146103b75780638f701997146103d757806391baec87146103f757600080fd5b8063606a6b76146103225780636acac61f1461034457806374cc3e0d146103645780637b3d63e01461037757600080fd5b80633d32f239116101b65780633d32f2391461026a5780633f77ec6e146102c257806342545825146102e2578063464d43321461030257600080fd5b8063086146d2146101e85780632810e1d614610210578063371432331461021a5780633a3e6c811461023a575b600080fd5b3480156101f457600080fd5b506101fd610619565b6040519081526020015b60405180910390f35b610218610649565b005b34801561022657600080fd5b50610218610235366004613a7a565b6107c6565b34801561024657600080fd5b5061025a610255366004613aaf565b6109dd565b6040519015158152602001610207565b34801561027657600080fd5b5061027f610a02565b604051610207919081516001600160401b039081168252602080840151821690830152604080840151821690830152606092830151169181019190915260800190565b3480156102ce57600080fd5b506102186102dd366004613b0e565b610a7a565b3480156102ee57600080fd5b5061025a6102fd366004613baa565b610c24565b34801561030e57600080fd5b5061021861031d366004613beb565b610c61565b34801561032e57600080fd5b50610337610cac565b6040516102079190613cbe565b34801561035057600080fd5b5061021861035f366004613cd1565b610cc1565b610218610372366004613d1e565b610cf0565b34801561038357600080fd5b50610218610392366004613d89565b610de8565b3480156103a357600080fd5b506103376103b2366004613dd4565b610e6e565b3480156103c357600080fd5b506102186103d2366004613e2e565b610ee0565b3480156103e357600080fd5b506102186103f2366004613f45565b610fa3565b34801561040357600080fd5b50610218610412366004613f88565b6110cf565b34801561042357600080fd5b5061033761113d565b61021861043a366004613fc6565b611155565b61021861044d366004613a7a565b61124f565b34801561045e57600080fd5b506101fd61046d366004613dd4565b611360565b34801561047e57600080fd5b5061049261048d366004613dd4565b611378565b6040516102079190614007565b3480156104ab57600080fd5b506104b461147f565b6040516001600160a01b039091168152602001610207565b3480156104d857600080fd5b5061025a611498565b3480156104ed57600080fd5b506102186114a2565b34801561050257600080fd5b506101fd610511366004613aaf565b61153f565b34801561052257600080fd5b5061052b61156e565b6040516102079190600060c08201905060ff835116825260ff602084015116602083015260408301516001600160401b0380821660408501528060608601511660608501528060808601511660808501528060a08601511660a0850152505092915050565b34801561059c57600080fd5b5061025a611612565b3480156105b157600080fd5b506102186105c0366004613beb565b611628565b3480156105d157600080fd5b5061052b61163f565b3480156105e657600080fd5b5061033761167c565b3480156105fb57600080fd5b50610218611694565b34801561061057600080fd5b506101fd611734565b600061063361062e610629611747565b6117a9565b6117b8565b6003811115610644576106446140af565b905090565b610653600361183f565b600061065d611747565b9050600061066a82611897565b805490915060ff1661068f57604051634e6a146760e11b815260040160405180910390fd5b600061069a836118a6565b905060006106a7846118b5565b90506106b381836118d0565b60006106be82611a1e565b80516020820151604083015160608401519394506106e0938993929190611ae7565b6106e985611d54565b5060006106f4611d72565b905061078261070282611dc3565b63e4220d1e60e01b8860010154856000015186602001518760400151886060015161072f8d600401611e96565b604051602401610744969594939291906140c5565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152839190620186a0611eaa565b50845461ff00191661010017855560018601546040517f968139de8ea4f6dca3f75fdde04ee69529bde77210bb1cc0b58e954fd3d9b61990600090a2505050505050565b6107d0600361183f565b60006107da611747565b905060006107e782611897565b905060006107f4836117a9565b6040805160808101825291546001600160401b038082168452600160401b820481166020850152600160801b8204811692840192909252600160c01b9004166060820152600184015490915060009061084c9061219f565b8054909150610100900460ff1661086560028501611e96565b5110156108fa576000610876611d72565b90506108f361088482611dc3565b636acac61f60e01b8760010154866020015187604001518760000160129054906101000a90046001600160401b031689606001516108c29190614129565b60405160248101949094526001600160401b039283166044850152908216606484015216608482015260a401610744565b50506109d6565b825460ff161561091d5760405163fd22975360e01b815260040160405180910390fd5b61092685612216565b60018401546000610938600686015490565b9050808560010154101561098b576001850154604080519182526020820183905283917f0b1080b1dbbb0d094f410f8b1b6a2633bf79116996b40b806654748011b1df0b910160405180910390a26109d3565b845460ff1916600117855560405182907f7c757193e7e9b337037d5688d06fac74a0d837d516d08798bf90bc06d4acee90906109ca9084815260200190565b60405180910390a25b50505b5050505050565b60006109fc826109f36109ee611747565b611897565b60020190612284565b92915050565b604080516080810182526000808252602082018190529181018290526060810191909152610a31610629611747565b6040805160808101825291546001600160401b038082168452600160401b820481166020850152600160801b8204811692840192909252600160c01b9004166060820152919050565b610a826122a6565b610a8c600261183f565b6001831115610ab757604051634bab873760e11b8152600401610aae90614150565b60405180910390fd5b828114610ad757604051634bab873760e11b8152600401610aae906141ac565b6000610ae1611747565b90506000610aee82611897565b60018301549091508a8114610b5f5760408051634bab873760e11b81526004810191909152600a6044820152690cae0dec6d092dcc8caf60b31b60648201526080602482015260136084820152720d2dcecc2d8d2c840cae0dec6d040d2dcc8caf606b1b60a482015260c401610aae565b610b6987876122ec565b6000610b7a84600101548c8b612438565b9050610b8a6001820189896139cb565b50610b99600282018787613a2a565b50898155610ba6816124ae565b60008181526007840160205260409020548190610bca57610bca60068501826124d7565b828a8d6001600160a01b03167f05873bee1fa0cb7404ab4cd3e2127ad917fbe93623a483ea6526531990e1053385600001548d8d604051610c0d9392919061424e565b60405180910390a450505050505050505050505050565b600080610c2f611747565b90506000610c4282600101548686612438565b805490915015801590610c585750600181015415155b95945050505050565b610c696122a6565b6000610c73611747565b9050610c7d612530565b15610c8857506109d3565b805460ff19166001178155610ca28888888888888861253a565b5050505050505050565b6060610644610cb96125b2565b600101611e96565b610cc96122a6565b6000610cd485612605565b80549091506109d69082906001600160401b0316868686612650565b610cfa600261183f565b6000610d046126ba565b90506000610d10611747565b6001015490506000610d23828446612438565b8054909150600003610d5a57604051638102b74960e01b81526001600160a01b038416600482015260248101839052604401610aae565b6000610d64611d72565b9050610ddd610d748260006126f7565b633f77ec6e60e01b85878660000154468e8e8e8e604051602401610d9f989796959493929190614268565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152839190620186a0612722565b505050505050505050565b610df06122a6565b610e2e838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250859250612791915050565b7f5c9cb9436a66566a014c694eb6cd67ff16b01deb8b210630a0a0d894a3a7035f838383604051610e61939291906142d8565b60405180910390a1505050565b6060610e7b828585612438565b600101805480602002602001604051908101604052809291908181526020018280548015610ed257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610eb4575b505050505090509392505050565b610ee86127fb565b855160ff1015610f0b57604051635659186560e01b815260040160405180910390fd5b6000610f15611747565b9050610f2484620151806142fc565b9350610f3383620151806142fc565b9250610f4282620151806142fc565b8751909250600083610f548688614129565b610f5e9190614129565b90506000610f6b846118b5565b9050610f7f81848b858a8a6203f480612836565b610f87612530565b610f9757610f9784828c8b612961565b50505050505050505050565b610fab6127fb565b610fb5600061183f565b6000610fbf611747565b90506000610fcc826117a9565b6040805160808101825282546001600160401b039081168252888116602083015287811692820192909252908516606082015290915061100d838383612a88565b6000611017611d72565b905061107261102582611dc3565b600186015460208501516040808701516060880151915160248101949094526001600160401b03928316604485015282166064840152166084820152636acac61f60e01b9060a401610744565b5081602001516001600160401b03167fd289c6d0460c72f1845f45057a36c0e80be8a0d367aebb7675fe64cdab632964836040015184606001516040516109ca9291906001600160401b0392831681529116602082015260400190565b6110d76127fb565b6110e1600061183f565b61113586866110f387620151806142fc565b61110087620151806142fc565b61110d87620151806142fc565b61111a87620151806142fc565b61112a611125611747565b6118b5565b959493929190612836565b505050505050565b606061064461114d6109ee611747565b600201611e96565b61115d6127fb565b6000611167611747565b90506000611174826117a9565b90506000611180611d72565b90506111af61118e82611dc3565b60018501546040516303d9eb1f60e51b91610744918a918a916024016142d8565b5060006111ba6125b2565b905060006111c7846117b8565b60038111156111d8576111d86140af565b146111e557505050505050565b6111ee846118a6565b54610100900460ff1661120360018301612bdf565b1061121057505050505050565b61121984612be9565b60018401546040517f9c2bae1456357809a1c870e1e63679a1f7972f8b45dcc26b64338cd925c0857290600090a2505050505050565b6112576127fb565b6000611261611d72565b905061126d8183612c70565b60006112776125b2565b90506000611283611747565b90506000611290826117a9565b6040805160808101825291546001600160401b038082168452600160401b820481166020850152600160801b8204811692840192909252600160c01b900416606082015290506111356112e286612caf565b6001808501548451602086015160408701516060880151632326a19960e11b9561130d908c01611e96565b604051602401611322969594939291906140c5565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152869190620186a0612722565b60008061136e838686612438565b5495945050505050565b61139c60405180606001604052806000815260200160608152602001606081525090565b6113a7828585612438565b604051806060016040529081600082015481526020016001820180548060200260200160405190810160405280929190818152602001828054801561141557602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116113f7575b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561146d57602002820191906000526020600020905b815481526020019060010190808311611459575b50505050508152505090509392505050565b60006114896125b2565b546001600160a01b0316919050565b6000610644612530565b60006114af6109ee611747565b60020190506114be600161183f565b60006114c86126ba565b90506114d48282612284565b6114f157604051639ceae3db60e01b815260040160405180910390fd5b6114fb8282612cdd565b611503611747565b600101546040516001600160a01b038316907fd4e9073cc1c197d638f4da96c7cf415bc573b6f600ccba01627c416267d9dd3b90600090a35050565b600061154c6109ee611747565b6001600160a01b03909216600090815260089290920160205250604090205490565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a08101919091526115b06115ab611747565b6118a6565b6040805160c081018252825460ff808216835261010082041660208301526001600160401b03620100008204811693830193909352600160501b810483166060830152600160901b9004821660808201526001909201541660a0820152919050565b600061161f6109ee611747565b5460ff16919050565b6116306122a6565b6109d38787878787878761253a565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a08101919091526115b0611125611747565b606061064461168c6109ee611747565b600401611e96565b6116a060016002612cf0565b60006116ad6109ee611747565b600201905060006116bc6126ba565b90506116c88282612284565b156116e6576040516328f3e0eb60e11b815260040160405180910390fd5b6116f08282612d79565b6116f8611747565b600101546040516001600160a01b038316907fd30cd5d8ca68864f2e956b063eda9b0e91ca33e27b30e7d4cb121e0208e086f890600090a35050565b600061173e611747565b60010154905090565b60008060405160200161178b906020808252601f908201527f696f2e73796e7468657469782e676f7665726e616e63652e436f756e63696c00604082015260600190565b60408051601f19818403018152919052805160209091012092915050565b60006109fc8260010154612605565b6000806117c442612caf565b83549091506001600160401b03600160c01b9091048116908216106117ec5750600392915050565b82546001600160401b03600160801b9091048116908216106118115750600292915050565b82546001600160401b03600160401b9091048116908216106118365750600192915050565b50600092915050565b600061184f61062e610629611747565b9050816003811115611863576118636140af565b816003811115611875576118756140af565b1461189357604051632e20231560e21b815260040160405180910390fd5b5050565b60006109fc8260010154612d8c565b60006109fc826001015461219f565b60006109fc826001015460016118cb9190614327565b61219f565b815460ff166000036118ed578054825460ff191660ff9091161782555b8154610100900460ff16600003611918578054825461ff0019166101009182900460ff169091021782555b81546201000090046001600160401b0316600003611959578054825469ffffffffffffffff0000191662010000918290046001600160401b03169091021782555b8154600160501b90046001600160401b031660000361199d578054825467ffffffffffffffff60501b1916600160501b918290046001600160401b03169091021782555b8154600160901b90046001600160401b03166000036119e1578054825467ffffffffffffffff60901b1916600160901b918290046001600160401b03169091021782555b60018201546001600160401b0316600003611893576001908101549101805467ffffffffffffffff19166001600160401b03909216919091179055565b604080516080810182526000808252602082018190529181018290526060810182905290611a4b42612caf565b8354909150600090611a6c906201000090046001600160401b031683614129565b8454909150600090611a8e90600160901b90046001600160401b03168361433a565b8554909150600090611ab090600160501b90046001600160401b03168361433a565b604080516080810182526001600160401b039687168152918616602083015292851692810192909252509116606082015292915050565b816001600160401b0316816001600160401b031611611b335760405163f4137ffd60e01b8152600160048201526001600160401b03808316602483015283166044820152606401610aae565b826001600160401b0316826001600160401b031611611b7f5760405163f4137ffd60e01b8152600260048201526001600160401b03808416602483015284166044820152606401610aae565b836001600160401b0316836001600160401b031611611bcb5760405163f4137ffd60e01b8152600360048201526001600160401b03808516602483015285166044820152606401610aae565b6000611bd7858361433a565b90506000611be5848461433a565b90506000611bf3868661433a565b90506000611c00896118a6565b8054909150611c28906001600160401b03600160901b8204811691600160501b900416614129565b6001600160401b0316846001600160401b03161015611c9e5780546004908590611c6b906001600160401b03600160901b8204811691600160501b900416614129565b60405163f4137ffd60e01b815260048101939093526001600160401b039182166024840152166044820152606401610aae565b80546001600160401b03600160501b90910481169083161015611cf957805460405163f4137ffd60e01b8152600560048201526001600160401b038085166024830152600160501b9092049091166044820152606401610aae565b80546001600160401b03600160901b90910481169084161015610ddd57805460405163f4137ffd60e01b8152600660048201526001600160401b038086166024830152600160901b9092049091166044820152606401610aae565b60008160010160008154611d679061435a565b918290555092915050565b60008060405160200161178b9060208082526024908201527f696f2e73796e7468657469782e636f72652d6d6f64756c65732e43726f7373436040820152633430b4b760e11b606082015260800190565b6060600182016000611dd482611e96565b9050600081516001600160401b03811115611df157611df1613e07565b604051908082528060200260200182016040528015611e1a578160200160208202803683370190505b50905060005b8251811015611e8d576000611e4d848381518110611e4057611e40614373565b6020026020010151612caf565b905080838381518110611e6257611e62614373565b6001600160401b03909216602092830291909101909101525080611e858161435a565b915050611e20565b50949350505050565b60606000611ea383612dd6565b9392505050565b83546000906001600160a01b0316815b855181101561218b576000868281518110611ed757611ed7614373565b6020026020010151905046816001600160401b031603611f6857600080306001600160a01b031688604051611f0c91906143ad565b6000604051808303816000865af19150503d8060008114611f49576040519150601f19603f3d011682016040523d82523d6000602084013e611f4e565b606091505b509150915081611f615780518060208301fd5b5050612178565b6040805160a0810182523060c0808301919091528251808303909101815260e08201835281526020808201899052825160008082529181018452909282019083611fd4565b6040805180820190915260008082526020820152815260200190600190039081611fad5790505b508152600060208083018290526040805180820182528b815282019283528051602481018c905292511515604480850191909152815180850390910181526064909301815290820180516001600160e01b03166397a657c960e01b179052909101526001600160401b03808416600090815260038c0160205260408082205490516320487ded60e01b8152939450909116916001600160a01b038716906320487ded9061208790859087906004016143f5565b602060405180830381865afa1580156120a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120c891906144ce565b9050804710156120f4576040516320d0c54d60e21b815260048101829052476024820152604401610aae565b6040516396f4e9f960e01b81526001600160a01b038716906396f4e9f990839061212490869088906004016143f5565b60206040518083038185885af1158015612142573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061216791906144ce565b506121728188614327565b96505050505b50806121838161435a565b915050611eba565b5061219582612e32565b5050949350505050565b6040805160208101829052602860608201527f696f2e73796e7468657469782e676f7665726e616e63652e456c656374696f6e60808201526753657474696e677360c01b60a0820152908101829052600090819060c0015b60408051601f1981840301815291905280516020909101209392505050565b6000612220611747565b9050600061222d82611897565b9050600061223a836118a6565b90508360000361224a576101f493505b6000612257836006015490565b6001840154909150600061226b8783614327565b9050828111156122785750815b6109d385858484612eb4565b6001600160a01b03811660009081526001830160205260408120541515611ea3565b306122af6126ba565b6001600160a01b0316146122ea576122c56126ba565b60405163472511eb60e11b81526001600160a01b039091166004820152602401610aae565b565b80600081900361230f57604051633941064160e21b815260040160405180910390fd5b600061231c6109ee611747565b600201905060005b828110156109d657600085858381811061234057612340614373565b90506020020160208101906123559190613aaf565b90506123618382612284565b61237e57604051639ceae3db60e01b815260040160405180910390fd5b6123896001856144e7565b82101561242557600061239d836001614327565b90505b848110156124235760008787838181106123bc576123bc614373565b90506020020160208101906123d19190613aaf565b9050806001600160a01b0316836001600160a01b0316036124105760405163ba156e7b60e01b81526001600160a01b0384166004820152602401610aae565b508061241b8161435a565b9150506123a0565b505b50806124308161435a565b915050612324565b6040805160806020808301829052601e60a08401527f696f2e73796e7468657469782e676f7665726e616e63652e42616c6c6f74000060c080850191909152838501979097526001600160a01b039590951660608301528101929092528051808303909401845260e09091019052815191012090565b6124b781612f00565b6124d457604051637611594360e01b815260040160405180910390fd5b50565b6000818152600183016020526040902054156125065760405163682ad32d60e01b815260040160405180910390fd5b81546001818101845560008481526020808220909301849055845493815293019052604090912055565b600061161f611747565b6000612544611747565b600181018054908a9055909150600061255c8a612605565b905061256b818a8a8a8a612650565b61257482612fae565b610f978585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508e9250612ffb915050565b60008060405160200161178b9060208082526026908201527f696f2e73796e7468657469782e676f7665726e616e63652e436f756e63696c4d604082015265656d6265727360d01b606082015260800190565b6040805160208101829052601d60608201527f696f2e73796e7468657469782e676f7665726e616e63652e45706f63680000006080820152908101829052600090819060a0016121f7565b84546001600160401b039485166fffffffffffffffffffffffffffffffff1990911617600160401b93851693909302929092176fffffffffffffffffffffffffffffffff16600160801b918416919091026001600160c01b031617600160c01b9190921602179055565b600073ae788aaf52780741e12bf79ad684b91bb0ef4d92331480156126e0575060143610155b156126f2575060131936013560601c90565b503390565b6000611ea361271d61270a846001614129565b60018601906001600160401b031661306c565b612caf565b60408051600180825281830190925260009182919060208083019080368337019050509050848160008151811061275b5761275b614373565b60200260200101906001600160401b031690816001600160401b03168152505061278786828686611eaa565b9695505050505050565b815160008190036127b55760405163521299a960e01b815260040160405180910390fd5b60005b818110156127f5576127e38482815181106127d5576127d5614373565b60200260200101518461307e565b806127ed8161435a565b9150506127b8565b50505050565b612803613185565b6001600160a01b0316336001600160a01b0316146122ea5760405163472511eb60e11b8152336004820152602401610aae565b865460ff87811661ffff1990921691909117610100918716919091021771ffffffffffffffffffffffffffffffff00001916620100006001600160401b038681169190910267ffffffffffffffff60501b191691909117600160501b858316021767ffffffffffffffff60901b1916600160901b8483160217885560018801805467ffffffffffffffff19169183169190911790556128d48761318f565b865460018801546040805160ff808516825261010085041660208201526001600160401b03620100008504811692820192909252600160501b840482166060820152600160901b909304811660808401521660a08201527f305a7d62fbe09738c7ca033adf1a2c319e92a17f32b54b711dd3e865795f239a9060c00160405180910390a150505050505050565b600061296c856118a6565b905061297881856118d0565b600061298342612caf565b85549091506000906129a4906201000090046001600160401b031683614129565b86549091506000906129c690600160901b90046001600160401b03168361433a565b9050846001600160401b03166000036129f85786546129f590600160501b90046001600160401b03168261433a565b94505b6000612a03896117a9565b9050612a138982868986886132b2565b612a1e876000612ffb565b885460ff191660011789556040517fedd2375ae1196fe91e924096f373e5d416893b6da334911ea52c9dd02ec2a0cb90600090a16040516000907f968139de8ea4f6dca3f75fdde04ee69529bde77210bb1cc0b58e954fd3d9b619908290a2505050505050505050565b6000612a93846118a6565b60018101546060840151825486549394506001600160401b0392831693612acc93612ac79262010000900481169116614129565b6132cc565b6001600160401b03161180612b1157506001810154602083015184546001600160401b0392831692612b069291600160401b9004166132cc565b6001600160401b0316115b80612b4c57506001810154604083015184546001600160401b0392831692612b419291600160801b9004166132cc565b6001600160401b0316115b15612b7b5760405163f4137ffd60e01b8152600760048201526000602482018190526044820152606401610aae565b8254602083015160408401516060850151612ba59388936001600160401b03909116929091611ae7565b6000612bb083613300565b6003811115612bc157612bc16140af565b146127f557604051636af1cb2160e01b815260040160405180910390fd5b60006109fc825490565b6000612bf4826117a9565b90506000612c01836118a6565b90506000612c0e42612caf565b8254909150600090612c3090600160501b90046001600160401b031683614129565b8354909150600090612c5290600160901b90046001600160401b031683614129565b855490915061113590879087906001600160401b03168686866132b2565b612c7d6001830182613380565b61189357612c8a81612caf565b60405163900d29db60e01b81526001600160401b039091166004820152602401610aae565b60006001600160401b03821115612cd9576040516372b1c34f60e01b815260040160405180910390fd5b5090565b611893826001600160a01b038316613398565b6000612d0061062e610629611747565b9050826003811115612d1457612d146140af565b816003811115612d2657612d266140af565b14158015612d565750816003811115612d4157612d416140af565b816003811115612d5357612d536140af565b14155b15612d7457604051632e20231560e21b815260040160405180910390fd5b505050565b611893826001600160a01b0383166124d7565b60408051602080820183905260608201527f696f2e73796e7468657469782e676f7665726e616e63652e456c656374696f6e6080820152908101829052600090819060a0016121f7565b606081600001805480602002602001604051908101604052809291908181526020018280548015612e2657602002820191906000526020600020905b815481526020019060010190808311612e12575b50505050509050919050565b6000612e3e82346144e7565b9050600080612e4b6126ba565b6001600160a01b03168360405160006040518083038185875af1925050503d8060008114612e95576040519150601f19603f3d011682016040523d82523d6000602084013e612e9a565b606091505b509150915081612ead5780518060208301fd5b5050919050565b825460ff16825b82811015611135576000612edd612ed3836001614327565b6006890190613497565b905080612eeb8882866134fc565b50508080612ef89061435a565b915050612ebb565b6002810154600182015460009114612f1a57506000919050565b6000805b6001840154811015612f9a57836002018181548110612f3f57612f3f614373565b9060005260206000200154600003612f5b575060009392505050565b836002018181548110612f7057612f70614373565b906000526020600020015482612f869190614327565b915080612f928161435a565b915050612f1e565b50801580611ea35750825481149392505050565b6000612fb86125b2565b60010190506000612fc882612bdf565b905060005b818110156127f557612fe9612fe384600161306c565b8561307e565b80612ff38161435a565b915050612fcd565b8151600081900361301f5760405163521299a960e01b815260040160405180910390fd5b60006130296125b2565b905060005b828110156109d65761305a8286838151811061304c5761304c614373565b6020026020010151866135dd565b806130648161435a565b91505061302e565b6000611ea361307b8484613497565b90565b60006130886125b2565b9050600181016130988185612284565b6130b55760405163051b79b960e31b815260040160405180910390fd5b6130bf8185612cdd565b6001600160a01b0384166130e96130e46b31b7bab731b4b62a37b5b2b760a11b6136d9565b613737565b6001600160a01b03166342966c68826040518263ffffffff1660e01b815260040161311691815260200190565b600060405180830381600087803b15801561313057600080fd5b505af1158015613144573d6000803e3d6000fd5b50506040518692506001600160a01b03881691507f208c29b08f363039c7c656b8f572656a2489f862113410d36201aa340657f1b490600090a35050505050565b600061148961375a565b805460ff1615806131a757508054610100900460ff16155b806131bd5750805460ff80821661010090920416115b806131d6575080546201000090046001600160401b0316155b806131f057508054600160501b90046001600160401b0316155b8061320a57508054600160901b90046001600160401b0316155b8061322d5750613219816137aa565b8154600160501b90046001600160401b0316105b80613250575061323c816137aa565b8154600160901b90046001600160401b0316105b806132945750805461327b906001600160401b03600160901b8204811691600160501b900416614129565b81546001600160401b0391821662010000909104909116105b156124d457604051630a21d9ed60e31b815260040160405180910390fd5b6132bf8685858585611ae7565b6111358585858585612650565b6000816001600160401b0316836001600160401b0316116132f6576132f1838361433a565b611ea3565b611ea3828461433a565b60008061330c42612caf565b905082606001516001600160401b0316816001600160401b0316106133345750600392915050565b82604001516001600160401b0316816001600160401b03161061335a5750600292915050565b82602001516001600160401b0316816001600160401b0316106118365750600192915050565b60008181526001830160205260408120541515611ea3565b6000818152600183016020526040812054908190036133ca5760405163b3dbc29360e01b815260040160405180910390fd5b60006133d76001836144e7565b84549091506000906133eb906001906144e7565b905080821461345057600085600001828154811061340b5761340b614373565b906000526020600020015490508086600001848154811061342e5761342e614373565b6000918252602080832090910192909255918252600187019052604090208390555b8454859080613461576134616144fa565b60019003818190600052602060002001600090559055846001016000858152602001908152602001600020600090555050505050565b60008115806134a65750825482115b156134c45760405163eb9bc44760e01b815260040160405180910390fd5b60006134d16001846144e7565b90508360000181815481106134e8576134e8614373565b906000526020600020015491505092915050565b600182015460005b818110156135bc57600084600101828154811061352357613523614373565b60009182526020808320909101546001600160a01b03168083526008890190915260408220546002880180549294509092918590811061356557613565614373565b90600052602060002001548261357b9190614327565b6001600160a01b038416600090815260088a016020526040902081905590506135a6888483896137d7565b50505080806135b49061435a565b915050613504565b5060018460010160008282546135d29190614327565b909155505050505050565b600183016135eb8184612284565b15613609576040516348ac2ca160e11b815260040160405180910390fd5b6136138184612d79565b6001600160a01b0383166136386130e46b31b7bab731b4b62a37b5b2b760a11b6136d9565b6040516340c10f1960e01b81526001600160a01b0386811660048301526024820184905291909116906340c10f1990604401600060405180830381600087803b15801561368457600080fd5b505af1158015613698573d6000803e3d6000fd5b50506040518592506001600160a01b03871691507fe5b0ed13a85f5d5ab0d550273eaa6af99d84021d0ed22940dcc8835afc4243e890600090a35050505050565b6040805160208101829052602a60608201527f696f2e73796e7468657469782e636f72652d6d6f64756c65732e4173736f63696080820152696174656453797374656d60b01b60a0820152908101829052600090819060c0016121f7565b600061374c826565726337323160d01b613834565b50546001600160a01b031690565b60008060405160200161178b9060208082526023908201527f696f2e73796e7468657469782e636f72652d636f6e7472616374732e4f776e61604082015262626c6560e81b606082015260800190565b60018101546000906137c8906001600160401b031662015180614129565b6001600160401b031692915050565b600484016137e58185612284565b156137f057506127f5565b816137fa82612bdf565b10156138105761380a8185612d79565b506127f5565b60008061381d878461387c565b91509150808511156109d3576109d38383886138f5565b60028201548181148015906138555750681d5b9b585b9859d95960ba1b8114155b15612d745760405162d5319f60e31b81526004810183905260248101829052604401610aae565b60006000198161388b84612bdf565b905060015b818160ff16116138eb5760006138a98660ff841661306c565b6001600160a01b0381166000908152600889016020526040902054909150848110156138d6578094508195505b505080806138e390614510565b915050613890565b50505b9250929050565b612d74836001600160a01b0384166001600160a01b038416600082815260018401602052604090205461393b5760405163b3dbc29360e01b815260040160405180910390fd5b60008181526001840160205260409020541561396a5760405163682ad32d60e01b815260040160405180910390fd5b6000828152600180850160205260408220805490839055919061398d90836144e7565b9050828560000182815481106139a5576139a5614373565b600091825260208083209091019290925593845260019095019094526040909120555050565b828054828255906000526020600020908101928215613a1e579160200282015b82811115613a1e5781546001600160a01b0319166001600160a01b038435161782556020909201916001909101906139eb565b50612cd9929150613a65565b828054828255906000526020600020908101928215613a1e579160200282015b82811115613a1e578235825591602001919060010190613a4a565b5b80821115612cd95760008155600101613a66565b600060208284031215613a8c57600080fd5b5035919050565b80356001600160a01b0381168114613aaa57600080fd5b919050565b600060208284031215613ac157600080fd5b611ea382613a93565b60008083601f840112613adc57600080fd5b5081356001600160401b03811115613af357600080fd5b6020830191508360208260051b85010111156138ee57600080fd5b60008060008060008060008060c0898b031215613b2a57600080fd5b88359750613b3a60208a01613a93565b9650604089013595506060890135945060808901356001600160401b0380821115613b6457600080fd5b613b708c838d01613aca565b909650945060a08b0135915080821115613b8957600080fd5b50613b968b828c01613aca565b999c989b5096995094979396929594505050565b60008060408385031215613bbd57600080fd5b613bc683613a93565b946020939093013593505050565b80356001600160401b0381168114613aaa57600080fd5b600080600080600080600060c0888a031215613c0657600080fd5b87359650613c1660208901613bd4565b9550613c2460408901613bd4565b9450613c3260608901613bd4565b9350613c4060808901613bd4565b925060a08801356001600160401b03811115613c5b57600080fd5b613c678a828b01613aca565b989b979a50959850939692959293505050565b600081518084526020808501945080840160005b83811015613cb35781516001600160a01b031687529582019590820190600101613c8e565b509495945050505050565b602081526000611ea36020830184613c7a565b60008060008060808587031215613ce757600080fd5b84359350613cf760208601613bd4565b9250613d0560408601613bd4565b9150613d1360608601613bd4565b905092959194509250565b60008060008060408587031215613d3457600080fd5b84356001600160401b0380821115613d4b57600080fd5b613d5788838901613aca565b90965094506020870135915080821115613d7057600080fd5b50613d7d87828801613aca565b95989497509550505050565b600080600060408486031215613d9e57600080fd5b83356001600160401b03811115613db457600080fd5b613dc086828701613aca565b909790965060209590950135949350505050565b600080600060608486031215613de957600080fd5b613df284613a93565b95602085013595506040909401359392505050565b634e487b7160e01b600052604160045260246000fd5b803560ff81168114613aaa57600080fd5b60008060008060008060c08789031215613e4757600080fd5b86356001600160401b0380821115613e5e57600080fd5b818901915089601f830112613e7257600080fd5b8135602082821115613e8657613e86613e07565b8160051b604051601f19603f83011681018181108682111715613eab57613eab613e07565b60405292835281830193508481018201928d841115613ec957600080fd5b948201945b83861015613eee57613edf86613a93565b85529482019493820193613ece565b9a50613efd90508b8201613e1d565b985050505050613f0f60408801613bd4565b9350613f1d60608801613bd4565b9250613f2b60808801613bd4565b9150613f3960a08801613bd4565b90509295509295509295565b600080600060608486031215613f5a57600080fd5b613f6384613bd4565b9250613f7160208501613bd4565b9150613f7f60408501613bd4565b90509250925092565b60008060008060008060c08789031215613fa157600080fd5b613faa87613e1d565b9550613fb860208801613e1d565b9450613f0f60408801613bd4565b60008060208385031215613fd957600080fd5b82356001600160401b03811115613fef57600080fd5b613ffb85828601613aca565b90969095509350505050565b6020808252825182820152828101516060604084015280516080840181905260009291820190839060a08601905b8083101561405e5783516001600160a01b03168252928401926001929092019190840190614035565b506040870151868203601f190160608801528051808352908501935090840191506000905b808210156140a35783518352928401929184019160019190910190614083565b50909695505050505050565b634e487b7160e01b600052602160045260246000fd5b86815260006001600160401b0380881660208401528087166040840152808616606084015280851660808401525060c060a083015261410760c0830184613c7a565b98975050505050505050565b634e487b7160e01b600052601160045260246000fd5b6001600160401b0381811683821601908082111561414957614149614113565b5092915050565b60408152600061417a60408301600a81526963616e6469646174657360b01b602082015260400190565b8281036020938401526013815272746f6f206d616e792063616e6469646174657360681b928101929092525060400190565b6040815260006141d660408301600a81526963616e6469646174657360b01b602082015260400190565b828103602093840152601981527f6c656e677468206d757374206d6174636820616d6f756e747300000000000000928101929092525060400190565b8183526000602080850194508260005b85811015613cb3576001600160a01b0361423b83613a93565b1687529582019590820190600101614222565b838152604060208201526000610c58604083018486614212565b88815260018060a01b038816602082015286604082015285606082015260c06080820152600061429c60c083018688614212565b82810360a08401528381526001600160fb1b038411156142bb57600080fd5b8360051b80866020840137016020019a9950505050505050505050565b6040815260006142ec604083018587614212565b9050826020830152949350505050565b6001600160401b0381811683821602808216919082811461431f5761431f614113565b505092915050565b808201808211156109fc576109fc614113565b6001600160401b0382811682821603908082111561414957614149614113565b60006001820161436c5761436c614113565b5060010190565b634e487b7160e01b600052603260045260246000fd5b60005b838110156143a457818101518382015260200161438c565b50506000910152565b600082516143bf818460208701614389565b9190910192915050565b600081518084526143e1816020860160208601614389565b601f01601f19169290920160200192915050565b600060406001600160401b038516835260208181850152845160a08386015261442160e08601826143c9565b905081860151603f198087840301606088015261443e83836143c9565b88860151888203830160808a01528051808352908601945060009350908501905b8084101561449157845180516001600160a01b031683528601518683015293850193600193909301929086019061445f565b5060608901516001600160a01b031660a08901526080890151888203830160c08a015295506144c081876143c9565b9a9950505050505050505050565b6000602082840312156144e057600080fd5b5051919050565b818103818111156109fc576109fc614113565b634e487b7160e01b600052603160045260246000fd5b600060ff821660ff810361452657614526614113565b6001019291505056fea2646970667358221220904f525fa64f446a7dfc7bf076693a29ec93e5dbecb91e3911ad02d1ccad55f564736f6c63430008110033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/governance/subgraph/abis/ElectionModuleOld.json b/governance/subgraph/abis/ElectionModuleOld.json deleted file mode 100644 index 6861c94f9..000000000 --- a/governance/subgraph/abis/ElectionModuleOld.json +++ /dev/null @@ -1,1905 +0,0 @@ -{ - "abi": [ - { - "inputs": [], - "name": "AlreadyACouncilMember", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyNominated", - "type": "error" - }, - { - "inputs": [], - "name": "ChangesCurrentPeriod", - "type": "error" - }, - { - "inputs": [], - "name": "DuplicateCandidates", - "type": "error" - }, - { - "inputs": [], - "name": "ElectionAlreadyEvaluated", - "type": "error" - }, - { - "inputs": [], - "name": "ElectionNotEvaluated", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidElectionSettings", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidEpochConfiguration", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidMinimumActiveMembers", - "type": "error" - }, - { - "inputs": [], - "name": "NoCandidates", - "type": "error" - }, - { - "inputs": [], - "name": "NoVotePower", - "type": "error" - }, - { - "inputs": [], - "name": "NotACouncilMember", - "type": "error" - }, - { - "inputs": [], - "name": "NotCallableInCurrentPeriod", - "type": "error" - }, - { - "inputs": [], - "name": "NotNominated", - "type": "error" - }, - { - "inputs": [], - "name": "VoteNotCasted", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "candidate", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "CandidateNominated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "member", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "CouncilMemberAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "member", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "CouncilMemberRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address[]", - "name": "members", - "type": "address[]" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "CouncilMembersDismissed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "proxy", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "CouncilTokenCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "CouncilTokenUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "size", - "type": "uint256" - } - ], - "name": "DefaultBallotEvaluationBatchSizeChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "evaluatedBallots", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBallots", - "type": "uint256" - } - ], - "name": "ElectionBatchEvaluated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBallots", - "type": "uint256" - } - ], - "name": "ElectionEvaluated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "ElectionModuleInitialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "EmergencyElectionStarted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "nominationPeriodStartDate", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "votingPeriodStartDate", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "epochEndDate", - "type": "uint64" - } - ], - "name": "EpochScheduleUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "EpochStarted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "tolerance", - "type": "uint64" - } - ], - "name": "MaxDateAdjustmentToleranceChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "minimumActiveMembers", - "type": "uint8" - } - ], - "name": "MinimumActiveMembersChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "minNominationPeriodDuration", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "minVotingPeriodDuration", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "minEpochDuration", - "type": "uint64" - } - ], - "name": "MinimumEpochDurationsChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "seatCount", - "type": "uint8" - } - ], - "name": "NextEpochSeatCountChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "candidate", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "NominationWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "ballotId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "votePower", - "type": "uint256" - } - ], - "name": "VoteRecorded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "ballotId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "votePower", - "type": "uint256" - } - ], - "name": "VoteWithdrawn", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "ballotId", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "getBallotCandidatesInEpoch", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "getBallotVotedAtEpoch", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "ballotId", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "getBallotVotesInEpoch", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "candidate", - "type": "address" - }, - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "getCandidateVotesInEpoch", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "getElectionWinnersInEpoch", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "getEpochEndDateForIndex", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "getEpochStartDateForIndex", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "getNominationPeriodStartDateForIndex", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "getNomineesAtEpoch", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "getVotingPeriodStartDateForIndex", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "hasVotedInEpoch", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "candidate", - "type": "address" - }, - { - "internalType": "uint256", - "name": "epochIndex", - "type": "uint256" - } - ], - "name": "wasNominated", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "AlreadyInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "CrossChainDebtShareAlreadyDeclared", - "type": "error" - }, - { - "inputs": [], - "name": "DebtShareContractNotSet", - "type": "error" - }, - { - "inputs": [], - "name": "DebtShareSnapshotIdNotSet", - "type": "error" - }, - { - "inputs": [], - "name": "EmptyArray", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidMerkleProof", - "type": "error" - }, - { - "inputs": [], - "name": "MerkleRootNotSet", - "type": "error" - }, - { - "inputs": [], - "name": "NoChange", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "contr", - "type": "address" - } - ], - "name": "NotAContract", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitialized", - "type": "error" - }, - { - "inputs": [], - "name": "PositionOutOfBounds", - "type": "error" - }, - { - "inputs": [], - "name": "TooManyCandidates", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - } - ], - "name": "Unauthorized", - "type": "error" - }, - { - "inputs": [], - "name": "ValueAlreadyInSet", - "type": "error" - }, - { - "inputs": [], - "name": "ValueNotInSet", - "type": "error" - }, - { - "inputs": [], - "name": "WrongInitializer", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroAddress", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "debtShare", - "type": "uint256" - } - ], - "name": "CrossChainDebtShareDeclared", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "merkleRoot", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "blocknumber", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "epoch", - "type": "uint256" - } - ], - "name": "CrossChainDebtShareMerkleRootSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "contractAddress", - "type": "address" - } - ], - "name": "DebtShareContractSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "snapshotId", - "type": "uint128" - } - ], - "name": "DebtShareSnapshotIdSet", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "candidates", - "type": "address[]" - } - ], - "name": "calculateBallotId", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "candidates", - "type": "address[]" - } - ], - "name": "cast", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "debtShare", - "type": "uint256" - }, - { - "internalType": "bytes32[]", - "name": "merkleProof", - "type": "bytes32[]" - }, - { - "internalType": "address[]", - "name": "candidates", - "type": "address[]" - } - ], - "name": "declareAndCast", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "uint256", - "name": "debtShare", - "type": "uint256" - }, - { - "internalType": "bytes32[]", - "name": "merkleProof", - "type": "bytes32[]" - } - ], - "name": "declareCrossChainDebtShare", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "membersToDismiss", - "type": "address[]" - } - ], - "name": "dismissMembers", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "numBallots", - "type": "uint256" - } - ], - "name": "evaluate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "ballotId", - "type": "bytes32" - } - ], - "name": "getBallotCandidates", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "getBallotVoted", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "ballotId", - "type": "bytes32" - } - ], - "name": "getBallotVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "candidate", - "type": "address" - } - ], - "name": "getCandidateVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getCouncilMembers", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getCouncilToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getCrossChainDebtShareMerkleRoot", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getCrossChainDebtShareMerkleRootBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getCurrentPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "getDebtShare", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getDebtShareContract", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getDebtShareSnapshotId", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "getDeclaredCrossChainDebtShare", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getDefaultBallotEvaluationBatchSize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getElectionWinners", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getEpochEndDate", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getEpochIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getEpochStartDate", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getMaxDateAdjustmenTolerance", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getMinEpochDurations", - "outputs": [ - { - "internalType": "uint64", - "name": "minNominationPeriodDuration", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "minVotingPeriodDuration", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "minEpochDuration", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getMinimumActiveMembers", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getNextEpochSeatCount", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getNominationPeriodStartDate", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getNominees", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "getVotePower", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getVotingPeriodStartDate", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "hasVoted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "councilTokenName", - "type": "string" - }, - { - "internalType": "string", - "name": "councilTokenSymbol", - "type": "string" - }, - { - "internalType": "address[]", - "name": "firstCouncil", - "type": "address[]" - }, - { - "internalType": "uint8", - "name": "minimumActiveMembers", - "type": "uint8" - }, - { - "internalType": "uint64", - "name": "nominationPeriodStartDate", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "votingPeriodStartDate", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "epochEndDate", - "type": "uint64" - }, - { - "internalType": "address", - "name": "debtShareContract", - "type": "address" - } - ], - "name": "initializeElectionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - }, - { - "internalType": "string", - "name": "", - "type": "string" - }, - { - "internalType": "address[]", - "name": "", - "type": "address[]" - }, - { - "internalType": "uint8", - "name": "", - "type": "uint8" - }, - { - "internalType": "uint64", - "name": "", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "name": "initializeElectionModule", - "outputs": [], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isElectionEvaluated", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isElectionModuleInitialized", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "candidate", - "type": "address" - } - ], - "name": "isNominated", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "newNominationPeriodStartDate", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "newVotingPeriodStartDate", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "newEpochEndDate", - "type": "uint64" - } - ], - "name": "modifyEpochSchedule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "nominate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "resolve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "merkleRoot", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "blocknumber", - "type": "uint256" - } - ], - "name": "setCrossChainDebtShareMerkleRoot", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "debtShareContract", - "type": "address" - } - ], - "name": "setDebtShareContract", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "snapshotId", - "type": "uint128" - } - ], - "name": "setDebtShareSnapshotId", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newDefaultBallotEvaluationBatchSize", - "type": "uint256" - } - ], - "name": "setDefaultBallotEvaluationBatchSize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "newMaxDateAdjustmentTolerance", - "type": "uint64" - } - ], - "name": "setMaxDateAdjustmentTolerance", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "newMinNominationPeriodDuration", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "newMinVotingPeriodDuration", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "newMinEpochDuration", - "type": "uint64" - } - ], - "name": "setMinEpochDurations", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "newMinimumActiveMembers", - "type": "uint8" - } - ], - "name": "setMinimumActiveMembers", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "newSeatCount", - "type": "uint8" - } - ], - "name": "setNextEpochSeatCount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "newNominationPeriodStartDate", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "newVotingPeriodStartDate", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "newEpochEndDate", - "type": "uint64" - } - ], - "name": "tweakEpochSchedule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newCouncilTokenImplementation", - "type": "address" - } - ], - "name": "upgradeCouncilToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "withdrawNomination", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "withdrawVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldOwner", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnerChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnerNominated", - "type": "event" - }, - { - "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "initialOwner", - "type": "address" - } - ], - "name": "initializeOwnerModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "isOwnerModuleInitialized", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newNominatedOwner", - "type": "address" - } - ], - "name": "nominateNewOwner", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "nominatedOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceNomination", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "ImplementationIsSterile", - "type": "error" - }, - { - "inputs": [], - "name": "UpgradeSimulationFailed", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [], - "name": "getImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "simulateUpgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ] -} diff --git a/governance/subgraph/generated/Ambassador-Old/ElectionModuleOld.ts b/governance/subgraph/generated/Ambassador-Old/ElectionModuleOld.ts deleted file mode 100644 index ff16bb4f7..000000000 --- a/governance/subgraph/generated/Ambassador-Old/ElectionModuleOld.ts +++ /dev/null @@ -1,2613 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class CandidateNominated extends ethereum.Event { - get params(): CandidateNominated__Params { - return new CandidateNominated__Params(this); - } -} - -export class CandidateNominated__Params { - _event: CandidateNominated; - - constructor(event: CandidateNominated) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberAdded extends ethereum.Event { - get params(): CouncilMemberAdded__Params { - return new CouncilMemberAdded__Params(this); - } -} - -export class CouncilMemberAdded__Params { - _event: CouncilMemberAdded; - - constructor(event: CouncilMemberAdded) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberRemoved extends ethereum.Event { - get params(): CouncilMemberRemoved__Params { - return new CouncilMemberRemoved__Params(this); - } -} - -export class CouncilMemberRemoved__Params { - _event: CouncilMemberRemoved; - - constructor(event: CouncilMemberRemoved) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMembersDismissed extends ethereum.Event { - get params(): CouncilMembersDismissed__Params { - return new CouncilMembersDismissed__Params(this); - } -} - -export class CouncilMembersDismissed__Params { - _event: CouncilMembersDismissed; - - constructor(event: CouncilMembersDismissed) { - this._event = event; - } - - get members(): Array
{ - return this._event.parameters[0].value.toAddressArray(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilTokenCreated extends ethereum.Event { - get params(): CouncilTokenCreated__Params { - return new CouncilTokenCreated__Params(this); - } -} - -export class CouncilTokenCreated__Params { - _event: CouncilTokenCreated; - - constructor(event: CouncilTokenCreated) { - this._event = event; - } - - get proxy(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get implementation(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class CouncilTokenUpgraded extends ethereum.Event { - get params(): CouncilTokenUpgraded__Params { - return new CouncilTokenUpgraded__Params(this); - } -} - -export class CouncilTokenUpgraded__Params { - _event: CouncilTokenUpgraded; - - constructor(event: CouncilTokenUpgraded) { - this._event = event; - } - - get newImplementation(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class DefaultBallotEvaluationBatchSizeChanged extends ethereum.Event { - get params(): DefaultBallotEvaluationBatchSizeChanged__Params { - return new DefaultBallotEvaluationBatchSizeChanged__Params(this); - } -} - -export class DefaultBallotEvaluationBatchSizeChanged__Params { - _event: DefaultBallotEvaluationBatchSizeChanged; - - constructor(event: DefaultBallotEvaluationBatchSizeChanged) { - this._event = event; - } - - get size(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class ElectionBatchEvaluated extends ethereum.Event { - get params(): ElectionBatchEvaluated__Params { - return new ElectionBatchEvaluated__Params(this); - } -} - -export class ElectionBatchEvaluated__Params { - _event: ElectionBatchEvaluated; - - constructor(event: ElectionBatchEvaluated) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get evaluatedBallots(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get totalBallots(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class ElectionEvaluated extends ethereum.Event { - get params(): ElectionEvaluated__Params { - return new ElectionEvaluated__Params(this); - } -} - -export class ElectionEvaluated__Params { - _event: ElectionEvaluated; - - constructor(event: ElectionEvaluated) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get totalBallots(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class ElectionModuleInitialized extends ethereum.Event { - get params(): ElectionModuleInitialized__Params { - return new ElectionModuleInitialized__Params(this); - } -} - -export class ElectionModuleInitialized__Params { - _event: ElectionModuleInitialized; - - constructor(event: ElectionModuleInitialized) { - this._event = event; - } -} - -export class EmergencyElectionStarted extends ethereum.Event { - get params(): EmergencyElectionStarted__Params { - return new EmergencyElectionStarted__Params(this); - } -} - -export class EmergencyElectionStarted__Params { - _event: EmergencyElectionStarted; - - constructor(event: EmergencyElectionStarted) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class EpochScheduleUpdated extends ethereum.Event { - get params(): EpochScheduleUpdated__Params { - return new EpochScheduleUpdated__Params(this); - } -} - -export class EpochScheduleUpdated__Params { - _event: EpochScheduleUpdated; - - constructor(event: EpochScheduleUpdated) { - this._event = event; - } - - get nominationPeriodStartDate(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class EpochStarted extends ethereum.Event { - get params(): EpochStarted__Params { - return new EpochStarted__Params(this); - } -} - -export class EpochStarted__Params { - _event: EpochStarted; - - constructor(event: EpochStarted) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class MaxDateAdjustmentToleranceChanged extends ethereum.Event { - get params(): MaxDateAdjustmentToleranceChanged__Params { - return new MaxDateAdjustmentToleranceChanged__Params(this); - } -} - -export class MaxDateAdjustmentToleranceChanged__Params { - _event: MaxDateAdjustmentToleranceChanged; - - constructor(event: MaxDateAdjustmentToleranceChanged) { - this._event = event; - } - - get tolerance(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class MinimumActiveMembersChanged extends ethereum.Event { - get params(): MinimumActiveMembersChanged__Params { - return new MinimumActiveMembersChanged__Params(this); - } -} - -export class MinimumActiveMembersChanged__Params { - _event: MinimumActiveMembersChanged; - - constructor(event: MinimumActiveMembersChanged) { - this._event = event; - } - - get minimumActiveMembers(): i32 { - return this._event.parameters[0].value.toI32(); - } -} - -export class MinimumEpochDurationsChanged extends ethereum.Event { - get params(): MinimumEpochDurationsChanged__Params { - return new MinimumEpochDurationsChanged__Params(this); - } -} - -export class MinimumEpochDurationsChanged__Params { - _event: MinimumEpochDurationsChanged; - - constructor(event: MinimumEpochDurationsChanged) { - this._event = event; - } - - get minNominationPeriodDuration(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get minVotingPeriodDuration(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get minEpochDuration(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class NextEpochSeatCountChanged extends ethereum.Event { - get params(): NextEpochSeatCountChanged__Params { - return new NextEpochSeatCountChanged__Params(this); - } -} - -export class NextEpochSeatCountChanged__Params { - _event: NextEpochSeatCountChanged; - - constructor(event: NextEpochSeatCountChanged) { - this._event = event; - } - - get seatCount(): i32 { - return this._event.parameters[0].value.toI32(); - } -} - -export class NominationWithdrawn extends ethereum.Event { - get params(): NominationWithdrawn__Params { - return new NominationWithdrawn__Params(this); - } -} - -export class NominationWithdrawn__Params { - _event: NominationWithdrawn; - - constructor(event: NominationWithdrawn) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class VoteRecorded extends ethereum.Event { - get params(): VoteRecorded__Params { - return new VoteRecorded__Params(this); - } -} - -export class VoteRecorded__Params { - _event: VoteRecorded; - - constructor(event: VoteRecorded) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get ballotId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } - - get epochIndex(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get votePower(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class VoteWithdrawn extends ethereum.Event { - get params(): VoteWithdrawn__Params { - return new VoteWithdrawn__Params(this); - } -} - -export class VoteWithdrawn__Params { - _event: VoteWithdrawn; - - constructor(event: VoteWithdrawn) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get ballotId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } - - get epochIndex(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get votePower(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class CrossChainDebtShareDeclared extends ethereum.Event { - get params(): CrossChainDebtShareDeclared__Params { - return new CrossChainDebtShareDeclared__Params(this); - } -} - -export class CrossChainDebtShareDeclared__Params { - _event: CrossChainDebtShareDeclared; - - constructor(event: CrossChainDebtShareDeclared) { - this._event = event; - } - - get user(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get debtShare(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CrossChainDebtShareMerkleRootSet extends ethereum.Event { - get params(): CrossChainDebtShareMerkleRootSet__Params { - return new CrossChainDebtShareMerkleRootSet__Params(this); - } -} - -export class CrossChainDebtShareMerkleRootSet__Params { - _event: CrossChainDebtShareMerkleRootSet; - - constructor(event: CrossChainDebtShareMerkleRootSet) { - this._event = event; - } - - get merkleRoot(): Bytes { - return this._event.parameters[0].value.toBytes(); - } - - get blocknumber(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epoch(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class DebtShareContractSet extends ethereum.Event { - get params(): DebtShareContractSet__Params { - return new DebtShareContractSet__Params(this); - } -} - -export class DebtShareContractSet__Params { - _event: DebtShareContractSet; - - constructor(event: DebtShareContractSet) { - this._event = event; - } - - get contractAddress(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class DebtShareSnapshotIdSet extends ethereum.Event { - get params(): DebtShareSnapshotIdSet__Params { - return new DebtShareSnapshotIdSet__Params(this); - } -} - -export class DebtShareSnapshotIdSet__Params { - _event: DebtShareSnapshotIdSet; - - constructor(event: DebtShareSnapshotIdSet) { - this._event = event; - } - - get snapshotId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class OwnerChanged extends ethereum.Event { - get params(): OwnerChanged__Params { - return new OwnerChanged__Params(this); - } -} - -export class OwnerChanged__Params { - _event: OwnerChanged; - - constructor(event: OwnerChanged) { - this._event = event; - } - - get oldOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get newOwner(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class OwnerNominated extends ethereum.Event { - get params(): OwnerNominated__Params { - return new OwnerNominated__Params(this); - } -} - -export class OwnerNominated__Params { - _event: OwnerNominated; - - constructor(event: OwnerNominated) { - this._event = event; - } - - get newOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class Upgraded extends ethereum.Event { - get params(): Upgraded__Params { - return new Upgraded__Params(this); - } -} - -export class Upgraded__Params { - _event: Upgraded; - - constructor(event: Upgraded) { - this._event = event; - } - - get implementation(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class ElectionModuleOld__getMinEpochDurationsResult { - value0: BigInt; - value1: BigInt; - value2: BigInt; - - constructor(value0: BigInt, value1: BigInt, value2: BigInt) { - this.value0 = value0; - this.value1 = value1; - this.value2 = value2; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - map.set("value2", ethereum.Value.fromUnsignedBigInt(this.value2)); - return map; - } - - getMinNominationPeriodDuration(): BigInt { - return this.value0; - } - - getMinVotingPeriodDuration(): BigInt { - return this.value1; - } - - getMinEpochDuration(): BigInt { - return this.value2; - } -} - -export class ElectionModuleOld extends ethereum.SmartContract { - static bind(address: Address): ElectionModuleOld { - return new ElectionModuleOld("ElectionModuleOld", address); - } - - getBallotCandidatesInEpoch( - ballotId: Bytes, - epochIndex: BigInt - ): Array
{ - let result = super.call( - "getBallotCandidatesInEpoch", - "getBallotCandidatesInEpoch(bytes32,uint256):(address[])", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toAddressArray(); - } - - try_getBallotCandidatesInEpoch( - ballotId: Bytes, - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getBallotCandidatesInEpoch", - "getBallotCandidatesInEpoch(bytes32,uint256):(address[])", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getBallotVotedAtEpoch(user: Address, epochIndex: BigInt): Bytes { - let result = super.call( - "getBallotVotedAtEpoch", - "getBallotVotedAtEpoch(address,uint256):(bytes32)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBytes(); - } - - try_getBallotVotedAtEpoch( - user: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getBallotVotedAtEpoch", - "getBallotVotedAtEpoch(address,uint256):(bytes32)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getBallotVotesInEpoch(ballotId: Bytes, epochIndex: BigInt): BigInt { - let result = super.call( - "getBallotVotesInEpoch", - "getBallotVotesInEpoch(bytes32,uint256):(uint256)", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBigInt(); - } - - try_getBallotVotesInEpoch( - ballotId: Bytes, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getBallotVotesInEpoch", - "getBallotVotesInEpoch(bytes32,uint256):(uint256)", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCandidateVotesInEpoch(candidate: Address, epochIndex: BigInt): BigInt { - let result = super.call( - "getCandidateVotesInEpoch", - "getCandidateVotesInEpoch(address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotesInEpoch( - candidate: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotesInEpoch", - "getCandidateVotesInEpoch(address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionWinnersInEpoch(epochIndex: BigInt): Array
{ - let result = super.call( - "getElectionWinnersInEpoch", - "getElectionWinnersInEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinnersInEpoch( - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinnersInEpoch", - "getElectionWinnersInEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochEndDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getEpochEndDateForIndex", - "getEpochEndDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getEpochEndDateForIndex(epochIndex: BigInt): ethereum.CallResult { - let result = super.tryCall( - "getEpochEndDateForIndex", - "getEpochEndDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getEpochStartDateForIndex", - "getEpochStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getEpochStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getEpochStartDateForIndex", - "getEpochStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNominationPeriodStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getNominationPeriodStartDateForIndex", - "getNominationPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getNominationPeriodStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getNominationPeriodStartDateForIndex", - "getNominationPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNomineesAtEpoch(epochIndex: BigInt): Array
{ - let result = super.call( - "getNomineesAtEpoch", - "getNomineesAtEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toAddressArray(); - } - - try_getNomineesAtEpoch( - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getNomineesAtEpoch", - "getNomineesAtEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotingPeriodStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getVotingPeriodStartDateForIndex", - "getVotingPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getVotingPeriodStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getVotingPeriodStartDateForIndex", - "getVotingPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVotedInEpoch(user: Address, epochIndex: BigInt): boolean { - let result = super.call( - "hasVotedInEpoch", - "hasVotedInEpoch(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBoolean(); - } - - try_hasVotedInEpoch( - user: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "hasVotedInEpoch", - "hasVotedInEpoch(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - wasNominated(candidate: Address, epochIndex: BigInt): boolean { - let result = super.call( - "wasNominated", - "wasNominated(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBoolean(); - } - - try_wasNominated( - candidate: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "wasNominated", - "wasNominated(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - calculateBallotId(candidates: Array
): Bytes { - let result = super.call( - "calculateBallotId", - "calculateBallotId(address[]):(bytes32)", - [ethereum.Value.fromAddressArray(candidates)] - ); - - return result[0].toBytes(); - } - - try_calculateBallotId( - candidates: Array
- ): ethereum.CallResult { - let result = super.tryCall( - "calculateBallotId", - "calculateBallotId(address[]):(bytes32)", - [ethereum.Value.fromAddressArray(candidates)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getBallotCandidates(ballotId: Bytes): Array
{ - let result = super.call( - "getBallotCandidates", - "getBallotCandidates(bytes32):(address[])", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - - return result[0].toAddressArray(); - } - - try_getBallotCandidates( - ballotId: Bytes - ): ethereum.CallResult> { - let result = super.tryCall( - "getBallotCandidates", - "getBallotCandidates(bytes32):(address[])", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getBallotVoted(user: Address): Bytes { - let result = super.call( - "getBallotVoted", - "getBallotVoted(address):(bytes32)", - [ethereum.Value.fromAddress(user)] - ); - - return result[0].toBytes(); - } - - try_getBallotVoted(user: Address): ethereum.CallResult { - let result = super.tryCall( - "getBallotVoted", - "getBallotVoted(address):(bytes32)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getBallotVotes(ballotId: Bytes): BigInt { - let result = super.call( - "getBallotVotes", - "getBallotVotes(bytes32):(uint256)", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - - return result[0].toBigInt(); - } - - try_getBallotVotes(ballotId: Bytes): ethereum.CallResult { - let result = super.tryCall( - "getBallotVotes", - "getBallotVotes(bytes32):(uint256)", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCandidateVotes(candidate: Address): BigInt { - let result = super.call( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotes(candidate: Address): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCouncilMembers(): Array
{ - let result = super.call( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getCouncilMembers(): ethereum.CallResult> { - let result = super.tryCall( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getCouncilToken(): Address { - let result = super.call( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getCouncilToken(): ethereum.CallResult
{ - let result = super.tryCall( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getCrossChainDebtShareMerkleRoot(): Bytes { - let result = super.call( - "getCrossChainDebtShareMerkleRoot", - "getCrossChainDebtShareMerkleRoot():(bytes32)", - [] - ); - - return result[0].toBytes(); - } - - try_getCrossChainDebtShareMerkleRoot(): ethereum.CallResult { - let result = super.tryCall( - "getCrossChainDebtShareMerkleRoot", - "getCrossChainDebtShareMerkleRoot():(bytes32)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getCrossChainDebtShareMerkleRootBlockNumber(): BigInt { - let result = super.call( - "getCrossChainDebtShareMerkleRootBlockNumber", - "getCrossChainDebtShareMerkleRootBlockNumber():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getCrossChainDebtShareMerkleRootBlockNumber(): ethereum.CallResult< - BigInt - > { - let result = super.tryCall( - "getCrossChainDebtShareMerkleRootBlockNumber", - "getCrossChainDebtShareMerkleRootBlockNumber():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCurrentPeriod(): BigInt { - let result = super.call( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getCurrentPeriod(): ethereum.CallResult { - let result = super.tryCall( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDebtShare(user: Address): BigInt { - let result = super.call("getDebtShare", "getDebtShare(address):(uint256)", [ - ethereum.Value.fromAddress(user) - ]); - - return result[0].toBigInt(); - } - - try_getDebtShare(user: Address): ethereum.CallResult { - let result = super.tryCall( - "getDebtShare", - "getDebtShare(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDebtShareContract(): Address { - let result = super.call( - "getDebtShareContract", - "getDebtShareContract():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getDebtShareContract(): ethereum.CallResult
{ - let result = super.tryCall( - "getDebtShareContract", - "getDebtShareContract():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getDebtShareSnapshotId(): BigInt { - let result = super.call( - "getDebtShareSnapshotId", - "getDebtShareSnapshotId():(uint128)", - [] - ); - - return result[0].toBigInt(); - } - - try_getDebtShareSnapshotId(): ethereum.CallResult { - let result = super.tryCall( - "getDebtShareSnapshotId", - "getDebtShareSnapshotId():(uint128)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDeclaredCrossChainDebtShare(user: Address): BigInt { - let result = super.call( - "getDeclaredCrossChainDebtShare", - "getDeclaredCrossChainDebtShare(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - - return result[0].toBigInt(); - } - - try_getDeclaredCrossChainDebtShare( - user: Address - ): ethereum.CallResult { - let result = super.tryCall( - "getDeclaredCrossChainDebtShare", - "getDeclaredCrossChainDebtShare(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDefaultBallotEvaluationBatchSize(): BigInt { - let result = super.call( - "getDefaultBallotEvaluationBatchSize", - "getDefaultBallotEvaluationBatchSize():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getDefaultBallotEvaluationBatchSize(): ethereum.CallResult { - let result = super.tryCall( - "getDefaultBallotEvaluationBatchSize", - "getDefaultBallotEvaluationBatchSize():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionWinners(): Array
{ - let result = super.call( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinners(): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochEndDate(): BigInt { - let result = super.call( - "getEpochEndDate", - "getEpochEndDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getEpochEndDate(): ethereum.CallResult { - let result = super.tryCall( - "getEpochEndDate", - "getEpochEndDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochIndex(): BigInt { - let result = super.call("getEpochIndex", "getEpochIndex():(uint256)", []); - - return result[0].toBigInt(); - } - - try_getEpochIndex(): ethereum.CallResult { - let result = super.tryCall( - "getEpochIndex", - "getEpochIndex():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochStartDate(): BigInt { - let result = super.call( - "getEpochStartDate", - "getEpochStartDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getEpochStartDate(): ethereum.CallResult { - let result = super.tryCall( - "getEpochStartDate", - "getEpochStartDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getMaxDateAdjustmenTolerance(): BigInt { - let result = super.call( - "getMaxDateAdjustmenTolerance", - "getMaxDateAdjustmenTolerance():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getMaxDateAdjustmenTolerance(): ethereum.CallResult { - let result = super.tryCall( - "getMaxDateAdjustmenTolerance", - "getMaxDateAdjustmenTolerance():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getMinEpochDurations(): ElectionModuleOld__getMinEpochDurationsResult { - let result = super.call( - "getMinEpochDurations", - "getMinEpochDurations():(uint64,uint64,uint64)", - [] - ); - - return new ElectionModuleOld__getMinEpochDurationsResult( - result[0].toBigInt(), - result[1].toBigInt(), - result[2].toBigInt() - ); - } - - try_getMinEpochDurations(): ethereum.CallResult< - ElectionModuleOld__getMinEpochDurationsResult - > { - let result = super.tryCall( - "getMinEpochDurations", - "getMinEpochDurations():(uint64,uint64,uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new ElectionModuleOld__getMinEpochDurationsResult( - value[0].toBigInt(), - value[1].toBigInt(), - value[2].toBigInt() - ) - ); - } - - getMinimumActiveMembers(): i32 { - let result = super.call( - "getMinimumActiveMembers", - "getMinimumActiveMembers():(uint8)", - [] - ); - - return result[0].toI32(); - } - - try_getMinimumActiveMembers(): ethereum.CallResult { - let result = super.tryCall( - "getMinimumActiveMembers", - "getMinimumActiveMembers():(uint8)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toI32()); - } - - getNextEpochSeatCount(): i32 { - let result = super.call( - "getNextEpochSeatCount", - "getNextEpochSeatCount():(uint8)", - [] - ); - - return result[0].toI32(); - } - - try_getNextEpochSeatCount(): ethereum.CallResult { - let result = super.tryCall( - "getNextEpochSeatCount", - "getNextEpochSeatCount():(uint8)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toI32()); - } - - getNominationPeriodStartDate(): BigInt { - let result = super.call( - "getNominationPeriodStartDate", - "getNominationPeriodStartDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getNominationPeriodStartDate(): ethereum.CallResult { - let result = super.tryCall( - "getNominationPeriodStartDate", - "getNominationPeriodStartDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNominees(): Array
{ - let result = super.call("getNominees", "getNominees():(address[])", []); - - return result[0].toAddressArray(); - } - - try_getNominees(): ethereum.CallResult> { - let result = super.tryCall("getNominees", "getNominees():(address[])", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotePower(user: Address): BigInt { - let result = super.call("getVotePower", "getVotePower(address):(uint256)", [ - ethereum.Value.fromAddress(user) - ]); - - return result[0].toBigInt(); - } - - try_getVotePower(user: Address): ethereum.CallResult { - let result = super.tryCall( - "getVotePower", - "getVotePower(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getVotingPeriodStartDate(): BigInt { - let result = super.call( - "getVotingPeriodStartDate", - "getVotingPeriodStartDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getVotingPeriodStartDate(): ethereum.CallResult { - let result = super.tryCall( - "getVotingPeriodStartDate", - "getVotingPeriodStartDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVoted(user: Address): boolean { - let result = super.call("hasVoted", "hasVoted(address):(bool)", [ - ethereum.Value.fromAddress(user) - ]); - - return result[0].toBoolean(); - } - - try_hasVoted(user: Address): ethereum.CallResult { - let result = super.tryCall("hasVoted", "hasVoted(address):(bool)", [ - ethereum.Value.fromAddress(user) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionEvaluated(): boolean { - let result = super.call( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionEvaluated(): ethereum.CallResult { - let result = super.tryCall( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionModuleInitialized(): boolean { - let result = super.call( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionModuleInitialized(): ethereum.CallResult { - let result = super.tryCall( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isNominated(candidate: Address): boolean { - let result = super.call("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - - return result[0].toBoolean(); - } - - try_isNominated(candidate: Address): ethereum.CallResult { - let result = super.tryCall("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isOwnerModuleInitialized(): boolean { - let result = super.call( - "isOwnerModuleInitialized", - "isOwnerModuleInitialized():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isOwnerModuleInitialized(): ethereum.CallResult { - let result = super.tryCall( - "isOwnerModuleInitialized", - "isOwnerModuleInitialized():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - nominatedOwner(): Address { - let result = super.call("nominatedOwner", "nominatedOwner():(address)", []); - - return result[0].toAddress(); - } - - try_nominatedOwner(): ethereum.CallResult
{ - let result = super.tryCall( - "nominatedOwner", - "nominatedOwner():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - owner(): Address { - let result = super.call("owner", "owner():(address)", []); - - return result[0].toAddress(); - } - - try_owner(): ethereum.CallResult
{ - let result = super.tryCall("owner", "owner():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getImplementation(): Address { - let result = super.call( - "getImplementation", - "getImplementation():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getImplementation(): ethereum.CallResult
{ - let result = super.tryCall( - "getImplementation", - "getImplementation():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } -} - -export class CastCall extends ethereum.Call { - get inputs(): CastCall__Inputs { - return new CastCall__Inputs(this); - } - - get outputs(): CastCall__Outputs { - return new CastCall__Outputs(this); - } -} - -export class CastCall__Inputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } - - get candidates(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class CastCall__Outputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } -} - -export class DeclareAndCastCall extends ethereum.Call { - get inputs(): DeclareAndCastCall__Inputs { - return new DeclareAndCastCall__Inputs(this); - } - - get outputs(): DeclareAndCastCall__Outputs { - return new DeclareAndCastCall__Outputs(this); - } -} - -export class DeclareAndCastCall__Inputs { - _call: DeclareAndCastCall; - - constructor(call: DeclareAndCastCall) { - this._call = call; - } - - get debtShare(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get merkleProof(): Array { - return this._call.inputValues[1].value.toBytesArray(); - } - - get candidates(): Array
{ - return this._call.inputValues[2].value.toAddressArray(); - } -} - -export class DeclareAndCastCall__Outputs { - _call: DeclareAndCastCall; - - constructor(call: DeclareAndCastCall) { - this._call = call; - } -} - -export class DeclareCrossChainDebtShareCall extends ethereum.Call { - get inputs(): DeclareCrossChainDebtShareCall__Inputs { - return new DeclareCrossChainDebtShareCall__Inputs(this); - } - - get outputs(): DeclareCrossChainDebtShareCall__Outputs { - return new DeclareCrossChainDebtShareCall__Outputs(this); - } -} - -export class DeclareCrossChainDebtShareCall__Inputs { - _call: DeclareCrossChainDebtShareCall; - - constructor(call: DeclareCrossChainDebtShareCall) { - this._call = call; - } - - get user(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get debtShare(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get merkleProof(): Array { - return this._call.inputValues[2].value.toBytesArray(); - } -} - -export class DeclareCrossChainDebtShareCall__Outputs { - _call: DeclareCrossChainDebtShareCall; - - constructor(call: DeclareCrossChainDebtShareCall) { - this._call = call; - } -} - -export class DismissMembersCall extends ethereum.Call { - get inputs(): DismissMembersCall__Inputs { - return new DismissMembersCall__Inputs(this); - } - - get outputs(): DismissMembersCall__Outputs { - return new DismissMembersCall__Outputs(this); - } -} - -export class DismissMembersCall__Inputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } - - get membersToDismiss(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class DismissMembersCall__Outputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } -} - -export class EvaluateCall extends ethereum.Call { - get inputs(): EvaluateCall__Inputs { - return new EvaluateCall__Inputs(this); - } - - get outputs(): EvaluateCall__Outputs { - return new EvaluateCall__Outputs(this); - } -} - -export class EvaluateCall__Inputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } - - get numBallots(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class EvaluateCall__Outputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } -} - -export class InitializeElectionModuleCall extends ethereum.Call { - get inputs(): InitializeElectionModuleCall__Inputs { - return new InitializeElectionModuleCall__Inputs(this); - } - - get outputs(): InitializeElectionModuleCall__Outputs { - return new InitializeElectionModuleCall__Outputs(this); - } -} - -export class InitializeElectionModuleCall__Inputs { - _call: InitializeElectionModuleCall; - - constructor(call: InitializeElectionModuleCall) { - this._call = call; - } - - get councilTokenName(): string { - return this._call.inputValues[0].value.toString(); - } - - get councilTokenSymbol(): string { - return this._call.inputValues[1].value.toString(); - } - - get firstCouncil(): Array
{ - return this._call.inputValues[2].value.toAddressArray(); - } - - get minimumActiveMembers(): i32 { - return this._call.inputValues[3].value.toI32(); - } - - get nominationPeriodStartDate(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._call.inputValues[5].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._call.inputValues[6].value.toBigInt(); - } - - get debtShareContract(): Address { - return this._call.inputValues[7].value.toAddress(); - } -} - -export class InitializeElectionModuleCall__Outputs { - _call: InitializeElectionModuleCall; - - constructor(call: InitializeElectionModuleCall) { - this._call = call; - } -} - -export class ModifyEpochScheduleCall extends ethereum.Call { - get inputs(): ModifyEpochScheduleCall__Inputs { - return new ModifyEpochScheduleCall__Inputs(this); - } - - get outputs(): ModifyEpochScheduleCall__Outputs { - return new ModifyEpochScheduleCall__Outputs(this); - } -} - -export class ModifyEpochScheduleCall__Inputs { - _call: ModifyEpochScheduleCall; - - constructor(call: ModifyEpochScheduleCall) { - this._call = call; - } - - get newNominationPeriodStartDate(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newVotingPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newEpochEndDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class ModifyEpochScheduleCall__Outputs { - _call: ModifyEpochScheduleCall; - - constructor(call: ModifyEpochScheduleCall) { - this._call = call; - } -} - -export class NominateCall extends ethereum.Call { - get inputs(): NominateCall__Inputs { - return new NominateCall__Inputs(this); - } - - get outputs(): NominateCall__Outputs { - return new NominateCall__Outputs(this); - } -} - -export class NominateCall__Inputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class NominateCall__Outputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class ResolveCall extends ethereum.Call { - get inputs(): ResolveCall__Inputs { - return new ResolveCall__Inputs(this); - } - - get outputs(): ResolveCall__Outputs { - return new ResolveCall__Outputs(this); - } -} - -export class ResolveCall__Inputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class ResolveCall__Outputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class SetCrossChainDebtShareMerkleRootCall extends ethereum.Call { - get inputs(): SetCrossChainDebtShareMerkleRootCall__Inputs { - return new SetCrossChainDebtShareMerkleRootCall__Inputs(this); - } - - get outputs(): SetCrossChainDebtShareMerkleRootCall__Outputs { - return new SetCrossChainDebtShareMerkleRootCall__Outputs(this); - } -} - -export class SetCrossChainDebtShareMerkleRootCall__Inputs { - _call: SetCrossChainDebtShareMerkleRootCall; - - constructor(call: SetCrossChainDebtShareMerkleRootCall) { - this._call = call; - } - - get merkleRoot(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get blocknumber(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class SetCrossChainDebtShareMerkleRootCall__Outputs { - _call: SetCrossChainDebtShareMerkleRootCall; - - constructor(call: SetCrossChainDebtShareMerkleRootCall) { - this._call = call; - } -} - -export class SetDebtShareContractCall extends ethereum.Call { - get inputs(): SetDebtShareContractCall__Inputs { - return new SetDebtShareContractCall__Inputs(this); - } - - get outputs(): SetDebtShareContractCall__Outputs { - return new SetDebtShareContractCall__Outputs(this); - } -} - -export class SetDebtShareContractCall__Inputs { - _call: SetDebtShareContractCall; - - constructor(call: SetDebtShareContractCall) { - this._call = call; - } - - get debtShareContract(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SetDebtShareContractCall__Outputs { - _call: SetDebtShareContractCall; - - constructor(call: SetDebtShareContractCall) { - this._call = call; - } -} - -export class SetDebtShareSnapshotIdCall extends ethereum.Call { - get inputs(): SetDebtShareSnapshotIdCall__Inputs { - return new SetDebtShareSnapshotIdCall__Inputs(this); - } - - get outputs(): SetDebtShareSnapshotIdCall__Outputs { - return new SetDebtShareSnapshotIdCall__Outputs(this); - } -} - -export class SetDebtShareSnapshotIdCall__Inputs { - _call: SetDebtShareSnapshotIdCall; - - constructor(call: SetDebtShareSnapshotIdCall) { - this._call = call; - } - - get snapshotId(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetDebtShareSnapshotIdCall__Outputs { - _call: SetDebtShareSnapshotIdCall; - - constructor(call: SetDebtShareSnapshotIdCall) { - this._call = call; - } -} - -export class SetDefaultBallotEvaluationBatchSizeCall extends ethereum.Call { - get inputs(): SetDefaultBallotEvaluationBatchSizeCall__Inputs { - return new SetDefaultBallotEvaluationBatchSizeCall__Inputs(this); - } - - get outputs(): SetDefaultBallotEvaluationBatchSizeCall__Outputs { - return new SetDefaultBallotEvaluationBatchSizeCall__Outputs(this); - } -} - -export class SetDefaultBallotEvaluationBatchSizeCall__Inputs { - _call: SetDefaultBallotEvaluationBatchSizeCall; - - constructor(call: SetDefaultBallotEvaluationBatchSizeCall) { - this._call = call; - } - - get newDefaultBallotEvaluationBatchSize(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetDefaultBallotEvaluationBatchSizeCall__Outputs { - _call: SetDefaultBallotEvaluationBatchSizeCall; - - constructor(call: SetDefaultBallotEvaluationBatchSizeCall) { - this._call = call; - } -} - -export class SetMaxDateAdjustmentToleranceCall extends ethereum.Call { - get inputs(): SetMaxDateAdjustmentToleranceCall__Inputs { - return new SetMaxDateAdjustmentToleranceCall__Inputs(this); - } - - get outputs(): SetMaxDateAdjustmentToleranceCall__Outputs { - return new SetMaxDateAdjustmentToleranceCall__Outputs(this); - } -} - -export class SetMaxDateAdjustmentToleranceCall__Inputs { - _call: SetMaxDateAdjustmentToleranceCall; - - constructor(call: SetMaxDateAdjustmentToleranceCall) { - this._call = call; - } - - get newMaxDateAdjustmentTolerance(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetMaxDateAdjustmentToleranceCall__Outputs { - _call: SetMaxDateAdjustmentToleranceCall; - - constructor(call: SetMaxDateAdjustmentToleranceCall) { - this._call = call; - } -} - -export class SetMinEpochDurationsCall extends ethereum.Call { - get inputs(): SetMinEpochDurationsCall__Inputs { - return new SetMinEpochDurationsCall__Inputs(this); - } - - get outputs(): SetMinEpochDurationsCall__Outputs { - return new SetMinEpochDurationsCall__Outputs(this); - } -} - -export class SetMinEpochDurationsCall__Inputs { - _call: SetMinEpochDurationsCall; - - constructor(call: SetMinEpochDurationsCall) { - this._call = call; - } - - get newMinNominationPeriodDuration(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newMinVotingPeriodDuration(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newMinEpochDuration(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class SetMinEpochDurationsCall__Outputs { - _call: SetMinEpochDurationsCall; - - constructor(call: SetMinEpochDurationsCall) { - this._call = call; - } -} - -export class SetMinimumActiveMembersCall extends ethereum.Call { - get inputs(): SetMinimumActiveMembersCall__Inputs { - return new SetMinimumActiveMembersCall__Inputs(this); - } - - get outputs(): SetMinimumActiveMembersCall__Outputs { - return new SetMinimumActiveMembersCall__Outputs(this); - } -} - -export class SetMinimumActiveMembersCall__Inputs { - _call: SetMinimumActiveMembersCall; - - constructor(call: SetMinimumActiveMembersCall) { - this._call = call; - } - - get newMinimumActiveMembers(): i32 { - return this._call.inputValues[0].value.toI32(); - } -} - -export class SetMinimumActiveMembersCall__Outputs { - _call: SetMinimumActiveMembersCall; - - constructor(call: SetMinimumActiveMembersCall) { - this._call = call; - } -} - -export class SetNextEpochSeatCountCall extends ethereum.Call { - get inputs(): SetNextEpochSeatCountCall__Inputs { - return new SetNextEpochSeatCountCall__Inputs(this); - } - - get outputs(): SetNextEpochSeatCountCall__Outputs { - return new SetNextEpochSeatCountCall__Outputs(this); - } -} - -export class SetNextEpochSeatCountCall__Inputs { - _call: SetNextEpochSeatCountCall; - - constructor(call: SetNextEpochSeatCountCall) { - this._call = call; - } - - get newSeatCount(): i32 { - return this._call.inputValues[0].value.toI32(); - } -} - -export class SetNextEpochSeatCountCall__Outputs { - _call: SetNextEpochSeatCountCall; - - constructor(call: SetNextEpochSeatCountCall) { - this._call = call; - } -} - -export class TweakEpochScheduleCall extends ethereum.Call { - get inputs(): TweakEpochScheduleCall__Inputs { - return new TweakEpochScheduleCall__Inputs(this); - } - - get outputs(): TweakEpochScheduleCall__Outputs { - return new TweakEpochScheduleCall__Outputs(this); - } -} - -export class TweakEpochScheduleCall__Inputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } - - get newNominationPeriodStartDate(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newVotingPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newEpochEndDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class TweakEpochScheduleCall__Outputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } -} - -export class UpgradeCouncilTokenCall extends ethereum.Call { - get inputs(): UpgradeCouncilTokenCall__Inputs { - return new UpgradeCouncilTokenCall__Inputs(this); - } - - get outputs(): UpgradeCouncilTokenCall__Outputs { - return new UpgradeCouncilTokenCall__Outputs(this); - } -} - -export class UpgradeCouncilTokenCall__Inputs { - _call: UpgradeCouncilTokenCall; - - constructor(call: UpgradeCouncilTokenCall) { - this._call = call; - } - - get newCouncilTokenImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class UpgradeCouncilTokenCall__Outputs { - _call: UpgradeCouncilTokenCall; - - constructor(call: UpgradeCouncilTokenCall) { - this._call = call; - } -} - -export class WithdrawNominationCall extends ethereum.Call { - get inputs(): WithdrawNominationCall__Inputs { - return new WithdrawNominationCall__Inputs(this); - } - - get outputs(): WithdrawNominationCall__Outputs { - return new WithdrawNominationCall__Outputs(this); - } -} - -export class WithdrawNominationCall__Inputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawNominationCall__Outputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawVoteCall extends ethereum.Call { - get inputs(): WithdrawVoteCall__Inputs { - return new WithdrawVoteCall__Inputs(this); - } - - get outputs(): WithdrawVoteCall__Outputs { - return new WithdrawVoteCall__Outputs(this); - } -} - -export class WithdrawVoteCall__Inputs { - _call: WithdrawVoteCall; - - constructor(call: WithdrawVoteCall) { - this._call = call; - } -} - -export class WithdrawVoteCall__Outputs { - _call: WithdrawVoteCall; - - constructor(call: WithdrawVoteCall) { - this._call = call; - } -} - -export class AcceptOwnershipCall extends ethereum.Call { - get inputs(): AcceptOwnershipCall__Inputs { - return new AcceptOwnershipCall__Inputs(this); - } - - get outputs(): AcceptOwnershipCall__Outputs { - return new AcceptOwnershipCall__Outputs(this); - } -} - -export class AcceptOwnershipCall__Inputs { - _call: AcceptOwnershipCall; - - constructor(call: AcceptOwnershipCall) { - this._call = call; - } -} - -export class AcceptOwnershipCall__Outputs { - _call: AcceptOwnershipCall; - - constructor(call: AcceptOwnershipCall) { - this._call = call; - } -} - -export class InitializeOwnerModuleCall extends ethereum.Call { - get inputs(): InitializeOwnerModuleCall__Inputs { - return new InitializeOwnerModuleCall__Inputs(this); - } - - get outputs(): InitializeOwnerModuleCall__Outputs { - return new InitializeOwnerModuleCall__Outputs(this); - } -} - -export class InitializeOwnerModuleCall__Inputs { - _call: InitializeOwnerModuleCall; - - constructor(call: InitializeOwnerModuleCall) { - this._call = call; - } - - get initialOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class InitializeOwnerModuleCall__Outputs { - _call: InitializeOwnerModuleCall; - - constructor(call: InitializeOwnerModuleCall) { - this._call = call; - } -} - -export class NominateNewOwnerCall extends ethereum.Call { - get inputs(): NominateNewOwnerCall__Inputs { - return new NominateNewOwnerCall__Inputs(this); - } - - get outputs(): NominateNewOwnerCall__Outputs { - return new NominateNewOwnerCall__Outputs(this); - } -} - -export class NominateNewOwnerCall__Inputs { - _call: NominateNewOwnerCall; - - constructor(call: NominateNewOwnerCall) { - this._call = call; - } - - get newNominatedOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class NominateNewOwnerCall__Outputs { - _call: NominateNewOwnerCall; - - constructor(call: NominateNewOwnerCall) { - this._call = call; - } -} - -export class RenounceNominationCall extends ethereum.Call { - get inputs(): RenounceNominationCall__Inputs { - return new RenounceNominationCall__Inputs(this); - } - - get outputs(): RenounceNominationCall__Outputs { - return new RenounceNominationCall__Outputs(this); - } -} - -export class RenounceNominationCall__Inputs { - _call: RenounceNominationCall; - - constructor(call: RenounceNominationCall) { - this._call = call; - } -} - -export class RenounceNominationCall__Outputs { - _call: RenounceNominationCall; - - constructor(call: RenounceNominationCall) { - this._call = call; - } -} - -export class SimulateUpgradeToCall extends ethereum.Call { - get inputs(): SimulateUpgradeToCall__Inputs { - return new SimulateUpgradeToCall__Inputs(this); - } - - get outputs(): SimulateUpgradeToCall__Outputs { - return new SimulateUpgradeToCall__Outputs(this); - } -} - -export class SimulateUpgradeToCall__Inputs { - _call: SimulateUpgradeToCall; - - constructor(call: SimulateUpgradeToCall) { - this._call = call; - } - - get newImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SimulateUpgradeToCall__Outputs { - _call: SimulateUpgradeToCall; - - constructor(call: SimulateUpgradeToCall) { - this._call = call; - } -} - -export class UpgradeToCall extends ethereum.Call { - get inputs(): UpgradeToCall__Inputs { - return new UpgradeToCall__Inputs(this); - } - - get outputs(): UpgradeToCall__Outputs { - return new UpgradeToCall__Outputs(this); - } -} - -export class UpgradeToCall__Inputs { - _call: UpgradeToCall; - - constructor(call: UpgradeToCall) { - this._call = call; - } - - get newImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class UpgradeToCall__Outputs { - _call: UpgradeToCall; - - constructor(call: UpgradeToCall) { - this._call = call; - } -} diff --git a/governance/subgraph/generated/Ambassador/ElectionModule.ts b/governance/subgraph/generated/Ambassador/ElectionModule.ts deleted file mode 100644 index 7fb77c6af..000000000 --- a/governance/subgraph/generated/Ambassador/ElectionModule.ts +++ /dev/null @@ -1,2585 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class AssociatedSystemSet extends ethereum.Event { - get params(): AssociatedSystemSet__Params { - return new AssociatedSystemSet__Params(this); - } -} - -export class AssociatedSystemSet__Params { - _event: AssociatedSystemSet; - - constructor(event: AssociatedSystemSet) { - this._event = event; - } - - get kind(): Bytes { - return this._event.parameters[0].value.toBytes(); - } - - get id(): Bytes { - return this._event.parameters[1].value.toBytes(); - } - - get proxy(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get impl(): Address { - return this._event.parameters[3].value.toAddress(); - } -} - -export class NewSupportedCrossChainNetwork extends ethereum.Event { - get params(): NewSupportedCrossChainNetwork__Params { - return new NewSupportedCrossChainNetwork__Params(this); - } -} - -export class NewSupportedCrossChainNetwork__Params { - _event: NewSupportedCrossChainNetwork; - - constructor(event: NewSupportedCrossChainNetwork) { - this._event = event; - } - - get newChainId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class CandidateNominated extends ethereum.Event { - get params(): CandidateNominated__Params { - return new CandidateNominated__Params(this); - } -} - -export class CandidateNominated__Params { - _event: CandidateNominated; - - constructor(event: CandidateNominated) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberAdded extends ethereum.Event { - get params(): CouncilMemberAdded__Params { - return new CouncilMemberAdded__Params(this); - } -} - -export class CouncilMemberAdded__Params { - _event: CouncilMemberAdded; - - constructor(event: CouncilMemberAdded) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberRemoved extends ethereum.Event { - get params(): CouncilMemberRemoved__Params { - return new CouncilMemberRemoved__Params(this); - } -} - -export class CouncilMemberRemoved__Params { - _event: CouncilMemberRemoved; - - constructor(event: CouncilMemberRemoved) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMembersDismissed extends ethereum.Event { - get params(): CouncilMembersDismissed__Params { - return new CouncilMembersDismissed__Params(this); - } -} - -export class CouncilMembersDismissed__Params { - _event: CouncilMembersDismissed; - - constructor(event: CouncilMembersDismissed) { - this._event = event; - } - - get dismissedMembers(): Array
{ - return this._event.parameters[0].value.toAddressArray(); - } - - get epochId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class ElectionBatchEvaluated extends ethereum.Event { - get params(): ElectionBatchEvaluated__Params { - return new ElectionBatchEvaluated__Params(this); - } -} - -export class ElectionBatchEvaluated__Params { - _event: ElectionBatchEvaluated; - - constructor(event: ElectionBatchEvaluated) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get numEvaluatedBallots(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get totalBallots(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class ElectionEvaluated extends ethereum.Event { - get params(): ElectionEvaluated__Params { - return new ElectionEvaluated__Params(this); - } -} - -export class ElectionEvaluated__Params { - _event: ElectionEvaluated; - - constructor(event: ElectionEvaluated) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get ballotCount(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class ElectionModuleInitialized extends ethereum.Event { - get params(): ElectionModuleInitialized__Params { - return new ElectionModuleInitialized__Params(this); - } -} - -export class ElectionModuleInitialized__Params { - _event: ElectionModuleInitialized; - - constructor(event: ElectionModuleInitialized) { - this._event = event; - } -} - -export class EmergencyElectionStarted extends ethereum.Event { - get params(): EmergencyElectionStarted__Params { - return new EmergencyElectionStarted__Params(this); - } -} - -export class EmergencyElectionStarted__Params { - _event: EmergencyElectionStarted; - - constructor(event: EmergencyElectionStarted) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class EpochScheduleUpdated extends ethereum.Event { - get params(): EpochScheduleUpdated__Params { - return new EpochScheduleUpdated__Params(this); - } -} - -export class EpochScheduleUpdated__Params { - _event: EpochScheduleUpdated; - - constructor(event: EpochScheduleUpdated) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get startDate(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get endDate(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class EpochStarted extends ethereum.Event { - get params(): EpochStarted__Params { - return new EpochStarted__Params(this); - } -} - -export class EpochStarted__Params { - _event: EpochStarted; - - constructor(event: EpochStarted) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class NominationWithdrawn extends ethereum.Event { - get params(): NominationWithdrawn__Params { - return new NominationWithdrawn__Params(this); - } -} - -export class NominationWithdrawn__Params { - _event: NominationWithdrawn; - - constructor(event: NominationWithdrawn) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class VoteRecorded extends ethereum.Event { - get params(): VoteRecorded__Params { - return new VoteRecorded__Params(this); - } -} - -export class VoteRecorded__Params { - _event: VoteRecorded; - - constructor(event: VoteRecorded) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get chainId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epochId(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get votingPower(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } - - get candidates(): Array
{ - return this._event.parameters[4].value.toAddressArray(); - } -} - -export class VoteWithdrawn extends ethereum.Event { - get params(): VoteWithdrawn__Params { - return new VoteWithdrawn__Params(this); - } -} - -export class VoteWithdrawn__Params { - _event: VoteWithdrawn; - - constructor(event: VoteWithdrawn) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get chainId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epochId(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get candidates(): Array
{ - return this._event.parameters[3].value.toAddressArray(); - } -} - -export class OwnerChanged extends ethereum.Event { - get params(): OwnerChanged__Params { - return new OwnerChanged__Params(this); - } -} - -export class OwnerChanged__Params { - _event: OwnerChanged; - - constructor(event: OwnerChanged) { - this._event = event; - } - - get oldOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get newOwner(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class OwnerNominated extends ethereum.Event { - get params(): OwnerNominated__Params { - return new OwnerNominated__Params(this); - } -} - -export class OwnerNominated__Params { - _event: OwnerNominated; - - constructor(event: OwnerNominated) { - this._event = event; - } - - get newOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class Upgraded extends ethereum.Event { - get params(): Upgraded__Params { - return new Upgraded__Params(this); - } -} - -export class Upgraded__Params { - _event: Upgraded; - - constructor(event: Upgraded) { - this._event = event; - } - - get self(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get implementation(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class ElectionModule__getAssociatedSystemResult { - value0: Address; - value1: Bytes; - - constructor(value0: Address, value1: Bytes) { - this.value0 = value0; - this.value1 = value1; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromAddress(this.value0)); - map.set("value1", ethereum.Value.fromFixedBytes(this.value1)); - return map; - } - - getAddr(): Address { - return this.value0; - } - - getKind(): Bytes { - return this.value1; - } -} - -export class ElectionModule__getBallotResultValue0Struct extends ethereum.Tuple { - get votingPower(): BigInt { - return this[0].toBigInt(); - } - - get votedCandidates(): Array
{ - return this[1].toAddressArray(); - } - - get amounts(): Array { - return this[2].toBigIntArray(); - } -} - -export class ElectionModule__getElectionSettingsResultSettingsStruct extends ethereum.Tuple { - get epochSeatCount(): i32 { - return this[0].toI32(); - } - - get minimumActiveMembers(): i32 { - return this[1].toI32(); - } - - get epochDuration(): BigInt { - return this[2].toBigInt(); - } - - get nominationPeriodDuration(): BigInt { - return this[3].toBigInt(); - } - - get votingPeriodDuration(): BigInt { - return this[4].toBigInt(); - } - - get maxDateAdjustmentTolerance(): BigInt { - return this[5].toBigInt(); - } -} - -export class ElectionModule__getEpochScheduleResultEpochStruct extends ethereum.Tuple { - get startDate(): BigInt { - return this[0].toBigInt(); - } - - get nominationPeriodStartDate(): BigInt { - return this[1].toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this[2].toBigInt(); - } - - get endDate(): BigInt { - return this[3].toBigInt(); - } -} - -export class ElectionModule__getNextElectionSettingsResultSettingsStruct extends ethereum.Tuple { - get epochSeatCount(): i32 { - return this[0].toI32(); - } - - get minimumActiveMembers(): i32 { - return this[1].toI32(); - } - - get epochDuration(): BigInt { - return this[2].toBigInt(); - } - - get nominationPeriodDuration(): BigInt { - return this[3].toBigInt(); - } - - get votingPeriodDuration(): BigInt { - return this[4].toBigInt(); - } - - get maxDateAdjustmentTolerance(): BigInt { - return this[5].toBigInt(); - } -} - -export class ElectionModule extends ethereum.SmartContract { - static bind(address: Address): ElectionModule { - return new ElectionModule("ElectionModule", address); - } - - getAssociatedSystem(id: Bytes): ElectionModule__getAssociatedSystemResult { - let result = super.call( - "getAssociatedSystem", - "getAssociatedSystem(bytes32):(address,bytes32)", - [ethereum.Value.fromFixedBytes(id)] - ); - - return new ElectionModule__getAssociatedSystemResult( - result[0].toAddress(), - result[1].toBytes() - ); - } - - try_getAssociatedSystem( - id: Bytes - ): ethereum.CallResult { - let result = super.tryCall( - "getAssociatedSystem", - "getAssociatedSystem(bytes32):(address,bytes32)", - [ethereum.Value.fromFixedBytes(id)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new ElectionModule__getAssociatedSystemResult( - value[0].toAddress(), - value[1].toBytes() - ) - ); - } - - setSupportedCrossChainNetworks( - supportedNetworks: Array, - ccipSelectors: Array - ): BigInt { - let result = super.call( - "setSupportedCrossChainNetworks", - "setSupportedCrossChainNetworks(uint64[],uint64[]):(uint256)", - [ - ethereum.Value.fromUnsignedBigIntArray(supportedNetworks), - ethereum.Value.fromUnsignedBigIntArray(ccipSelectors) - ] - ); - - return result[0].toBigInt(); - } - - try_setSupportedCrossChainNetworks( - supportedNetworks: Array, - ccipSelectors: Array - ): ethereum.CallResult { - let result = super.tryCall( - "setSupportedCrossChainNetworks", - "setSupportedCrossChainNetworks(uint64[],uint64[]):(uint256)", - [ - ethereum.Value.fromUnsignedBigIntArray(supportedNetworks), - ethereum.Value.fromUnsignedBigIntArray(ccipSelectors) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCandidateVotesInEpoch(candidate: Address, epochIndex: BigInt): BigInt { - let result = super.call( - "getCandidateVotesInEpoch", - "getCandidateVotesInEpoch(address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotesInEpoch( - candidate: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotesInEpoch", - "getCandidateVotesInEpoch(address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionWinnersInEpoch(epochIndex: BigInt): Array
{ - let result = super.call( - "getElectionWinnersInEpoch", - "getElectionWinnersInEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinnersInEpoch( - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinnersInEpoch", - "getElectionWinnersInEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochEndDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getEpochEndDateForIndex", - "getEpochEndDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getEpochEndDateForIndex(epochIndex: BigInt): ethereum.CallResult { - let result = super.tryCall( - "getEpochEndDateForIndex", - "getEpochEndDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getEpochStartDateForIndex", - "getEpochStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getEpochStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getEpochStartDateForIndex", - "getEpochStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNominationPeriodStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getNominationPeriodStartDateForIndex", - "getNominationPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getNominationPeriodStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getNominationPeriodStartDateForIndex", - "getNominationPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNomineesAtEpoch(epochIndex: BigInt): Array
{ - let result = super.call( - "getNomineesAtEpoch", - "getNomineesAtEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toAddressArray(); - } - - try_getNomineesAtEpoch( - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getNomineesAtEpoch", - "getNomineesAtEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotingPeriodStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getVotingPeriodStartDateForIndex", - "getVotingPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getVotingPeriodStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getVotingPeriodStartDateForIndex", - "getVotingPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVotedInEpoch(user: Address, chainId: BigInt, epochIndex: BigInt): boolean { - let result = super.call( - "hasVotedInEpoch", - "hasVotedInEpoch(address,uint256,uint256):(bool)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBoolean(); - } - - try_hasVotedInEpoch( - user: Address, - chainId: BigInt, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "hasVotedInEpoch", - "hasVotedInEpoch(address,uint256,uint256):(bool)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - wasNominated(candidate: Address, epochIndex: BigInt): boolean { - let result = super.call( - "wasNominated", - "wasNominated(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBoolean(); - } - - try_wasNominated( - candidate: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "wasNominated", - "wasNominated(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - getBallot( - voter: Address, - chainId: BigInt, - electionId: BigInt - ): ElectionModule__getBallotResultValue0Struct { - let result = super.call( - "getBallot", - "getBallot(address,uint256,uint256):((uint256,address[],uint256[]))", - [ - ethereum.Value.fromAddress(voter), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - - return changetype( - result[0].toTuple() - ); - } - - try_getBallot( - voter: Address, - chainId: BigInt, - electionId: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getBallot", - "getBallot(address,uint256,uint256):((uint256,address[],uint256[]))", - [ - ethereum.Value.fromAddress(voter), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - changetype( - value[0].toTuple() - ) - ); - } - - getBallotCandidates( - voter: Address, - chainId: BigInt, - electionId: BigInt - ): Array
{ - let result = super.call( - "getBallotCandidates", - "getBallotCandidates(address,uint256,uint256):(address[])", - [ - ethereum.Value.fromAddress(voter), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - - return result[0].toAddressArray(); - } - - try_getBallotCandidates( - voter: Address, - chainId: BigInt, - electionId: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getBallotCandidates", - "getBallotCandidates(address,uint256,uint256):(address[])", - [ - ethereum.Value.fromAddress(voter), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getCandidateVotes(candidate: Address): BigInt { - let result = super.call( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotes(candidate: Address): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCouncilMembers(): Array
{ - let result = super.call( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getCouncilMembers(): ethereum.CallResult> { - let result = super.tryCall( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getCouncilToken(): Address { - let result = super.call( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getCouncilToken(): ethereum.CallResult
{ - let result = super.tryCall( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getCurrentPeriod(): BigInt { - let result = super.call( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getCurrentPeriod(): ethereum.CallResult { - let result = super.tryCall( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionSettings(): ElectionModule__getElectionSettingsResultSettingsStruct { - let result = super.call( - "getElectionSettings", - "getElectionSettings():((uint8,uint8,uint64,uint64,uint64,uint64))", - [] - ); - - return changetype( - result[0].toTuple() - ); - } - - try_getElectionSettings(): ethereum.CallResult< - ElectionModule__getElectionSettingsResultSettingsStruct - > { - let result = super.tryCall( - "getElectionSettings", - "getElectionSettings():((uint8,uint8,uint64,uint64,uint64,uint64))", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - changetype( - value[0].toTuple() - ) - ); - } - - getElectionWinners(): Array
{ - let result = super.call( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinners(): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochIndex(): BigInt { - let result = super.call("getEpochIndex", "getEpochIndex():(uint256)", []); - - return result[0].toBigInt(); - } - - try_getEpochIndex(): ethereum.CallResult { - let result = super.tryCall( - "getEpochIndex", - "getEpochIndex():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochSchedule(): ElectionModule__getEpochScheduleResultEpochStruct { - let result = super.call( - "getEpochSchedule", - "getEpochSchedule():((uint64,uint64,uint64,uint64))", - [] - ); - - return changetype( - result[0].toTuple() - ); - } - - try_getEpochSchedule(): ethereum.CallResult< - ElectionModule__getEpochScheduleResultEpochStruct - > { - let result = super.tryCall( - "getEpochSchedule", - "getEpochSchedule():((uint64,uint64,uint64,uint64))", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - changetype( - value[0].toTuple() - ) - ); - } - - getNextElectionSettings(): ElectionModule__getNextElectionSettingsResultSettingsStruct { - let result = super.call( - "getNextElectionSettings", - "getNextElectionSettings():((uint8,uint8,uint64,uint64,uint64,uint64))", - [] - ); - - return changetype< - ElectionModule__getNextElectionSettingsResultSettingsStruct - >(result[0].toTuple()); - } - - try_getNextElectionSettings(): ethereum.CallResult< - ElectionModule__getNextElectionSettingsResultSettingsStruct - > { - let result = super.tryCall( - "getNextElectionSettings", - "getNextElectionSettings():((uint8,uint8,uint64,uint64,uint64,uint64))", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - changetype( - value[0].toTuple() - ) - ); - } - - getNominees(): Array
{ - let result = super.call("getNominees", "getNominees():(address[])", []); - - return result[0].toAddressArray(); - } - - try_getNominees(): ethereum.CallResult> { - let result = super.tryCall("getNominees", "getNominees():(address[])", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotePower(user: Address, chainId: BigInt, electionId: BigInt): BigInt { - let result = super.call( - "getVotePower", - "getVotePower(address,uint256,uint256):(uint256)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - - return result[0].toBigInt(); - } - - try_getVotePower( - user: Address, - chainId: BigInt, - electionId: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getVotePower", - "getVotePower(address,uint256,uint256):(uint256)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVoted(user: Address, chainId: BigInt): boolean { - let result = super.call("hasVoted", "hasVoted(address,uint256):(bool)", [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId) - ]); - - return result[0].toBoolean(); - } - - try_hasVoted(user: Address, chainId: BigInt): ethereum.CallResult { - let result = super.tryCall("hasVoted", "hasVoted(address,uint256):(bool)", [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionEvaluated(): boolean { - let result = super.call( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionEvaluated(): ethereum.CallResult { - let result = super.tryCall( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionModuleInitialized(): boolean { - let result = super.call( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionModuleInitialized(): ethereum.CallResult { - let result = super.tryCall( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isNominated(candidate: Address): boolean { - let result = super.call("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - - return result[0].toBoolean(); - } - - try_isNominated(candidate: Address): ethereum.CallResult { - let result = super.tryCall("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - getVotePowerSnapshotId( - snapshotContract: Address, - electionId: BigInt - ): BigInt { - let result = super.call( - "getVotePowerSnapshotId", - "getVotePowerSnapshotId(address,uint128):(uint128)", - [ - ethereum.Value.fromAddress(snapshotContract), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - - return result[0].toBigInt(); - } - - try_getVotePowerSnapshotId( - snapshotContract: Address, - electionId: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getVotePowerSnapshotId", - "getVotePowerSnapshotId(address,uint128):(uint128)", - [ - ethereum.Value.fromAddress(snapshotContract), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - prepareBallotWithSnapshot(snapshotContract: Address, voter: Address): BigInt { - let result = super.call( - "prepareBallotWithSnapshot", - "prepareBallotWithSnapshot(address,address):(uint256)", - [ - ethereum.Value.fromAddress(snapshotContract), - ethereum.Value.fromAddress(voter) - ] - ); - - return result[0].toBigInt(); - } - - try_prepareBallotWithSnapshot( - snapshotContract: Address, - voter: Address - ): ethereum.CallResult { - let result = super.tryCall( - "prepareBallotWithSnapshot", - "prepareBallotWithSnapshot(address,address):(uint256)", - [ - ethereum.Value.fromAddress(snapshotContract), - ethereum.Value.fromAddress(voter) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - takeVotePowerSnapshot(snapshotContract: Address): BigInt { - let result = super.call( - "takeVotePowerSnapshot", - "takeVotePowerSnapshot(address):(uint128)", - [ethereum.Value.fromAddress(snapshotContract)] - ); - - return result[0].toBigInt(); - } - - try_takeVotePowerSnapshot( - snapshotContract: Address - ): ethereum.CallResult { - let result = super.tryCall( - "takeVotePowerSnapshot", - "takeVotePowerSnapshot(address):(uint128)", - [ethereum.Value.fromAddress(snapshotContract)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getImplementation(): Address { - let result = super.call( - "getImplementation", - "getImplementation():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getImplementation(): ethereum.CallResult
{ - let result = super.tryCall( - "getImplementation", - "getImplementation():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - nominatedOwner(): Address { - let result = super.call("nominatedOwner", "nominatedOwner():(address)", []); - - return result[0].toAddress(); - } - - try_nominatedOwner(): ethereum.CallResult
{ - let result = super.tryCall( - "nominatedOwner", - "nominatedOwner():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - owner(): Address { - let result = super.call("owner", "owner():(address)", []); - - return result[0].toAddress(); - } - - try_owner(): ethereum.CallResult
{ - let result = super.tryCall("owner", "owner():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } -} - -export class InitOrUpgradeNftCall extends ethereum.Call { - get inputs(): InitOrUpgradeNftCall__Inputs { - return new InitOrUpgradeNftCall__Inputs(this); - } - - get outputs(): InitOrUpgradeNftCall__Outputs { - return new InitOrUpgradeNftCall__Outputs(this); - } -} - -export class InitOrUpgradeNftCall__Inputs { - _call: InitOrUpgradeNftCall; - - constructor(call: InitOrUpgradeNftCall) { - this._call = call; - } - - get id(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get name(): string { - return this._call.inputValues[1].value.toString(); - } - - get symbol(): string { - return this._call.inputValues[2].value.toString(); - } - - get uri(): string { - return this._call.inputValues[3].value.toString(); - } - - get impl(): Address { - return this._call.inputValues[4].value.toAddress(); - } -} - -export class InitOrUpgradeNftCall__Outputs { - _call: InitOrUpgradeNftCall; - - constructor(call: InitOrUpgradeNftCall) { - this._call = call; - } -} - -export class InitOrUpgradeTokenCall extends ethereum.Call { - get inputs(): InitOrUpgradeTokenCall__Inputs { - return new InitOrUpgradeTokenCall__Inputs(this); - } - - get outputs(): InitOrUpgradeTokenCall__Outputs { - return new InitOrUpgradeTokenCall__Outputs(this); - } -} - -export class InitOrUpgradeTokenCall__Inputs { - _call: InitOrUpgradeTokenCall; - - constructor(call: InitOrUpgradeTokenCall) { - this._call = call; - } - - get id(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get name(): string { - return this._call.inputValues[1].value.toString(); - } - - get symbol(): string { - return this._call.inputValues[2].value.toString(); - } - - get decimals(): i32 { - return this._call.inputValues[3].value.toI32(); - } - - get impl(): Address { - return this._call.inputValues[4].value.toAddress(); - } -} - -export class InitOrUpgradeTokenCall__Outputs { - _call: InitOrUpgradeTokenCall; - - constructor(call: InitOrUpgradeTokenCall) { - this._call = call; - } -} - -export class RegisterUnmanagedSystemCall extends ethereum.Call { - get inputs(): RegisterUnmanagedSystemCall__Inputs { - return new RegisterUnmanagedSystemCall__Inputs(this); - } - - get outputs(): RegisterUnmanagedSystemCall__Outputs { - return new RegisterUnmanagedSystemCall__Outputs(this); - } -} - -export class RegisterUnmanagedSystemCall__Inputs { - _call: RegisterUnmanagedSystemCall; - - constructor(call: RegisterUnmanagedSystemCall) { - this._call = call; - } - - get id(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get endpoint(): Address { - return this._call.inputValues[1].value.toAddress(); - } -} - -export class RegisterUnmanagedSystemCall__Outputs { - _call: RegisterUnmanagedSystemCall; - - constructor(call: RegisterUnmanagedSystemCall) { - this._call = call; - } -} - -export class ConfigureChainlinkCrossChainCall extends ethereum.Call { - get inputs(): ConfigureChainlinkCrossChainCall__Inputs { - return new ConfigureChainlinkCrossChainCall__Inputs(this); - } - - get outputs(): ConfigureChainlinkCrossChainCall__Outputs { - return new ConfigureChainlinkCrossChainCall__Outputs(this); - } -} - -export class ConfigureChainlinkCrossChainCall__Inputs { - _call: ConfigureChainlinkCrossChainCall; - - constructor(call: ConfigureChainlinkCrossChainCall) { - this._call = call; - } - - get ccipRouter(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class ConfigureChainlinkCrossChainCall__Outputs { - _call: ConfigureChainlinkCrossChainCall; - - constructor(call: ConfigureChainlinkCrossChainCall) { - this._call = call; - } -} - -export class SetSupportedCrossChainNetworksCall extends ethereum.Call { - get inputs(): SetSupportedCrossChainNetworksCall__Inputs { - return new SetSupportedCrossChainNetworksCall__Inputs(this); - } - - get outputs(): SetSupportedCrossChainNetworksCall__Outputs { - return new SetSupportedCrossChainNetworksCall__Outputs(this); - } -} - -export class SetSupportedCrossChainNetworksCall__Inputs { - _call: SetSupportedCrossChainNetworksCall; - - constructor(call: SetSupportedCrossChainNetworksCall) { - this._call = call; - } - - get supportedNetworks(): Array { - return this._call.inputValues[0].value.toBigIntArray(); - } - - get ccipSelectors(): Array { - return this._call.inputValues[1].value.toBigIntArray(); - } -} - -export class SetSupportedCrossChainNetworksCall__Outputs { - _call: SetSupportedCrossChainNetworksCall; - - constructor(call: SetSupportedCrossChainNetworksCall) { - this._call = call; - } - - get numRegistered(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class _recvCastCall extends ethereum.Call { - get inputs(): _recvCastCall__Inputs { - return new _recvCastCall__Inputs(this); - } - - get outputs(): _recvCastCall__Outputs { - return new _recvCastCall__Outputs(this); - } -} - -export class _recvCastCall__Inputs { - _call: _recvCastCall; - - constructor(call: _recvCastCall) { - this._call = call; - } - - get epochIndex(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get voter(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get votingPower(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get chainId(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get candidates(): Array
{ - return this._call.inputValues[4].value.toAddressArray(); - } - - get amounts(): Array { - return this._call.inputValues[5].value.toBigIntArray(); - } -} - -export class _recvCastCall__Outputs { - _call: _recvCastCall; - - constructor(call: _recvCastCall) { - this._call = call; - } -} - -export class _recvDismissMembersCall extends ethereum.Call { - get inputs(): _recvDismissMembersCall__Inputs { - return new _recvDismissMembersCall__Inputs(this); - } - - get outputs(): _recvDismissMembersCall__Outputs { - return new _recvDismissMembersCall__Outputs(this); - } -} - -export class _recvDismissMembersCall__Inputs { - _call: _recvDismissMembersCall; - - constructor(call: _recvDismissMembersCall) { - this._call = call; - } - - get membersToDismiss(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } - - get epochIndex(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class _recvDismissMembersCall__Outputs { - _call: _recvDismissMembersCall; - - constructor(call: _recvDismissMembersCall) { - this._call = call; - } -} - -export class _recvResolveCall extends ethereum.Call { - get inputs(): _recvResolveCall__Inputs { - return new _recvResolveCall__Inputs(this); - } - - get outputs(): _recvResolveCall__Outputs { - return new _recvResolveCall__Outputs(this); - } -} - -export class _recvResolveCall__Inputs { - _call: _recvResolveCall; - - constructor(call: _recvResolveCall) { - this._call = call; - } - - get epochIndex(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get epochStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get nominationPeriodStartDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get councilMembers(): Array
{ - return this._call.inputValues[5].value.toAddressArray(); - } -} - -export class _recvResolveCall__Outputs { - _call: _recvResolveCall; - - constructor(call: _recvResolveCall) { - this._call = call; - } -} - -export class _recvTweakEpochScheduleCall extends ethereum.Call { - get inputs(): _recvTweakEpochScheduleCall__Inputs { - return new _recvTweakEpochScheduleCall__Inputs(this); - } - - get outputs(): _recvTweakEpochScheduleCall__Outputs { - return new _recvTweakEpochScheduleCall__Outputs(this); - } -} - -export class _recvTweakEpochScheduleCall__Inputs { - _call: _recvTweakEpochScheduleCall; - - constructor(call: _recvTweakEpochScheduleCall) { - this._call = call; - } - - get epochIndex(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get nominationPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } -} - -export class _recvTweakEpochScheduleCall__Outputs { - _call: _recvTweakEpochScheduleCall; - - constructor(call: _recvTweakEpochScheduleCall) { - this._call = call; - } -} - -export class _recvWithdrawVoteCall extends ethereum.Call { - get inputs(): _recvWithdrawVoteCall__Inputs { - return new _recvWithdrawVoteCall__Inputs(this); - } - - get outputs(): _recvWithdrawVoteCall__Outputs { - return new _recvWithdrawVoteCall__Outputs(this); - } -} - -export class _recvWithdrawVoteCall__Inputs { - _call: _recvWithdrawVoteCall; - - constructor(call: _recvWithdrawVoteCall) { - this._call = call; - } - - get epochIndex(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get voter(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get chainId(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get candidates(): Array
{ - return this._call.inputValues[3].value.toAddressArray(); - } -} - -export class _recvWithdrawVoteCall__Outputs { - _call: _recvWithdrawVoteCall; - - constructor(call: _recvWithdrawVoteCall) { - this._call = call; - } -} - -export class CastCall extends ethereum.Call { - get inputs(): CastCall__Inputs { - return new CastCall__Inputs(this); - } - - get outputs(): CastCall__Outputs { - return new CastCall__Outputs(this); - } -} - -export class CastCall__Inputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } - - get candidates(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } - - get amounts(): Array { - return this._call.inputValues[1].value.toBigIntArray(); - } -} - -export class CastCall__Outputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } -} - -export class DismissMembersCall extends ethereum.Call { - get inputs(): DismissMembersCall__Inputs { - return new DismissMembersCall__Inputs(this); - } - - get outputs(): DismissMembersCall__Outputs { - return new DismissMembersCall__Outputs(this); - } -} - -export class DismissMembersCall__Inputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } - - get membersToDismiss(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class DismissMembersCall__Outputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } -} - -export class EvaluateCall extends ethereum.Call { - get inputs(): EvaluateCall__Inputs { - return new EvaluateCall__Inputs(this); - } - - get outputs(): EvaluateCall__Outputs { - return new EvaluateCall__Outputs(this); - } -} - -export class EvaluateCall__Inputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } - - get numBallots(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class EvaluateCall__Outputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } -} - -export class InitElectionModuleSatelliteCall extends ethereum.Call { - get inputs(): InitElectionModuleSatelliteCall__Inputs { - return new InitElectionModuleSatelliteCall__Inputs(this); - } - - get outputs(): InitElectionModuleSatelliteCall__Outputs { - return new InitElectionModuleSatelliteCall__Outputs(this); - } -} - -export class InitElectionModuleSatelliteCall__Inputs { - _call: InitElectionModuleSatelliteCall; - - constructor(call: InitElectionModuleSatelliteCall) { - this._call = call; - } - - get epochIndex(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get epochStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get nominationPeriodStartDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get councilMembers(): Array
{ - return this._call.inputValues[5].value.toAddressArray(); - } -} - -export class InitElectionModuleSatelliteCall__Outputs { - _call: InitElectionModuleSatelliteCall; - - constructor(call: InitElectionModuleSatelliteCall) { - this._call = call; - } -} - -export class InitElectionModuleSatellite1Call extends ethereum.Call { - get inputs(): InitElectionModuleSatellite1Call__Inputs { - return new InitElectionModuleSatellite1Call__Inputs(this); - } - - get outputs(): InitElectionModuleSatellite1Call__Outputs { - return new InitElectionModuleSatellite1Call__Outputs(this); - } -} - -export class InitElectionModuleSatellite1Call__Inputs { - _call: InitElectionModuleSatellite1Call; - - constructor(call: InitElectionModuleSatellite1Call) { - this._call = call; - } -} - -export class InitElectionModuleSatellite1Call__Outputs { - _call: InitElectionModuleSatellite1Call; - - constructor(call: InitElectionModuleSatellite1Call) { - this._call = call; - } -} - -export class InitOrUpdateElectionSettingsCall extends ethereum.Call { - get inputs(): InitOrUpdateElectionSettingsCall__Inputs { - return new InitOrUpdateElectionSettingsCall__Inputs(this); - } - - get outputs(): InitOrUpdateElectionSettingsCall__Outputs { - return new InitOrUpdateElectionSettingsCall__Outputs(this); - } -} - -export class InitOrUpdateElectionSettingsCall__Inputs { - _call: InitOrUpdateElectionSettingsCall; - - constructor(call: InitOrUpdateElectionSettingsCall) { - this._call = call; - } - - get initialCouncil(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } - - get minimumActiveMembers(): i32 { - return this._call.inputValues[1].value.toI32(); - } - - get initialNominationPeriodStartDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get administrationPeriodDuration(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get nominationPeriodDuration(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get votingPeriodDuration(): BigInt { - return this._call.inputValues[5].value.toBigInt(); - } -} - -export class InitOrUpdateElectionSettingsCall__Outputs { - _call: InitOrUpdateElectionSettingsCall; - - constructor(call: InitOrUpdateElectionSettingsCall) { - this._call = call; - } -} - -export class NominateCall extends ethereum.Call { - get inputs(): NominateCall__Inputs { - return new NominateCall__Inputs(this); - } - - get outputs(): NominateCall__Outputs { - return new NominateCall__Outputs(this); - } -} - -export class NominateCall__Inputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class NominateCall__Outputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class ResolveCall extends ethereum.Call { - get inputs(): ResolveCall__Inputs { - return new ResolveCall__Inputs(this); - } - - get outputs(): ResolveCall__Outputs { - return new ResolveCall__Outputs(this); - } -} - -export class ResolveCall__Inputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class ResolveCall__Outputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class SetNextElectionSettingsCall extends ethereum.Call { - get inputs(): SetNextElectionSettingsCall__Inputs { - return new SetNextElectionSettingsCall__Inputs(this); - } - - get outputs(): SetNextElectionSettingsCall__Outputs { - return new SetNextElectionSettingsCall__Outputs(this); - } -} - -export class SetNextElectionSettingsCall__Inputs { - _call: SetNextElectionSettingsCall; - - constructor(call: SetNextElectionSettingsCall) { - this._call = call; - } - - get epochSeatCount(): i32 { - return this._call.inputValues[0].value.toI32(); - } - - get minimumActiveMembers(): i32 { - return this._call.inputValues[1].value.toI32(); - } - - get epochDuration(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get nominationPeriodDuration(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get votingPeriodDuration(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get maxDateAdjustmentTolerance(): BigInt { - return this._call.inputValues[5].value.toBigInt(); - } -} - -export class SetNextElectionSettingsCall__Outputs { - _call: SetNextElectionSettingsCall; - - constructor(call: SetNextElectionSettingsCall) { - this._call = call; - } -} - -export class TweakEpochScheduleCall extends ethereum.Call { - get inputs(): TweakEpochScheduleCall__Inputs { - return new TweakEpochScheduleCall__Inputs(this); - } - - get outputs(): TweakEpochScheduleCall__Outputs { - return new TweakEpochScheduleCall__Outputs(this); - } -} - -export class TweakEpochScheduleCall__Inputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } - - get newNominationPeriodStartDate(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newVotingPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newEpochEndDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class TweakEpochScheduleCall__Outputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } -} - -export class WithdrawNominationCall extends ethereum.Call { - get inputs(): WithdrawNominationCall__Inputs { - return new WithdrawNominationCall__Inputs(this); - } - - get outputs(): WithdrawNominationCall__Outputs { - return new WithdrawNominationCall__Outputs(this); - } -} - -export class WithdrawNominationCall__Inputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawNominationCall__Outputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawVoteCall extends ethereum.Call { - get inputs(): WithdrawVoteCall__Inputs { - return new WithdrawVoteCall__Inputs(this); - } - - get outputs(): WithdrawVoteCall__Outputs { - return new WithdrawVoteCall__Outputs(this); - } -} - -export class WithdrawVoteCall__Inputs { - _call: WithdrawVoteCall; - - constructor(call: WithdrawVoteCall) { - this._call = call; - } - - get candidates(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class WithdrawVoteCall__Outputs { - _call: WithdrawVoteCall; - - constructor(call: WithdrawVoteCall) { - this._call = call; - } -} - -export class PrepareBallotWithSnapshotCall extends ethereum.Call { - get inputs(): PrepareBallotWithSnapshotCall__Inputs { - return new PrepareBallotWithSnapshotCall__Inputs(this); - } - - get outputs(): PrepareBallotWithSnapshotCall__Outputs { - return new PrepareBallotWithSnapshotCall__Outputs(this); - } -} - -export class PrepareBallotWithSnapshotCall__Inputs { - _call: PrepareBallotWithSnapshotCall; - - constructor(call: PrepareBallotWithSnapshotCall) { - this._call = call; - } - - get snapshotContract(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get voter(): Address { - return this._call.inputValues[1].value.toAddress(); - } -} - -export class PrepareBallotWithSnapshotCall__Outputs { - _call: PrepareBallotWithSnapshotCall; - - constructor(call: PrepareBallotWithSnapshotCall) { - this._call = call; - } - - get power(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class SetSnapshotContractCall extends ethereum.Call { - get inputs(): SetSnapshotContractCall__Inputs { - return new SetSnapshotContractCall__Inputs(this); - } - - get outputs(): SetSnapshotContractCall__Outputs { - return new SetSnapshotContractCall__Outputs(this); - } -} - -export class SetSnapshotContractCall__Inputs { - _call: SetSnapshotContractCall; - - constructor(call: SetSnapshotContractCall) { - this._call = call; - } - - get snapshotContract(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get enabled(): boolean { - return this._call.inputValues[1].value.toBoolean(); - } -} - -export class SetSnapshotContractCall__Outputs { - _call: SetSnapshotContractCall; - - constructor(call: SetSnapshotContractCall) { - this._call = call; - } -} - -export class TakeVotePowerSnapshotCall extends ethereum.Call { - get inputs(): TakeVotePowerSnapshotCall__Inputs { - return new TakeVotePowerSnapshotCall__Inputs(this); - } - - get outputs(): TakeVotePowerSnapshotCall__Outputs { - return new TakeVotePowerSnapshotCall__Outputs(this); - } -} - -export class TakeVotePowerSnapshotCall__Inputs { - _call: TakeVotePowerSnapshotCall; - - constructor(call: TakeVotePowerSnapshotCall) { - this._call = call; - } - - get snapshotContract(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class TakeVotePowerSnapshotCall__Outputs { - _call: TakeVotePowerSnapshotCall; - - constructor(call: TakeVotePowerSnapshotCall) { - this._call = call; - } - - get snapshotId(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class AcceptOwnershipCall extends ethereum.Call { - get inputs(): AcceptOwnershipCall__Inputs { - return new AcceptOwnershipCall__Inputs(this); - } - - get outputs(): AcceptOwnershipCall__Outputs { - return new AcceptOwnershipCall__Outputs(this); - } -} - -export class AcceptOwnershipCall__Inputs { - _call: AcceptOwnershipCall; - - constructor(call: AcceptOwnershipCall) { - this._call = call; - } -} - -export class AcceptOwnershipCall__Outputs { - _call: AcceptOwnershipCall; - - constructor(call: AcceptOwnershipCall) { - this._call = call; - } -} - -export class NominateNewOwnerCall extends ethereum.Call { - get inputs(): NominateNewOwnerCall__Inputs { - return new NominateNewOwnerCall__Inputs(this); - } - - get outputs(): NominateNewOwnerCall__Outputs { - return new NominateNewOwnerCall__Outputs(this); - } -} - -export class NominateNewOwnerCall__Inputs { - _call: NominateNewOwnerCall; - - constructor(call: NominateNewOwnerCall) { - this._call = call; - } - - get newNominatedOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class NominateNewOwnerCall__Outputs { - _call: NominateNewOwnerCall; - - constructor(call: NominateNewOwnerCall) { - this._call = call; - } -} - -export class RenounceNominationCall extends ethereum.Call { - get inputs(): RenounceNominationCall__Inputs { - return new RenounceNominationCall__Inputs(this); - } - - get outputs(): RenounceNominationCall__Outputs { - return new RenounceNominationCall__Outputs(this); - } -} - -export class RenounceNominationCall__Inputs { - _call: RenounceNominationCall; - - constructor(call: RenounceNominationCall) { - this._call = call; - } -} - -export class RenounceNominationCall__Outputs { - _call: RenounceNominationCall; - - constructor(call: RenounceNominationCall) { - this._call = call; - } -} - -export class SimulateUpgradeToCall extends ethereum.Call { - get inputs(): SimulateUpgradeToCall__Inputs { - return new SimulateUpgradeToCall__Inputs(this); - } - - get outputs(): SimulateUpgradeToCall__Outputs { - return new SimulateUpgradeToCall__Outputs(this); - } -} - -export class SimulateUpgradeToCall__Inputs { - _call: SimulateUpgradeToCall; - - constructor(call: SimulateUpgradeToCall) { - this._call = call; - } - - get newImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SimulateUpgradeToCall__Outputs { - _call: SimulateUpgradeToCall; - - constructor(call: SimulateUpgradeToCall) { - this._call = call; - } -} - -export class UpgradeToCall extends ethereum.Call { - get inputs(): UpgradeToCall__Inputs { - return new UpgradeToCall__Inputs(this); - } - - get outputs(): UpgradeToCall__Outputs { - return new UpgradeToCall__Outputs(this); - } -} - -export class UpgradeToCall__Inputs { - _call: UpgradeToCall; - - constructor(call: UpgradeToCall) { - this._call = call; - } - - get newImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class UpgradeToCall__Outputs { - _call: UpgradeToCall; - - constructor(call: UpgradeToCall) { - this._call = call; - } -} - -export class CcipReceiveCall extends ethereum.Call { - get inputs(): CcipReceiveCall__Inputs { - return new CcipReceiveCall__Inputs(this); - } - - get outputs(): CcipReceiveCall__Outputs { - return new CcipReceiveCall__Outputs(this); - } -} - -export class CcipReceiveCall__Inputs { - _call: CcipReceiveCall; - - constructor(call: CcipReceiveCall) { - this._call = call; - } - - get message(): CcipReceiveCallMessageStruct { - return changetype( - this._call.inputValues[0].value.toTuple() - ); - } -} - -export class CcipReceiveCall__Outputs { - _call: CcipReceiveCall; - - constructor(call: CcipReceiveCall) { - this._call = call; - } -} - -export class CcipReceiveCallMessageStruct extends ethereum.Tuple { - get messageId(): Bytes { - return this[0].toBytes(); - } - - get sourceChainSelector(): BigInt { - return this[1].toBigInt(); - } - - get sender(): Bytes { - return this[2].toBytes(); - } - - get data(): Bytes { - return this[3].toBytes(); - } - - get tokenAmounts(): Array { - return this[4].toTupleArray(); - } -} - -export class CcipReceiveCallMessageTokenAmountsStruct extends ethereum.Tuple { - get token(): Address { - return this[0].toAddress(); - } - - get amount(): BigInt { - return this[1].toBigInt(); - } -} diff --git a/governance/subgraph/generated/Ambassador/ElectionModuleOld.ts b/governance/subgraph/generated/Ambassador/ElectionModuleOld.ts deleted file mode 100644 index ff16bb4f7..000000000 --- a/governance/subgraph/generated/Ambassador/ElectionModuleOld.ts +++ /dev/null @@ -1,2613 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class CandidateNominated extends ethereum.Event { - get params(): CandidateNominated__Params { - return new CandidateNominated__Params(this); - } -} - -export class CandidateNominated__Params { - _event: CandidateNominated; - - constructor(event: CandidateNominated) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberAdded extends ethereum.Event { - get params(): CouncilMemberAdded__Params { - return new CouncilMemberAdded__Params(this); - } -} - -export class CouncilMemberAdded__Params { - _event: CouncilMemberAdded; - - constructor(event: CouncilMemberAdded) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberRemoved extends ethereum.Event { - get params(): CouncilMemberRemoved__Params { - return new CouncilMemberRemoved__Params(this); - } -} - -export class CouncilMemberRemoved__Params { - _event: CouncilMemberRemoved; - - constructor(event: CouncilMemberRemoved) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMembersDismissed extends ethereum.Event { - get params(): CouncilMembersDismissed__Params { - return new CouncilMembersDismissed__Params(this); - } -} - -export class CouncilMembersDismissed__Params { - _event: CouncilMembersDismissed; - - constructor(event: CouncilMembersDismissed) { - this._event = event; - } - - get members(): Array
{ - return this._event.parameters[0].value.toAddressArray(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilTokenCreated extends ethereum.Event { - get params(): CouncilTokenCreated__Params { - return new CouncilTokenCreated__Params(this); - } -} - -export class CouncilTokenCreated__Params { - _event: CouncilTokenCreated; - - constructor(event: CouncilTokenCreated) { - this._event = event; - } - - get proxy(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get implementation(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class CouncilTokenUpgraded extends ethereum.Event { - get params(): CouncilTokenUpgraded__Params { - return new CouncilTokenUpgraded__Params(this); - } -} - -export class CouncilTokenUpgraded__Params { - _event: CouncilTokenUpgraded; - - constructor(event: CouncilTokenUpgraded) { - this._event = event; - } - - get newImplementation(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class DefaultBallotEvaluationBatchSizeChanged extends ethereum.Event { - get params(): DefaultBallotEvaluationBatchSizeChanged__Params { - return new DefaultBallotEvaluationBatchSizeChanged__Params(this); - } -} - -export class DefaultBallotEvaluationBatchSizeChanged__Params { - _event: DefaultBallotEvaluationBatchSizeChanged; - - constructor(event: DefaultBallotEvaluationBatchSizeChanged) { - this._event = event; - } - - get size(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class ElectionBatchEvaluated extends ethereum.Event { - get params(): ElectionBatchEvaluated__Params { - return new ElectionBatchEvaluated__Params(this); - } -} - -export class ElectionBatchEvaluated__Params { - _event: ElectionBatchEvaluated; - - constructor(event: ElectionBatchEvaluated) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get evaluatedBallots(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get totalBallots(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class ElectionEvaluated extends ethereum.Event { - get params(): ElectionEvaluated__Params { - return new ElectionEvaluated__Params(this); - } -} - -export class ElectionEvaluated__Params { - _event: ElectionEvaluated; - - constructor(event: ElectionEvaluated) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get totalBallots(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class ElectionModuleInitialized extends ethereum.Event { - get params(): ElectionModuleInitialized__Params { - return new ElectionModuleInitialized__Params(this); - } -} - -export class ElectionModuleInitialized__Params { - _event: ElectionModuleInitialized; - - constructor(event: ElectionModuleInitialized) { - this._event = event; - } -} - -export class EmergencyElectionStarted extends ethereum.Event { - get params(): EmergencyElectionStarted__Params { - return new EmergencyElectionStarted__Params(this); - } -} - -export class EmergencyElectionStarted__Params { - _event: EmergencyElectionStarted; - - constructor(event: EmergencyElectionStarted) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class EpochScheduleUpdated extends ethereum.Event { - get params(): EpochScheduleUpdated__Params { - return new EpochScheduleUpdated__Params(this); - } -} - -export class EpochScheduleUpdated__Params { - _event: EpochScheduleUpdated; - - constructor(event: EpochScheduleUpdated) { - this._event = event; - } - - get nominationPeriodStartDate(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class EpochStarted extends ethereum.Event { - get params(): EpochStarted__Params { - return new EpochStarted__Params(this); - } -} - -export class EpochStarted__Params { - _event: EpochStarted; - - constructor(event: EpochStarted) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class MaxDateAdjustmentToleranceChanged extends ethereum.Event { - get params(): MaxDateAdjustmentToleranceChanged__Params { - return new MaxDateAdjustmentToleranceChanged__Params(this); - } -} - -export class MaxDateAdjustmentToleranceChanged__Params { - _event: MaxDateAdjustmentToleranceChanged; - - constructor(event: MaxDateAdjustmentToleranceChanged) { - this._event = event; - } - - get tolerance(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class MinimumActiveMembersChanged extends ethereum.Event { - get params(): MinimumActiveMembersChanged__Params { - return new MinimumActiveMembersChanged__Params(this); - } -} - -export class MinimumActiveMembersChanged__Params { - _event: MinimumActiveMembersChanged; - - constructor(event: MinimumActiveMembersChanged) { - this._event = event; - } - - get minimumActiveMembers(): i32 { - return this._event.parameters[0].value.toI32(); - } -} - -export class MinimumEpochDurationsChanged extends ethereum.Event { - get params(): MinimumEpochDurationsChanged__Params { - return new MinimumEpochDurationsChanged__Params(this); - } -} - -export class MinimumEpochDurationsChanged__Params { - _event: MinimumEpochDurationsChanged; - - constructor(event: MinimumEpochDurationsChanged) { - this._event = event; - } - - get minNominationPeriodDuration(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get minVotingPeriodDuration(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get minEpochDuration(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class NextEpochSeatCountChanged extends ethereum.Event { - get params(): NextEpochSeatCountChanged__Params { - return new NextEpochSeatCountChanged__Params(this); - } -} - -export class NextEpochSeatCountChanged__Params { - _event: NextEpochSeatCountChanged; - - constructor(event: NextEpochSeatCountChanged) { - this._event = event; - } - - get seatCount(): i32 { - return this._event.parameters[0].value.toI32(); - } -} - -export class NominationWithdrawn extends ethereum.Event { - get params(): NominationWithdrawn__Params { - return new NominationWithdrawn__Params(this); - } -} - -export class NominationWithdrawn__Params { - _event: NominationWithdrawn; - - constructor(event: NominationWithdrawn) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class VoteRecorded extends ethereum.Event { - get params(): VoteRecorded__Params { - return new VoteRecorded__Params(this); - } -} - -export class VoteRecorded__Params { - _event: VoteRecorded; - - constructor(event: VoteRecorded) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get ballotId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } - - get epochIndex(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get votePower(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class VoteWithdrawn extends ethereum.Event { - get params(): VoteWithdrawn__Params { - return new VoteWithdrawn__Params(this); - } -} - -export class VoteWithdrawn__Params { - _event: VoteWithdrawn; - - constructor(event: VoteWithdrawn) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get ballotId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } - - get epochIndex(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get votePower(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class CrossChainDebtShareDeclared extends ethereum.Event { - get params(): CrossChainDebtShareDeclared__Params { - return new CrossChainDebtShareDeclared__Params(this); - } -} - -export class CrossChainDebtShareDeclared__Params { - _event: CrossChainDebtShareDeclared; - - constructor(event: CrossChainDebtShareDeclared) { - this._event = event; - } - - get user(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get debtShare(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CrossChainDebtShareMerkleRootSet extends ethereum.Event { - get params(): CrossChainDebtShareMerkleRootSet__Params { - return new CrossChainDebtShareMerkleRootSet__Params(this); - } -} - -export class CrossChainDebtShareMerkleRootSet__Params { - _event: CrossChainDebtShareMerkleRootSet; - - constructor(event: CrossChainDebtShareMerkleRootSet) { - this._event = event; - } - - get merkleRoot(): Bytes { - return this._event.parameters[0].value.toBytes(); - } - - get blocknumber(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epoch(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class DebtShareContractSet extends ethereum.Event { - get params(): DebtShareContractSet__Params { - return new DebtShareContractSet__Params(this); - } -} - -export class DebtShareContractSet__Params { - _event: DebtShareContractSet; - - constructor(event: DebtShareContractSet) { - this._event = event; - } - - get contractAddress(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class DebtShareSnapshotIdSet extends ethereum.Event { - get params(): DebtShareSnapshotIdSet__Params { - return new DebtShareSnapshotIdSet__Params(this); - } -} - -export class DebtShareSnapshotIdSet__Params { - _event: DebtShareSnapshotIdSet; - - constructor(event: DebtShareSnapshotIdSet) { - this._event = event; - } - - get snapshotId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class OwnerChanged extends ethereum.Event { - get params(): OwnerChanged__Params { - return new OwnerChanged__Params(this); - } -} - -export class OwnerChanged__Params { - _event: OwnerChanged; - - constructor(event: OwnerChanged) { - this._event = event; - } - - get oldOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get newOwner(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class OwnerNominated extends ethereum.Event { - get params(): OwnerNominated__Params { - return new OwnerNominated__Params(this); - } -} - -export class OwnerNominated__Params { - _event: OwnerNominated; - - constructor(event: OwnerNominated) { - this._event = event; - } - - get newOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class Upgraded extends ethereum.Event { - get params(): Upgraded__Params { - return new Upgraded__Params(this); - } -} - -export class Upgraded__Params { - _event: Upgraded; - - constructor(event: Upgraded) { - this._event = event; - } - - get implementation(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class ElectionModuleOld__getMinEpochDurationsResult { - value0: BigInt; - value1: BigInt; - value2: BigInt; - - constructor(value0: BigInt, value1: BigInt, value2: BigInt) { - this.value0 = value0; - this.value1 = value1; - this.value2 = value2; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - map.set("value2", ethereum.Value.fromUnsignedBigInt(this.value2)); - return map; - } - - getMinNominationPeriodDuration(): BigInt { - return this.value0; - } - - getMinVotingPeriodDuration(): BigInt { - return this.value1; - } - - getMinEpochDuration(): BigInt { - return this.value2; - } -} - -export class ElectionModuleOld extends ethereum.SmartContract { - static bind(address: Address): ElectionModuleOld { - return new ElectionModuleOld("ElectionModuleOld", address); - } - - getBallotCandidatesInEpoch( - ballotId: Bytes, - epochIndex: BigInt - ): Array
{ - let result = super.call( - "getBallotCandidatesInEpoch", - "getBallotCandidatesInEpoch(bytes32,uint256):(address[])", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toAddressArray(); - } - - try_getBallotCandidatesInEpoch( - ballotId: Bytes, - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getBallotCandidatesInEpoch", - "getBallotCandidatesInEpoch(bytes32,uint256):(address[])", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getBallotVotedAtEpoch(user: Address, epochIndex: BigInt): Bytes { - let result = super.call( - "getBallotVotedAtEpoch", - "getBallotVotedAtEpoch(address,uint256):(bytes32)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBytes(); - } - - try_getBallotVotedAtEpoch( - user: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getBallotVotedAtEpoch", - "getBallotVotedAtEpoch(address,uint256):(bytes32)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getBallotVotesInEpoch(ballotId: Bytes, epochIndex: BigInt): BigInt { - let result = super.call( - "getBallotVotesInEpoch", - "getBallotVotesInEpoch(bytes32,uint256):(uint256)", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBigInt(); - } - - try_getBallotVotesInEpoch( - ballotId: Bytes, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getBallotVotesInEpoch", - "getBallotVotesInEpoch(bytes32,uint256):(uint256)", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCandidateVotesInEpoch(candidate: Address, epochIndex: BigInt): BigInt { - let result = super.call( - "getCandidateVotesInEpoch", - "getCandidateVotesInEpoch(address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotesInEpoch( - candidate: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotesInEpoch", - "getCandidateVotesInEpoch(address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionWinnersInEpoch(epochIndex: BigInt): Array
{ - let result = super.call( - "getElectionWinnersInEpoch", - "getElectionWinnersInEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinnersInEpoch( - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinnersInEpoch", - "getElectionWinnersInEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochEndDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getEpochEndDateForIndex", - "getEpochEndDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getEpochEndDateForIndex(epochIndex: BigInt): ethereum.CallResult { - let result = super.tryCall( - "getEpochEndDateForIndex", - "getEpochEndDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getEpochStartDateForIndex", - "getEpochStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getEpochStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getEpochStartDateForIndex", - "getEpochStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNominationPeriodStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getNominationPeriodStartDateForIndex", - "getNominationPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getNominationPeriodStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getNominationPeriodStartDateForIndex", - "getNominationPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNomineesAtEpoch(epochIndex: BigInt): Array
{ - let result = super.call( - "getNomineesAtEpoch", - "getNomineesAtEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toAddressArray(); - } - - try_getNomineesAtEpoch( - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getNomineesAtEpoch", - "getNomineesAtEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotingPeriodStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getVotingPeriodStartDateForIndex", - "getVotingPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getVotingPeriodStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getVotingPeriodStartDateForIndex", - "getVotingPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVotedInEpoch(user: Address, epochIndex: BigInt): boolean { - let result = super.call( - "hasVotedInEpoch", - "hasVotedInEpoch(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBoolean(); - } - - try_hasVotedInEpoch( - user: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "hasVotedInEpoch", - "hasVotedInEpoch(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - wasNominated(candidate: Address, epochIndex: BigInt): boolean { - let result = super.call( - "wasNominated", - "wasNominated(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBoolean(); - } - - try_wasNominated( - candidate: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "wasNominated", - "wasNominated(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - calculateBallotId(candidates: Array
): Bytes { - let result = super.call( - "calculateBallotId", - "calculateBallotId(address[]):(bytes32)", - [ethereum.Value.fromAddressArray(candidates)] - ); - - return result[0].toBytes(); - } - - try_calculateBallotId( - candidates: Array
- ): ethereum.CallResult { - let result = super.tryCall( - "calculateBallotId", - "calculateBallotId(address[]):(bytes32)", - [ethereum.Value.fromAddressArray(candidates)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getBallotCandidates(ballotId: Bytes): Array
{ - let result = super.call( - "getBallotCandidates", - "getBallotCandidates(bytes32):(address[])", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - - return result[0].toAddressArray(); - } - - try_getBallotCandidates( - ballotId: Bytes - ): ethereum.CallResult> { - let result = super.tryCall( - "getBallotCandidates", - "getBallotCandidates(bytes32):(address[])", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getBallotVoted(user: Address): Bytes { - let result = super.call( - "getBallotVoted", - "getBallotVoted(address):(bytes32)", - [ethereum.Value.fromAddress(user)] - ); - - return result[0].toBytes(); - } - - try_getBallotVoted(user: Address): ethereum.CallResult { - let result = super.tryCall( - "getBallotVoted", - "getBallotVoted(address):(bytes32)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getBallotVotes(ballotId: Bytes): BigInt { - let result = super.call( - "getBallotVotes", - "getBallotVotes(bytes32):(uint256)", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - - return result[0].toBigInt(); - } - - try_getBallotVotes(ballotId: Bytes): ethereum.CallResult { - let result = super.tryCall( - "getBallotVotes", - "getBallotVotes(bytes32):(uint256)", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCandidateVotes(candidate: Address): BigInt { - let result = super.call( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotes(candidate: Address): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCouncilMembers(): Array
{ - let result = super.call( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getCouncilMembers(): ethereum.CallResult> { - let result = super.tryCall( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getCouncilToken(): Address { - let result = super.call( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getCouncilToken(): ethereum.CallResult
{ - let result = super.tryCall( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getCrossChainDebtShareMerkleRoot(): Bytes { - let result = super.call( - "getCrossChainDebtShareMerkleRoot", - "getCrossChainDebtShareMerkleRoot():(bytes32)", - [] - ); - - return result[0].toBytes(); - } - - try_getCrossChainDebtShareMerkleRoot(): ethereum.CallResult { - let result = super.tryCall( - "getCrossChainDebtShareMerkleRoot", - "getCrossChainDebtShareMerkleRoot():(bytes32)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getCrossChainDebtShareMerkleRootBlockNumber(): BigInt { - let result = super.call( - "getCrossChainDebtShareMerkleRootBlockNumber", - "getCrossChainDebtShareMerkleRootBlockNumber():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getCrossChainDebtShareMerkleRootBlockNumber(): ethereum.CallResult< - BigInt - > { - let result = super.tryCall( - "getCrossChainDebtShareMerkleRootBlockNumber", - "getCrossChainDebtShareMerkleRootBlockNumber():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCurrentPeriod(): BigInt { - let result = super.call( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getCurrentPeriod(): ethereum.CallResult { - let result = super.tryCall( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDebtShare(user: Address): BigInt { - let result = super.call("getDebtShare", "getDebtShare(address):(uint256)", [ - ethereum.Value.fromAddress(user) - ]); - - return result[0].toBigInt(); - } - - try_getDebtShare(user: Address): ethereum.CallResult { - let result = super.tryCall( - "getDebtShare", - "getDebtShare(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDebtShareContract(): Address { - let result = super.call( - "getDebtShareContract", - "getDebtShareContract():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getDebtShareContract(): ethereum.CallResult
{ - let result = super.tryCall( - "getDebtShareContract", - "getDebtShareContract():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getDebtShareSnapshotId(): BigInt { - let result = super.call( - "getDebtShareSnapshotId", - "getDebtShareSnapshotId():(uint128)", - [] - ); - - return result[0].toBigInt(); - } - - try_getDebtShareSnapshotId(): ethereum.CallResult { - let result = super.tryCall( - "getDebtShareSnapshotId", - "getDebtShareSnapshotId():(uint128)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDeclaredCrossChainDebtShare(user: Address): BigInt { - let result = super.call( - "getDeclaredCrossChainDebtShare", - "getDeclaredCrossChainDebtShare(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - - return result[0].toBigInt(); - } - - try_getDeclaredCrossChainDebtShare( - user: Address - ): ethereum.CallResult { - let result = super.tryCall( - "getDeclaredCrossChainDebtShare", - "getDeclaredCrossChainDebtShare(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDefaultBallotEvaluationBatchSize(): BigInt { - let result = super.call( - "getDefaultBallotEvaluationBatchSize", - "getDefaultBallotEvaluationBatchSize():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getDefaultBallotEvaluationBatchSize(): ethereum.CallResult { - let result = super.tryCall( - "getDefaultBallotEvaluationBatchSize", - "getDefaultBallotEvaluationBatchSize():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionWinners(): Array
{ - let result = super.call( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinners(): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochEndDate(): BigInt { - let result = super.call( - "getEpochEndDate", - "getEpochEndDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getEpochEndDate(): ethereum.CallResult { - let result = super.tryCall( - "getEpochEndDate", - "getEpochEndDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochIndex(): BigInt { - let result = super.call("getEpochIndex", "getEpochIndex():(uint256)", []); - - return result[0].toBigInt(); - } - - try_getEpochIndex(): ethereum.CallResult { - let result = super.tryCall( - "getEpochIndex", - "getEpochIndex():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochStartDate(): BigInt { - let result = super.call( - "getEpochStartDate", - "getEpochStartDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getEpochStartDate(): ethereum.CallResult { - let result = super.tryCall( - "getEpochStartDate", - "getEpochStartDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getMaxDateAdjustmenTolerance(): BigInt { - let result = super.call( - "getMaxDateAdjustmenTolerance", - "getMaxDateAdjustmenTolerance():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getMaxDateAdjustmenTolerance(): ethereum.CallResult { - let result = super.tryCall( - "getMaxDateAdjustmenTolerance", - "getMaxDateAdjustmenTolerance():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getMinEpochDurations(): ElectionModuleOld__getMinEpochDurationsResult { - let result = super.call( - "getMinEpochDurations", - "getMinEpochDurations():(uint64,uint64,uint64)", - [] - ); - - return new ElectionModuleOld__getMinEpochDurationsResult( - result[0].toBigInt(), - result[1].toBigInt(), - result[2].toBigInt() - ); - } - - try_getMinEpochDurations(): ethereum.CallResult< - ElectionModuleOld__getMinEpochDurationsResult - > { - let result = super.tryCall( - "getMinEpochDurations", - "getMinEpochDurations():(uint64,uint64,uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new ElectionModuleOld__getMinEpochDurationsResult( - value[0].toBigInt(), - value[1].toBigInt(), - value[2].toBigInt() - ) - ); - } - - getMinimumActiveMembers(): i32 { - let result = super.call( - "getMinimumActiveMembers", - "getMinimumActiveMembers():(uint8)", - [] - ); - - return result[0].toI32(); - } - - try_getMinimumActiveMembers(): ethereum.CallResult { - let result = super.tryCall( - "getMinimumActiveMembers", - "getMinimumActiveMembers():(uint8)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toI32()); - } - - getNextEpochSeatCount(): i32 { - let result = super.call( - "getNextEpochSeatCount", - "getNextEpochSeatCount():(uint8)", - [] - ); - - return result[0].toI32(); - } - - try_getNextEpochSeatCount(): ethereum.CallResult { - let result = super.tryCall( - "getNextEpochSeatCount", - "getNextEpochSeatCount():(uint8)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toI32()); - } - - getNominationPeriodStartDate(): BigInt { - let result = super.call( - "getNominationPeriodStartDate", - "getNominationPeriodStartDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getNominationPeriodStartDate(): ethereum.CallResult { - let result = super.tryCall( - "getNominationPeriodStartDate", - "getNominationPeriodStartDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNominees(): Array
{ - let result = super.call("getNominees", "getNominees():(address[])", []); - - return result[0].toAddressArray(); - } - - try_getNominees(): ethereum.CallResult> { - let result = super.tryCall("getNominees", "getNominees():(address[])", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotePower(user: Address): BigInt { - let result = super.call("getVotePower", "getVotePower(address):(uint256)", [ - ethereum.Value.fromAddress(user) - ]); - - return result[0].toBigInt(); - } - - try_getVotePower(user: Address): ethereum.CallResult { - let result = super.tryCall( - "getVotePower", - "getVotePower(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getVotingPeriodStartDate(): BigInt { - let result = super.call( - "getVotingPeriodStartDate", - "getVotingPeriodStartDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getVotingPeriodStartDate(): ethereum.CallResult { - let result = super.tryCall( - "getVotingPeriodStartDate", - "getVotingPeriodStartDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVoted(user: Address): boolean { - let result = super.call("hasVoted", "hasVoted(address):(bool)", [ - ethereum.Value.fromAddress(user) - ]); - - return result[0].toBoolean(); - } - - try_hasVoted(user: Address): ethereum.CallResult { - let result = super.tryCall("hasVoted", "hasVoted(address):(bool)", [ - ethereum.Value.fromAddress(user) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionEvaluated(): boolean { - let result = super.call( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionEvaluated(): ethereum.CallResult { - let result = super.tryCall( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionModuleInitialized(): boolean { - let result = super.call( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionModuleInitialized(): ethereum.CallResult { - let result = super.tryCall( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isNominated(candidate: Address): boolean { - let result = super.call("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - - return result[0].toBoolean(); - } - - try_isNominated(candidate: Address): ethereum.CallResult { - let result = super.tryCall("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isOwnerModuleInitialized(): boolean { - let result = super.call( - "isOwnerModuleInitialized", - "isOwnerModuleInitialized():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isOwnerModuleInitialized(): ethereum.CallResult { - let result = super.tryCall( - "isOwnerModuleInitialized", - "isOwnerModuleInitialized():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - nominatedOwner(): Address { - let result = super.call("nominatedOwner", "nominatedOwner():(address)", []); - - return result[0].toAddress(); - } - - try_nominatedOwner(): ethereum.CallResult
{ - let result = super.tryCall( - "nominatedOwner", - "nominatedOwner():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - owner(): Address { - let result = super.call("owner", "owner():(address)", []); - - return result[0].toAddress(); - } - - try_owner(): ethereum.CallResult
{ - let result = super.tryCall("owner", "owner():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getImplementation(): Address { - let result = super.call( - "getImplementation", - "getImplementation():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getImplementation(): ethereum.CallResult
{ - let result = super.tryCall( - "getImplementation", - "getImplementation():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } -} - -export class CastCall extends ethereum.Call { - get inputs(): CastCall__Inputs { - return new CastCall__Inputs(this); - } - - get outputs(): CastCall__Outputs { - return new CastCall__Outputs(this); - } -} - -export class CastCall__Inputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } - - get candidates(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class CastCall__Outputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } -} - -export class DeclareAndCastCall extends ethereum.Call { - get inputs(): DeclareAndCastCall__Inputs { - return new DeclareAndCastCall__Inputs(this); - } - - get outputs(): DeclareAndCastCall__Outputs { - return new DeclareAndCastCall__Outputs(this); - } -} - -export class DeclareAndCastCall__Inputs { - _call: DeclareAndCastCall; - - constructor(call: DeclareAndCastCall) { - this._call = call; - } - - get debtShare(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get merkleProof(): Array { - return this._call.inputValues[1].value.toBytesArray(); - } - - get candidates(): Array
{ - return this._call.inputValues[2].value.toAddressArray(); - } -} - -export class DeclareAndCastCall__Outputs { - _call: DeclareAndCastCall; - - constructor(call: DeclareAndCastCall) { - this._call = call; - } -} - -export class DeclareCrossChainDebtShareCall extends ethereum.Call { - get inputs(): DeclareCrossChainDebtShareCall__Inputs { - return new DeclareCrossChainDebtShareCall__Inputs(this); - } - - get outputs(): DeclareCrossChainDebtShareCall__Outputs { - return new DeclareCrossChainDebtShareCall__Outputs(this); - } -} - -export class DeclareCrossChainDebtShareCall__Inputs { - _call: DeclareCrossChainDebtShareCall; - - constructor(call: DeclareCrossChainDebtShareCall) { - this._call = call; - } - - get user(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get debtShare(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get merkleProof(): Array { - return this._call.inputValues[2].value.toBytesArray(); - } -} - -export class DeclareCrossChainDebtShareCall__Outputs { - _call: DeclareCrossChainDebtShareCall; - - constructor(call: DeclareCrossChainDebtShareCall) { - this._call = call; - } -} - -export class DismissMembersCall extends ethereum.Call { - get inputs(): DismissMembersCall__Inputs { - return new DismissMembersCall__Inputs(this); - } - - get outputs(): DismissMembersCall__Outputs { - return new DismissMembersCall__Outputs(this); - } -} - -export class DismissMembersCall__Inputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } - - get membersToDismiss(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class DismissMembersCall__Outputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } -} - -export class EvaluateCall extends ethereum.Call { - get inputs(): EvaluateCall__Inputs { - return new EvaluateCall__Inputs(this); - } - - get outputs(): EvaluateCall__Outputs { - return new EvaluateCall__Outputs(this); - } -} - -export class EvaluateCall__Inputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } - - get numBallots(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class EvaluateCall__Outputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } -} - -export class InitializeElectionModuleCall extends ethereum.Call { - get inputs(): InitializeElectionModuleCall__Inputs { - return new InitializeElectionModuleCall__Inputs(this); - } - - get outputs(): InitializeElectionModuleCall__Outputs { - return new InitializeElectionModuleCall__Outputs(this); - } -} - -export class InitializeElectionModuleCall__Inputs { - _call: InitializeElectionModuleCall; - - constructor(call: InitializeElectionModuleCall) { - this._call = call; - } - - get councilTokenName(): string { - return this._call.inputValues[0].value.toString(); - } - - get councilTokenSymbol(): string { - return this._call.inputValues[1].value.toString(); - } - - get firstCouncil(): Array
{ - return this._call.inputValues[2].value.toAddressArray(); - } - - get minimumActiveMembers(): i32 { - return this._call.inputValues[3].value.toI32(); - } - - get nominationPeriodStartDate(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._call.inputValues[5].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._call.inputValues[6].value.toBigInt(); - } - - get debtShareContract(): Address { - return this._call.inputValues[7].value.toAddress(); - } -} - -export class InitializeElectionModuleCall__Outputs { - _call: InitializeElectionModuleCall; - - constructor(call: InitializeElectionModuleCall) { - this._call = call; - } -} - -export class ModifyEpochScheduleCall extends ethereum.Call { - get inputs(): ModifyEpochScheduleCall__Inputs { - return new ModifyEpochScheduleCall__Inputs(this); - } - - get outputs(): ModifyEpochScheduleCall__Outputs { - return new ModifyEpochScheduleCall__Outputs(this); - } -} - -export class ModifyEpochScheduleCall__Inputs { - _call: ModifyEpochScheduleCall; - - constructor(call: ModifyEpochScheduleCall) { - this._call = call; - } - - get newNominationPeriodStartDate(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newVotingPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newEpochEndDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class ModifyEpochScheduleCall__Outputs { - _call: ModifyEpochScheduleCall; - - constructor(call: ModifyEpochScheduleCall) { - this._call = call; - } -} - -export class NominateCall extends ethereum.Call { - get inputs(): NominateCall__Inputs { - return new NominateCall__Inputs(this); - } - - get outputs(): NominateCall__Outputs { - return new NominateCall__Outputs(this); - } -} - -export class NominateCall__Inputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class NominateCall__Outputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class ResolveCall extends ethereum.Call { - get inputs(): ResolveCall__Inputs { - return new ResolveCall__Inputs(this); - } - - get outputs(): ResolveCall__Outputs { - return new ResolveCall__Outputs(this); - } -} - -export class ResolveCall__Inputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class ResolveCall__Outputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class SetCrossChainDebtShareMerkleRootCall extends ethereum.Call { - get inputs(): SetCrossChainDebtShareMerkleRootCall__Inputs { - return new SetCrossChainDebtShareMerkleRootCall__Inputs(this); - } - - get outputs(): SetCrossChainDebtShareMerkleRootCall__Outputs { - return new SetCrossChainDebtShareMerkleRootCall__Outputs(this); - } -} - -export class SetCrossChainDebtShareMerkleRootCall__Inputs { - _call: SetCrossChainDebtShareMerkleRootCall; - - constructor(call: SetCrossChainDebtShareMerkleRootCall) { - this._call = call; - } - - get merkleRoot(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get blocknumber(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class SetCrossChainDebtShareMerkleRootCall__Outputs { - _call: SetCrossChainDebtShareMerkleRootCall; - - constructor(call: SetCrossChainDebtShareMerkleRootCall) { - this._call = call; - } -} - -export class SetDebtShareContractCall extends ethereum.Call { - get inputs(): SetDebtShareContractCall__Inputs { - return new SetDebtShareContractCall__Inputs(this); - } - - get outputs(): SetDebtShareContractCall__Outputs { - return new SetDebtShareContractCall__Outputs(this); - } -} - -export class SetDebtShareContractCall__Inputs { - _call: SetDebtShareContractCall; - - constructor(call: SetDebtShareContractCall) { - this._call = call; - } - - get debtShareContract(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SetDebtShareContractCall__Outputs { - _call: SetDebtShareContractCall; - - constructor(call: SetDebtShareContractCall) { - this._call = call; - } -} - -export class SetDebtShareSnapshotIdCall extends ethereum.Call { - get inputs(): SetDebtShareSnapshotIdCall__Inputs { - return new SetDebtShareSnapshotIdCall__Inputs(this); - } - - get outputs(): SetDebtShareSnapshotIdCall__Outputs { - return new SetDebtShareSnapshotIdCall__Outputs(this); - } -} - -export class SetDebtShareSnapshotIdCall__Inputs { - _call: SetDebtShareSnapshotIdCall; - - constructor(call: SetDebtShareSnapshotIdCall) { - this._call = call; - } - - get snapshotId(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetDebtShareSnapshotIdCall__Outputs { - _call: SetDebtShareSnapshotIdCall; - - constructor(call: SetDebtShareSnapshotIdCall) { - this._call = call; - } -} - -export class SetDefaultBallotEvaluationBatchSizeCall extends ethereum.Call { - get inputs(): SetDefaultBallotEvaluationBatchSizeCall__Inputs { - return new SetDefaultBallotEvaluationBatchSizeCall__Inputs(this); - } - - get outputs(): SetDefaultBallotEvaluationBatchSizeCall__Outputs { - return new SetDefaultBallotEvaluationBatchSizeCall__Outputs(this); - } -} - -export class SetDefaultBallotEvaluationBatchSizeCall__Inputs { - _call: SetDefaultBallotEvaluationBatchSizeCall; - - constructor(call: SetDefaultBallotEvaluationBatchSizeCall) { - this._call = call; - } - - get newDefaultBallotEvaluationBatchSize(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetDefaultBallotEvaluationBatchSizeCall__Outputs { - _call: SetDefaultBallotEvaluationBatchSizeCall; - - constructor(call: SetDefaultBallotEvaluationBatchSizeCall) { - this._call = call; - } -} - -export class SetMaxDateAdjustmentToleranceCall extends ethereum.Call { - get inputs(): SetMaxDateAdjustmentToleranceCall__Inputs { - return new SetMaxDateAdjustmentToleranceCall__Inputs(this); - } - - get outputs(): SetMaxDateAdjustmentToleranceCall__Outputs { - return new SetMaxDateAdjustmentToleranceCall__Outputs(this); - } -} - -export class SetMaxDateAdjustmentToleranceCall__Inputs { - _call: SetMaxDateAdjustmentToleranceCall; - - constructor(call: SetMaxDateAdjustmentToleranceCall) { - this._call = call; - } - - get newMaxDateAdjustmentTolerance(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetMaxDateAdjustmentToleranceCall__Outputs { - _call: SetMaxDateAdjustmentToleranceCall; - - constructor(call: SetMaxDateAdjustmentToleranceCall) { - this._call = call; - } -} - -export class SetMinEpochDurationsCall extends ethereum.Call { - get inputs(): SetMinEpochDurationsCall__Inputs { - return new SetMinEpochDurationsCall__Inputs(this); - } - - get outputs(): SetMinEpochDurationsCall__Outputs { - return new SetMinEpochDurationsCall__Outputs(this); - } -} - -export class SetMinEpochDurationsCall__Inputs { - _call: SetMinEpochDurationsCall; - - constructor(call: SetMinEpochDurationsCall) { - this._call = call; - } - - get newMinNominationPeriodDuration(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newMinVotingPeriodDuration(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newMinEpochDuration(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class SetMinEpochDurationsCall__Outputs { - _call: SetMinEpochDurationsCall; - - constructor(call: SetMinEpochDurationsCall) { - this._call = call; - } -} - -export class SetMinimumActiveMembersCall extends ethereum.Call { - get inputs(): SetMinimumActiveMembersCall__Inputs { - return new SetMinimumActiveMembersCall__Inputs(this); - } - - get outputs(): SetMinimumActiveMembersCall__Outputs { - return new SetMinimumActiveMembersCall__Outputs(this); - } -} - -export class SetMinimumActiveMembersCall__Inputs { - _call: SetMinimumActiveMembersCall; - - constructor(call: SetMinimumActiveMembersCall) { - this._call = call; - } - - get newMinimumActiveMembers(): i32 { - return this._call.inputValues[0].value.toI32(); - } -} - -export class SetMinimumActiveMembersCall__Outputs { - _call: SetMinimumActiveMembersCall; - - constructor(call: SetMinimumActiveMembersCall) { - this._call = call; - } -} - -export class SetNextEpochSeatCountCall extends ethereum.Call { - get inputs(): SetNextEpochSeatCountCall__Inputs { - return new SetNextEpochSeatCountCall__Inputs(this); - } - - get outputs(): SetNextEpochSeatCountCall__Outputs { - return new SetNextEpochSeatCountCall__Outputs(this); - } -} - -export class SetNextEpochSeatCountCall__Inputs { - _call: SetNextEpochSeatCountCall; - - constructor(call: SetNextEpochSeatCountCall) { - this._call = call; - } - - get newSeatCount(): i32 { - return this._call.inputValues[0].value.toI32(); - } -} - -export class SetNextEpochSeatCountCall__Outputs { - _call: SetNextEpochSeatCountCall; - - constructor(call: SetNextEpochSeatCountCall) { - this._call = call; - } -} - -export class TweakEpochScheduleCall extends ethereum.Call { - get inputs(): TweakEpochScheduleCall__Inputs { - return new TweakEpochScheduleCall__Inputs(this); - } - - get outputs(): TweakEpochScheduleCall__Outputs { - return new TweakEpochScheduleCall__Outputs(this); - } -} - -export class TweakEpochScheduleCall__Inputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } - - get newNominationPeriodStartDate(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newVotingPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newEpochEndDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class TweakEpochScheduleCall__Outputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } -} - -export class UpgradeCouncilTokenCall extends ethereum.Call { - get inputs(): UpgradeCouncilTokenCall__Inputs { - return new UpgradeCouncilTokenCall__Inputs(this); - } - - get outputs(): UpgradeCouncilTokenCall__Outputs { - return new UpgradeCouncilTokenCall__Outputs(this); - } -} - -export class UpgradeCouncilTokenCall__Inputs { - _call: UpgradeCouncilTokenCall; - - constructor(call: UpgradeCouncilTokenCall) { - this._call = call; - } - - get newCouncilTokenImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class UpgradeCouncilTokenCall__Outputs { - _call: UpgradeCouncilTokenCall; - - constructor(call: UpgradeCouncilTokenCall) { - this._call = call; - } -} - -export class WithdrawNominationCall extends ethereum.Call { - get inputs(): WithdrawNominationCall__Inputs { - return new WithdrawNominationCall__Inputs(this); - } - - get outputs(): WithdrawNominationCall__Outputs { - return new WithdrawNominationCall__Outputs(this); - } -} - -export class WithdrawNominationCall__Inputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawNominationCall__Outputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawVoteCall extends ethereum.Call { - get inputs(): WithdrawVoteCall__Inputs { - return new WithdrawVoteCall__Inputs(this); - } - - get outputs(): WithdrawVoteCall__Outputs { - return new WithdrawVoteCall__Outputs(this); - } -} - -export class WithdrawVoteCall__Inputs { - _call: WithdrawVoteCall; - - constructor(call: WithdrawVoteCall) { - this._call = call; - } -} - -export class WithdrawVoteCall__Outputs { - _call: WithdrawVoteCall; - - constructor(call: WithdrawVoteCall) { - this._call = call; - } -} - -export class AcceptOwnershipCall extends ethereum.Call { - get inputs(): AcceptOwnershipCall__Inputs { - return new AcceptOwnershipCall__Inputs(this); - } - - get outputs(): AcceptOwnershipCall__Outputs { - return new AcceptOwnershipCall__Outputs(this); - } -} - -export class AcceptOwnershipCall__Inputs { - _call: AcceptOwnershipCall; - - constructor(call: AcceptOwnershipCall) { - this._call = call; - } -} - -export class AcceptOwnershipCall__Outputs { - _call: AcceptOwnershipCall; - - constructor(call: AcceptOwnershipCall) { - this._call = call; - } -} - -export class InitializeOwnerModuleCall extends ethereum.Call { - get inputs(): InitializeOwnerModuleCall__Inputs { - return new InitializeOwnerModuleCall__Inputs(this); - } - - get outputs(): InitializeOwnerModuleCall__Outputs { - return new InitializeOwnerModuleCall__Outputs(this); - } -} - -export class InitializeOwnerModuleCall__Inputs { - _call: InitializeOwnerModuleCall; - - constructor(call: InitializeOwnerModuleCall) { - this._call = call; - } - - get initialOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class InitializeOwnerModuleCall__Outputs { - _call: InitializeOwnerModuleCall; - - constructor(call: InitializeOwnerModuleCall) { - this._call = call; - } -} - -export class NominateNewOwnerCall extends ethereum.Call { - get inputs(): NominateNewOwnerCall__Inputs { - return new NominateNewOwnerCall__Inputs(this); - } - - get outputs(): NominateNewOwnerCall__Outputs { - return new NominateNewOwnerCall__Outputs(this); - } -} - -export class NominateNewOwnerCall__Inputs { - _call: NominateNewOwnerCall; - - constructor(call: NominateNewOwnerCall) { - this._call = call; - } - - get newNominatedOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class NominateNewOwnerCall__Outputs { - _call: NominateNewOwnerCall; - - constructor(call: NominateNewOwnerCall) { - this._call = call; - } -} - -export class RenounceNominationCall extends ethereum.Call { - get inputs(): RenounceNominationCall__Inputs { - return new RenounceNominationCall__Inputs(this); - } - - get outputs(): RenounceNominationCall__Outputs { - return new RenounceNominationCall__Outputs(this); - } -} - -export class RenounceNominationCall__Inputs { - _call: RenounceNominationCall; - - constructor(call: RenounceNominationCall) { - this._call = call; - } -} - -export class RenounceNominationCall__Outputs { - _call: RenounceNominationCall; - - constructor(call: RenounceNominationCall) { - this._call = call; - } -} - -export class SimulateUpgradeToCall extends ethereum.Call { - get inputs(): SimulateUpgradeToCall__Inputs { - return new SimulateUpgradeToCall__Inputs(this); - } - - get outputs(): SimulateUpgradeToCall__Outputs { - return new SimulateUpgradeToCall__Outputs(this); - } -} - -export class SimulateUpgradeToCall__Inputs { - _call: SimulateUpgradeToCall; - - constructor(call: SimulateUpgradeToCall) { - this._call = call; - } - - get newImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SimulateUpgradeToCall__Outputs { - _call: SimulateUpgradeToCall; - - constructor(call: SimulateUpgradeToCall) { - this._call = call; - } -} - -export class UpgradeToCall extends ethereum.Call { - get inputs(): UpgradeToCall__Inputs { - return new UpgradeToCall__Inputs(this); - } - - get outputs(): UpgradeToCall__Outputs { - return new UpgradeToCall__Outputs(this); - } -} - -export class UpgradeToCall__Inputs { - _call: UpgradeToCall; - - constructor(call: UpgradeToCall) { - this._call = call; - } - - get newImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class UpgradeToCall__Outputs { - _call: UpgradeToCall; - - constructor(call: UpgradeToCall) { - this._call = call; - } -} diff --git a/governance/subgraph/generated/ElectionModule/ElectionModule.ts b/governance/subgraph/generated/ElectionModule/ElectionModule.ts deleted file mode 100644 index a6b7b7d0b..000000000 --- a/governance/subgraph/generated/ElectionModule/ElectionModule.ts +++ /dev/null @@ -1,1382 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class CandidateNominated extends ethereum.Event { - get params(): CandidateNominated__Params { - return new CandidateNominated__Params(this); - } -} - -export class CandidateNominated__Params { - _event: CandidateNominated; - - constructor(event: CandidateNominated) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberAdded extends ethereum.Event { - get params(): CouncilMemberAdded__Params { - return new CouncilMemberAdded__Params(this); - } -} - -export class CouncilMemberAdded__Params { - _event: CouncilMemberAdded; - - constructor(event: CouncilMemberAdded) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberRemoved extends ethereum.Event { - get params(): CouncilMemberRemoved__Params { - return new CouncilMemberRemoved__Params(this); - } -} - -export class CouncilMemberRemoved__Params { - _event: CouncilMemberRemoved; - - constructor(event: CouncilMemberRemoved) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMembersDismissed extends ethereum.Event { - get params(): CouncilMembersDismissed__Params { - return new CouncilMembersDismissed__Params(this); - } -} - -export class CouncilMembersDismissed__Params { - _event: CouncilMembersDismissed; - - constructor(event: CouncilMembersDismissed) { - this._event = event; - } - - get dismissedMembers(): Array
{ - return this._event.parameters[0].value.toAddressArray(); - } - - get epochId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class ElectionBatchEvaluated extends ethereum.Event { - get params(): ElectionBatchEvaluated__Params { - return new ElectionBatchEvaluated__Params(this); - } -} - -export class ElectionBatchEvaluated__Params { - _event: ElectionBatchEvaluated; - - constructor(event: ElectionBatchEvaluated) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get numEvaluatedBallots(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get totalBallots(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class ElectionEvaluated extends ethereum.Event { - get params(): ElectionEvaluated__Params { - return new ElectionEvaluated__Params(this); - } -} - -export class ElectionEvaluated__Params { - _event: ElectionEvaluated; - - constructor(event: ElectionEvaluated) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get ballotCount(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class ElectionModuleInitialized extends ethereum.Event { - get params(): ElectionModuleInitialized__Params { - return new ElectionModuleInitialized__Params(this); - } -} - -export class ElectionModuleInitialized__Params { - _event: ElectionModuleInitialized; - - constructor(event: ElectionModuleInitialized) { - this._event = event; - } -} - -export class EmergencyElectionStarted extends ethereum.Event { - get params(): EmergencyElectionStarted__Params { - return new EmergencyElectionStarted__Params(this); - } -} - -export class EmergencyElectionStarted__Params { - _event: EmergencyElectionStarted; - - constructor(event: EmergencyElectionStarted) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class EpochScheduleUpdated extends ethereum.Event { - get params(): EpochScheduleUpdated__Params { - return new EpochScheduleUpdated__Params(this); - } -} - -export class EpochScheduleUpdated__Params { - _event: EpochScheduleUpdated; - - constructor(event: EpochScheduleUpdated) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get startDate(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get endDate(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class EpochStarted extends ethereum.Event { - get params(): EpochStarted__Params { - return new EpochStarted__Params(this); - } -} - -export class EpochStarted__Params { - _event: EpochStarted; - - constructor(event: EpochStarted) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class NominationWithdrawn extends ethereum.Event { - get params(): NominationWithdrawn__Params { - return new NominationWithdrawn__Params(this); - } -} - -export class NominationWithdrawn__Params { - _event: NominationWithdrawn; - - constructor(event: NominationWithdrawn) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class VoteRecorded extends ethereum.Event { - get params(): VoteRecorded__Params { - return new VoteRecorded__Params(this); - } -} - -export class VoteRecorded__Params { - _event: VoteRecorded; - - constructor(event: VoteRecorded) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get chainId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epochId(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get votingPower(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } - - get candidates(): Array
{ - return this._event.parameters[4].value.toAddressArray(); - } -} - -export class ElectionModule__getBallotResultValue0Struct extends ethereum.Tuple { - get votingPower(): BigInt { - return this[0].toBigInt(); - } - - get votedCandidates(): Array
{ - return this[1].toAddressArray(); - } - - get amounts(): Array { - return this[2].toBigIntArray(); - } -} - -export class ElectionModule__getElectionSettingsResultSettingsStruct extends ethereum.Tuple { - get epochSeatCount(): i32 { - return this[0].toI32(); - } - - get minimumActiveMembers(): i32 { - return this[1].toI32(); - } - - get epochDuration(): BigInt { - return this[2].toBigInt(); - } - - get nominationPeriodDuration(): BigInt { - return this[3].toBigInt(); - } - - get votingPeriodDuration(): BigInt { - return this[4].toBigInt(); - } - - get maxDateAdjustmentTolerance(): BigInt { - return this[5].toBigInt(); - } -} - -export class ElectionModule__getEpochScheduleResultEpochStruct extends ethereum.Tuple { - get startDate(): BigInt { - return this[0].toBigInt(); - } - - get nominationPeriodStartDate(): BigInt { - return this[1].toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this[2].toBigInt(); - } - - get endDate(): BigInt { - return this[3].toBigInt(); - } -} - -export class ElectionModule__getNextElectionSettingsResultSettingsStruct extends ethereum.Tuple { - get epochSeatCount(): i32 { - return this[0].toI32(); - } - - get minimumActiveMembers(): i32 { - return this[1].toI32(); - } - - get epochDuration(): BigInt { - return this[2].toBigInt(); - } - - get nominationPeriodDuration(): BigInt { - return this[3].toBigInt(); - } - - get votingPeriodDuration(): BigInt { - return this[4].toBigInt(); - } - - get maxDateAdjustmentTolerance(): BigInt { - return this[5].toBigInt(); - } -} - -export class ElectionModule extends ethereum.SmartContract { - static bind(address: Address): ElectionModule { - return new ElectionModule("ElectionModule", address); - } - - getBallot( - voter: Address, - chainId: BigInt, - electionId: BigInt - ): ElectionModule__getBallotResultValue0Struct { - let result = super.call( - "getBallot", - "getBallot(address,uint256,uint256):((uint256,address[],uint256[]))", - [ - ethereum.Value.fromAddress(voter), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - - return changetype( - result[0].toTuple() - ); - } - - try_getBallot( - voter: Address, - chainId: BigInt, - electionId: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getBallot", - "getBallot(address,uint256,uint256):((uint256,address[],uint256[]))", - [ - ethereum.Value.fromAddress(voter), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - changetype( - value[0].toTuple() - ) - ); - } - - getBallotCandidates( - voter: Address, - chainId: BigInt, - electionId: BigInt - ): Array
{ - let result = super.call( - "getBallotCandidates", - "getBallotCandidates(address,uint256,uint256):(address[])", - [ - ethereum.Value.fromAddress(voter), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - - return result[0].toAddressArray(); - } - - try_getBallotCandidates( - voter: Address, - chainId: BigInt, - electionId: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getBallotCandidates", - "getBallotCandidates(address,uint256,uint256):(address[])", - [ - ethereum.Value.fromAddress(voter), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getCandidateVotes(candidate: Address): BigInt { - let result = super.call( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotes(candidate: Address): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCouncilMembers(): Array
{ - let result = super.call( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getCouncilMembers(): ethereum.CallResult> { - let result = super.tryCall( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getCouncilToken(): Address { - let result = super.call( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getCouncilToken(): ethereum.CallResult
{ - let result = super.tryCall( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getCurrentPeriod(): BigInt { - let result = super.call( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getCurrentPeriod(): ethereum.CallResult { - let result = super.tryCall( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionSettings(): ElectionModule__getElectionSettingsResultSettingsStruct { - let result = super.call( - "getElectionSettings", - "getElectionSettings():((uint8,uint8,uint64,uint64,uint64,uint64))", - [] - ); - - return changetype( - result[0].toTuple() - ); - } - - try_getElectionSettings(): ethereum.CallResult< - ElectionModule__getElectionSettingsResultSettingsStruct - > { - let result = super.tryCall( - "getElectionSettings", - "getElectionSettings():((uint8,uint8,uint64,uint64,uint64,uint64))", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - changetype( - value[0].toTuple() - ) - ); - } - - getElectionWinners(): Array
{ - let result = super.call( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinners(): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochIndex(): BigInt { - let result = super.call("getEpochIndex", "getEpochIndex():(uint256)", []); - - return result[0].toBigInt(); - } - - try_getEpochIndex(): ethereum.CallResult { - let result = super.tryCall( - "getEpochIndex", - "getEpochIndex():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochSchedule(): ElectionModule__getEpochScheduleResultEpochStruct { - let result = super.call( - "getEpochSchedule", - "getEpochSchedule():((uint64,uint64,uint64,uint64))", - [] - ); - - return changetype( - result[0].toTuple() - ); - } - - try_getEpochSchedule(): ethereum.CallResult< - ElectionModule__getEpochScheduleResultEpochStruct - > { - let result = super.tryCall( - "getEpochSchedule", - "getEpochSchedule():((uint64,uint64,uint64,uint64))", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - changetype( - value[0].toTuple() - ) - ); - } - - getNextElectionSettings(): ElectionModule__getNextElectionSettingsResultSettingsStruct { - let result = super.call( - "getNextElectionSettings", - "getNextElectionSettings():((uint8,uint8,uint64,uint64,uint64,uint64))", - [] - ); - - return changetype< - ElectionModule__getNextElectionSettingsResultSettingsStruct - >(result[0].toTuple()); - } - - try_getNextElectionSettings(): ethereum.CallResult< - ElectionModule__getNextElectionSettingsResultSettingsStruct - > { - let result = super.tryCall( - "getNextElectionSettings", - "getNextElectionSettings():((uint8,uint8,uint64,uint64,uint64,uint64))", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - changetype( - value[0].toTuple() - ) - ); - } - - getNominees(): Array
{ - let result = super.call("getNominees", "getNominees():(address[])", []); - - return result[0].toAddressArray(); - } - - try_getNominees(): ethereum.CallResult> { - let result = super.tryCall("getNominees", "getNominees():(address[])", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotePower(user: Address, chainId: BigInt, electionId: BigInt): BigInt { - let result = super.call( - "getVotePower", - "getVotePower(address,uint256,uint256):(uint256)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - - return result[0].toBigInt(); - } - - try_getVotePower( - user: Address, - chainId: BigInt, - electionId: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getVotePower", - "getVotePower(address,uint256,uint256):(uint256)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVoted(user: Address, chainId: BigInt): boolean { - let result = super.call("hasVoted", "hasVoted(address,uint256):(bool)", [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId) - ]); - - return result[0].toBoolean(); - } - - try_hasVoted(user: Address, chainId: BigInt): ethereum.CallResult { - let result = super.tryCall("hasVoted", "hasVoted(address,uint256):(bool)", [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionEvaluated(): boolean { - let result = super.call( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionEvaluated(): ethereum.CallResult { - let result = super.tryCall( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionModuleInitialized(): boolean { - let result = super.call( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionModuleInitialized(): ethereum.CallResult { - let result = super.tryCall( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isNominated(candidate: Address): boolean { - let result = super.call("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - - return result[0].toBoolean(); - } - - try_isNominated(candidate: Address): ethereum.CallResult { - let result = super.tryCall("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } -} - -export class _recvCastCall extends ethereum.Call { - get inputs(): _recvCastCall__Inputs { - return new _recvCastCall__Inputs(this); - } - - get outputs(): _recvCastCall__Outputs { - return new _recvCastCall__Outputs(this); - } -} - -export class _recvCastCall__Inputs { - _call: _recvCastCall; - - constructor(call: _recvCastCall) { - this._call = call; - } - - get epochIndex(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get voter(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get votingPower(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get chainId(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get candidates(): Array
{ - return this._call.inputValues[4].value.toAddressArray(); - } - - get amounts(): Array { - return this._call.inputValues[5].value.toBigIntArray(); - } -} - -export class _recvCastCall__Outputs { - _call: _recvCastCall; - - constructor(call: _recvCastCall) { - this._call = call; - } -} - -export class _recvDismissMembersCall extends ethereum.Call { - get inputs(): _recvDismissMembersCall__Inputs { - return new _recvDismissMembersCall__Inputs(this); - } - - get outputs(): _recvDismissMembersCall__Outputs { - return new _recvDismissMembersCall__Outputs(this); - } -} - -export class _recvDismissMembersCall__Inputs { - _call: _recvDismissMembersCall; - - constructor(call: _recvDismissMembersCall) { - this._call = call; - } - - get membersToDismiss(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } - - get epochIndex(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class _recvDismissMembersCall__Outputs { - _call: _recvDismissMembersCall; - - constructor(call: _recvDismissMembersCall) { - this._call = call; - } -} - -export class _recvInitElectionModuleSatelliteCall extends ethereum.Call { - get inputs(): _recvInitElectionModuleSatelliteCall__Inputs { - return new _recvInitElectionModuleSatelliteCall__Inputs(this); - } - - get outputs(): _recvInitElectionModuleSatelliteCall__Outputs { - return new _recvInitElectionModuleSatelliteCall__Outputs(this); - } -} - -export class _recvInitElectionModuleSatelliteCall__Inputs { - _call: _recvInitElectionModuleSatelliteCall; - - constructor(call: _recvInitElectionModuleSatelliteCall) { - this._call = call; - } - - get epochIndex(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get epochStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get nominationPeriodStartDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get councilMembers(): Array
{ - return this._call.inputValues[5].value.toAddressArray(); - } -} - -export class _recvInitElectionModuleSatelliteCall__Outputs { - _call: _recvInitElectionModuleSatelliteCall; - - constructor(call: _recvInitElectionModuleSatelliteCall) { - this._call = call; - } -} - -export class _recvResolveCall extends ethereum.Call { - get inputs(): _recvResolveCall__Inputs { - return new _recvResolveCall__Inputs(this); - } - - get outputs(): _recvResolveCall__Outputs { - return new _recvResolveCall__Outputs(this); - } -} - -export class _recvResolveCall__Inputs { - _call: _recvResolveCall; - - constructor(call: _recvResolveCall) { - this._call = call; - } - - get epochIndex(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get epochStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get nominationPeriodStartDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get councilMembers(): Array
{ - return this._call.inputValues[5].value.toAddressArray(); - } -} - -export class _recvResolveCall__Outputs { - _call: _recvResolveCall; - - constructor(call: _recvResolveCall) { - this._call = call; - } -} - -export class _recvTweakEpochScheduleCall extends ethereum.Call { - get inputs(): _recvTweakEpochScheduleCall__Inputs { - return new _recvTweakEpochScheduleCall__Inputs(this); - } - - get outputs(): _recvTweakEpochScheduleCall__Outputs { - return new _recvTweakEpochScheduleCall__Outputs(this); - } -} - -export class _recvTweakEpochScheduleCall__Inputs { - _call: _recvTweakEpochScheduleCall; - - constructor(call: _recvTweakEpochScheduleCall) { - this._call = call; - } - - get epochIndex(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get nominationPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } -} - -export class _recvTweakEpochScheduleCall__Outputs { - _call: _recvTweakEpochScheduleCall; - - constructor(call: _recvTweakEpochScheduleCall) { - this._call = call; - } -} - -export class CastCall extends ethereum.Call { - get inputs(): CastCall__Inputs { - return new CastCall__Inputs(this); - } - - get outputs(): CastCall__Outputs { - return new CastCall__Outputs(this); - } -} - -export class CastCall__Inputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } - - get candidates(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } - - get amounts(): Array { - return this._call.inputValues[1].value.toBigIntArray(); - } -} - -export class CastCall__Outputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } -} - -export class DismissMembersCall extends ethereum.Call { - get inputs(): DismissMembersCall__Inputs { - return new DismissMembersCall__Inputs(this); - } - - get outputs(): DismissMembersCall__Outputs { - return new DismissMembersCall__Outputs(this); - } -} - -export class DismissMembersCall__Inputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } - - get membersToDismiss(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class DismissMembersCall__Outputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } -} - -export class EvaluateCall extends ethereum.Call { - get inputs(): EvaluateCall__Inputs { - return new EvaluateCall__Inputs(this); - } - - get outputs(): EvaluateCall__Outputs { - return new EvaluateCall__Outputs(this); - } -} - -export class EvaluateCall__Inputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } - - get numBallots(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class EvaluateCall__Outputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } -} - -export class InitElectionModuleSatelliteCall extends ethereum.Call { - get inputs(): InitElectionModuleSatelliteCall__Inputs { - return new InitElectionModuleSatelliteCall__Inputs(this); - } - - get outputs(): InitElectionModuleSatelliteCall__Outputs { - return new InitElectionModuleSatelliteCall__Outputs(this); - } -} - -export class InitElectionModuleSatelliteCall__Inputs { - _call: InitElectionModuleSatelliteCall; - - constructor(call: InitElectionModuleSatelliteCall) { - this._call = call; - } - - get chainId(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class InitElectionModuleSatelliteCall__Outputs { - _call: InitElectionModuleSatelliteCall; - - constructor(call: InitElectionModuleSatelliteCall) { - this._call = call; - } -} - -export class InitOrUpdateElectionSettingsCall extends ethereum.Call { - get inputs(): InitOrUpdateElectionSettingsCall__Inputs { - return new InitOrUpdateElectionSettingsCall__Inputs(this); - } - - get outputs(): InitOrUpdateElectionSettingsCall__Outputs { - return new InitOrUpdateElectionSettingsCall__Outputs(this); - } -} - -export class InitOrUpdateElectionSettingsCall__Inputs { - _call: InitOrUpdateElectionSettingsCall; - - constructor(call: InitOrUpdateElectionSettingsCall) { - this._call = call; - } - - get initialCouncil(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } - - get minimumActiveMembers(): i32 { - return this._call.inputValues[1].value.toI32(); - } - - get initialNominationPeriodStartDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get administrationPeriodDuration(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get nominationPeriodDuration(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get votingPeriodDuration(): BigInt { - return this._call.inputValues[5].value.toBigInt(); - } -} - -export class InitOrUpdateElectionSettingsCall__Outputs { - _call: InitOrUpdateElectionSettingsCall; - - constructor(call: InitOrUpdateElectionSettingsCall) { - this._call = call; - } -} - -export class NominateCall extends ethereum.Call { - get inputs(): NominateCall__Inputs { - return new NominateCall__Inputs(this); - } - - get outputs(): NominateCall__Outputs { - return new NominateCall__Outputs(this); - } -} - -export class NominateCall__Inputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class NominateCall__Outputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class ResolveCall extends ethereum.Call { - get inputs(): ResolveCall__Inputs { - return new ResolveCall__Inputs(this); - } - - get outputs(): ResolveCall__Outputs { - return new ResolveCall__Outputs(this); - } -} - -export class ResolveCall__Inputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class ResolveCall__Outputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class SetNextElectionSettingsCall extends ethereum.Call { - get inputs(): SetNextElectionSettingsCall__Inputs { - return new SetNextElectionSettingsCall__Inputs(this); - } - - get outputs(): SetNextElectionSettingsCall__Outputs { - return new SetNextElectionSettingsCall__Outputs(this); - } -} - -export class SetNextElectionSettingsCall__Inputs { - _call: SetNextElectionSettingsCall; - - constructor(call: SetNextElectionSettingsCall) { - this._call = call; - } - - get epochSeatCount(): i32 { - return this._call.inputValues[0].value.toI32(); - } - - get minimumActiveMembers(): i32 { - return this._call.inputValues[1].value.toI32(); - } - - get epochDuration(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get nominationPeriodDuration(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get votingPeriodDuration(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get maxDateAdjustmentTolerance(): BigInt { - return this._call.inputValues[5].value.toBigInt(); - } -} - -export class SetNextElectionSettingsCall__Outputs { - _call: SetNextElectionSettingsCall; - - constructor(call: SetNextElectionSettingsCall) { - this._call = call; - } -} - -export class TweakEpochScheduleCall extends ethereum.Call { - get inputs(): TweakEpochScheduleCall__Inputs { - return new TweakEpochScheduleCall__Inputs(this); - } - - get outputs(): TweakEpochScheduleCall__Outputs { - return new TweakEpochScheduleCall__Outputs(this); - } -} - -export class TweakEpochScheduleCall__Inputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } - - get newNominationPeriodStartDate(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newVotingPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newEpochEndDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class TweakEpochScheduleCall__Outputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } -} - -export class WithdrawNominationCall extends ethereum.Call { - get inputs(): WithdrawNominationCall__Inputs { - return new WithdrawNominationCall__Inputs(this); - } - - get outputs(): WithdrawNominationCall__Outputs { - return new WithdrawNominationCall__Outputs(this); - } -} - -export class WithdrawNominationCall__Inputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawNominationCall__Outputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} diff --git a/governance/subgraph/generated/Grants-Old/ElectionModuleOld.ts b/governance/subgraph/generated/Grants-Old/ElectionModuleOld.ts deleted file mode 100644 index ff16bb4f7..000000000 --- a/governance/subgraph/generated/Grants-Old/ElectionModuleOld.ts +++ /dev/null @@ -1,2613 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class CandidateNominated extends ethereum.Event { - get params(): CandidateNominated__Params { - return new CandidateNominated__Params(this); - } -} - -export class CandidateNominated__Params { - _event: CandidateNominated; - - constructor(event: CandidateNominated) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberAdded extends ethereum.Event { - get params(): CouncilMemberAdded__Params { - return new CouncilMemberAdded__Params(this); - } -} - -export class CouncilMemberAdded__Params { - _event: CouncilMemberAdded; - - constructor(event: CouncilMemberAdded) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberRemoved extends ethereum.Event { - get params(): CouncilMemberRemoved__Params { - return new CouncilMemberRemoved__Params(this); - } -} - -export class CouncilMemberRemoved__Params { - _event: CouncilMemberRemoved; - - constructor(event: CouncilMemberRemoved) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMembersDismissed extends ethereum.Event { - get params(): CouncilMembersDismissed__Params { - return new CouncilMembersDismissed__Params(this); - } -} - -export class CouncilMembersDismissed__Params { - _event: CouncilMembersDismissed; - - constructor(event: CouncilMembersDismissed) { - this._event = event; - } - - get members(): Array
{ - return this._event.parameters[0].value.toAddressArray(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilTokenCreated extends ethereum.Event { - get params(): CouncilTokenCreated__Params { - return new CouncilTokenCreated__Params(this); - } -} - -export class CouncilTokenCreated__Params { - _event: CouncilTokenCreated; - - constructor(event: CouncilTokenCreated) { - this._event = event; - } - - get proxy(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get implementation(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class CouncilTokenUpgraded extends ethereum.Event { - get params(): CouncilTokenUpgraded__Params { - return new CouncilTokenUpgraded__Params(this); - } -} - -export class CouncilTokenUpgraded__Params { - _event: CouncilTokenUpgraded; - - constructor(event: CouncilTokenUpgraded) { - this._event = event; - } - - get newImplementation(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class DefaultBallotEvaluationBatchSizeChanged extends ethereum.Event { - get params(): DefaultBallotEvaluationBatchSizeChanged__Params { - return new DefaultBallotEvaluationBatchSizeChanged__Params(this); - } -} - -export class DefaultBallotEvaluationBatchSizeChanged__Params { - _event: DefaultBallotEvaluationBatchSizeChanged; - - constructor(event: DefaultBallotEvaluationBatchSizeChanged) { - this._event = event; - } - - get size(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class ElectionBatchEvaluated extends ethereum.Event { - get params(): ElectionBatchEvaluated__Params { - return new ElectionBatchEvaluated__Params(this); - } -} - -export class ElectionBatchEvaluated__Params { - _event: ElectionBatchEvaluated; - - constructor(event: ElectionBatchEvaluated) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get evaluatedBallots(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get totalBallots(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class ElectionEvaluated extends ethereum.Event { - get params(): ElectionEvaluated__Params { - return new ElectionEvaluated__Params(this); - } -} - -export class ElectionEvaluated__Params { - _event: ElectionEvaluated; - - constructor(event: ElectionEvaluated) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get totalBallots(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class ElectionModuleInitialized extends ethereum.Event { - get params(): ElectionModuleInitialized__Params { - return new ElectionModuleInitialized__Params(this); - } -} - -export class ElectionModuleInitialized__Params { - _event: ElectionModuleInitialized; - - constructor(event: ElectionModuleInitialized) { - this._event = event; - } -} - -export class EmergencyElectionStarted extends ethereum.Event { - get params(): EmergencyElectionStarted__Params { - return new EmergencyElectionStarted__Params(this); - } -} - -export class EmergencyElectionStarted__Params { - _event: EmergencyElectionStarted; - - constructor(event: EmergencyElectionStarted) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class EpochScheduleUpdated extends ethereum.Event { - get params(): EpochScheduleUpdated__Params { - return new EpochScheduleUpdated__Params(this); - } -} - -export class EpochScheduleUpdated__Params { - _event: EpochScheduleUpdated; - - constructor(event: EpochScheduleUpdated) { - this._event = event; - } - - get nominationPeriodStartDate(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class EpochStarted extends ethereum.Event { - get params(): EpochStarted__Params { - return new EpochStarted__Params(this); - } -} - -export class EpochStarted__Params { - _event: EpochStarted; - - constructor(event: EpochStarted) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class MaxDateAdjustmentToleranceChanged extends ethereum.Event { - get params(): MaxDateAdjustmentToleranceChanged__Params { - return new MaxDateAdjustmentToleranceChanged__Params(this); - } -} - -export class MaxDateAdjustmentToleranceChanged__Params { - _event: MaxDateAdjustmentToleranceChanged; - - constructor(event: MaxDateAdjustmentToleranceChanged) { - this._event = event; - } - - get tolerance(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class MinimumActiveMembersChanged extends ethereum.Event { - get params(): MinimumActiveMembersChanged__Params { - return new MinimumActiveMembersChanged__Params(this); - } -} - -export class MinimumActiveMembersChanged__Params { - _event: MinimumActiveMembersChanged; - - constructor(event: MinimumActiveMembersChanged) { - this._event = event; - } - - get minimumActiveMembers(): i32 { - return this._event.parameters[0].value.toI32(); - } -} - -export class MinimumEpochDurationsChanged extends ethereum.Event { - get params(): MinimumEpochDurationsChanged__Params { - return new MinimumEpochDurationsChanged__Params(this); - } -} - -export class MinimumEpochDurationsChanged__Params { - _event: MinimumEpochDurationsChanged; - - constructor(event: MinimumEpochDurationsChanged) { - this._event = event; - } - - get minNominationPeriodDuration(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get minVotingPeriodDuration(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get minEpochDuration(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class NextEpochSeatCountChanged extends ethereum.Event { - get params(): NextEpochSeatCountChanged__Params { - return new NextEpochSeatCountChanged__Params(this); - } -} - -export class NextEpochSeatCountChanged__Params { - _event: NextEpochSeatCountChanged; - - constructor(event: NextEpochSeatCountChanged) { - this._event = event; - } - - get seatCount(): i32 { - return this._event.parameters[0].value.toI32(); - } -} - -export class NominationWithdrawn extends ethereum.Event { - get params(): NominationWithdrawn__Params { - return new NominationWithdrawn__Params(this); - } -} - -export class NominationWithdrawn__Params { - _event: NominationWithdrawn; - - constructor(event: NominationWithdrawn) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class VoteRecorded extends ethereum.Event { - get params(): VoteRecorded__Params { - return new VoteRecorded__Params(this); - } -} - -export class VoteRecorded__Params { - _event: VoteRecorded; - - constructor(event: VoteRecorded) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get ballotId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } - - get epochIndex(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get votePower(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class VoteWithdrawn extends ethereum.Event { - get params(): VoteWithdrawn__Params { - return new VoteWithdrawn__Params(this); - } -} - -export class VoteWithdrawn__Params { - _event: VoteWithdrawn; - - constructor(event: VoteWithdrawn) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get ballotId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } - - get epochIndex(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get votePower(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class CrossChainDebtShareDeclared extends ethereum.Event { - get params(): CrossChainDebtShareDeclared__Params { - return new CrossChainDebtShareDeclared__Params(this); - } -} - -export class CrossChainDebtShareDeclared__Params { - _event: CrossChainDebtShareDeclared; - - constructor(event: CrossChainDebtShareDeclared) { - this._event = event; - } - - get user(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get debtShare(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CrossChainDebtShareMerkleRootSet extends ethereum.Event { - get params(): CrossChainDebtShareMerkleRootSet__Params { - return new CrossChainDebtShareMerkleRootSet__Params(this); - } -} - -export class CrossChainDebtShareMerkleRootSet__Params { - _event: CrossChainDebtShareMerkleRootSet; - - constructor(event: CrossChainDebtShareMerkleRootSet) { - this._event = event; - } - - get merkleRoot(): Bytes { - return this._event.parameters[0].value.toBytes(); - } - - get blocknumber(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epoch(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class DebtShareContractSet extends ethereum.Event { - get params(): DebtShareContractSet__Params { - return new DebtShareContractSet__Params(this); - } -} - -export class DebtShareContractSet__Params { - _event: DebtShareContractSet; - - constructor(event: DebtShareContractSet) { - this._event = event; - } - - get contractAddress(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class DebtShareSnapshotIdSet extends ethereum.Event { - get params(): DebtShareSnapshotIdSet__Params { - return new DebtShareSnapshotIdSet__Params(this); - } -} - -export class DebtShareSnapshotIdSet__Params { - _event: DebtShareSnapshotIdSet; - - constructor(event: DebtShareSnapshotIdSet) { - this._event = event; - } - - get snapshotId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class OwnerChanged extends ethereum.Event { - get params(): OwnerChanged__Params { - return new OwnerChanged__Params(this); - } -} - -export class OwnerChanged__Params { - _event: OwnerChanged; - - constructor(event: OwnerChanged) { - this._event = event; - } - - get oldOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get newOwner(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class OwnerNominated extends ethereum.Event { - get params(): OwnerNominated__Params { - return new OwnerNominated__Params(this); - } -} - -export class OwnerNominated__Params { - _event: OwnerNominated; - - constructor(event: OwnerNominated) { - this._event = event; - } - - get newOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class Upgraded extends ethereum.Event { - get params(): Upgraded__Params { - return new Upgraded__Params(this); - } -} - -export class Upgraded__Params { - _event: Upgraded; - - constructor(event: Upgraded) { - this._event = event; - } - - get implementation(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class ElectionModuleOld__getMinEpochDurationsResult { - value0: BigInt; - value1: BigInt; - value2: BigInt; - - constructor(value0: BigInt, value1: BigInt, value2: BigInt) { - this.value0 = value0; - this.value1 = value1; - this.value2 = value2; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - map.set("value2", ethereum.Value.fromUnsignedBigInt(this.value2)); - return map; - } - - getMinNominationPeriodDuration(): BigInt { - return this.value0; - } - - getMinVotingPeriodDuration(): BigInt { - return this.value1; - } - - getMinEpochDuration(): BigInt { - return this.value2; - } -} - -export class ElectionModuleOld extends ethereum.SmartContract { - static bind(address: Address): ElectionModuleOld { - return new ElectionModuleOld("ElectionModuleOld", address); - } - - getBallotCandidatesInEpoch( - ballotId: Bytes, - epochIndex: BigInt - ): Array
{ - let result = super.call( - "getBallotCandidatesInEpoch", - "getBallotCandidatesInEpoch(bytes32,uint256):(address[])", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toAddressArray(); - } - - try_getBallotCandidatesInEpoch( - ballotId: Bytes, - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getBallotCandidatesInEpoch", - "getBallotCandidatesInEpoch(bytes32,uint256):(address[])", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getBallotVotedAtEpoch(user: Address, epochIndex: BigInt): Bytes { - let result = super.call( - "getBallotVotedAtEpoch", - "getBallotVotedAtEpoch(address,uint256):(bytes32)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBytes(); - } - - try_getBallotVotedAtEpoch( - user: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getBallotVotedAtEpoch", - "getBallotVotedAtEpoch(address,uint256):(bytes32)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getBallotVotesInEpoch(ballotId: Bytes, epochIndex: BigInt): BigInt { - let result = super.call( - "getBallotVotesInEpoch", - "getBallotVotesInEpoch(bytes32,uint256):(uint256)", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBigInt(); - } - - try_getBallotVotesInEpoch( - ballotId: Bytes, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getBallotVotesInEpoch", - "getBallotVotesInEpoch(bytes32,uint256):(uint256)", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCandidateVotesInEpoch(candidate: Address, epochIndex: BigInt): BigInt { - let result = super.call( - "getCandidateVotesInEpoch", - "getCandidateVotesInEpoch(address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotesInEpoch( - candidate: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotesInEpoch", - "getCandidateVotesInEpoch(address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionWinnersInEpoch(epochIndex: BigInt): Array
{ - let result = super.call( - "getElectionWinnersInEpoch", - "getElectionWinnersInEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinnersInEpoch( - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinnersInEpoch", - "getElectionWinnersInEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochEndDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getEpochEndDateForIndex", - "getEpochEndDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getEpochEndDateForIndex(epochIndex: BigInt): ethereum.CallResult { - let result = super.tryCall( - "getEpochEndDateForIndex", - "getEpochEndDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getEpochStartDateForIndex", - "getEpochStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getEpochStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getEpochStartDateForIndex", - "getEpochStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNominationPeriodStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getNominationPeriodStartDateForIndex", - "getNominationPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getNominationPeriodStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getNominationPeriodStartDateForIndex", - "getNominationPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNomineesAtEpoch(epochIndex: BigInt): Array
{ - let result = super.call( - "getNomineesAtEpoch", - "getNomineesAtEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toAddressArray(); - } - - try_getNomineesAtEpoch( - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getNomineesAtEpoch", - "getNomineesAtEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotingPeriodStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getVotingPeriodStartDateForIndex", - "getVotingPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getVotingPeriodStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getVotingPeriodStartDateForIndex", - "getVotingPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVotedInEpoch(user: Address, epochIndex: BigInt): boolean { - let result = super.call( - "hasVotedInEpoch", - "hasVotedInEpoch(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBoolean(); - } - - try_hasVotedInEpoch( - user: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "hasVotedInEpoch", - "hasVotedInEpoch(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - wasNominated(candidate: Address, epochIndex: BigInt): boolean { - let result = super.call( - "wasNominated", - "wasNominated(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBoolean(); - } - - try_wasNominated( - candidate: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "wasNominated", - "wasNominated(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - calculateBallotId(candidates: Array
): Bytes { - let result = super.call( - "calculateBallotId", - "calculateBallotId(address[]):(bytes32)", - [ethereum.Value.fromAddressArray(candidates)] - ); - - return result[0].toBytes(); - } - - try_calculateBallotId( - candidates: Array
- ): ethereum.CallResult { - let result = super.tryCall( - "calculateBallotId", - "calculateBallotId(address[]):(bytes32)", - [ethereum.Value.fromAddressArray(candidates)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getBallotCandidates(ballotId: Bytes): Array
{ - let result = super.call( - "getBallotCandidates", - "getBallotCandidates(bytes32):(address[])", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - - return result[0].toAddressArray(); - } - - try_getBallotCandidates( - ballotId: Bytes - ): ethereum.CallResult> { - let result = super.tryCall( - "getBallotCandidates", - "getBallotCandidates(bytes32):(address[])", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getBallotVoted(user: Address): Bytes { - let result = super.call( - "getBallotVoted", - "getBallotVoted(address):(bytes32)", - [ethereum.Value.fromAddress(user)] - ); - - return result[0].toBytes(); - } - - try_getBallotVoted(user: Address): ethereum.CallResult { - let result = super.tryCall( - "getBallotVoted", - "getBallotVoted(address):(bytes32)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getBallotVotes(ballotId: Bytes): BigInt { - let result = super.call( - "getBallotVotes", - "getBallotVotes(bytes32):(uint256)", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - - return result[0].toBigInt(); - } - - try_getBallotVotes(ballotId: Bytes): ethereum.CallResult { - let result = super.tryCall( - "getBallotVotes", - "getBallotVotes(bytes32):(uint256)", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCandidateVotes(candidate: Address): BigInt { - let result = super.call( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotes(candidate: Address): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCouncilMembers(): Array
{ - let result = super.call( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getCouncilMembers(): ethereum.CallResult> { - let result = super.tryCall( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getCouncilToken(): Address { - let result = super.call( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getCouncilToken(): ethereum.CallResult
{ - let result = super.tryCall( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getCrossChainDebtShareMerkleRoot(): Bytes { - let result = super.call( - "getCrossChainDebtShareMerkleRoot", - "getCrossChainDebtShareMerkleRoot():(bytes32)", - [] - ); - - return result[0].toBytes(); - } - - try_getCrossChainDebtShareMerkleRoot(): ethereum.CallResult { - let result = super.tryCall( - "getCrossChainDebtShareMerkleRoot", - "getCrossChainDebtShareMerkleRoot():(bytes32)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getCrossChainDebtShareMerkleRootBlockNumber(): BigInt { - let result = super.call( - "getCrossChainDebtShareMerkleRootBlockNumber", - "getCrossChainDebtShareMerkleRootBlockNumber():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getCrossChainDebtShareMerkleRootBlockNumber(): ethereum.CallResult< - BigInt - > { - let result = super.tryCall( - "getCrossChainDebtShareMerkleRootBlockNumber", - "getCrossChainDebtShareMerkleRootBlockNumber():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCurrentPeriod(): BigInt { - let result = super.call( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getCurrentPeriod(): ethereum.CallResult { - let result = super.tryCall( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDebtShare(user: Address): BigInt { - let result = super.call("getDebtShare", "getDebtShare(address):(uint256)", [ - ethereum.Value.fromAddress(user) - ]); - - return result[0].toBigInt(); - } - - try_getDebtShare(user: Address): ethereum.CallResult { - let result = super.tryCall( - "getDebtShare", - "getDebtShare(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDebtShareContract(): Address { - let result = super.call( - "getDebtShareContract", - "getDebtShareContract():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getDebtShareContract(): ethereum.CallResult
{ - let result = super.tryCall( - "getDebtShareContract", - "getDebtShareContract():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getDebtShareSnapshotId(): BigInt { - let result = super.call( - "getDebtShareSnapshotId", - "getDebtShareSnapshotId():(uint128)", - [] - ); - - return result[0].toBigInt(); - } - - try_getDebtShareSnapshotId(): ethereum.CallResult { - let result = super.tryCall( - "getDebtShareSnapshotId", - "getDebtShareSnapshotId():(uint128)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDeclaredCrossChainDebtShare(user: Address): BigInt { - let result = super.call( - "getDeclaredCrossChainDebtShare", - "getDeclaredCrossChainDebtShare(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - - return result[0].toBigInt(); - } - - try_getDeclaredCrossChainDebtShare( - user: Address - ): ethereum.CallResult { - let result = super.tryCall( - "getDeclaredCrossChainDebtShare", - "getDeclaredCrossChainDebtShare(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDefaultBallotEvaluationBatchSize(): BigInt { - let result = super.call( - "getDefaultBallotEvaluationBatchSize", - "getDefaultBallotEvaluationBatchSize():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getDefaultBallotEvaluationBatchSize(): ethereum.CallResult { - let result = super.tryCall( - "getDefaultBallotEvaluationBatchSize", - "getDefaultBallotEvaluationBatchSize():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionWinners(): Array
{ - let result = super.call( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinners(): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochEndDate(): BigInt { - let result = super.call( - "getEpochEndDate", - "getEpochEndDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getEpochEndDate(): ethereum.CallResult { - let result = super.tryCall( - "getEpochEndDate", - "getEpochEndDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochIndex(): BigInt { - let result = super.call("getEpochIndex", "getEpochIndex():(uint256)", []); - - return result[0].toBigInt(); - } - - try_getEpochIndex(): ethereum.CallResult { - let result = super.tryCall( - "getEpochIndex", - "getEpochIndex():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochStartDate(): BigInt { - let result = super.call( - "getEpochStartDate", - "getEpochStartDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getEpochStartDate(): ethereum.CallResult { - let result = super.tryCall( - "getEpochStartDate", - "getEpochStartDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getMaxDateAdjustmenTolerance(): BigInt { - let result = super.call( - "getMaxDateAdjustmenTolerance", - "getMaxDateAdjustmenTolerance():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getMaxDateAdjustmenTolerance(): ethereum.CallResult { - let result = super.tryCall( - "getMaxDateAdjustmenTolerance", - "getMaxDateAdjustmenTolerance():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getMinEpochDurations(): ElectionModuleOld__getMinEpochDurationsResult { - let result = super.call( - "getMinEpochDurations", - "getMinEpochDurations():(uint64,uint64,uint64)", - [] - ); - - return new ElectionModuleOld__getMinEpochDurationsResult( - result[0].toBigInt(), - result[1].toBigInt(), - result[2].toBigInt() - ); - } - - try_getMinEpochDurations(): ethereum.CallResult< - ElectionModuleOld__getMinEpochDurationsResult - > { - let result = super.tryCall( - "getMinEpochDurations", - "getMinEpochDurations():(uint64,uint64,uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new ElectionModuleOld__getMinEpochDurationsResult( - value[0].toBigInt(), - value[1].toBigInt(), - value[2].toBigInt() - ) - ); - } - - getMinimumActiveMembers(): i32 { - let result = super.call( - "getMinimumActiveMembers", - "getMinimumActiveMembers():(uint8)", - [] - ); - - return result[0].toI32(); - } - - try_getMinimumActiveMembers(): ethereum.CallResult { - let result = super.tryCall( - "getMinimumActiveMembers", - "getMinimumActiveMembers():(uint8)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toI32()); - } - - getNextEpochSeatCount(): i32 { - let result = super.call( - "getNextEpochSeatCount", - "getNextEpochSeatCount():(uint8)", - [] - ); - - return result[0].toI32(); - } - - try_getNextEpochSeatCount(): ethereum.CallResult { - let result = super.tryCall( - "getNextEpochSeatCount", - "getNextEpochSeatCount():(uint8)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toI32()); - } - - getNominationPeriodStartDate(): BigInt { - let result = super.call( - "getNominationPeriodStartDate", - "getNominationPeriodStartDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getNominationPeriodStartDate(): ethereum.CallResult { - let result = super.tryCall( - "getNominationPeriodStartDate", - "getNominationPeriodStartDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNominees(): Array
{ - let result = super.call("getNominees", "getNominees():(address[])", []); - - return result[0].toAddressArray(); - } - - try_getNominees(): ethereum.CallResult> { - let result = super.tryCall("getNominees", "getNominees():(address[])", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotePower(user: Address): BigInt { - let result = super.call("getVotePower", "getVotePower(address):(uint256)", [ - ethereum.Value.fromAddress(user) - ]); - - return result[0].toBigInt(); - } - - try_getVotePower(user: Address): ethereum.CallResult { - let result = super.tryCall( - "getVotePower", - "getVotePower(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getVotingPeriodStartDate(): BigInt { - let result = super.call( - "getVotingPeriodStartDate", - "getVotingPeriodStartDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getVotingPeriodStartDate(): ethereum.CallResult { - let result = super.tryCall( - "getVotingPeriodStartDate", - "getVotingPeriodStartDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVoted(user: Address): boolean { - let result = super.call("hasVoted", "hasVoted(address):(bool)", [ - ethereum.Value.fromAddress(user) - ]); - - return result[0].toBoolean(); - } - - try_hasVoted(user: Address): ethereum.CallResult { - let result = super.tryCall("hasVoted", "hasVoted(address):(bool)", [ - ethereum.Value.fromAddress(user) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionEvaluated(): boolean { - let result = super.call( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionEvaluated(): ethereum.CallResult { - let result = super.tryCall( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionModuleInitialized(): boolean { - let result = super.call( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionModuleInitialized(): ethereum.CallResult { - let result = super.tryCall( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isNominated(candidate: Address): boolean { - let result = super.call("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - - return result[0].toBoolean(); - } - - try_isNominated(candidate: Address): ethereum.CallResult { - let result = super.tryCall("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isOwnerModuleInitialized(): boolean { - let result = super.call( - "isOwnerModuleInitialized", - "isOwnerModuleInitialized():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isOwnerModuleInitialized(): ethereum.CallResult { - let result = super.tryCall( - "isOwnerModuleInitialized", - "isOwnerModuleInitialized():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - nominatedOwner(): Address { - let result = super.call("nominatedOwner", "nominatedOwner():(address)", []); - - return result[0].toAddress(); - } - - try_nominatedOwner(): ethereum.CallResult
{ - let result = super.tryCall( - "nominatedOwner", - "nominatedOwner():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - owner(): Address { - let result = super.call("owner", "owner():(address)", []); - - return result[0].toAddress(); - } - - try_owner(): ethereum.CallResult
{ - let result = super.tryCall("owner", "owner():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getImplementation(): Address { - let result = super.call( - "getImplementation", - "getImplementation():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getImplementation(): ethereum.CallResult
{ - let result = super.tryCall( - "getImplementation", - "getImplementation():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } -} - -export class CastCall extends ethereum.Call { - get inputs(): CastCall__Inputs { - return new CastCall__Inputs(this); - } - - get outputs(): CastCall__Outputs { - return new CastCall__Outputs(this); - } -} - -export class CastCall__Inputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } - - get candidates(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class CastCall__Outputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } -} - -export class DeclareAndCastCall extends ethereum.Call { - get inputs(): DeclareAndCastCall__Inputs { - return new DeclareAndCastCall__Inputs(this); - } - - get outputs(): DeclareAndCastCall__Outputs { - return new DeclareAndCastCall__Outputs(this); - } -} - -export class DeclareAndCastCall__Inputs { - _call: DeclareAndCastCall; - - constructor(call: DeclareAndCastCall) { - this._call = call; - } - - get debtShare(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get merkleProof(): Array { - return this._call.inputValues[1].value.toBytesArray(); - } - - get candidates(): Array
{ - return this._call.inputValues[2].value.toAddressArray(); - } -} - -export class DeclareAndCastCall__Outputs { - _call: DeclareAndCastCall; - - constructor(call: DeclareAndCastCall) { - this._call = call; - } -} - -export class DeclareCrossChainDebtShareCall extends ethereum.Call { - get inputs(): DeclareCrossChainDebtShareCall__Inputs { - return new DeclareCrossChainDebtShareCall__Inputs(this); - } - - get outputs(): DeclareCrossChainDebtShareCall__Outputs { - return new DeclareCrossChainDebtShareCall__Outputs(this); - } -} - -export class DeclareCrossChainDebtShareCall__Inputs { - _call: DeclareCrossChainDebtShareCall; - - constructor(call: DeclareCrossChainDebtShareCall) { - this._call = call; - } - - get user(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get debtShare(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get merkleProof(): Array { - return this._call.inputValues[2].value.toBytesArray(); - } -} - -export class DeclareCrossChainDebtShareCall__Outputs { - _call: DeclareCrossChainDebtShareCall; - - constructor(call: DeclareCrossChainDebtShareCall) { - this._call = call; - } -} - -export class DismissMembersCall extends ethereum.Call { - get inputs(): DismissMembersCall__Inputs { - return new DismissMembersCall__Inputs(this); - } - - get outputs(): DismissMembersCall__Outputs { - return new DismissMembersCall__Outputs(this); - } -} - -export class DismissMembersCall__Inputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } - - get membersToDismiss(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class DismissMembersCall__Outputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } -} - -export class EvaluateCall extends ethereum.Call { - get inputs(): EvaluateCall__Inputs { - return new EvaluateCall__Inputs(this); - } - - get outputs(): EvaluateCall__Outputs { - return new EvaluateCall__Outputs(this); - } -} - -export class EvaluateCall__Inputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } - - get numBallots(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class EvaluateCall__Outputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } -} - -export class InitializeElectionModuleCall extends ethereum.Call { - get inputs(): InitializeElectionModuleCall__Inputs { - return new InitializeElectionModuleCall__Inputs(this); - } - - get outputs(): InitializeElectionModuleCall__Outputs { - return new InitializeElectionModuleCall__Outputs(this); - } -} - -export class InitializeElectionModuleCall__Inputs { - _call: InitializeElectionModuleCall; - - constructor(call: InitializeElectionModuleCall) { - this._call = call; - } - - get councilTokenName(): string { - return this._call.inputValues[0].value.toString(); - } - - get councilTokenSymbol(): string { - return this._call.inputValues[1].value.toString(); - } - - get firstCouncil(): Array
{ - return this._call.inputValues[2].value.toAddressArray(); - } - - get minimumActiveMembers(): i32 { - return this._call.inputValues[3].value.toI32(); - } - - get nominationPeriodStartDate(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._call.inputValues[5].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._call.inputValues[6].value.toBigInt(); - } - - get debtShareContract(): Address { - return this._call.inputValues[7].value.toAddress(); - } -} - -export class InitializeElectionModuleCall__Outputs { - _call: InitializeElectionModuleCall; - - constructor(call: InitializeElectionModuleCall) { - this._call = call; - } -} - -export class ModifyEpochScheduleCall extends ethereum.Call { - get inputs(): ModifyEpochScheduleCall__Inputs { - return new ModifyEpochScheduleCall__Inputs(this); - } - - get outputs(): ModifyEpochScheduleCall__Outputs { - return new ModifyEpochScheduleCall__Outputs(this); - } -} - -export class ModifyEpochScheduleCall__Inputs { - _call: ModifyEpochScheduleCall; - - constructor(call: ModifyEpochScheduleCall) { - this._call = call; - } - - get newNominationPeriodStartDate(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newVotingPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newEpochEndDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class ModifyEpochScheduleCall__Outputs { - _call: ModifyEpochScheduleCall; - - constructor(call: ModifyEpochScheduleCall) { - this._call = call; - } -} - -export class NominateCall extends ethereum.Call { - get inputs(): NominateCall__Inputs { - return new NominateCall__Inputs(this); - } - - get outputs(): NominateCall__Outputs { - return new NominateCall__Outputs(this); - } -} - -export class NominateCall__Inputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class NominateCall__Outputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class ResolveCall extends ethereum.Call { - get inputs(): ResolveCall__Inputs { - return new ResolveCall__Inputs(this); - } - - get outputs(): ResolveCall__Outputs { - return new ResolveCall__Outputs(this); - } -} - -export class ResolveCall__Inputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class ResolveCall__Outputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class SetCrossChainDebtShareMerkleRootCall extends ethereum.Call { - get inputs(): SetCrossChainDebtShareMerkleRootCall__Inputs { - return new SetCrossChainDebtShareMerkleRootCall__Inputs(this); - } - - get outputs(): SetCrossChainDebtShareMerkleRootCall__Outputs { - return new SetCrossChainDebtShareMerkleRootCall__Outputs(this); - } -} - -export class SetCrossChainDebtShareMerkleRootCall__Inputs { - _call: SetCrossChainDebtShareMerkleRootCall; - - constructor(call: SetCrossChainDebtShareMerkleRootCall) { - this._call = call; - } - - get merkleRoot(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get blocknumber(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class SetCrossChainDebtShareMerkleRootCall__Outputs { - _call: SetCrossChainDebtShareMerkleRootCall; - - constructor(call: SetCrossChainDebtShareMerkleRootCall) { - this._call = call; - } -} - -export class SetDebtShareContractCall extends ethereum.Call { - get inputs(): SetDebtShareContractCall__Inputs { - return new SetDebtShareContractCall__Inputs(this); - } - - get outputs(): SetDebtShareContractCall__Outputs { - return new SetDebtShareContractCall__Outputs(this); - } -} - -export class SetDebtShareContractCall__Inputs { - _call: SetDebtShareContractCall; - - constructor(call: SetDebtShareContractCall) { - this._call = call; - } - - get debtShareContract(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SetDebtShareContractCall__Outputs { - _call: SetDebtShareContractCall; - - constructor(call: SetDebtShareContractCall) { - this._call = call; - } -} - -export class SetDebtShareSnapshotIdCall extends ethereum.Call { - get inputs(): SetDebtShareSnapshotIdCall__Inputs { - return new SetDebtShareSnapshotIdCall__Inputs(this); - } - - get outputs(): SetDebtShareSnapshotIdCall__Outputs { - return new SetDebtShareSnapshotIdCall__Outputs(this); - } -} - -export class SetDebtShareSnapshotIdCall__Inputs { - _call: SetDebtShareSnapshotIdCall; - - constructor(call: SetDebtShareSnapshotIdCall) { - this._call = call; - } - - get snapshotId(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetDebtShareSnapshotIdCall__Outputs { - _call: SetDebtShareSnapshotIdCall; - - constructor(call: SetDebtShareSnapshotIdCall) { - this._call = call; - } -} - -export class SetDefaultBallotEvaluationBatchSizeCall extends ethereum.Call { - get inputs(): SetDefaultBallotEvaluationBatchSizeCall__Inputs { - return new SetDefaultBallotEvaluationBatchSizeCall__Inputs(this); - } - - get outputs(): SetDefaultBallotEvaluationBatchSizeCall__Outputs { - return new SetDefaultBallotEvaluationBatchSizeCall__Outputs(this); - } -} - -export class SetDefaultBallotEvaluationBatchSizeCall__Inputs { - _call: SetDefaultBallotEvaluationBatchSizeCall; - - constructor(call: SetDefaultBallotEvaluationBatchSizeCall) { - this._call = call; - } - - get newDefaultBallotEvaluationBatchSize(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetDefaultBallotEvaluationBatchSizeCall__Outputs { - _call: SetDefaultBallotEvaluationBatchSizeCall; - - constructor(call: SetDefaultBallotEvaluationBatchSizeCall) { - this._call = call; - } -} - -export class SetMaxDateAdjustmentToleranceCall extends ethereum.Call { - get inputs(): SetMaxDateAdjustmentToleranceCall__Inputs { - return new SetMaxDateAdjustmentToleranceCall__Inputs(this); - } - - get outputs(): SetMaxDateAdjustmentToleranceCall__Outputs { - return new SetMaxDateAdjustmentToleranceCall__Outputs(this); - } -} - -export class SetMaxDateAdjustmentToleranceCall__Inputs { - _call: SetMaxDateAdjustmentToleranceCall; - - constructor(call: SetMaxDateAdjustmentToleranceCall) { - this._call = call; - } - - get newMaxDateAdjustmentTolerance(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetMaxDateAdjustmentToleranceCall__Outputs { - _call: SetMaxDateAdjustmentToleranceCall; - - constructor(call: SetMaxDateAdjustmentToleranceCall) { - this._call = call; - } -} - -export class SetMinEpochDurationsCall extends ethereum.Call { - get inputs(): SetMinEpochDurationsCall__Inputs { - return new SetMinEpochDurationsCall__Inputs(this); - } - - get outputs(): SetMinEpochDurationsCall__Outputs { - return new SetMinEpochDurationsCall__Outputs(this); - } -} - -export class SetMinEpochDurationsCall__Inputs { - _call: SetMinEpochDurationsCall; - - constructor(call: SetMinEpochDurationsCall) { - this._call = call; - } - - get newMinNominationPeriodDuration(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newMinVotingPeriodDuration(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newMinEpochDuration(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class SetMinEpochDurationsCall__Outputs { - _call: SetMinEpochDurationsCall; - - constructor(call: SetMinEpochDurationsCall) { - this._call = call; - } -} - -export class SetMinimumActiveMembersCall extends ethereum.Call { - get inputs(): SetMinimumActiveMembersCall__Inputs { - return new SetMinimumActiveMembersCall__Inputs(this); - } - - get outputs(): SetMinimumActiveMembersCall__Outputs { - return new SetMinimumActiveMembersCall__Outputs(this); - } -} - -export class SetMinimumActiveMembersCall__Inputs { - _call: SetMinimumActiveMembersCall; - - constructor(call: SetMinimumActiveMembersCall) { - this._call = call; - } - - get newMinimumActiveMembers(): i32 { - return this._call.inputValues[0].value.toI32(); - } -} - -export class SetMinimumActiveMembersCall__Outputs { - _call: SetMinimumActiveMembersCall; - - constructor(call: SetMinimumActiveMembersCall) { - this._call = call; - } -} - -export class SetNextEpochSeatCountCall extends ethereum.Call { - get inputs(): SetNextEpochSeatCountCall__Inputs { - return new SetNextEpochSeatCountCall__Inputs(this); - } - - get outputs(): SetNextEpochSeatCountCall__Outputs { - return new SetNextEpochSeatCountCall__Outputs(this); - } -} - -export class SetNextEpochSeatCountCall__Inputs { - _call: SetNextEpochSeatCountCall; - - constructor(call: SetNextEpochSeatCountCall) { - this._call = call; - } - - get newSeatCount(): i32 { - return this._call.inputValues[0].value.toI32(); - } -} - -export class SetNextEpochSeatCountCall__Outputs { - _call: SetNextEpochSeatCountCall; - - constructor(call: SetNextEpochSeatCountCall) { - this._call = call; - } -} - -export class TweakEpochScheduleCall extends ethereum.Call { - get inputs(): TweakEpochScheduleCall__Inputs { - return new TweakEpochScheduleCall__Inputs(this); - } - - get outputs(): TweakEpochScheduleCall__Outputs { - return new TweakEpochScheduleCall__Outputs(this); - } -} - -export class TweakEpochScheduleCall__Inputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } - - get newNominationPeriodStartDate(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newVotingPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newEpochEndDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class TweakEpochScheduleCall__Outputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } -} - -export class UpgradeCouncilTokenCall extends ethereum.Call { - get inputs(): UpgradeCouncilTokenCall__Inputs { - return new UpgradeCouncilTokenCall__Inputs(this); - } - - get outputs(): UpgradeCouncilTokenCall__Outputs { - return new UpgradeCouncilTokenCall__Outputs(this); - } -} - -export class UpgradeCouncilTokenCall__Inputs { - _call: UpgradeCouncilTokenCall; - - constructor(call: UpgradeCouncilTokenCall) { - this._call = call; - } - - get newCouncilTokenImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class UpgradeCouncilTokenCall__Outputs { - _call: UpgradeCouncilTokenCall; - - constructor(call: UpgradeCouncilTokenCall) { - this._call = call; - } -} - -export class WithdrawNominationCall extends ethereum.Call { - get inputs(): WithdrawNominationCall__Inputs { - return new WithdrawNominationCall__Inputs(this); - } - - get outputs(): WithdrawNominationCall__Outputs { - return new WithdrawNominationCall__Outputs(this); - } -} - -export class WithdrawNominationCall__Inputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawNominationCall__Outputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawVoteCall extends ethereum.Call { - get inputs(): WithdrawVoteCall__Inputs { - return new WithdrawVoteCall__Inputs(this); - } - - get outputs(): WithdrawVoteCall__Outputs { - return new WithdrawVoteCall__Outputs(this); - } -} - -export class WithdrawVoteCall__Inputs { - _call: WithdrawVoteCall; - - constructor(call: WithdrawVoteCall) { - this._call = call; - } -} - -export class WithdrawVoteCall__Outputs { - _call: WithdrawVoteCall; - - constructor(call: WithdrawVoteCall) { - this._call = call; - } -} - -export class AcceptOwnershipCall extends ethereum.Call { - get inputs(): AcceptOwnershipCall__Inputs { - return new AcceptOwnershipCall__Inputs(this); - } - - get outputs(): AcceptOwnershipCall__Outputs { - return new AcceptOwnershipCall__Outputs(this); - } -} - -export class AcceptOwnershipCall__Inputs { - _call: AcceptOwnershipCall; - - constructor(call: AcceptOwnershipCall) { - this._call = call; - } -} - -export class AcceptOwnershipCall__Outputs { - _call: AcceptOwnershipCall; - - constructor(call: AcceptOwnershipCall) { - this._call = call; - } -} - -export class InitializeOwnerModuleCall extends ethereum.Call { - get inputs(): InitializeOwnerModuleCall__Inputs { - return new InitializeOwnerModuleCall__Inputs(this); - } - - get outputs(): InitializeOwnerModuleCall__Outputs { - return new InitializeOwnerModuleCall__Outputs(this); - } -} - -export class InitializeOwnerModuleCall__Inputs { - _call: InitializeOwnerModuleCall; - - constructor(call: InitializeOwnerModuleCall) { - this._call = call; - } - - get initialOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class InitializeOwnerModuleCall__Outputs { - _call: InitializeOwnerModuleCall; - - constructor(call: InitializeOwnerModuleCall) { - this._call = call; - } -} - -export class NominateNewOwnerCall extends ethereum.Call { - get inputs(): NominateNewOwnerCall__Inputs { - return new NominateNewOwnerCall__Inputs(this); - } - - get outputs(): NominateNewOwnerCall__Outputs { - return new NominateNewOwnerCall__Outputs(this); - } -} - -export class NominateNewOwnerCall__Inputs { - _call: NominateNewOwnerCall; - - constructor(call: NominateNewOwnerCall) { - this._call = call; - } - - get newNominatedOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class NominateNewOwnerCall__Outputs { - _call: NominateNewOwnerCall; - - constructor(call: NominateNewOwnerCall) { - this._call = call; - } -} - -export class RenounceNominationCall extends ethereum.Call { - get inputs(): RenounceNominationCall__Inputs { - return new RenounceNominationCall__Inputs(this); - } - - get outputs(): RenounceNominationCall__Outputs { - return new RenounceNominationCall__Outputs(this); - } -} - -export class RenounceNominationCall__Inputs { - _call: RenounceNominationCall; - - constructor(call: RenounceNominationCall) { - this._call = call; - } -} - -export class RenounceNominationCall__Outputs { - _call: RenounceNominationCall; - - constructor(call: RenounceNominationCall) { - this._call = call; - } -} - -export class SimulateUpgradeToCall extends ethereum.Call { - get inputs(): SimulateUpgradeToCall__Inputs { - return new SimulateUpgradeToCall__Inputs(this); - } - - get outputs(): SimulateUpgradeToCall__Outputs { - return new SimulateUpgradeToCall__Outputs(this); - } -} - -export class SimulateUpgradeToCall__Inputs { - _call: SimulateUpgradeToCall; - - constructor(call: SimulateUpgradeToCall) { - this._call = call; - } - - get newImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SimulateUpgradeToCall__Outputs { - _call: SimulateUpgradeToCall; - - constructor(call: SimulateUpgradeToCall) { - this._call = call; - } -} - -export class UpgradeToCall extends ethereum.Call { - get inputs(): UpgradeToCall__Inputs { - return new UpgradeToCall__Inputs(this); - } - - get outputs(): UpgradeToCall__Outputs { - return new UpgradeToCall__Outputs(this); - } -} - -export class UpgradeToCall__Inputs { - _call: UpgradeToCall; - - constructor(call: UpgradeToCall) { - this._call = call; - } - - get newImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class UpgradeToCall__Outputs { - _call: UpgradeToCall; - - constructor(call: UpgradeToCall) { - this._call = call; - } -} diff --git a/governance/subgraph/generated/Grants/ElectionModule.ts b/governance/subgraph/generated/Grants/ElectionModule.ts deleted file mode 100644 index 7fb77c6af..000000000 --- a/governance/subgraph/generated/Grants/ElectionModule.ts +++ /dev/null @@ -1,2585 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class AssociatedSystemSet extends ethereum.Event { - get params(): AssociatedSystemSet__Params { - return new AssociatedSystemSet__Params(this); - } -} - -export class AssociatedSystemSet__Params { - _event: AssociatedSystemSet; - - constructor(event: AssociatedSystemSet) { - this._event = event; - } - - get kind(): Bytes { - return this._event.parameters[0].value.toBytes(); - } - - get id(): Bytes { - return this._event.parameters[1].value.toBytes(); - } - - get proxy(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get impl(): Address { - return this._event.parameters[3].value.toAddress(); - } -} - -export class NewSupportedCrossChainNetwork extends ethereum.Event { - get params(): NewSupportedCrossChainNetwork__Params { - return new NewSupportedCrossChainNetwork__Params(this); - } -} - -export class NewSupportedCrossChainNetwork__Params { - _event: NewSupportedCrossChainNetwork; - - constructor(event: NewSupportedCrossChainNetwork) { - this._event = event; - } - - get newChainId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class CandidateNominated extends ethereum.Event { - get params(): CandidateNominated__Params { - return new CandidateNominated__Params(this); - } -} - -export class CandidateNominated__Params { - _event: CandidateNominated; - - constructor(event: CandidateNominated) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberAdded extends ethereum.Event { - get params(): CouncilMemberAdded__Params { - return new CouncilMemberAdded__Params(this); - } -} - -export class CouncilMemberAdded__Params { - _event: CouncilMemberAdded; - - constructor(event: CouncilMemberAdded) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberRemoved extends ethereum.Event { - get params(): CouncilMemberRemoved__Params { - return new CouncilMemberRemoved__Params(this); - } -} - -export class CouncilMemberRemoved__Params { - _event: CouncilMemberRemoved; - - constructor(event: CouncilMemberRemoved) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMembersDismissed extends ethereum.Event { - get params(): CouncilMembersDismissed__Params { - return new CouncilMembersDismissed__Params(this); - } -} - -export class CouncilMembersDismissed__Params { - _event: CouncilMembersDismissed; - - constructor(event: CouncilMembersDismissed) { - this._event = event; - } - - get dismissedMembers(): Array
{ - return this._event.parameters[0].value.toAddressArray(); - } - - get epochId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class ElectionBatchEvaluated extends ethereum.Event { - get params(): ElectionBatchEvaluated__Params { - return new ElectionBatchEvaluated__Params(this); - } -} - -export class ElectionBatchEvaluated__Params { - _event: ElectionBatchEvaluated; - - constructor(event: ElectionBatchEvaluated) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get numEvaluatedBallots(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get totalBallots(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class ElectionEvaluated extends ethereum.Event { - get params(): ElectionEvaluated__Params { - return new ElectionEvaluated__Params(this); - } -} - -export class ElectionEvaluated__Params { - _event: ElectionEvaluated; - - constructor(event: ElectionEvaluated) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get ballotCount(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class ElectionModuleInitialized extends ethereum.Event { - get params(): ElectionModuleInitialized__Params { - return new ElectionModuleInitialized__Params(this); - } -} - -export class ElectionModuleInitialized__Params { - _event: ElectionModuleInitialized; - - constructor(event: ElectionModuleInitialized) { - this._event = event; - } -} - -export class EmergencyElectionStarted extends ethereum.Event { - get params(): EmergencyElectionStarted__Params { - return new EmergencyElectionStarted__Params(this); - } -} - -export class EmergencyElectionStarted__Params { - _event: EmergencyElectionStarted; - - constructor(event: EmergencyElectionStarted) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class EpochScheduleUpdated extends ethereum.Event { - get params(): EpochScheduleUpdated__Params { - return new EpochScheduleUpdated__Params(this); - } -} - -export class EpochScheduleUpdated__Params { - _event: EpochScheduleUpdated; - - constructor(event: EpochScheduleUpdated) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get startDate(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get endDate(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class EpochStarted extends ethereum.Event { - get params(): EpochStarted__Params { - return new EpochStarted__Params(this); - } -} - -export class EpochStarted__Params { - _event: EpochStarted; - - constructor(event: EpochStarted) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class NominationWithdrawn extends ethereum.Event { - get params(): NominationWithdrawn__Params { - return new NominationWithdrawn__Params(this); - } -} - -export class NominationWithdrawn__Params { - _event: NominationWithdrawn; - - constructor(event: NominationWithdrawn) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class VoteRecorded extends ethereum.Event { - get params(): VoteRecorded__Params { - return new VoteRecorded__Params(this); - } -} - -export class VoteRecorded__Params { - _event: VoteRecorded; - - constructor(event: VoteRecorded) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get chainId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epochId(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get votingPower(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } - - get candidates(): Array
{ - return this._event.parameters[4].value.toAddressArray(); - } -} - -export class VoteWithdrawn extends ethereum.Event { - get params(): VoteWithdrawn__Params { - return new VoteWithdrawn__Params(this); - } -} - -export class VoteWithdrawn__Params { - _event: VoteWithdrawn; - - constructor(event: VoteWithdrawn) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get chainId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epochId(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get candidates(): Array
{ - return this._event.parameters[3].value.toAddressArray(); - } -} - -export class OwnerChanged extends ethereum.Event { - get params(): OwnerChanged__Params { - return new OwnerChanged__Params(this); - } -} - -export class OwnerChanged__Params { - _event: OwnerChanged; - - constructor(event: OwnerChanged) { - this._event = event; - } - - get oldOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get newOwner(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class OwnerNominated extends ethereum.Event { - get params(): OwnerNominated__Params { - return new OwnerNominated__Params(this); - } -} - -export class OwnerNominated__Params { - _event: OwnerNominated; - - constructor(event: OwnerNominated) { - this._event = event; - } - - get newOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class Upgraded extends ethereum.Event { - get params(): Upgraded__Params { - return new Upgraded__Params(this); - } -} - -export class Upgraded__Params { - _event: Upgraded; - - constructor(event: Upgraded) { - this._event = event; - } - - get self(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get implementation(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class ElectionModule__getAssociatedSystemResult { - value0: Address; - value1: Bytes; - - constructor(value0: Address, value1: Bytes) { - this.value0 = value0; - this.value1 = value1; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromAddress(this.value0)); - map.set("value1", ethereum.Value.fromFixedBytes(this.value1)); - return map; - } - - getAddr(): Address { - return this.value0; - } - - getKind(): Bytes { - return this.value1; - } -} - -export class ElectionModule__getBallotResultValue0Struct extends ethereum.Tuple { - get votingPower(): BigInt { - return this[0].toBigInt(); - } - - get votedCandidates(): Array
{ - return this[1].toAddressArray(); - } - - get amounts(): Array { - return this[2].toBigIntArray(); - } -} - -export class ElectionModule__getElectionSettingsResultSettingsStruct extends ethereum.Tuple { - get epochSeatCount(): i32 { - return this[0].toI32(); - } - - get minimumActiveMembers(): i32 { - return this[1].toI32(); - } - - get epochDuration(): BigInt { - return this[2].toBigInt(); - } - - get nominationPeriodDuration(): BigInt { - return this[3].toBigInt(); - } - - get votingPeriodDuration(): BigInt { - return this[4].toBigInt(); - } - - get maxDateAdjustmentTolerance(): BigInt { - return this[5].toBigInt(); - } -} - -export class ElectionModule__getEpochScheduleResultEpochStruct extends ethereum.Tuple { - get startDate(): BigInt { - return this[0].toBigInt(); - } - - get nominationPeriodStartDate(): BigInt { - return this[1].toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this[2].toBigInt(); - } - - get endDate(): BigInt { - return this[3].toBigInt(); - } -} - -export class ElectionModule__getNextElectionSettingsResultSettingsStruct extends ethereum.Tuple { - get epochSeatCount(): i32 { - return this[0].toI32(); - } - - get minimumActiveMembers(): i32 { - return this[1].toI32(); - } - - get epochDuration(): BigInt { - return this[2].toBigInt(); - } - - get nominationPeriodDuration(): BigInt { - return this[3].toBigInt(); - } - - get votingPeriodDuration(): BigInt { - return this[4].toBigInt(); - } - - get maxDateAdjustmentTolerance(): BigInt { - return this[5].toBigInt(); - } -} - -export class ElectionModule extends ethereum.SmartContract { - static bind(address: Address): ElectionModule { - return new ElectionModule("ElectionModule", address); - } - - getAssociatedSystem(id: Bytes): ElectionModule__getAssociatedSystemResult { - let result = super.call( - "getAssociatedSystem", - "getAssociatedSystem(bytes32):(address,bytes32)", - [ethereum.Value.fromFixedBytes(id)] - ); - - return new ElectionModule__getAssociatedSystemResult( - result[0].toAddress(), - result[1].toBytes() - ); - } - - try_getAssociatedSystem( - id: Bytes - ): ethereum.CallResult { - let result = super.tryCall( - "getAssociatedSystem", - "getAssociatedSystem(bytes32):(address,bytes32)", - [ethereum.Value.fromFixedBytes(id)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new ElectionModule__getAssociatedSystemResult( - value[0].toAddress(), - value[1].toBytes() - ) - ); - } - - setSupportedCrossChainNetworks( - supportedNetworks: Array, - ccipSelectors: Array - ): BigInt { - let result = super.call( - "setSupportedCrossChainNetworks", - "setSupportedCrossChainNetworks(uint64[],uint64[]):(uint256)", - [ - ethereum.Value.fromUnsignedBigIntArray(supportedNetworks), - ethereum.Value.fromUnsignedBigIntArray(ccipSelectors) - ] - ); - - return result[0].toBigInt(); - } - - try_setSupportedCrossChainNetworks( - supportedNetworks: Array, - ccipSelectors: Array - ): ethereum.CallResult { - let result = super.tryCall( - "setSupportedCrossChainNetworks", - "setSupportedCrossChainNetworks(uint64[],uint64[]):(uint256)", - [ - ethereum.Value.fromUnsignedBigIntArray(supportedNetworks), - ethereum.Value.fromUnsignedBigIntArray(ccipSelectors) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCandidateVotesInEpoch(candidate: Address, epochIndex: BigInt): BigInt { - let result = super.call( - "getCandidateVotesInEpoch", - "getCandidateVotesInEpoch(address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotesInEpoch( - candidate: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotesInEpoch", - "getCandidateVotesInEpoch(address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionWinnersInEpoch(epochIndex: BigInt): Array
{ - let result = super.call( - "getElectionWinnersInEpoch", - "getElectionWinnersInEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinnersInEpoch( - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinnersInEpoch", - "getElectionWinnersInEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochEndDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getEpochEndDateForIndex", - "getEpochEndDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getEpochEndDateForIndex(epochIndex: BigInt): ethereum.CallResult { - let result = super.tryCall( - "getEpochEndDateForIndex", - "getEpochEndDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getEpochStartDateForIndex", - "getEpochStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getEpochStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getEpochStartDateForIndex", - "getEpochStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNominationPeriodStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getNominationPeriodStartDateForIndex", - "getNominationPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getNominationPeriodStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getNominationPeriodStartDateForIndex", - "getNominationPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNomineesAtEpoch(epochIndex: BigInt): Array
{ - let result = super.call( - "getNomineesAtEpoch", - "getNomineesAtEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toAddressArray(); - } - - try_getNomineesAtEpoch( - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getNomineesAtEpoch", - "getNomineesAtEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotingPeriodStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getVotingPeriodStartDateForIndex", - "getVotingPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getVotingPeriodStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getVotingPeriodStartDateForIndex", - "getVotingPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVotedInEpoch(user: Address, chainId: BigInt, epochIndex: BigInt): boolean { - let result = super.call( - "hasVotedInEpoch", - "hasVotedInEpoch(address,uint256,uint256):(bool)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBoolean(); - } - - try_hasVotedInEpoch( - user: Address, - chainId: BigInt, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "hasVotedInEpoch", - "hasVotedInEpoch(address,uint256,uint256):(bool)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - wasNominated(candidate: Address, epochIndex: BigInt): boolean { - let result = super.call( - "wasNominated", - "wasNominated(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBoolean(); - } - - try_wasNominated( - candidate: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "wasNominated", - "wasNominated(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - getBallot( - voter: Address, - chainId: BigInt, - electionId: BigInt - ): ElectionModule__getBallotResultValue0Struct { - let result = super.call( - "getBallot", - "getBallot(address,uint256,uint256):((uint256,address[],uint256[]))", - [ - ethereum.Value.fromAddress(voter), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - - return changetype( - result[0].toTuple() - ); - } - - try_getBallot( - voter: Address, - chainId: BigInt, - electionId: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getBallot", - "getBallot(address,uint256,uint256):((uint256,address[],uint256[]))", - [ - ethereum.Value.fromAddress(voter), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - changetype( - value[0].toTuple() - ) - ); - } - - getBallotCandidates( - voter: Address, - chainId: BigInt, - electionId: BigInt - ): Array
{ - let result = super.call( - "getBallotCandidates", - "getBallotCandidates(address,uint256,uint256):(address[])", - [ - ethereum.Value.fromAddress(voter), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - - return result[0].toAddressArray(); - } - - try_getBallotCandidates( - voter: Address, - chainId: BigInt, - electionId: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getBallotCandidates", - "getBallotCandidates(address,uint256,uint256):(address[])", - [ - ethereum.Value.fromAddress(voter), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getCandidateVotes(candidate: Address): BigInt { - let result = super.call( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotes(candidate: Address): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCouncilMembers(): Array
{ - let result = super.call( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getCouncilMembers(): ethereum.CallResult> { - let result = super.tryCall( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getCouncilToken(): Address { - let result = super.call( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getCouncilToken(): ethereum.CallResult
{ - let result = super.tryCall( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getCurrentPeriod(): BigInt { - let result = super.call( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getCurrentPeriod(): ethereum.CallResult { - let result = super.tryCall( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionSettings(): ElectionModule__getElectionSettingsResultSettingsStruct { - let result = super.call( - "getElectionSettings", - "getElectionSettings():((uint8,uint8,uint64,uint64,uint64,uint64))", - [] - ); - - return changetype( - result[0].toTuple() - ); - } - - try_getElectionSettings(): ethereum.CallResult< - ElectionModule__getElectionSettingsResultSettingsStruct - > { - let result = super.tryCall( - "getElectionSettings", - "getElectionSettings():((uint8,uint8,uint64,uint64,uint64,uint64))", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - changetype( - value[0].toTuple() - ) - ); - } - - getElectionWinners(): Array
{ - let result = super.call( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinners(): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochIndex(): BigInt { - let result = super.call("getEpochIndex", "getEpochIndex():(uint256)", []); - - return result[0].toBigInt(); - } - - try_getEpochIndex(): ethereum.CallResult { - let result = super.tryCall( - "getEpochIndex", - "getEpochIndex():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochSchedule(): ElectionModule__getEpochScheduleResultEpochStruct { - let result = super.call( - "getEpochSchedule", - "getEpochSchedule():((uint64,uint64,uint64,uint64))", - [] - ); - - return changetype( - result[0].toTuple() - ); - } - - try_getEpochSchedule(): ethereum.CallResult< - ElectionModule__getEpochScheduleResultEpochStruct - > { - let result = super.tryCall( - "getEpochSchedule", - "getEpochSchedule():((uint64,uint64,uint64,uint64))", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - changetype( - value[0].toTuple() - ) - ); - } - - getNextElectionSettings(): ElectionModule__getNextElectionSettingsResultSettingsStruct { - let result = super.call( - "getNextElectionSettings", - "getNextElectionSettings():((uint8,uint8,uint64,uint64,uint64,uint64))", - [] - ); - - return changetype< - ElectionModule__getNextElectionSettingsResultSettingsStruct - >(result[0].toTuple()); - } - - try_getNextElectionSettings(): ethereum.CallResult< - ElectionModule__getNextElectionSettingsResultSettingsStruct - > { - let result = super.tryCall( - "getNextElectionSettings", - "getNextElectionSettings():((uint8,uint8,uint64,uint64,uint64,uint64))", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - changetype( - value[0].toTuple() - ) - ); - } - - getNominees(): Array
{ - let result = super.call("getNominees", "getNominees():(address[])", []); - - return result[0].toAddressArray(); - } - - try_getNominees(): ethereum.CallResult> { - let result = super.tryCall("getNominees", "getNominees():(address[])", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotePower(user: Address, chainId: BigInt, electionId: BigInt): BigInt { - let result = super.call( - "getVotePower", - "getVotePower(address,uint256,uint256):(uint256)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - - return result[0].toBigInt(); - } - - try_getVotePower( - user: Address, - chainId: BigInt, - electionId: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getVotePower", - "getVotePower(address,uint256,uint256):(uint256)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVoted(user: Address, chainId: BigInt): boolean { - let result = super.call("hasVoted", "hasVoted(address,uint256):(bool)", [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId) - ]); - - return result[0].toBoolean(); - } - - try_hasVoted(user: Address, chainId: BigInt): ethereum.CallResult { - let result = super.tryCall("hasVoted", "hasVoted(address,uint256):(bool)", [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionEvaluated(): boolean { - let result = super.call( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionEvaluated(): ethereum.CallResult { - let result = super.tryCall( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionModuleInitialized(): boolean { - let result = super.call( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionModuleInitialized(): ethereum.CallResult { - let result = super.tryCall( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isNominated(candidate: Address): boolean { - let result = super.call("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - - return result[0].toBoolean(); - } - - try_isNominated(candidate: Address): ethereum.CallResult { - let result = super.tryCall("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - getVotePowerSnapshotId( - snapshotContract: Address, - electionId: BigInt - ): BigInt { - let result = super.call( - "getVotePowerSnapshotId", - "getVotePowerSnapshotId(address,uint128):(uint128)", - [ - ethereum.Value.fromAddress(snapshotContract), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - - return result[0].toBigInt(); - } - - try_getVotePowerSnapshotId( - snapshotContract: Address, - electionId: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getVotePowerSnapshotId", - "getVotePowerSnapshotId(address,uint128):(uint128)", - [ - ethereum.Value.fromAddress(snapshotContract), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - prepareBallotWithSnapshot(snapshotContract: Address, voter: Address): BigInt { - let result = super.call( - "prepareBallotWithSnapshot", - "prepareBallotWithSnapshot(address,address):(uint256)", - [ - ethereum.Value.fromAddress(snapshotContract), - ethereum.Value.fromAddress(voter) - ] - ); - - return result[0].toBigInt(); - } - - try_prepareBallotWithSnapshot( - snapshotContract: Address, - voter: Address - ): ethereum.CallResult { - let result = super.tryCall( - "prepareBallotWithSnapshot", - "prepareBallotWithSnapshot(address,address):(uint256)", - [ - ethereum.Value.fromAddress(snapshotContract), - ethereum.Value.fromAddress(voter) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - takeVotePowerSnapshot(snapshotContract: Address): BigInt { - let result = super.call( - "takeVotePowerSnapshot", - "takeVotePowerSnapshot(address):(uint128)", - [ethereum.Value.fromAddress(snapshotContract)] - ); - - return result[0].toBigInt(); - } - - try_takeVotePowerSnapshot( - snapshotContract: Address - ): ethereum.CallResult { - let result = super.tryCall( - "takeVotePowerSnapshot", - "takeVotePowerSnapshot(address):(uint128)", - [ethereum.Value.fromAddress(snapshotContract)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getImplementation(): Address { - let result = super.call( - "getImplementation", - "getImplementation():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getImplementation(): ethereum.CallResult
{ - let result = super.tryCall( - "getImplementation", - "getImplementation():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - nominatedOwner(): Address { - let result = super.call("nominatedOwner", "nominatedOwner():(address)", []); - - return result[0].toAddress(); - } - - try_nominatedOwner(): ethereum.CallResult
{ - let result = super.tryCall( - "nominatedOwner", - "nominatedOwner():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - owner(): Address { - let result = super.call("owner", "owner():(address)", []); - - return result[0].toAddress(); - } - - try_owner(): ethereum.CallResult
{ - let result = super.tryCall("owner", "owner():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } -} - -export class InitOrUpgradeNftCall extends ethereum.Call { - get inputs(): InitOrUpgradeNftCall__Inputs { - return new InitOrUpgradeNftCall__Inputs(this); - } - - get outputs(): InitOrUpgradeNftCall__Outputs { - return new InitOrUpgradeNftCall__Outputs(this); - } -} - -export class InitOrUpgradeNftCall__Inputs { - _call: InitOrUpgradeNftCall; - - constructor(call: InitOrUpgradeNftCall) { - this._call = call; - } - - get id(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get name(): string { - return this._call.inputValues[1].value.toString(); - } - - get symbol(): string { - return this._call.inputValues[2].value.toString(); - } - - get uri(): string { - return this._call.inputValues[3].value.toString(); - } - - get impl(): Address { - return this._call.inputValues[4].value.toAddress(); - } -} - -export class InitOrUpgradeNftCall__Outputs { - _call: InitOrUpgradeNftCall; - - constructor(call: InitOrUpgradeNftCall) { - this._call = call; - } -} - -export class InitOrUpgradeTokenCall extends ethereum.Call { - get inputs(): InitOrUpgradeTokenCall__Inputs { - return new InitOrUpgradeTokenCall__Inputs(this); - } - - get outputs(): InitOrUpgradeTokenCall__Outputs { - return new InitOrUpgradeTokenCall__Outputs(this); - } -} - -export class InitOrUpgradeTokenCall__Inputs { - _call: InitOrUpgradeTokenCall; - - constructor(call: InitOrUpgradeTokenCall) { - this._call = call; - } - - get id(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get name(): string { - return this._call.inputValues[1].value.toString(); - } - - get symbol(): string { - return this._call.inputValues[2].value.toString(); - } - - get decimals(): i32 { - return this._call.inputValues[3].value.toI32(); - } - - get impl(): Address { - return this._call.inputValues[4].value.toAddress(); - } -} - -export class InitOrUpgradeTokenCall__Outputs { - _call: InitOrUpgradeTokenCall; - - constructor(call: InitOrUpgradeTokenCall) { - this._call = call; - } -} - -export class RegisterUnmanagedSystemCall extends ethereum.Call { - get inputs(): RegisterUnmanagedSystemCall__Inputs { - return new RegisterUnmanagedSystemCall__Inputs(this); - } - - get outputs(): RegisterUnmanagedSystemCall__Outputs { - return new RegisterUnmanagedSystemCall__Outputs(this); - } -} - -export class RegisterUnmanagedSystemCall__Inputs { - _call: RegisterUnmanagedSystemCall; - - constructor(call: RegisterUnmanagedSystemCall) { - this._call = call; - } - - get id(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get endpoint(): Address { - return this._call.inputValues[1].value.toAddress(); - } -} - -export class RegisterUnmanagedSystemCall__Outputs { - _call: RegisterUnmanagedSystemCall; - - constructor(call: RegisterUnmanagedSystemCall) { - this._call = call; - } -} - -export class ConfigureChainlinkCrossChainCall extends ethereum.Call { - get inputs(): ConfigureChainlinkCrossChainCall__Inputs { - return new ConfigureChainlinkCrossChainCall__Inputs(this); - } - - get outputs(): ConfigureChainlinkCrossChainCall__Outputs { - return new ConfigureChainlinkCrossChainCall__Outputs(this); - } -} - -export class ConfigureChainlinkCrossChainCall__Inputs { - _call: ConfigureChainlinkCrossChainCall; - - constructor(call: ConfigureChainlinkCrossChainCall) { - this._call = call; - } - - get ccipRouter(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class ConfigureChainlinkCrossChainCall__Outputs { - _call: ConfigureChainlinkCrossChainCall; - - constructor(call: ConfigureChainlinkCrossChainCall) { - this._call = call; - } -} - -export class SetSupportedCrossChainNetworksCall extends ethereum.Call { - get inputs(): SetSupportedCrossChainNetworksCall__Inputs { - return new SetSupportedCrossChainNetworksCall__Inputs(this); - } - - get outputs(): SetSupportedCrossChainNetworksCall__Outputs { - return new SetSupportedCrossChainNetworksCall__Outputs(this); - } -} - -export class SetSupportedCrossChainNetworksCall__Inputs { - _call: SetSupportedCrossChainNetworksCall; - - constructor(call: SetSupportedCrossChainNetworksCall) { - this._call = call; - } - - get supportedNetworks(): Array { - return this._call.inputValues[0].value.toBigIntArray(); - } - - get ccipSelectors(): Array { - return this._call.inputValues[1].value.toBigIntArray(); - } -} - -export class SetSupportedCrossChainNetworksCall__Outputs { - _call: SetSupportedCrossChainNetworksCall; - - constructor(call: SetSupportedCrossChainNetworksCall) { - this._call = call; - } - - get numRegistered(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class _recvCastCall extends ethereum.Call { - get inputs(): _recvCastCall__Inputs { - return new _recvCastCall__Inputs(this); - } - - get outputs(): _recvCastCall__Outputs { - return new _recvCastCall__Outputs(this); - } -} - -export class _recvCastCall__Inputs { - _call: _recvCastCall; - - constructor(call: _recvCastCall) { - this._call = call; - } - - get epochIndex(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get voter(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get votingPower(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get chainId(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get candidates(): Array
{ - return this._call.inputValues[4].value.toAddressArray(); - } - - get amounts(): Array { - return this._call.inputValues[5].value.toBigIntArray(); - } -} - -export class _recvCastCall__Outputs { - _call: _recvCastCall; - - constructor(call: _recvCastCall) { - this._call = call; - } -} - -export class _recvDismissMembersCall extends ethereum.Call { - get inputs(): _recvDismissMembersCall__Inputs { - return new _recvDismissMembersCall__Inputs(this); - } - - get outputs(): _recvDismissMembersCall__Outputs { - return new _recvDismissMembersCall__Outputs(this); - } -} - -export class _recvDismissMembersCall__Inputs { - _call: _recvDismissMembersCall; - - constructor(call: _recvDismissMembersCall) { - this._call = call; - } - - get membersToDismiss(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } - - get epochIndex(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class _recvDismissMembersCall__Outputs { - _call: _recvDismissMembersCall; - - constructor(call: _recvDismissMembersCall) { - this._call = call; - } -} - -export class _recvResolveCall extends ethereum.Call { - get inputs(): _recvResolveCall__Inputs { - return new _recvResolveCall__Inputs(this); - } - - get outputs(): _recvResolveCall__Outputs { - return new _recvResolveCall__Outputs(this); - } -} - -export class _recvResolveCall__Inputs { - _call: _recvResolveCall; - - constructor(call: _recvResolveCall) { - this._call = call; - } - - get epochIndex(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get epochStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get nominationPeriodStartDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get councilMembers(): Array
{ - return this._call.inputValues[5].value.toAddressArray(); - } -} - -export class _recvResolveCall__Outputs { - _call: _recvResolveCall; - - constructor(call: _recvResolveCall) { - this._call = call; - } -} - -export class _recvTweakEpochScheduleCall extends ethereum.Call { - get inputs(): _recvTweakEpochScheduleCall__Inputs { - return new _recvTweakEpochScheduleCall__Inputs(this); - } - - get outputs(): _recvTweakEpochScheduleCall__Outputs { - return new _recvTweakEpochScheduleCall__Outputs(this); - } -} - -export class _recvTweakEpochScheduleCall__Inputs { - _call: _recvTweakEpochScheduleCall; - - constructor(call: _recvTweakEpochScheduleCall) { - this._call = call; - } - - get epochIndex(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get nominationPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } -} - -export class _recvTweakEpochScheduleCall__Outputs { - _call: _recvTweakEpochScheduleCall; - - constructor(call: _recvTweakEpochScheduleCall) { - this._call = call; - } -} - -export class _recvWithdrawVoteCall extends ethereum.Call { - get inputs(): _recvWithdrawVoteCall__Inputs { - return new _recvWithdrawVoteCall__Inputs(this); - } - - get outputs(): _recvWithdrawVoteCall__Outputs { - return new _recvWithdrawVoteCall__Outputs(this); - } -} - -export class _recvWithdrawVoteCall__Inputs { - _call: _recvWithdrawVoteCall; - - constructor(call: _recvWithdrawVoteCall) { - this._call = call; - } - - get epochIndex(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get voter(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get chainId(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get candidates(): Array
{ - return this._call.inputValues[3].value.toAddressArray(); - } -} - -export class _recvWithdrawVoteCall__Outputs { - _call: _recvWithdrawVoteCall; - - constructor(call: _recvWithdrawVoteCall) { - this._call = call; - } -} - -export class CastCall extends ethereum.Call { - get inputs(): CastCall__Inputs { - return new CastCall__Inputs(this); - } - - get outputs(): CastCall__Outputs { - return new CastCall__Outputs(this); - } -} - -export class CastCall__Inputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } - - get candidates(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } - - get amounts(): Array { - return this._call.inputValues[1].value.toBigIntArray(); - } -} - -export class CastCall__Outputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } -} - -export class DismissMembersCall extends ethereum.Call { - get inputs(): DismissMembersCall__Inputs { - return new DismissMembersCall__Inputs(this); - } - - get outputs(): DismissMembersCall__Outputs { - return new DismissMembersCall__Outputs(this); - } -} - -export class DismissMembersCall__Inputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } - - get membersToDismiss(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class DismissMembersCall__Outputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } -} - -export class EvaluateCall extends ethereum.Call { - get inputs(): EvaluateCall__Inputs { - return new EvaluateCall__Inputs(this); - } - - get outputs(): EvaluateCall__Outputs { - return new EvaluateCall__Outputs(this); - } -} - -export class EvaluateCall__Inputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } - - get numBallots(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class EvaluateCall__Outputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } -} - -export class InitElectionModuleSatelliteCall extends ethereum.Call { - get inputs(): InitElectionModuleSatelliteCall__Inputs { - return new InitElectionModuleSatelliteCall__Inputs(this); - } - - get outputs(): InitElectionModuleSatelliteCall__Outputs { - return new InitElectionModuleSatelliteCall__Outputs(this); - } -} - -export class InitElectionModuleSatelliteCall__Inputs { - _call: InitElectionModuleSatelliteCall; - - constructor(call: InitElectionModuleSatelliteCall) { - this._call = call; - } - - get epochIndex(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get epochStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get nominationPeriodStartDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get councilMembers(): Array
{ - return this._call.inputValues[5].value.toAddressArray(); - } -} - -export class InitElectionModuleSatelliteCall__Outputs { - _call: InitElectionModuleSatelliteCall; - - constructor(call: InitElectionModuleSatelliteCall) { - this._call = call; - } -} - -export class InitElectionModuleSatellite1Call extends ethereum.Call { - get inputs(): InitElectionModuleSatellite1Call__Inputs { - return new InitElectionModuleSatellite1Call__Inputs(this); - } - - get outputs(): InitElectionModuleSatellite1Call__Outputs { - return new InitElectionModuleSatellite1Call__Outputs(this); - } -} - -export class InitElectionModuleSatellite1Call__Inputs { - _call: InitElectionModuleSatellite1Call; - - constructor(call: InitElectionModuleSatellite1Call) { - this._call = call; - } -} - -export class InitElectionModuleSatellite1Call__Outputs { - _call: InitElectionModuleSatellite1Call; - - constructor(call: InitElectionModuleSatellite1Call) { - this._call = call; - } -} - -export class InitOrUpdateElectionSettingsCall extends ethereum.Call { - get inputs(): InitOrUpdateElectionSettingsCall__Inputs { - return new InitOrUpdateElectionSettingsCall__Inputs(this); - } - - get outputs(): InitOrUpdateElectionSettingsCall__Outputs { - return new InitOrUpdateElectionSettingsCall__Outputs(this); - } -} - -export class InitOrUpdateElectionSettingsCall__Inputs { - _call: InitOrUpdateElectionSettingsCall; - - constructor(call: InitOrUpdateElectionSettingsCall) { - this._call = call; - } - - get initialCouncil(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } - - get minimumActiveMembers(): i32 { - return this._call.inputValues[1].value.toI32(); - } - - get initialNominationPeriodStartDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get administrationPeriodDuration(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get nominationPeriodDuration(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get votingPeriodDuration(): BigInt { - return this._call.inputValues[5].value.toBigInt(); - } -} - -export class InitOrUpdateElectionSettingsCall__Outputs { - _call: InitOrUpdateElectionSettingsCall; - - constructor(call: InitOrUpdateElectionSettingsCall) { - this._call = call; - } -} - -export class NominateCall extends ethereum.Call { - get inputs(): NominateCall__Inputs { - return new NominateCall__Inputs(this); - } - - get outputs(): NominateCall__Outputs { - return new NominateCall__Outputs(this); - } -} - -export class NominateCall__Inputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class NominateCall__Outputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class ResolveCall extends ethereum.Call { - get inputs(): ResolveCall__Inputs { - return new ResolveCall__Inputs(this); - } - - get outputs(): ResolveCall__Outputs { - return new ResolveCall__Outputs(this); - } -} - -export class ResolveCall__Inputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class ResolveCall__Outputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class SetNextElectionSettingsCall extends ethereum.Call { - get inputs(): SetNextElectionSettingsCall__Inputs { - return new SetNextElectionSettingsCall__Inputs(this); - } - - get outputs(): SetNextElectionSettingsCall__Outputs { - return new SetNextElectionSettingsCall__Outputs(this); - } -} - -export class SetNextElectionSettingsCall__Inputs { - _call: SetNextElectionSettingsCall; - - constructor(call: SetNextElectionSettingsCall) { - this._call = call; - } - - get epochSeatCount(): i32 { - return this._call.inputValues[0].value.toI32(); - } - - get minimumActiveMembers(): i32 { - return this._call.inputValues[1].value.toI32(); - } - - get epochDuration(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get nominationPeriodDuration(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get votingPeriodDuration(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get maxDateAdjustmentTolerance(): BigInt { - return this._call.inputValues[5].value.toBigInt(); - } -} - -export class SetNextElectionSettingsCall__Outputs { - _call: SetNextElectionSettingsCall; - - constructor(call: SetNextElectionSettingsCall) { - this._call = call; - } -} - -export class TweakEpochScheduleCall extends ethereum.Call { - get inputs(): TweakEpochScheduleCall__Inputs { - return new TweakEpochScheduleCall__Inputs(this); - } - - get outputs(): TweakEpochScheduleCall__Outputs { - return new TweakEpochScheduleCall__Outputs(this); - } -} - -export class TweakEpochScheduleCall__Inputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } - - get newNominationPeriodStartDate(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newVotingPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newEpochEndDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class TweakEpochScheduleCall__Outputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } -} - -export class WithdrawNominationCall extends ethereum.Call { - get inputs(): WithdrawNominationCall__Inputs { - return new WithdrawNominationCall__Inputs(this); - } - - get outputs(): WithdrawNominationCall__Outputs { - return new WithdrawNominationCall__Outputs(this); - } -} - -export class WithdrawNominationCall__Inputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawNominationCall__Outputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawVoteCall extends ethereum.Call { - get inputs(): WithdrawVoteCall__Inputs { - return new WithdrawVoteCall__Inputs(this); - } - - get outputs(): WithdrawVoteCall__Outputs { - return new WithdrawVoteCall__Outputs(this); - } -} - -export class WithdrawVoteCall__Inputs { - _call: WithdrawVoteCall; - - constructor(call: WithdrawVoteCall) { - this._call = call; - } - - get candidates(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class WithdrawVoteCall__Outputs { - _call: WithdrawVoteCall; - - constructor(call: WithdrawVoteCall) { - this._call = call; - } -} - -export class PrepareBallotWithSnapshotCall extends ethereum.Call { - get inputs(): PrepareBallotWithSnapshotCall__Inputs { - return new PrepareBallotWithSnapshotCall__Inputs(this); - } - - get outputs(): PrepareBallotWithSnapshotCall__Outputs { - return new PrepareBallotWithSnapshotCall__Outputs(this); - } -} - -export class PrepareBallotWithSnapshotCall__Inputs { - _call: PrepareBallotWithSnapshotCall; - - constructor(call: PrepareBallotWithSnapshotCall) { - this._call = call; - } - - get snapshotContract(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get voter(): Address { - return this._call.inputValues[1].value.toAddress(); - } -} - -export class PrepareBallotWithSnapshotCall__Outputs { - _call: PrepareBallotWithSnapshotCall; - - constructor(call: PrepareBallotWithSnapshotCall) { - this._call = call; - } - - get power(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class SetSnapshotContractCall extends ethereum.Call { - get inputs(): SetSnapshotContractCall__Inputs { - return new SetSnapshotContractCall__Inputs(this); - } - - get outputs(): SetSnapshotContractCall__Outputs { - return new SetSnapshotContractCall__Outputs(this); - } -} - -export class SetSnapshotContractCall__Inputs { - _call: SetSnapshotContractCall; - - constructor(call: SetSnapshotContractCall) { - this._call = call; - } - - get snapshotContract(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get enabled(): boolean { - return this._call.inputValues[1].value.toBoolean(); - } -} - -export class SetSnapshotContractCall__Outputs { - _call: SetSnapshotContractCall; - - constructor(call: SetSnapshotContractCall) { - this._call = call; - } -} - -export class TakeVotePowerSnapshotCall extends ethereum.Call { - get inputs(): TakeVotePowerSnapshotCall__Inputs { - return new TakeVotePowerSnapshotCall__Inputs(this); - } - - get outputs(): TakeVotePowerSnapshotCall__Outputs { - return new TakeVotePowerSnapshotCall__Outputs(this); - } -} - -export class TakeVotePowerSnapshotCall__Inputs { - _call: TakeVotePowerSnapshotCall; - - constructor(call: TakeVotePowerSnapshotCall) { - this._call = call; - } - - get snapshotContract(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class TakeVotePowerSnapshotCall__Outputs { - _call: TakeVotePowerSnapshotCall; - - constructor(call: TakeVotePowerSnapshotCall) { - this._call = call; - } - - get snapshotId(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class AcceptOwnershipCall extends ethereum.Call { - get inputs(): AcceptOwnershipCall__Inputs { - return new AcceptOwnershipCall__Inputs(this); - } - - get outputs(): AcceptOwnershipCall__Outputs { - return new AcceptOwnershipCall__Outputs(this); - } -} - -export class AcceptOwnershipCall__Inputs { - _call: AcceptOwnershipCall; - - constructor(call: AcceptOwnershipCall) { - this._call = call; - } -} - -export class AcceptOwnershipCall__Outputs { - _call: AcceptOwnershipCall; - - constructor(call: AcceptOwnershipCall) { - this._call = call; - } -} - -export class NominateNewOwnerCall extends ethereum.Call { - get inputs(): NominateNewOwnerCall__Inputs { - return new NominateNewOwnerCall__Inputs(this); - } - - get outputs(): NominateNewOwnerCall__Outputs { - return new NominateNewOwnerCall__Outputs(this); - } -} - -export class NominateNewOwnerCall__Inputs { - _call: NominateNewOwnerCall; - - constructor(call: NominateNewOwnerCall) { - this._call = call; - } - - get newNominatedOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class NominateNewOwnerCall__Outputs { - _call: NominateNewOwnerCall; - - constructor(call: NominateNewOwnerCall) { - this._call = call; - } -} - -export class RenounceNominationCall extends ethereum.Call { - get inputs(): RenounceNominationCall__Inputs { - return new RenounceNominationCall__Inputs(this); - } - - get outputs(): RenounceNominationCall__Outputs { - return new RenounceNominationCall__Outputs(this); - } -} - -export class RenounceNominationCall__Inputs { - _call: RenounceNominationCall; - - constructor(call: RenounceNominationCall) { - this._call = call; - } -} - -export class RenounceNominationCall__Outputs { - _call: RenounceNominationCall; - - constructor(call: RenounceNominationCall) { - this._call = call; - } -} - -export class SimulateUpgradeToCall extends ethereum.Call { - get inputs(): SimulateUpgradeToCall__Inputs { - return new SimulateUpgradeToCall__Inputs(this); - } - - get outputs(): SimulateUpgradeToCall__Outputs { - return new SimulateUpgradeToCall__Outputs(this); - } -} - -export class SimulateUpgradeToCall__Inputs { - _call: SimulateUpgradeToCall; - - constructor(call: SimulateUpgradeToCall) { - this._call = call; - } - - get newImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SimulateUpgradeToCall__Outputs { - _call: SimulateUpgradeToCall; - - constructor(call: SimulateUpgradeToCall) { - this._call = call; - } -} - -export class UpgradeToCall extends ethereum.Call { - get inputs(): UpgradeToCall__Inputs { - return new UpgradeToCall__Inputs(this); - } - - get outputs(): UpgradeToCall__Outputs { - return new UpgradeToCall__Outputs(this); - } -} - -export class UpgradeToCall__Inputs { - _call: UpgradeToCall; - - constructor(call: UpgradeToCall) { - this._call = call; - } - - get newImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class UpgradeToCall__Outputs { - _call: UpgradeToCall; - - constructor(call: UpgradeToCall) { - this._call = call; - } -} - -export class CcipReceiveCall extends ethereum.Call { - get inputs(): CcipReceiveCall__Inputs { - return new CcipReceiveCall__Inputs(this); - } - - get outputs(): CcipReceiveCall__Outputs { - return new CcipReceiveCall__Outputs(this); - } -} - -export class CcipReceiveCall__Inputs { - _call: CcipReceiveCall; - - constructor(call: CcipReceiveCall) { - this._call = call; - } - - get message(): CcipReceiveCallMessageStruct { - return changetype( - this._call.inputValues[0].value.toTuple() - ); - } -} - -export class CcipReceiveCall__Outputs { - _call: CcipReceiveCall; - - constructor(call: CcipReceiveCall) { - this._call = call; - } -} - -export class CcipReceiveCallMessageStruct extends ethereum.Tuple { - get messageId(): Bytes { - return this[0].toBytes(); - } - - get sourceChainSelector(): BigInt { - return this[1].toBigInt(); - } - - get sender(): Bytes { - return this[2].toBytes(); - } - - get data(): Bytes { - return this[3].toBytes(); - } - - get tokenAmounts(): Array { - return this[4].toTupleArray(); - } -} - -export class CcipReceiveCallMessageTokenAmountsStruct extends ethereum.Tuple { - get token(): Address { - return this[0].toAddress(); - } - - get amount(): BigInt { - return this[1].toBigInt(); - } -} diff --git a/governance/subgraph/generated/Grants/ElectionModuleOld.ts b/governance/subgraph/generated/Grants/ElectionModuleOld.ts deleted file mode 100644 index ff16bb4f7..000000000 --- a/governance/subgraph/generated/Grants/ElectionModuleOld.ts +++ /dev/null @@ -1,2613 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class CandidateNominated extends ethereum.Event { - get params(): CandidateNominated__Params { - return new CandidateNominated__Params(this); - } -} - -export class CandidateNominated__Params { - _event: CandidateNominated; - - constructor(event: CandidateNominated) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberAdded extends ethereum.Event { - get params(): CouncilMemberAdded__Params { - return new CouncilMemberAdded__Params(this); - } -} - -export class CouncilMemberAdded__Params { - _event: CouncilMemberAdded; - - constructor(event: CouncilMemberAdded) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberRemoved extends ethereum.Event { - get params(): CouncilMemberRemoved__Params { - return new CouncilMemberRemoved__Params(this); - } -} - -export class CouncilMemberRemoved__Params { - _event: CouncilMemberRemoved; - - constructor(event: CouncilMemberRemoved) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMembersDismissed extends ethereum.Event { - get params(): CouncilMembersDismissed__Params { - return new CouncilMembersDismissed__Params(this); - } -} - -export class CouncilMembersDismissed__Params { - _event: CouncilMembersDismissed; - - constructor(event: CouncilMembersDismissed) { - this._event = event; - } - - get members(): Array
{ - return this._event.parameters[0].value.toAddressArray(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilTokenCreated extends ethereum.Event { - get params(): CouncilTokenCreated__Params { - return new CouncilTokenCreated__Params(this); - } -} - -export class CouncilTokenCreated__Params { - _event: CouncilTokenCreated; - - constructor(event: CouncilTokenCreated) { - this._event = event; - } - - get proxy(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get implementation(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class CouncilTokenUpgraded extends ethereum.Event { - get params(): CouncilTokenUpgraded__Params { - return new CouncilTokenUpgraded__Params(this); - } -} - -export class CouncilTokenUpgraded__Params { - _event: CouncilTokenUpgraded; - - constructor(event: CouncilTokenUpgraded) { - this._event = event; - } - - get newImplementation(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class DefaultBallotEvaluationBatchSizeChanged extends ethereum.Event { - get params(): DefaultBallotEvaluationBatchSizeChanged__Params { - return new DefaultBallotEvaluationBatchSizeChanged__Params(this); - } -} - -export class DefaultBallotEvaluationBatchSizeChanged__Params { - _event: DefaultBallotEvaluationBatchSizeChanged; - - constructor(event: DefaultBallotEvaluationBatchSizeChanged) { - this._event = event; - } - - get size(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class ElectionBatchEvaluated extends ethereum.Event { - get params(): ElectionBatchEvaluated__Params { - return new ElectionBatchEvaluated__Params(this); - } -} - -export class ElectionBatchEvaluated__Params { - _event: ElectionBatchEvaluated; - - constructor(event: ElectionBatchEvaluated) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get evaluatedBallots(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get totalBallots(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class ElectionEvaluated extends ethereum.Event { - get params(): ElectionEvaluated__Params { - return new ElectionEvaluated__Params(this); - } -} - -export class ElectionEvaluated__Params { - _event: ElectionEvaluated; - - constructor(event: ElectionEvaluated) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get totalBallots(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class ElectionModuleInitialized extends ethereum.Event { - get params(): ElectionModuleInitialized__Params { - return new ElectionModuleInitialized__Params(this); - } -} - -export class ElectionModuleInitialized__Params { - _event: ElectionModuleInitialized; - - constructor(event: ElectionModuleInitialized) { - this._event = event; - } -} - -export class EmergencyElectionStarted extends ethereum.Event { - get params(): EmergencyElectionStarted__Params { - return new EmergencyElectionStarted__Params(this); - } -} - -export class EmergencyElectionStarted__Params { - _event: EmergencyElectionStarted; - - constructor(event: EmergencyElectionStarted) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class EpochScheduleUpdated extends ethereum.Event { - get params(): EpochScheduleUpdated__Params { - return new EpochScheduleUpdated__Params(this); - } -} - -export class EpochScheduleUpdated__Params { - _event: EpochScheduleUpdated; - - constructor(event: EpochScheduleUpdated) { - this._event = event; - } - - get nominationPeriodStartDate(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class EpochStarted extends ethereum.Event { - get params(): EpochStarted__Params { - return new EpochStarted__Params(this); - } -} - -export class EpochStarted__Params { - _event: EpochStarted; - - constructor(event: EpochStarted) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class MaxDateAdjustmentToleranceChanged extends ethereum.Event { - get params(): MaxDateAdjustmentToleranceChanged__Params { - return new MaxDateAdjustmentToleranceChanged__Params(this); - } -} - -export class MaxDateAdjustmentToleranceChanged__Params { - _event: MaxDateAdjustmentToleranceChanged; - - constructor(event: MaxDateAdjustmentToleranceChanged) { - this._event = event; - } - - get tolerance(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class MinimumActiveMembersChanged extends ethereum.Event { - get params(): MinimumActiveMembersChanged__Params { - return new MinimumActiveMembersChanged__Params(this); - } -} - -export class MinimumActiveMembersChanged__Params { - _event: MinimumActiveMembersChanged; - - constructor(event: MinimumActiveMembersChanged) { - this._event = event; - } - - get minimumActiveMembers(): i32 { - return this._event.parameters[0].value.toI32(); - } -} - -export class MinimumEpochDurationsChanged extends ethereum.Event { - get params(): MinimumEpochDurationsChanged__Params { - return new MinimumEpochDurationsChanged__Params(this); - } -} - -export class MinimumEpochDurationsChanged__Params { - _event: MinimumEpochDurationsChanged; - - constructor(event: MinimumEpochDurationsChanged) { - this._event = event; - } - - get minNominationPeriodDuration(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get minVotingPeriodDuration(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get minEpochDuration(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class NextEpochSeatCountChanged extends ethereum.Event { - get params(): NextEpochSeatCountChanged__Params { - return new NextEpochSeatCountChanged__Params(this); - } -} - -export class NextEpochSeatCountChanged__Params { - _event: NextEpochSeatCountChanged; - - constructor(event: NextEpochSeatCountChanged) { - this._event = event; - } - - get seatCount(): i32 { - return this._event.parameters[0].value.toI32(); - } -} - -export class NominationWithdrawn extends ethereum.Event { - get params(): NominationWithdrawn__Params { - return new NominationWithdrawn__Params(this); - } -} - -export class NominationWithdrawn__Params { - _event: NominationWithdrawn; - - constructor(event: NominationWithdrawn) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class VoteRecorded extends ethereum.Event { - get params(): VoteRecorded__Params { - return new VoteRecorded__Params(this); - } -} - -export class VoteRecorded__Params { - _event: VoteRecorded; - - constructor(event: VoteRecorded) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get ballotId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } - - get epochIndex(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get votePower(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class VoteWithdrawn extends ethereum.Event { - get params(): VoteWithdrawn__Params { - return new VoteWithdrawn__Params(this); - } -} - -export class VoteWithdrawn__Params { - _event: VoteWithdrawn; - - constructor(event: VoteWithdrawn) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get ballotId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } - - get epochIndex(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get votePower(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class CrossChainDebtShareDeclared extends ethereum.Event { - get params(): CrossChainDebtShareDeclared__Params { - return new CrossChainDebtShareDeclared__Params(this); - } -} - -export class CrossChainDebtShareDeclared__Params { - _event: CrossChainDebtShareDeclared; - - constructor(event: CrossChainDebtShareDeclared) { - this._event = event; - } - - get user(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get debtShare(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CrossChainDebtShareMerkleRootSet extends ethereum.Event { - get params(): CrossChainDebtShareMerkleRootSet__Params { - return new CrossChainDebtShareMerkleRootSet__Params(this); - } -} - -export class CrossChainDebtShareMerkleRootSet__Params { - _event: CrossChainDebtShareMerkleRootSet; - - constructor(event: CrossChainDebtShareMerkleRootSet) { - this._event = event; - } - - get merkleRoot(): Bytes { - return this._event.parameters[0].value.toBytes(); - } - - get blocknumber(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epoch(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class DebtShareContractSet extends ethereum.Event { - get params(): DebtShareContractSet__Params { - return new DebtShareContractSet__Params(this); - } -} - -export class DebtShareContractSet__Params { - _event: DebtShareContractSet; - - constructor(event: DebtShareContractSet) { - this._event = event; - } - - get contractAddress(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class DebtShareSnapshotIdSet extends ethereum.Event { - get params(): DebtShareSnapshotIdSet__Params { - return new DebtShareSnapshotIdSet__Params(this); - } -} - -export class DebtShareSnapshotIdSet__Params { - _event: DebtShareSnapshotIdSet; - - constructor(event: DebtShareSnapshotIdSet) { - this._event = event; - } - - get snapshotId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class OwnerChanged extends ethereum.Event { - get params(): OwnerChanged__Params { - return new OwnerChanged__Params(this); - } -} - -export class OwnerChanged__Params { - _event: OwnerChanged; - - constructor(event: OwnerChanged) { - this._event = event; - } - - get oldOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get newOwner(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class OwnerNominated extends ethereum.Event { - get params(): OwnerNominated__Params { - return new OwnerNominated__Params(this); - } -} - -export class OwnerNominated__Params { - _event: OwnerNominated; - - constructor(event: OwnerNominated) { - this._event = event; - } - - get newOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class Upgraded extends ethereum.Event { - get params(): Upgraded__Params { - return new Upgraded__Params(this); - } -} - -export class Upgraded__Params { - _event: Upgraded; - - constructor(event: Upgraded) { - this._event = event; - } - - get implementation(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class ElectionModuleOld__getMinEpochDurationsResult { - value0: BigInt; - value1: BigInt; - value2: BigInt; - - constructor(value0: BigInt, value1: BigInt, value2: BigInt) { - this.value0 = value0; - this.value1 = value1; - this.value2 = value2; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - map.set("value2", ethereum.Value.fromUnsignedBigInt(this.value2)); - return map; - } - - getMinNominationPeriodDuration(): BigInt { - return this.value0; - } - - getMinVotingPeriodDuration(): BigInt { - return this.value1; - } - - getMinEpochDuration(): BigInt { - return this.value2; - } -} - -export class ElectionModuleOld extends ethereum.SmartContract { - static bind(address: Address): ElectionModuleOld { - return new ElectionModuleOld("ElectionModuleOld", address); - } - - getBallotCandidatesInEpoch( - ballotId: Bytes, - epochIndex: BigInt - ): Array
{ - let result = super.call( - "getBallotCandidatesInEpoch", - "getBallotCandidatesInEpoch(bytes32,uint256):(address[])", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toAddressArray(); - } - - try_getBallotCandidatesInEpoch( - ballotId: Bytes, - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getBallotCandidatesInEpoch", - "getBallotCandidatesInEpoch(bytes32,uint256):(address[])", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getBallotVotedAtEpoch(user: Address, epochIndex: BigInt): Bytes { - let result = super.call( - "getBallotVotedAtEpoch", - "getBallotVotedAtEpoch(address,uint256):(bytes32)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBytes(); - } - - try_getBallotVotedAtEpoch( - user: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getBallotVotedAtEpoch", - "getBallotVotedAtEpoch(address,uint256):(bytes32)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getBallotVotesInEpoch(ballotId: Bytes, epochIndex: BigInt): BigInt { - let result = super.call( - "getBallotVotesInEpoch", - "getBallotVotesInEpoch(bytes32,uint256):(uint256)", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBigInt(); - } - - try_getBallotVotesInEpoch( - ballotId: Bytes, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getBallotVotesInEpoch", - "getBallotVotesInEpoch(bytes32,uint256):(uint256)", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCandidateVotesInEpoch(candidate: Address, epochIndex: BigInt): BigInt { - let result = super.call( - "getCandidateVotesInEpoch", - "getCandidateVotesInEpoch(address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotesInEpoch( - candidate: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotesInEpoch", - "getCandidateVotesInEpoch(address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionWinnersInEpoch(epochIndex: BigInt): Array
{ - let result = super.call( - "getElectionWinnersInEpoch", - "getElectionWinnersInEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinnersInEpoch( - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinnersInEpoch", - "getElectionWinnersInEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochEndDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getEpochEndDateForIndex", - "getEpochEndDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getEpochEndDateForIndex(epochIndex: BigInt): ethereum.CallResult { - let result = super.tryCall( - "getEpochEndDateForIndex", - "getEpochEndDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getEpochStartDateForIndex", - "getEpochStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getEpochStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getEpochStartDateForIndex", - "getEpochStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNominationPeriodStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getNominationPeriodStartDateForIndex", - "getNominationPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getNominationPeriodStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getNominationPeriodStartDateForIndex", - "getNominationPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNomineesAtEpoch(epochIndex: BigInt): Array
{ - let result = super.call( - "getNomineesAtEpoch", - "getNomineesAtEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toAddressArray(); - } - - try_getNomineesAtEpoch( - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getNomineesAtEpoch", - "getNomineesAtEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotingPeriodStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getVotingPeriodStartDateForIndex", - "getVotingPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getVotingPeriodStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getVotingPeriodStartDateForIndex", - "getVotingPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVotedInEpoch(user: Address, epochIndex: BigInt): boolean { - let result = super.call( - "hasVotedInEpoch", - "hasVotedInEpoch(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBoolean(); - } - - try_hasVotedInEpoch( - user: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "hasVotedInEpoch", - "hasVotedInEpoch(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - wasNominated(candidate: Address, epochIndex: BigInt): boolean { - let result = super.call( - "wasNominated", - "wasNominated(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBoolean(); - } - - try_wasNominated( - candidate: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "wasNominated", - "wasNominated(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - calculateBallotId(candidates: Array
): Bytes { - let result = super.call( - "calculateBallotId", - "calculateBallotId(address[]):(bytes32)", - [ethereum.Value.fromAddressArray(candidates)] - ); - - return result[0].toBytes(); - } - - try_calculateBallotId( - candidates: Array
- ): ethereum.CallResult { - let result = super.tryCall( - "calculateBallotId", - "calculateBallotId(address[]):(bytes32)", - [ethereum.Value.fromAddressArray(candidates)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getBallotCandidates(ballotId: Bytes): Array
{ - let result = super.call( - "getBallotCandidates", - "getBallotCandidates(bytes32):(address[])", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - - return result[0].toAddressArray(); - } - - try_getBallotCandidates( - ballotId: Bytes - ): ethereum.CallResult> { - let result = super.tryCall( - "getBallotCandidates", - "getBallotCandidates(bytes32):(address[])", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getBallotVoted(user: Address): Bytes { - let result = super.call( - "getBallotVoted", - "getBallotVoted(address):(bytes32)", - [ethereum.Value.fromAddress(user)] - ); - - return result[0].toBytes(); - } - - try_getBallotVoted(user: Address): ethereum.CallResult { - let result = super.tryCall( - "getBallotVoted", - "getBallotVoted(address):(bytes32)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getBallotVotes(ballotId: Bytes): BigInt { - let result = super.call( - "getBallotVotes", - "getBallotVotes(bytes32):(uint256)", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - - return result[0].toBigInt(); - } - - try_getBallotVotes(ballotId: Bytes): ethereum.CallResult { - let result = super.tryCall( - "getBallotVotes", - "getBallotVotes(bytes32):(uint256)", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCandidateVotes(candidate: Address): BigInt { - let result = super.call( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotes(candidate: Address): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCouncilMembers(): Array
{ - let result = super.call( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getCouncilMembers(): ethereum.CallResult> { - let result = super.tryCall( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getCouncilToken(): Address { - let result = super.call( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getCouncilToken(): ethereum.CallResult
{ - let result = super.tryCall( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getCrossChainDebtShareMerkleRoot(): Bytes { - let result = super.call( - "getCrossChainDebtShareMerkleRoot", - "getCrossChainDebtShareMerkleRoot():(bytes32)", - [] - ); - - return result[0].toBytes(); - } - - try_getCrossChainDebtShareMerkleRoot(): ethereum.CallResult { - let result = super.tryCall( - "getCrossChainDebtShareMerkleRoot", - "getCrossChainDebtShareMerkleRoot():(bytes32)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getCrossChainDebtShareMerkleRootBlockNumber(): BigInt { - let result = super.call( - "getCrossChainDebtShareMerkleRootBlockNumber", - "getCrossChainDebtShareMerkleRootBlockNumber():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getCrossChainDebtShareMerkleRootBlockNumber(): ethereum.CallResult< - BigInt - > { - let result = super.tryCall( - "getCrossChainDebtShareMerkleRootBlockNumber", - "getCrossChainDebtShareMerkleRootBlockNumber():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCurrentPeriod(): BigInt { - let result = super.call( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getCurrentPeriod(): ethereum.CallResult { - let result = super.tryCall( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDebtShare(user: Address): BigInt { - let result = super.call("getDebtShare", "getDebtShare(address):(uint256)", [ - ethereum.Value.fromAddress(user) - ]); - - return result[0].toBigInt(); - } - - try_getDebtShare(user: Address): ethereum.CallResult { - let result = super.tryCall( - "getDebtShare", - "getDebtShare(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDebtShareContract(): Address { - let result = super.call( - "getDebtShareContract", - "getDebtShareContract():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getDebtShareContract(): ethereum.CallResult
{ - let result = super.tryCall( - "getDebtShareContract", - "getDebtShareContract():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getDebtShareSnapshotId(): BigInt { - let result = super.call( - "getDebtShareSnapshotId", - "getDebtShareSnapshotId():(uint128)", - [] - ); - - return result[0].toBigInt(); - } - - try_getDebtShareSnapshotId(): ethereum.CallResult { - let result = super.tryCall( - "getDebtShareSnapshotId", - "getDebtShareSnapshotId():(uint128)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDeclaredCrossChainDebtShare(user: Address): BigInt { - let result = super.call( - "getDeclaredCrossChainDebtShare", - "getDeclaredCrossChainDebtShare(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - - return result[0].toBigInt(); - } - - try_getDeclaredCrossChainDebtShare( - user: Address - ): ethereum.CallResult { - let result = super.tryCall( - "getDeclaredCrossChainDebtShare", - "getDeclaredCrossChainDebtShare(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDefaultBallotEvaluationBatchSize(): BigInt { - let result = super.call( - "getDefaultBallotEvaluationBatchSize", - "getDefaultBallotEvaluationBatchSize():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getDefaultBallotEvaluationBatchSize(): ethereum.CallResult { - let result = super.tryCall( - "getDefaultBallotEvaluationBatchSize", - "getDefaultBallotEvaluationBatchSize():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionWinners(): Array
{ - let result = super.call( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinners(): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochEndDate(): BigInt { - let result = super.call( - "getEpochEndDate", - "getEpochEndDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getEpochEndDate(): ethereum.CallResult { - let result = super.tryCall( - "getEpochEndDate", - "getEpochEndDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochIndex(): BigInt { - let result = super.call("getEpochIndex", "getEpochIndex():(uint256)", []); - - return result[0].toBigInt(); - } - - try_getEpochIndex(): ethereum.CallResult { - let result = super.tryCall( - "getEpochIndex", - "getEpochIndex():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochStartDate(): BigInt { - let result = super.call( - "getEpochStartDate", - "getEpochStartDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getEpochStartDate(): ethereum.CallResult { - let result = super.tryCall( - "getEpochStartDate", - "getEpochStartDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getMaxDateAdjustmenTolerance(): BigInt { - let result = super.call( - "getMaxDateAdjustmenTolerance", - "getMaxDateAdjustmenTolerance():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getMaxDateAdjustmenTolerance(): ethereum.CallResult { - let result = super.tryCall( - "getMaxDateAdjustmenTolerance", - "getMaxDateAdjustmenTolerance():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getMinEpochDurations(): ElectionModuleOld__getMinEpochDurationsResult { - let result = super.call( - "getMinEpochDurations", - "getMinEpochDurations():(uint64,uint64,uint64)", - [] - ); - - return new ElectionModuleOld__getMinEpochDurationsResult( - result[0].toBigInt(), - result[1].toBigInt(), - result[2].toBigInt() - ); - } - - try_getMinEpochDurations(): ethereum.CallResult< - ElectionModuleOld__getMinEpochDurationsResult - > { - let result = super.tryCall( - "getMinEpochDurations", - "getMinEpochDurations():(uint64,uint64,uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new ElectionModuleOld__getMinEpochDurationsResult( - value[0].toBigInt(), - value[1].toBigInt(), - value[2].toBigInt() - ) - ); - } - - getMinimumActiveMembers(): i32 { - let result = super.call( - "getMinimumActiveMembers", - "getMinimumActiveMembers():(uint8)", - [] - ); - - return result[0].toI32(); - } - - try_getMinimumActiveMembers(): ethereum.CallResult { - let result = super.tryCall( - "getMinimumActiveMembers", - "getMinimumActiveMembers():(uint8)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toI32()); - } - - getNextEpochSeatCount(): i32 { - let result = super.call( - "getNextEpochSeatCount", - "getNextEpochSeatCount():(uint8)", - [] - ); - - return result[0].toI32(); - } - - try_getNextEpochSeatCount(): ethereum.CallResult { - let result = super.tryCall( - "getNextEpochSeatCount", - "getNextEpochSeatCount():(uint8)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toI32()); - } - - getNominationPeriodStartDate(): BigInt { - let result = super.call( - "getNominationPeriodStartDate", - "getNominationPeriodStartDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getNominationPeriodStartDate(): ethereum.CallResult { - let result = super.tryCall( - "getNominationPeriodStartDate", - "getNominationPeriodStartDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNominees(): Array
{ - let result = super.call("getNominees", "getNominees():(address[])", []); - - return result[0].toAddressArray(); - } - - try_getNominees(): ethereum.CallResult> { - let result = super.tryCall("getNominees", "getNominees():(address[])", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotePower(user: Address): BigInt { - let result = super.call("getVotePower", "getVotePower(address):(uint256)", [ - ethereum.Value.fromAddress(user) - ]); - - return result[0].toBigInt(); - } - - try_getVotePower(user: Address): ethereum.CallResult { - let result = super.tryCall( - "getVotePower", - "getVotePower(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getVotingPeriodStartDate(): BigInt { - let result = super.call( - "getVotingPeriodStartDate", - "getVotingPeriodStartDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getVotingPeriodStartDate(): ethereum.CallResult { - let result = super.tryCall( - "getVotingPeriodStartDate", - "getVotingPeriodStartDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVoted(user: Address): boolean { - let result = super.call("hasVoted", "hasVoted(address):(bool)", [ - ethereum.Value.fromAddress(user) - ]); - - return result[0].toBoolean(); - } - - try_hasVoted(user: Address): ethereum.CallResult { - let result = super.tryCall("hasVoted", "hasVoted(address):(bool)", [ - ethereum.Value.fromAddress(user) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionEvaluated(): boolean { - let result = super.call( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionEvaluated(): ethereum.CallResult { - let result = super.tryCall( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionModuleInitialized(): boolean { - let result = super.call( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionModuleInitialized(): ethereum.CallResult { - let result = super.tryCall( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isNominated(candidate: Address): boolean { - let result = super.call("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - - return result[0].toBoolean(); - } - - try_isNominated(candidate: Address): ethereum.CallResult { - let result = super.tryCall("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isOwnerModuleInitialized(): boolean { - let result = super.call( - "isOwnerModuleInitialized", - "isOwnerModuleInitialized():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isOwnerModuleInitialized(): ethereum.CallResult { - let result = super.tryCall( - "isOwnerModuleInitialized", - "isOwnerModuleInitialized():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - nominatedOwner(): Address { - let result = super.call("nominatedOwner", "nominatedOwner():(address)", []); - - return result[0].toAddress(); - } - - try_nominatedOwner(): ethereum.CallResult
{ - let result = super.tryCall( - "nominatedOwner", - "nominatedOwner():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - owner(): Address { - let result = super.call("owner", "owner():(address)", []); - - return result[0].toAddress(); - } - - try_owner(): ethereum.CallResult
{ - let result = super.tryCall("owner", "owner():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getImplementation(): Address { - let result = super.call( - "getImplementation", - "getImplementation():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getImplementation(): ethereum.CallResult
{ - let result = super.tryCall( - "getImplementation", - "getImplementation():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } -} - -export class CastCall extends ethereum.Call { - get inputs(): CastCall__Inputs { - return new CastCall__Inputs(this); - } - - get outputs(): CastCall__Outputs { - return new CastCall__Outputs(this); - } -} - -export class CastCall__Inputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } - - get candidates(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class CastCall__Outputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } -} - -export class DeclareAndCastCall extends ethereum.Call { - get inputs(): DeclareAndCastCall__Inputs { - return new DeclareAndCastCall__Inputs(this); - } - - get outputs(): DeclareAndCastCall__Outputs { - return new DeclareAndCastCall__Outputs(this); - } -} - -export class DeclareAndCastCall__Inputs { - _call: DeclareAndCastCall; - - constructor(call: DeclareAndCastCall) { - this._call = call; - } - - get debtShare(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get merkleProof(): Array { - return this._call.inputValues[1].value.toBytesArray(); - } - - get candidates(): Array
{ - return this._call.inputValues[2].value.toAddressArray(); - } -} - -export class DeclareAndCastCall__Outputs { - _call: DeclareAndCastCall; - - constructor(call: DeclareAndCastCall) { - this._call = call; - } -} - -export class DeclareCrossChainDebtShareCall extends ethereum.Call { - get inputs(): DeclareCrossChainDebtShareCall__Inputs { - return new DeclareCrossChainDebtShareCall__Inputs(this); - } - - get outputs(): DeclareCrossChainDebtShareCall__Outputs { - return new DeclareCrossChainDebtShareCall__Outputs(this); - } -} - -export class DeclareCrossChainDebtShareCall__Inputs { - _call: DeclareCrossChainDebtShareCall; - - constructor(call: DeclareCrossChainDebtShareCall) { - this._call = call; - } - - get user(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get debtShare(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get merkleProof(): Array { - return this._call.inputValues[2].value.toBytesArray(); - } -} - -export class DeclareCrossChainDebtShareCall__Outputs { - _call: DeclareCrossChainDebtShareCall; - - constructor(call: DeclareCrossChainDebtShareCall) { - this._call = call; - } -} - -export class DismissMembersCall extends ethereum.Call { - get inputs(): DismissMembersCall__Inputs { - return new DismissMembersCall__Inputs(this); - } - - get outputs(): DismissMembersCall__Outputs { - return new DismissMembersCall__Outputs(this); - } -} - -export class DismissMembersCall__Inputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } - - get membersToDismiss(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class DismissMembersCall__Outputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } -} - -export class EvaluateCall extends ethereum.Call { - get inputs(): EvaluateCall__Inputs { - return new EvaluateCall__Inputs(this); - } - - get outputs(): EvaluateCall__Outputs { - return new EvaluateCall__Outputs(this); - } -} - -export class EvaluateCall__Inputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } - - get numBallots(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class EvaluateCall__Outputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } -} - -export class InitializeElectionModuleCall extends ethereum.Call { - get inputs(): InitializeElectionModuleCall__Inputs { - return new InitializeElectionModuleCall__Inputs(this); - } - - get outputs(): InitializeElectionModuleCall__Outputs { - return new InitializeElectionModuleCall__Outputs(this); - } -} - -export class InitializeElectionModuleCall__Inputs { - _call: InitializeElectionModuleCall; - - constructor(call: InitializeElectionModuleCall) { - this._call = call; - } - - get councilTokenName(): string { - return this._call.inputValues[0].value.toString(); - } - - get councilTokenSymbol(): string { - return this._call.inputValues[1].value.toString(); - } - - get firstCouncil(): Array
{ - return this._call.inputValues[2].value.toAddressArray(); - } - - get minimumActiveMembers(): i32 { - return this._call.inputValues[3].value.toI32(); - } - - get nominationPeriodStartDate(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._call.inputValues[5].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._call.inputValues[6].value.toBigInt(); - } - - get debtShareContract(): Address { - return this._call.inputValues[7].value.toAddress(); - } -} - -export class InitializeElectionModuleCall__Outputs { - _call: InitializeElectionModuleCall; - - constructor(call: InitializeElectionModuleCall) { - this._call = call; - } -} - -export class ModifyEpochScheduleCall extends ethereum.Call { - get inputs(): ModifyEpochScheduleCall__Inputs { - return new ModifyEpochScheduleCall__Inputs(this); - } - - get outputs(): ModifyEpochScheduleCall__Outputs { - return new ModifyEpochScheduleCall__Outputs(this); - } -} - -export class ModifyEpochScheduleCall__Inputs { - _call: ModifyEpochScheduleCall; - - constructor(call: ModifyEpochScheduleCall) { - this._call = call; - } - - get newNominationPeriodStartDate(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newVotingPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newEpochEndDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class ModifyEpochScheduleCall__Outputs { - _call: ModifyEpochScheduleCall; - - constructor(call: ModifyEpochScheduleCall) { - this._call = call; - } -} - -export class NominateCall extends ethereum.Call { - get inputs(): NominateCall__Inputs { - return new NominateCall__Inputs(this); - } - - get outputs(): NominateCall__Outputs { - return new NominateCall__Outputs(this); - } -} - -export class NominateCall__Inputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class NominateCall__Outputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class ResolveCall extends ethereum.Call { - get inputs(): ResolveCall__Inputs { - return new ResolveCall__Inputs(this); - } - - get outputs(): ResolveCall__Outputs { - return new ResolveCall__Outputs(this); - } -} - -export class ResolveCall__Inputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class ResolveCall__Outputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class SetCrossChainDebtShareMerkleRootCall extends ethereum.Call { - get inputs(): SetCrossChainDebtShareMerkleRootCall__Inputs { - return new SetCrossChainDebtShareMerkleRootCall__Inputs(this); - } - - get outputs(): SetCrossChainDebtShareMerkleRootCall__Outputs { - return new SetCrossChainDebtShareMerkleRootCall__Outputs(this); - } -} - -export class SetCrossChainDebtShareMerkleRootCall__Inputs { - _call: SetCrossChainDebtShareMerkleRootCall; - - constructor(call: SetCrossChainDebtShareMerkleRootCall) { - this._call = call; - } - - get merkleRoot(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get blocknumber(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class SetCrossChainDebtShareMerkleRootCall__Outputs { - _call: SetCrossChainDebtShareMerkleRootCall; - - constructor(call: SetCrossChainDebtShareMerkleRootCall) { - this._call = call; - } -} - -export class SetDebtShareContractCall extends ethereum.Call { - get inputs(): SetDebtShareContractCall__Inputs { - return new SetDebtShareContractCall__Inputs(this); - } - - get outputs(): SetDebtShareContractCall__Outputs { - return new SetDebtShareContractCall__Outputs(this); - } -} - -export class SetDebtShareContractCall__Inputs { - _call: SetDebtShareContractCall; - - constructor(call: SetDebtShareContractCall) { - this._call = call; - } - - get debtShareContract(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SetDebtShareContractCall__Outputs { - _call: SetDebtShareContractCall; - - constructor(call: SetDebtShareContractCall) { - this._call = call; - } -} - -export class SetDebtShareSnapshotIdCall extends ethereum.Call { - get inputs(): SetDebtShareSnapshotIdCall__Inputs { - return new SetDebtShareSnapshotIdCall__Inputs(this); - } - - get outputs(): SetDebtShareSnapshotIdCall__Outputs { - return new SetDebtShareSnapshotIdCall__Outputs(this); - } -} - -export class SetDebtShareSnapshotIdCall__Inputs { - _call: SetDebtShareSnapshotIdCall; - - constructor(call: SetDebtShareSnapshotIdCall) { - this._call = call; - } - - get snapshotId(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetDebtShareSnapshotIdCall__Outputs { - _call: SetDebtShareSnapshotIdCall; - - constructor(call: SetDebtShareSnapshotIdCall) { - this._call = call; - } -} - -export class SetDefaultBallotEvaluationBatchSizeCall extends ethereum.Call { - get inputs(): SetDefaultBallotEvaluationBatchSizeCall__Inputs { - return new SetDefaultBallotEvaluationBatchSizeCall__Inputs(this); - } - - get outputs(): SetDefaultBallotEvaluationBatchSizeCall__Outputs { - return new SetDefaultBallotEvaluationBatchSizeCall__Outputs(this); - } -} - -export class SetDefaultBallotEvaluationBatchSizeCall__Inputs { - _call: SetDefaultBallotEvaluationBatchSizeCall; - - constructor(call: SetDefaultBallotEvaluationBatchSizeCall) { - this._call = call; - } - - get newDefaultBallotEvaluationBatchSize(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetDefaultBallotEvaluationBatchSizeCall__Outputs { - _call: SetDefaultBallotEvaluationBatchSizeCall; - - constructor(call: SetDefaultBallotEvaluationBatchSizeCall) { - this._call = call; - } -} - -export class SetMaxDateAdjustmentToleranceCall extends ethereum.Call { - get inputs(): SetMaxDateAdjustmentToleranceCall__Inputs { - return new SetMaxDateAdjustmentToleranceCall__Inputs(this); - } - - get outputs(): SetMaxDateAdjustmentToleranceCall__Outputs { - return new SetMaxDateAdjustmentToleranceCall__Outputs(this); - } -} - -export class SetMaxDateAdjustmentToleranceCall__Inputs { - _call: SetMaxDateAdjustmentToleranceCall; - - constructor(call: SetMaxDateAdjustmentToleranceCall) { - this._call = call; - } - - get newMaxDateAdjustmentTolerance(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetMaxDateAdjustmentToleranceCall__Outputs { - _call: SetMaxDateAdjustmentToleranceCall; - - constructor(call: SetMaxDateAdjustmentToleranceCall) { - this._call = call; - } -} - -export class SetMinEpochDurationsCall extends ethereum.Call { - get inputs(): SetMinEpochDurationsCall__Inputs { - return new SetMinEpochDurationsCall__Inputs(this); - } - - get outputs(): SetMinEpochDurationsCall__Outputs { - return new SetMinEpochDurationsCall__Outputs(this); - } -} - -export class SetMinEpochDurationsCall__Inputs { - _call: SetMinEpochDurationsCall; - - constructor(call: SetMinEpochDurationsCall) { - this._call = call; - } - - get newMinNominationPeriodDuration(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newMinVotingPeriodDuration(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newMinEpochDuration(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class SetMinEpochDurationsCall__Outputs { - _call: SetMinEpochDurationsCall; - - constructor(call: SetMinEpochDurationsCall) { - this._call = call; - } -} - -export class SetMinimumActiveMembersCall extends ethereum.Call { - get inputs(): SetMinimumActiveMembersCall__Inputs { - return new SetMinimumActiveMembersCall__Inputs(this); - } - - get outputs(): SetMinimumActiveMembersCall__Outputs { - return new SetMinimumActiveMembersCall__Outputs(this); - } -} - -export class SetMinimumActiveMembersCall__Inputs { - _call: SetMinimumActiveMembersCall; - - constructor(call: SetMinimumActiveMembersCall) { - this._call = call; - } - - get newMinimumActiveMembers(): i32 { - return this._call.inputValues[0].value.toI32(); - } -} - -export class SetMinimumActiveMembersCall__Outputs { - _call: SetMinimumActiveMembersCall; - - constructor(call: SetMinimumActiveMembersCall) { - this._call = call; - } -} - -export class SetNextEpochSeatCountCall extends ethereum.Call { - get inputs(): SetNextEpochSeatCountCall__Inputs { - return new SetNextEpochSeatCountCall__Inputs(this); - } - - get outputs(): SetNextEpochSeatCountCall__Outputs { - return new SetNextEpochSeatCountCall__Outputs(this); - } -} - -export class SetNextEpochSeatCountCall__Inputs { - _call: SetNextEpochSeatCountCall; - - constructor(call: SetNextEpochSeatCountCall) { - this._call = call; - } - - get newSeatCount(): i32 { - return this._call.inputValues[0].value.toI32(); - } -} - -export class SetNextEpochSeatCountCall__Outputs { - _call: SetNextEpochSeatCountCall; - - constructor(call: SetNextEpochSeatCountCall) { - this._call = call; - } -} - -export class TweakEpochScheduleCall extends ethereum.Call { - get inputs(): TweakEpochScheduleCall__Inputs { - return new TweakEpochScheduleCall__Inputs(this); - } - - get outputs(): TweakEpochScheduleCall__Outputs { - return new TweakEpochScheduleCall__Outputs(this); - } -} - -export class TweakEpochScheduleCall__Inputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } - - get newNominationPeriodStartDate(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newVotingPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newEpochEndDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class TweakEpochScheduleCall__Outputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } -} - -export class UpgradeCouncilTokenCall extends ethereum.Call { - get inputs(): UpgradeCouncilTokenCall__Inputs { - return new UpgradeCouncilTokenCall__Inputs(this); - } - - get outputs(): UpgradeCouncilTokenCall__Outputs { - return new UpgradeCouncilTokenCall__Outputs(this); - } -} - -export class UpgradeCouncilTokenCall__Inputs { - _call: UpgradeCouncilTokenCall; - - constructor(call: UpgradeCouncilTokenCall) { - this._call = call; - } - - get newCouncilTokenImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class UpgradeCouncilTokenCall__Outputs { - _call: UpgradeCouncilTokenCall; - - constructor(call: UpgradeCouncilTokenCall) { - this._call = call; - } -} - -export class WithdrawNominationCall extends ethereum.Call { - get inputs(): WithdrawNominationCall__Inputs { - return new WithdrawNominationCall__Inputs(this); - } - - get outputs(): WithdrawNominationCall__Outputs { - return new WithdrawNominationCall__Outputs(this); - } -} - -export class WithdrawNominationCall__Inputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawNominationCall__Outputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawVoteCall extends ethereum.Call { - get inputs(): WithdrawVoteCall__Inputs { - return new WithdrawVoteCall__Inputs(this); - } - - get outputs(): WithdrawVoteCall__Outputs { - return new WithdrawVoteCall__Outputs(this); - } -} - -export class WithdrawVoteCall__Inputs { - _call: WithdrawVoteCall; - - constructor(call: WithdrawVoteCall) { - this._call = call; - } -} - -export class WithdrawVoteCall__Outputs { - _call: WithdrawVoteCall; - - constructor(call: WithdrawVoteCall) { - this._call = call; - } -} - -export class AcceptOwnershipCall extends ethereum.Call { - get inputs(): AcceptOwnershipCall__Inputs { - return new AcceptOwnershipCall__Inputs(this); - } - - get outputs(): AcceptOwnershipCall__Outputs { - return new AcceptOwnershipCall__Outputs(this); - } -} - -export class AcceptOwnershipCall__Inputs { - _call: AcceptOwnershipCall; - - constructor(call: AcceptOwnershipCall) { - this._call = call; - } -} - -export class AcceptOwnershipCall__Outputs { - _call: AcceptOwnershipCall; - - constructor(call: AcceptOwnershipCall) { - this._call = call; - } -} - -export class InitializeOwnerModuleCall extends ethereum.Call { - get inputs(): InitializeOwnerModuleCall__Inputs { - return new InitializeOwnerModuleCall__Inputs(this); - } - - get outputs(): InitializeOwnerModuleCall__Outputs { - return new InitializeOwnerModuleCall__Outputs(this); - } -} - -export class InitializeOwnerModuleCall__Inputs { - _call: InitializeOwnerModuleCall; - - constructor(call: InitializeOwnerModuleCall) { - this._call = call; - } - - get initialOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class InitializeOwnerModuleCall__Outputs { - _call: InitializeOwnerModuleCall; - - constructor(call: InitializeOwnerModuleCall) { - this._call = call; - } -} - -export class NominateNewOwnerCall extends ethereum.Call { - get inputs(): NominateNewOwnerCall__Inputs { - return new NominateNewOwnerCall__Inputs(this); - } - - get outputs(): NominateNewOwnerCall__Outputs { - return new NominateNewOwnerCall__Outputs(this); - } -} - -export class NominateNewOwnerCall__Inputs { - _call: NominateNewOwnerCall; - - constructor(call: NominateNewOwnerCall) { - this._call = call; - } - - get newNominatedOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class NominateNewOwnerCall__Outputs { - _call: NominateNewOwnerCall; - - constructor(call: NominateNewOwnerCall) { - this._call = call; - } -} - -export class RenounceNominationCall extends ethereum.Call { - get inputs(): RenounceNominationCall__Inputs { - return new RenounceNominationCall__Inputs(this); - } - - get outputs(): RenounceNominationCall__Outputs { - return new RenounceNominationCall__Outputs(this); - } -} - -export class RenounceNominationCall__Inputs { - _call: RenounceNominationCall; - - constructor(call: RenounceNominationCall) { - this._call = call; - } -} - -export class RenounceNominationCall__Outputs { - _call: RenounceNominationCall; - - constructor(call: RenounceNominationCall) { - this._call = call; - } -} - -export class SimulateUpgradeToCall extends ethereum.Call { - get inputs(): SimulateUpgradeToCall__Inputs { - return new SimulateUpgradeToCall__Inputs(this); - } - - get outputs(): SimulateUpgradeToCall__Outputs { - return new SimulateUpgradeToCall__Outputs(this); - } -} - -export class SimulateUpgradeToCall__Inputs { - _call: SimulateUpgradeToCall; - - constructor(call: SimulateUpgradeToCall) { - this._call = call; - } - - get newImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SimulateUpgradeToCall__Outputs { - _call: SimulateUpgradeToCall; - - constructor(call: SimulateUpgradeToCall) { - this._call = call; - } -} - -export class UpgradeToCall extends ethereum.Call { - get inputs(): UpgradeToCall__Inputs { - return new UpgradeToCall__Inputs(this); - } - - get outputs(): UpgradeToCall__Outputs { - return new UpgradeToCall__Outputs(this); - } -} - -export class UpgradeToCall__Inputs { - _call: UpgradeToCall; - - constructor(call: UpgradeToCall) { - this._call = call; - } - - get newImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class UpgradeToCall__Outputs { - _call: UpgradeToCall; - - constructor(call: UpgradeToCall) { - this._call = call; - } -} diff --git a/governance/subgraph/generated/Spartan-Old/ElectionModuleOld.ts b/governance/subgraph/generated/Spartan-Old/ElectionModuleOld.ts deleted file mode 100644 index ff16bb4f7..000000000 --- a/governance/subgraph/generated/Spartan-Old/ElectionModuleOld.ts +++ /dev/null @@ -1,2613 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class CandidateNominated extends ethereum.Event { - get params(): CandidateNominated__Params { - return new CandidateNominated__Params(this); - } -} - -export class CandidateNominated__Params { - _event: CandidateNominated; - - constructor(event: CandidateNominated) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberAdded extends ethereum.Event { - get params(): CouncilMemberAdded__Params { - return new CouncilMemberAdded__Params(this); - } -} - -export class CouncilMemberAdded__Params { - _event: CouncilMemberAdded; - - constructor(event: CouncilMemberAdded) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberRemoved extends ethereum.Event { - get params(): CouncilMemberRemoved__Params { - return new CouncilMemberRemoved__Params(this); - } -} - -export class CouncilMemberRemoved__Params { - _event: CouncilMemberRemoved; - - constructor(event: CouncilMemberRemoved) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMembersDismissed extends ethereum.Event { - get params(): CouncilMembersDismissed__Params { - return new CouncilMembersDismissed__Params(this); - } -} - -export class CouncilMembersDismissed__Params { - _event: CouncilMembersDismissed; - - constructor(event: CouncilMembersDismissed) { - this._event = event; - } - - get members(): Array
{ - return this._event.parameters[0].value.toAddressArray(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilTokenCreated extends ethereum.Event { - get params(): CouncilTokenCreated__Params { - return new CouncilTokenCreated__Params(this); - } -} - -export class CouncilTokenCreated__Params { - _event: CouncilTokenCreated; - - constructor(event: CouncilTokenCreated) { - this._event = event; - } - - get proxy(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get implementation(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class CouncilTokenUpgraded extends ethereum.Event { - get params(): CouncilTokenUpgraded__Params { - return new CouncilTokenUpgraded__Params(this); - } -} - -export class CouncilTokenUpgraded__Params { - _event: CouncilTokenUpgraded; - - constructor(event: CouncilTokenUpgraded) { - this._event = event; - } - - get newImplementation(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class DefaultBallotEvaluationBatchSizeChanged extends ethereum.Event { - get params(): DefaultBallotEvaluationBatchSizeChanged__Params { - return new DefaultBallotEvaluationBatchSizeChanged__Params(this); - } -} - -export class DefaultBallotEvaluationBatchSizeChanged__Params { - _event: DefaultBallotEvaluationBatchSizeChanged; - - constructor(event: DefaultBallotEvaluationBatchSizeChanged) { - this._event = event; - } - - get size(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class ElectionBatchEvaluated extends ethereum.Event { - get params(): ElectionBatchEvaluated__Params { - return new ElectionBatchEvaluated__Params(this); - } -} - -export class ElectionBatchEvaluated__Params { - _event: ElectionBatchEvaluated; - - constructor(event: ElectionBatchEvaluated) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get evaluatedBallots(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get totalBallots(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class ElectionEvaluated extends ethereum.Event { - get params(): ElectionEvaluated__Params { - return new ElectionEvaluated__Params(this); - } -} - -export class ElectionEvaluated__Params { - _event: ElectionEvaluated; - - constructor(event: ElectionEvaluated) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get totalBallots(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class ElectionModuleInitialized extends ethereum.Event { - get params(): ElectionModuleInitialized__Params { - return new ElectionModuleInitialized__Params(this); - } -} - -export class ElectionModuleInitialized__Params { - _event: ElectionModuleInitialized; - - constructor(event: ElectionModuleInitialized) { - this._event = event; - } -} - -export class EmergencyElectionStarted extends ethereum.Event { - get params(): EmergencyElectionStarted__Params { - return new EmergencyElectionStarted__Params(this); - } -} - -export class EmergencyElectionStarted__Params { - _event: EmergencyElectionStarted; - - constructor(event: EmergencyElectionStarted) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class EpochScheduleUpdated extends ethereum.Event { - get params(): EpochScheduleUpdated__Params { - return new EpochScheduleUpdated__Params(this); - } -} - -export class EpochScheduleUpdated__Params { - _event: EpochScheduleUpdated; - - constructor(event: EpochScheduleUpdated) { - this._event = event; - } - - get nominationPeriodStartDate(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class EpochStarted extends ethereum.Event { - get params(): EpochStarted__Params { - return new EpochStarted__Params(this); - } -} - -export class EpochStarted__Params { - _event: EpochStarted; - - constructor(event: EpochStarted) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class MaxDateAdjustmentToleranceChanged extends ethereum.Event { - get params(): MaxDateAdjustmentToleranceChanged__Params { - return new MaxDateAdjustmentToleranceChanged__Params(this); - } -} - -export class MaxDateAdjustmentToleranceChanged__Params { - _event: MaxDateAdjustmentToleranceChanged; - - constructor(event: MaxDateAdjustmentToleranceChanged) { - this._event = event; - } - - get tolerance(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class MinimumActiveMembersChanged extends ethereum.Event { - get params(): MinimumActiveMembersChanged__Params { - return new MinimumActiveMembersChanged__Params(this); - } -} - -export class MinimumActiveMembersChanged__Params { - _event: MinimumActiveMembersChanged; - - constructor(event: MinimumActiveMembersChanged) { - this._event = event; - } - - get minimumActiveMembers(): i32 { - return this._event.parameters[0].value.toI32(); - } -} - -export class MinimumEpochDurationsChanged extends ethereum.Event { - get params(): MinimumEpochDurationsChanged__Params { - return new MinimumEpochDurationsChanged__Params(this); - } -} - -export class MinimumEpochDurationsChanged__Params { - _event: MinimumEpochDurationsChanged; - - constructor(event: MinimumEpochDurationsChanged) { - this._event = event; - } - - get minNominationPeriodDuration(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get minVotingPeriodDuration(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get minEpochDuration(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class NextEpochSeatCountChanged extends ethereum.Event { - get params(): NextEpochSeatCountChanged__Params { - return new NextEpochSeatCountChanged__Params(this); - } -} - -export class NextEpochSeatCountChanged__Params { - _event: NextEpochSeatCountChanged; - - constructor(event: NextEpochSeatCountChanged) { - this._event = event; - } - - get seatCount(): i32 { - return this._event.parameters[0].value.toI32(); - } -} - -export class NominationWithdrawn extends ethereum.Event { - get params(): NominationWithdrawn__Params { - return new NominationWithdrawn__Params(this); - } -} - -export class NominationWithdrawn__Params { - _event: NominationWithdrawn; - - constructor(event: NominationWithdrawn) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class VoteRecorded extends ethereum.Event { - get params(): VoteRecorded__Params { - return new VoteRecorded__Params(this); - } -} - -export class VoteRecorded__Params { - _event: VoteRecorded; - - constructor(event: VoteRecorded) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get ballotId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } - - get epochIndex(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get votePower(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class VoteWithdrawn extends ethereum.Event { - get params(): VoteWithdrawn__Params { - return new VoteWithdrawn__Params(this); - } -} - -export class VoteWithdrawn__Params { - _event: VoteWithdrawn; - - constructor(event: VoteWithdrawn) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get ballotId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } - - get epochIndex(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get votePower(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class CrossChainDebtShareDeclared extends ethereum.Event { - get params(): CrossChainDebtShareDeclared__Params { - return new CrossChainDebtShareDeclared__Params(this); - } -} - -export class CrossChainDebtShareDeclared__Params { - _event: CrossChainDebtShareDeclared; - - constructor(event: CrossChainDebtShareDeclared) { - this._event = event; - } - - get user(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get debtShare(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CrossChainDebtShareMerkleRootSet extends ethereum.Event { - get params(): CrossChainDebtShareMerkleRootSet__Params { - return new CrossChainDebtShareMerkleRootSet__Params(this); - } -} - -export class CrossChainDebtShareMerkleRootSet__Params { - _event: CrossChainDebtShareMerkleRootSet; - - constructor(event: CrossChainDebtShareMerkleRootSet) { - this._event = event; - } - - get merkleRoot(): Bytes { - return this._event.parameters[0].value.toBytes(); - } - - get blocknumber(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epoch(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class DebtShareContractSet extends ethereum.Event { - get params(): DebtShareContractSet__Params { - return new DebtShareContractSet__Params(this); - } -} - -export class DebtShareContractSet__Params { - _event: DebtShareContractSet; - - constructor(event: DebtShareContractSet) { - this._event = event; - } - - get contractAddress(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class DebtShareSnapshotIdSet extends ethereum.Event { - get params(): DebtShareSnapshotIdSet__Params { - return new DebtShareSnapshotIdSet__Params(this); - } -} - -export class DebtShareSnapshotIdSet__Params { - _event: DebtShareSnapshotIdSet; - - constructor(event: DebtShareSnapshotIdSet) { - this._event = event; - } - - get snapshotId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class OwnerChanged extends ethereum.Event { - get params(): OwnerChanged__Params { - return new OwnerChanged__Params(this); - } -} - -export class OwnerChanged__Params { - _event: OwnerChanged; - - constructor(event: OwnerChanged) { - this._event = event; - } - - get oldOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get newOwner(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class OwnerNominated extends ethereum.Event { - get params(): OwnerNominated__Params { - return new OwnerNominated__Params(this); - } -} - -export class OwnerNominated__Params { - _event: OwnerNominated; - - constructor(event: OwnerNominated) { - this._event = event; - } - - get newOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class Upgraded extends ethereum.Event { - get params(): Upgraded__Params { - return new Upgraded__Params(this); - } -} - -export class Upgraded__Params { - _event: Upgraded; - - constructor(event: Upgraded) { - this._event = event; - } - - get implementation(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class ElectionModuleOld__getMinEpochDurationsResult { - value0: BigInt; - value1: BigInt; - value2: BigInt; - - constructor(value0: BigInt, value1: BigInt, value2: BigInt) { - this.value0 = value0; - this.value1 = value1; - this.value2 = value2; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - map.set("value2", ethereum.Value.fromUnsignedBigInt(this.value2)); - return map; - } - - getMinNominationPeriodDuration(): BigInt { - return this.value0; - } - - getMinVotingPeriodDuration(): BigInt { - return this.value1; - } - - getMinEpochDuration(): BigInt { - return this.value2; - } -} - -export class ElectionModuleOld extends ethereum.SmartContract { - static bind(address: Address): ElectionModuleOld { - return new ElectionModuleOld("ElectionModuleOld", address); - } - - getBallotCandidatesInEpoch( - ballotId: Bytes, - epochIndex: BigInt - ): Array
{ - let result = super.call( - "getBallotCandidatesInEpoch", - "getBallotCandidatesInEpoch(bytes32,uint256):(address[])", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toAddressArray(); - } - - try_getBallotCandidatesInEpoch( - ballotId: Bytes, - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getBallotCandidatesInEpoch", - "getBallotCandidatesInEpoch(bytes32,uint256):(address[])", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getBallotVotedAtEpoch(user: Address, epochIndex: BigInt): Bytes { - let result = super.call( - "getBallotVotedAtEpoch", - "getBallotVotedAtEpoch(address,uint256):(bytes32)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBytes(); - } - - try_getBallotVotedAtEpoch( - user: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getBallotVotedAtEpoch", - "getBallotVotedAtEpoch(address,uint256):(bytes32)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getBallotVotesInEpoch(ballotId: Bytes, epochIndex: BigInt): BigInt { - let result = super.call( - "getBallotVotesInEpoch", - "getBallotVotesInEpoch(bytes32,uint256):(uint256)", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBigInt(); - } - - try_getBallotVotesInEpoch( - ballotId: Bytes, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getBallotVotesInEpoch", - "getBallotVotesInEpoch(bytes32,uint256):(uint256)", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCandidateVotesInEpoch(candidate: Address, epochIndex: BigInt): BigInt { - let result = super.call( - "getCandidateVotesInEpoch", - "getCandidateVotesInEpoch(address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotesInEpoch( - candidate: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotesInEpoch", - "getCandidateVotesInEpoch(address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionWinnersInEpoch(epochIndex: BigInt): Array
{ - let result = super.call( - "getElectionWinnersInEpoch", - "getElectionWinnersInEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinnersInEpoch( - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinnersInEpoch", - "getElectionWinnersInEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochEndDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getEpochEndDateForIndex", - "getEpochEndDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getEpochEndDateForIndex(epochIndex: BigInt): ethereum.CallResult { - let result = super.tryCall( - "getEpochEndDateForIndex", - "getEpochEndDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getEpochStartDateForIndex", - "getEpochStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getEpochStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getEpochStartDateForIndex", - "getEpochStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNominationPeriodStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getNominationPeriodStartDateForIndex", - "getNominationPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getNominationPeriodStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getNominationPeriodStartDateForIndex", - "getNominationPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNomineesAtEpoch(epochIndex: BigInt): Array
{ - let result = super.call( - "getNomineesAtEpoch", - "getNomineesAtEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toAddressArray(); - } - - try_getNomineesAtEpoch( - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getNomineesAtEpoch", - "getNomineesAtEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotingPeriodStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getVotingPeriodStartDateForIndex", - "getVotingPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getVotingPeriodStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getVotingPeriodStartDateForIndex", - "getVotingPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVotedInEpoch(user: Address, epochIndex: BigInt): boolean { - let result = super.call( - "hasVotedInEpoch", - "hasVotedInEpoch(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBoolean(); - } - - try_hasVotedInEpoch( - user: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "hasVotedInEpoch", - "hasVotedInEpoch(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - wasNominated(candidate: Address, epochIndex: BigInt): boolean { - let result = super.call( - "wasNominated", - "wasNominated(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBoolean(); - } - - try_wasNominated( - candidate: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "wasNominated", - "wasNominated(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - calculateBallotId(candidates: Array
): Bytes { - let result = super.call( - "calculateBallotId", - "calculateBallotId(address[]):(bytes32)", - [ethereum.Value.fromAddressArray(candidates)] - ); - - return result[0].toBytes(); - } - - try_calculateBallotId( - candidates: Array
- ): ethereum.CallResult { - let result = super.tryCall( - "calculateBallotId", - "calculateBallotId(address[]):(bytes32)", - [ethereum.Value.fromAddressArray(candidates)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getBallotCandidates(ballotId: Bytes): Array
{ - let result = super.call( - "getBallotCandidates", - "getBallotCandidates(bytes32):(address[])", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - - return result[0].toAddressArray(); - } - - try_getBallotCandidates( - ballotId: Bytes - ): ethereum.CallResult> { - let result = super.tryCall( - "getBallotCandidates", - "getBallotCandidates(bytes32):(address[])", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getBallotVoted(user: Address): Bytes { - let result = super.call( - "getBallotVoted", - "getBallotVoted(address):(bytes32)", - [ethereum.Value.fromAddress(user)] - ); - - return result[0].toBytes(); - } - - try_getBallotVoted(user: Address): ethereum.CallResult { - let result = super.tryCall( - "getBallotVoted", - "getBallotVoted(address):(bytes32)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getBallotVotes(ballotId: Bytes): BigInt { - let result = super.call( - "getBallotVotes", - "getBallotVotes(bytes32):(uint256)", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - - return result[0].toBigInt(); - } - - try_getBallotVotes(ballotId: Bytes): ethereum.CallResult { - let result = super.tryCall( - "getBallotVotes", - "getBallotVotes(bytes32):(uint256)", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCandidateVotes(candidate: Address): BigInt { - let result = super.call( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotes(candidate: Address): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCouncilMembers(): Array
{ - let result = super.call( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getCouncilMembers(): ethereum.CallResult> { - let result = super.tryCall( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getCouncilToken(): Address { - let result = super.call( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getCouncilToken(): ethereum.CallResult
{ - let result = super.tryCall( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getCrossChainDebtShareMerkleRoot(): Bytes { - let result = super.call( - "getCrossChainDebtShareMerkleRoot", - "getCrossChainDebtShareMerkleRoot():(bytes32)", - [] - ); - - return result[0].toBytes(); - } - - try_getCrossChainDebtShareMerkleRoot(): ethereum.CallResult { - let result = super.tryCall( - "getCrossChainDebtShareMerkleRoot", - "getCrossChainDebtShareMerkleRoot():(bytes32)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getCrossChainDebtShareMerkleRootBlockNumber(): BigInt { - let result = super.call( - "getCrossChainDebtShareMerkleRootBlockNumber", - "getCrossChainDebtShareMerkleRootBlockNumber():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getCrossChainDebtShareMerkleRootBlockNumber(): ethereum.CallResult< - BigInt - > { - let result = super.tryCall( - "getCrossChainDebtShareMerkleRootBlockNumber", - "getCrossChainDebtShareMerkleRootBlockNumber():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCurrentPeriod(): BigInt { - let result = super.call( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getCurrentPeriod(): ethereum.CallResult { - let result = super.tryCall( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDebtShare(user: Address): BigInt { - let result = super.call("getDebtShare", "getDebtShare(address):(uint256)", [ - ethereum.Value.fromAddress(user) - ]); - - return result[0].toBigInt(); - } - - try_getDebtShare(user: Address): ethereum.CallResult { - let result = super.tryCall( - "getDebtShare", - "getDebtShare(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDebtShareContract(): Address { - let result = super.call( - "getDebtShareContract", - "getDebtShareContract():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getDebtShareContract(): ethereum.CallResult
{ - let result = super.tryCall( - "getDebtShareContract", - "getDebtShareContract():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getDebtShareSnapshotId(): BigInt { - let result = super.call( - "getDebtShareSnapshotId", - "getDebtShareSnapshotId():(uint128)", - [] - ); - - return result[0].toBigInt(); - } - - try_getDebtShareSnapshotId(): ethereum.CallResult { - let result = super.tryCall( - "getDebtShareSnapshotId", - "getDebtShareSnapshotId():(uint128)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDeclaredCrossChainDebtShare(user: Address): BigInt { - let result = super.call( - "getDeclaredCrossChainDebtShare", - "getDeclaredCrossChainDebtShare(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - - return result[0].toBigInt(); - } - - try_getDeclaredCrossChainDebtShare( - user: Address - ): ethereum.CallResult { - let result = super.tryCall( - "getDeclaredCrossChainDebtShare", - "getDeclaredCrossChainDebtShare(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDefaultBallotEvaluationBatchSize(): BigInt { - let result = super.call( - "getDefaultBallotEvaluationBatchSize", - "getDefaultBallotEvaluationBatchSize():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getDefaultBallotEvaluationBatchSize(): ethereum.CallResult { - let result = super.tryCall( - "getDefaultBallotEvaluationBatchSize", - "getDefaultBallotEvaluationBatchSize():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionWinners(): Array
{ - let result = super.call( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinners(): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochEndDate(): BigInt { - let result = super.call( - "getEpochEndDate", - "getEpochEndDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getEpochEndDate(): ethereum.CallResult { - let result = super.tryCall( - "getEpochEndDate", - "getEpochEndDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochIndex(): BigInt { - let result = super.call("getEpochIndex", "getEpochIndex():(uint256)", []); - - return result[0].toBigInt(); - } - - try_getEpochIndex(): ethereum.CallResult { - let result = super.tryCall( - "getEpochIndex", - "getEpochIndex():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochStartDate(): BigInt { - let result = super.call( - "getEpochStartDate", - "getEpochStartDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getEpochStartDate(): ethereum.CallResult { - let result = super.tryCall( - "getEpochStartDate", - "getEpochStartDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getMaxDateAdjustmenTolerance(): BigInt { - let result = super.call( - "getMaxDateAdjustmenTolerance", - "getMaxDateAdjustmenTolerance():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getMaxDateAdjustmenTolerance(): ethereum.CallResult { - let result = super.tryCall( - "getMaxDateAdjustmenTolerance", - "getMaxDateAdjustmenTolerance():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getMinEpochDurations(): ElectionModuleOld__getMinEpochDurationsResult { - let result = super.call( - "getMinEpochDurations", - "getMinEpochDurations():(uint64,uint64,uint64)", - [] - ); - - return new ElectionModuleOld__getMinEpochDurationsResult( - result[0].toBigInt(), - result[1].toBigInt(), - result[2].toBigInt() - ); - } - - try_getMinEpochDurations(): ethereum.CallResult< - ElectionModuleOld__getMinEpochDurationsResult - > { - let result = super.tryCall( - "getMinEpochDurations", - "getMinEpochDurations():(uint64,uint64,uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new ElectionModuleOld__getMinEpochDurationsResult( - value[0].toBigInt(), - value[1].toBigInt(), - value[2].toBigInt() - ) - ); - } - - getMinimumActiveMembers(): i32 { - let result = super.call( - "getMinimumActiveMembers", - "getMinimumActiveMembers():(uint8)", - [] - ); - - return result[0].toI32(); - } - - try_getMinimumActiveMembers(): ethereum.CallResult { - let result = super.tryCall( - "getMinimumActiveMembers", - "getMinimumActiveMembers():(uint8)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toI32()); - } - - getNextEpochSeatCount(): i32 { - let result = super.call( - "getNextEpochSeatCount", - "getNextEpochSeatCount():(uint8)", - [] - ); - - return result[0].toI32(); - } - - try_getNextEpochSeatCount(): ethereum.CallResult { - let result = super.tryCall( - "getNextEpochSeatCount", - "getNextEpochSeatCount():(uint8)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toI32()); - } - - getNominationPeriodStartDate(): BigInt { - let result = super.call( - "getNominationPeriodStartDate", - "getNominationPeriodStartDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getNominationPeriodStartDate(): ethereum.CallResult { - let result = super.tryCall( - "getNominationPeriodStartDate", - "getNominationPeriodStartDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNominees(): Array
{ - let result = super.call("getNominees", "getNominees():(address[])", []); - - return result[0].toAddressArray(); - } - - try_getNominees(): ethereum.CallResult> { - let result = super.tryCall("getNominees", "getNominees():(address[])", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotePower(user: Address): BigInt { - let result = super.call("getVotePower", "getVotePower(address):(uint256)", [ - ethereum.Value.fromAddress(user) - ]); - - return result[0].toBigInt(); - } - - try_getVotePower(user: Address): ethereum.CallResult { - let result = super.tryCall( - "getVotePower", - "getVotePower(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getVotingPeriodStartDate(): BigInt { - let result = super.call( - "getVotingPeriodStartDate", - "getVotingPeriodStartDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getVotingPeriodStartDate(): ethereum.CallResult { - let result = super.tryCall( - "getVotingPeriodStartDate", - "getVotingPeriodStartDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVoted(user: Address): boolean { - let result = super.call("hasVoted", "hasVoted(address):(bool)", [ - ethereum.Value.fromAddress(user) - ]); - - return result[0].toBoolean(); - } - - try_hasVoted(user: Address): ethereum.CallResult { - let result = super.tryCall("hasVoted", "hasVoted(address):(bool)", [ - ethereum.Value.fromAddress(user) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionEvaluated(): boolean { - let result = super.call( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionEvaluated(): ethereum.CallResult { - let result = super.tryCall( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionModuleInitialized(): boolean { - let result = super.call( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionModuleInitialized(): ethereum.CallResult { - let result = super.tryCall( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isNominated(candidate: Address): boolean { - let result = super.call("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - - return result[0].toBoolean(); - } - - try_isNominated(candidate: Address): ethereum.CallResult { - let result = super.tryCall("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isOwnerModuleInitialized(): boolean { - let result = super.call( - "isOwnerModuleInitialized", - "isOwnerModuleInitialized():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isOwnerModuleInitialized(): ethereum.CallResult { - let result = super.tryCall( - "isOwnerModuleInitialized", - "isOwnerModuleInitialized():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - nominatedOwner(): Address { - let result = super.call("nominatedOwner", "nominatedOwner():(address)", []); - - return result[0].toAddress(); - } - - try_nominatedOwner(): ethereum.CallResult
{ - let result = super.tryCall( - "nominatedOwner", - "nominatedOwner():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - owner(): Address { - let result = super.call("owner", "owner():(address)", []); - - return result[0].toAddress(); - } - - try_owner(): ethereum.CallResult
{ - let result = super.tryCall("owner", "owner():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getImplementation(): Address { - let result = super.call( - "getImplementation", - "getImplementation():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getImplementation(): ethereum.CallResult
{ - let result = super.tryCall( - "getImplementation", - "getImplementation():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } -} - -export class CastCall extends ethereum.Call { - get inputs(): CastCall__Inputs { - return new CastCall__Inputs(this); - } - - get outputs(): CastCall__Outputs { - return new CastCall__Outputs(this); - } -} - -export class CastCall__Inputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } - - get candidates(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class CastCall__Outputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } -} - -export class DeclareAndCastCall extends ethereum.Call { - get inputs(): DeclareAndCastCall__Inputs { - return new DeclareAndCastCall__Inputs(this); - } - - get outputs(): DeclareAndCastCall__Outputs { - return new DeclareAndCastCall__Outputs(this); - } -} - -export class DeclareAndCastCall__Inputs { - _call: DeclareAndCastCall; - - constructor(call: DeclareAndCastCall) { - this._call = call; - } - - get debtShare(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get merkleProof(): Array { - return this._call.inputValues[1].value.toBytesArray(); - } - - get candidates(): Array
{ - return this._call.inputValues[2].value.toAddressArray(); - } -} - -export class DeclareAndCastCall__Outputs { - _call: DeclareAndCastCall; - - constructor(call: DeclareAndCastCall) { - this._call = call; - } -} - -export class DeclareCrossChainDebtShareCall extends ethereum.Call { - get inputs(): DeclareCrossChainDebtShareCall__Inputs { - return new DeclareCrossChainDebtShareCall__Inputs(this); - } - - get outputs(): DeclareCrossChainDebtShareCall__Outputs { - return new DeclareCrossChainDebtShareCall__Outputs(this); - } -} - -export class DeclareCrossChainDebtShareCall__Inputs { - _call: DeclareCrossChainDebtShareCall; - - constructor(call: DeclareCrossChainDebtShareCall) { - this._call = call; - } - - get user(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get debtShare(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get merkleProof(): Array { - return this._call.inputValues[2].value.toBytesArray(); - } -} - -export class DeclareCrossChainDebtShareCall__Outputs { - _call: DeclareCrossChainDebtShareCall; - - constructor(call: DeclareCrossChainDebtShareCall) { - this._call = call; - } -} - -export class DismissMembersCall extends ethereum.Call { - get inputs(): DismissMembersCall__Inputs { - return new DismissMembersCall__Inputs(this); - } - - get outputs(): DismissMembersCall__Outputs { - return new DismissMembersCall__Outputs(this); - } -} - -export class DismissMembersCall__Inputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } - - get membersToDismiss(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class DismissMembersCall__Outputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } -} - -export class EvaluateCall extends ethereum.Call { - get inputs(): EvaluateCall__Inputs { - return new EvaluateCall__Inputs(this); - } - - get outputs(): EvaluateCall__Outputs { - return new EvaluateCall__Outputs(this); - } -} - -export class EvaluateCall__Inputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } - - get numBallots(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class EvaluateCall__Outputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } -} - -export class InitializeElectionModuleCall extends ethereum.Call { - get inputs(): InitializeElectionModuleCall__Inputs { - return new InitializeElectionModuleCall__Inputs(this); - } - - get outputs(): InitializeElectionModuleCall__Outputs { - return new InitializeElectionModuleCall__Outputs(this); - } -} - -export class InitializeElectionModuleCall__Inputs { - _call: InitializeElectionModuleCall; - - constructor(call: InitializeElectionModuleCall) { - this._call = call; - } - - get councilTokenName(): string { - return this._call.inputValues[0].value.toString(); - } - - get councilTokenSymbol(): string { - return this._call.inputValues[1].value.toString(); - } - - get firstCouncil(): Array
{ - return this._call.inputValues[2].value.toAddressArray(); - } - - get minimumActiveMembers(): i32 { - return this._call.inputValues[3].value.toI32(); - } - - get nominationPeriodStartDate(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._call.inputValues[5].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._call.inputValues[6].value.toBigInt(); - } - - get debtShareContract(): Address { - return this._call.inputValues[7].value.toAddress(); - } -} - -export class InitializeElectionModuleCall__Outputs { - _call: InitializeElectionModuleCall; - - constructor(call: InitializeElectionModuleCall) { - this._call = call; - } -} - -export class ModifyEpochScheduleCall extends ethereum.Call { - get inputs(): ModifyEpochScheduleCall__Inputs { - return new ModifyEpochScheduleCall__Inputs(this); - } - - get outputs(): ModifyEpochScheduleCall__Outputs { - return new ModifyEpochScheduleCall__Outputs(this); - } -} - -export class ModifyEpochScheduleCall__Inputs { - _call: ModifyEpochScheduleCall; - - constructor(call: ModifyEpochScheduleCall) { - this._call = call; - } - - get newNominationPeriodStartDate(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newVotingPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newEpochEndDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class ModifyEpochScheduleCall__Outputs { - _call: ModifyEpochScheduleCall; - - constructor(call: ModifyEpochScheduleCall) { - this._call = call; - } -} - -export class NominateCall extends ethereum.Call { - get inputs(): NominateCall__Inputs { - return new NominateCall__Inputs(this); - } - - get outputs(): NominateCall__Outputs { - return new NominateCall__Outputs(this); - } -} - -export class NominateCall__Inputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class NominateCall__Outputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class ResolveCall extends ethereum.Call { - get inputs(): ResolveCall__Inputs { - return new ResolveCall__Inputs(this); - } - - get outputs(): ResolveCall__Outputs { - return new ResolveCall__Outputs(this); - } -} - -export class ResolveCall__Inputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class ResolveCall__Outputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class SetCrossChainDebtShareMerkleRootCall extends ethereum.Call { - get inputs(): SetCrossChainDebtShareMerkleRootCall__Inputs { - return new SetCrossChainDebtShareMerkleRootCall__Inputs(this); - } - - get outputs(): SetCrossChainDebtShareMerkleRootCall__Outputs { - return new SetCrossChainDebtShareMerkleRootCall__Outputs(this); - } -} - -export class SetCrossChainDebtShareMerkleRootCall__Inputs { - _call: SetCrossChainDebtShareMerkleRootCall; - - constructor(call: SetCrossChainDebtShareMerkleRootCall) { - this._call = call; - } - - get merkleRoot(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get blocknumber(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class SetCrossChainDebtShareMerkleRootCall__Outputs { - _call: SetCrossChainDebtShareMerkleRootCall; - - constructor(call: SetCrossChainDebtShareMerkleRootCall) { - this._call = call; - } -} - -export class SetDebtShareContractCall extends ethereum.Call { - get inputs(): SetDebtShareContractCall__Inputs { - return new SetDebtShareContractCall__Inputs(this); - } - - get outputs(): SetDebtShareContractCall__Outputs { - return new SetDebtShareContractCall__Outputs(this); - } -} - -export class SetDebtShareContractCall__Inputs { - _call: SetDebtShareContractCall; - - constructor(call: SetDebtShareContractCall) { - this._call = call; - } - - get debtShareContract(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SetDebtShareContractCall__Outputs { - _call: SetDebtShareContractCall; - - constructor(call: SetDebtShareContractCall) { - this._call = call; - } -} - -export class SetDebtShareSnapshotIdCall extends ethereum.Call { - get inputs(): SetDebtShareSnapshotIdCall__Inputs { - return new SetDebtShareSnapshotIdCall__Inputs(this); - } - - get outputs(): SetDebtShareSnapshotIdCall__Outputs { - return new SetDebtShareSnapshotIdCall__Outputs(this); - } -} - -export class SetDebtShareSnapshotIdCall__Inputs { - _call: SetDebtShareSnapshotIdCall; - - constructor(call: SetDebtShareSnapshotIdCall) { - this._call = call; - } - - get snapshotId(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetDebtShareSnapshotIdCall__Outputs { - _call: SetDebtShareSnapshotIdCall; - - constructor(call: SetDebtShareSnapshotIdCall) { - this._call = call; - } -} - -export class SetDefaultBallotEvaluationBatchSizeCall extends ethereum.Call { - get inputs(): SetDefaultBallotEvaluationBatchSizeCall__Inputs { - return new SetDefaultBallotEvaluationBatchSizeCall__Inputs(this); - } - - get outputs(): SetDefaultBallotEvaluationBatchSizeCall__Outputs { - return new SetDefaultBallotEvaluationBatchSizeCall__Outputs(this); - } -} - -export class SetDefaultBallotEvaluationBatchSizeCall__Inputs { - _call: SetDefaultBallotEvaluationBatchSizeCall; - - constructor(call: SetDefaultBallotEvaluationBatchSizeCall) { - this._call = call; - } - - get newDefaultBallotEvaluationBatchSize(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetDefaultBallotEvaluationBatchSizeCall__Outputs { - _call: SetDefaultBallotEvaluationBatchSizeCall; - - constructor(call: SetDefaultBallotEvaluationBatchSizeCall) { - this._call = call; - } -} - -export class SetMaxDateAdjustmentToleranceCall extends ethereum.Call { - get inputs(): SetMaxDateAdjustmentToleranceCall__Inputs { - return new SetMaxDateAdjustmentToleranceCall__Inputs(this); - } - - get outputs(): SetMaxDateAdjustmentToleranceCall__Outputs { - return new SetMaxDateAdjustmentToleranceCall__Outputs(this); - } -} - -export class SetMaxDateAdjustmentToleranceCall__Inputs { - _call: SetMaxDateAdjustmentToleranceCall; - - constructor(call: SetMaxDateAdjustmentToleranceCall) { - this._call = call; - } - - get newMaxDateAdjustmentTolerance(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetMaxDateAdjustmentToleranceCall__Outputs { - _call: SetMaxDateAdjustmentToleranceCall; - - constructor(call: SetMaxDateAdjustmentToleranceCall) { - this._call = call; - } -} - -export class SetMinEpochDurationsCall extends ethereum.Call { - get inputs(): SetMinEpochDurationsCall__Inputs { - return new SetMinEpochDurationsCall__Inputs(this); - } - - get outputs(): SetMinEpochDurationsCall__Outputs { - return new SetMinEpochDurationsCall__Outputs(this); - } -} - -export class SetMinEpochDurationsCall__Inputs { - _call: SetMinEpochDurationsCall; - - constructor(call: SetMinEpochDurationsCall) { - this._call = call; - } - - get newMinNominationPeriodDuration(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newMinVotingPeriodDuration(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newMinEpochDuration(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class SetMinEpochDurationsCall__Outputs { - _call: SetMinEpochDurationsCall; - - constructor(call: SetMinEpochDurationsCall) { - this._call = call; - } -} - -export class SetMinimumActiveMembersCall extends ethereum.Call { - get inputs(): SetMinimumActiveMembersCall__Inputs { - return new SetMinimumActiveMembersCall__Inputs(this); - } - - get outputs(): SetMinimumActiveMembersCall__Outputs { - return new SetMinimumActiveMembersCall__Outputs(this); - } -} - -export class SetMinimumActiveMembersCall__Inputs { - _call: SetMinimumActiveMembersCall; - - constructor(call: SetMinimumActiveMembersCall) { - this._call = call; - } - - get newMinimumActiveMembers(): i32 { - return this._call.inputValues[0].value.toI32(); - } -} - -export class SetMinimumActiveMembersCall__Outputs { - _call: SetMinimumActiveMembersCall; - - constructor(call: SetMinimumActiveMembersCall) { - this._call = call; - } -} - -export class SetNextEpochSeatCountCall extends ethereum.Call { - get inputs(): SetNextEpochSeatCountCall__Inputs { - return new SetNextEpochSeatCountCall__Inputs(this); - } - - get outputs(): SetNextEpochSeatCountCall__Outputs { - return new SetNextEpochSeatCountCall__Outputs(this); - } -} - -export class SetNextEpochSeatCountCall__Inputs { - _call: SetNextEpochSeatCountCall; - - constructor(call: SetNextEpochSeatCountCall) { - this._call = call; - } - - get newSeatCount(): i32 { - return this._call.inputValues[0].value.toI32(); - } -} - -export class SetNextEpochSeatCountCall__Outputs { - _call: SetNextEpochSeatCountCall; - - constructor(call: SetNextEpochSeatCountCall) { - this._call = call; - } -} - -export class TweakEpochScheduleCall extends ethereum.Call { - get inputs(): TweakEpochScheduleCall__Inputs { - return new TweakEpochScheduleCall__Inputs(this); - } - - get outputs(): TweakEpochScheduleCall__Outputs { - return new TweakEpochScheduleCall__Outputs(this); - } -} - -export class TweakEpochScheduleCall__Inputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } - - get newNominationPeriodStartDate(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newVotingPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newEpochEndDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class TweakEpochScheduleCall__Outputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } -} - -export class UpgradeCouncilTokenCall extends ethereum.Call { - get inputs(): UpgradeCouncilTokenCall__Inputs { - return new UpgradeCouncilTokenCall__Inputs(this); - } - - get outputs(): UpgradeCouncilTokenCall__Outputs { - return new UpgradeCouncilTokenCall__Outputs(this); - } -} - -export class UpgradeCouncilTokenCall__Inputs { - _call: UpgradeCouncilTokenCall; - - constructor(call: UpgradeCouncilTokenCall) { - this._call = call; - } - - get newCouncilTokenImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class UpgradeCouncilTokenCall__Outputs { - _call: UpgradeCouncilTokenCall; - - constructor(call: UpgradeCouncilTokenCall) { - this._call = call; - } -} - -export class WithdrawNominationCall extends ethereum.Call { - get inputs(): WithdrawNominationCall__Inputs { - return new WithdrawNominationCall__Inputs(this); - } - - get outputs(): WithdrawNominationCall__Outputs { - return new WithdrawNominationCall__Outputs(this); - } -} - -export class WithdrawNominationCall__Inputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawNominationCall__Outputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawVoteCall extends ethereum.Call { - get inputs(): WithdrawVoteCall__Inputs { - return new WithdrawVoteCall__Inputs(this); - } - - get outputs(): WithdrawVoteCall__Outputs { - return new WithdrawVoteCall__Outputs(this); - } -} - -export class WithdrawVoteCall__Inputs { - _call: WithdrawVoteCall; - - constructor(call: WithdrawVoteCall) { - this._call = call; - } -} - -export class WithdrawVoteCall__Outputs { - _call: WithdrawVoteCall; - - constructor(call: WithdrawVoteCall) { - this._call = call; - } -} - -export class AcceptOwnershipCall extends ethereum.Call { - get inputs(): AcceptOwnershipCall__Inputs { - return new AcceptOwnershipCall__Inputs(this); - } - - get outputs(): AcceptOwnershipCall__Outputs { - return new AcceptOwnershipCall__Outputs(this); - } -} - -export class AcceptOwnershipCall__Inputs { - _call: AcceptOwnershipCall; - - constructor(call: AcceptOwnershipCall) { - this._call = call; - } -} - -export class AcceptOwnershipCall__Outputs { - _call: AcceptOwnershipCall; - - constructor(call: AcceptOwnershipCall) { - this._call = call; - } -} - -export class InitializeOwnerModuleCall extends ethereum.Call { - get inputs(): InitializeOwnerModuleCall__Inputs { - return new InitializeOwnerModuleCall__Inputs(this); - } - - get outputs(): InitializeOwnerModuleCall__Outputs { - return new InitializeOwnerModuleCall__Outputs(this); - } -} - -export class InitializeOwnerModuleCall__Inputs { - _call: InitializeOwnerModuleCall; - - constructor(call: InitializeOwnerModuleCall) { - this._call = call; - } - - get initialOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class InitializeOwnerModuleCall__Outputs { - _call: InitializeOwnerModuleCall; - - constructor(call: InitializeOwnerModuleCall) { - this._call = call; - } -} - -export class NominateNewOwnerCall extends ethereum.Call { - get inputs(): NominateNewOwnerCall__Inputs { - return new NominateNewOwnerCall__Inputs(this); - } - - get outputs(): NominateNewOwnerCall__Outputs { - return new NominateNewOwnerCall__Outputs(this); - } -} - -export class NominateNewOwnerCall__Inputs { - _call: NominateNewOwnerCall; - - constructor(call: NominateNewOwnerCall) { - this._call = call; - } - - get newNominatedOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class NominateNewOwnerCall__Outputs { - _call: NominateNewOwnerCall; - - constructor(call: NominateNewOwnerCall) { - this._call = call; - } -} - -export class RenounceNominationCall extends ethereum.Call { - get inputs(): RenounceNominationCall__Inputs { - return new RenounceNominationCall__Inputs(this); - } - - get outputs(): RenounceNominationCall__Outputs { - return new RenounceNominationCall__Outputs(this); - } -} - -export class RenounceNominationCall__Inputs { - _call: RenounceNominationCall; - - constructor(call: RenounceNominationCall) { - this._call = call; - } -} - -export class RenounceNominationCall__Outputs { - _call: RenounceNominationCall; - - constructor(call: RenounceNominationCall) { - this._call = call; - } -} - -export class SimulateUpgradeToCall extends ethereum.Call { - get inputs(): SimulateUpgradeToCall__Inputs { - return new SimulateUpgradeToCall__Inputs(this); - } - - get outputs(): SimulateUpgradeToCall__Outputs { - return new SimulateUpgradeToCall__Outputs(this); - } -} - -export class SimulateUpgradeToCall__Inputs { - _call: SimulateUpgradeToCall; - - constructor(call: SimulateUpgradeToCall) { - this._call = call; - } - - get newImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SimulateUpgradeToCall__Outputs { - _call: SimulateUpgradeToCall; - - constructor(call: SimulateUpgradeToCall) { - this._call = call; - } -} - -export class UpgradeToCall extends ethereum.Call { - get inputs(): UpgradeToCall__Inputs { - return new UpgradeToCall__Inputs(this); - } - - get outputs(): UpgradeToCall__Outputs { - return new UpgradeToCall__Outputs(this); - } -} - -export class UpgradeToCall__Inputs { - _call: UpgradeToCall; - - constructor(call: UpgradeToCall) { - this._call = call; - } - - get newImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class UpgradeToCall__Outputs { - _call: UpgradeToCall; - - constructor(call: UpgradeToCall) { - this._call = call; - } -} diff --git a/governance/subgraph/generated/Spartan/ElectionModule.ts b/governance/subgraph/generated/Spartan/ElectionModule.ts deleted file mode 100644 index 7fb77c6af..000000000 --- a/governance/subgraph/generated/Spartan/ElectionModule.ts +++ /dev/null @@ -1,2585 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class AssociatedSystemSet extends ethereum.Event { - get params(): AssociatedSystemSet__Params { - return new AssociatedSystemSet__Params(this); - } -} - -export class AssociatedSystemSet__Params { - _event: AssociatedSystemSet; - - constructor(event: AssociatedSystemSet) { - this._event = event; - } - - get kind(): Bytes { - return this._event.parameters[0].value.toBytes(); - } - - get id(): Bytes { - return this._event.parameters[1].value.toBytes(); - } - - get proxy(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get impl(): Address { - return this._event.parameters[3].value.toAddress(); - } -} - -export class NewSupportedCrossChainNetwork extends ethereum.Event { - get params(): NewSupportedCrossChainNetwork__Params { - return new NewSupportedCrossChainNetwork__Params(this); - } -} - -export class NewSupportedCrossChainNetwork__Params { - _event: NewSupportedCrossChainNetwork; - - constructor(event: NewSupportedCrossChainNetwork) { - this._event = event; - } - - get newChainId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class CandidateNominated extends ethereum.Event { - get params(): CandidateNominated__Params { - return new CandidateNominated__Params(this); - } -} - -export class CandidateNominated__Params { - _event: CandidateNominated; - - constructor(event: CandidateNominated) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberAdded extends ethereum.Event { - get params(): CouncilMemberAdded__Params { - return new CouncilMemberAdded__Params(this); - } -} - -export class CouncilMemberAdded__Params { - _event: CouncilMemberAdded; - - constructor(event: CouncilMemberAdded) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberRemoved extends ethereum.Event { - get params(): CouncilMemberRemoved__Params { - return new CouncilMemberRemoved__Params(this); - } -} - -export class CouncilMemberRemoved__Params { - _event: CouncilMemberRemoved; - - constructor(event: CouncilMemberRemoved) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMembersDismissed extends ethereum.Event { - get params(): CouncilMembersDismissed__Params { - return new CouncilMembersDismissed__Params(this); - } -} - -export class CouncilMembersDismissed__Params { - _event: CouncilMembersDismissed; - - constructor(event: CouncilMembersDismissed) { - this._event = event; - } - - get dismissedMembers(): Array
{ - return this._event.parameters[0].value.toAddressArray(); - } - - get epochId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class ElectionBatchEvaluated extends ethereum.Event { - get params(): ElectionBatchEvaluated__Params { - return new ElectionBatchEvaluated__Params(this); - } -} - -export class ElectionBatchEvaluated__Params { - _event: ElectionBatchEvaluated; - - constructor(event: ElectionBatchEvaluated) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get numEvaluatedBallots(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get totalBallots(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class ElectionEvaluated extends ethereum.Event { - get params(): ElectionEvaluated__Params { - return new ElectionEvaluated__Params(this); - } -} - -export class ElectionEvaluated__Params { - _event: ElectionEvaluated; - - constructor(event: ElectionEvaluated) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get ballotCount(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class ElectionModuleInitialized extends ethereum.Event { - get params(): ElectionModuleInitialized__Params { - return new ElectionModuleInitialized__Params(this); - } -} - -export class ElectionModuleInitialized__Params { - _event: ElectionModuleInitialized; - - constructor(event: ElectionModuleInitialized) { - this._event = event; - } -} - -export class EmergencyElectionStarted extends ethereum.Event { - get params(): EmergencyElectionStarted__Params { - return new EmergencyElectionStarted__Params(this); - } -} - -export class EmergencyElectionStarted__Params { - _event: EmergencyElectionStarted; - - constructor(event: EmergencyElectionStarted) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class EpochScheduleUpdated extends ethereum.Event { - get params(): EpochScheduleUpdated__Params { - return new EpochScheduleUpdated__Params(this); - } -} - -export class EpochScheduleUpdated__Params { - _event: EpochScheduleUpdated; - - constructor(event: EpochScheduleUpdated) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get startDate(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get endDate(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class EpochStarted extends ethereum.Event { - get params(): EpochStarted__Params { - return new EpochStarted__Params(this); - } -} - -export class EpochStarted__Params { - _event: EpochStarted; - - constructor(event: EpochStarted) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class NominationWithdrawn extends ethereum.Event { - get params(): NominationWithdrawn__Params { - return new NominationWithdrawn__Params(this); - } -} - -export class NominationWithdrawn__Params { - _event: NominationWithdrawn; - - constructor(event: NominationWithdrawn) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class VoteRecorded extends ethereum.Event { - get params(): VoteRecorded__Params { - return new VoteRecorded__Params(this); - } -} - -export class VoteRecorded__Params { - _event: VoteRecorded; - - constructor(event: VoteRecorded) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get chainId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epochId(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get votingPower(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } - - get candidates(): Array
{ - return this._event.parameters[4].value.toAddressArray(); - } -} - -export class VoteWithdrawn extends ethereum.Event { - get params(): VoteWithdrawn__Params { - return new VoteWithdrawn__Params(this); - } -} - -export class VoteWithdrawn__Params { - _event: VoteWithdrawn; - - constructor(event: VoteWithdrawn) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get chainId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epochId(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get candidates(): Array
{ - return this._event.parameters[3].value.toAddressArray(); - } -} - -export class OwnerChanged extends ethereum.Event { - get params(): OwnerChanged__Params { - return new OwnerChanged__Params(this); - } -} - -export class OwnerChanged__Params { - _event: OwnerChanged; - - constructor(event: OwnerChanged) { - this._event = event; - } - - get oldOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get newOwner(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class OwnerNominated extends ethereum.Event { - get params(): OwnerNominated__Params { - return new OwnerNominated__Params(this); - } -} - -export class OwnerNominated__Params { - _event: OwnerNominated; - - constructor(event: OwnerNominated) { - this._event = event; - } - - get newOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class Upgraded extends ethereum.Event { - get params(): Upgraded__Params { - return new Upgraded__Params(this); - } -} - -export class Upgraded__Params { - _event: Upgraded; - - constructor(event: Upgraded) { - this._event = event; - } - - get self(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get implementation(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class ElectionModule__getAssociatedSystemResult { - value0: Address; - value1: Bytes; - - constructor(value0: Address, value1: Bytes) { - this.value0 = value0; - this.value1 = value1; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromAddress(this.value0)); - map.set("value1", ethereum.Value.fromFixedBytes(this.value1)); - return map; - } - - getAddr(): Address { - return this.value0; - } - - getKind(): Bytes { - return this.value1; - } -} - -export class ElectionModule__getBallotResultValue0Struct extends ethereum.Tuple { - get votingPower(): BigInt { - return this[0].toBigInt(); - } - - get votedCandidates(): Array
{ - return this[1].toAddressArray(); - } - - get amounts(): Array { - return this[2].toBigIntArray(); - } -} - -export class ElectionModule__getElectionSettingsResultSettingsStruct extends ethereum.Tuple { - get epochSeatCount(): i32 { - return this[0].toI32(); - } - - get minimumActiveMembers(): i32 { - return this[1].toI32(); - } - - get epochDuration(): BigInt { - return this[2].toBigInt(); - } - - get nominationPeriodDuration(): BigInt { - return this[3].toBigInt(); - } - - get votingPeriodDuration(): BigInt { - return this[4].toBigInt(); - } - - get maxDateAdjustmentTolerance(): BigInt { - return this[5].toBigInt(); - } -} - -export class ElectionModule__getEpochScheduleResultEpochStruct extends ethereum.Tuple { - get startDate(): BigInt { - return this[0].toBigInt(); - } - - get nominationPeriodStartDate(): BigInt { - return this[1].toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this[2].toBigInt(); - } - - get endDate(): BigInt { - return this[3].toBigInt(); - } -} - -export class ElectionModule__getNextElectionSettingsResultSettingsStruct extends ethereum.Tuple { - get epochSeatCount(): i32 { - return this[0].toI32(); - } - - get minimumActiveMembers(): i32 { - return this[1].toI32(); - } - - get epochDuration(): BigInt { - return this[2].toBigInt(); - } - - get nominationPeriodDuration(): BigInt { - return this[3].toBigInt(); - } - - get votingPeriodDuration(): BigInt { - return this[4].toBigInt(); - } - - get maxDateAdjustmentTolerance(): BigInt { - return this[5].toBigInt(); - } -} - -export class ElectionModule extends ethereum.SmartContract { - static bind(address: Address): ElectionModule { - return new ElectionModule("ElectionModule", address); - } - - getAssociatedSystem(id: Bytes): ElectionModule__getAssociatedSystemResult { - let result = super.call( - "getAssociatedSystem", - "getAssociatedSystem(bytes32):(address,bytes32)", - [ethereum.Value.fromFixedBytes(id)] - ); - - return new ElectionModule__getAssociatedSystemResult( - result[0].toAddress(), - result[1].toBytes() - ); - } - - try_getAssociatedSystem( - id: Bytes - ): ethereum.CallResult { - let result = super.tryCall( - "getAssociatedSystem", - "getAssociatedSystem(bytes32):(address,bytes32)", - [ethereum.Value.fromFixedBytes(id)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new ElectionModule__getAssociatedSystemResult( - value[0].toAddress(), - value[1].toBytes() - ) - ); - } - - setSupportedCrossChainNetworks( - supportedNetworks: Array, - ccipSelectors: Array - ): BigInt { - let result = super.call( - "setSupportedCrossChainNetworks", - "setSupportedCrossChainNetworks(uint64[],uint64[]):(uint256)", - [ - ethereum.Value.fromUnsignedBigIntArray(supportedNetworks), - ethereum.Value.fromUnsignedBigIntArray(ccipSelectors) - ] - ); - - return result[0].toBigInt(); - } - - try_setSupportedCrossChainNetworks( - supportedNetworks: Array, - ccipSelectors: Array - ): ethereum.CallResult { - let result = super.tryCall( - "setSupportedCrossChainNetworks", - "setSupportedCrossChainNetworks(uint64[],uint64[]):(uint256)", - [ - ethereum.Value.fromUnsignedBigIntArray(supportedNetworks), - ethereum.Value.fromUnsignedBigIntArray(ccipSelectors) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCandidateVotesInEpoch(candidate: Address, epochIndex: BigInt): BigInt { - let result = super.call( - "getCandidateVotesInEpoch", - "getCandidateVotesInEpoch(address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotesInEpoch( - candidate: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotesInEpoch", - "getCandidateVotesInEpoch(address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionWinnersInEpoch(epochIndex: BigInt): Array
{ - let result = super.call( - "getElectionWinnersInEpoch", - "getElectionWinnersInEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinnersInEpoch( - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinnersInEpoch", - "getElectionWinnersInEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochEndDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getEpochEndDateForIndex", - "getEpochEndDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getEpochEndDateForIndex(epochIndex: BigInt): ethereum.CallResult { - let result = super.tryCall( - "getEpochEndDateForIndex", - "getEpochEndDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getEpochStartDateForIndex", - "getEpochStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getEpochStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getEpochStartDateForIndex", - "getEpochStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNominationPeriodStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getNominationPeriodStartDateForIndex", - "getNominationPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getNominationPeriodStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getNominationPeriodStartDateForIndex", - "getNominationPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNomineesAtEpoch(epochIndex: BigInt): Array
{ - let result = super.call( - "getNomineesAtEpoch", - "getNomineesAtEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toAddressArray(); - } - - try_getNomineesAtEpoch( - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getNomineesAtEpoch", - "getNomineesAtEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotingPeriodStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getVotingPeriodStartDateForIndex", - "getVotingPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getVotingPeriodStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getVotingPeriodStartDateForIndex", - "getVotingPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVotedInEpoch(user: Address, chainId: BigInt, epochIndex: BigInt): boolean { - let result = super.call( - "hasVotedInEpoch", - "hasVotedInEpoch(address,uint256,uint256):(bool)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBoolean(); - } - - try_hasVotedInEpoch( - user: Address, - chainId: BigInt, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "hasVotedInEpoch", - "hasVotedInEpoch(address,uint256,uint256):(bool)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - wasNominated(candidate: Address, epochIndex: BigInt): boolean { - let result = super.call( - "wasNominated", - "wasNominated(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBoolean(); - } - - try_wasNominated( - candidate: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "wasNominated", - "wasNominated(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - getBallot( - voter: Address, - chainId: BigInt, - electionId: BigInt - ): ElectionModule__getBallotResultValue0Struct { - let result = super.call( - "getBallot", - "getBallot(address,uint256,uint256):((uint256,address[],uint256[]))", - [ - ethereum.Value.fromAddress(voter), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - - return changetype( - result[0].toTuple() - ); - } - - try_getBallot( - voter: Address, - chainId: BigInt, - electionId: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getBallot", - "getBallot(address,uint256,uint256):((uint256,address[],uint256[]))", - [ - ethereum.Value.fromAddress(voter), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - changetype( - value[0].toTuple() - ) - ); - } - - getBallotCandidates( - voter: Address, - chainId: BigInt, - electionId: BigInt - ): Array
{ - let result = super.call( - "getBallotCandidates", - "getBallotCandidates(address,uint256,uint256):(address[])", - [ - ethereum.Value.fromAddress(voter), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - - return result[0].toAddressArray(); - } - - try_getBallotCandidates( - voter: Address, - chainId: BigInt, - electionId: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getBallotCandidates", - "getBallotCandidates(address,uint256,uint256):(address[])", - [ - ethereum.Value.fromAddress(voter), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getCandidateVotes(candidate: Address): BigInt { - let result = super.call( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotes(candidate: Address): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCouncilMembers(): Array
{ - let result = super.call( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getCouncilMembers(): ethereum.CallResult> { - let result = super.tryCall( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getCouncilToken(): Address { - let result = super.call( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getCouncilToken(): ethereum.CallResult
{ - let result = super.tryCall( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getCurrentPeriod(): BigInt { - let result = super.call( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getCurrentPeriod(): ethereum.CallResult { - let result = super.tryCall( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionSettings(): ElectionModule__getElectionSettingsResultSettingsStruct { - let result = super.call( - "getElectionSettings", - "getElectionSettings():((uint8,uint8,uint64,uint64,uint64,uint64))", - [] - ); - - return changetype( - result[0].toTuple() - ); - } - - try_getElectionSettings(): ethereum.CallResult< - ElectionModule__getElectionSettingsResultSettingsStruct - > { - let result = super.tryCall( - "getElectionSettings", - "getElectionSettings():((uint8,uint8,uint64,uint64,uint64,uint64))", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - changetype( - value[0].toTuple() - ) - ); - } - - getElectionWinners(): Array
{ - let result = super.call( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinners(): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochIndex(): BigInt { - let result = super.call("getEpochIndex", "getEpochIndex():(uint256)", []); - - return result[0].toBigInt(); - } - - try_getEpochIndex(): ethereum.CallResult { - let result = super.tryCall( - "getEpochIndex", - "getEpochIndex():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochSchedule(): ElectionModule__getEpochScheduleResultEpochStruct { - let result = super.call( - "getEpochSchedule", - "getEpochSchedule():((uint64,uint64,uint64,uint64))", - [] - ); - - return changetype( - result[0].toTuple() - ); - } - - try_getEpochSchedule(): ethereum.CallResult< - ElectionModule__getEpochScheduleResultEpochStruct - > { - let result = super.tryCall( - "getEpochSchedule", - "getEpochSchedule():((uint64,uint64,uint64,uint64))", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - changetype( - value[0].toTuple() - ) - ); - } - - getNextElectionSettings(): ElectionModule__getNextElectionSettingsResultSettingsStruct { - let result = super.call( - "getNextElectionSettings", - "getNextElectionSettings():((uint8,uint8,uint64,uint64,uint64,uint64))", - [] - ); - - return changetype< - ElectionModule__getNextElectionSettingsResultSettingsStruct - >(result[0].toTuple()); - } - - try_getNextElectionSettings(): ethereum.CallResult< - ElectionModule__getNextElectionSettingsResultSettingsStruct - > { - let result = super.tryCall( - "getNextElectionSettings", - "getNextElectionSettings():((uint8,uint8,uint64,uint64,uint64,uint64))", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - changetype( - value[0].toTuple() - ) - ); - } - - getNominees(): Array
{ - let result = super.call("getNominees", "getNominees():(address[])", []); - - return result[0].toAddressArray(); - } - - try_getNominees(): ethereum.CallResult> { - let result = super.tryCall("getNominees", "getNominees():(address[])", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotePower(user: Address, chainId: BigInt, electionId: BigInt): BigInt { - let result = super.call( - "getVotePower", - "getVotePower(address,uint256,uint256):(uint256)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - - return result[0].toBigInt(); - } - - try_getVotePower( - user: Address, - chainId: BigInt, - electionId: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getVotePower", - "getVotePower(address,uint256,uint256):(uint256)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVoted(user: Address, chainId: BigInt): boolean { - let result = super.call("hasVoted", "hasVoted(address,uint256):(bool)", [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId) - ]); - - return result[0].toBoolean(); - } - - try_hasVoted(user: Address, chainId: BigInt): ethereum.CallResult { - let result = super.tryCall("hasVoted", "hasVoted(address,uint256):(bool)", [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionEvaluated(): boolean { - let result = super.call( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionEvaluated(): ethereum.CallResult { - let result = super.tryCall( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionModuleInitialized(): boolean { - let result = super.call( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionModuleInitialized(): ethereum.CallResult { - let result = super.tryCall( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isNominated(candidate: Address): boolean { - let result = super.call("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - - return result[0].toBoolean(); - } - - try_isNominated(candidate: Address): ethereum.CallResult { - let result = super.tryCall("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - getVotePowerSnapshotId( - snapshotContract: Address, - electionId: BigInt - ): BigInt { - let result = super.call( - "getVotePowerSnapshotId", - "getVotePowerSnapshotId(address,uint128):(uint128)", - [ - ethereum.Value.fromAddress(snapshotContract), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - - return result[0].toBigInt(); - } - - try_getVotePowerSnapshotId( - snapshotContract: Address, - electionId: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getVotePowerSnapshotId", - "getVotePowerSnapshotId(address,uint128):(uint128)", - [ - ethereum.Value.fromAddress(snapshotContract), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - prepareBallotWithSnapshot(snapshotContract: Address, voter: Address): BigInt { - let result = super.call( - "prepareBallotWithSnapshot", - "prepareBallotWithSnapshot(address,address):(uint256)", - [ - ethereum.Value.fromAddress(snapshotContract), - ethereum.Value.fromAddress(voter) - ] - ); - - return result[0].toBigInt(); - } - - try_prepareBallotWithSnapshot( - snapshotContract: Address, - voter: Address - ): ethereum.CallResult { - let result = super.tryCall( - "prepareBallotWithSnapshot", - "prepareBallotWithSnapshot(address,address):(uint256)", - [ - ethereum.Value.fromAddress(snapshotContract), - ethereum.Value.fromAddress(voter) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - takeVotePowerSnapshot(snapshotContract: Address): BigInt { - let result = super.call( - "takeVotePowerSnapshot", - "takeVotePowerSnapshot(address):(uint128)", - [ethereum.Value.fromAddress(snapshotContract)] - ); - - return result[0].toBigInt(); - } - - try_takeVotePowerSnapshot( - snapshotContract: Address - ): ethereum.CallResult { - let result = super.tryCall( - "takeVotePowerSnapshot", - "takeVotePowerSnapshot(address):(uint128)", - [ethereum.Value.fromAddress(snapshotContract)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getImplementation(): Address { - let result = super.call( - "getImplementation", - "getImplementation():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getImplementation(): ethereum.CallResult
{ - let result = super.tryCall( - "getImplementation", - "getImplementation():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - nominatedOwner(): Address { - let result = super.call("nominatedOwner", "nominatedOwner():(address)", []); - - return result[0].toAddress(); - } - - try_nominatedOwner(): ethereum.CallResult
{ - let result = super.tryCall( - "nominatedOwner", - "nominatedOwner():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - owner(): Address { - let result = super.call("owner", "owner():(address)", []); - - return result[0].toAddress(); - } - - try_owner(): ethereum.CallResult
{ - let result = super.tryCall("owner", "owner():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } -} - -export class InitOrUpgradeNftCall extends ethereum.Call { - get inputs(): InitOrUpgradeNftCall__Inputs { - return new InitOrUpgradeNftCall__Inputs(this); - } - - get outputs(): InitOrUpgradeNftCall__Outputs { - return new InitOrUpgradeNftCall__Outputs(this); - } -} - -export class InitOrUpgradeNftCall__Inputs { - _call: InitOrUpgradeNftCall; - - constructor(call: InitOrUpgradeNftCall) { - this._call = call; - } - - get id(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get name(): string { - return this._call.inputValues[1].value.toString(); - } - - get symbol(): string { - return this._call.inputValues[2].value.toString(); - } - - get uri(): string { - return this._call.inputValues[3].value.toString(); - } - - get impl(): Address { - return this._call.inputValues[4].value.toAddress(); - } -} - -export class InitOrUpgradeNftCall__Outputs { - _call: InitOrUpgradeNftCall; - - constructor(call: InitOrUpgradeNftCall) { - this._call = call; - } -} - -export class InitOrUpgradeTokenCall extends ethereum.Call { - get inputs(): InitOrUpgradeTokenCall__Inputs { - return new InitOrUpgradeTokenCall__Inputs(this); - } - - get outputs(): InitOrUpgradeTokenCall__Outputs { - return new InitOrUpgradeTokenCall__Outputs(this); - } -} - -export class InitOrUpgradeTokenCall__Inputs { - _call: InitOrUpgradeTokenCall; - - constructor(call: InitOrUpgradeTokenCall) { - this._call = call; - } - - get id(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get name(): string { - return this._call.inputValues[1].value.toString(); - } - - get symbol(): string { - return this._call.inputValues[2].value.toString(); - } - - get decimals(): i32 { - return this._call.inputValues[3].value.toI32(); - } - - get impl(): Address { - return this._call.inputValues[4].value.toAddress(); - } -} - -export class InitOrUpgradeTokenCall__Outputs { - _call: InitOrUpgradeTokenCall; - - constructor(call: InitOrUpgradeTokenCall) { - this._call = call; - } -} - -export class RegisterUnmanagedSystemCall extends ethereum.Call { - get inputs(): RegisterUnmanagedSystemCall__Inputs { - return new RegisterUnmanagedSystemCall__Inputs(this); - } - - get outputs(): RegisterUnmanagedSystemCall__Outputs { - return new RegisterUnmanagedSystemCall__Outputs(this); - } -} - -export class RegisterUnmanagedSystemCall__Inputs { - _call: RegisterUnmanagedSystemCall; - - constructor(call: RegisterUnmanagedSystemCall) { - this._call = call; - } - - get id(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get endpoint(): Address { - return this._call.inputValues[1].value.toAddress(); - } -} - -export class RegisterUnmanagedSystemCall__Outputs { - _call: RegisterUnmanagedSystemCall; - - constructor(call: RegisterUnmanagedSystemCall) { - this._call = call; - } -} - -export class ConfigureChainlinkCrossChainCall extends ethereum.Call { - get inputs(): ConfigureChainlinkCrossChainCall__Inputs { - return new ConfigureChainlinkCrossChainCall__Inputs(this); - } - - get outputs(): ConfigureChainlinkCrossChainCall__Outputs { - return new ConfigureChainlinkCrossChainCall__Outputs(this); - } -} - -export class ConfigureChainlinkCrossChainCall__Inputs { - _call: ConfigureChainlinkCrossChainCall; - - constructor(call: ConfigureChainlinkCrossChainCall) { - this._call = call; - } - - get ccipRouter(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class ConfigureChainlinkCrossChainCall__Outputs { - _call: ConfigureChainlinkCrossChainCall; - - constructor(call: ConfigureChainlinkCrossChainCall) { - this._call = call; - } -} - -export class SetSupportedCrossChainNetworksCall extends ethereum.Call { - get inputs(): SetSupportedCrossChainNetworksCall__Inputs { - return new SetSupportedCrossChainNetworksCall__Inputs(this); - } - - get outputs(): SetSupportedCrossChainNetworksCall__Outputs { - return new SetSupportedCrossChainNetworksCall__Outputs(this); - } -} - -export class SetSupportedCrossChainNetworksCall__Inputs { - _call: SetSupportedCrossChainNetworksCall; - - constructor(call: SetSupportedCrossChainNetworksCall) { - this._call = call; - } - - get supportedNetworks(): Array { - return this._call.inputValues[0].value.toBigIntArray(); - } - - get ccipSelectors(): Array { - return this._call.inputValues[1].value.toBigIntArray(); - } -} - -export class SetSupportedCrossChainNetworksCall__Outputs { - _call: SetSupportedCrossChainNetworksCall; - - constructor(call: SetSupportedCrossChainNetworksCall) { - this._call = call; - } - - get numRegistered(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class _recvCastCall extends ethereum.Call { - get inputs(): _recvCastCall__Inputs { - return new _recvCastCall__Inputs(this); - } - - get outputs(): _recvCastCall__Outputs { - return new _recvCastCall__Outputs(this); - } -} - -export class _recvCastCall__Inputs { - _call: _recvCastCall; - - constructor(call: _recvCastCall) { - this._call = call; - } - - get epochIndex(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get voter(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get votingPower(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get chainId(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get candidates(): Array
{ - return this._call.inputValues[4].value.toAddressArray(); - } - - get amounts(): Array { - return this._call.inputValues[5].value.toBigIntArray(); - } -} - -export class _recvCastCall__Outputs { - _call: _recvCastCall; - - constructor(call: _recvCastCall) { - this._call = call; - } -} - -export class _recvDismissMembersCall extends ethereum.Call { - get inputs(): _recvDismissMembersCall__Inputs { - return new _recvDismissMembersCall__Inputs(this); - } - - get outputs(): _recvDismissMembersCall__Outputs { - return new _recvDismissMembersCall__Outputs(this); - } -} - -export class _recvDismissMembersCall__Inputs { - _call: _recvDismissMembersCall; - - constructor(call: _recvDismissMembersCall) { - this._call = call; - } - - get membersToDismiss(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } - - get epochIndex(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class _recvDismissMembersCall__Outputs { - _call: _recvDismissMembersCall; - - constructor(call: _recvDismissMembersCall) { - this._call = call; - } -} - -export class _recvResolveCall extends ethereum.Call { - get inputs(): _recvResolveCall__Inputs { - return new _recvResolveCall__Inputs(this); - } - - get outputs(): _recvResolveCall__Outputs { - return new _recvResolveCall__Outputs(this); - } -} - -export class _recvResolveCall__Inputs { - _call: _recvResolveCall; - - constructor(call: _recvResolveCall) { - this._call = call; - } - - get epochIndex(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get epochStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get nominationPeriodStartDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get councilMembers(): Array
{ - return this._call.inputValues[5].value.toAddressArray(); - } -} - -export class _recvResolveCall__Outputs { - _call: _recvResolveCall; - - constructor(call: _recvResolveCall) { - this._call = call; - } -} - -export class _recvTweakEpochScheduleCall extends ethereum.Call { - get inputs(): _recvTweakEpochScheduleCall__Inputs { - return new _recvTweakEpochScheduleCall__Inputs(this); - } - - get outputs(): _recvTweakEpochScheduleCall__Outputs { - return new _recvTweakEpochScheduleCall__Outputs(this); - } -} - -export class _recvTweakEpochScheduleCall__Inputs { - _call: _recvTweakEpochScheduleCall; - - constructor(call: _recvTweakEpochScheduleCall) { - this._call = call; - } - - get epochIndex(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get nominationPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } -} - -export class _recvTweakEpochScheduleCall__Outputs { - _call: _recvTweakEpochScheduleCall; - - constructor(call: _recvTweakEpochScheduleCall) { - this._call = call; - } -} - -export class _recvWithdrawVoteCall extends ethereum.Call { - get inputs(): _recvWithdrawVoteCall__Inputs { - return new _recvWithdrawVoteCall__Inputs(this); - } - - get outputs(): _recvWithdrawVoteCall__Outputs { - return new _recvWithdrawVoteCall__Outputs(this); - } -} - -export class _recvWithdrawVoteCall__Inputs { - _call: _recvWithdrawVoteCall; - - constructor(call: _recvWithdrawVoteCall) { - this._call = call; - } - - get epochIndex(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get voter(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get chainId(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get candidates(): Array
{ - return this._call.inputValues[3].value.toAddressArray(); - } -} - -export class _recvWithdrawVoteCall__Outputs { - _call: _recvWithdrawVoteCall; - - constructor(call: _recvWithdrawVoteCall) { - this._call = call; - } -} - -export class CastCall extends ethereum.Call { - get inputs(): CastCall__Inputs { - return new CastCall__Inputs(this); - } - - get outputs(): CastCall__Outputs { - return new CastCall__Outputs(this); - } -} - -export class CastCall__Inputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } - - get candidates(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } - - get amounts(): Array { - return this._call.inputValues[1].value.toBigIntArray(); - } -} - -export class CastCall__Outputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } -} - -export class DismissMembersCall extends ethereum.Call { - get inputs(): DismissMembersCall__Inputs { - return new DismissMembersCall__Inputs(this); - } - - get outputs(): DismissMembersCall__Outputs { - return new DismissMembersCall__Outputs(this); - } -} - -export class DismissMembersCall__Inputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } - - get membersToDismiss(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class DismissMembersCall__Outputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } -} - -export class EvaluateCall extends ethereum.Call { - get inputs(): EvaluateCall__Inputs { - return new EvaluateCall__Inputs(this); - } - - get outputs(): EvaluateCall__Outputs { - return new EvaluateCall__Outputs(this); - } -} - -export class EvaluateCall__Inputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } - - get numBallots(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class EvaluateCall__Outputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } -} - -export class InitElectionModuleSatelliteCall extends ethereum.Call { - get inputs(): InitElectionModuleSatelliteCall__Inputs { - return new InitElectionModuleSatelliteCall__Inputs(this); - } - - get outputs(): InitElectionModuleSatelliteCall__Outputs { - return new InitElectionModuleSatelliteCall__Outputs(this); - } -} - -export class InitElectionModuleSatelliteCall__Inputs { - _call: InitElectionModuleSatelliteCall; - - constructor(call: InitElectionModuleSatelliteCall) { - this._call = call; - } - - get epochIndex(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get epochStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get nominationPeriodStartDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get councilMembers(): Array
{ - return this._call.inputValues[5].value.toAddressArray(); - } -} - -export class InitElectionModuleSatelliteCall__Outputs { - _call: InitElectionModuleSatelliteCall; - - constructor(call: InitElectionModuleSatelliteCall) { - this._call = call; - } -} - -export class InitElectionModuleSatellite1Call extends ethereum.Call { - get inputs(): InitElectionModuleSatellite1Call__Inputs { - return new InitElectionModuleSatellite1Call__Inputs(this); - } - - get outputs(): InitElectionModuleSatellite1Call__Outputs { - return new InitElectionModuleSatellite1Call__Outputs(this); - } -} - -export class InitElectionModuleSatellite1Call__Inputs { - _call: InitElectionModuleSatellite1Call; - - constructor(call: InitElectionModuleSatellite1Call) { - this._call = call; - } -} - -export class InitElectionModuleSatellite1Call__Outputs { - _call: InitElectionModuleSatellite1Call; - - constructor(call: InitElectionModuleSatellite1Call) { - this._call = call; - } -} - -export class InitOrUpdateElectionSettingsCall extends ethereum.Call { - get inputs(): InitOrUpdateElectionSettingsCall__Inputs { - return new InitOrUpdateElectionSettingsCall__Inputs(this); - } - - get outputs(): InitOrUpdateElectionSettingsCall__Outputs { - return new InitOrUpdateElectionSettingsCall__Outputs(this); - } -} - -export class InitOrUpdateElectionSettingsCall__Inputs { - _call: InitOrUpdateElectionSettingsCall; - - constructor(call: InitOrUpdateElectionSettingsCall) { - this._call = call; - } - - get initialCouncil(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } - - get minimumActiveMembers(): i32 { - return this._call.inputValues[1].value.toI32(); - } - - get initialNominationPeriodStartDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get administrationPeriodDuration(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get nominationPeriodDuration(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get votingPeriodDuration(): BigInt { - return this._call.inputValues[5].value.toBigInt(); - } -} - -export class InitOrUpdateElectionSettingsCall__Outputs { - _call: InitOrUpdateElectionSettingsCall; - - constructor(call: InitOrUpdateElectionSettingsCall) { - this._call = call; - } -} - -export class NominateCall extends ethereum.Call { - get inputs(): NominateCall__Inputs { - return new NominateCall__Inputs(this); - } - - get outputs(): NominateCall__Outputs { - return new NominateCall__Outputs(this); - } -} - -export class NominateCall__Inputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class NominateCall__Outputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class ResolveCall extends ethereum.Call { - get inputs(): ResolveCall__Inputs { - return new ResolveCall__Inputs(this); - } - - get outputs(): ResolveCall__Outputs { - return new ResolveCall__Outputs(this); - } -} - -export class ResolveCall__Inputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class ResolveCall__Outputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class SetNextElectionSettingsCall extends ethereum.Call { - get inputs(): SetNextElectionSettingsCall__Inputs { - return new SetNextElectionSettingsCall__Inputs(this); - } - - get outputs(): SetNextElectionSettingsCall__Outputs { - return new SetNextElectionSettingsCall__Outputs(this); - } -} - -export class SetNextElectionSettingsCall__Inputs { - _call: SetNextElectionSettingsCall; - - constructor(call: SetNextElectionSettingsCall) { - this._call = call; - } - - get epochSeatCount(): i32 { - return this._call.inputValues[0].value.toI32(); - } - - get minimumActiveMembers(): i32 { - return this._call.inputValues[1].value.toI32(); - } - - get epochDuration(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get nominationPeriodDuration(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get votingPeriodDuration(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get maxDateAdjustmentTolerance(): BigInt { - return this._call.inputValues[5].value.toBigInt(); - } -} - -export class SetNextElectionSettingsCall__Outputs { - _call: SetNextElectionSettingsCall; - - constructor(call: SetNextElectionSettingsCall) { - this._call = call; - } -} - -export class TweakEpochScheduleCall extends ethereum.Call { - get inputs(): TweakEpochScheduleCall__Inputs { - return new TweakEpochScheduleCall__Inputs(this); - } - - get outputs(): TweakEpochScheduleCall__Outputs { - return new TweakEpochScheduleCall__Outputs(this); - } -} - -export class TweakEpochScheduleCall__Inputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } - - get newNominationPeriodStartDate(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newVotingPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newEpochEndDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class TweakEpochScheduleCall__Outputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } -} - -export class WithdrawNominationCall extends ethereum.Call { - get inputs(): WithdrawNominationCall__Inputs { - return new WithdrawNominationCall__Inputs(this); - } - - get outputs(): WithdrawNominationCall__Outputs { - return new WithdrawNominationCall__Outputs(this); - } -} - -export class WithdrawNominationCall__Inputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawNominationCall__Outputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawVoteCall extends ethereum.Call { - get inputs(): WithdrawVoteCall__Inputs { - return new WithdrawVoteCall__Inputs(this); - } - - get outputs(): WithdrawVoteCall__Outputs { - return new WithdrawVoteCall__Outputs(this); - } -} - -export class WithdrawVoteCall__Inputs { - _call: WithdrawVoteCall; - - constructor(call: WithdrawVoteCall) { - this._call = call; - } - - get candidates(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class WithdrawVoteCall__Outputs { - _call: WithdrawVoteCall; - - constructor(call: WithdrawVoteCall) { - this._call = call; - } -} - -export class PrepareBallotWithSnapshotCall extends ethereum.Call { - get inputs(): PrepareBallotWithSnapshotCall__Inputs { - return new PrepareBallotWithSnapshotCall__Inputs(this); - } - - get outputs(): PrepareBallotWithSnapshotCall__Outputs { - return new PrepareBallotWithSnapshotCall__Outputs(this); - } -} - -export class PrepareBallotWithSnapshotCall__Inputs { - _call: PrepareBallotWithSnapshotCall; - - constructor(call: PrepareBallotWithSnapshotCall) { - this._call = call; - } - - get snapshotContract(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get voter(): Address { - return this._call.inputValues[1].value.toAddress(); - } -} - -export class PrepareBallotWithSnapshotCall__Outputs { - _call: PrepareBallotWithSnapshotCall; - - constructor(call: PrepareBallotWithSnapshotCall) { - this._call = call; - } - - get power(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class SetSnapshotContractCall extends ethereum.Call { - get inputs(): SetSnapshotContractCall__Inputs { - return new SetSnapshotContractCall__Inputs(this); - } - - get outputs(): SetSnapshotContractCall__Outputs { - return new SetSnapshotContractCall__Outputs(this); - } -} - -export class SetSnapshotContractCall__Inputs { - _call: SetSnapshotContractCall; - - constructor(call: SetSnapshotContractCall) { - this._call = call; - } - - get snapshotContract(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get enabled(): boolean { - return this._call.inputValues[1].value.toBoolean(); - } -} - -export class SetSnapshotContractCall__Outputs { - _call: SetSnapshotContractCall; - - constructor(call: SetSnapshotContractCall) { - this._call = call; - } -} - -export class TakeVotePowerSnapshotCall extends ethereum.Call { - get inputs(): TakeVotePowerSnapshotCall__Inputs { - return new TakeVotePowerSnapshotCall__Inputs(this); - } - - get outputs(): TakeVotePowerSnapshotCall__Outputs { - return new TakeVotePowerSnapshotCall__Outputs(this); - } -} - -export class TakeVotePowerSnapshotCall__Inputs { - _call: TakeVotePowerSnapshotCall; - - constructor(call: TakeVotePowerSnapshotCall) { - this._call = call; - } - - get snapshotContract(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class TakeVotePowerSnapshotCall__Outputs { - _call: TakeVotePowerSnapshotCall; - - constructor(call: TakeVotePowerSnapshotCall) { - this._call = call; - } - - get snapshotId(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class AcceptOwnershipCall extends ethereum.Call { - get inputs(): AcceptOwnershipCall__Inputs { - return new AcceptOwnershipCall__Inputs(this); - } - - get outputs(): AcceptOwnershipCall__Outputs { - return new AcceptOwnershipCall__Outputs(this); - } -} - -export class AcceptOwnershipCall__Inputs { - _call: AcceptOwnershipCall; - - constructor(call: AcceptOwnershipCall) { - this._call = call; - } -} - -export class AcceptOwnershipCall__Outputs { - _call: AcceptOwnershipCall; - - constructor(call: AcceptOwnershipCall) { - this._call = call; - } -} - -export class NominateNewOwnerCall extends ethereum.Call { - get inputs(): NominateNewOwnerCall__Inputs { - return new NominateNewOwnerCall__Inputs(this); - } - - get outputs(): NominateNewOwnerCall__Outputs { - return new NominateNewOwnerCall__Outputs(this); - } -} - -export class NominateNewOwnerCall__Inputs { - _call: NominateNewOwnerCall; - - constructor(call: NominateNewOwnerCall) { - this._call = call; - } - - get newNominatedOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class NominateNewOwnerCall__Outputs { - _call: NominateNewOwnerCall; - - constructor(call: NominateNewOwnerCall) { - this._call = call; - } -} - -export class RenounceNominationCall extends ethereum.Call { - get inputs(): RenounceNominationCall__Inputs { - return new RenounceNominationCall__Inputs(this); - } - - get outputs(): RenounceNominationCall__Outputs { - return new RenounceNominationCall__Outputs(this); - } -} - -export class RenounceNominationCall__Inputs { - _call: RenounceNominationCall; - - constructor(call: RenounceNominationCall) { - this._call = call; - } -} - -export class RenounceNominationCall__Outputs { - _call: RenounceNominationCall; - - constructor(call: RenounceNominationCall) { - this._call = call; - } -} - -export class SimulateUpgradeToCall extends ethereum.Call { - get inputs(): SimulateUpgradeToCall__Inputs { - return new SimulateUpgradeToCall__Inputs(this); - } - - get outputs(): SimulateUpgradeToCall__Outputs { - return new SimulateUpgradeToCall__Outputs(this); - } -} - -export class SimulateUpgradeToCall__Inputs { - _call: SimulateUpgradeToCall; - - constructor(call: SimulateUpgradeToCall) { - this._call = call; - } - - get newImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SimulateUpgradeToCall__Outputs { - _call: SimulateUpgradeToCall; - - constructor(call: SimulateUpgradeToCall) { - this._call = call; - } -} - -export class UpgradeToCall extends ethereum.Call { - get inputs(): UpgradeToCall__Inputs { - return new UpgradeToCall__Inputs(this); - } - - get outputs(): UpgradeToCall__Outputs { - return new UpgradeToCall__Outputs(this); - } -} - -export class UpgradeToCall__Inputs { - _call: UpgradeToCall; - - constructor(call: UpgradeToCall) { - this._call = call; - } - - get newImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class UpgradeToCall__Outputs { - _call: UpgradeToCall; - - constructor(call: UpgradeToCall) { - this._call = call; - } -} - -export class CcipReceiveCall extends ethereum.Call { - get inputs(): CcipReceiveCall__Inputs { - return new CcipReceiveCall__Inputs(this); - } - - get outputs(): CcipReceiveCall__Outputs { - return new CcipReceiveCall__Outputs(this); - } -} - -export class CcipReceiveCall__Inputs { - _call: CcipReceiveCall; - - constructor(call: CcipReceiveCall) { - this._call = call; - } - - get message(): CcipReceiveCallMessageStruct { - return changetype( - this._call.inputValues[0].value.toTuple() - ); - } -} - -export class CcipReceiveCall__Outputs { - _call: CcipReceiveCall; - - constructor(call: CcipReceiveCall) { - this._call = call; - } -} - -export class CcipReceiveCallMessageStruct extends ethereum.Tuple { - get messageId(): Bytes { - return this[0].toBytes(); - } - - get sourceChainSelector(): BigInt { - return this[1].toBigInt(); - } - - get sender(): Bytes { - return this[2].toBytes(); - } - - get data(): Bytes { - return this[3].toBytes(); - } - - get tokenAmounts(): Array { - return this[4].toTupleArray(); - } -} - -export class CcipReceiveCallMessageTokenAmountsStruct extends ethereum.Tuple { - get token(): Address { - return this[0].toAddress(); - } - - get amount(): BigInt { - return this[1].toBigInt(); - } -} diff --git a/governance/subgraph/generated/Spartan/ElectionModuleOld.ts b/governance/subgraph/generated/Spartan/ElectionModuleOld.ts deleted file mode 100644 index ff16bb4f7..000000000 --- a/governance/subgraph/generated/Spartan/ElectionModuleOld.ts +++ /dev/null @@ -1,2613 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class CandidateNominated extends ethereum.Event { - get params(): CandidateNominated__Params { - return new CandidateNominated__Params(this); - } -} - -export class CandidateNominated__Params { - _event: CandidateNominated; - - constructor(event: CandidateNominated) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberAdded extends ethereum.Event { - get params(): CouncilMemberAdded__Params { - return new CouncilMemberAdded__Params(this); - } -} - -export class CouncilMemberAdded__Params { - _event: CouncilMemberAdded; - - constructor(event: CouncilMemberAdded) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberRemoved extends ethereum.Event { - get params(): CouncilMemberRemoved__Params { - return new CouncilMemberRemoved__Params(this); - } -} - -export class CouncilMemberRemoved__Params { - _event: CouncilMemberRemoved; - - constructor(event: CouncilMemberRemoved) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMembersDismissed extends ethereum.Event { - get params(): CouncilMembersDismissed__Params { - return new CouncilMembersDismissed__Params(this); - } -} - -export class CouncilMembersDismissed__Params { - _event: CouncilMembersDismissed; - - constructor(event: CouncilMembersDismissed) { - this._event = event; - } - - get members(): Array
{ - return this._event.parameters[0].value.toAddressArray(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilTokenCreated extends ethereum.Event { - get params(): CouncilTokenCreated__Params { - return new CouncilTokenCreated__Params(this); - } -} - -export class CouncilTokenCreated__Params { - _event: CouncilTokenCreated; - - constructor(event: CouncilTokenCreated) { - this._event = event; - } - - get proxy(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get implementation(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class CouncilTokenUpgraded extends ethereum.Event { - get params(): CouncilTokenUpgraded__Params { - return new CouncilTokenUpgraded__Params(this); - } -} - -export class CouncilTokenUpgraded__Params { - _event: CouncilTokenUpgraded; - - constructor(event: CouncilTokenUpgraded) { - this._event = event; - } - - get newImplementation(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class DefaultBallotEvaluationBatchSizeChanged extends ethereum.Event { - get params(): DefaultBallotEvaluationBatchSizeChanged__Params { - return new DefaultBallotEvaluationBatchSizeChanged__Params(this); - } -} - -export class DefaultBallotEvaluationBatchSizeChanged__Params { - _event: DefaultBallotEvaluationBatchSizeChanged; - - constructor(event: DefaultBallotEvaluationBatchSizeChanged) { - this._event = event; - } - - get size(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class ElectionBatchEvaluated extends ethereum.Event { - get params(): ElectionBatchEvaluated__Params { - return new ElectionBatchEvaluated__Params(this); - } -} - -export class ElectionBatchEvaluated__Params { - _event: ElectionBatchEvaluated; - - constructor(event: ElectionBatchEvaluated) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get evaluatedBallots(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get totalBallots(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class ElectionEvaluated extends ethereum.Event { - get params(): ElectionEvaluated__Params { - return new ElectionEvaluated__Params(this); - } -} - -export class ElectionEvaluated__Params { - _event: ElectionEvaluated; - - constructor(event: ElectionEvaluated) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get totalBallots(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class ElectionModuleInitialized extends ethereum.Event { - get params(): ElectionModuleInitialized__Params { - return new ElectionModuleInitialized__Params(this); - } -} - -export class ElectionModuleInitialized__Params { - _event: ElectionModuleInitialized; - - constructor(event: ElectionModuleInitialized) { - this._event = event; - } -} - -export class EmergencyElectionStarted extends ethereum.Event { - get params(): EmergencyElectionStarted__Params { - return new EmergencyElectionStarted__Params(this); - } -} - -export class EmergencyElectionStarted__Params { - _event: EmergencyElectionStarted; - - constructor(event: EmergencyElectionStarted) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class EpochScheduleUpdated extends ethereum.Event { - get params(): EpochScheduleUpdated__Params { - return new EpochScheduleUpdated__Params(this); - } -} - -export class EpochScheduleUpdated__Params { - _event: EpochScheduleUpdated; - - constructor(event: EpochScheduleUpdated) { - this._event = event; - } - - get nominationPeriodStartDate(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class EpochStarted extends ethereum.Event { - get params(): EpochStarted__Params { - return new EpochStarted__Params(this); - } -} - -export class EpochStarted__Params { - _event: EpochStarted; - - constructor(event: EpochStarted) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class MaxDateAdjustmentToleranceChanged extends ethereum.Event { - get params(): MaxDateAdjustmentToleranceChanged__Params { - return new MaxDateAdjustmentToleranceChanged__Params(this); - } -} - -export class MaxDateAdjustmentToleranceChanged__Params { - _event: MaxDateAdjustmentToleranceChanged; - - constructor(event: MaxDateAdjustmentToleranceChanged) { - this._event = event; - } - - get tolerance(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class MinimumActiveMembersChanged extends ethereum.Event { - get params(): MinimumActiveMembersChanged__Params { - return new MinimumActiveMembersChanged__Params(this); - } -} - -export class MinimumActiveMembersChanged__Params { - _event: MinimumActiveMembersChanged; - - constructor(event: MinimumActiveMembersChanged) { - this._event = event; - } - - get minimumActiveMembers(): i32 { - return this._event.parameters[0].value.toI32(); - } -} - -export class MinimumEpochDurationsChanged extends ethereum.Event { - get params(): MinimumEpochDurationsChanged__Params { - return new MinimumEpochDurationsChanged__Params(this); - } -} - -export class MinimumEpochDurationsChanged__Params { - _event: MinimumEpochDurationsChanged; - - constructor(event: MinimumEpochDurationsChanged) { - this._event = event; - } - - get minNominationPeriodDuration(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get minVotingPeriodDuration(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get minEpochDuration(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class NextEpochSeatCountChanged extends ethereum.Event { - get params(): NextEpochSeatCountChanged__Params { - return new NextEpochSeatCountChanged__Params(this); - } -} - -export class NextEpochSeatCountChanged__Params { - _event: NextEpochSeatCountChanged; - - constructor(event: NextEpochSeatCountChanged) { - this._event = event; - } - - get seatCount(): i32 { - return this._event.parameters[0].value.toI32(); - } -} - -export class NominationWithdrawn extends ethereum.Event { - get params(): NominationWithdrawn__Params { - return new NominationWithdrawn__Params(this); - } -} - -export class NominationWithdrawn__Params { - _event: NominationWithdrawn; - - constructor(event: NominationWithdrawn) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class VoteRecorded extends ethereum.Event { - get params(): VoteRecorded__Params { - return new VoteRecorded__Params(this); - } -} - -export class VoteRecorded__Params { - _event: VoteRecorded; - - constructor(event: VoteRecorded) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get ballotId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } - - get epochIndex(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get votePower(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class VoteWithdrawn extends ethereum.Event { - get params(): VoteWithdrawn__Params { - return new VoteWithdrawn__Params(this); - } -} - -export class VoteWithdrawn__Params { - _event: VoteWithdrawn; - - constructor(event: VoteWithdrawn) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get ballotId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } - - get epochIndex(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get votePower(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class CrossChainDebtShareDeclared extends ethereum.Event { - get params(): CrossChainDebtShareDeclared__Params { - return new CrossChainDebtShareDeclared__Params(this); - } -} - -export class CrossChainDebtShareDeclared__Params { - _event: CrossChainDebtShareDeclared; - - constructor(event: CrossChainDebtShareDeclared) { - this._event = event; - } - - get user(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get debtShare(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CrossChainDebtShareMerkleRootSet extends ethereum.Event { - get params(): CrossChainDebtShareMerkleRootSet__Params { - return new CrossChainDebtShareMerkleRootSet__Params(this); - } -} - -export class CrossChainDebtShareMerkleRootSet__Params { - _event: CrossChainDebtShareMerkleRootSet; - - constructor(event: CrossChainDebtShareMerkleRootSet) { - this._event = event; - } - - get merkleRoot(): Bytes { - return this._event.parameters[0].value.toBytes(); - } - - get blocknumber(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epoch(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class DebtShareContractSet extends ethereum.Event { - get params(): DebtShareContractSet__Params { - return new DebtShareContractSet__Params(this); - } -} - -export class DebtShareContractSet__Params { - _event: DebtShareContractSet; - - constructor(event: DebtShareContractSet) { - this._event = event; - } - - get contractAddress(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class DebtShareSnapshotIdSet extends ethereum.Event { - get params(): DebtShareSnapshotIdSet__Params { - return new DebtShareSnapshotIdSet__Params(this); - } -} - -export class DebtShareSnapshotIdSet__Params { - _event: DebtShareSnapshotIdSet; - - constructor(event: DebtShareSnapshotIdSet) { - this._event = event; - } - - get snapshotId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class OwnerChanged extends ethereum.Event { - get params(): OwnerChanged__Params { - return new OwnerChanged__Params(this); - } -} - -export class OwnerChanged__Params { - _event: OwnerChanged; - - constructor(event: OwnerChanged) { - this._event = event; - } - - get oldOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get newOwner(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class OwnerNominated extends ethereum.Event { - get params(): OwnerNominated__Params { - return new OwnerNominated__Params(this); - } -} - -export class OwnerNominated__Params { - _event: OwnerNominated; - - constructor(event: OwnerNominated) { - this._event = event; - } - - get newOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class Upgraded extends ethereum.Event { - get params(): Upgraded__Params { - return new Upgraded__Params(this); - } -} - -export class Upgraded__Params { - _event: Upgraded; - - constructor(event: Upgraded) { - this._event = event; - } - - get implementation(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class ElectionModuleOld__getMinEpochDurationsResult { - value0: BigInt; - value1: BigInt; - value2: BigInt; - - constructor(value0: BigInt, value1: BigInt, value2: BigInt) { - this.value0 = value0; - this.value1 = value1; - this.value2 = value2; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - map.set("value2", ethereum.Value.fromUnsignedBigInt(this.value2)); - return map; - } - - getMinNominationPeriodDuration(): BigInt { - return this.value0; - } - - getMinVotingPeriodDuration(): BigInt { - return this.value1; - } - - getMinEpochDuration(): BigInt { - return this.value2; - } -} - -export class ElectionModuleOld extends ethereum.SmartContract { - static bind(address: Address): ElectionModuleOld { - return new ElectionModuleOld("ElectionModuleOld", address); - } - - getBallotCandidatesInEpoch( - ballotId: Bytes, - epochIndex: BigInt - ): Array
{ - let result = super.call( - "getBallotCandidatesInEpoch", - "getBallotCandidatesInEpoch(bytes32,uint256):(address[])", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toAddressArray(); - } - - try_getBallotCandidatesInEpoch( - ballotId: Bytes, - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getBallotCandidatesInEpoch", - "getBallotCandidatesInEpoch(bytes32,uint256):(address[])", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getBallotVotedAtEpoch(user: Address, epochIndex: BigInt): Bytes { - let result = super.call( - "getBallotVotedAtEpoch", - "getBallotVotedAtEpoch(address,uint256):(bytes32)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBytes(); - } - - try_getBallotVotedAtEpoch( - user: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getBallotVotedAtEpoch", - "getBallotVotedAtEpoch(address,uint256):(bytes32)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getBallotVotesInEpoch(ballotId: Bytes, epochIndex: BigInt): BigInt { - let result = super.call( - "getBallotVotesInEpoch", - "getBallotVotesInEpoch(bytes32,uint256):(uint256)", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBigInt(); - } - - try_getBallotVotesInEpoch( - ballotId: Bytes, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getBallotVotesInEpoch", - "getBallotVotesInEpoch(bytes32,uint256):(uint256)", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCandidateVotesInEpoch(candidate: Address, epochIndex: BigInt): BigInt { - let result = super.call( - "getCandidateVotesInEpoch", - "getCandidateVotesInEpoch(address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotesInEpoch( - candidate: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotesInEpoch", - "getCandidateVotesInEpoch(address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionWinnersInEpoch(epochIndex: BigInt): Array
{ - let result = super.call( - "getElectionWinnersInEpoch", - "getElectionWinnersInEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinnersInEpoch( - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinnersInEpoch", - "getElectionWinnersInEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochEndDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getEpochEndDateForIndex", - "getEpochEndDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getEpochEndDateForIndex(epochIndex: BigInt): ethereum.CallResult { - let result = super.tryCall( - "getEpochEndDateForIndex", - "getEpochEndDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getEpochStartDateForIndex", - "getEpochStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getEpochStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getEpochStartDateForIndex", - "getEpochStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNominationPeriodStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getNominationPeriodStartDateForIndex", - "getNominationPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getNominationPeriodStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getNominationPeriodStartDateForIndex", - "getNominationPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNomineesAtEpoch(epochIndex: BigInt): Array
{ - let result = super.call( - "getNomineesAtEpoch", - "getNomineesAtEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toAddressArray(); - } - - try_getNomineesAtEpoch( - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getNomineesAtEpoch", - "getNomineesAtEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotingPeriodStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getVotingPeriodStartDateForIndex", - "getVotingPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getVotingPeriodStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getVotingPeriodStartDateForIndex", - "getVotingPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVotedInEpoch(user: Address, epochIndex: BigInt): boolean { - let result = super.call( - "hasVotedInEpoch", - "hasVotedInEpoch(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBoolean(); - } - - try_hasVotedInEpoch( - user: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "hasVotedInEpoch", - "hasVotedInEpoch(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - wasNominated(candidate: Address, epochIndex: BigInt): boolean { - let result = super.call( - "wasNominated", - "wasNominated(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBoolean(); - } - - try_wasNominated( - candidate: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "wasNominated", - "wasNominated(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - calculateBallotId(candidates: Array
): Bytes { - let result = super.call( - "calculateBallotId", - "calculateBallotId(address[]):(bytes32)", - [ethereum.Value.fromAddressArray(candidates)] - ); - - return result[0].toBytes(); - } - - try_calculateBallotId( - candidates: Array
- ): ethereum.CallResult { - let result = super.tryCall( - "calculateBallotId", - "calculateBallotId(address[]):(bytes32)", - [ethereum.Value.fromAddressArray(candidates)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getBallotCandidates(ballotId: Bytes): Array
{ - let result = super.call( - "getBallotCandidates", - "getBallotCandidates(bytes32):(address[])", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - - return result[0].toAddressArray(); - } - - try_getBallotCandidates( - ballotId: Bytes - ): ethereum.CallResult> { - let result = super.tryCall( - "getBallotCandidates", - "getBallotCandidates(bytes32):(address[])", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getBallotVoted(user: Address): Bytes { - let result = super.call( - "getBallotVoted", - "getBallotVoted(address):(bytes32)", - [ethereum.Value.fromAddress(user)] - ); - - return result[0].toBytes(); - } - - try_getBallotVoted(user: Address): ethereum.CallResult { - let result = super.tryCall( - "getBallotVoted", - "getBallotVoted(address):(bytes32)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getBallotVotes(ballotId: Bytes): BigInt { - let result = super.call( - "getBallotVotes", - "getBallotVotes(bytes32):(uint256)", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - - return result[0].toBigInt(); - } - - try_getBallotVotes(ballotId: Bytes): ethereum.CallResult { - let result = super.tryCall( - "getBallotVotes", - "getBallotVotes(bytes32):(uint256)", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCandidateVotes(candidate: Address): BigInt { - let result = super.call( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotes(candidate: Address): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCouncilMembers(): Array
{ - let result = super.call( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getCouncilMembers(): ethereum.CallResult> { - let result = super.tryCall( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getCouncilToken(): Address { - let result = super.call( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getCouncilToken(): ethereum.CallResult
{ - let result = super.tryCall( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getCrossChainDebtShareMerkleRoot(): Bytes { - let result = super.call( - "getCrossChainDebtShareMerkleRoot", - "getCrossChainDebtShareMerkleRoot():(bytes32)", - [] - ); - - return result[0].toBytes(); - } - - try_getCrossChainDebtShareMerkleRoot(): ethereum.CallResult { - let result = super.tryCall( - "getCrossChainDebtShareMerkleRoot", - "getCrossChainDebtShareMerkleRoot():(bytes32)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getCrossChainDebtShareMerkleRootBlockNumber(): BigInt { - let result = super.call( - "getCrossChainDebtShareMerkleRootBlockNumber", - "getCrossChainDebtShareMerkleRootBlockNumber():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getCrossChainDebtShareMerkleRootBlockNumber(): ethereum.CallResult< - BigInt - > { - let result = super.tryCall( - "getCrossChainDebtShareMerkleRootBlockNumber", - "getCrossChainDebtShareMerkleRootBlockNumber():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCurrentPeriod(): BigInt { - let result = super.call( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getCurrentPeriod(): ethereum.CallResult { - let result = super.tryCall( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDebtShare(user: Address): BigInt { - let result = super.call("getDebtShare", "getDebtShare(address):(uint256)", [ - ethereum.Value.fromAddress(user) - ]); - - return result[0].toBigInt(); - } - - try_getDebtShare(user: Address): ethereum.CallResult { - let result = super.tryCall( - "getDebtShare", - "getDebtShare(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDebtShareContract(): Address { - let result = super.call( - "getDebtShareContract", - "getDebtShareContract():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getDebtShareContract(): ethereum.CallResult
{ - let result = super.tryCall( - "getDebtShareContract", - "getDebtShareContract():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getDebtShareSnapshotId(): BigInt { - let result = super.call( - "getDebtShareSnapshotId", - "getDebtShareSnapshotId():(uint128)", - [] - ); - - return result[0].toBigInt(); - } - - try_getDebtShareSnapshotId(): ethereum.CallResult { - let result = super.tryCall( - "getDebtShareSnapshotId", - "getDebtShareSnapshotId():(uint128)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDeclaredCrossChainDebtShare(user: Address): BigInt { - let result = super.call( - "getDeclaredCrossChainDebtShare", - "getDeclaredCrossChainDebtShare(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - - return result[0].toBigInt(); - } - - try_getDeclaredCrossChainDebtShare( - user: Address - ): ethereum.CallResult { - let result = super.tryCall( - "getDeclaredCrossChainDebtShare", - "getDeclaredCrossChainDebtShare(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDefaultBallotEvaluationBatchSize(): BigInt { - let result = super.call( - "getDefaultBallotEvaluationBatchSize", - "getDefaultBallotEvaluationBatchSize():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getDefaultBallotEvaluationBatchSize(): ethereum.CallResult { - let result = super.tryCall( - "getDefaultBallotEvaluationBatchSize", - "getDefaultBallotEvaluationBatchSize():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionWinners(): Array
{ - let result = super.call( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinners(): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochEndDate(): BigInt { - let result = super.call( - "getEpochEndDate", - "getEpochEndDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getEpochEndDate(): ethereum.CallResult { - let result = super.tryCall( - "getEpochEndDate", - "getEpochEndDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochIndex(): BigInt { - let result = super.call("getEpochIndex", "getEpochIndex():(uint256)", []); - - return result[0].toBigInt(); - } - - try_getEpochIndex(): ethereum.CallResult { - let result = super.tryCall( - "getEpochIndex", - "getEpochIndex():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochStartDate(): BigInt { - let result = super.call( - "getEpochStartDate", - "getEpochStartDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getEpochStartDate(): ethereum.CallResult { - let result = super.tryCall( - "getEpochStartDate", - "getEpochStartDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getMaxDateAdjustmenTolerance(): BigInt { - let result = super.call( - "getMaxDateAdjustmenTolerance", - "getMaxDateAdjustmenTolerance():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getMaxDateAdjustmenTolerance(): ethereum.CallResult { - let result = super.tryCall( - "getMaxDateAdjustmenTolerance", - "getMaxDateAdjustmenTolerance():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getMinEpochDurations(): ElectionModuleOld__getMinEpochDurationsResult { - let result = super.call( - "getMinEpochDurations", - "getMinEpochDurations():(uint64,uint64,uint64)", - [] - ); - - return new ElectionModuleOld__getMinEpochDurationsResult( - result[0].toBigInt(), - result[1].toBigInt(), - result[2].toBigInt() - ); - } - - try_getMinEpochDurations(): ethereum.CallResult< - ElectionModuleOld__getMinEpochDurationsResult - > { - let result = super.tryCall( - "getMinEpochDurations", - "getMinEpochDurations():(uint64,uint64,uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new ElectionModuleOld__getMinEpochDurationsResult( - value[0].toBigInt(), - value[1].toBigInt(), - value[2].toBigInt() - ) - ); - } - - getMinimumActiveMembers(): i32 { - let result = super.call( - "getMinimumActiveMembers", - "getMinimumActiveMembers():(uint8)", - [] - ); - - return result[0].toI32(); - } - - try_getMinimumActiveMembers(): ethereum.CallResult { - let result = super.tryCall( - "getMinimumActiveMembers", - "getMinimumActiveMembers():(uint8)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toI32()); - } - - getNextEpochSeatCount(): i32 { - let result = super.call( - "getNextEpochSeatCount", - "getNextEpochSeatCount():(uint8)", - [] - ); - - return result[0].toI32(); - } - - try_getNextEpochSeatCount(): ethereum.CallResult { - let result = super.tryCall( - "getNextEpochSeatCount", - "getNextEpochSeatCount():(uint8)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toI32()); - } - - getNominationPeriodStartDate(): BigInt { - let result = super.call( - "getNominationPeriodStartDate", - "getNominationPeriodStartDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getNominationPeriodStartDate(): ethereum.CallResult { - let result = super.tryCall( - "getNominationPeriodStartDate", - "getNominationPeriodStartDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNominees(): Array
{ - let result = super.call("getNominees", "getNominees():(address[])", []); - - return result[0].toAddressArray(); - } - - try_getNominees(): ethereum.CallResult> { - let result = super.tryCall("getNominees", "getNominees():(address[])", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotePower(user: Address): BigInt { - let result = super.call("getVotePower", "getVotePower(address):(uint256)", [ - ethereum.Value.fromAddress(user) - ]); - - return result[0].toBigInt(); - } - - try_getVotePower(user: Address): ethereum.CallResult { - let result = super.tryCall( - "getVotePower", - "getVotePower(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getVotingPeriodStartDate(): BigInt { - let result = super.call( - "getVotingPeriodStartDate", - "getVotingPeriodStartDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getVotingPeriodStartDate(): ethereum.CallResult { - let result = super.tryCall( - "getVotingPeriodStartDate", - "getVotingPeriodStartDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVoted(user: Address): boolean { - let result = super.call("hasVoted", "hasVoted(address):(bool)", [ - ethereum.Value.fromAddress(user) - ]); - - return result[0].toBoolean(); - } - - try_hasVoted(user: Address): ethereum.CallResult { - let result = super.tryCall("hasVoted", "hasVoted(address):(bool)", [ - ethereum.Value.fromAddress(user) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionEvaluated(): boolean { - let result = super.call( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionEvaluated(): ethereum.CallResult { - let result = super.tryCall( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionModuleInitialized(): boolean { - let result = super.call( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionModuleInitialized(): ethereum.CallResult { - let result = super.tryCall( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isNominated(candidate: Address): boolean { - let result = super.call("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - - return result[0].toBoolean(); - } - - try_isNominated(candidate: Address): ethereum.CallResult { - let result = super.tryCall("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isOwnerModuleInitialized(): boolean { - let result = super.call( - "isOwnerModuleInitialized", - "isOwnerModuleInitialized():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isOwnerModuleInitialized(): ethereum.CallResult { - let result = super.tryCall( - "isOwnerModuleInitialized", - "isOwnerModuleInitialized():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - nominatedOwner(): Address { - let result = super.call("nominatedOwner", "nominatedOwner():(address)", []); - - return result[0].toAddress(); - } - - try_nominatedOwner(): ethereum.CallResult
{ - let result = super.tryCall( - "nominatedOwner", - "nominatedOwner():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - owner(): Address { - let result = super.call("owner", "owner():(address)", []); - - return result[0].toAddress(); - } - - try_owner(): ethereum.CallResult
{ - let result = super.tryCall("owner", "owner():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getImplementation(): Address { - let result = super.call( - "getImplementation", - "getImplementation():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getImplementation(): ethereum.CallResult
{ - let result = super.tryCall( - "getImplementation", - "getImplementation():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } -} - -export class CastCall extends ethereum.Call { - get inputs(): CastCall__Inputs { - return new CastCall__Inputs(this); - } - - get outputs(): CastCall__Outputs { - return new CastCall__Outputs(this); - } -} - -export class CastCall__Inputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } - - get candidates(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class CastCall__Outputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } -} - -export class DeclareAndCastCall extends ethereum.Call { - get inputs(): DeclareAndCastCall__Inputs { - return new DeclareAndCastCall__Inputs(this); - } - - get outputs(): DeclareAndCastCall__Outputs { - return new DeclareAndCastCall__Outputs(this); - } -} - -export class DeclareAndCastCall__Inputs { - _call: DeclareAndCastCall; - - constructor(call: DeclareAndCastCall) { - this._call = call; - } - - get debtShare(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get merkleProof(): Array { - return this._call.inputValues[1].value.toBytesArray(); - } - - get candidates(): Array
{ - return this._call.inputValues[2].value.toAddressArray(); - } -} - -export class DeclareAndCastCall__Outputs { - _call: DeclareAndCastCall; - - constructor(call: DeclareAndCastCall) { - this._call = call; - } -} - -export class DeclareCrossChainDebtShareCall extends ethereum.Call { - get inputs(): DeclareCrossChainDebtShareCall__Inputs { - return new DeclareCrossChainDebtShareCall__Inputs(this); - } - - get outputs(): DeclareCrossChainDebtShareCall__Outputs { - return new DeclareCrossChainDebtShareCall__Outputs(this); - } -} - -export class DeclareCrossChainDebtShareCall__Inputs { - _call: DeclareCrossChainDebtShareCall; - - constructor(call: DeclareCrossChainDebtShareCall) { - this._call = call; - } - - get user(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get debtShare(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get merkleProof(): Array { - return this._call.inputValues[2].value.toBytesArray(); - } -} - -export class DeclareCrossChainDebtShareCall__Outputs { - _call: DeclareCrossChainDebtShareCall; - - constructor(call: DeclareCrossChainDebtShareCall) { - this._call = call; - } -} - -export class DismissMembersCall extends ethereum.Call { - get inputs(): DismissMembersCall__Inputs { - return new DismissMembersCall__Inputs(this); - } - - get outputs(): DismissMembersCall__Outputs { - return new DismissMembersCall__Outputs(this); - } -} - -export class DismissMembersCall__Inputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } - - get membersToDismiss(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class DismissMembersCall__Outputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } -} - -export class EvaluateCall extends ethereum.Call { - get inputs(): EvaluateCall__Inputs { - return new EvaluateCall__Inputs(this); - } - - get outputs(): EvaluateCall__Outputs { - return new EvaluateCall__Outputs(this); - } -} - -export class EvaluateCall__Inputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } - - get numBallots(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class EvaluateCall__Outputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } -} - -export class InitializeElectionModuleCall extends ethereum.Call { - get inputs(): InitializeElectionModuleCall__Inputs { - return new InitializeElectionModuleCall__Inputs(this); - } - - get outputs(): InitializeElectionModuleCall__Outputs { - return new InitializeElectionModuleCall__Outputs(this); - } -} - -export class InitializeElectionModuleCall__Inputs { - _call: InitializeElectionModuleCall; - - constructor(call: InitializeElectionModuleCall) { - this._call = call; - } - - get councilTokenName(): string { - return this._call.inputValues[0].value.toString(); - } - - get councilTokenSymbol(): string { - return this._call.inputValues[1].value.toString(); - } - - get firstCouncil(): Array
{ - return this._call.inputValues[2].value.toAddressArray(); - } - - get minimumActiveMembers(): i32 { - return this._call.inputValues[3].value.toI32(); - } - - get nominationPeriodStartDate(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._call.inputValues[5].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._call.inputValues[6].value.toBigInt(); - } - - get debtShareContract(): Address { - return this._call.inputValues[7].value.toAddress(); - } -} - -export class InitializeElectionModuleCall__Outputs { - _call: InitializeElectionModuleCall; - - constructor(call: InitializeElectionModuleCall) { - this._call = call; - } -} - -export class ModifyEpochScheduleCall extends ethereum.Call { - get inputs(): ModifyEpochScheduleCall__Inputs { - return new ModifyEpochScheduleCall__Inputs(this); - } - - get outputs(): ModifyEpochScheduleCall__Outputs { - return new ModifyEpochScheduleCall__Outputs(this); - } -} - -export class ModifyEpochScheduleCall__Inputs { - _call: ModifyEpochScheduleCall; - - constructor(call: ModifyEpochScheduleCall) { - this._call = call; - } - - get newNominationPeriodStartDate(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newVotingPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newEpochEndDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class ModifyEpochScheduleCall__Outputs { - _call: ModifyEpochScheduleCall; - - constructor(call: ModifyEpochScheduleCall) { - this._call = call; - } -} - -export class NominateCall extends ethereum.Call { - get inputs(): NominateCall__Inputs { - return new NominateCall__Inputs(this); - } - - get outputs(): NominateCall__Outputs { - return new NominateCall__Outputs(this); - } -} - -export class NominateCall__Inputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class NominateCall__Outputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class ResolveCall extends ethereum.Call { - get inputs(): ResolveCall__Inputs { - return new ResolveCall__Inputs(this); - } - - get outputs(): ResolveCall__Outputs { - return new ResolveCall__Outputs(this); - } -} - -export class ResolveCall__Inputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class ResolveCall__Outputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class SetCrossChainDebtShareMerkleRootCall extends ethereum.Call { - get inputs(): SetCrossChainDebtShareMerkleRootCall__Inputs { - return new SetCrossChainDebtShareMerkleRootCall__Inputs(this); - } - - get outputs(): SetCrossChainDebtShareMerkleRootCall__Outputs { - return new SetCrossChainDebtShareMerkleRootCall__Outputs(this); - } -} - -export class SetCrossChainDebtShareMerkleRootCall__Inputs { - _call: SetCrossChainDebtShareMerkleRootCall; - - constructor(call: SetCrossChainDebtShareMerkleRootCall) { - this._call = call; - } - - get merkleRoot(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get blocknumber(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class SetCrossChainDebtShareMerkleRootCall__Outputs { - _call: SetCrossChainDebtShareMerkleRootCall; - - constructor(call: SetCrossChainDebtShareMerkleRootCall) { - this._call = call; - } -} - -export class SetDebtShareContractCall extends ethereum.Call { - get inputs(): SetDebtShareContractCall__Inputs { - return new SetDebtShareContractCall__Inputs(this); - } - - get outputs(): SetDebtShareContractCall__Outputs { - return new SetDebtShareContractCall__Outputs(this); - } -} - -export class SetDebtShareContractCall__Inputs { - _call: SetDebtShareContractCall; - - constructor(call: SetDebtShareContractCall) { - this._call = call; - } - - get debtShareContract(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SetDebtShareContractCall__Outputs { - _call: SetDebtShareContractCall; - - constructor(call: SetDebtShareContractCall) { - this._call = call; - } -} - -export class SetDebtShareSnapshotIdCall extends ethereum.Call { - get inputs(): SetDebtShareSnapshotIdCall__Inputs { - return new SetDebtShareSnapshotIdCall__Inputs(this); - } - - get outputs(): SetDebtShareSnapshotIdCall__Outputs { - return new SetDebtShareSnapshotIdCall__Outputs(this); - } -} - -export class SetDebtShareSnapshotIdCall__Inputs { - _call: SetDebtShareSnapshotIdCall; - - constructor(call: SetDebtShareSnapshotIdCall) { - this._call = call; - } - - get snapshotId(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetDebtShareSnapshotIdCall__Outputs { - _call: SetDebtShareSnapshotIdCall; - - constructor(call: SetDebtShareSnapshotIdCall) { - this._call = call; - } -} - -export class SetDefaultBallotEvaluationBatchSizeCall extends ethereum.Call { - get inputs(): SetDefaultBallotEvaluationBatchSizeCall__Inputs { - return new SetDefaultBallotEvaluationBatchSizeCall__Inputs(this); - } - - get outputs(): SetDefaultBallotEvaluationBatchSizeCall__Outputs { - return new SetDefaultBallotEvaluationBatchSizeCall__Outputs(this); - } -} - -export class SetDefaultBallotEvaluationBatchSizeCall__Inputs { - _call: SetDefaultBallotEvaluationBatchSizeCall; - - constructor(call: SetDefaultBallotEvaluationBatchSizeCall) { - this._call = call; - } - - get newDefaultBallotEvaluationBatchSize(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetDefaultBallotEvaluationBatchSizeCall__Outputs { - _call: SetDefaultBallotEvaluationBatchSizeCall; - - constructor(call: SetDefaultBallotEvaluationBatchSizeCall) { - this._call = call; - } -} - -export class SetMaxDateAdjustmentToleranceCall extends ethereum.Call { - get inputs(): SetMaxDateAdjustmentToleranceCall__Inputs { - return new SetMaxDateAdjustmentToleranceCall__Inputs(this); - } - - get outputs(): SetMaxDateAdjustmentToleranceCall__Outputs { - return new SetMaxDateAdjustmentToleranceCall__Outputs(this); - } -} - -export class SetMaxDateAdjustmentToleranceCall__Inputs { - _call: SetMaxDateAdjustmentToleranceCall; - - constructor(call: SetMaxDateAdjustmentToleranceCall) { - this._call = call; - } - - get newMaxDateAdjustmentTolerance(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetMaxDateAdjustmentToleranceCall__Outputs { - _call: SetMaxDateAdjustmentToleranceCall; - - constructor(call: SetMaxDateAdjustmentToleranceCall) { - this._call = call; - } -} - -export class SetMinEpochDurationsCall extends ethereum.Call { - get inputs(): SetMinEpochDurationsCall__Inputs { - return new SetMinEpochDurationsCall__Inputs(this); - } - - get outputs(): SetMinEpochDurationsCall__Outputs { - return new SetMinEpochDurationsCall__Outputs(this); - } -} - -export class SetMinEpochDurationsCall__Inputs { - _call: SetMinEpochDurationsCall; - - constructor(call: SetMinEpochDurationsCall) { - this._call = call; - } - - get newMinNominationPeriodDuration(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newMinVotingPeriodDuration(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newMinEpochDuration(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class SetMinEpochDurationsCall__Outputs { - _call: SetMinEpochDurationsCall; - - constructor(call: SetMinEpochDurationsCall) { - this._call = call; - } -} - -export class SetMinimumActiveMembersCall extends ethereum.Call { - get inputs(): SetMinimumActiveMembersCall__Inputs { - return new SetMinimumActiveMembersCall__Inputs(this); - } - - get outputs(): SetMinimumActiveMembersCall__Outputs { - return new SetMinimumActiveMembersCall__Outputs(this); - } -} - -export class SetMinimumActiveMembersCall__Inputs { - _call: SetMinimumActiveMembersCall; - - constructor(call: SetMinimumActiveMembersCall) { - this._call = call; - } - - get newMinimumActiveMembers(): i32 { - return this._call.inputValues[0].value.toI32(); - } -} - -export class SetMinimumActiveMembersCall__Outputs { - _call: SetMinimumActiveMembersCall; - - constructor(call: SetMinimumActiveMembersCall) { - this._call = call; - } -} - -export class SetNextEpochSeatCountCall extends ethereum.Call { - get inputs(): SetNextEpochSeatCountCall__Inputs { - return new SetNextEpochSeatCountCall__Inputs(this); - } - - get outputs(): SetNextEpochSeatCountCall__Outputs { - return new SetNextEpochSeatCountCall__Outputs(this); - } -} - -export class SetNextEpochSeatCountCall__Inputs { - _call: SetNextEpochSeatCountCall; - - constructor(call: SetNextEpochSeatCountCall) { - this._call = call; - } - - get newSeatCount(): i32 { - return this._call.inputValues[0].value.toI32(); - } -} - -export class SetNextEpochSeatCountCall__Outputs { - _call: SetNextEpochSeatCountCall; - - constructor(call: SetNextEpochSeatCountCall) { - this._call = call; - } -} - -export class TweakEpochScheduleCall extends ethereum.Call { - get inputs(): TweakEpochScheduleCall__Inputs { - return new TweakEpochScheduleCall__Inputs(this); - } - - get outputs(): TweakEpochScheduleCall__Outputs { - return new TweakEpochScheduleCall__Outputs(this); - } -} - -export class TweakEpochScheduleCall__Inputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } - - get newNominationPeriodStartDate(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newVotingPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newEpochEndDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class TweakEpochScheduleCall__Outputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } -} - -export class UpgradeCouncilTokenCall extends ethereum.Call { - get inputs(): UpgradeCouncilTokenCall__Inputs { - return new UpgradeCouncilTokenCall__Inputs(this); - } - - get outputs(): UpgradeCouncilTokenCall__Outputs { - return new UpgradeCouncilTokenCall__Outputs(this); - } -} - -export class UpgradeCouncilTokenCall__Inputs { - _call: UpgradeCouncilTokenCall; - - constructor(call: UpgradeCouncilTokenCall) { - this._call = call; - } - - get newCouncilTokenImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class UpgradeCouncilTokenCall__Outputs { - _call: UpgradeCouncilTokenCall; - - constructor(call: UpgradeCouncilTokenCall) { - this._call = call; - } -} - -export class WithdrawNominationCall extends ethereum.Call { - get inputs(): WithdrawNominationCall__Inputs { - return new WithdrawNominationCall__Inputs(this); - } - - get outputs(): WithdrawNominationCall__Outputs { - return new WithdrawNominationCall__Outputs(this); - } -} - -export class WithdrawNominationCall__Inputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawNominationCall__Outputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawVoteCall extends ethereum.Call { - get inputs(): WithdrawVoteCall__Inputs { - return new WithdrawVoteCall__Inputs(this); - } - - get outputs(): WithdrawVoteCall__Outputs { - return new WithdrawVoteCall__Outputs(this); - } -} - -export class WithdrawVoteCall__Inputs { - _call: WithdrawVoteCall; - - constructor(call: WithdrawVoteCall) { - this._call = call; - } -} - -export class WithdrawVoteCall__Outputs { - _call: WithdrawVoteCall; - - constructor(call: WithdrawVoteCall) { - this._call = call; - } -} - -export class AcceptOwnershipCall extends ethereum.Call { - get inputs(): AcceptOwnershipCall__Inputs { - return new AcceptOwnershipCall__Inputs(this); - } - - get outputs(): AcceptOwnershipCall__Outputs { - return new AcceptOwnershipCall__Outputs(this); - } -} - -export class AcceptOwnershipCall__Inputs { - _call: AcceptOwnershipCall; - - constructor(call: AcceptOwnershipCall) { - this._call = call; - } -} - -export class AcceptOwnershipCall__Outputs { - _call: AcceptOwnershipCall; - - constructor(call: AcceptOwnershipCall) { - this._call = call; - } -} - -export class InitializeOwnerModuleCall extends ethereum.Call { - get inputs(): InitializeOwnerModuleCall__Inputs { - return new InitializeOwnerModuleCall__Inputs(this); - } - - get outputs(): InitializeOwnerModuleCall__Outputs { - return new InitializeOwnerModuleCall__Outputs(this); - } -} - -export class InitializeOwnerModuleCall__Inputs { - _call: InitializeOwnerModuleCall; - - constructor(call: InitializeOwnerModuleCall) { - this._call = call; - } - - get initialOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class InitializeOwnerModuleCall__Outputs { - _call: InitializeOwnerModuleCall; - - constructor(call: InitializeOwnerModuleCall) { - this._call = call; - } -} - -export class NominateNewOwnerCall extends ethereum.Call { - get inputs(): NominateNewOwnerCall__Inputs { - return new NominateNewOwnerCall__Inputs(this); - } - - get outputs(): NominateNewOwnerCall__Outputs { - return new NominateNewOwnerCall__Outputs(this); - } -} - -export class NominateNewOwnerCall__Inputs { - _call: NominateNewOwnerCall; - - constructor(call: NominateNewOwnerCall) { - this._call = call; - } - - get newNominatedOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class NominateNewOwnerCall__Outputs { - _call: NominateNewOwnerCall; - - constructor(call: NominateNewOwnerCall) { - this._call = call; - } -} - -export class RenounceNominationCall extends ethereum.Call { - get inputs(): RenounceNominationCall__Inputs { - return new RenounceNominationCall__Inputs(this); - } - - get outputs(): RenounceNominationCall__Outputs { - return new RenounceNominationCall__Outputs(this); - } -} - -export class RenounceNominationCall__Inputs { - _call: RenounceNominationCall; - - constructor(call: RenounceNominationCall) { - this._call = call; - } -} - -export class RenounceNominationCall__Outputs { - _call: RenounceNominationCall; - - constructor(call: RenounceNominationCall) { - this._call = call; - } -} - -export class SimulateUpgradeToCall extends ethereum.Call { - get inputs(): SimulateUpgradeToCall__Inputs { - return new SimulateUpgradeToCall__Inputs(this); - } - - get outputs(): SimulateUpgradeToCall__Outputs { - return new SimulateUpgradeToCall__Outputs(this); - } -} - -export class SimulateUpgradeToCall__Inputs { - _call: SimulateUpgradeToCall; - - constructor(call: SimulateUpgradeToCall) { - this._call = call; - } - - get newImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SimulateUpgradeToCall__Outputs { - _call: SimulateUpgradeToCall; - - constructor(call: SimulateUpgradeToCall) { - this._call = call; - } -} - -export class UpgradeToCall extends ethereum.Call { - get inputs(): UpgradeToCall__Inputs { - return new UpgradeToCall__Inputs(this); - } - - get outputs(): UpgradeToCall__Outputs { - return new UpgradeToCall__Outputs(this); - } -} - -export class UpgradeToCall__Inputs { - _call: UpgradeToCall; - - constructor(call: UpgradeToCall) { - this._call = call; - } - - get newImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class UpgradeToCall__Outputs { - _call: UpgradeToCall; - - constructor(call: UpgradeToCall) { - this._call = call; - } -} diff --git a/governance/subgraph/generated/Treasury-Old/ElectionModuleOld.ts b/governance/subgraph/generated/Treasury-Old/ElectionModuleOld.ts deleted file mode 100644 index ff16bb4f7..000000000 --- a/governance/subgraph/generated/Treasury-Old/ElectionModuleOld.ts +++ /dev/null @@ -1,2613 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class CandidateNominated extends ethereum.Event { - get params(): CandidateNominated__Params { - return new CandidateNominated__Params(this); - } -} - -export class CandidateNominated__Params { - _event: CandidateNominated; - - constructor(event: CandidateNominated) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberAdded extends ethereum.Event { - get params(): CouncilMemberAdded__Params { - return new CouncilMemberAdded__Params(this); - } -} - -export class CouncilMemberAdded__Params { - _event: CouncilMemberAdded; - - constructor(event: CouncilMemberAdded) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberRemoved extends ethereum.Event { - get params(): CouncilMemberRemoved__Params { - return new CouncilMemberRemoved__Params(this); - } -} - -export class CouncilMemberRemoved__Params { - _event: CouncilMemberRemoved; - - constructor(event: CouncilMemberRemoved) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMembersDismissed extends ethereum.Event { - get params(): CouncilMembersDismissed__Params { - return new CouncilMembersDismissed__Params(this); - } -} - -export class CouncilMembersDismissed__Params { - _event: CouncilMembersDismissed; - - constructor(event: CouncilMembersDismissed) { - this._event = event; - } - - get members(): Array
{ - return this._event.parameters[0].value.toAddressArray(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilTokenCreated extends ethereum.Event { - get params(): CouncilTokenCreated__Params { - return new CouncilTokenCreated__Params(this); - } -} - -export class CouncilTokenCreated__Params { - _event: CouncilTokenCreated; - - constructor(event: CouncilTokenCreated) { - this._event = event; - } - - get proxy(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get implementation(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class CouncilTokenUpgraded extends ethereum.Event { - get params(): CouncilTokenUpgraded__Params { - return new CouncilTokenUpgraded__Params(this); - } -} - -export class CouncilTokenUpgraded__Params { - _event: CouncilTokenUpgraded; - - constructor(event: CouncilTokenUpgraded) { - this._event = event; - } - - get newImplementation(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class DefaultBallotEvaluationBatchSizeChanged extends ethereum.Event { - get params(): DefaultBallotEvaluationBatchSizeChanged__Params { - return new DefaultBallotEvaluationBatchSizeChanged__Params(this); - } -} - -export class DefaultBallotEvaluationBatchSizeChanged__Params { - _event: DefaultBallotEvaluationBatchSizeChanged; - - constructor(event: DefaultBallotEvaluationBatchSizeChanged) { - this._event = event; - } - - get size(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class ElectionBatchEvaluated extends ethereum.Event { - get params(): ElectionBatchEvaluated__Params { - return new ElectionBatchEvaluated__Params(this); - } -} - -export class ElectionBatchEvaluated__Params { - _event: ElectionBatchEvaluated; - - constructor(event: ElectionBatchEvaluated) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get evaluatedBallots(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get totalBallots(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class ElectionEvaluated extends ethereum.Event { - get params(): ElectionEvaluated__Params { - return new ElectionEvaluated__Params(this); - } -} - -export class ElectionEvaluated__Params { - _event: ElectionEvaluated; - - constructor(event: ElectionEvaluated) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get totalBallots(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class ElectionModuleInitialized extends ethereum.Event { - get params(): ElectionModuleInitialized__Params { - return new ElectionModuleInitialized__Params(this); - } -} - -export class ElectionModuleInitialized__Params { - _event: ElectionModuleInitialized; - - constructor(event: ElectionModuleInitialized) { - this._event = event; - } -} - -export class EmergencyElectionStarted extends ethereum.Event { - get params(): EmergencyElectionStarted__Params { - return new EmergencyElectionStarted__Params(this); - } -} - -export class EmergencyElectionStarted__Params { - _event: EmergencyElectionStarted; - - constructor(event: EmergencyElectionStarted) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class EpochScheduleUpdated extends ethereum.Event { - get params(): EpochScheduleUpdated__Params { - return new EpochScheduleUpdated__Params(this); - } -} - -export class EpochScheduleUpdated__Params { - _event: EpochScheduleUpdated; - - constructor(event: EpochScheduleUpdated) { - this._event = event; - } - - get nominationPeriodStartDate(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class EpochStarted extends ethereum.Event { - get params(): EpochStarted__Params { - return new EpochStarted__Params(this); - } -} - -export class EpochStarted__Params { - _event: EpochStarted; - - constructor(event: EpochStarted) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class MaxDateAdjustmentToleranceChanged extends ethereum.Event { - get params(): MaxDateAdjustmentToleranceChanged__Params { - return new MaxDateAdjustmentToleranceChanged__Params(this); - } -} - -export class MaxDateAdjustmentToleranceChanged__Params { - _event: MaxDateAdjustmentToleranceChanged; - - constructor(event: MaxDateAdjustmentToleranceChanged) { - this._event = event; - } - - get tolerance(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class MinimumActiveMembersChanged extends ethereum.Event { - get params(): MinimumActiveMembersChanged__Params { - return new MinimumActiveMembersChanged__Params(this); - } -} - -export class MinimumActiveMembersChanged__Params { - _event: MinimumActiveMembersChanged; - - constructor(event: MinimumActiveMembersChanged) { - this._event = event; - } - - get minimumActiveMembers(): i32 { - return this._event.parameters[0].value.toI32(); - } -} - -export class MinimumEpochDurationsChanged extends ethereum.Event { - get params(): MinimumEpochDurationsChanged__Params { - return new MinimumEpochDurationsChanged__Params(this); - } -} - -export class MinimumEpochDurationsChanged__Params { - _event: MinimumEpochDurationsChanged; - - constructor(event: MinimumEpochDurationsChanged) { - this._event = event; - } - - get minNominationPeriodDuration(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get minVotingPeriodDuration(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get minEpochDuration(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class NextEpochSeatCountChanged extends ethereum.Event { - get params(): NextEpochSeatCountChanged__Params { - return new NextEpochSeatCountChanged__Params(this); - } -} - -export class NextEpochSeatCountChanged__Params { - _event: NextEpochSeatCountChanged; - - constructor(event: NextEpochSeatCountChanged) { - this._event = event; - } - - get seatCount(): i32 { - return this._event.parameters[0].value.toI32(); - } -} - -export class NominationWithdrawn extends ethereum.Event { - get params(): NominationWithdrawn__Params { - return new NominationWithdrawn__Params(this); - } -} - -export class NominationWithdrawn__Params { - _event: NominationWithdrawn; - - constructor(event: NominationWithdrawn) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class VoteRecorded extends ethereum.Event { - get params(): VoteRecorded__Params { - return new VoteRecorded__Params(this); - } -} - -export class VoteRecorded__Params { - _event: VoteRecorded; - - constructor(event: VoteRecorded) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get ballotId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } - - get epochIndex(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get votePower(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class VoteWithdrawn extends ethereum.Event { - get params(): VoteWithdrawn__Params { - return new VoteWithdrawn__Params(this); - } -} - -export class VoteWithdrawn__Params { - _event: VoteWithdrawn; - - constructor(event: VoteWithdrawn) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get ballotId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } - - get epochIndex(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get votePower(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class CrossChainDebtShareDeclared extends ethereum.Event { - get params(): CrossChainDebtShareDeclared__Params { - return new CrossChainDebtShareDeclared__Params(this); - } -} - -export class CrossChainDebtShareDeclared__Params { - _event: CrossChainDebtShareDeclared; - - constructor(event: CrossChainDebtShareDeclared) { - this._event = event; - } - - get user(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get debtShare(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CrossChainDebtShareMerkleRootSet extends ethereum.Event { - get params(): CrossChainDebtShareMerkleRootSet__Params { - return new CrossChainDebtShareMerkleRootSet__Params(this); - } -} - -export class CrossChainDebtShareMerkleRootSet__Params { - _event: CrossChainDebtShareMerkleRootSet; - - constructor(event: CrossChainDebtShareMerkleRootSet) { - this._event = event; - } - - get merkleRoot(): Bytes { - return this._event.parameters[0].value.toBytes(); - } - - get blocknumber(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epoch(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class DebtShareContractSet extends ethereum.Event { - get params(): DebtShareContractSet__Params { - return new DebtShareContractSet__Params(this); - } -} - -export class DebtShareContractSet__Params { - _event: DebtShareContractSet; - - constructor(event: DebtShareContractSet) { - this._event = event; - } - - get contractAddress(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class DebtShareSnapshotIdSet extends ethereum.Event { - get params(): DebtShareSnapshotIdSet__Params { - return new DebtShareSnapshotIdSet__Params(this); - } -} - -export class DebtShareSnapshotIdSet__Params { - _event: DebtShareSnapshotIdSet; - - constructor(event: DebtShareSnapshotIdSet) { - this._event = event; - } - - get snapshotId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class OwnerChanged extends ethereum.Event { - get params(): OwnerChanged__Params { - return new OwnerChanged__Params(this); - } -} - -export class OwnerChanged__Params { - _event: OwnerChanged; - - constructor(event: OwnerChanged) { - this._event = event; - } - - get oldOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get newOwner(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class OwnerNominated extends ethereum.Event { - get params(): OwnerNominated__Params { - return new OwnerNominated__Params(this); - } -} - -export class OwnerNominated__Params { - _event: OwnerNominated; - - constructor(event: OwnerNominated) { - this._event = event; - } - - get newOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class Upgraded extends ethereum.Event { - get params(): Upgraded__Params { - return new Upgraded__Params(this); - } -} - -export class Upgraded__Params { - _event: Upgraded; - - constructor(event: Upgraded) { - this._event = event; - } - - get implementation(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class ElectionModuleOld__getMinEpochDurationsResult { - value0: BigInt; - value1: BigInt; - value2: BigInt; - - constructor(value0: BigInt, value1: BigInt, value2: BigInt) { - this.value0 = value0; - this.value1 = value1; - this.value2 = value2; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - map.set("value2", ethereum.Value.fromUnsignedBigInt(this.value2)); - return map; - } - - getMinNominationPeriodDuration(): BigInt { - return this.value0; - } - - getMinVotingPeriodDuration(): BigInt { - return this.value1; - } - - getMinEpochDuration(): BigInt { - return this.value2; - } -} - -export class ElectionModuleOld extends ethereum.SmartContract { - static bind(address: Address): ElectionModuleOld { - return new ElectionModuleOld("ElectionModuleOld", address); - } - - getBallotCandidatesInEpoch( - ballotId: Bytes, - epochIndex: BigInt - ): Array
{ - let result = super.call( - "getBallotCandidatesInEpoch", - "getBallotCandidatesInEpoch(bytes32,uint256):(address[])", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toAddressArray(); - } - - try_getBallotCandidatesInEpoch( - ballotId: Bytes, - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getBallotCandidatesInEpoch", - "getBallotCandidatesInEpoch(bytes32,uint256):(address[])", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getBallotVotedAtEpoch(user: Address, epochIndex: BigInt): Bytes { - let result = super.call( - "getBallotVotedAtEpoch", - "getBallotVotedAtEpoch(address,uint256):(bytes32)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBytes(); - } - - try_getBallotVotedAtEpoch( - user: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getBallotVotedAtEpoch", - "getBallotVotedAtEpoch(address,uint256):(bytes32)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getBallotVotesInEpoch(ballotId: Bytes, epochIndex: BigInt): BigInt { - let result = super.call( - "getBallotVotesInEpoch", - "getBallotVotesInEpoch(bytes32,uint256):(uint256)", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBigInt(); - } - - try_getBallotVotesInEpoch( - ballotId: Bytes, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getBallotVotesInEpoch", - "getBallotVotesInEpoch(bytes32,uint256):(uint256)", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCandidateVotesInEpoch(candidate: Address, epochIndex: BigInt): BigInt { - let result = super.call( - "getCandidateVotesInEpoch", - "getCandidateVotesInEpoch(address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotesInEpoch( - candidate: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotesInEpoch", - "getCandidateVotesInEpoch(address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionWinnersInEpoch(epochIndex: BigInt): Array
{ - let result = super.call( - "getElectionWinnersInEpoch", - "getElectionWinnersInEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinnersInEpoch( - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinnersInEpoch", - "getElectionWinnersInEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochEndDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getEpochEndDateForIndex", - "getEpochEndDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getEpochEndDateForIndex(epochIndex: BigInt): ethereum.CallResult { - let result = super.tryCall( - "getEpochEndDateForIndex", - "getEpochEndDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getEpochStartDateForIndex", - "getEpochStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getEpochStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getEpochStartDateForIndex", - "getEpochStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNominationPeriodStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getNominationPeriodStartDateForIndex", - "getNominationPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getNominationPeriodStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getNominationPeriodStartDateForIndex", - "getNominationPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNomineesAtEpoch(epochIndex: BigInt): Array
{ - let result = super.call( - "getNomineesAtEpoch", - "getNomineesAtEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toAddressArray(); - } - - try_getNomineesAtEpoch( - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getNomineesAtEpoch", - "getNomineesAtEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotingPeriodStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getVotingPeriodStartDateForIndex", - "getVotingPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getVotingPeriodStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getVotingPeriodStartDateForIndex", - "getVotingPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVotedInEpoch(user: Address, epochIndex: BigInt): boolean { - let result = super.call( - "hasVotedInEpoch", - "hasVotedInEpoch(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBoolean(); - } - - try_hasVotedInEpoch( - user: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "hasVotedInEpoch", - "hasVotedInEpoch(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - wasNominated(candidate: Address, epochIndex: BigInt): boolean { - let result = super.call( - "wasNominated", - "wasNominated(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBoolean(); - } - - try_wasNominated( - candidate: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "wasNominated", - "wasNominated(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - calculateBallotId(candidates: Array
): Bytes { - let result = super.call( - "calculateBallotId", - "calculateBallotId(address[]):(bytes32)", - [ethereum.Value.fromAddressArray(candidates)] - ); - - return result[0].toBytes(); - } - - try_calculateBallotId( - candidates: Array
- ): ethereum.CallResult { - let result = super.tryCall( - "calculateBallotId", - "calculateBallotId(address[]):(bytes32)", - [ethereum.Value.fromAddressArray(candidates)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getBallotCandidates(ballotId: Bytes): Array
{ - let result = super.call( - "getBallotCandidates", - "getBallotCandidates(bytes32):(address[])", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - - return result[0].toAddressArray(); - } - - try_getBallotCandidates( - ballotId: Bytes - ): ethereum.CallResult> { - let result = super.tryCall( - "getBallotCandidates", - "getBallotCandidates(bytes32):(address[])", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getBallotVoted(user: Address): Bytes { - let result = super.call( - "getBallotVoted", - "getBallotVoted(address):(bytes32)", - [ethereum.Value.fromAddress(user)] - ); - - return result[0].toBytes(); - } - - try_getBallotVoted(user: Address): ethereum.CallResult { - let result = super.tryCall( - "getBallotVoted", - "getBallotVoted(address):(bytes32)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getBallotVotes(ballotId: Bytes): BigInt { - let result = super.call( - "getBallotVotes", - "getBallotVotes(bytes32):(uint256)", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - - return result[0].toBigInt(); - } - - try_getBallotVotes(ballotId: Bytes): ethereum.CallResult { - let result = super.tryCall( - "getBallotVotes", - "getBallotVotes(bytes32):(uint256)", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCandidateVotes(candidate: Address): BigInt { - let result = super.call( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotes(candidate: Address): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCouncilMembers(): Array
{ - let result = super.call( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getCouncilMembers(): ethereum.CallResult> { - let result = super.tryCall( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getCouncilToken(): Address { - let result = super.call( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getCouncilToken(): ethereum.CallResult
{ - let result = super.tryCall( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getCrossChainDebtShareMerkleRoot(): Bytes { - let result = super.call( - "getCrossChainDebtShareMerkleRoot", - "getCrossChainDebtShareMerkleRoot():(bytes32)", - [] - ); - - return result[0].toBytes(); - } - - try_getCrossChainDebtShareMerkleRoot(): ethereum.CallResult { - let result = super.tryCall( - "getCrossChainDebtShareMerkleRoot", - "getCrossChainDebtShareMerkleRoot():(bytes32)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getCrossChainDebtShareMerkleRootBlockNumber(): BigInt { - let result = super.call( - "getCrossChainDebtShareMerkleRootBlockNumber", - "getCrossChainDebtShareMerkleRootBlockNumber():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getCrossChainDebtShareMerkleRootBlockNumber(): ethereum.CallResult< - BigInt - > { - let result = super.tryCall( - "getCrossChainDebtShareMerkleRootBlockNumber", - "getCrossChainDebtShareMerkleRootBlockNumber():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCurrentPeriod(): BigInt { - let result = super.call( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getCurrentPeriod(): ethereum.CallResult { - let result = super.tryCall( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDebtShare(user: Address): BigInt { - let result = super.call("getDebtShare", "getDebtShare(address):(uint256)", [ - ethereum.Value.fromAddress(user) - ]); - - return result[0].toBigInt(); - } - - try_getDebtShare(user: Address): ethereum.CallResult { - let result = super.tryCall( - "getDebtShare", - "getDebtShare(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDebtShareContract(): Address { - let result = super.call( - "getDebtShareContract", - "getDebtShareContract():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getDebtShareContract(): ethereum.CallResult
{ - let result = super.tryCall( - "getDebtShareContract", - "getDebtShareContract():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getDebtShareSnapshotId(): BigInt { - let result = super.call( - "getDebtShareSnapshotId", - "getDebtShareSnapshotId():(uint128)", - [] - ); - - return result[0].toBigInt(); - } - - try_getDebtShareSnapshotId(): ethereum.CallResult { - let result = super.tryCall( - "getDebtShareSnapshotId", - "getDebtShareSnapshotId():(uint128)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDeclaredCrossChainDebtShare(user: Address): BigInt { - let result = super.call( - "getDeclaredCrossChainDebtShare", - "getDeclaredCrossChainDebtShare(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - - return result[0].toBigInt(); - } - - try_getDeclaredCrossChainDebtShare( - user: Address - ): ethereum.CallResult { - let result = super.tryCall( - "getDeclaredCrossChainDebtShare", - "getDeclaredCrossChainDebtShare(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDefaultBallotEvaluationBatchSize(): BigInt { - let result = super.call( - "getDefaultBallotEvaluationBatchSize", - "getDefaultBallotEvaluationBatchSize():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getDefaultBallotEvaluationBatchSize(): ethereum.CallResult { - let result = super.tryCall( - "getDefaultBallotEvaluationBatchSize", - "getDefaultBallotEvaluationBatchSize():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionWinners(): Array
{ - let result = super.call( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinners(): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochEndDate(): BigInt { - let result = super.call( - "getEpochEndDate", - "getEpochEndDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getEpochEndDate(): ethereum.CallResult { - let result = super.tryCall( - "getEpochEndDate", - "getEpochEndDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochIndex(): BigInt { - let result = super.call("getEpochIndex", "getEpochIndex():(uint256)", []); - - return result[0].toBigInt(); - } - - try_getEpochIndex(): ethereum.CallResult { - let result = super.tryCall( - "getEpochIndex", - "getEpochIndex():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochStartDate(): BigInt { - let result = super.call( - "getEpochStartDate", - "getEpochStartDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getEpochStartDate(): ethereum.CallResult { - let result = super.tryCall( - "getEpochStartDate", - "getEpochStartDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getMaxDateAdjustmenTolerance(): BigInt { - let result = super.call( - "getMaxDateAdjustmenTolerance", - "getMaxDateAdjustmenTolerance():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getMaxDateAdjustmenTolerance(): ethereum.CallResult { - let result = super.tryCall( - "getMaxDateAdjustmenTolerance", - "getMaxDateAdjustmenTolerance():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getMinEpochDurations(): ElectionModuleOld__getMinEpochDurationsResult { - let result = super.call( - "getMinEpochDurations", - "getMinEpochDurations():(uint64,uint64,uint64)", - [] - ); - - return new ElectionModuleOld__getMinEpochDurationsResult( - result[0].toBigInt(), - result[1].toBigInt(), - result[2].toBigInt() - ); - } - - try_getMinEpochDurations(): ethereum.CallResult< - ElectionModuleOld__getMinEpochDurationsResult - > { - let result = super.tryCall( - "getMinEpochDurations", - "getMinEpochDurations():(uint64,uint64,uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new ElectionModuleOld__getMinEpochDurationsResult( - value[0].toBigInt(), - value[1].toBigInt(), - value[2].toBigInt() - ) - ); - } - - getMinimumActiveMembers(): i32 { - let result = super.call( - "getMinimumActiveMembers", - "getMinimumActiveMembers():(uint8)", - [] - ); - - return result[0].toI32(); - } - - try_getMinimumActiveMembers(): ethereum.CallResult { - let result = super.tryCall( - "getMinimumActiveMembers", - "getMinimumActiveMembers():(uint8)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toI32()); - } - - getNextEpochSeatCount(): i32 { - let result = super.call( - "getNextEpochSeatCount", - "getNextEpochSeatCount():(uint8)", - [] - ); - - return result[0].toI32(); - } - - try_getNextEpochSeatCount(): ethereum.CallResult { - let result = super.tryCall( - "getNextEpochSeatCount", - "getNextEpochSeatCount():(uint8)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toI32()); - } - - getNominationPeriodStartDate(): BigInt { - let result = super.call( - "getNominationPeriodStartDate", - "getNominationPeriodStartDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getNominationPeriodStartDate(): ethereum.CallResult { - let result = super.tryCall( - "getNominationPeriodStartDate", - "getNominationPeriodStartDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNominees(): Array
{ - let result = super.call("getNominees", "getNominees():(address[])", []); - - return result[0].toAddressArray(); - } - - try_getNominees(): ethereum.CallResult> { - let result = super.tryCall("getNominees", "getNominees():(address[])", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotePower(user: Address): BigInt { - let result = super.call("getVotePower", "getVotePower(address):(uint256)", [ - ethereum.Value.fromAddress(user) - ]); - - return result[0].toBigInt(); - } - - try_getVotePower(user: Address): ethereum.CallResult { - let result = super.tryCall( - "getVotePower", - "getVotePower(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getVotingPeriodStartDate(): BigInt { - let result = super.call( - "getVotingPeriodStartDate", - "getVotingPeriodStartDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getVotingPeriodStartDate(): ethereum.CallResult { - let result = super.tryCall( - "getVotingPeriodStartDate", - "getVotingPeriodStartDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVoted(user: Address): boolean { - let result = super.call("hasVoted", "hasVoted(address):(bool)", [ - ethereum.Value.fromAddress(user) - ]); - - return result[0].toBoolean(); - } - - try_hasVoted(user: Address): ethereum.CallResult { - let result = super.tryCall("hasVoted", "hasVoted(address):(bool)", [ - ethereum.Value.fromAddress(user) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionEvaluated(): boolean { - let result = super.call( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionEvaluated(): ethereum.CallResult { - let result = super.tryCall( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionModuleInitialized(): boolean { - let result = super.call( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionModuleInitialized(): ethereum.CallResult { - let result = super.tryCall( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isNominated(candidate: Address): boolean { - let result = super.call("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - - return result[0].toBoolean(); - } - - try_isNominated(candidate: Address): ethereum.CallResult { - let result = super.tryCall("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isOwnerModuleInitialized(): boolean { - let result = super.call( - "isOwnerModuleInitialized", - "isOwnerModuleInitialized():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isOwnerModuleInitialized(): ethereum.CallResult { - let result = super.tryCall( - "isOwnerModuleInitialized", - "isOwnerModuleInitialized():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - nominatedOwner(): Address { - let result = super.call("nominatedOwner", "nominatedOwner():(address)", []); - - return result[0].toAddress(); - } - - try_nominatedOwner(): ethereum.CallResult
{ - let result = super.tryCall( - "nominatedOwner", - "nominatedOwner():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - owner(): Address { - let result = super.call("owner", "owner():(address)", []); - - return result[0].toAddress(); - } - - try_owner(): ethereum.CallResult
{ - let result = super.tryCall("owner", "owner():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getImplementation(): Address { - let result = super.call( - "getImplementation", - "getImplementation():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getImplementation(): ethereum.CallResult
{ - let result = super.tryCall( - "getImplementation", - "getImplementation():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } -} - -export class CastCall extends ethereum.Call { - get inputs(): CastCall__Inputs { - return new CastCall__Inputs(this); - } - - get outputs(): CastCall__Outputs { - return new CastCall__Outputs(this); - } -} - -export class CastCall__Inputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } - - get candidates(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class CastCall__Outputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } -} - -export class DeclareAndCastCall extends ethereum.Call { - get inputs(): DeclareAndCastCall__Inputs { - return new DeclareAndCastCall__Inputs(this); - } - - get outputs(): DeclareAndCastCall__Outputs { - return new DeclareAndCastCall__Outputs(this); - } -} - -export class DeclareAndCastCall__Inputs { - _call: DeclareAndCastCall; - - constructor(call: DeclareAndCastCall) { - this._call = call; - } - - get debtShare(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get merkleProof(): Array { - return this._call.inputValues[1].value.toBytesArray(); - } - - get candidates(): Array
{ - return this._call.inputValues[2].value.toAddressArray(); - } -} - -export class DeclareAndCastCall__Outputs { - _call: DeclareAndCastCall; - - constructor(call: DeclareAndCastCall) { - this._call = call; - } -} - -export class DeclareCrossChainDebtShareCall extends ethereum.Call { - get inputs(): DeclareCrossChainDebtShareCall__Inputs { - return new DeclareCrossChainDebtShareCall__Inputs(this); - } - - get outputs(): DeclareCrossChainDebtShareCall__Outputs { - return new DeclareCrossChainDebtShareCall__Outputs(this); - } -} - -export class DeclareCrossChainDebtShareCall__Inputs { - _call: DeclareCrossChainDebtShareCall; - - constructor(call: DeclareCrossChainDebtShareCall) { - this._call = call; - } - - get user(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get debtShare(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get merkleProof(): Array { - return this._call.inputValues[2].value.toBytesArray(); - } -} - -export class DeclareCrossChainDebtShareCall__Outputs { - _call: DeclareCrossChainDebtShareCall; - - constructor(call: DeclareCrossChainDebtShareCall) { - this._call = call; - } -} - -export class DismissMembersCall extends ethereum.Call { - get inputs(): DismissMembersCall__Inputs { - return new DismissMembersCall__Inputs(this); - } - - get outputs(): DismissMembersCall__Outputs { - return new DismissMembersCall__Outputs(this); - } -} - -export class DismissMembersCall__Inputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } - - get membersToDismiss(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class DismissMembersCall__Outputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } -} - -export class EvaluateCall extends ethereum.Call { - get inputs(): EvaluateCall__Inputs { - return new EvaluateCall__Inputs(this); - } - - get outputs(): EvaluateCall__Outputs { - return new EvaluateCall__Outputs(this); - } -} - -export class EvaluateCall__Inputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } - - get numBallots(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class EvaluateCall__Outputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } -} - -export class InitializeElectionModuleCall extends ethereum.Call { - get inputs(): InitializeElectionModuleCall__Inputs { - return new InitializeElectionModuleCall__Inputs(this); - } - - get outputs(): InitializeElectionModuleCall__Outputs { - return new InitializeElectionModuleCall__Outputs(this); - } -} - -export class InitializeElectionModuleCall__Inputs { - _call: InitializeElectionModuleCall; - - constructor(call: InitializeElectionModuleCall) { - this._call = call; - } - - get councilTokenName(): string { - return this._call.inputValues[0].value.toString(); - } - - get councilTokenSymbol(): string { - return this._call.inputValues[1].value.toString(); - } - - get firstCouncil(): Array
{ - return this._call.inputValues[2].value.toAddressArray(); - } - - get minimumActiveMembers(): i32 { - return this._call.inputValues[3].value.toI32(); - } - - get nominationPeriodStartDate(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._call.inputValues[5].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._call.inputValues[6].value.toBigInt(); - } - - get debtShareContract(): Address { - return this._call.inputValues[7].value.toAddress(); - } -} - -export class InitializeElectionModuleCall__Outputs { - _call: InitializeElectionModuleCall; - - constructor(call: InitializeElectionModuleCall) { - this._call = call; - } -} - -export class ModifyEpochScheduleCall extends ethereum.Call { - get inputs(): ModifyEpochScheduleCall__Inputs { - return new ModifyEpochScheduleCall__Inputs(this); - } - - get outputs(): ModifyEpochScheduleCall__Outputs { - return new ModifyEpochScheduleCall__Outputs(this); - } -} - -export class ModifyEpochScheduleCall__Inputs { - _call: ModifyEpochScheduleCall; - - constructor(call: ModifyEpochScheduleCall) { - this._call = call; - } - - get newNominationPeriodStartDate(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newVotingPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newEpochEndDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class ModifyEpochScheduleCall__Outputs { - _call: ModifyEpochScheduleCall; - - constructor(call: ModifyEpochScheduleCall) { - this._call = call; - } -} - -export class NominateCall extends ethereum.Call { - get inputs(): NominateCall__Inputs { - return new NominateCall__Inputs(this); - } - - get outputs(): NominateCall__Outputs { - return new NominateCall__Outputs(this); - } -} - -export class NominateCall__Inputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class NominateCall__Outputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class ResolveCall extends ethereum.Call { - get inputs(): ResolveCall__Inputs { - return new ResolveCall__Inputs(this); - } - - get outputs(): ResolveCall__Outputs { - return new ResolveCall__Outputs(this); - } -} - -export class ResolveCall__Inputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class ResolveCall__Outputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class SetCrossChainDebtShareMerkleRootCall extends ethereum.Call { - get inputs(): SetCrossChainDebtShareMerkleRootCall__Inputs { - return new SetCrossChainDebtShareMerkleRootCall__Inputs(this); - } - - get outputs(): SetCrossChainDebtShareMerkleRootCall__Outputs { - return new SetCrossChainDebtShareMerkleRootCall__Outputs(this); - } -} - -export class SetCrossChainDebtShareMerkleRootCall__Inputs { - _call: SetCrossChainDebtShareMerkleRootCall; - - constructor(call: SetCrossChainDebtShareMerkleRootCall) { - this._call = call; - } - - get merkleRoot(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get blocknumber(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class SetCrossChainDebtShareMerkleRootCall__Outputs { - _call: SetCrossChainDebtShareMerkleRootCall; - - constructor(call: SetCrossChainDebtShareMerkleRootCall) { - this._call = call; - } -} - -export class SetDebtShareContractCall extends ethereum.Call { - get inputs(): SetDebtShareContractCall__Inputs { - return new SetDebtShareContractCall__Inputs(this); - } - - get outputs(): SetDebtShareContractCall__Outputs { - return new SetDebtShareContractCall__Outputs(this); - } -} - -export class SetDebtShareContractCall__Inputs { - _call: SetDebtShareContractCall; - - constructor(call: SetDebtShareContractCall) { - this._call = call; - } - - get debtShareContract(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SetDebtShareContractCall__Outputs { - _call: SetDebtShareContractCall; - - constructor(call: SetDebtShareContractCall) { - this._call = call; - } -} - -export class SetDebtShareSnapshotIdCall extends ethereum.Call { - get inputs(): SetDebtShareSnapshotIdCall__Inputs { - return new SetDebtShareSnapshotIdCall__Inputs(this); - } - - get outputs(): SetDebtShareSnapshotIdCall__Outputs { - return new SetDebtShareSnapshotIdCall__Outputs(this); - } -} - -export class SetDebtShareSnapshotIdCall__Inputs { - _call: SetDebtShareSnapshotIdCall; - - constructor(call: SetDebtShareSnapshotIdCall) { - this._call = call; - } - - get snapshotId(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetDebtShareSnapshotIdCall__Outputs { - _call: SetDebtShareSnapshotIdCall; - - constructor(call: SetDebtShareSnapshotIdCall) { - this._call = call; - } -} - -export class SetDefaultBallotEvaluationBatchSizeCall extends ethereum.Call { - get inputs(): SetDefaultBallotEvaluationBatchSizeCall__Inputs { - return new SetDefaultBallotEvaluationBatchSizeCall__Inputs(this); - } - - get outputs(): SetDefaultBallotEvaluationBatchSizeCall__Outputs { - return new SetDefaultBallotEvaluationBatchSizeCall__Outputs(this); - } -} - -export class SetDefaultBallotEvaluationBatchSizeCall__Inputs { - _call: SetDefaultBallotEvaluationBatchSizeCall; - - constructor(call: SetDefaultBallotEvaluationBatchSizeCall) { - this._call = call; - } - - get newDefaultBallotEvaluationBatchSize(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetDefaultBallotEvaluationBatchSizeCall__Outputs { - _call: SetDefaultBallotEvaluationBatchSizeCall; - - constructor(call: SetDefaultBallotEvaluationBatchSizeCall) { - this._call = call; - } -} - -export class SetMaxDateAdjustmentToleranceCall extends ethereum.Call { - get inputs(): SetMaxDateAdjustmentToleranceCall__Inputs { - return new SetMaxDateAdjustmentToleranceCall__Inputs(this); - } - - get outputs(): SetMaxDateAdjustmentToleranceCall__Outputs { - return new SetMaxDateAdjustmentToleranceCall__Outputs(this); - } -} - -export class SetMaxDateAdjustmentToleranceCall__Inputs { - _call: SetMaxDateAdjustmentToleranceCall; - - constructor(call: SetMaxDateAdjustmentToleranceCall) { - this._call = call; - } - - get newMaxDateAdjustmentTolerance(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetMaxDateAdjustmentToleranceCall__Outputs { - _call: SetMaxDateAdjustmentToleranceCall; - - constructor(call: SetMaxDateAdjustmentToleranceCall) { - this._call = call; - } -} - -export class SetMinEpochDurationsCall extends ethereum.Call { - get inputs(): SetMinEpochDurationsCall__Inputs { - return new SetMinEpochDurationsCall__Inputs(this); - } - - get outputs(): SetMinEpochDurationsCall__Outputs { - return new SetMinEpochDurationsCall__Outputs(this); - } -} - -export class SetMinEpochDurationsCall__Inputs { - _call: SetMinEpochDurationsCall; - - constructor(call: SetMinEpochDurationsCall) { - this._call = call; - } - - get newMinNominationPeriodDuration(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newMinVotingPeriodDuration(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newMinEpochDuration(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class SetMinEpochDurationsCall__Outputs { - _call: SetMinEpochDurationsCall; - - constructor(call: SetMinEpochDurationsCall) { - this._call = call; - } -} - -export class SetMinimumActiveMembersCall extends ethereum.Call { - get inputs(): SetMinimumActiveMembersCall__Inputs { - return new SetMinimumActiveMembersCall__Inputs(this); - } - - get outputs(): SetMinimumActiveMembersCall__Outputs { - return new SetMinimumActiveMembersCall__Outputs(this); - } -} - -export class SetMinimumActiveMembersCall__Inputs { - _call: SetMinimumActiveMembersCall; - - constructor(call: SetMinimumActiveMembersCall) { - this._call = call; - } - - get newMinimumActiveMembers(): i32 { - return this._call.inputValues[0].value.toI32(); - } -} - -export class SetMinimumActiveMembersCall__Outputs { - _call: SetMinimumActiveMembersCall; - - constructor(call: SetMinimumActiveMembersCall) { - this._call = call; - } -} - -export class SetNextEpochSeatCountCall extends ethereum.Call { - get inputs(): SetNextEpochSeatCountCall__Inputs { - return new SetNextEpochSeatCountCall__Inputs(this); - } - - get outputs(): SetNextEpochSeatCountCall__Outputs { - return new SetNextEpochSeatCountCall__Outputs(this); - } -} - -export class SetNextEpochSeatCountCall__Inputs { - _call: SetNextEpochSeatCountCall; - - constructor(call: SetNextEpochSeatCountCall) { - this._call = call; - } - - get newSeatCount(): i32 { - return this._call.inputValues[0].value.toI32(); - } -} - -export class SetNextEpochSeatCountCall__Outputs { - _call: SetNextEpochSeatCountCall; - - constructor(call: SetNextEpochSeatCountCall) { - this._call = call; - } -} - -export class TweakEpochScheduleCall extends ethereum.Call { - get inputs(): TweakEpochScheduleCall__Inputs { - return new TweakEpochScheduleCall__Inputs(this); - } - - get outputs(): TweakEpochScheduleCall__Outputs { - return new TweakEpochScheduleCall__Outputs(this); - } -} - -export class TweakEpochScheduleCall__Inputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } - - get newNominationPeriodStartDate(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newVotingPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newEpochEndDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class TweakEpochScheduleCall__Outputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } -} - -export class UpgradeCouncilTokenCall extends ethereum.Call { - get inputs(): UpgradeCouncilTokenCall__Inputs { - return new UpgradeCouncilTokenCall__Inputs(this); - } - - get outputs(): UpgradeCouncilTokenCall__Outputs { - return new UpgradeCouncilTokenCall__Outputs(this); - } -} - -export class UpgradeCouncilTokenCall__Inputs { - _call: UpgradeCouncilTokenCall; - - constructor(call: UpgradeCouncilTokenCall) { - this._call = call; - } - - get newCouncilTokenImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class UpgradeCouncilTokenCall__Outputs { - _call: UpgradeCouncilTokenCall; - - constructor(call: UpgradeCouncilTokenCall) { - this._call = call; - } -} - -export class WithdrawNominationCall extends ethereum.Call { - get inputs(): WithdrawNominationCall__Inputs { - return new WithdrawNominationCall__Inputs(this); - } - - get outputs(): WithdrawNominationCall__Outputs { - return new WithdrawNominationCall__Outputs(this); - } -} - -export class WithdrawNominationCall__Inputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawNominationCall__Outputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawVoteCall extends ethereum.Call { - get inputs(): WithdrawVoteCall__Inputs { - return new WithdrawVoteCall__Inputs(this); - } - - get outputs(): WithdrawVoteCall__Outputs { - return new WithdrawVoteCall__Outputs(this); - } -} - -export class WithdrawVoteCall__Inputs { - _call: WithdrawVoteCall; - - constructor(call: WithdrawVoteCall) { - this._call = call; - } -} - -export class WithdrawVoteCall__Outputs { - _call: WithdrawVoteCall; - - constructor(call: WithdrawVoteCall) { - this._call = call; - } -} - -export class AcceptOwnershipCall extends ethereum.Call { - get inputs(): AcceptOwnershipCall__Inputs { - return new AcceptOwnershipCall__Inputs(this); - } - - get outputs(): AcceptOwnershipCall__Outputs { - return new AcceptOwnershipCall__Outputs(this); - } -} - -export class AcceptOwnershipCall__Inputs { - _call: AcceptOwnershipCall; - - constructor(call: AcceptOwnershipCall) { - this._call = call; - } -} - -export class AcceptOwnershipCall__Outputs { - _call: AcceptOwnershipCall; - - constructor(call: AcceptOwnershipCall) { - this._call = call; - } -} - -export class InitializeOwnerModuleCall extends ethereum.Call { - get inputs(): InitializeOwnerModuleCall__Inputs { - return new InitializeOwnerModuleCall__Inputs(this); - } - - get outputs(): InitializeOwnerModuleCall__Outputs { - return new InitializeOwnerModuleCall__Outputs(this); - } -} - -export class InitializeOwnerModuleCall__Inputs { - _call: InitializeOwnerModuleCall; - - constructor(call: InitializeOwnerModuleCall) { - this._call = call; - } - - get initialOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class InitializeOwnerModuleCall__Outputs { - _call: InitializeOwnerModuleCall; - - constructor(call: InitializeOwnerModuleCall) { - this._call = call; - } -} - -export class NominateNewOwnerCall extends ethereum.Call { - get inputs(): NominateNewOwnerCall__Inputs { - return new NominateNewOwnerCall__Inputs(this); - } - - get outputs(): NominateNewOwnerCall__Outputs { - return new NominateNewOwnerCall__Outputs(this); - } -} - -export class NominateNewOwnerCall__Inputs { - _call: NominateNewOwnerCall; - - constructor(call: NominateNewOwnerCall) { - this._call = call; - } - - get newNominatedOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class NominateNewOwnerCall__Outputs { - _call: NominateNewOwnerCall; - - constructor(call: NominateNewOwnerCall) { - this._call = call; - } -} - -export class RenounceNominationCall extends ethereum.Call { - get inputs(): RenounceNominationCall__Inputs { - return new RenounceNominationCall__Inputs(this); - } - - get outputs(): RenounceNominationCall__Outputs { - return new RenounceNominationCall__Outputs(this); - } -} - -export class RenounceNominationCall__Inputs { - _call: RenounceNominationCall; - - constructor(call: RenounceNominationCall) { - this._call = call; - } -} - -export class RenounceNominationCall__Outputs { - _call: RenounceNominationCall; - - constructor(call: RenounceNominationCall) { - this._call = call; - } -} - -export class SimulateUpgradeToCall extends ethereum.Call { - get inputs(): SimulateUpgradeToCall__Inputs { - return new SimulateUpgradeToCall__Inputs(this); - } - - get outputs(): SimulateUpgradeToCall__Outputs { - return new SimulateUpgradeToCall__Outputs(this); - } -} - -export class SimulateUpgradeToCall__Inputs { - _call: SimulateUpgradeToCall; - - constructor(call: SimulateUpgradeToCall) { - this._call = call; - } - - get newImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SimulateUpgradeToCall__Outputs { - _call: SimulateUpgradeToCall; - - constructor(call: SimulateUpgradeToCall) { - this._call = call; - } -} - -export class UpgradeToCall extends ethereum.Call { - get inputs(): UpgradeToCall__Inputs { - return new UpgradeToCall__Inputs(this); - } - - get outputs(): UpgradeToCall__Outputs { - return new UpgradeToCall__Outputs(this); - } -} - -export class UpgradeToCall__Inputs { - _call: UpgradeToCall; - - constructor(call: UpgradeToCall) { - this._call = call; - } - - get newImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class UpgradeToCall__Outputs { - _call: UpgradeToCall; - - constructor(call: UpgradeToCall) { - this._call = call; - } -} diff --git a/governance/subgraph/generated/Treasury/ElectionModule.ts b/governance/subgraph/generated/Treasury/ElectionModule.ts deleted file mode 100644 index 7fb77c6af..000000000 --- a/governance/subgraph/generated/Treasury/ElectionModule.ts +++ /dev/null @@ -1,2585 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class AssociatedSystemSet extends ethereum.Event { - get params(): AssociatedSystemSet__Params { - return new AssociatedSystemSet__Params(this); - } -} - -export class AssociatedSystemSet__Params { - _event: AssociatedSystemSet; - - constructor(event: AssociatedSystemSet) { - this._event = event; - } - - get kind(): Bytes { - return this._event.parameters[0].value.toBytes(); - } - - get id(): Bytes { - return this._event.parameters[1].value.toBytes(); - } - - get proxy(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get impl(): Address { - return this._event.parameters[3].value.toAddress(); - } -} - -export class NewSupportedCrossChainNetwork extends ethereum.Event { - get params(): NewSupportedCrossChainNetwork__Params { - return new NewSupportedCrossChainNetwork__Params(this); - } -} - -export class NewSupportedCrossChainNetwork__Params { - _event: NewSupportedCrossChainNetwork; - - constructor(event: NewSupportedCrossChainNetwork) { - this._event = event; - } - - get newChainId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class CandidateNominated extends ethereum.Event { - get params(): CandidateNominated__Params { - return new CandidateNominated__Params(this); - } -} - -export class CandidateNominated__Params { - _event: CandidateNominated; - - constructor(event: CandidateNominated) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberAdded extends ethereum.Event { - get params(): CouncilMemberAdded__Params { - return new CouncilMemberAdded__Params(this); - } -} - -export class CouncilMemberAdded__Params { - _event: CouncilMemberAdded; - - constructor(event: CouncilMemberAdded) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberRemoved extends ethereum.Event { - get params(): CouncilMemberRemoved__Params { - return new CouncilMemberRemoved__Params(this); - } -} - -export class CouncilMemberRemoved__Params { - _event: CouncilMemberRemoved; - - constructor(event: CouncilMemberRemoved) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMembersDismissed extends ethereum.Event { - get params(): CouncilMembersDismissed__Params { - return new CouncilMembersDismissed__Params(this); - } -} - -export class CouncilMembersDismissed__Params { - _event: CouncilMembersDismissed; - - constructor(event: CouncilMembersDismissed) { - this._event = event; - } - - get dismissedMembers(): Array
{ - return this._event.parameters[0].value.toAddressArray(); - } - - get epochId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class ElectionBatchEvaluated extends ethereum.Event { - get params(): ElectionBatchEvaluated__Params { - return new ElectionBatchEvaluated__Params(this); - } -} - -export class ElectionBatchEvaluated__Params { - _event: ElectionBatchEvaluated; - - constructor(event: ElectionBatchEvaluated) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get numEvaluatedBallots(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get totalBallots(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class ElectionEvaluated extends ethereum.Event { - get params(): ElectionEvaluated__Params { - return new ElectionEvaluated__Params(this); - } -} - -export class ElectionEvaluated__Params { - _event: ElectionEvaluated; - - constructor(event: ElectionEvaluated) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get ballotCount(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class ElectionModuleInitialized extends ethereum.Event { - get params(): ElectionModuleInitialized__Params { - return new ElectionModuleInitialized__Params(this); - } -} - -export class ElectionModuleInitialized__Params { - _event: ElectionModuleInitialized; - - constructor(event: ElectionModuleInitialized) { - this._event = event; - } -} - -export class EmergencyElectionStarted extends ethereum.Event { - get params(): EmergencyElectionStarted__Params { - return new EmergencyElectionStarted__Params(this); - } -} - -export class EmergencyElectionStarted__Params { - _event: EmergencyElectionStarted; - - constructor(event: EmergencyElectionStarted) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class EpochScheduleUpdated extends ethereum.Event { - get params(): EpochScheduleUpdated__Params { - return new EpochScheduleUpdated__Params(this); - } -} - -export class EpochScheduleUpdated__Params { - _event: EpochScheduleUpdated; - - constructor(event: EpochScheduleUpdated) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get startDate(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get endDate(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class EpochStarted extends ethereum.Event { - get params(): EpochStarted__Params { - return new EpochStarted__Params(this); - } -} - -export class EpochStarted__Params { - _event: EpochStarted; - - constructor(event: EpochStarted) { - this._event = event; - } - - get epochId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class NominationWithdrawn extends ethereum.Event { - get params(): NominationWithdrawn__Params { - return new NominationWithdrawn__Params(this); - } -} - -export class NominationWithdrawn__Params { - _event: NominationWithdrawn; - - constructor(event: NominationWithdrawn) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class VoteRecorded extends ethereum.Event { - get params(): VoteRecorded__Params { - return new VoteRecorded__Params(this); - } -} - -export class VoteRecorded__Params { - _event: VoteRecorded; - - constructor(event: VoteRecorded) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get chainId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epochId(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get votingPower(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } - - get candidates(): Array
{ - return this._event.parameters[4].value.toAddressArray(); - } -} - -export class VoteWithdrawn extends ethereum.Event { - get params(): VoteWithdrawn__Params { - return new VoteWithdrawn__Params(this); - } -} - -export class VoteWithdrawn__Params { - _event: VoteWithdrawn; - - constructor(event: VoteWithdrawn) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get chainId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epochId(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get candidates(): Array
{ - return this._event.parameters[3].value.toAddressArray(); - } -} - -export class OwnerChanged extends ethereum.Event { - get params(): OwnerChanged__Params { - return new OwnerChanged__Params(this); - } -} - -export class OwnerChanged__Params { - _event: OwnerChanged; - - constructor(event: OwnerChanged) { - this._event = event; - } - - get oldOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get newOwner(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class OwnerNominated extends ethereum.Event { - get params(): OwnerNominated__Params { - return new OwnerNominated__Params(this); - } -} - -export class OwnerNominated__Params { - _event: OwnerNominated; - - constructor(event: OwnerNominated) { - this._event = event; - } - - get newOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class Upgraded extends ethereum.Event { - get params(): Upgraded__Params { - return new Upgraded__Params(this); - } -} - -export class Upgraded__Params { - _event: Upgraded; - - constructor(event: Upgraded) { - this._event = event; - } - - get self(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get implementation(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class ElectionModule__getAssociatedSystemResult { - value0: Address; - value1: Bytes; - - constructor(value0: Address, value1: Bytes) { - this.value0 = value0; - this.value1 = value1; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromAddress(this.value0)); - map.set("value1", ethereum.Value.fromFixedBytes(this.value1)); - return map; - } - - getAddr(): Address { - return this.value0; - } - - getKind(): Bytes { - return this.value1; - } -} - -export class ElectionModule__getBallotResultValue0Struct extends ethereum.Tuple { - get votingPower(): BigInt { - return this[0].toBigInt(); - } - - get votedCandidates(): Array
{ - return this[1].toAddressArray(); - } - - get amounts(): Array { - return this[2].toBigIntArray(); - } -} - -export class ElectionModule__getElectionSettingsResultSettingsStruct extends ethereum.Tuple { - get epochSeatCount(): i32 { - return this[0].toI32(); - } - - get minimumActiveMembers(): i32 { - return this[1].toI32(); - } - - get epochDuration(): BigInt { - return this[2].toBigInt(); - } - - get nominationPeriodDuration(): BigInt { - return this[3].toBigInt(); - } - - get votingPeriodDuration(): BigInt { - return this[4].toBigInt(); - } - - get maxDateAdjustmentTolerance(): BigInt { - return this[5].toBigInt(); - } -} - -export class ElectionModule__getEpochScheduleResultEpochStruct extends ethereum.Tuple { - get startDate(): BigInt { - return this[0].toBigInt(); - } - - get nominationPeriodStartDate(): BigInt { - return this[1].toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this[2].toBigInt(); - } - - get endDate(): BigInt { - return this[3].toBigInt(); - } -} - -export class ElectionModule__getNextElectionSettingsResultSettingsStruct extends ethereum.Tuple { - get epochSeatCount(): i32 { - return this[0].toI32(); - } - - get minimumActiveMembers(): i32 { - return this[1].toI32(); - } - - get epochDuration(): BigInt { - return this[2].toBigInt(); - } - - get nominationPeriodDuration(): BigInt { - return this[3].toBigInt(); - } - - get votingPeriodDuration(): BigInt { - return this[4].toBigInt(); - } - - get maxDateAdjustmentTolerance(): BigInt { - return this[5].toBigInt(); - } -} - -export class ElectionModule extends ethereum.SmartContract { - static bind(address: Address): ElectionModule { - return new ElectionModule("ElectionModule", address); - } - - getAssociatedSystem(id: Bytes): ElectionModule__getAssociatedSystemResult { - let result = super.call( - "getAssociatedSystem", - "getAssociatedSystem(bytes32):(address,bytes32)", - [ethereum.Value.fromFixedBytes(id)] - ); - - return new ElectionModule__getAssociatedSystemResult( - result[0].toAddress(), - result[1].toBytes() - ); - } - - try_getAssociatedSystem( - id: Bytes - ): ethereum.CallResult { - let result = super.tryCall( - "getAssociatedSystem", - "getAssociatedSystem(bytes32):(address,bytes32)", - [ethereum.Value.fromFixedBytes(id)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new ElectionModule__getAssociatedSystemResult( - value[0].toAddress(), - value[1].toBytes() - ) - ); - } - - setSupportedCrossChainNetworks( - supportedNetworks: Array, - ccipSelectors: Array - ): BigInt { - let result = super.call( - "setSupportedCrossChainNetworks", - "setSupportedCrossChainNetworks(uint64[],uint64[]):(uint256)", - [ - ethereum.Value.fromUnsignedBigIntArray(supportedNetworks), - ethereum.Value.fromUnsignedBigIntArray(ccipSelectors) - ] - ); - - return result[0].toBigInt(); - } - - try_setSupportedCrossChainNetworks( - supportedNetworks: Array, - ccipSelectors: Array - ): ethereum.CallResult { - let result = super.tryCall( - "setSupportedCrossChainNetworks", - "setSupportedCrossChainNetworks(uint64[],uint64[]):(uint256)", - [ - ethereum.Value.fromUnsignedBigIntArray(supportedNetworks), - ethereum.Value.fromUnsignedBigIntArray(ccipSelectors) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCandidateVotesInEpoch(candidate: Address, epochIndex: BigInt): BigInt { - let result = super.call( - "getCandidateVotesInEpoch", - "getCandidateVotesInEpoch(address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotesInEpoch( - candidate: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotesInEpoch", - "getCandidateVotesInEpoch(address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionWinnersInEpoch(epochIndex: BigInt): Array
{ - let result = super.call( - "getElectionWinnersInEpoch", - "getElectionWinnersInEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinnersInEpoch( - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinnersInEpoch", - "getElectionWinnersInEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochEndDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getEpochEndDateForIndex", - "getEpochEndDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getEpochEndDateForIndex(epochIndex: BigInt): ethereum.CallResult { - let result = super.tryCall( - "getEpochEndDateForIndex", - "getEpochEndDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getEpochStartDateForIndex", - "getEpochStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getEpochStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getEpochStartDateForIndex", - "getEpochStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNominationPeriodStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getNominationPeriodStartDateForIndex", - "getNominationPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getNominationPeriodStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getNominationPeriodStartDateForIndex", - "getNominationPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNomineesAtEpoch(epochIndex: BigInt): Array
{ - let result = super.call( - "getNomineesAtEpoch", - "getNomineesAtEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toAddressArray(); - } - - try_getNomineesAtEpoch( - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getNomineesAtEpoch", - "getNomineesAtEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotingPeriodStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getVotingPeriodStartDateForIndex", - "getVotingPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getVotingPeriodStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getVotingPeriodStartDateForIndex", - "getVotingPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVotedInEpoch(user: Address, chainId: BigInt, epochIndex: BigInt): boolean { - let result = super.call( - "hasVotedInEpoch", - "hasVotedInEpoch(address,uint256,uint256):(bool)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBoolean(); - } - - try_hasVotedInEpoch( - user: Address, - chainId: BigInt, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "hasVotedInEpoch", - "hasVotedInEpoch(address,uint256,uint256):(bool)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - wasNominated(candidate: Address, epochIndex: BigInt): boolean { - let result = super.call( - "wasNominated", - "wasNominated(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBoolean(); - } - - try_wasNominated( - candidate: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "wasNominated", - "wasNominated(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - getBallot( - voter: Address, - chainId: BigInt, - electionId: BigInt - ): ElectionModule__getBallotResultValue0Struct { - let result = super.call( - "getBallot", - "getBallot(address,uint256,uint256):((uint256,address[],uint256[]))", - [ - ethereum.Value.fromAddress(voter), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - - return changetype( - result[0].toTuple() - ); - } - - try_getBallot( - voter: Address, - chainId: BigInt, - electionId: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getBallot", - "getBallot(address,uint256,uint256):((uint256,address[],uint256[]))", - [ - ethereum.Value.fromAddress(voter), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - changetype( - value[0].toTuple() - ) - ); - } - - getBallotCandidates( - voter: Address, - chainId: BigInt, - electionId: BigInt - ): Array
{ - let result = super.call( - "getBallotCandidates", - "getBallotCandidates(address,uint256,uint256):(address[])", - [ - ethereum.Value.fromAddress(voter), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - - return result[0].toAddressArray(); - } - - try_getBallotCandidates( - voter: Address, - chainId: BigInt, - electionId: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getBallotCandidates", - "getBallotCandidates(address,uint256,uint256):(address[])", - [ - ethereum.Value.fromAddress(voter), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getCandidateVotes(candidate: Address): BigInt { - let result = super.call( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotes(candidate: Address): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCouncilMembers(): Array
{ - let result = super.call( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getCouncilMembers(): ethereum.CallResult> { - let result = super.tryCall( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getCouncilToken(): Address { - let result = super.call( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getCouncilToken(): ethereum.CallResult
{ - let result = super.tryCall( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getCurrentPeriod(): BigInt { - let result = super.call( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getCurrentPeriod(): ethereum.CallResult { - let result = super.tryCall( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionSettings(): ElectionModule__getElectionSettingsResultSettingsStruct { - let result = super.call( - "getElectionSettings", - "getElectionSettings():((uint8,uint8,uint64,uint64,uint64,uint64))", - [] - ); - - return changetype( - result[0].toTuple() - ); - } - - try_getElectionSettings(): ethereum.CallResult< - ElectionModule__getElectionSettingsResultSettingsStruct - > { - let result = super.tryCall( - "getElectionSettings", - "getElectionSettings():((uint8,uint8,uint64,uint64,uint64,uint64))", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - changetype( - value[0].toTuple() - ) - ); - } - - getElectionWinners(): Array
{ - let result = super.call( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinners(): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochIndex(): BigInt { - let result = super.call("getEpochIndex", "getEpochIndex():(uint256)", []); - - return result[0].toBigInt(); - } - - try_getEpochIndex(): ethereum.CallResult { - let result = super.tryCall( - "getEpochIndex", - "getEpochIndex():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochSchedule(): ElectionModule__getEpochScheduleResultEpochStruct { - let result = super.call( - "getEpochSchedule", - "getEpochSchedule():((uint64,uint64,uint64,uint64))", - [] - ); - - return changetype( - result[0].toTuple() - ); - } - - try_getEpochSchedule(): ethereum.CallResult< - ElectionModule__getEpochScheduleResultEpochStruct - > { - let result = super.tryCall( - "getEpochSchedule", - "getEpochSchedule():((uint64,uint64,uint64,uint64))", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - changetype( - value[0].toTuple() - ) - ); - } - - getNextElectionSettings(): ElectionModule__getNextElectionSettingsResultSettingsStruct { - let result = super.call( - "getNextElectionSettings", - "getNextElectionSettings():((uint8,uint8,uint64,uint64,uint64,uint64))", - [] - ); - - return changetype< - ElectionModule__getNextElectionSettingsResultSettingsStruct - >(result[0].toTuple()); - } - - try_getNextElectionSettings(): ethereum.CallResult< - ElectionModule__getNextElectionSettingsResultSettingsStruct - > { - let result = super.tryCall( - "getNextElectionSettings", - "getNextElectionSettings():((uint8,uint8,uint64,uint64,uint64,uint64))", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - changetype( - value[0].toTuple() - ) - ); - } - - getNominees(): Array
{ - let result = super.call("getNominees", "getNominees():(address[])", []); - - return result[0].toAddressArray(); - } - - try_getNominees(): ethereum.CallResult> { - let result = super.tryCall("getNominees", "getNominees():(address[])", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotePower(user: Address, chainId: BigInt, electionId: BigInt): BigInt { - let result = super.call( - "getVotePower", - "getVotePower(address,uint256,uint256):(uint256)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - - return result[0].toBigInt(); - } - - try_getVotePower( - user: Address, - chainId: BigInt, - electionId: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getVotePower", - "getVotePower(address,uint256,uint256):(uint256)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVoted(user: Address, chainId: BigInt): boolean { - let result = super.call("hasVoted", "hasVoted(address,uint256):(bool)", [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId) - ]); - - return result[0].toBoolean(); - } - - try_hasVoted(user: Address, chainId: BigInt): ethereum.CallResult { - let result = super.tryCall("hasVoted", "hasVoted(address,uint256):(bool)", [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(chainId) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionEvaluated(): boolean { - let result = super.call( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionEvaluated(): ethereum.CallResult { - let result = super.tryCall( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionModuleInitialized(): boolean { - let result = super.call( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionModuleInitialized(): ethereum.CallResult { - let result = super.tryCall( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isNominated(candidate: Address): boolean { - let result = super.call("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - - return result[0].toBoolean(); - } - - try_isNominated(candidate: Address): ethereum.CallResult { - let result = super.tryCall("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - getVotePowerSnapshotId( - snapshotContract: Address, - electionId: BigInt - ): BigInt { - let result = super.call( - "getVotePowerSnapshotId", - "getVotePowerSnapshotId(address,uint128):(uint128)", - [ - ethereum.Value.fromAddress(snapshotContract), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - - return result[0].toBigInt(); - } - - try_getVotePowerSnapshotId( - snapshotContract: Address, - electionId: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getVotePowerSnapshotId", - "getVotePowerSnapshotId(address,uint128):(uint128)", - [ - ethereum.Value.fromAddress(snapshotContract), - ethereum.Value.fromUnsignedBigInt(electionId) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - prepareBallotWithSnapshot(snapshotContract: Address, voter: Address): BigInt { - let result = super.call( - "prepareBallotWithSnapshot", - "prepareBallotWithSnapshot(address,address):(uint256)", - [ - ethereum.Value.fromAddress(snapshotContract), - ethereum.Value.fromAddress(voter) - ] - ); - - return result[0].toBigInt(); - } - - try_prepareBallotWithSnapshot( - snapshotContract: Address, - voter: Address - ): ethereum.CallResult { - let result = super.tryCall( - "prepareBallotWithSnapshot", - "prepareBallotWithSnapshot(address,address):(uint256)", - [ - ethereum.Value.fromAddress(snapshotContract), - ethereum.Value.fromAddress(voter) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - takeVotePowerSnapshot(snapshotContract: Address): BigInt { - let result = super.call( - "takeVotePowerSnapshot", - "takeVotePowerSnapshot(address):(uint128)", - [ethereum.Value.fromAddress(snapshotContract)] - ); - - return result[0].toBigInt(); - } - - try_takeVotePowerSnapshot( - snapshotContract: Address - ): ethereum.CallResult { - let result = super.tryCall( - "takeVotePowerSnapshot", - "takeVotePowerSnapshot(address):(uint128)", - [ethereum.Value.fromAddress(snapshotContract)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getImplementation(): Address { - let result = super.call( - "getImplementation", - "getImplementation():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getImplementation(): ethereum.CallResult
{ - let result = super.tryCall( - "getImplementation", - "getImplementation():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - nominatedOwner(): Address { - let result = super.call("nominatedOwner", "nominatedOwner():(address)", []); - - return result[0].toAddress(); - } - - try_nominatedOwner(): ethereum.CallResult
{ - let result = super.tryCall( - "nominatedOwner", - "nominatedOwner():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - owner(): Address { - let result = super.call("owner", "owner():(address)", []); - - return result[0].toAddress(); - } - - try_owner(): ethereum.CallResult
{ - let result = super.tryCall("owner", "owner():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } -} - -export class InitOrUpgradeNftCall extends ethereum.Call { - get inputs(): InitOrUpgradeNftCall__Inputs { - return new InitOrUpgradeNftCall__Inputs(this); - } - - get outputs(): InitOrUpgradeNftCall__Outputs { - return new InitOrUpgradeNftCall__Outputs(this); - } -} - -export class InitOrUpgradeNftCall__Inputs { - _call: InitOrUpgradeNftCall; - - constructor(call: InitOrUpgradeNftCall) { - this._call = call; - } - - get id(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get name(): string { - return this._call.inputValues[1].value.toString(); - } - - get symbol(): string { - return this._call.inputValues[2].value.toString(); - } - - get uri(): string { - return this._call.inputValues[3].value.toString(); - } - - get impl(): Address { - return this._call.inputValues[4].value.toAddress(); - } -} - -export class InitOrUpgradeNftCall__Outputs { - _call: InitOrUpgradeNftCall; - - constructor(call: InitOrUpgradeNftCall) { - this._call = call; - } -} - -export class InitOrUpgradeTokenCall extends ethereum.Call { - get inputs(): InitOrUpgradeTokenCall__Inputs { - return new InitOrUpgradeTokenCall__Inputs(this); - } - - get outputs(): InitOrUpgradeTokenCall__Outputs { - return new InitOrUpgradeTokenCall__Outputs(this); - } -} - -export class InitOrUpgradeTokenCall__Inputs { - _call: InitOrUpgradeTokenCall; - - constructor(call: InitOrUpgradeTokenCall) { - this._call = call; - } - - get id(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get name(): string { - return this._call.inputValues[1].value.toString(); - } - - get symbol(): string { - return this._call.inputValues[2].value.toString(); - } - - get decimals(): i32 { - return this._call.inputValues[3].value.toI32(); - } - - get impl(): Address { - return this._call.inputValues[4].value.toAddress(); - } -} - -export class InitOrUpgradeTokenCall__Outputs { - _call: InitOrUpgradeTokenCall; - - constructor(call: InitOrUpgradeTokenCall) { - this._call = call; - } -} - -export class RegisterUnmanagedSystemCall extends ethereum.Call { - get inputs(): RegisterUnmanagedSystemCall__Inputs { - return new RegisterUnmanagedSystemCall__Inputs(this); - } - - get outputs(): RegisterUnmanagedSystemCall__Outputs { - return new RegisterUnmanagedSystemCall__Outputs(this); - } -} - -export class RegisterUnmanagedSystemCall__Inputs { - _call: RegisterUnmanagedSystemCall; - - constructor(call: RegisterUnmanagedSystemCall) { - this._call = call; - } - - get id(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get endpoint(): Address { - return this._call.inputValues[1].value.toAddress(); - } -} - -export class RegisterUnmanagedSystemCall__Outputs { - _call: RegisterUnmanagedSystemCall; - - constructor(call: RegisterUnmanagedSystemCall) { - this._call = call; - } -} - -export class ConfigureChainlinkCrossChainCall extends ethereum.Call { - get inputs(): ConfigureChainlinkCrossChainCall__Inputs { - return new ConfigureChainlinkCrossChainCall__Inputs(this); - } - - get outputs(): ConfigureChainlinkCrossChainCall__Outputs { - return new ConfigureChainlinkCrossChainCall__Outputs(this); - } -} - -export class ConfigureChainlinkCrossChainCall__Inputs { - _call: ConfigureChainlinkCrossChainCall; - - constructor(call: ConfigureChainlinkCrossChainCall) { - this._call = call; - } - - get ccipRouter(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class ConfigureChainlinkCrossChainCall__Outputs { - _call: ConfigureChainlinkCrossChainCall; - - constructor(call: ConfigureChainlinkCrossChainCall) { - this._call = call; - } -} - -export class SetSupportedCrossChainNetworksCall extends ethereum.Call { - get inputs(): SetSupportedCrossChainNetworksCall__Inputs { - return new SetSupportedCrossChainNetworksCall__Inputs(this); - } - - get outputs(): SetSupportedCrossChainNetworksCall__Outputs { - return new SetSupportedCrossChainNetworksCall__Outputs(this); - } -} - -export class SetSupportedCrossChainNetworksCall__Inputs { - _call: SetSupportedCrossChainNetworksCall; - - constructor(call: SetSupportedCrossChainNetworksCall) { - this._call = call; - } - - get supportedNetworks(): Array { - return this._call.inputValues[0].value.toBigIntArray(); - } - - get ccipSelectors(): Array { - return this._call.inputValues[1].value.toBigIntArray(); - } -} - -export class SetSupportedCrossChainNetworksCall__Outputs { - _call: SetSupportedCrossChainNetworksCall; - - constructor(call: SetSupportedCrossChainNetworksCall) { - this._call = call; - } - - get numRegistered(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class _recvCastCall extends ethereum.Call { - get inputs(): _recvCastCall__Inputs { - return new _recvCastCall__Inputs(this); - } - - get outputs(): _recvCastCall__Outputs { - return new _recvCastCall__Outputs(this); - } -} - -export class _recvCastCall__Inputs { - _call: _recvCastCall; - - constructor(call: _recvCastCall) { - this._call = call; - } - - get epochIndex(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get voter(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get votingPower(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get chainId(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get candidates(): Array
{ - return this._call.inputValues[4].value.toAddressArray(); - } - - get amounts(): Array { - return this._call.inputValues[5].value.toBigIntArray(); - } -} - -export class _recvCastCall__Outputs { - _call: _recvCastCall; - - constructor(call: _recvCastCall) { - this._call = call; - } -} - -export class _recvDismissMembersCall extends ethereum.Call { - get inputs(): _recvDismissMembersCall__Inputs { - return new _recvDismissMembersCall__Inputs(this); - } - - get outputs(): _recvDismissMembersCall__Outputs { - return new _recvDismissMembersCall__Outputs(this); - } -} - -export class _recvDismissMembersCall__Inputs { - _call: _recvDismissMembersCall; - - constructor(call: _recvDismissMembersCall) { - this._call = call; - } - - get membersToDismiss(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } - - get epochIndex(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class _recvDismissMembersCall__Outputs { - _call: _recvDismissMembersCall; - - constructor(call: _recvDismissMembersCall) { - this._call = call; - } -} - -export class _recvResolveCall extends ethereum.Call { - get inputs(): _recvResolveCall__Inputs { - return new _recvResolveCall__Inputs(this); - } - - get outputs(): _recvResolveCall__Outputs { - return new _recvResolveCall__Outputs(this); - } -} - -export class _recvResolveCall__Inputs { - _call: _recvResolveCall; - - constructor(call: _recvResolveCall) { - this._call = call; - } - - get epochIndex(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get epochStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get nominationPeriodStartDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get councilMembers(): Array
{ - return this._call.inputValues[5].value.toAddressArray(); - } -} - -export class _recvResolveCall__Outputs { - _call: _recvResolveCall; - - constructor(call: _recvResolveCall) { - this._call = call; - } -} - -export class _recvTweakEpochScheduleCall extends ethereum.Call { - get inputs(): _recvTweakEpochScheduleCall__Inputs { - return new _recvTweakEpochScheduleCall__Inputs(this); - } - - get outputs(): _recvTweakEpochScheduleCall__Outputs { - return new _recvTweakEpochScheduleCall__Outputs(this); - } -} - -export class _recvTweakEpochScheduleCall__Inputs { - _call: _recvTweakEpochScheduleCall; - - constructor(call: _recvTweakEpochScheduleCall) { - this._call = call; - } - - get epochIndex(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get nominationPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } -} - -export class _recvTweakEpochScheduleCall__Outputs { - _call: _recvTweakEpochScheduleCall; - - constructor(call: _recvTweakEpochScheduleCall) { - this._call = call; - } -} - -export class _recvWithdrawVoteCall extends ethereum.Call { - get inputs(): _recvWithdrawVoteCall__Inputs { - return new _recvWithdrawVoteCall__Inputs(this); - } - - get outputs(): _recvWithdrawVoteCall__Outputs { - return new _recvWithdrawVoteCall__Outputs(this); - } -} - -export class _recvWithdrawVoteCall__Inputs { - _call: _recvWithdrawVoteCall; - - constructor(call: _recvWithdrawVoteCall) { - this._call = call; - } - - get epochIndex(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get voter(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get chainId(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get candidates(): Array
{ - return this._call.inputValues[3].value.toAddressArray(); - } -} - -export class _recvWithdrawVoteCall__Outputs { - _call: _recvWithdrawVoteCall; - - constructor(call: _recvWithdrawVoteCall) { - this._call = call; - } -} - -export class CastCall extends ethereum.Call { - get inputs(): CastCall__Inputs { - return new CastCall__Inputs(this); - } - - get outputs(): CastCall__Outputs { - return new CastCall__Outputs(this); - } -} - -export class CastCall__Inputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } - - get candidates(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } - - get amounts(): Array { - return this._call.inputValues[1].value.toBigIntArray(); - } -} - -export class CastCall__Outputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } -} - -export class DismissMembersCall extends ethereum.Call { - get inputs(): DismissMembersCall__Inputs { - return new DismissMembersCall__Inputs(this); - } - - get outputs(): DismissMembersCall__Outputs { - return new DismissMembersCall__Outputs(this); - } -} - -export class DismissMembersCall__Inputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } - - get membersToDismiss(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class DismissMembersCall__Outputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } -} - -export class EvaluateCall extends ethereum.Call { - get inputs(): EvaluateCall__Inputs { - return new EvaluateCall__Inputs(this); - } - - get outputs(): EvaluateCall__Outputs { - return new EvaluateCall__Outputs(this); - } -} - -export class EvaluateCall__Inputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } - - get numBallots(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class EvaluateCall__Outputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } -} - -export class InitElectionModuleSatelliteCall extends ethereum.Call { - get inputs(): InitElectionModuleSatelliteCall__Inputs { - return new InitElectionModuleSatelliteCall__Inputs(this); - } - - get outputs(): InitElectionModuleSatelliteCall__Outputs { - return new InitElectionModuleSatelliteCall__Outputs(this); - } -} - -export class InitElectionModuleSatelliteCall__Inputs { - _call: InitElectionModuleSatelliteCall; - - constructor(call: InitElectionModuleSatelliteCall) { - this._call = call; - } - - get epochIndex(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get epochStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get nominationPeriodStartDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get councilMembers(): Array
{ - return this._call.inputValues[5].value.toAddressArray(); - } -} - -export class InitElectionModuleSatelliteCall__Outputs { - _call: InitElectionModuleSatelliteCall; - - constructor(call: InitElectionModuleSatelliteCall) { - this._call = call; - } -} - -export class InitElectionModuleSatellite1Call extends ethereum.Call { - get inputs(): InitElectionModuleSatellite1Call__Inputs { - return new InitElectionModuleSatellite1Call__Inputs(this); - } - - get outputs(): InitElectionModuleSatellite1Call__Outputs { - return new InitElectionModuleSatellite1Call__Outputs(this); - } -} - -export class InitElectionModuleSatellite1Call__Inputs { - _call: InitElectionModuleSatellite1Call; - - constructor(call: InitElectionModuleSatellite1Call) { - this._call = call; - } -} - -export class InitElectionModuleSatellite1Call__Outputs { - _call: InitElectionModuleSatellite1Call; - - constructor(call: InitElectionModuleSatellite1Call) { - this._call = call; - } -} - -export class InitOrUpdateElectionSettingsCall extends ethereum.Call { - get inputs(): InitOrUpdateElectionSettingsCall__Inputs { - return new InitOrUpdateElectionSettingsCall__Inputs(this); - } - - get outputs(): InitOrUpdateElectionSettingsCall__Outputs { - return new InitOrUpdateElectionSettingsCall__Outputs(this); - } -} - -export class InitOrUpdateElectionSettingsCall__Inputs { - _call: InitOrUpdateElectionSettingsCall; - - constructor(call: InitOrUpdateElectionSettingsCall) { - this._call = call; - } - - get initialCouncil(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } - - get minimumActiveMembers(): i32 { - return this._call.inputValues[1].value.toI32(); - } - - get initialNominationPeriodStartDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get administrationPeriodDuration(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get nominationPeriodDuration(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get votingPeriodDuration(): BigInt { - return this._call.inputValues[5].value.toBigInt(); - } -} - -export class InitOrUpdateElectionSettingsCall__Outputs { - _call: InitOrUpdateElectionSettingsCall; - - constructor(call: InitOrUpdateElectionSettingsCall) { - this._call = call; - } -} - -export class NominateCall extends ethereum.Call { - get inputs(): NominateCall__Inputs { - return new NominateCall__Inputs(this); - } - - get outputs(): NominateCall__Outputs { - return new NominateCall__Outputs(this); - } -} - -export class NominateCall__Inputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class NominateCall__Outputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class ResolveCall extends ethereum.Call { - get inputs(): ResolveCall__Inputs { - return new ResolveCall__Inputs(this); - } - - get outputs(): ResolveCall__Outputs { - return new ResolveCall__Outputs(this); - } -} - -export class ResolveCall__Inputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class ResolveCall__Outputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class SetNextElectionSettingsCall extends ethereum.Call { - get inputs(): SetNextElectionSettingsCall__Inputs { - return new SetNextElectionSettingsCall__Inputs(this); - } - - get outputs(): SetNextElectionSettingsCall__Outputs { - return new SetNextElectionSettingsCall__Outputs(this); - } -} - -export class SetNextElectionSettingsCall__Inputs { - _call: SetNextElectionSettingsCall; - - constructor(call: SetNextElectionSettingsCall) { - this._call = call; - } - - get epochSeatCount(): i32 { - return this._call.inputValues[0].value.toI32(); - } - - get minimumActiveMembers(): i32 { - return this._call.inputValues[1].value.toI32(); - } - - get epochDuration(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get nominationPeriodDuration(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get votingPeriodDuration(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get maxDateAdjustmentTolerance(): BigInt { - return this._call.inputValues[5].value.toBigInt(); - } -} - -export class SetNextElectionSettingsCall__Outputs { - _call: SetNextElectionSettingsCall; - - constructor(call: SetNextElectionSettingsCall) { - this._call = call; - } -} - -export class TweakEpochScheduleCall extends ethereum.Call { - get inputs(): TweakEpochScheduleCall__Inputs { - return new TweakEpochScheduleCall__Inputs(this); - } - - get outputs(): TweakEpochScheduleCall__Outputs { - return new TweakEpochScheduleCall__Outputs(this); - } -} - -export class TweakEpochScheduleCall__Inputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } - - get newNominationPeriodStartDate(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newVotingPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newEpochEndDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class TweakEpochScheduleCall__Outputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } -} - -export class WithdrawNominationCall extends ethereum.Call { - get inputs(): WithdrawNominationCall__Inputs { - return new WithdrawNominationCall__Inputs(this); - } - - get outputs(): WithdrawNominationCall__Outputs { - return new WithdrawNominationCall__Outputs(this); - } -} - -export class WithdrawNominationCall__Inputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawNominationCall__Outputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawVoteCall extends ethereum.Call { - get inputs(): WithdrawVoteCall__Inputs { - return new WithdrawVoteCall__Inputs(this); - } - - get outputs(): WithdrawVoteCall__Outputs { - return new WithdrawVoteCall__Outputs(this); - } -} - -export class WithdrawVoteCall__Inputs { - _call: WithdrawVoteCall; - - constructor(call: WithdrawVoteCall) { - this._call = call; - } - - get candidates(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class WithdrawVoteCall__Outputs { - _call: WithdrawVoteCall; - - constructor(call: WithdrawVoteCall) { - this._call = call; - } -} - -export class PrepareBallotWithSnapshotCall extends ethereum.Call { - get inputs(): PrepareBallotWithSnapshotCall__Inputs { - return new PrepareBallotWithSnapshotCall__Inputs(this); - } - - get outputs(): PrepareBallotWithSnapshotCall__Outputs { - return new PrepareBallotWithSnapshotCall__Outputs(this); - } -} - -export class PrepareBallotWithSnapshotCall__Inputs { - _call: PrepareBallotWithSnapshotCall; - - constructor(call: PrepareBallotWithSnapshotCall) { - this._call = call; - } - - get snapshotContract(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get voter(): Address { - return this._call.inputValues[1].value.toAddress(); - } -} - -export class PrepareBallotWithSnapshotCall__Outputs { - _call: PrepareBallotWithSnapshotCall; - - constructor(call: PrepareBallotWithSnapshotCall) { - this._call = call; - } - - get power(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class SetSnapshotContractCall extends ethereum.Call { - get inputs(): SetSnapshotContractCall__Inputs { - return new SetSnapshotContractCall__Inputs(this); - } - - get outputs(): SetSnapshotContractCall__Outputs { - return new SetSnapshotContractCall__Outputs(this); - } -} - -export class SetSnapshotContractCall__Inputs { - _call: SetSnapshotContractCall; - - constructor(call: SetSnapshotContractCall) { - this._call = call; - } - - get snapshotContract(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get enabled(): boolean { - return this._call.inputValues[1].value.toBoolean(); - } -} - -export class SetSnapshotContractCall__Outputs { - _call: SetSnapshotContractCall; - - constructor(call: SetSnapshotContractCall) { - this._call = call; - } -} - -export class TakeVotePowerSnapshotCall extends ethereum.Call { - get inputs(): TakeVotePowerSnapshotCall__Inputs { - return new TakeVotePowerSnapshotCall__Inputs(this); - } - - get outputs(): TakeVotePowerSnapshotCall__Outputs { - return new TakeVotePowerSnapshotCall__Outputs(this); - } -} - -export class TakeVotePowerSnapshotCall__Inputs { - _call: TakeVotePowerSnapshotCall; - - constructor(call: TakeVotePowerSnapshotCall) { - this._call = call; - } - - get snapshotContract(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class TakeVotePowerSnapshotCall__Outputs { - _call: TakeVotePowerSnapshotCall; - - constructor(call: TakeVotePowerSnapshotCall) { - this._call = call; - } - - get snapshotId(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class AcceptOwnershipCall extends ethereum.Call { - get inputs(): AcceptOwnershipCall__Inputs { - return new AcceptOwnershipCall__Inputs(this); - } - - get outputs(): AcceptOwnershipCall__Outputs { - return new AcceptOwnershipCall__Outputs(this); - } -} - -export class AcceptOwnershipCall__Inputs { - _call: AcceptOwnershipCall; - - constructor(call: AcceptOwnershipCall) { - this._call = call; - } -} - -export class AcceptOwnershipCall__Outputs { - _call: AcceptOwnershipCall; - - constructor(call: AcceptOwnershipCall) { - this._call = call; - } -} - -export class NominateNewOwnerCall extends ethereum.Call { - get inputs(): NominateNewOwnerCall__Inputs { - return new NominateNewOwnerCall__Inputs(this); - } - - get outputs(): NominateNewOwnerCall__Outputs { - return new NominateNewOwnerCall__Outputs(this); - } -} - -export class NominateNewOwnerCall__Inputs { - _call: NominateNewOwnerCall; - - constructor(call: NominateNewOwnerCall) { - this._call = call; - } - - get newNominatedOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class NominateNewOwnerCall__Outputs { - _call: NominateNewOwnerCall; - - constructor(call: NominateNewOwnerCall) { - this._call = call; - } -} - -export class RenounceNominationCall extends ethereum.Call { - get inputs(): RenounceNominationCall__Inputs { - return new RenounceNominationCall__Inputs(this); - } - - get outputs(): RenounceNominationCall__Outputs { - return new RenounceNominationCall__Outputs(this); - } -} - -export class RenounceNominationCall__Inputs { - _call: RenounceNominationCall; - - constructor(call: RenounceNominationCall) { - this._call = call; - } -} - -export class RenounceNominationCall__Outputs { - _call: RenounceNominationCall; - - constructor(call: RenounceNominationCall) { - this._call = call; - } -} - -export class SimulateUpgradeToCall extends ethereum.Call { - get inputs(): SimulateUpgradeToCall__Inputs { - return new SimulateUpgradeToCall__Inputs(this); - } - - get outputs(): SimulateUpgradeToCall__Outputs { - return new SimulateUpgradeToCall__Outputs(this); - } -} - -export class SimulateUpgradeToCall__Inputs { - _call: SimulateUpgradeToCall; - - constructor(call: SimulateUpgradeToCall) { - this._call = call; - } - - get newImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SimulateUpgradeToCall__Outputs { - _call: SimulateUpgradeToCall; - - constructor(call: SimulateUpgradeToCall) { - this._call = call; - } -} - -export class UpgradeToCall extends ethereum.Call { - get inputs(): UpgradeToCall__Inputs { - return new UpgradeToCall__Inputs(this); - } - - get outputs(): UpgradeToCall__Outputs { - return new UpgradeToCall__Outputs(this); - } -} - -export class UpgradeToCall__Inputs { - _call: UpgradeToCall; - - constructor(call: UpgradeToCall) { - this._call = call; - } - - get newImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class UpgradeToCall__Outputs { - _call: UpgradeToCall; - - constructor(call: UpgradeToCall) { - this._call = call; - } -} - -export class CcipReceiveCall extends ethereum.Call { - get inputs(): CcipReceiveCall__Inputs { - return new CcipReceiveCall__Inputs(this); - } - - get outputs(): CcipReceiveCall__Outputs { - return new CcipReceiveCall__Outputs(this); - } -} - -export class CcipReceiveCall__Inputs { - _call: CcipReceiveCall; - - constructor(call: CcipReceiveCall) { - this._call = call; - } - - get message(): CcipReceiveCallMessageStruct { - return changetype( - this._call.inputValues[0].value.toTuple() - ); - } -} - -export class CcipReceiveCall__Outputs { - _call: CcipReceiveCall; - - constructor(call: CcipReceiveCall) { - this._call = call; - } -} - -export class CcipReceiveCallMessageStruct extends ethereum.Tuple { - get messageId(): Bytes { - return this[0].toBytes(); - } - - get sourceChainSelector(): BigInt { - return this[1].toBigInt(); - } - - get sender(): Bytes { - return this[2].toBytes(); - } - - get data(): Bytes { - return this[3].toBytes(); - } - - get tokenAmounts(): Array { - return this[4].toTupleArray(); - } -} - -export class CcipReceiveCallMessageTokenAmountsStruct extends ethereum.Tuple { - get token(): Address { - return this[0].toAddress(); - } - - get amount(): BigInt { - return this[1].toBigInt(); - } -} diff --git a/governance/subgraph/generated/Treasury/ElectionModuleOld.ts b/governance/subgraph/generated/Treasury/ElectionModuleOld.ts deleted file mode 100644 index ff16bb4f7..000000000 --- a/governance/subgraph/generated/Treasury/ElectionModuleOld.ts +++ /dev/null @@ -1,2613 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class CandidateNominated extends ethereum.Event { - get params(): CandidateNominated__Params { - return new CandidateNominated__Params(this); - } -} - -export class CandidateNominated__Params { - _event: CandidateNominated; - - constructor(event: CandidateNominated) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberAdded extends ethereum.Event { - get params(): CouncilMemberAdded__Params { - return new CouncilMemberAdded__Params(this); - } -} - -export class CouncilMemberAdded__Params { - _event: CouncilMemberAdded; - - constructor(event: CouncilMemberAdded) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMemberRemoved extends ethereum.Event { - get params(): CouncilMemberRemoved__Params { - return new CouncilMemberRemoved__Params(this); - } -} - -export class CouncilMemberRemoved__Params { - _event: CouncilMemberRemoved; - - constructor(event: CouncilMemberRemoved) { - this._event = event; - } - - get member(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilMembersDismissed extends ethereum.Event { - get params(): CouncilMembersDismissed__Params { - return new CouncilMembersDismissed__Params(this); - } -} - -export class CouncilMembersDismissed__Params { - _event: CouncilMembersDismissed; - - constructor(event: CouncilMembersDismissed) { - this._event = event; - } - - get members(): Array
{ - return this._event.parameters[0].value.toAddressArray(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CouncilTokenCreated extends ethereum.Event { - get params(): CouncilTokenCreated__Params { - return new CouncilTokenCreated__Params(this); - } -} - -export class CouncilTokenCreated__Params { - _event: CouncilTokenCreated; - - constructor(event: CouncilTokenCreated) { - this._event = event; - } - - get proxy(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get implementation(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class CouncilTokenUpgraded extends ethereum.Event { - get params(): CouncilTokenUpgraded__Params { - return new CouncilTokenUpgraded__Params(this); - } -} - -export class CouncilTokenUpgraded__Params { - _event: CouncilTokenUpgraded; - - constructor(event: CouncilTokenUpgraded) { - this._event = event; - } - - get newImplementation(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class DefaultBallotEvaluationBatchSizeChanged extends ethereum.Event { - get params(): DefaultBallotEvaluationBatchSizeChanged__Params { - return new DefaultBallotEvaluationBatchSizeChanged__Params(this); - } -} - -export class DefaultBallotEvaluationBatchSizeChanged__Params { - _event: DefaultBallotEvaluationBatchSizeChanged; - - constructor(event: DefaultBallotEvaluationBatchSizeChanged) { - this._event = event; - } - - get size(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class ElectionBatchEvaluated extends ethereum.Event { - get params(): ElectionBatchEvaluated__Params { - return new ElectionBatchEvaluated__Params(this); - } -} - -export class ElectionBatchEvaluated__Params { - _event: ElectionBatchEvaluated; - - constructor(event: ElectionBatchEvaluated) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get evaluatedBallots(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get totalBallots(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class ElectionEvaluated extends ethereum.Event { - get params(): ElectionEvaluated__Params { - return new ElectionEvaluated__Params(this); - } -} - -export class ElectionEvaluated__Params { - _event: ElectionEvaluated; - - constructor(event: ElectionEvaluated) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get totalBallots(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class ElectionModuleInitialized extends ethereum.Event { - get params(): ElectionModuleInitialized__Params { - return new ElectionModuleInitialized__Params(this); - } -} - -export class ElectionModuleInitialized__Params { - _event: ElectionModuleInitialized; - - constructor(event: ElectionModuleInitialized) { - this._event = event; - } -} - -export class EmergencyElectionStarted extends ethereum.Event { - get params(): EmergencyElectionStarted__Params { - return new EmergencyElectionStarted__Params(this); - } -} - -export class EmergencyElectionStarted__Params { - _event: EmergencyElectionStarted; - - constructor(event: EmergencyElectionStarted) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class EpochScheduleUpdated extends ethereum.Event { - get params(): EpochScheduleUpdated__Params { - return new EpochScheduleUpdated__Params(this); - } -} - -export class EpochScheduleUpdated__Params { - _event: EpochScheduleUpdated; - - constructor(event: EpochScheduleUpdated) { - this._event = event; - } - - get nominationPeriodStartDate(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class EpochStarted extends ethereum.Event { - get params(): EpochStarted__Params { - return new EpochStarted__Params(this); - } -} - -export class EpochStarted__Params { - _event: EpochStarted; - - constructor(event: EpochStarted) { - this._event = event; - } - - get epochIndex(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class MaxDateAdjustmentToleranceChanged extends ethereum.Event { - get params(): MaxDateAdjustmentToleranceChanged__Params { - return new MaxDateAdjustmentToleranceChanged__Params(this); - } -} - -export class MaxDateAdjustmentToleranceChanged__Params { - _event: MaxDateAdjustmentToleranceChanged; - - constructor(event: MaxDateAdjustmentToleranceChanged) { - this._event = event; - } - - get tolerance(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class MinimumActiveMembersChanged extends ethereum.Event { - get params(): MinimumActiveMembersChanged__Params { - return new MinimumActiveMembersChanged__Params(this); - } -} - -export class MinimumActiveMembersChanged__Params { - _event: MinimumActiveMembersChanged; - - constructor(event: MinimumActiveMembersChanged) { - this._event = event; - } - - get minimumActiveMembers(): i32 { - return this._event.parameters[0].value.toI32(); - } -} - -export class MinimumEpochDurationsChanged extends ethereum.Event { - get params(): MinimumEpochDurationsChanged__Params { - return new MinimumEpochDurationsChanged__Params(this); - } -} - -export class MinimumEpochDurationsChanged__Params { - _event: MinimumEpochDurationsChanged; - - constructor(event: MinimumEpochDurationsChanged) { - this._event = event; - } - - get minNominationPeriodDuration(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get minVotingPeriodDuration(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get minEpochDuration(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class NextEpochSeatCountChanged extends ethereum.Event { - get params(): NextEpochSeatCountChanged__Params { - return new NextEpochSeatCountChanged__Params(this); - } -} - -export class NextEpochSeatCountChanged__Params { - _event: NextEpochSeatCountChanged; - - constructor(event: NextEpochSeatCountChanged) { - this._event = event; - } - - get seatCount(): i32 { - return this._event.parameters[0].value.toI32(); - } -} - -export class NominationWithdrawn extends ethereum.Event { - get params(): NominationWithdrawn__Params { - return new NominationWithdrawn__Params(this); - } -} - -export class NominationWithdrawn__Params { - _event: NominationWithdrawn; - - constructor(event: NominationWithdrawn) { - this._event = event; - } - - get candidate(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get epochIndex(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class VoteRecorded extends ethereum.Event { - get params(): VoteRecorded__Params { - return new VoteRecorded__Params(this); - } -} - -export class VoteRecorded__Params { - _event: VoteRecorded; - - constructor(event: VoteRecorded) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get ballotId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } - - get epochIndex(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get votePower(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class VoteWithdrawn extends ethereum.Event { - get params(): VoteWithdrawn__Params { - return new VoteWithdrawn__Params(this); - } -} - -export class VoteWithdrawn__Params { - _event: VoteWithdrawn; - - constructor(event: VoteWithdrawn) { - this._event = event; - } - - get voter(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get ballotId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } - - get epochIndex(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get votePower(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class CrossChainDebtShareDeclared extends ethereum.Event { - get params(): CrossChainDebtShareDeclared__Params { - return new CrossChainDebtShareDeclared__Params(this); - } -} - -export class CrossChainDebtShareDeclared__Params { - _event: CrossChainDebtShareDeclared; - - constructor(event: CrossChainDebtShareDeclared) { - this._event = event; - } - - get user(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get debtShare(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class CrossChainDebtShareMerkleRootSet extends ethereum.Event { - get params(): CrossChainDebtShareMerkleRootSet__Params { - return new CrossChainDebtShareMerkleRootSet__Params(this); - } -} - -export class CrossChainDebtShareMerkleRootSet__Params { - _event: CrossChainDebtShareMerkleRootSet; - - constructor(event: CrossChainDebtShareMerkleRootSet) { - this._event = event; - } - - get merkleRoot(): Bytes { - return this._event.parameters[0].value.toBytes(); - } - - get blocknumber(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get epoch(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class DebtShareContractSet extends ethereum.Event { - get params(): DebtShareContractSet__Params { - return new DebtShareContractSet__Params(this); - } -} - -export class DebtShareContractSet__Params { - _event: DebtShareContractSet; - - constructor(event: DebtShareContractSet) { - this._event = event; - } - - get contractAddress(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class DebtShareSnapshotIdSet extends ethereum.Event { - get params(): DebtShareSnapshotIdSet__Params { - return new DebtShareSnapshotIdSet__Params(this); - } -} - -export class DebtShareSnapshotIdSet__Params { - _event: DebtShareSnapshotIdSet; - - constructor(event: DebtShareSnapshotIdSet) { - this._event = event; - } - - get snapshotId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } -} - -export class OwnerChanged extends ethereum.Event { - get params(): OwnerChanged__Params { - return new OwnerChanged__Params(this); - } -} - -export class OwnerChanged__Params { - _event: OwnerChanged; - - constructor(event: OwnerChanged) { - this._event = event; - } - - get oldOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get newOwner(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class OwnerNominated extends ethereum.Event { - get params(): OwnerNominated__Params { - return new OwnerNominated__Params(this); - } -} - -export class OwnerNominated__Params { - _event: OwnerNominated; - - constructor(event: OwnerNominated) { - this._event = event; - } - - get newOwner(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class Upgraded extends ethereum.Event { - get params(): Upgraded__Params { - return new Upgraded__Params(this); - } -} - -export class Upgraded__Params { - _event: Upgraded; - - constructor(event: Upgraded) { - this._event = event; - } - - get implementation(): Address { - return this._event.parameters[0].value.toAddress(); - } -} - -export class ElectionModuleOld__getMinEpochDurationsResult { - value0: BigInt; - value1: BigInt; - value2: BigInt; - - constructor(value0: BigInt, value1: BigInt, value2: BigInt) { - this.value0 = value0; - this.value1 = value1; - this.value2 = value2; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - map.set("value2", ethereum.Value.fromUnsignedBigInt(this.value2)); - return map; - } - - getMinNominationPeriodDuration(): BigInt { - return this.value0; - } - - getMinVotingPeriodDuration(): BigInt { - return this.value1; - } - - getMinEpochDuration(): BigInt { - return this.value2; - } -} - -export class ElectionModuleOld extends ethereum.SmartContract { - static bind(address: Address): ElectionModuleOld { - return new ElectionModuleOld("ElectionModuleOld", address); - } - - getBallotCandidatesInEpoch( - ballotId: Bytes, - epochIndex: BigInt - ): Array
{ - let result = super.call( - "getBallotCandidatesInEpoch", - "getBallotCandidatesInEpoch(bytes32,uint256):(address[])", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toAddressArray(); - } - - try_getBallotCandidatesInEpoch( - ballotId: Bytes, - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getBallotCandidatesInEpoch", - "getBallotCandidatesInEpoch(bytes32,uint256):(address[])", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getBallotVotedAtEpoch(user: Address, epochIndex: BigInt): Bytes { - let result = super.call( - "getBallotVotedAtEpoch", - "getBallotVotedAtEpoch(address,uint256):(bytes32)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBytes(); - } - - try_getBallotVotedAtEpoch( - user: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getBallotVotedAtEpoch", - "getBallotVotedAtEpoch(address,uint256):(bytes32)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getBallotVotesInEpoch(ballotId: Bytes, epochIndex: BigInt): BigInt { - let result = super.call( - "getBallotVotesInEpoch", - "getBallotVotesInEpoch(bytes32,uint256):(uint256)", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBigInt(); - } - - try_getBallotVotesInEpoch( - ballotId: Bytes, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getBallotVotesInEpoch", - "getBallotVotesInEpoch(bytes32,uint256):(uint256)", - [ - ethereum.Value.fromFixedBytes(ballotId), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCandidateVotesInEpoch(candidate: Address, epochIndex: BigInt): BigInt { - let result = super.call( - "getCandidateVotesInEpoch", - "getCandidateVotesInEpoch(address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotesInEpoch( - candidate: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotesInEpoch", - "getCandidateVotesInEpoch(address,uint256):(uint256)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionWinnersInEpoch(epochIndex: BigInt): Array
{ - let result = super.call( - "getElectionWinnersInEpoch", - "getElectionWinnersInEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinnersInEpoch( - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinnersInEpoch", - "getElectionWinnersInEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochEndDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getEpochEndDateForIndex", - "getEpochEndDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getEpochEndDateForIndex(epochIndex: BigInt): ethereum.CallResult { - let result = super.tryCall( - "getEpochEndDateForIndex", - "getEpochEndDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getEpochStartDateForIndex", - "getEpochStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getEpochStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getEpochStartDateForIndex", - "getEpochStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNominationPeriodStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getNominationPeriodStartDateForIndex", - "getNominationPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getNominationPeriodStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getNominationPeriodStartDateForIndex", - "getNominationPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNomineesAtEpoch(epochIndex: BigInt): Array
{ - let result = super.call( - "getNomineesAtEpoch", - "getNomineesAtEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toAddressArray(); - } - - try_getNomineesAtEpoch( - epochIndex: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getNomineesAtEpoch", - "getNomineesAtEpoch(uint256):(address[])", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotingPeriodStartDateForIndex(epochIndex: BigInt): BigInt { - let result = super.call( - "getVotingPeriodStartDateForIndex", - "getVotingPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - - return result[0].toBigInt(); - } - - try_getVotingPeriodStartDateForIndex( - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getVotingPeriodStartDateForIndex", - "getVotingPeriodStartDateForIndex(uint256):(uint64)", - [ethereum.Value.fromUnsignedBigInt(epochIndex)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVotedInEpoch(user: Address, epochIndex: BigInt): boolean { - let result = super.call( - "hasVotedInEpoch", - "hasVotedInEpoch(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBoolean(); - } - - try_hasVotedInEpoch( - user: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "hasVotedInEpoch", - "hasVotedInEpoch(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(user), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - wasNominated(candidate: Address, epochIndex: BigInt): boolean { - let result = super.call( - "wasNominated", - "wasNominated(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - - return result[0].toBoolean(); - } - - try_wasNominated( - candidate: Address, - epochIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "wasNominated", - "wasNominated(address,uint256):(bool)", - [ - ethereum.Value.fromAddress(candidate), - ethereum.Value.fromUnsignedBigInt(epochIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - calculateBallotId(candidates: Array
): Bytes { - let result = super.call( - "calculateBallotId", - "calculateBallotId(address[]):(bytes32)", - [ethereum.Value.fromAddressArray(candidates)] - ); - - return result[0].toBytes(); - } - - try_calculateBallotId( - candidates: Array
- ): ethereum.CallResult { - let result = super.tryCall( - "calculateBallotId", - "calculateBallotId(address[]):(bytes32)", - [ethereum.Value.fromAddressArray(candidates)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getBallotCandidates(ballotId: Bytes): Array
{ - let result = super.call( - "getBallotCandidates", - "getBallotCandidates(bytes32):(address[])", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - - return result[0].toAddressArray(); - } - - try_getBallotCandidates( - ballotId: Bytes - ): ethereum.CallResult> { - let result = super.tryCall( - "getBallotCandidates", - "getBallotCandidates(bytes32):(address[])", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getBallotVoted(user: Address): Bytes { - let result = super.call( - "getBallotVoted", - "getBallotVoted(address):(bytes32)", - [ethereum.Value.fromAddress(user)] - ); - - return result[0].toBytes(); - } - - try_getBallotVoted(user: Address): ethereum.CallResult { - let result = super.tryCall( - "getBallotVoted", - "getBallotVoted(address):(bytes32)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getBallotVotes(ballotId: Bytes): BigInt { - let result = super.call( - "getBallotVotes", - "getBallotVotes(bytes32):(uint256)", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - - return result[0].toBigInt(); - } - - try_getBallotVotes(ballotId: Bytes): ethereum.CallResult { - let result = super.tryCall( - "getBallotVotes", - "getBallotVotes(bytes32):(uint256)", - [ethereum.Value.fromFixedBytes(ballotId)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCandidateVotes(candidate: Address): BigInt { - let result = super.call( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - - return result[0].toBigInt(); - } - - try_getCandidateVotes(candidate: Address): ethereum.CallResult { - let result = super.tryCall( - "getCandidateVotes", - "getCandidateVotes(address):(uint256)", - [ethereum.Value.fromAddress(candidate)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCouncilMembers(): Array
{ - let result = super.call( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getCouncilMembers(): ethereum.CallResult> { - let result = super.tryCall( - "getCouncilMembers", - "getCouncilMembers():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getCouncilToken(): Address { - let result = super.call( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getCouncilToken(): ethereum.CallResult
{ - let result = super.tryCall( - "getCouncilToken", - "getCouncilToken():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getCrossChainDebtShareMerkleRoot(): Bytes { - let result = super.call( - "getCrossChainDebtShareMerkleRoot", - "getCrossChainDebtShareMerkleRoot():(bytes32)", - [] - ); - - return result[0].toBytes(); - } - - try_getCrossChainDebtShareMerkleRoot(): ethereum.CallResult { - let result = super.tryCall( - "getCrossChainDebtShareMerkleRoot", - "getCrossChainDebtShareMerkleRoot():(bytes32)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getCrossChainDebtShareMerkleRootBlockNumber(): BigInt { - let result = super.call( - "getCrossChainDebtShareMerkleRootBlockNumber", - "getCrossChainDebtShareMerkleRootBlockNumber():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getCrossChainDebtShareMerkleRootBlockNumber(): ethereum.CallResult< - BigInt - > { - let result = super.tryCall( - "getCrossChainDebtShareMerkleRootBlockNumber", - "getCrossChainDebtShareMerkleRootBlockNumber():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getCurrentPeriod(): BigInt { - let result = super.call( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getCurrentPeriod(): ethereum.CallResult { - let result = super.tryCall( - "getCurrentPeriod", - "getCurrentPeriod():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDebtShare(user: Address): BigInt { - let result = super.call("getDebtShare", "getDebtShare(address):(uint256)", [ - ethereum.Value.fromAddress(user) - ]); - - return result[0].toBigInt(); - } - - try_getDebtShare(user: Address): ethereum.CallResult { - let result = super.tryCall( - "getDebtShare", - "getDebtShare(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDebtShareContract(): Address { - let result = super.call( - "getDebtShareContract", - "getDebtShareContract():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getDebtShareContract(): ethereum.CallResult
{ - let result = super.tryCall( - "getDebtShareContract", - "getDebtShareContract():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getDebtShareSnapshotId(): BigInt { - let result = super.call( - "getDebtShareSnapshotId", - "getDebtShareSnapshotId():(uint128)", - [] - ); - - return result[0].toBigInt(); - } - - try_getDebtShareSnapshotId(): ethereum.CallResult { - let result = super.tryCall( - "getDebtShareSnapshotId", - "getDebtShareSnapshotId():(uint128)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDeclaredCrossChainDebtShare(user: Address): BigInt { - let result = super.call( - "getDeclaredCrossChainDebtShare", - "getDeclaredCrossChainDebtShare(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - - return result[0].toBigInt(); - } - - try_getDeclaredCrossChainDebtShare( - user: Address - ): ethereum.CallResult { - let result = super.tryCall( - "getDeclaredCrossChainDebtShare", - "getDeclaredCrossChainDebtShare(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getDefaultBallotEvaluationBatchSize(): BigInt { - let result = super.call( - "getDefaultBallotEvaluationBatchSize", - "getDefaultBallotEvaluationBatchSize():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_getDefaultBallotEvaluationBatchSize(): ethereum.CallResult { - let result = super.tryCall( - "getDefaultBallotEvaluationBatchSize", - "getDefaultBallotEvaluationBatchSize():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getElectionWinners(): Array
{ - let result = super.call( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - - return result[0].toAddressArray(); - } - - try_getElectionWinners(): ethereum.CallResult> { - let result = super.tryCall( - "getElectionWinners", - "getElectionWinners():(address[])", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getEpochEndDate(): BigInt { - let result = super.call( - "getEpochEndDate", - "getEpochEndDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getEpochEndDate(): ethereum.CallResult { - let result = super.tryCall( - "getEpochEndDate", - "getEpochEndDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochIndex(): BigInt { - let result = super.call("getEpochIndex", "getEpochIndex():(uint256)", []); - - return result[0].toBigInt(); - } - - try_getEpochIndex(): ethereum.CallResult { - let result = super.tryCall( - "getEpochIndex", - "getEpochIndex():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getEpochStartDate(): BigInt { - let result = super.call( - "getEpochStartDate", - "getEpochStartDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getEpochStartDate(): ethereum.CallResult { - let result = super.tryCall( - "getEpochStartDate", - "getEpochStartDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getMaxDateAdjustmenTolerance(): BigInt { - let result = super.call( - "getMaxDateAdjustmenTolerance", - "getMaxDateAdjustmenTolerance():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getMaxDateAdjustmenTolerance(): ethereum.CallResult { - let result = super.tryCall( - "getMaxDateAdjustmenTolerance", - "getMaxDateAdjustmenTolerance():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getMinEpochDurations(): ElectionModuleOld__getMinEpochDurationsResult { - let result = super.call( - "getMinEpochDurations", - "getMinEpochDurations():(uint64,uint64,uint64)", - [] - ); - - return new ElectionModuleOld__getMinEpochDurationsResult( - result[0].toBigInt(), - result[1].toBigInt(), - result[2].toBigInt() - ); - } - - try_getMinEpochDurations(): ethereum.CallResult< - ElectionModuleOld__getMinEpochDurationsResult - > { - let result = super.tryCall( - "getMinEpochDurations", - "getMinEpochDurations():(uint64,uint64,uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new ElectionModuleOld__getMinEpochDurationsResult( - value[0].toBigInt(), - value[1].toBigInt(), - value[2].toBigInt() - ) - ); - } - - getMinimumActiveMembers(): i32 { - let result = super.call( - "getMinimumActiveMembers", - "getMinimumActiveMembers():(uint8)", - [] - ); - - return result[0].toI32(); - } - - try_getMinimumActiveMembers(): ethereum.CallResult { - let result = super.tryCall( - "getMinimumActiveMembers", - "getMinimumActiveMembers():(uint8)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toI32()); - } - - getNextEpochSeatCount(): i32 { - let result = super.call( - "getNextEpochSeatCount", - "getNextEpochSeatCount():(uint8)", - [] - ); - - return result[0].toI32(); - } - - try_getNextEpochSeatCount(): ethereum.CallResult { - let result = super.tryCall( - "getNextEpochSeatCount", - "getNextEpochSeatCount():(uint8)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toI32()); - } - - getNominationPeriodStartDate(): BigInt { - let result = super.call( - "getNominationPeriodStartDate", - "getNominationPeriodStartDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getNominationPeriodStartDate(): ethereum.CallResult { - let result = super.tryCall( - "getNominationPeriodStartDate", - "getNominationPeriodStartDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getNominees(): Array
{ - let result = super.call("getNominees", "getNominees():(address[])", []); - - return result[0].toAddressArray(); - } - - try_getNominees(): ethereum.CallResult> { - let result = super.tryCall("getNominees", "getNominees():(address[])", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddressArray()); - } - - getVotePower(user: Address): BigInt { - let result = super.call("getVotePower", "getVotePower(address):(uint256)", [ - ethereum.Value.fromAddress(user) - ]); - - return result[0].toBigInt(); - } - - try_getVotePower(user: Address): ethereum.CallResult { - let result = super.tryCall( - "getVotePower", - "getVotePower(address):(uint256)", - [ethereum.Value.fromAddress(user)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getVotingPeriodStartDate(): BigInt { - let result = super.call( - "getVotingPeriodStartDate", - "getVotingPeriodStartDate():(uint64)", - [] - ); - - return result[0].toBigInt(); - } - - try_getVotingPeriodStartDate(): ethereum.CallResult { - let result = super.tryCall( - "getVotingPeriodStartDate", - "getVotingPeriodStartDate():(uint64)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - hasVoted(user: Address): boolean { - let result = super.call("hasVoted", "hasVoted(address):(bool)", [ - ethereum.Value.fromAddress(user) - ]); - - return result[0].toBoolean(); - } - - try_hasVoted(user: Address): ethereum.CallResult { - let result = super.tryCall("hasVoted", "hasVoted(address):(bool)", [ - ethereum.Value.fromAddress(user) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionEvaluated(): boolean { - let result = super.call( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionEvaluated(): ethereum.CallResult { - let result = super.tryCall( - "isElectionEvaluated", - "isElectionEvaluated():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isElectionModuleInitialized(): boolean { - let result = super.call( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isElectionModuleInitialized(): ethereum.CallResult { - let result = super.tryCall( - "isElectionModuleInitialized", - "isElectionModuleInitialized():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isNominated(candidate: Address): boolean { - let result = super.call("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - - return result[0].toBoolean(); - } - - try_isNominated(candidate: Address): ethereum.CallResult { - let result = super.tryCall("isNominated", "isNominated(address):(bool)", [ - ethereum.Value.fromAddress(candidate) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - isOwnerModuleInitialized(): boolean { - let result = super.call( - "isOwnerModuleInitialized", - "isOwnerModuleInitialized():(bool)", - [] - ); - - return result[0].toBoolean(); - } - - try_isOwnerModuleInitialized(): ethereum.CallResult { - let result = super.tryCall( - "isOwnerModuleInitialized", - "isOwnerModuleInitialized():(bool)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - nominatedOwner(): Address { - let result = super.call("nominatedOwner", "nominatedOwner():(address)", []); - - return result[0].toAddress(); - } - - try_nominatedOwner(): ethereum.CallResult
{ - let result = super.tryCall( - "nominatedOwner", - "nominatedOwner():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - owner(): Address { - let result = super.call("owner", "owner():(address)", []); - - return result[0].toAddress(); - } - - try_owner(): ethereum.CallResult
{ - let result = super.tryCall("owner", "owner():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - getImplementation(): Address { - let result = super.call( - "getImplementation", - "getImplementation():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_getImplementation(): ethereum.CallResult
{ - let result = super.tryCall( - "getImplementation", - "getImplementation():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } -} - -export class CastCall extends ethereum.Call { - get inputs(): CastCall__Inputs { - return new CastCall__Inputs(this); - } - - get outputs(): CastCall__Outputs { - return new CastCall__Outputs(this); - } -} - -export class CastCall__Inputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } - - get candidates(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class CastCall__Outputs { - _call: CastCall; - - constructor(call: CastCall) { - this._call = call; - } -} - -export class DeclareAndCastCall extends ethereum.Call { - get inputs(): DeclareAndCastCall__Inputs { - return new DeclareAndCastCall__Inputs(this); - } - - get outputs(): DeclareAndCastCall__Outputs { - return new DeclareAndCastCall__Outputs(this); - } -} - -export class DeclareAndCastCall__Inputs { - _call: DeclareAndCastCall; - - constructor(call: DeclareAndCastCall) { - this._call = call; - } - - get debtShare(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get merkleProof(): Array { - return this._call.inputValues[1].value.toBytesArray(); - } - - get candidates(): Array
{ - return this._call.inputValues[2].value.toAddressArray(); - } -} - -export class DeclareAndCastCall__Outputs { - _call: DeclareAndCastCall; - - constructor(call: DeclareAndCastCall) { - this._call = call; - } -} - -export class DeclareCrossChainDebtShareCall extends ethereum.Call { - get inputs(): DeclareCrossChainDebtShareCall__Inputs { - return new DeclareCrossChainDebtShareCall__Inputs(this); - } - - get outputs(): DeclareCrossChainDebtShareCall__Outputs { - return new DeclareCrossChainDebtShareCall__Outputs(this); - } -} - -export class DeclareCrossChainDebtShareCall__Inputs { - _call: DeclareCrossChainDebtShareCall; - - constructor(call: DeclareCrossChainDebtShareCall) { - this._call = call; - } - - get user(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get debtShare(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get merkleProof(): Array { - return this._call.inputValues[2].value.toBytesArray(); - } -} - -export class DeclareCrossChainDebtShareCall__Outputs { - _call: DeclareCrossChainDebtShareCall; - - constructor(call: DeclareCrossChainDebtShareCall) { - this._call = call; - } -} - -export class DismissMembersCall extends ethereum.Call { - get inputs(): DismissMembersCall__Inputs { - return new DismissMembersCall__Inputs(this); - } - - get outputs(): DismissMembersCall__Outputs { - return new DismissMembersCall__Outputs(this); - } -} - -export class DismissMembersCall__Inputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } - - get membersToDismiss(): Array
{ - return this._call.inputValues[0].value.toAddressArray(); - } -} - -export class DismissMembersCall__Outputs { - _call: DismissMembersCall; - - constructor(call: DismissMembersCall) { - this._call = call; - } -} - -export class EvaluateCall extends ethereum.Call { - get inputs(): EvaluateCall__Inputs { - return new EvaluateCall__Inputs(this); - } - - get outputs(): EvaluateCall__Outputs { - return new EvaluateCall__Outputs(this); - } -} - -export class EvaluateCall__Inputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } - - get numBallots(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class EvaluateCall__Outputs { - _call: EvaluateCall; - - constructor(call: EvaluateCall) { - this._call = call; - } -} - -export class InitializeElectionModuleCall extends ethereum.Call { - get inputs(): InitializeElectionModuleCall__Inputs { - return new InitializeElectionModuleCall__Inputs(this); - } - - get outputs(): InitializeElectionModuleCall__Outputs { - return new InitializeElectionModuleCall__Outputs(this); - } -} - -export class InitializeElectionModuleCall__Inputs { - _call: InitializeElectionModuleCall; - - constructor(call: InitializeElectionModuleCall) { - this._call = call; - } - - get councilTokenName(): string { - return this._call.inputValues[0].value.toString(); - } - - get councilTokenSymbol(): string { - return this._call.inputValues[1].value.toString(); - } - - get firstCouncil(): Array
{ - return this._call.inputValues[2].value.toAddressArray(); - } - - get minimumActiveMembers(): i32 { - return this._call.inputValues[3].value.toI32(); - } - - get nominationPeriodStartDate(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get votingPeriodStartDate(): BigInt { - return this._call.inputValues[5].value.toBigInt(); - } - - get epochEndDate(): BigInt { - return this._call.inputValues[6].value.toBigInt(); - } - - get debtShareContract(): Address { - return this._call.inputValues[7].value.toAddress(); - } -} - -export class InitializeElectionModuleCall__Outputs { - _call: InitializeElectionModuleCall; - - constructor(call: InitializeElectionModuleCall) { - this._call = call; - } -} - -export class ModifyEpochScheduleCall extends ethereum.Call { - get inputs(): ModifyEpochScheduleCall__Inputs { - return new ModifyEpochScheduleCall__Inputs(this); - } - - get outputs(): ModifyEpochScheduleCall__Outputs { - return new ModifyEpochScheduleCall__Outputs(this); - } -} - -export class ModifyEpochScheduleCall__Inputs { - _call: ModifyEpochScheduleCall; - - constructor(call: ModifyEpochScheduleCall) { - this._call = call; - } - - get newNominationPeriodStartDate(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newVotingPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newEpochEndDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class ModifyEpochScheduleCall__Outputs { - _call: ModifyEpochScheduleCall; - - constructor(call: ModifyEpochScheduleCall) { - this._call = call; - } -} - -export class NominateCall extends ethereum.Call { - get inputs(): NominateCall__Inputs { - return new NominateCall__Inputs(this); - } - - get outputs(): NominateCall__Outputs { - return new NominateCall__Outputs(this); - } -} - -export class NominateCall__Inputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class NominateCall__Outputs { - _call: NominateCall; - - constructor(call: NominateCall) { - this._call = call; - } -} - -export class ResolveCall extends ethereum.Call { - get inputs(): ResolveCall__Inputs { - return new ResolveCall__Inputs(this); - } - - get outputs(): ResolveCall__Outputs { - return new ResolveCall__Outputs(this); - } -} - -export class ResolveCall__Inputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class ResolveCall__Outputs { - _call: ResolveCall; - - constructor(call: ResolveCall) { - this._call = call; - } -} - -export class SetCrossChainDebtShareMerkleRootCall extends ethereum.Call { - get inputs(): SetCrossChainDebtShareMerkleRootCall__Inputs { - return new SetCrossChainDebtShareMerkleRootCall__Inputs(this); - } - - get outputs(): SetCrossChainDebtShareMerkleRootCall__Outputs { - return new SetCrossChainDebtShareMerkleRootCall__Outputs(this); - } -} - -export class SetCrossChainDebtShareMerkleRootCall__Inputs { - _call: SetCrossChainDebtShareMerkleRootCall; - - constructor(call: SetCrossChainDebtShareMerkleRootCall) { - this._call = call; - } - - get merkleRoot(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get blocknumber(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class SetCrossChainDebtShareMerkleRootCall__Outputs { - _call: SetCrossChainDebtShareMerkleRootCall; - - constructor(call: SetCrossChainDebtShareMerkleRootCall) { - this._call = call; - } -} - -export class SetDebtShareContractCall extends ethereum.Call { - get inputs(): SetDebtShareContractCall__Inputs { - return new SetDebtShareContractCall__Inputs(this); - } - - get outputs(): SetDebtShareContractCall__Outputs { - return new SetDebtShareContractCall__Outputs(this); - } -} - -export class SetDebtShareContractCall__Inputs { - _call: SetDebtShareContractCall; - - constructor(call: SetDebtShareContractCall) { - this._call = call; - } - - get debtShareContract(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SetDebtShareContractCall__Outputs { - _call: SetDebtShareContractCall; - - constructor(call: SetDebtShareContractCall) { - this._call = call; - } -} - -export class SetDebtShareSnapshotIdCall extends ethereum.Call { - get inputs(): SetDebtShareSnapshotIdCall__Inputs { - return new SetDebtShareSnapshotIdCall__Inputs(this); - } - - get outputs(): SetDebtShareSnapshotIdCall__Outputs { - return new SetDebtShareSnapshotIdCall__Outputs(this); - } -} - -export class SetDebtShareSnapshotIdCall__Inputs { - _call: SetDebtShareSnapshotIdCall; - - constructor(call: SetDebtShareSnapshotIdCall) { - this._call = call; - } - - get snapshotId(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetDebtShareSnapshotIdCall__Outputs { - _call: SetDebtShareSnapshotIdCall; - - constructor(call: SetDebtShareSnapshotIdCall) { - this._call = call; - } -} - -export class SetDefaultBallotEvaluationBatchSizeCall extends ethereum.Call { - get inputs(): SetDefaultBallotEvaluationBatchSizeCall__Inputs { - return new SetDefaultBallotEvaluationBatchSizeCall__Inputs(this); - } - - get outputs(): SetDefaultBallotEvaluationBatchSizeCall__Outputs { - return new SetDefaultBallotEvaluationBatchSizeCall__Outputs(this); - } -} - -export class SetDefaultBallotEvaluationBatchSizeCall__Inputs { - _call: SetDefaultBallotEvaluationBatchSizeCall; - - constructor(call: SetDefaultBallotEvaluationBatchSizeCall) { - this._call = call; - } - - get newDefaultBallotEvaluationBatchSize(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetDefaultBallotEvaluationBatchSizeCall__Outputs { - _call: SetDefaultBallotEvaluationBatchSizeCall; - - constructor(call: SetDefaultBallotEvaluationBatchSizeCall) { - this._call = call; - } -} - -export class SetMaxDateAdjustmentToleranceCall extends ethereum.Call { - get inputs(): SetMaxDateAdjustmentToleranceCall__Inputs { - return new SetMaxDateAdjustmentToleranceCall__Inputs(this); - } - - get outputs(): SetMaxDateAdjustmentToleranceCall__Outputs { - return new SetMaxDateAdjustmentToleranceCall__Outputs(this); - } -} - -export class SetMaxDateAdjustmentToleranceCall__Inputs { - _call: SetMaxDateAdjustmentToleranceCall; - - constructor(call: SetMaxDateAdjustmentToleranceCall) { - this._call = call; - } - - get newMaxDateAdjustmentTolerance(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class SetMaxDateAdjustmentToleranceCall__Outputs { - _call: SetMaxDateAdjustmentToleranceCall; - - constructor(call: SetMaxDateAdjustmentToleranceCall) { - this._call = call; - } -} - -export class SetMinEpochDurationsCall extends ethereum.Call { - get inputs(): SetMinEpochDurationsCall__Inputs { - return new SetMinEpochDurationsCall__Inputs(this); - } - - get outputs(): SetMinEpochDurationsCall__Outputs { - return new SetMinEpochDurationsCall__Outputs(this); - } -} - -export class SetMinEpochDurationsCall__Inputs { - _call: SetMinEpochDurationsCall; - - constructor(call: SetMinEpochDurationsCall) { - this._call = call; - } - - get newMinNominationPeriodDuration(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newMinVotingPeriodDuration(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newMinEpochDuration(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class SetMinEpochDurationsCall__Outputs { - _call: SetMinEpochDurationsCall; - - constructor(call: SetMinEpochDurationsCall) { - this._call = call; - } -} - -export class SetMinimumActiveMembersCall extends ethereum.Call { - get inputs(): SetMinimumActiveMembersCall__Inputs { - return new SetMinimumActiveMembersCall__Inputs(this); - } - - get outputs(): SetMinimumActiveMembersCall__Outputs { - return new SetMinimumActiveMembersCall__Outputs(this); - } -} - -export class SetMinimumActiveMembersCall__Inputs { - _call: SetMinimumActiveMembersCall; - - constructor(call: SetMinimumActiveMembersCall) { - this._call = call; - } - - get newMinimumActiveMembers(): i32 { - return this._call.inputValues[0].value.toI32(); - } -} - -export class SetMinimumActiveMembersCall__Outputs { - _call: SetMinimumActiveMembersCall; - - constructor(call: SetMinimumActiveMembersCall) { - this._call = call; - } -} - -export class SetNextEpochSeatCountCall extends ethereum.Call { - get inputs(): SetNextEpochSeatCountCall__Inputs { - return new SetNextEpochSeatCountCall__Inputs(this); - } - - get outputs(): SetNextEpochSeatCountCall__Outputs { - return new SetNextEpochSeatCountCall__Outputs(this); - } -} - -export class SetNextEpochSeatCountCall__Inputs { - _call: SetNextEpochSeatCountCall; - - constructor(call: SetNextEpochSeatCountCall) { - this._call = call; - } - - get newSeatCount(): i32 { - return this._call.inputValues[0].value.toI32(); - } -} - -export class SetNextEpochSeatCountCall__Outputs { - _call: SetNextEpochSeatCountCall; - - constructor(call: SetNextEpochSeatCountCall) { - this._call = call; - } -} - -export class TweakEpochScheduleCall extends ethereum.Call { - get inputs(): TweakEpochScheduleCall__Inputs { - return new TweakEpochScheduleCall__Inputs(this); - } - - get outputs(): TweakEpochScheduleCall__Outputs { - return new TweakEpochScheduleCall__Outputs(this); - } -} - -export class TweakEpochScheduleCall__Inputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } - - get newNominationPeriodStartDate(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get newVotingPeriodStartDate(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get newEpochEndDate(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class TweakEpochScheduleCall__Outputs { - _call: TweakEpochScheduleCall; - - constructor(call: TweakEpochScheduleCall) { - this._call = call; - } -} - -export class UpgradeCouncilTokenCall extends ethereum.Call { - get inputs(): UpgradeCouncilTokenCall__Inputs { - return new UpgradeCouncilTokenCall__Inputs(this); - } - - get outputs(): UpgradeCouncilTokenCall__Outputs { - return new UpgradeCouncilTokenCall__Outputs(this); - } -} - -export class UpgradeCouncilTokenCall__Inputs { - _call: UpgradeCouncilTokenCall; - - constructor(call: UpgradeCouncilTokenCall) { - this._call = call; - } - - get newCouncilTokenImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class UpgradeCouncilTokenCall__Outputs { - _call: UpgradeCouncilTokenCall; - - constructor(call: UpgradeCouncilTokenCall) { - this._call = call; - } -} - -export class WithdrawNominationCall extends ethereum.Call { - get inputs(): WithdrawNominationCall__Inputs { - return new WithdrawNominationCall__Inputs(this); - } - - get outputs(): WithdrawNominationCall__Outputs { - return new WithdrawNominationCall__Outputs(this); - } -} - -export class WithdrawNominationCall__Inputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawNominationCall__Outputs { - _call: WithdrawNominationCall; - - constructor(call: WithdrawNominationCall) { - this._call = call; - } -} - -export class WithdrawVoteCall extends ethereum.Call { - get inputs(): WithdrawVoteCall__Inputs { - return new WithdrawVoteCall__Inputs(this); - } - - get outputs(): WithdrawVoteCall__Outputs { - return new WithdrawVoteCall__Outputs(this); - } -} - -export class WithdrawVoteCall__Inputs { - _call: WithdrawVoteCall; - - constructor(call: WithdrawVoteCall) { - this._call = call; - } -} - -export class WithdrawVoteCall__Outputs { - _call: WithdrawVoteCall; - - constructor(call: WithdrawVoteCall) { - this._call = call; - } -} - -export class AcceptOwnershipCall extends ethereum.Call { - get inputs(): AcceptOwnershipCall__Inputs { - return new AcceptOwnershipCall__Inputs(this); - } - - get outputs(): AcceptOwnershipCall__Outputs { - return new AcceptOwnershipCall__Outputs(this); - } -} - -export class AcceptOwnershipCall__Inputs { - _call: AcceptOwnershipCall; - - constructor(call: AcceptOwnershipCall) { - this._call = call; - } -} - -export class AcceptOwnershipCall__Outputs { - _call: AcceptOwnershipCall; - - constructor(call: AcceptOwnershipCall) { - this._call = call; - } -} - -export class InitializeOwnerModuleCall extends ethereum.Call { - get inputs(): InitializeOwnerModuleCall__Inputs { - return new InitializeOwnerModuleCall__Inputs(this); - } - - get outputs(): InitializeOwnerModuleCall__Outputs { - return new InitializeOwnerModuleCall__Outputs(this); - } -} - -export class InitializeOwnerModuleCall__Inputs { - _call: InitializeOwnerModuleCall; - - constructor(call: InitializeOwnerModuleCall) { - this._call = call; - } - - get initialOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class InitializeOwnerModuleCall__Outputs { - _call: InitializeOwnerModuleCall; - - constructor(call: InitializeOwnerModuleCall) { - this._call = call; - } -} - -export class NominateNewOwnerCall extends ethereum.Call { - get inputs(): NominateNewOwnerCall__Inputs { - return new NominateNewOwnerCall__Inputs(this); - } - - get outputs(): NominateNewOwnerCall__Outputs { - return new NominateNewOwnerCall__Outputs(this); - } -} - -export class NominateNewOwnerCall__Inputs { - _call: NominateNewOwnerCall; - - constructor(call: NominateNewOwnerCall) { - this._call = call; - } - - get newNominatedOwner(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class NominateNewOwnerCall__Outputs { - _call: NominateNewOwnerCall; - - constructor(call: NominateNewOwnerCall) { - this._call = call; - } -} - -export class RenounceNominationCall extends ethereum.Call { - get inputs(): RenounceNominationCall__Inputs { - return new RenounceNominationCall__Inputs(this); - } - - get outputs(): RenounceNominationCall__Outputs { - return new RenounceNominationCall__Outputs(this); - } -} - -export class RenounceNominationCall__Inputs { - _call: RenounceNominationCall; - - constructor(call: RenounceNominationCall) { - this._call = call; - } -} - -export class RenounceNominationCall__Outputs { - _call: RenounceNominationCall; - - constructor(call: RenounceNominationCall) { - this._call = call; - } -} - -export class SimulateUpgradeToCall extends ethereum.Call { - get inputs(): SimulateUpgradeToCall__Inputs { - return new SimulateUpgradeToCall__Inputs(this); - } - - get outputs(): SimulateUpgradeToCall__Outputs { - return new SimulateUpgradeToCall__Outputs(this); - } -} - -export class SimulateUpgradeToCall__Inputs { - _call: SimulateUpgradeToCall; - - constructor(call: SimulateUpgradeToCall) { - this._call = call; - } - - get newImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class SimulateUpgradeToCall__Outputs { - _call: SimulateUpgradeToCall; - - constructor(call: SimulateUpgradeToCall) { - this._call = call; - } -} - -export class UpgradeToCall extends ethereum.Call { - get inputs(): UpgradeToCall__Inputs { - return new UpgradeToCall__Inputs(this); - } - - get outputs(): UpgradeToCall__Outputs { - return new UpgradeToCall__Outputs(this); - } -} - -export class UpgradeToCall__Inputs { - _call: UpgradeToCall; - - constructor(call: UpgradeToCall) { - this._call = call; - } - - get newImplementation(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class UpgradeToCall__Outputs { - _call: UpgradeToCall; - - constructor(call: UpgradeToCall) { - this._call = call; - } -} diff --git a/governance/subgraph/generated/schema.ts b/governance/subgraph/generated/schema.ts deleted file mode 100644 index 87f4305bc..000000000 --- a/governance/subgraph/generated/schema.ts +++ /dev/null @@ -1,467 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - TypedMap, - Entity, - Value, - ValueKind, - store, - Bytes, - BigInt, - BigDecimal -} from "@graphprotocol/graph-ts"; - -export class NominationWithdrawn extends Entity { - constructor(id: Bytes) { - super(); - this.set("id", Value.fromBytes(id)); - } - - save(): void { - let id = this.get("id"); - assert(id != null, "Cannot save NominationWithdrawn entity without an ID"); - if (id) { - assert( - id.kind == ValueKind.BYTES, - `Entities of type NominationWithdrawn must have an ID of type Bytes but the id '${id.displayData()}' is of type ${id.displayKind()}` - ); - store.set("NominationWithdrawn", id.toBytes().toHexString(), this); - } - } - - static loadInBlock(id: Bytes): NominationWithdrawn | null { - return changetype( - store.get_in_block("NominationWithdrawn", id.toHexString()) - ); - } - - static load(id: Bytes): NominationWithdrawn | null { - return changetype( - store.get("NominationWithdrawn", id.toHexString()) - ); - } - - get id(): Bytes { - let value = this.get("id"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBytes(); - } - } - - set id(value: Bytes) { - this.set("id", Value.fromBytes(value)); - } - - get candidate(): Bytes { - let value = this.get("candidate"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBytes(); - } - } - - set candidate(value: Bytes) { - this.set("candidate", Value.fromBytes(value)); - } - - get epochId(): BigInt { - let value = this.get("epochId"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBigInt(); - } - } - - set epochId(value: BigInt) { - this.set("epochId", Value.fromBigInt(value)); - } - - get blockNumber(): BigInt { - let value = this.get("blockNumber"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBigInt(); - } - } - - set blockNumber(value: BigInt) { - this.set("blockNumber", Value.fromBigInt(value)); - } - - get blockTimestamp(): BigInt { - let value = this.get("blockTimestamp"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBigInt(); - } - } - - set blockTimestamp(value: BigInt) { - this.set("blockTimestamp", Value.fromBigInt(value)); - } - - get transactionHash(): Bytes { - let value = this.get("transactionHash"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBytes(); - } - } - - set transactionHash(value: Bytes) { - this.set("transactionHash", Value.fromBytes(value)); - } -} - -export class VoteRecorded extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert(id != null, "Cannot save VoteRecorded entity without an ID"); - if (id) { - assert( - id.kind == ValueKind.STRING, - `Entities of type VoteRecorded must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}` - ); - store.set("VoteRecorded", id.toString(), this); - } - } - - static loadInBlock(id: string): VoteRecorded | null { - return changetype( - store.get_in_block("VoteRecorded", id) - ); - } - - static load(id: string): VoteRecorded | null { - return changetype(store.get("VoteRecorded", id)); - } - - get id(): string { - let value = this.get("id"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toString(); - } - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get voter(): string { - let value = this.get("voter"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toString(); - } - } - - set voter(value: string) { - this.set("voter", Value.fromString(value)); - } - - get chainId(): BigInt { - let value = this.get("chainId"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBigInt(); - } - } - - set chainId(value: BigInt) { - this.set("chainId", Value.fromBigInt(value)); - } - - get epochId(): BigInt { - let value = this.get("epochId"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBigInt(); - } - } - - set epochId(value: BigInt) { - this.set("epochId", Value.fromBigInt(value)); - } - - get votePower(): BigDecimal { - let value = this.get("votePower"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBigDecimal(); - } - } - - set votePower(value: BigDecimal) { - this.set("votePower", Value.fromBigDecimal(value)); - } - - get blockNumber(): BigInt { - let value = this.get("blockNumber"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBigInt(); - } - } - - set blockNumber(value: BigInt) { - this.set("blockNumber", Value.fromBigInt(value)); - } - - get contract(): string { - let value = this.get("contract"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toString(); - } - } - - set contract(value: string) { - this.set("contract", Value.fromString(value)); - } -} - -export class VoteResult extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert(id != null, "Cannot save VoteResult entity without an ID"); - if (id) { - assert( - id.kind == ValueKind.STRING, - `Entities of type VoteResult must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}` - ); - store.set("VoteResult", id.toString(), this); - } - } - - static loadInBlock(id: string): VoteResult | null { - return changetype(store.get_in_block("VoteResult", id)); - } - - static load(id: string): VoteResult | null { - return changetype(store.get("VoteResult", id)); - } - - get id(): string { - let value = this.get("id"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toString(); - } - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get epochId(): string { - let value = this.get("epochId"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toString(); - } - } - - set epochId(value: string) { - this.set("epochId", Value.fromString(value)); - } - - get votePower(): BigDecimal { - let value = this.get("votePower"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBigDecimal(); - } - } - - set votePower(value: BigDecimal) { - this.set("votePower", Value.fromBigDecimal(value)); - } - - get contract(): string { - let value = this.get("contract"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toString(); - } - } - - set contract(value: string) { - this.set("contract", Value.fromString(value)); - } - - get voteCount(): BigInt { - let value = this.get("voteCount"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBigInt(); - } - } - - set voteCount(value: BigInt) { - this.set("voteCount", Value.fromBigInt(value)); - } - - get voter(): string | null { - let value = this.get("voter"); - if (!value || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set voter(value: string | null) { - if (!value) { - this.unset("voter"); - } else { - this.set("voter", Value.fromString(value)); - } - } - - get candidate(): string | null { - let value = this.get("candidate"); - if (!value || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toString(); - } - } - - set candidate(value: string | null) { - if (!value) { - this.unset("candidate"); - } else { - this.set("candidate", Value.fromString(value)); - } - } -} - -export class User extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert(id != null, "Cannot save User entity without an ID"); - if (id) { - assert( - id.kind == ValueKind.STRING, - `Entities of type User must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}` - ); - store.set("User", id.toString(), this); - } - } - - static loadInBlock(id: string): User | null { - return changetype(store.get_in_block("User", id)); - } - - static load(id: string): User | null { - return changetype(store.get("User", id)); - } - - get id(): string { - let value = this.get("id"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toString(); - } - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get nominationCount(): BigInt { - let value = this.get("nominationCount"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBigInt(); - } - } - - set nominationCount(value: BigInt) { - this.set("nominationCount", Value.fromBigInt(value)); - } - - get votingCount(): BigInt { - let value = this.get("votingCount"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBigInt(); - } - } - - set votingCount(value: BigInt) { - this.set("votingCount", Value.fromBigInt(value)); - } - - get memberIn(): Array | null { - let value = this.get("memberIn"); - if (!value || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toStringArray(); - } - } - - set memberIn(value: Array | null) { - if (!value) { - this.unset("memberIn"); - } else { - this.set("memberIn", Value.fromStringArray(>value)); - } - } - - get kickedOut(): Array | null { - let value = this.get("kickedOut"); - if (!value || value.kind == ValueKind.NULL) { - return null; - } else { - return value.toStringArray(); - } - } - - set kickedOut(value: Array | null) { - if (!value) { - this.unset("kickedOut"); - } else { - this.set("kickedOut", Value.fromStringArray(>value)); - } - } -} diff --git a/governance/subgraph/matchstick.yaml b/governance/subgraph/matchstick.yaml deleted file mode 100644 index 296f9c225..000000000 --- a/governance/subgraph/matchstick.yaml +++ /dev/null @@ -1,2 +0,0 @@ -libsFolder: ../../node_modules/ -manifestPath: ./subgraph.yaml diff --git a/governance/subgraph/networks.json b/governance/subgraph/networks.json deleted file mode 100644 index fbd68f7c3..000000000 --- a/governance/subgraph/networks.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "sepolia": { - "Spartan-Old": { - "address": "0x0000000000000000000000000000000000000000", - "startBlock": 5141719 - }, - "Spartan": { - "address": "0xDAA5A8bFDEBcA03cCAF0d5285265A7d7Fbb42e15", - "startBlock": 5141719 - }, - "Ambassador-Old": { - "address": "0x0000000000000000000000000000000000000000", - "startBlock": 5141719 - }, - "Ambassador": { - "address": "0x9abCc1d560C1af4Cf8a84D80AE5E35a24C1f38FA", - "startBlock": 5141719 - }, - "Grants-Old": { - "address": "0x0000000000000000000000000000000000000000", - "startBlock": 5141719 - }, - "Grants": { - "address": "0x8A3bA910172c4b77BF4c52d04bA1a59b963700ec", - "startBlock": 5141719 - }, - "Treasury-Old": { - "address": "0x0000000000000000000000000000000000000000", - "startBlock": 5141719 - }, - "Treasury": { - "address": "0x01fa5a659da52fa0ae26bc60698b2760b745d910", - "startBlock": 5141719 - } - }, - "optimism": { - "Spartan-Old": { - "address": "0xE832C302D1160EAe57045eb9d9Ea14daBd2E229c", - "startBlock": 113442424 - }, - "Spartan": { - "address": "0xDAA5A8bFDEBcA03cCAF0d5285265A7d7Fbb42e15", - "startBlock": 115332259 - }, - "Ambassador-Old": { - "address": "0x37fAc8c146889333734015B0C942b620aCfeeff8", - "startBlock": 113442424 - }, - "Ambassador": { - "address": "0x9abCc1d560C1af4Cf8a84D80AE5E35a24C1f38FA", - "startBlock": 115332259 - }, - "Grants-Old": { - "address": "0x6891FfAA59c0Ce04b4E3C6eaa50CFc5E2fc77b77", - "startBlock": 113442424 - }, - "Grants": { - "address": "0x8A3bA910172c4b77BF4c52d04bA1a59b963700ec", - "startBlock": 115332259 - }, - "Treasury-Old": { - "address": "0x37fAc8c146889333734015B0C942b620aCfeeff8", - "startBlock": 113442424 - }, - "Treasury": { - "address": "0x6cC6050bE3214D14DB46188e5df59bDEAE97a42a", - "startBlock": 115332259 - } - } -} diff --git a/governance/subgraph/package.json b/governance/subgraph/package.json deleted file mode 100644 index c22a30014..000000000 --- a/governance/subgraph/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@synthetixio/governance-subgraph", - "license": "UNLICENSED", - "scripts": { - "graphgen": "graph codegen", - "build": "yarn copy:manifest && graph build", - "copy:manifest": "cp subgraph.base.yaml ./subgraph.yaml", - "build:optimism": "yarn copy:manifest && graph codegen && graph build --output-dir ./build/optimism --network optimism", - "deploy:optimism": "yarn copy:manifest && graph deploy --output-dir ./build/optimism --network optimism synthetixio-governance-subgraph --version-label v0.0.1 --node https://subgraphs.alchemy.com/api/subgraphs/deploy --deploy-key ${SUBGRAPH_KEY} --ipfs https://ipfs.satsuma.xyz --output-dir ./build/optimism --network optimism", - "build:sepolia": "yarn copy:manifest && graph codegen && graph build --output-dir ./build/sepolia --network sepolia", - "deploy:sepolia": "yarn copy:manifest && graph deploy --output-dir ./build/sepolia --network sepolia synthetixio-governance-subgraph-sepolia --version-label v0.0.1 --node https://subgraphs.alchemy.com/api/subgraphs/deploy --deploy-key ${SUBGRAPH_KEY} --ipfs https://ipfs.satsuma.xyz", - "test": "graph test" - }, - "dependencies": { - "@graphprotocol/graph-cli": "0.61.0", - "@graphprotocol/graph-ts": "0.30.0" - }, - "devDependencies": { - "matchstick-as": "0.5.0" - } -} diff --git a/governance/subgraph/schema.graphql b/governance/subgraph/schema.graphql deleted file mode 100644 index 59eec06a8..000000000 --- a/governance/subgraph/schema.graphql +++ /dev/null @@ -1,36 +0,0 @@ -type NominationWithdrawn @entity { - id: Bytes! - candidate: Bytes! # address - epochId: BigInt! # uint256 - blockNumber: BigInt! - blockTimestamp: BigInt! - transactionHash: Bytes! -} - -type VoteRecorded @entity { - id: String! - voter: String! # address - chainId: BigInt! # uint256 - epochId: BigInt! # uint256 - votePower: BigDecimal! # uint256 - blockNumber: BigInt! - contract: String! -} - -type VoteResult @entity { - id: ID! - epochId: String! - votePower: BigDecimal! - contract: String! - voteCount: BigInt! - voter: String - candidate: String -} - -type User @entity { - id: String! - nominationCount: BigInt! - votingCount: BigInt! - memberIn: [String!] - kickedOut: [String!] -} diff --git a/governance/subgraph/src/election-module.ts b/governance/subgraph/src/election-module.ts deleted file mode 100644 index 384126a59..000000000 --- a/governance/subgraph/src/election-module.ts +++ /dev/null @@ -1,310 +0,0 @@ -import { - CandidateNominated as CandidateNominatedEvent, - CouncilMemberAdded as CouncilMemberAddedEvent, - CouncilMembersDismissed as CouncilMembersDismissedEvent, - NominationWithdrawn as NominationWithdrawnEvent, - VoteRecorded as VoteRecordedEvent, -} from '../generated/ElectionModule/ElectionModule'; -import { - VoteRecorded as VoteRecordedOldEvent, - VoteWithdrawn as VoteWithdrawnOldEvent, - NominationWithdrawn as NominationWithdrawnOldEvent, - CandidateNominated as CandidateNominatedOldEvent, - CouncilMemberAdded as CouncilMemberAddedOldEvent, - CouncilMembersDismissed as CouncilMembersDismissedOldEvent, -} from '../generated/Spartan/ElectionModuleOld'; -import { VoteRecorded, User, VoteResult } from '../generated/schema'; -import { store, BigInt, log, BigDecimal } from '@graphprotocol/graph-ts'; - -// Old Subgraph handlers - -export const ZERO_BI = BigInt.fromI32(0); -export const ONE_BI = BigInt.fromI32(1); - -export function handleCouncilMemberAddedOld(event: CouncilMemberAddedOldEvent): void { - let user = User.load(event.params.member.toHexString()); - if (user) { - const temp = user.memberIn; - temp!.push(event.address.toHexString()); - user.memberIn = temp; - } else { - user = new User(event.params.member.toHexString()); - user.nominationCount = ONE_BI; - user.votingCount = ZERO_BI; - user.memberIn = []; - user.kickedOut = []; - } - user.save(); -} - -export function handleCouncilMembersDismissedOld(event: CouncilMembersDismissedOldEvent): void { - for (let index = 0; index < event.params.members.length; index++) { - let user = User.load(event.params.members[index].toHexString()); - if (user) { - const temp = user.kickedOut; - temp!.push(event.address.toHexString()); - user.kickedOut = temp; - } else { - user = new User(event.params.members[index].toHexString()); - user.nominationCount = ONE_BI; - user.votingCount = ZERO_BI; - user.memberIn = []; - user.kickedOut = []; - } - user.save(); - } -} - -export function handleCandidateNominatedOld(event: CandidateNominatedOldEvent): void { - let user = User.load(event.params.candidate.toHexString()); - if (user) { - user.nominationCount = user.nominationCount.plus(ONE_BI); - } else { - user = new User(event.params.candidate.toHexString()); - user.nominationCount = ONE_BI; - user.votingCount = ZERO_BI; - user.memberIn = []; - user.kickedOut = []; - } - user.save(); -} - -export function handleNominationWithdrawnOld(event: NominationWithdrawnOldEvent): void { - const user = User.load(event.params.candidate.toHexString()); - if (user) { - user.nominationCount = user.nominationCount.minus(ONE_BI); - user.save(); - } else { - log.critical('user withdrew without being nominated {}', [ - event.params.candidate.toHexString(), - ]); - } -} - -export function handleVoteRecordedOld(event: VoteRecordedOldEvent): void { - const voteRecord = new VoteRecorded( - event.params.voter - .toHexString() - .concat('-') - .concat(event.address.toHexString()) - .concat('-') - .concat(event.params.epochIndex.toString()) - .concat('-') - .concat('10') - ); - const votePower = BigDecimal.fromString(event.params.votePower.toString()); - - voteRecord.voter = event.params.voter.toHexString(); - voteRecord.chainId = BigInt.fromI32(10); - voteRecord.epochId = event.params.epochIndex; - voteRecord.votePower = votePower; - voteRecord.blockNumber = event.block.number; - voteRecord.contract = event.address.toHexString(); - voteRecord.save(); - - let user = User.load(event.params.voter.toHexString()); - if (user) { - user.votingCount = user.votingCount.plus(ONE_BI); - } else { - user = new User(event.params.voter.toHexString()); - user.nominationCount = ZERO_BI; - user.votingCount = ONE_BI; - user.memberIn = []; - user.kickedOut = []; - } - user.save(); - - const resultId = event.params.voter - .toHexString() - .concat('-') - .concat('10') - .concat('-') - .concat(event.address.toHexString()) - .concat('-') - .concat(event.params.epochIndex.toString()); - let result = VoteResult.load(resultId); - - if (result == null) { - result = new VoteResult(resultId); - result.epochId = event.params.epochIndex.toString(); - result.votePower = BigDecimal.fromString('0'); - result.voteCount = BigInt.fromI32(0); - result.contract = event.address.toHexString(); - } - result.voter = event.params.voter.toHexString(); - result.votePower = result.votePower.plus(votePower); - result.voteCount = result.voteCount.plus(ONE_BI); - result.save(); -} - -export function handleVoteWithdrawnOld(event: VoteWithdrawnOldEvent): void { - store.remove( - 'VoteRecorded', - event.params.voter - .toHexString() - .concat('-') - .concat(event.address.toHexString()) - .concat('-') - .concat(event.params.epochIndex.toString()) - .concat('-') - .concat('10') - ); - - const user = User.load(event.params.voter.toHexString()); - if (user) { - user.votingCount = user.votingCount.minus(ONE_BI); - user.save(); - } - - const resultId = event.params.voter - .toHexString() - .concat('-') - .concat('10') - .concat('-') - .concat(event.address.toHexString()) - .concat('-') - .concat(event.params.epochIndex.toString()); - const result = VoteResult.load(resultId); - - if (!!result) { - result.votePower = result.votePower.minus(event.params.votePower.toBigDecimal()); - result.voteCount = result.voteCount.minus(ONE_BI); - if (result.voteCount.equals(ZERO_BI)) { - store.remove('VoteResult', resultId); - } else { - result.save(); - } - } -} - -// End of old Subgraph handlers - -export function handleCandidateNominated(event: CandidateNominatedEvent): void { - let user = User.load(event.params.candidate.toHexString()); - if (user) { - user.nominationCount = user.nominationCount.plus(ONE_BI); - } else { - user = new User(event.params.candidate.toHexString()); - user.nominationCount = ONE_BI; - user.votingCount = ZERO_BI; - user.memberIn = []; - user.kickedOut = []; - } - user.save(); -} - -export function handleCouncilMemberAdded(event: CouncilMemberAddedEvent): void { - let user = User.load(event.params.member.toHexString()); - if (user) { - const temp = user.memberIn; - temp!.push(event.address.toHexString()); - user.memberIn = temp; - } else { - user = new User(event.params.member.toHexString()); - user.nominationCount = ONE_BI; - user.votingCount = ZERO_BI; - user.memberIn = []; - user.kickedOut = []; - } - user.save(); -} - -export function handleCouncilMembersDismissed(event: CouncilMembersDismissedEvent): void { - for (let index = 0; index < event.params.dismissedMembers.length; index++) { - let user = User.load(event.params.dismissedMembers[index].toHexString()); - if (user) { - const temp = user.kickedOut; - temp!.push(event.address.toHexString()); - user.kickedOut = temp; - } else { - user = new User(event.params.dismissedMembers[index].toHexString()); - user.nominationCount = ONE_BI; - user.votingCount = ZERO_BI; - user.memberIn = []; - user.kickedOut = []; - } - user.save(); - } -} - -export function handleNominationWithdrawn(event: NominationWithdrawnEvent): void { - const user = User.load(event.params.candidate.toHexString()); - if (user) { - user.nominationCount = user.nominationCount.minus(ONE_BI); - user.save(); - } else { - log.critical('user withdrew without being nominated', [event.params.candidate.toHexString()]); - } -} - -export function handleVoteRecorded(event: VoteRecordedEvent): void { - const id = event.params.voter - .toHexString() - .concat('-') - .concat(event.address.toHexString()) - .concat('-') - .concat(event.params.epochId.toString()) - .concat('-') - .concat(event.params.chainId.toString()); - let voteRecord = VoteRecorded.load(id); - - const votePower = BigDecimal.fromString(event.params.votingPower.toString()); - if ( - voteRecord && - event.params.candidates[0].toHexString().includes('0x0000000000000000000000000000000000000000') - ) { - store.remove('VoteRecorded', id); - } else { - voteRecord = new VoteRecorded(id); - voteRecord.voter = event.params.voter.toHexString(); - voteRecord.chainId = event.params.chainId; - voteRecord.epochId = event.params.epochId; - voteRecord.votePower = votePower; - voteRecord.blockNumber = event.block.number; - voteRecord.contract = event.address.toHexString(); - voteRecord.save(); - } - // If voted for address 0x00... minus one voting count - let user = User.load(event.params.voter.toHexString()); - if (user) { - if ( - event.params.candidates[0] - .toHexString() - .includes('0x0000000000000000000000000000000000000000') - ) { - user.votingCount = user.votingCount.minus(ONE_BI); - } else { - user.votingCount = user.votingCount.plus(ONE_BI); - } - } else { - user = new User(event.params.voter.toHexString()); - user.nominationCount = ZERO_BI; - user.votingCount = ONE_BI; - user.memberIn = []; - } - user.save(); - - const resultId = event.params.voter - .toHexString() - .concat('-') - .concat(event.params.chainId.toString()) - .concat('-') - .concat(event.address.toHexString()) - .concat('-') - .concat(event.params.epochId.toString()); - let result = VoteResult.load(resultId); - - if (result == null) { - result = new VoteResult(resultId); - result.epochId = event.params.epochId.toString(); - result.votePower = votePower; - result.voteCount = ONE_BI; - result.contract = event.address.toHexString(); - } else { - result.votePower = result.votePower.plus(votePower); - result.voteCount = result.voteCount.plus(ONE_BI); - } - result.candidate = event.params.candidates.at(0).toHexString(); - result.voter = event.params.voter.toHexString(); - result.save(); -} diff --git a/governance/subgraph/subgraph.base.yaml b/governance/subgraph/subgraph.base.yaml deleted file mode 100644 index d69c23a6d..000000000 --- a/governance/subgraph/subgraph.base.yaml +++ /dev/null @@ -1,244 +0,0 @@ -specVersion: 0.0.5 -schema: - file: ./schema.graphql -dataSources: - - kind: ethereum - name: Spartan - network: optimism - source: - abi: ElectionModule - mapping: - kind: ethereum/events - apiVersion: 0.0.7 - language: wasm/assemblyscript - entities: - - CandidateNominated - - CouncilMemberAdded - - CouncilMemberRemoved - - CouncilMembersDismissed - - NominationWithdrawn - - VoteRecorded - abis: - - name: ElectionModule - file: ./abis/ElectionModule.json - eventHandlers: - - event: CandidateNominated(indexed address,indexed uint256) - handler: handleCandidateNominated - - event: CouncilMemberAdded(indexed address,indexed uint256) - handler: handleCouncilMemberAdded - - event: CouncilMembersDismissed(address[],uint256) - handler: handleCouncilMembersDismissed - - event: NominationWithdrawn(indexed address,indexed uint256) - handler: handleNominationWithdrawn - - event: VoteRecorded(indexed address,indexed uint256,indexed - uint256,uint256,address[]) - handler: handleVoteRecorded - file: ./src/election-module.ts - - kind: ethereum - name: Ambassador - network: optimism - source: - abi: ElectionModule - mapping: - kind: ethereum/events - apiVersion: 0.0.7 - language: wasm/assemblyscript - entities: - - CandidateNominated - - CouncilMemberAdded - - CouncilMemberRemoved - - CouncilMembersDismissed - - NominationWithdrawn - - VoteRecorded - abis: - - name: ElectionModule - file: ./abis/ElectionModule.json - eventHandlers: - - event: CandidateNominated(indexed address,indexed uint256) - handler: handleCandidateNominated - - event: CouncilMemberAdded(indexed address,indexed uint256) - handler: handleCouncilMemberAdded - - event: CouncilMembersDismissed(address[],uint256) - handler: handleCouncilMembersDismissed - - event: NominationWithdrawn(indexed address,indexed uint256) - handler: handleNominationWithdrawn - - event: VoteRecorded(indexed address,indexed uint256,indexed - uint256,uint256,address[]) - handler: handleVoteRecorded - file: ./src/election-module.ts - - kind: ethereum - name: Grants - network: optimism - source: - abi: ElectionModule - mapping: - kind: ethereum/events - apiVersion: 0.0.7 - language: wasm/assemblyscript - entities: - - CandidateNominated - - CouncilMemberAdded - - CouncilMemberRemoved - - CouncilMembersDismissed - - NominationWithdrawn - - VoteRecorded - abis: - - name: ElectionModule - file: ./abis/ElectionModule.json - eventHandlers: - - event: CandidateNominated(indexed address,indexed uint256) - handler: handleCandidateNominated - - event: CouncilMemberAdded(indexed address,indexed uint256) - handler: handleCouncilMemberAdded - - event: CouncilMembersDismissed(address[],uint256) - handler: handleCouncilMembersDismissed - - event: NominationWithdrawn(indexed address,indexed uint256) - handler: handleNominationWithdrawn - - event: VoteRecorded(indexed address,indexed uint256,indexed - uint256,uint256,address[]) - handler: handleVoteRecorded - file: ./src/election-module.ts - - kind: ethereum - name: Treasury - network: optimism - source: - abi: ElectionModule - mapping: - kind: ethereum/events - apiVersion: 0.0.7 - language: wasm/assemblyscript - entities: - - CandidateNominated - - CouncilMemberAdded - - CouncilMemberRemoved - - CouncilMembersDismissed - - NominationWithdrawn - - VoteRecorded - abis: - - name: ElectionModule - file: ./abis/ElectionModule.json - eventHandlers: - - event: CandidateNominated(indexed address,indexed uint256) - handler: handleCandidateNominated - - event: CouncilMemberAdded(indexed address,indexed uint256) - handler: handleCouncilMemberAdded - - event: CouncilMembersDismissed(address[],uint256) - handler: handleCouncilMembersDismissed - - event: NominationWithdrawn(indexed address,indexed uint256) - handler: handleNominationWithdrawn - - event: VoteRecorded(indexed address,indexed uint256,indexed - uint256,uint256,address[]) - handler: handleVoteRecorded - file: ./src/election-module.ts - - kind: ethereum/contract - name: Spartan-Old - network: optimism - source: - abi: ElectionModuleOld - mapping: - kind: ethereum/events - apiVersion: 0.0.7 - language: wasm/assemblyscript - entities: - - VoteRecorded - abis: - - name: ElectionModuleOld - file: ./abis/ElectionModuleOld.json - eventHandlers: - - event: CandidateNominated(indexed address,indexed uint256) - handler: handleCandidateNominatedOld - - event: NominationWithdrawn(indexed address,indexed uint256) - handler: handleNominationWithdrawnOld - - event: VoteRecorded(indexed address,indexed bytes32,indexed uint256,uint256) - handler: handleVoteRecordedOld - - event: VoteWithdrawn(indexed address,indexed bytes32,indexed uint256,uint256) - handler: handleVoteWithdrawnOld - - event: CouncilMemberAdded(indexed address,indexed uint256) - handler: handleCouncilMemberAddedOld - - event: CouncilMembersDismissed(address[],indexed uint256) - handler: handleCouncilMembersDismissedOld - file: ./src/election-module.ts - - kind: ethereum/contract - name: Ambassador-Old - network: optimism - source: - abi: ElectionModuleOld - mapping: - kind: ethereum/events - apiVersion: 0.0.7 - language: wasm/assemblyscript - entities: - - VoteRecorded - abis: - - name: ElectionModuleOld - file: ./abis/ElectionModuleOld.json - eventHandlers: - - event: CandidateNominated(indexed address,indexed uint256) - handler: handleCandidateNominatedOld - - event: NominationWithdrawn(indexed address,indexed uint256) - handler: handleNominationWithdrawnOld - - event: VoteRecorded(indexed address,indexed bytes32,indexed uint256,uint256) - handler: handleVoteRecordedOld - - event: VoteWithdrawn(indexed address,indexed bytes32,indexed uint256,uint256) - handler: handleVoteWithdrawnOld - - event: CouncilMemberAdded(indexed address,indexed uint256) - handler: handleCouncilMemberAddedOld - - event: CouncilMembersDismissed(address[],indexed uint256) - handler: handleCouncilMembersDismissedOld - file: ./src/election-module.ts - - kind: ethereum/contract - name: Grants-Old - network: optimism - source: - abi: ElectionModuleOld - mapping: - kind: ethereum/events - apiVersion: 0.0.7 - language: wasm/assemblyscript - entities: - - VoteRecorded - abis: - - name: ElectionModuleOld - file: ./abis/ElectionModuleOld.json - eventHandlers: - - event: CandidateNominated(indexed address,indexed uint256) - handler: handleCandidateNominatedOld - - event: NominationWithdrawn(indexed address,indexed uint256) - handler: handleNominationWithdrawnOld - - event: VoteRecorded(indexed address,indexed bytes32,indexed uint256,uint256) - handler: handleVoteRecordedOld - - event: VoteWithdrawn(indexed address,indexed bytes32,indexed uint256,uint256) - handler: handleVoteWithdrawnOld - - event: CouncilMemberAdded(indexed address,indexed uint256) - handler: handleCouncilMemberAddedOld - - event: CouncilMembersDismissed(address[],indexed uint256) - handler: handleCouncilMembersDismissedOld - file: ./src/election-module.ts - - kind: ethereum/contract - name: Treasury-Old - network: optimism - source: - abi: ElectionModuleOld - mapping: - kind: ethereum/events - apiVersion: 0.0.7 - language: wasm/assemblyscript - entities: - - VoteRecorded - abis: - - name: ElectionModuleOld - file: ./abis/ElectionModuleOld.json - eventHandlers: - - event: CandidateNominated(indexed address,indexed uint256) - handler: handleCandidateNominatedOld - - event: NominationWithdrawn(indexed address,indexed uint256) - handler: handleNominationWithdrawnOld - - event: VoteRecorded(indexed address,indexed bytes32,indexed uint256,uint256) - handler: handleVoteRecordedOld - - event: VoteWithdrawn(indexed address,indexed bytes32,indexed uint256,uint256) - handler: handleVoteWithdrawnOld - - event: CouncilMemberAdded(indexed address,indexed uint256) - handler: handleCouncilMemberAddedOld - - event: CouncilMembersDismissed(address[],indexed uint256) - handler: handleCouncilMembersDismissedOld - file: ./src/election-module.ts diff --git a/governance/subgraph/tests/election-module-utils.ts b/governance/subgraph/tests/election-module-utils.ts deleted file mode 100644 index d4bae364d..000000000 --- a/governance/subgraph/tests/election-module-utils.ts +++ /dev/null @@ -1,254 +0,0 @@ -import { newMockEvent } from 'matchstick-as'; -import { ethereum, Address, Bytes } from '@graphprotocol/graph-ts'; -import { - CandidateNominated, - CouncilMemberAdded, - CouncilMembersDismissed, - NominationWithdrawn, - VoteRecorded, -} from '../generated/ElectionModule/ElectionModule'; - -import { - VoteRecorded as VoteRecordedOldEvent, - VoteWithdrawn as VoteWithdrawnOldEvent, - CandidateNominated as CandidateNominatedOldEvent, - NominationWithdrawn as NominationWithdrawnOldEvent, - CouncilMemberAdded as CouncilMemberAddedOldEvent, - CouncilMembersDismissed as CouncilMembersDismissedOldEvent, -} from '../generated/Spartan/ElectionModuleOld'; - -export function createCandidateNominatedEvent( - candidate: Address, - epochId: bigint -): CandidateNominated { - const candidateNominatedEvent = changetype(newMockEvent()); - - candidateNominatedEvent.parameters = []; - - candidateNominatedEvent.parameters.push( - new ethereum.EventParam('candidate', ethereum.Value.fromAddress(candidate)) - ); - candidateNominatedEvent.parameters.push( - new ethereum.EventParam('epochId', ethereum.Value.fromUnsignedBigInt(epochId)) - ); - - return candidateNominatedEvent; -} - -export function createCouncilMemberAddedEvent( - member: Address, - epochIndex: bigint -): CouncilMemberAdded { - const councilMemberAddedEvent = changetype(newMockEvent()); - - councilMemberAddedEvent.parameters = []; - - councilMemberAddedEvent.parameters.push( - new ethereum.EventParam('member', ethereum.Value.fromAddress(member)) - ); - councilMemberAddedEvent.parameters.push( - new ethereum.EventParam('epochIndex', ethereum.Value.fromUnsignedBigInt(epochIndex)) - ); - - return councilMemberAddedEvent; -} - -export function createCouncilMembersDismissedEvent( - dismissedMembers: Array
, - epochId: bigint -): CouncilMembersDismissed { - const councilMembersDismissedEvent = changetype(newMockEvent()); - - councilMembersDismissedEvent.parameters = []; - - councilMembersDismissedEvent.parameters.push( - new ethereum.EventParam('dismissedMembers', ethereum.Value.fromAddressArray(dismissedMembers)) - ); - councilMembersDismissedEvent.parameters.push( - new ethereum.EventParam('epochId', ethereum.Value.fromUnsignedBigInt(epochId)) - ); - - return councilMembersDismissedEvent; -} - -export function createNominationWithdrawnEvent( - candidate: Address, - epochId: bigint -): NominationWithdrawn { - const nominationWithdrawnEvent = changetype(newMockEvent()); - - nominationWithdrawnEvent.parameters = []; - - nominationWithdrawnEvent.parameters.push( - new ethereum.EventParam('candidate', ethereum.Value.fromAddress(candidate)) - ); - nominationWithdrawnEvent.parameters.push( - new ethereum.EventParam('epochId', ethereum.Value.fromUnsignedBigInt(epochId)) - ); - - return nominationWithdrawnEvent; -} - -export function createVoteRecordedEvent( - voter: Address, - chainId: bigint, - epochId: bigint, - votingPower: bigint, - candidates: Address[] -): VoteRecorded { - const voteRecordedEvent = changetype(newMockEvent()); - - voteRecordedEvent.parameters = []; - - voteRecordedEvent.parameters.push( - new ethereum.EventParam('voter', ethereum.Value.fromAddress(voter)) - ); - voteRecordedEvent.parameters.push( - new ethereum.EventParam('chainId', ethereum.Value.fromUnsignedBigInt(chainId)) - ); - voteRecordedEvent.parameters.push( - new ethereum.EventParam('epochId', ethereum.Value.fromUnsignedBigInt(epochId)) - ); - voteRecordedEvent.parameters.push( - new ethereum.EventParam('votingPower', ethereum.Value.fromUnsignedBigInt(votingPower)) - ); - - voteRecordedEvent.parameters.push( - new ethereum.EventParam('candidates', ethereum.Value.fromAddressArray(candidates)) - ); - - voteRecordedEvent.address = Address.fromString('0x47872B16557875850a02C94B28d959515F894913'); - - return voteRecordedEvent; -} - -export function createVoteRecordedOldEvent( - voter: Address, - ballotId: Bytes, - epochIndex: bigint, - votePower: bigint -): VoteRecordedOldEvent { - const voteRecordedOldEvent = changetype(newMockEvent()); - - voteRecordedOldEvent.parameters = []; - - voteRecordedOldEvent.parameters.push( - new ethereum.EventParam('voter', ethereum.Value.fromAddress(voter)) - ); - voteRecordedOldEvent.parameters.push( - new ethereum.EventParam('ballotId', ethereum.Value.fromBytes(ballotId)) - ); - voteRecordedOldEvent.parameters.push( - new ethereum.EventParam('epochIndex', ethereum.Value.fromUnsignedBigInt(epochIndex)) - ); - voteRecordedOldEvent.parameters.push( - new ethereum.EventParam('votePower', ethereum.Value.fromUnsignedBigInt(votePower)) - ); - - return voteRecordedOldEvent; -} - -export function createVoteWithdrawnOldEvent( - voter: Address, - ballotId: Bytes, - epochIndex: bigint, - votePower: bigint -): VoteWithdrawnOldEvent { - const voteWithdrawnOldEvent = changetype(newMockEvent()); - - voteWithdrawnOldEvent.parameters = []; - - voteWithdrawnOldEvent.parameters.push( - new ethereum.EventParam('voter', ethereum.Value.fromAddress(voter)) - ); - voteWithdrawnOldEvent.parameters.push( - new ethereum.EventParam('ballotId', ethereum.Value.fromBytes(ballotId)) - ); - voteWithdrawnOldEvent.parameters.push( - new ethereum.EventParam('epochIndex', ethereum.Value.fromUnsignedBigInt(epochIndex)) - ); - voteWithdrawnOldEvent.parameters.push( - new ethereum.EventParam('votePower', ethereum.Value.fromUnsignedBigInt(votePower)) - ); - - return voteWithdrawnOldEvent; -} - -export function createCandidateNominatedOldEvent( - voter: Address, - epochIndex: bigint -): CandidateNominatedOldEvent { - const candidateNominatedOldEvent = changetype(newMockEvent()); - - candidateNominatedOldEvent.parameters = []; - - candidateNominatedOldEvent.parameters.push( - new ethereum.EventParam('voter', ethereum.Value.fromAddress(voter)) - ); - candidateNominatedOldEvent.parameters.push( - new ethereum.EventParam('epochIndex', ethereum.Value.fromUnsignedBigInt(epochIndex)) - ); - - candidateNominatedOldEvent.address = Address.fromString( - '0xE832C302D1160EAe57045eb9d9Ea14daBd2E229c' - ); - - return candidateNominatedOldEvent; -} - -export function createNominationWithdrawOldEvent( - voter: Address, - epochIndex: bigint -): NominationWithdrawnOldEvent { - const nominationWithdrawnOldEvent = changetype(newMockEvent()); - - nominationWithdrawnOldEvent.parameters = []; - - nominationWithdrawnOldEvent.parameters.push( - new ethereum.EventParam('voter', ethereum.Value.fromAddress(voter)) - ); - nominationWithdrawnOldEvent.parameters.push( - new ethereum.EventParam('epochIndex', ethereum.Value.fromUnsignedBigInt(epochIndex)) - ); - - return nominationWithdrawnOldEvent; -} - -export function createCouncilMemberAddedEventOld( - member: Address, - epochIndex: bigint -): CouncilMemberAddedOldEvent { - const councilMemberAddedOldEvent = changetype(newMockEvent()); - - councilMemberAddedOldEvent.parameters = []; - - councilMemberAddedOldEvent.parameters.push( - new ethereum.EventParam('member', ethereum.Value.fromAddress(member)) - ); - - councilMemberAddedOldEvent.parameters.push( - new ethereum.EventParam('epochIndex', ethereum.Value.fromUnsignedBigInt(epochIndex)) - ); - - return councilMemberAddedOldEvent; -} - -export function createCouncilMembersDismissedEventOld( - dismissedMembers: Address[], - epochIndex: bigint -): CouncilMembersDismissedOldEvent { - const councilMembersDismissedOldEvent = - changetype(newMockEvent()); - - councilMembersDismissedOldEvent.parameters = []; - - councilMembersDismissedOldEvent.parameters.push( - new ethereum.EventParam('members', ethereum.Value.fromAddressArray(dismissedMembers)) - ); - - councilMembersDismissedOldEvent.parameters.push( - new ethereum.EventParam('epochIndex', ethereum.Value.fromUnsignedBigInt(epochIndex)) - ); - - return councilMembersDismissedOldEvent; -} diff --git a/governance/subgraph/tests/election-module.test.ts b/governance/subgraph/tests/election-module.test.ts deleted file mode 100644 index d98b35ad9..000000000 --- a/governance/subgraph/tests/election-module.test.ts +++ /dev/null @@ -1,657 +0,0 @@ -import { - assert, - describe, - test, - clearStore, - beforeAll, - afterAll, -} from 'matchstick-as/assembly/index'; -import { Address, BigInt, Bytes } from '@graphprotocol/graph-ts'; -import { - createCandidateNominatedEvent, - createCandidateNominatedOldEvent, - createCouncilMemberAddedEvent, - createCouncilMemberAddedEventOld, - createCouncilMembersDismissedEvent, - createCouncilMembersDismissedEventOld, - createNominationWithdrawOldEvent, - createNominationWithdrawnEvent, - createVoteRecordedEvent, - createVoteRecordedOldEvent, - createVoteWithdrawnOldEvent, -} from './election-module-utils'; -import { - handleCandidateNominated, - handleCandidateNominatedOld, - handleCouncilMemberAdded, - handleCouncilMemberAddedOld, - handleCouncilMembersDismissed, - handleCouncilMembersDismissedOld, - handleNominationWithdrawn, - handleNominationWithdrawnOld, - handleVoteRecorded, - handleVoteRecordedOld, - handleVoteWithdrawnOld, -} from '../src/election-module'; - -const voter = Address.fromString('0x0000000000000000000000000000000000000001'); -const epochId = BigInt.fromI32(234); -const epochId2 = BigInt.fromI32(235); -const candidates = [Address.fromString('0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045')]; - -// TODO test member added and dismissed event for old and new contracts and work with epochID2 - -describe('Election Module', () => { - afterAll(() => { - clearStore(); - }); - - describe('Nomination Old Events', () => { - beforeAll(() => { - const nominationOldEvent = createCandidateNominatedOldEvent(voter, epochId); - handleCandidateNominatedOld(nominationOldEvent); - }); - test('user nominated himself', () => { - assert.entityCount('User', 1); - assert.fieldEquals('User', voter.toHexString(), 'nominationCount', '1'); - assert.fieldEquals('User', voter.toHexString(), 'votingCount', '0'); - }); - - test('user withdrew his nomination', () => { - const nominationWithdrawnOldEvent = createNominationWithdrawOldEvent(voter, epochId); - handleNominationWithdrawnOld(nominationWithdrawnOldEvent); - assert.entityCount('User', 1); - assert.fieldEquals('User', voter.toHexString(), 'nominationCount', '0'); - assert.fieldEquals('User', voter.toHexString(), 'votingCount', '0'); - }); - }); - - describe('Nomination Events', () => { - beforeAll(() => { - const nominationEvent = createCandidateNominatedEvent(voter, epochId); - handleCandidateNominated(nominationEvent); - }); - - test('user nominated himself', () => { - assert.entityCount('User', 1); - assert.fieldEquals('User', voter.toHexString(), 'nominationCount', '1'); - assert.fieldEquals('User', voter.toHexString(), 'votingCount', '0'); - }); - - test('user withdrew his nomination', () => { - const nominationWithdrawnEvent = createNominationWithdrawnEvent(voter, epochId); - handleNominationWithdrawn(nominationWithdrawnEvent); - assert.entityCount('User', 1); - assert.fieldEquals('User', voter.toHexString(), 'nominationCount', '0'); - assert.fieldEquals('User', voter.toHexString(), 'votingCount', '0'); - }); - }); - - describe('Voting Old Events', () => { - beforeAll(() => { - const nominationOldEvent = createCandidateNominatedOldEvent(voter, epochId); - handleCandidateNominatedOld(nominationOldEvent); - }); - - test('user votes for himself', () => { - const voteRecordedOldEvent = createVoteRecordedOldEvent( - voter, - Bytes.fromI32(1), - epochId, - BigInt.fromI32(100) - ); - handleVoteRecordedOld(voteRecordedOldEvent); - - // User - assert.entityCount('User', 1); - assert.fieldEquals('User', voter.toHexString(), 'nominationCount', '1'); - assert.fieldEquals('User', voter.toHexString(), 'votingCount', '1'); - - // Vote Result - assert.entityCount('VoteRecorded', 1); - const id = voter - .toHexString() - .concat('-') - .concat(voteRecordedOldEvent.address.toHexString()) - .concat('-') - .concat(epochId.toString()) - .concat('-') - .concat('10'); - - assert.fieldEquals('VoteRecorded', id, 'voter', voter.toHexString()); - assert.fieldEquals('VoteRecorded', id, 'chainId', '10'); - assert.fieldEquals('VoteRecorded', id, 'epochId', epochId.toString()); - assert.fieldEquals('VoteRecorded', id, 'votePower', '100'); - assert.fieldEquals('VoteRecorded', id, 'blockNumber', '1'); - assert.fieldEquals('VoteRecorded', id, 'voter', voter.toHexString()); - assert.fieldEquals( - 'VoteRecorded', - id, - 'contract', - voteRecordedOldEvent.address.toHexString() - ); - - // Vote Recorded - assert.entityCount('VoteResult', 1); - const voteResultId = voter - .toHexString() - .concat('-') - .concat('10') - .concat('-') - .concat(voteRecordedOldEvent.address.toHexString()) - .concat('-') - .concat(epochId.toString()); - assert.fieldEquals('VoteResult', voteResultId, 'votePower', '100'); - assert.fieldEquals('VoteResult', voteResultId, 'voteCount', '1'); - assert.fieldEquals('VoteResult', voteResultId, 'epochId', epochId.toString()); - assert.fieldEquals( - 'VoteResult', - voteResultId, - 'contract', - voteRecordedOldEvent.address.toHexString() - ); - }); - - test('user withdraws his vote', () => { - const voteWithdrawnOldEvent = createVoteWithdrawnOldEvent( - voter, - Bytes.fromI32(1), - epochId, - BigInt.fromI32(100) - ); - handleVoteWithdrawnOld(voteWithdrawnOldEvent); - assert.entityCount('VoteRecorded', 0); - assert.entityCount('VoteResult', 0); - - // User - assert.entityCount('User', 1); - assert.fieldEquals('User', voter.toHexString(), 'nominationCount', '1'); - assert.fieldEquals('User', voter.toHexString(), 'votingCount', '0'); - }); - }); - - describe('Council Member Added Event Old', () => { - test('user gets added to council', () => { - const event = createCouncilMemberAddedEventOld(voter, epochId); - handleCouncilMemberAddedOld(event); - // User - assert.entityCount('User', 1); - assert.fieldEquals('User', voter.toHexString(), 'nominationCount', '1'); - assert.fieldEquals('User', voter.toHexString(), 'votingCount', '0'); - assert.fieldEquals( - 'User', - voter.toHexString(), - 'memberIn', - `[${event.address.toHexString()}]` - ); - }); - }); - - describe('Council Member Added Event', () => { - test('user gets added to council', () => { - const eventOld = createCouncilMemberAddedEventOld(voter, epochId); - const event = createCouncilMemberAddedEvent(voter, epochId); - handleCouncilMemberAdded(event); - // User - assert.entityCount('User', 1); - assert.fieldEquals('User', voter.toHexString(), 'nominationCount', '1'); - assert.fieldEquals('User', voter.toHexString(), 'votingCount', '0'); - assert.fieldEquals( - 'User', - voter.toHexString(), - 'memberIn', - `[${eventOld.address.toHexString()}, ${event.address.toHexString()}]` - ); - }); - }); - - describe('Council Member Dismissed Event Old', () => { - test('user gets dismissed from council', () => { - const event = createCouncilMembersDismissedEventOld([voter], epochId); - handleCouncilMembersDismissedOld(event); - // User - assert.entityCount('User', 1); - assert.fieldEquals( - 'User', - voter.toHexString(), - 'kickedOut', - `[${event.address.toHexString()}]` - ); - }); - }); - - describe('Council Member Dismissed Event', () => { - test('user gets dismissed from council', () => { - const eventOld = createCouncilMembersDismissedEventOld([voter], epochId); - const event = createCouncilMembersDismissedEvent([voter], epochId); - handleCouncilMembersDismissed(event); - // User - assert.entityCount('User', 1); - assert.fieldEquals( - 'User', - voter.toHexString(), - 'kickedOut', - `[${eventOld.address.toHexString()}, ${event.address.toHexString()}]` - ); - }); - }); - - describe('Voting Event', () => { - beforeAll(() => { - const nominationOldEvent = createCandidateNominatedOldEvent(voter, epochId); - handleCandidateNominatedOld(nominationOldEvent); - const voteRecordedOldEvent = createVoteRecordedOldEvent( - voter, - Bytes.fromI32(1), - epochId, - BigInt.fromI32(100) - ); - handleVoteRecordedOld(voteRecordedOldEvent); - const voteRecorded = createVoteRecordedEvent( - voter, - BigInt.fromI32(10), - epochId, - BigInt.fromI32(100), - candidates - ); - handleVoteRecorded(voteRecorded); - }); - test('user votes for himself (mothership)', () => { - const voteRecorded = createVoteRecordedEvent( - voter, - BigInt.fromI32(10), - epochId, - BigInt.fromI32(100), - candidates - ); - - // User - assert.entityCount('User', 1); - assert.fieldEquals('User', voter.toHexString(), 'nominationCount', '2'); - assert.fieldEquals('User', voter.toHexString(), 'votingCount', '2'); - - // Vote Recorded - assert.entityCount('VoteRecorded', 2); - const id = voter - .toHexString() - .concat('-') - .concat(voteRecorded.address.toHexString()) - .concat('-') - .concat(epochId.toString()) - .concat('-') - .concat(voteRecorded.params.chainId.toString()); - assert.fieldEquals('VoteRecorded', id, 'voter', voter.toHexString()); - assert.fieldEquals('VoteRecorded', id, 'chainId', '10'); - assert.fieldEquals('VoteRecorded', id, 'votePower', '100'); - assert.fieldEquals('VoteRecorded', id, 'blockNumber', '1'); - assert.fieldEquals('VoteRecorded', id, 'contract', voteRecorded.address.toHexString()); - - assert.entityCount('VoteRecorded', 2); - - // Vote Result - const resultId = voter - .toHexString() - .concat('-') - .concat(voteRecorded.params.chainId.toString()) - .concat('-') - .concat(voteRecorded.address.toHexString()) - .concat('-') - .concat(epochId.toString()); - assert.entityCount('VoteResult', 2); - assert.fieldEquals('VoteResult', resultId, 'voter', voter.toHexString()); - assert.fieldEquals('VoteResult', resultId, 'candidate', candidates.at(0).toHexString()); - assert.fieldEquals('VoteResult', resultId, 'epochId', epochId.toString()); - assert.fieldEquals('VoteResult', resultId, 'votePower', '100'); - assert.fieldEquals('VoteResult', resultId, 'voteCount', '1'); - assert.fieldEquals('VoteResult', resultId, 'contract', voteRecorded.address.toHexString()); - }); - test('user votes for himself (multi chain)', () => { - const voteRecordedEvent = createVoteRecordedEvent( - voter, - BigInt.fromI32(8453), - epochId, - BigInt.fromI32(100), - candidates - ); - handleVoteRecorded(voteRecordedEvent); - - // User - assert.entityCount('User', 1); - assert.fieldEquals('User', voter.toHexString(), 'nominationCount', '2'); - assert.fieldEquals('User', voter.toHexString(), 'votingCount', '3'); - - // Vote Result - const resultId = voter - .toHexString() - .concat('-') - .concat('8453') - .concat('-') - .concat(voteRecordedEvent.address.toHexString()) - .concat('-') - .concat(epochId.toString()); - assert.entityCount('VoteResult', 3); - // Don't understand that? why do we need that and how can it exceed one? - assert.fieldEquals('VoteResult', resultId, 'voteCount', '1'); - assert.fieldEquals('VoteResult', resultId, 'epochId', epochId.toString()); - assert.fieldEquals('VoteResult', resultId, 'votePower', '100'); - assert.fieldEquals( - 'VoteResult', - resultId, - 'contract', - voteRecordedEvent.address.toHexString() - ); - assert.fieldEquals('VoteResult', resultId, 'voter', voter.toHexString()); - assert.fieldEquals('VoteResult', resultId, 'candidate', candidates[0].toHexString()); - - // Vote Recorded - const voteResultId = voter - .toHexString() - .concat('-') - .concat(voteRecordedEvent.address.toHexString()) - .concat('-') - .concat(epochId.toString()) - .concat('-') - .concat('8453'); - assert.entityCount('VoteRecorded', 3); - assert.fieldEquals('VoteRecorded', voteResultId, 'voter', voter.toHexString()); - assert.fieldEquals('VoteRecorded', voteResultId, 'epochId', epochId.toString()); - assert.fieldEquals('VoteRecorded', voteResultId, 'votePower', '100'); - assert.fieldEquals('VoteRecorded', voteResultId, 'blockNumber', '1'); - - assert.fieldEquals( - 'VoteRecorded', - voteResultId, - 'contract', - voteRecordedEvent.address.toHexString() - ); - }); - }); - - describe('Integration', () => { - beforeAll(() => clearStore()); - test('user nominates himself - old contract', () => { - const nominationEventOld = createCandidateNominatedOldEvent(voter, epochId); - handleCandidateNominatedOld(nominationEventOld); - assert.entityCount('User', 1); - assert.fieldEquals('User', voter.toHexString(), 'nominationCount', '1'); - assert.fieldEquals('User', voter.toHexString(), 'votingCount', '0'); - }); - - test('user votes for himself - old contract', () => { - const voteEventOld = createVoteRecordedOldEvent( - voter, - Bytes.fromI32(1), - epochId, - BigInt.fromI32(100) - ); - handleVoteRecordedOld(voteEventOld); - assert.entityCount('User', 1); - assert.fieldEquals('User', voter.toHexString(), 'nominationCount', '1'); - assert.fieldEquals('User', voter.toHexString(), 'votingCount', '1'); - - assert.entityCount('VoteRecorded', 1); - const voteRecordId = voter - .toHexString() - .concat('-') - .concat(voteEventOld.address.toHexString()) - .concat('-') - .concat(epochId.toString()) - .concat('-') - .concat('10'); - assert.fieldEquals('VoteRecorded', voteRecordId, 'voter', voter.toHexString()); - assert.fieldEquals('VoteRecorded', voteRecordId, 'chainId', '10'); - assert.fieldEquals('VoteRecorded', voteRecordId, 'epochId', epochId.toString()); - assert.fieldEquals('VoteRecorded', voteRecordId, 'votePower', '100'); - assert.fieldEquals('VoteRecorded', voteRecordId, 'blockNumber', '1'); - assert.fieldEquals( - 'VoteRecorded', - voteRecordId, - 'contract', - voteEventOld.address.toHexString() - ); - - const voteRecordedId = voter - .toHexString() - .concat('-') - .concat('10') - .concat('-') - .concat(voteEventOld.address.toHexString()) - .concat('-') - .concat(epochId.toString()); - assert.entityCount('VoteResult', 1); - assert.fieldEquals('VoteResult', voteRecordedId, 'epochId', epochId.toString()); - assert.fieldEquals('VoteResult', voteRecordedId, 'votePower', '100'); - assert.fieldEquals('VoteResult', voteRecordedId, 'voteCount', '1'); - assert.fieldEquals('VoteResult', voteRecordedId, 'voter', voter.toHexString()); - assert.fieldEquals( - 'VoteResult', - voteRecordedId, - 'contract', - voteEventOld.address.toHexString() - ); - }); - - test('user nominates himself', () => { - const nominateEvent = createCandidateNominatedEvent(voter, epochId); - handleCandidateNominated(nominateEvent); - assert.entityCount('User', 1); - assert.fieldEquals('User', voter.toHexString(), 'nominationCount', '2'); - assert.fieldEquals('User', voter.toHexString(), 'votingCount', '1'); - }); - - test('user votes for himself', () => { - const voteEvent = createVoteRecordedEvent( - voter, - BigInt.fromI32(10), - epochId, - BigInt.fromI32(100), - candidates - ); - handleVoteRecorded(voteEvent); - assert.entityCount('User', 1); - assert.fieldEquals('User', voter.toHexString(), 'nominationCount', '2'); - assert.fieldEquals('User', voter.toHexString(), 'votingCount', '2'); - - assert.entityCount('VoteRecorded', 2); - const voteRecordId = voter - .toHexString() - .concat('-') - .concat(voteEvent.address.toHexString()) - .concat('-') - .concat(epochId.toString()) - .concat('-') - .concat('10'); - assert.fieldEquals('VoteRecorded', voteRecordId, 'voter', voter.toHexString()); - assert.fieldEquals('VoteRecorded', voteRecordId, 'chainId', '10'); - assert.fieldEquals('VoteRecorded', voteRecordId, 'epochId', epochId.toString()); - assert.fieldEquals('VoteRecorded', voteRecordId, 'votePower', '100'); - assert.fieldEquals('VoteRecorded', voteRecordId, 'blockNumber', '1'); - assert.fieldEquals('VoteRecorded', voteRecordId, 'contract', voteEvent.address.toHexString()); - - const voteRecordedId = voter - .toHexString() - .concat('-') - .concat('10') - .concat('-') - .concat(voteEvent.address.toHexString()) - .concat('-') - .concat(epochId.toString()); - assert.entityCount('VoteResult', 2); - assert.fieldEquals('VoteResult', voteRecordedId, 'epochId', epochId.toString()); - assert.fieldEquals('VoteResult', voteRecordedId, 'votePower', '100'); - assert.fieldEquals('VoteResult', voteRecordedId, 'voteCount', '1'); - assert.fieldEquals('VoteResult', voteRecordedId, 'voter', voter.toHexString()); - assert.fieldEquals('VoteResult', voteRecordedId, 'candidate', candidates.at(0).toHexString()); - assert.fieldEquals('VoteResult', voteRecordedId, 'contract', voteEvent.address.toHexString()); - }); - - test('user votes for himself cross chain', () => { - const voteEventBase = createVoteRecordedEvent( - voter, - BigInt.fromI32(8453), - epochId, - BigInt.fromI32(100), - candidates - ); - handleVoteRecorded(voteEventBase); - const voteEventEthereum = createVoteRecordedEvent( - voter, - BigInt.fromI32(1), - epochId, - BigInt.fromI32(100), - candidates - ); - handleVoteRecorded(voteEventEthereum); - - assert.entityCount('User', 1); - assert.fieldEquals('User', voter.toHexString(), 'nominationCount', '2'); - assert.fieldEquals('User', voter.toHexString(), 'votingCount', '4'); - - assert.entityCount('VoteRecorded', 4); - const voteRecordIdBase = voter - .toHexString() - .concat('-') - .concat(voteEventBase.address.toHexString()) - .concat('-') - .concat(epochId.toString()) - .concat('-') - .concat('8453'); - assert.fieldEquals('VoteRecorded', voteRecordIdBase, 'voter', voter.toHexString()); - assert.fieldEquals('VoteRecorded', voteRecordIdBase, 'chainId', '8453'); - assert.fieldEquals('VoteRecorded', voteRecordIdBase, 'epochId', epochId.toString()); - assert.fieldEquals('VoteRecorded', voteRecordIdBase, 'votePower', '100'); - assert.fieldEquals('VoteRecorded', voteRecordIdBase, 'blockNumber', '1'); - assert.fieldEquals( - 'VoteRecorded', - voteRecordIdBase, - 'contract', - voteEventBase.address.toHexString() - ); - - assert.entityCount('VoteRecorded', 4); - const voteRecordIdL1 = voter - .toHexString() - .concat('-') - .concat(voteEventEthereum.address.toHexString()) - .concat('-') - .concat(epochId.toString()) - .concat('-') - .concat('1'); - assert.fieldEquals('VoteRecorded', voteRecordIdL1, 'voter', voter.toHexString()); - assert.fieldEquals('VoteRecorded', voteRecordIdL1, 'chainId', '1'); - assert.fieldEquals('VoteRecorded', voteRecordIdL1, 'epochId', epochId.toString()); - assert.fieldEquals('VoteRecorded', voteRecordIdL1, 'votePower', '100'); - assert.fieldEquals('VoteRecorded', voteRecordIdL1, 'blockNumber', '1'); - assert.fieldEquals( - 'VoteRecorded', - voteRecordIdL1, - 'contract', - voteEventEthereum.address.toHexString() - ); - - const voteRecordedIdBase = voter - .toHexString() - .concat('-') - .concat('8453') - .concat('-') - .concat(voteEventBase.address.toHexString()) - .concat('-') - .concat(epochId.toString()); - assert.entityCount('VoteResult', 4); - assert.fieldEquals('VoteResult', voteRecordedIdBase, 'epochId', epochId.toString()); - assert.fieldEquals('VoteResult', voteRecordedIdBase, 'votePower', '100'); - assert.fieldEquals('VoteResult', voteRecordedIdBase, 'voteCount', '1'); - assert.fieldEquals('VoteResult', voteRecordedIdBase, 'voter', voter.toHexString()); - assert.fieldEquals( - 'VoteResult', - voteRecordedIdBase, - 'candidate', - candidates.at(0).toHexString() - ); - assert.fieldEquals( - 'VoteResult', - voteRecordedIdBase, - 'contract', - voteEventBase.address.toHexString() - ); - - const voteRecordedIdL1 = voter - .toHexString() - .concat('-') - .concat('10') - .concat('-') - .concat(voteEventEthereum.address.toHexString()) - .concat('-') - .concat(epochId.toString()); - assert.entityCount('VoteResult', 4); - assert.fieldEquals('VoteResult', voteRecordedIdL1, 'epochId', epochId.toString()); - assert.fieldEquals('VoteResult', voteRecordedIdL1, 'votePower', '100'); - assert.fieldEquals('VoteResult', voteRecordedIdL1, 'voteCount', '1'); - assert.fieldEquals('VoteResult', voteRecordedIdL1, 'voter', voter.toHexString()); - assert.fieldEquals( - 'VoteResult', - voteRecordedIdL1, - 'candidate', - candidates.at(0).toHexString() - ); - assert.fieldEquals( - 'VoteResult', - voteRecordedIdL1, - 'contract', - voteEventEthereum.address.toHexString() - ); - }); - - test('user revokes his own vote from one cross chain vote', () => { - const voteEventEthereum = createVoteRecordedEvent( - voter, - BigInt.fromI32(1), - epochId, - BigInt.fromI32(100), - [Address.fromString('0x0000000000000000000000000000000000000000')] - ); - handleVoteRecorded(voteEventEthereum); - - assert.entityCount('User', 1); - assert.fieldEquals('User', voter.toHexString(), 'nominationCount', '2'); - assert.fieldEquals('User', voter.toHexString(), 'votingCount', '3'); - - assert.entityCount('VoteRecorded', 3); - const voteRecordIdL1 = voter - .toHexString() - .concat('-') - .concat(voteEventEthereum.address.toHexString()) - .concat('-') - .concat(epochId.toString()) - .concat('-') - .concat('1'); - assert.notInStore('VoteRecorded', voteRecordIdL1); - - const voteRecordedIdL1 = voter - .toHexString() - .concat('-') - .concat('10') - .concat('-') - .concat(voteEventEthereum.address.toHexString()) - .concat('-') - .concat(epochId.toString()); - assert.entityCount('VoteResult', 4); - assert.fieldEquals('VoteResult', voteRecordedIdL1, 'epochId', epochId.toString()); - assert.fieldEquals('VoteResult', voteRecordedIdL1, 'votePower', '100'); - assert.fieldEquals('VoteResult', voteRecordedIdL1, 'voteCount', '1'); - assert.fieldEquals('VoteResult', voteRecordedIdL1, 'voter', voter.toHexString()); - assert.fieldEquals( - 'VoteResult', - voteRecordedIdL1, - 'candidate', - candidates.at(0).toHexString() - ); - assert.fieldEquals( - 'VoteResult', - voteRecordedIdL1, - 'contract', - voteEventEthereum.address.toHexString() - ); - }); - }); -}); diff --git a/governance/subgraph/tsconfig.json b/governance/subgraph/tsconfig.json deleted file mode 100644 index 4082f16a5..000000000 --- a/governance/subgraph/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} diff --git a/governance/ui/package.json b/governance/ui/package.json index 54603ce56..84085f2f9 100644 --- a/governance/ui/package.json +++ b/governance/ui/package.json @@ -12,33 +12,17 @@ "@chakra-ui/react": "^2.8.2", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", - "@safe-global/safe-apps-provider": "^0.18.3", - "@safe-global/safe-apps-sdk": "^9.1.0", - "@snx-v3/Tooltip": "workspace:*", "@snx-v3/format": "workspace:*", - "@snx-v3/formatters": "workspace:*", "@snx-v3/icons": "workspace:*", "@snx-v3/theme": "workspace:*", - "@snx-v3/useBlockchain": "workspace:*", "@tanstack/react-query": "^5.8.3", "@types/react-helmet": "^6.1.9", - "@web3-onboard/coinbase": "^2.4.1", - "@web3-onboard/gnosis": "^2.3.1", - "@web3-onboard/injected-wallets": "^2.11.1", - "@web3-onboard/ledger": "2.7.1", - "@web3-onboard/react": "^2.9.1", - "@web3-onboard/trezor": "^2.4.6", - "@web3-onboard/walletconnect": "^2.6.1", - "ethers": "^5.7.2", "framer-motion": "^10.16.5", "react": "^18.2.0", "react-blockies": "^1.4.1", "react-dom": "^18.2.0", "react-helmet": "^6.1.0", - "react-hook-form": "^7.48.2", - "react-router-dom": "^6.18.0", - "recoil": "^0.7.7", - "siwe": "^2.1.4" + "react-router-dom": "^6.18.0" }, "devDependencies": { "@babel/core": "^7.24.6", diff --git a/governance/ui/public/councils/advisory.svg b/governance/ui/public/councils/advisory.svg new file mode 100644 index 000000000..044343abd --- /dev/null +++ b/governance/ui/public/councils/advisory.svg @@ -0,0 +1,4 @@ + + + + diff --git a/governance/ui/public/councils/profile/ben.png b/governance/ui/public/councils/profile/ben.png new file mode 100644 index 0000000000000000000000000000000000000000..352bc9b57b867ca9c3fe5494d7465602e34aa1cd GIT binary patch literal 7284 zcmV-)9E;>GgT!4Nx_;UbczC~=0O6G&B&pybNC~8Q$;R|d z_r3T3w)36u{8z)Le9X?y=FN0`Ch)_VAP64dYbMl?=g$Ik4bU|8JySP|mT43X!>qWj z^LK&oFU-I4lX-l~hlWq#IPoWcl3zIU^Vv$J{M^Xs*v#(n@jMrfjg1XdDi!n(44_u8 zK@5y15@<9U*u85P#>d9t`yN(q-NJj9F2VD<70>tPwIKNZKm7C`Uc{$xnD}QLV%YA{ z(dQ5b$FF7cc}>@G-;sMU(BF?B2w_<^VzC&er>9Y=Rnh5o(9h3q-@c8*hYlm3&tdiU z8bXFR3;{m~^Yp?o7{;;3zwo)|`FWVEUn7#v1vV^bM6#P{8<1KqG;8Wvw3Qppq?{!PyD{Q&KD8(XCk9LGTbT8Um7 zYkGmdJPQxcKK{(-PcWzd&nGd|z{foP*LS~r%-8jo4c$0)=-|P)O+#GAMKX~@x7~ql z$7oy}nM?-hbOzg8yk*AF*Ox~;9#aOa++M}l=ooUjJhN6uquIcAc^j_h_GKhP{MVm-_Kz*ge8Ka5)|iff5m;JU!tGltOi7=M+)_0q zsTTwuHa0hK_39O_Ex^D)9)@XPnf123ysV5j4Fg?9u2!!zid$$gn!08xBeh>KG7LkO z0FI6A*^}Qtv-cOpOU2IJtoyD&X7=dOLN1$qnYA?&i^rLEU2JdD-N!Tv?(qC3Vfi_a4T~gEO%C z*{xeQ@y@&NV0HC2??dAmW%gAJ4h$9_d-Ur?kVboekfH#f1lu@2wk{XI`bzpt;aFg0B`{iD;T=e{^M zSNt$L^bh;v%P+s2pW1uibpJqKLDFHT*7cpAd?SB`;lp5P41!sb6%F7eAf~5EdBXPwNmIfTqM&^HzGgC1$DtU$vi!ZpGNeQ zv~>)*SO>Adfz_y>c4HG>!&3{Z5m6m_zRpzLV9hl)RuR<8c<7NQ;19AFHeBeQp%%@5 zkf4DfqSO!R4Df%)>8d^{86yV!{GPld!kTW(G%8yp2KdIW+VX2{;-&xpr_Zk3zWwd@ zE?rb z7Y{Q1jOv?Med8uBYGWwZD}WuM%*?rV^%`8Jw9|H><#MRC%L<^P^+=iqieS)hs;;GG zxW4bs9y>Naf9h1_Lk&Fh*1{jgnA5ddP5mw`BkZN799<(a)TWg&UfAP5zR^V3t>T$S zXK-jZ#Q!~i7Ux?YzV@Ymk6q&j@EJzz{OfO{&q~0~X0Uwy29_?qflD_o;K}<&a3G(= zM8?F`%j?)$;i3}*hzBmZtl?sHn_0s)Qmw+#9Mzgs+Nyd~*&L;HkKXaqe5X-6F0uNx z6qT0HX?IR_Ivt{9peUD|D~&en<$jlu@EA4Q=ZXBR88hJMZP@V|cJIsKTDyT)s|F4~ z^@n)sk+0yw&(Gt5gZE?4(0)wsdj#oBKmPTXz6{^gaQeb8&9iurK`4c*k#RK1Fe<9|2z0BT{NGN-vAcg1<3TLhRt#r z8$lMkQ)9@Jee90W_^m65`B}XBv%iO)>BGbOk6>cYz1Xq`@YDJl2G+ayLOu;`D2|cB zAXaXY2*d|LuB1xDV}lO^lMP<$Wfct+&|_o;Y@}@o`H(tP;N$uEPD{HJ#XAOa0G*wh z+=D`4uku)eUMW|~ICJI(bT#y0S#wuvTzW;o%Z zb?ZEGdqd3ZZozN9MWoFl6>egB<^i~I4==s)1FUgTp&rMd-`>Ej77c8BxM8KCk0-Iw z3RJJNHH$4rmZ+=LBnMVeR7}T=nmxIL;;o8dsgz`fnZ|Ro$7WxcKQ&)b27d18r=M-N zI|ZpV;gN1>8*%oi0iu*dROncg&nB{V27C8T!?O)6l&@j2v5l2R6)l5QYH1Db_9|A= zWn6o&2)(odH|Sz;XfO6mkK<4O`a7^+AHpw|&qM2rLF=Yb@&f$OX`^*RT1p4$z7*np zBk;Ct#Op*;a#e@-b_7kNPE*;dxYbA5NalJ3oSCW*l{I7_o$nc4wRXvW04Q9m9DOeZv!+ zFP9k&c0W!i0WIMqqYMiqY%CXF<`l6`Sdx6kwk16}WZ#X)63^W+&@io8gI^?qs)m{* z%a3zvXmL(!w_ESG2@b4nr-o9kgjK(U;?=9@cyxg4A*53p$r4l9oZ3P68mS9*&`fR>(Qtv zSb=I-iqQ!9p!0VKzt=;2Y5vELAJ3cr<@oX0rKKxMLs@52ZB`rfXp*_Es}V+W+vLrK zML0nnnK5lUF(Y)!XB1=*&B!3i0+#e_F?t@;(~eol_w_-unBQD@i+pptRfk2V z__Z$ll`_e7sM16*!IQa75HReK0bxC~%istkywy@mCCw6Klpf9Nh@nk7(q!h?$s{>z ziG+I$PTeDQ)0By72v#*1MNh&hy)kNodZct9nk7euhcPrXHp4sODLI=mA99?;59~jr zLY*NAE>jV!Q2|TvhL1n?nCgukzs2aaaqY~j(3ooRp&Yu~O%m${QPI5v0zP)YKx#l1 zC`NIN(t3Z>Bf7WKW3>cpJeT5kJxU*SQXd*ihx)8RahmS;q#Eo@`%#mZnN*^tUJ7AD zHDKravKYt@JYZ5X$O|OPAh~DHB-O4%(fC8p*fAS7Z!II4N?~wth$r;JrWPHT5?u?i9H)pJ&xt8s&3}BAZbG>& zlJhuUf$#Lr?Lp>F1a}bL)T6%0LyQ(R!8CQIsA(1mGVFVCjF0b91E?rn+gl}msihVh zEm~9QV6tuGV*M(WvBgL+^qMmqaVqh2-uU%9{-le9(c7{ZM z9PvT604K{#^T=1pAAMi-(f7w2Q>D5uBbKT}C>rMTyV8!xM2O&N<M#GdYN`hgfl86%tIZu<#NcKnpno$yHN-$tehIbT($hP+lba_3YnCH%&gZcV9 zKZl>u;gBA^vw9gDwRO&ST%aCP-V`It4cHmPN)r)`xFL!)VCQ#gM>L z5%VlYLyLew$iJXoDB00lL?{cC{>c|l;O~K2xMWj|M#{8eOApjdH45#7PerFE5byLs zc`xay=KUV65yejw1M}+AyQF7XO6a%Qv>lZ8unx@>(hfby1=*AkZ1$&(YMF~Q6a*Ut z2a7i!Agwc5OPh^NbQnpuTNlEr0HVwHl=pfrkFu$!O{oa;^2#7-Are``jH})jqZ4zw zjfA7CVOpFfXUVYqK1AKoN~6hNP+CbVJA|BC9`8NCJrT3MwO(vjwhN)C%3L_IL^T$E zbFGTF>R&Pv5zTm`Sg1%jjnUK%On z?4hY@Y7DP#_w*Our%M75qhTW)sfM&Hzw1TkiohI1PLdX&i#8YbYIi4=y%vEUQp>a< zSwsP=Xa*g(;`px8UF2Ra_ZPN1RHysM@Chh}oyKP$dJ+$f?#D!aSTPZcD3@dOWFuvr z`bvfQ}*49>(cDZZPsKv`L3F8LGriWQ|b6@y82K2O=w99mYq>0ybkv7vfR5*m{LlxX8UgPj- zVIbYd{f8A)YZcziSAR<-LR6_-*Gg6Py&Oif14uG0MF2i@@CbhAi6=3&YY)bUhJd3! zUVUvIfA{uT+$gW9TGj=LMMX;|6e#IYV^uZiaJ<_wTxwq0gs?1@Ue%!W1!|2)Z6iiG zj{xFIEp_-J>)?Bzv`a+Sai-#ZQwNx;L`KT--HsFeY`Ms$^2jA}$gww0a*+dh3cEwY z7#_@^N%=#>+k7g6!E_!&Ou>f_&fvi0H163ojYsZ(2#?J?ioLt0u#XXxiC|!K6bB!? zABVUVmrm!_~%Rf{m5qez?1 zuyK=b?%R70^M8$fnq=WiUqr3e!0qBP%R7b7Jn>nQ_7E$pYZx9L#qh)~N*+YcSVHNb zre`a%OqPbd6H~bF-`$HpIQDy}w;I^o-oW3S{xRNMcncN&-ewy3a99BWLzm zr$QF86uA<))PnKl-}^U}(0Be5JAYjC7%ki(M1)#K$Yg=XXn1wIiq9N*2>q!Xwkz8T zbp?jiE)yX^h;}-g1du`T#oHb?iTQSZ%tb$#n};1u~fg zVk`xVj)}!gYHWGYdRZRSp^t(c3@E6H;K1u7!w*4xOErtK?C zs=b2E(gqDQxJyJs_{vaMiKSDDh6%cvWJd8=GD1lrUoMu$>hcQq-FpZvmOz#Rb%OLR z&U0eactmqi8#qia*?m$`BnK5l4!nr&35Ao1=Iq6{F@NTD++4nab#mpm-#&v&*DhgW zd!6zkZJ@H=blZPZxpez`YT)fQyC*ph&fas+J&epPCHM;9h&SC9IbxUjPiAuC+BK$K z3tPNUoda$^qof<7^uDHy_4!Imgtyr29gbNt#RsTfCs4S#)ogL`~iC~sHP1_=~0 zi^5Iz!;2d%a+w7$y!AHIdYjXH8-M%5AK~f8KZ||$A6DI7(%PkgKl{;-Ax@pzcMr^@ zq1u5UWrlKKx3x(}ZBy7{?QLuzNrE4ze%h#Oc=!ByG|HrwQgd9N>u_-9l*2MqnBca9 zV)t_U#XAPh&(Bw$I68Y$3$^EE19FH6I5aS%h;*FPX?7N+p#+Y4xL>K6)S zQ_S_;;Ew3isjlNMUU~_PD^{1TqtdA1OJ6&NN%qwB>r2?Pe^0b|LuXWPt>VJz*Ac9i zu=Mk@_{_if9I|7>(2`_MoNkhwL93OLLdPy0JU+Y&?Pd)dm0MV0ztuzzVNb5pK+_E) z?m)&bBU-|;=9@|*_`vQGgY$xB=oRTpf{r3#$VB1sqb+q;FW2$*YiIDtkq7CN3Z)0`G%+Pb^4r-o5uTXgJUPM^Ff}%T&6~?O z`?J^Zz3;w+o0k_!!hNLdNE2FHUypz+Y@xJ$8$bA~|A)2JWmQ4}`=8ThOC$2j z2dZsmVB_N1cQHA60Kp(rnC;`yC+G0k?>q^eq#;GsKz4O6Ec_B%wQVGa`>^fQv2Wjg zy!w-$VupQjbYz@hqGOACY=hA&Q^J4i+?%+1a|wU>*MG@&QBrF{o3o+}GY%stLa>+< zXy0lqH%{%?^-uODI-SM~Zp(j8*NnU_o0vLOUsI=wkkgyBBvKO-yP2YPN%JPhBL~ATJJ{N%h%N$Cr&%`@B{eVzxtPGuyJck!#MM^GgJ*mv3p_< zG%j9?M|*;&UwcjUxm-Sr;`J+N5^RQsM^vMiEw}02`*85^y(Y|+WP?q5NDX9h z-xudpAB!h#C0>bv=}a2ovZSca`bu*QBZ@LbEy{}bJ@y0+PaeYgGjDN!KS0XT6;T%y z-`d_1$X7q>Y-5vCd#NgzN>MYz7#?JA{`}n2YHnpO{?`Ba_P2{4wCUG&c;A{obBa3u zNr{fAYx+*Z6;Yh;h3}1yj$nkGF`vyVKycU+2vE^v&ZZ@M^IhLnl1GkdEQ=8|ri7$-l7$ zouqLu{;EA6x`nOBf)g}kK~r1RhT4A@c#r0CO+Cb8agj3h%acn9ribuNhZ`k6Q^=qZ zF`nmhAtGmFIBz!DvrIb86L~QvVvV6jCQCEa%t>!5WF!w^8F65yqhzL&dKEOMzCtaE zxIkwI+Kw6*{m0c6wZzDY54GjP{wSLk6gt1kF{Y?Qr``o+!D4WpQITvl_?bjnNU#_f zdO@_EEmJ*HPp&R|@}?S_WT70Jh^kV9>YA)Ildx_&5umw#6n)2!_92wUNu#=CJ`O*Z zl2O~~y^%=%;XXvMR&LIHb?(8+T^p#3d}Y3<>){+#tYWw$7swn($0y_g0<#CeK_rwY zMZWhCkEr2(&|4rqE{|$SdJ5HQk-)2+T6ro%L@5GP*n8+_=OG|zCn5&R!+V0-LO6t_ zh@sKrUWf+X0LA6?+jGDF`(G`7lpP;w;Es{RkU37$#YnmW`Um@w?aQzpIQR-*>`CV8 zf2lp$&qFkD%AQ?99-pK}DY8O>>8uF7q4#FDo`w-dlDyv|`f?cZl#@~$DL+t!lT7mX zeTi~3(CS5wx^t(#_r2n8vf(!xD2F^rq#3~+ms1S6jXX%`&-7<0WkhYnFl3qzSomFK zglx9RK80wUQb#gn2!R$Nkdeo|+~|QjNj2$Z7B6CmSS2!pDD0u9XqTt}I~yyOj8hzR zWvntOYv`e|5VQ5U`MY?O>$e&xhq_QVd@%I9lgW5SF&vxd=gJ%wG#H5%+XBp>l0F8gQbVH@3MO7i@M*A9);#Ef8LsWM@(_5ly z>efly*5-&4#k*PiT|X}>e3d_rKl9Aj7P98R^Hfy}U8fsKW2_^W0Ha&3nhrW-Ju%uN zk5~#Q2@sK+aT1~6$o>|PLz>wrU1cLx5;G758&PVDn&!C{R!b#1(N~Xv>48>ZEBg9t zKb}8@k8ynL2V(!*H~;I4|KZpl%wK!s{Il)Li_dFZjWw7>a-<&^$iT=8JsagN5qqSh zsDKE^8Nnix&anAvS8BAE1~)3u8&0(KPc^P(YbsSURI_!8PbEr~Ug%a#-#=-_HEv12 zR{6N={X|dvjvX2+^2do2`NE5KTsxt5s7$TUq_H;>qgYFgBgM^{2POxQGaU64VT=>G zLFOSl$l+EMV`HOABu+DBGh{h7*-4Z0Uxk2Ta(^TAH!FiV^Ca`&g`d3gnCDgIp-#4FVw?)pc8)g4Pqh@a8tE{QknH6&+X9ImeU|zOE9xt^$dV) z6DGJ#wvrpFEXMN-pTB43jy5|+}2NekVErG@D*ZKeYZ(*+2f zHWQ!&rBEQI0S1zi1QLgs*iLN6mSxM5wJ%q9-@kjm{p*nnGyG_6DKVL$!}+7-Ztr>D zbDrhA7x+#5dIy8oDZX&$ol>`}+)#mb`u$HmRmSTSzmfz!&to2b)BcVy!@iOAdD~4* zOT>!J;b2?e2c8+@W6>`aT;rL04!2v zT|q=(q3BHnO$%zV4%0MpCM%v0cs^SYjn7AS?OJ&H)TzPYp46t2r5*jmvqx5N1>%Y& z_@V2sS3*MrHwF@epO^OR-Ck0n(5rPAmWHJ22V@4S#A36@K{|IH+No1;XJ#N5OYj1G zZb|hTIfw7-?Mn)FQ=2W+^#gx-^o5gnjq$1zeB!S6CAEdQ`#s*?*YYb{nyG=5a`O#= z+;BfrHUo%?DjLlSYV9`sl%N`oAYZGYLs8KxE+NL4h|gxxT$+c$8we(o&@C3BNB~Z$ zh)S-KStu9YoBz(g9Xbd&c$Kl?1gT+|@89so4+v`Hp`NXyiGm{GtjxjQvIGA9Z8%r2 z!nT2}=`W?(gS_(Nf|sMTCaMzPU?!kY-&Ey$~76h#4s$0MEUL_52TP{@aJtpTyo zhHok3^e)WLx6dE{^9LtRJjq=A_>BdJjRmu3_YI%y=pXpBws)U@yt@;Vu>=Yon^0H$ zbOH=2Z411t0A?GNLIHwLM$0tO7532yHqfRdgLEFE=^*2p5IefShN5V2EF!(V04t+S znN%u82!hL2bMw)`Qu)4_fEv6#6kps^EtL;#AkhsacyQNE@9Y`5>eJ1eZj}}|30X^r z#_@2t5I_shHEO7PI#_{0V=;%mcoH`K-fT6%78|g54uap0kjTPuJW4hIPEzRv9mw>0 zM{@{M>HS#xuxbUo)`peKAe_xHn{DfQnNi=J?ifnks)Sa*U(XlTv*vXt_}GC1epU8= zQNQiBzS%?=v*jXOk%MWwuvmqD7Z8p`V8Vjy*ys;Lp?VDFmKPvJ{jk&^d|^KXPlV4W z!J+53XmdP4fa$sr84iwNfm3A4t&DDmL2oGwW%&XI%?2cTjxD)7XEk^5BDbYWV7~vN zrdgL;H;;9OP_u@sb#1g-B>+%-@H#qS7!GkB3pK1l4*I~bEUq6KK`x(zS!p0ss2~sy z!{$X)b%V;5r5zO@)89H2@a@(bX%fJ4NCbn(nmGuP2f=jVcO8Vsjv_Tb1E1s8%O3Z& zyk|Zg>I_cIEag}JA(v~fXWi>h(9Z_VhQpO}S*-e_h;7}0NHC1b8qCuo>-9Q1Qb|g> zg%HcZ3Q)qPjVkY;)@ULciJ@35qciD;NT*jTSCOZ`!;ugIvV^!Oq2$^S+7*Oks?ez! z3^b|;wQQ8yt-rauxbpDN5phF6v+e|&+3cb&$~wa`itd-es8P(W7T^+q@Eik|k}42_ zR+=uhMN^nvT7~Jkh^)bXvw?D@b`i5ZhJi2WM|NTkOelb|ZNREGk*n9xsuoZt-t^P| z8Lb4LX22AA=z;JjKHr&o@KN3hi*~EPOQEmNY#Mm@p@Rp_E0W;x2Om@mQ;Rog2EjpD zqvDcKZ?=iE;%Lyq+7?xd3pA=V?A|eg`Na$j>h4xcM}x|Bt^Zs)p^!qLBKq;%*=4kO zdKaC*MX-_X3?o4sbbfvu29>(U#UPb+G#MRsZwjlibj)DISRWxWpUtGo7bZTlZE>0E z8~=Q{wO1H(COOrQS0VAgeBUO<<$k)$!ccQuD8WfcX3Ze+JGYWyXnf7uf`OaPNnF8H9h!ArPKB{nQ4n?Yw9rKfjeD`s5 zaU{Mq+6bZ(d98ds1r1FHGqQ#HjYNzT1w*CW)7wY=TtFxsLrpgcnW>j8559&C+jYhl z1@ohf=%0V^$dOsRmIRq%r7yPo8l2m-8x^RCQ$@Q*8#|pk5+|QS?EEBpN+kqp8aUd0 zL1JKyuOQ!02%@O~Z2q-)XZ5?f*5@pX8NJm#kWzUcIjg8IxAub=6Owcx)!+anNjS=7xD7b4H zk#<~q_Bh^f=%7E+{Yp0==IChJ?9H z3Z_ZP=sppJ{vNzob+CPR9Fiqsu1ONE)`VBcAwfX3R5OW#<1i&2Hi4CGSd43%*V4!S z1nUU)QV()qYks|oNV^J-cE4seL5dPp;x1BQFfDV{jCz(HCkwSk+IFjrMy7x$xeb9{IC=au7;+IU>S3SdAWFR#CdsBM zosdaAG0d6@BD&$_eylStnP5Yf{-bsFJUWV1q!`kTq)6%{oU7N}fNUy_77@8e;+mtL zb7`@jM?aTWP$7^7Oc34i^Jc5&g=<-eS{|ZK z+*+p(>gWdc{Wfxu4%lRG7;*`;y>JN)RRRnzGl>{UG?Px6BN@kac4BqsC?>DkiMjqb zDk1}e^k*rYLW?AvO7v2746;pB(i~L;SuJDDQn@@r=T713b3eoOu`%rKiKC;xn=}RI z+qX`maLFg_zh(=9)%N@A*^HVaN3M|uHR~FjC@B*Xj8c+NZh=fHL&Tv_`D__RZm=Jj z-XW|es7!6=BGF4k&@-Bc#C6vq66=6R<-1Bivb=LUgj;SxoeM1PLrD`tRS(pWI9vxZf$0Ay3KPR_-uZ4T{D|YCiwW73;JCHef}oT+~U09W>l#D zUFs2sPOE0|V3R!%yV6*loQD$(VJRNMX*%7~)i-0QVIawRh?iC|>?8SQTd0s`ooX4V z#JaJ(Wh;uLhHBKmsaTMlhB8OGTwo$vVyN z97gC^4C$6OeBZg34r7CE;<9zTKhfFm8qV)D`bS_#1LVd9_^2Ff#T?i~2U#5P;>qf< zC`35|E);`7uHr@`kDe#Kht20E5v{DELTT3WwA8bd5ay%_8;02I8_OXjjXV0fnq|VUl%77*}cb zvN@bYn`$RVP#z|=5%Wb!Yi7}K34};-MCh@e6XQ_F&qHwpIE0>Eg(VbQNt`T*1pR69 zgfbL5(PB1_00B*qB$>xm2IH~`u4?Lu zwBVd$&X4c#dPiYV-?jWIg4sHnwKh0PDo-UBCJiYPw5x=u-Kr1zauyL1)v2@sopHEf z1&%7BCHrXJ$)ZW_Ja_XxyfU-{RnnU5@iQ2aXeL9TQ)=7Dl4D=hn&c=9@RVe&xPtQN zb`)=a8-%N`Tbt7`eaToVbM@7)YQ(=TE>UxZ?9NE~Ezzw*y-k{(Xr>5@h@D$wB+k8v zdY-P4Bd_AB?K?0rJq@1JNq8j#kj0t4;a0p%vl+R!pQs>?GM##zD#2jlB)S7Mb*m!D ztMoaGP)@uExqkrJjsZkinvI?xm#k{z&bZ^g_;|TEgAK;I5p9!@|rBxo`Vi(I;? zCf2qEVyi-~q>4V8rRL8cNAUD1D(3>aeG0tOW5Cc5>NF4%+IIds#mv*#V61y=IO>DA#`aBt60xX+mJ*mYdgr>$Wn%(T)n~{$v5G&++?&uu( z;tyA+ENmdwo#3Hr)gJBYm`t?w`B1$v93*3>a~zf{1zAsa(ePKK!IFlsWud)H+Oe2H z>+A$2=b{{sk*nY_SYJkkq*o}}k8pk-%*kVrXfjUti0*}XsARjcTL$4pBA~WLdCzq; zs*oUtLU1`QRBUB>?}&yowiN{Z%g-qR4sU|$*&f)Bo)fzbf#dw;@X|KuIAZ{OXjSo&VAcHxR8 z_>1`A>Z)~capCa0f>E1eh5O0@A1e-QgU?UIeDoQl2r%l2VfYr$Bc>OTkI)=dmC$+o zr;sgUPPE$*f##tdOBvWNzl0i1#8uL{eN*G;o}WWM;bq0Fph_a$q5oINCbb<>O#uR= z^dQ2i2p1naF%Y(0|2L}TZ(VAwm!*kI1@CaRP}{au@__~on~aqi#7HblON)qgQR(&d zAVd@D_`)=y;S?e@-IFEhAEjI#cHN|V4HD>WjnFd#hm;Tv@1fG2$3kWW43)j7DzJ(A zxJni=awwaNix{XbB6#XWNKOl`DqZ&eaNUF7|1Dn7E2nOd_#efq<^4;gWugEXQ8KPU z0*~{VDG2El*r{=^BQr~7nP(hIcCxrK-p@r{MpW54nbBW)Ri`wWj(Acg$! z7G$Xp=?%$L5)jc4N_pXB^l=K!U|Zl?q#J&zi^Cp5?YiodRTF3XUul@U+I>Gn!MW9L=Kbdd8@96n~W zMmLR&-uvj_VCZt|d(8<_xP~D8dt7UK9i&`r#U20F^u%d{HUFijWEeq>b9A^TIyKMh zRKm+YnVg$pc;l5YU2yuy^*cUgtjak5R8jCq#&7(!qB(4+tTS}`iKgYp1xrO?#~z5+ z?n72)*npwGuUo5ssi#^0cFJHTzi`t{iAyc+HTB>xf+^Zhhg!x9LEh+*!N%%{N$>N|-Kb{3sFmZz@)3H`lJ~WxDTRXGw^EF(eMq80!W6N)!Cx;^7MY zxb*<#dhp^k%*BC_clX%QlaF3~wa}*~_WbLaXW!D((<45#d2?{imI@KQ^clf55+}}_ zKJ&}(#LYJamlq^ z(eKH;a{v89`J>~Xl^D02m#QB+*Ri>^r_g>l?wY?_Q^dFC+D556;Cs@6cB;U;f7}rt z4n|jUpK@Eqcdwf`_82Y3{pQyG{;u%I$tQ1pb7Y3bAubK0A_B?0qt9XIslzQIq`iN7 z=FFM(uIY-L;Ln3;UYP%j8m&4OOu z>|f2lq_4~jF|2&RaILrhVAmcCW3T*YoEH>nae?bEE}=jOp&NAbpPi#9a)*nvD z8(Gw=QZoNn+{^o}YNfjO&BT(BOU6O6j9NYc|wLqlams#Cp z`NP*N4(*h)vda2Q+Hd7W??;Rx}pi*pXdrXjC$W(-vHg?^D3iPdm5YfU?muVtkwNKAE#!nz3JjNGh&(f zh!Y6NtLd#UlPNIOb~tkVRiopK&{ytBqutQ~F-z35<}GRb-;h=KNG&CcnMBAFZW-uh45G6zHNSQmA8y#CW9Cyf9VHJmFhid3&g|>>09auq^wd?VW+@ zde(Hszl`_v(B4NXyLSE2^P|^7;XPCh@_Qz!5}JKlj0c6La5@=Ul@euJ8d;+_P0}jp zXXqN>$YDCU7@F}Rq{2QVpMMIR?tbjhIwYcI5etdSe_K`^M-Ld(xzYWuzN~xCgmMpumaI(Lv(b}uT6tSvAcvlUw zPE)G|vx|vfF3T=f%S|hu{9KvQz7{gD->TKSbcO%w_&s-@#n@52+IZc*@w;~4-x!i(&!)4}!t#xY56fU$^*g5vP;) TyM2-T00000NkvXXu0mjfDOgO0 literal 0 HcmV?d00001 diff --git a/governance/ui/public/councils/profile/cokaiynne.png b/governance/ui/public/councils/profile/cokaiynne.png new file mode 100644 index 0000000000000000000000000000000000000000..61f3fd49d506b789dd2827d8e2a80ab72d52e95b GIT binary patch literal 2009 zcmV;~2PXK5P)qH3|AO)X^7{vz$+~V*L<0}!OVoU@^G%+z6Ap9YT zF@S&|CJu-ihyjWW(-zHXqP}Ctf|3xmwI4+@}lA)dKf;tW?Sl; zvnGHfNlM_|6&4NGP?Q3FZ8AcY1y21g|G5xn%jmLhbSg}Y*QKhaD=kp;+U@$_5}GXL zqbp%-x!pl#J8Mm~RCSq3lQtH*Z6TwW-g?k2U;!GN(`8IHp};%hg1bB4BoiSg(o$ge z6&EJ4$hZQ#zql~gBDGkBVnXQ|;so4%o8|{`&#{ii6ll(tJwjXyo;&v(O_Yh|Z73*Y z;H%LC(HLg!ox6TZ>#_)eJ!jm-gT|xNmfL!bj4)9R#;ZM7oPfKHIwQgnY3ae{#k>sd z#Ktr{Fz`O)+%p#b%YU1{R^(9K@fo9W?8+(pb?pp-p%B_hwcV*_g?mwNxv@~}K`Mh& zPsJm{Cm=8LK};H&O`jcRd7$PzUfaG1Mkt8hRA$re7!1vNXfPTPR;?ScM!YJ9Wv`BfvdR}i^PYP9-O?Ppez~l%)fsoUL5lzG90mk3L(;IPerON z6?U7=EE9t3j0V)*ZXj`)G22zuU&r>c60GuXMiR92qS=FD=1fN1Wo->!%)Nw!0C01X*2ZaStydK_rg25b1lVn1aEofz}2fS zR57y)Xr4tmxEG2%ckc`g?>88Cn<0G$V&=Jyc=!G#(Xb*REo+6IMPr+=F?fs z9{VJX;a*V0W!yA88V_>i7;o~>T%@I{n@zH$r@D|oekN4mHtwMzq$%~kUDGjV+|%f6 z9vv|WDK@)O8#2=zjnZ^V<~crNRHux+wuo!y4jKnFm`9@=q+6wlclbo9dSb1UMYirk zgT_M*=F(Kxzp3Q0SRp)-+1uWOcT*u=-%*4>?S;5?&(&Tu>xjAqKYxVZFO*uI`>~Oe zpayqqD%I0d(=f<6Anx(<+Dd$|=Sy6;dD;AY^6F{4{p+W=(Nq^zw<&lV3wC{O))AD| zRN#~St4z`H80bt_9v(^p?@M=E9{;W42x=Q|MwHbw-oW9?<56`FP;XtTtBNSAZMum) z<@ zsF>xkdVWkCYZ%sd5Ug;g4TU@`Kv6!I$`A|UMGRr`GCdeKAX4PSA=zep*p}>pqw(B}gB1fD@~awSJfL%iQsKABH0YPo$MSd|yA#W2e28yPY{QxAay&Tremp<= zvDg=(dx#e%S_`b96N!g?nH@=GSyX7Xqcmp@_n*Fp^6#M36{8y-^QI zs!Iyi`!wG?O3pAy_2SXWlW~s;@gMJ9iO&vvjeQkImBdm!N^9kx=0d;F_l2dU9I?2E zHs{Q3c9xRHF3qDKlypWAUl1DJ{vV)?B<*MfsWUvGeQ!$iTto ziHD`8K<{dLxS3+645j8^5w^UR{XET(k5WR(5p{fV$x6zM9fAr^(DJZ2@6D)kkw)Bb z@+Yi4u@#NMCdk18`(9aRx;$o@E3nnyF!F^5#GQI&nu~Pbk;)S&{%5B-Rf!%FaiXB4 z;tzatyx2556;9K#BHXaBGa+0&asEa0WtE&iO4pQ+PUxn#l>c~atNAWmq}q$E5s9bC zloOpk{9$}mx*1pExM7LNBroO-%F^vTd(brX5Kk@%OkZ|Z_;Fgq!Zu|?ei41|Nhg52 z11yB4GKSzvay-8mV$t9zE!UDRkuW4NpAy6zCS_t#dLlN6d+CJ%xnveGutlvW2 zyaGK88fzC}s29f>JWm}*edXQ{-BT}SgKgg6_6{=eHu z!u0fwKna7Z19XBQov53ct6z32msIp9MB1Bdx!qxQ6|*Hh+?+1EwNm-v-kohGSke{S zDJeQ%&~}?h!d6HEF)nq(DCAmaxOJ?Wh4>1+kG@=X3uQ!Wv;%Vj3K~TeQB3Rj9&Mkn zmb0LP5T;8{a-O9?)7zd+>6Gg8i*aUi=)U#{YdItC0#nxIdpTnsy4h)T1s92S$NIMd r#(6cxjec;gl-~QPxBML;sx|)sZDsgcD{Blz00000NkvXXu0mjf&9laK literal 0 HcmV?d00001 diff --git a/governance/ui/public/councils/profile/jordan.png b/governance/ui/public/councils/profile/jordan.png new file mode 100644 index 0000000000000000000000000000000000000000..6724fb439765548173f63d498df7de51003a89d3 GIT binary patch literal 3427 zcmV-p4V?0cP)Ury_;+9w$POM3eE@nHd;^fhQOsfRhWs)k|&f<-RJmn9YcbV*4k$ zM5)=;#p-w7z4zR6Zwa_*H|?g~v>qBm4=rIF`FEA8!%%n5`7WTa&VuEg|0P}n)6gSJ zDbw$IPx{2ir&u}*v2&g!7#2r63!i&3`2y4JN2;9{m+7=XkE~|^b(nX*nGIx5Aw#GX zFbRQi@FehT+MMp6*gySP>4jrg_`rPGX*}FI*x1Co z3Y`-K(3;I)X(5ZWmd5LnlLJ%9;^DGed$+!&qUvXU1C)I1p(%I`Oi-qCdgb&gR0fay zEB97qI;ORv^2pe~nTHc&AJ$^x1Hi0~J+#*Z;PtOk>7ZCu;X>u|t62b=QKq~pH-m=; z-txYYnD{96(0Z1Ge{Pbl#f*Wum*V72m2mRlEE576{W=vZV!v8QWCv6K_lY&;bi8Li zh&`|#dXNYIN?-xO(4l5DG@5LOGKIK)jm%S%LUvfs<;S(`Yz`-K*aPbcz%-6c-Jth?By^(;i?&dJaW7?gey zg94>W{1v}aMr-!~=QtD_MuFw-sl)Hb4OmYA%0ec=1x^v$fyttZ6^6GB-IY&knQ!0* z*4gtip^{5jLPvw^uzfY~=&M!08QQ74@&`t9xcwA%X+338PV6ECRidK6RUSvjF#|H` z63X8?5=t7UbH_(X={FMQ~GDUP3HHp36M z2}aqVU+qB05Ih^Rsz$wrf_%G%!>&o?B?i+>gz(r-qE4uTm`P5|o)hkXWi6Eu!S2V6-SqkNS z2EC8?lCM;LF22{8JK;Fbz7S<`H|)WbcK0dM9Qthb(DWoLYVfK3Q%fBF zTqj6yjYPFpQ>hm6Fy^*?G`SaFhZdBNiA zA#dO|!%Tt#1+^Y`LU3oBpqjyZ^ z@BCD@SU5F1b`Q9gLGcLf@;>^Ihh7QjnJ~S4riQZB#73h=cmytQT?k%7bfJg3FeRfp zijHR#di6H&_O_0}L^|+cjFzf!VxfrQGBUsfZXG#P{HITz7=QDrj4=`1LiIWTv7lU~ z{QlNe7pwC`CKQeub@W4~f#F1`xYC-5TC0X-Yb_ujw%uw75(F+yq!?2I*e{Ye|C)Uj z|D%ke-$-G%6>S$DG=@!W;PqK!99^x>RDtw9qVr=M?i$DPGd%cAAnf@hfUa~q&|gG5 zRlqHUad?V{CoeolS9w%UJgSdQaFK#gl%Az?qH_%oDz_l18FWYbM8qN?jdXD;b^E|T zcIt^c4&JK-i4=Ii$KWv_dz?d)MSO#bdP$~~%(*TXgv==rvSK0@Lq3+mfZm7urr(H@ zqsL)zDFAHvv?5>G?(_-ZRo=$BZ$t4o-cdN2>a)FXM_6)nzjL8zGW1l0p=8EY^pVzN zYYH~b3e5kg21ODB`{P^xxeg0ox}}bqT%1;>aKtab@L1q^Nw{)DN|cXhTB~r|PQb`M zv`A4G?P8vO=;(ph#}ukriU@~DrlBC4Buc-eqV!Z7%+Z6L52EZkNz;;r_!Gda+iK8x z(QLtOdN_n3c%*I?{jFe>;Zx{yMa2?@?xI^khQKN;nolBKZ6bExWd0vwj4Rj24q`hL z8IKY5t2-l#SG1kVBuj>9lZ?BvP7FyQ?!_=IM(`&80E)bi?y3iIvZi@h@*5PwB;duX zE`iYjdcn$_pi7Xs!eRnb$A+j@2`nv^&}z6lwN3o(5=-SDe%pd@?7)*UpA9Od1<$}8 zd=Ljkmb9xMM2leT`g}EtMG8?7@SB24&VWt}$=EewP&)wR`xI*ASx!Xbc4)x6FOOPo zr)V)Ej^dRT5^ayzGYrib-J@}}MCAnAIoI{R5-e=S&(Wr~v7$EVb0tg*M6-xF$Y3RP z%-=bT!R0#s#itOGVHS8R4BK|g#&T9e^FKxr8;x&o48wX=;N_R9=xh42Q^eTi28N!x zKsA(a7m_YG7J?-}aZkeurASw=1_GV>Wm<5w$v`B4GG|)!@ML2+gTB=!@_7#mZU5G$ zjjb{f3oU3pPNTsGZpHX?0){GrYN$Crin>6%kR%Y~orOBm&s1Pn>!Ijo;p9zjk_>;U zifD)y>Y5WkANR8;nm&GLJ#E)vKN4llkpTLXBg8PEP6$TOsD``g+LRg8?rd#U(3t6? z*`Gn+5KOQ4m2DiE+a%RiN88dUc7wXl*Qv0Y5k;^I<8 zz%AFXR;lB%U!AWe+~?_5y#c7w?vHi^Ov}PGPp5oyU{k&|>qI)XgSKv>e(!$F(1=i{ z;%qt$w>`ZEy+%N!rjVpnqAOgi>C}bX|2mw0@DMU7g~|qS z<>?iC=ObShm+EWpKz*?iWz7*uN%nCRiUHLiSX8IwV&jTK6Km3+CkHSzVi0gzERjlK z!Nub9O{{J@v`__OBYE65F@QdmMitc7MVhq1RFK{4N{-GOjBDr@tYQ6ZX9c? z4Cl_c|tWkN7p}Ff0#w!$dJo63mHX{(J-V8s#qC zCr{5QW>1bFlU5Pa!(3i+)^MSH33jDJO)rHsh4?#-I5FQ8=^TRv!2369u;wqq-il)=l?&um!AJ%Z>*s#_JYs4K#la*B!)@Gt z2h~g3q@TR_GHPvFf2D>qAAc0dhu?zCtDOi-;7#6Tu-K$gZOD~k;x z4keIe3Wc&ypDiygftRY7>>HyQs0o8Q`|;v_w4D~NmM>z(x_q9ySIVxtwj<=htBTfq z7tv=_g?3{AnG{a)IRg!Xm{5cFa#is<0V7tW@)&><+bt1yX;Nmj=x;n+DX*e0S0G}E z(}omN0CHv)jN-Ze!BR`m+vrjGN@WvsKyOJ}#9d}jxH4=yr5pQ# zkCxlZRtIzE&?Ad97tLaJa{u_PXAd8pO+EI+7vG;8nmpw*L0r!J|M#A^kEhoUW3%2w z-B}F)`n<`1Huv@C+g>B+{p3hjajpOCkdRBlsh4ohLXRzy2WxODn^xmT^K%RL3r($V zt$hDpdEU@Y{`1w<<S+9EX;M!=ggyTbbMt>aHrb#7azqvMhh381au)yq002ovPDHLk FV1ivPiUt4x literal 0 HcmV?d00001 diff --git a/governance/ui/public/councils/profile/kain.png b/governance/ui/public/councils/profile/kain.png new file mode 100644 index 0000000000000000000000000000000000000000..35d3ec7f7a44fedf727ad6e99d983543c6aba19d GIT binary patch literal 4497 zcmV;C5pM2@P)`+o1czix)BOq&|E2P1l{&St!hF|8IHb)4}a9PR+Nr8<*q|Oaq4L`dapqC8rvFBb{1I_*shS}7g zoJgV^*m9|=TQEQ=H6y;6K}hW{N3{Nnrs?0(*zjm?VdD#+^)GC#HZ8W3O9%25Ad)88 z=E_1;HZMQ{E@`9b&#sdBs6dco0{qH?OHlzJa{~OzgG*5!klJV`g+sY=a14d}Fh0uN z1>Q?MCdognC7wsSY>akNddn-69OoRXmM*}xGb$m05(bK!;93R_t$|o9iJ$LjM#2KV zzN`-Orc~g|Gw1Q+Icgf zGlxmy*Jjz{x_csYn$T%Fs-{$;wq__n_iAgU`dy`qdj00YrDJcf?NGpAuOFo`z6qAp4fA85rW0iH@E=ObJdv zsXu`Jp%{*x?ZC;?=Nw620!oHEYj1tvm6qn+vDB$72_|gq5ytIm6hs^z-NfJBaVw^V z%CK|KKAi1ph0m|yAHI1v49$YZ)i}juhFv$y<;8w%c;If57|^)$E&Sr`6SQpvod!`g zA|&J7%GJTgo=@Xr1N$l>_i5VNG{ z9$k-ow{jaA-Jy~0X-s^l%#bS(r2#*tPAEkcsjIHxlE9@XSX_c>p>k9d7lZ3Ql9q*u z!E($fA5Yi3Qe_1(rMS8IbV*T4P+j@}MpXaA23A*kbqPv0h0_ubF|m zd9xfCj?qKSko|dOR9RMv`{H%~zb)L1gnsibzMXpCcLY zp~&MQJhq%eoX;-~RwvYyt$S{3J(*Dx3LrzM1ubwr#kX}2-bDb#GC9TFJY@SX!bGFvW!Dvm`f9j+)`s&)>SuYwu!!Tt+Zz`l!hKeab+zAI$F_l zsF}`bD4%}|CExBsp|d-J{fF8R@OrRt z_ACk`99{i7`lXz6si<8iRJ1ym#fsYuuNO75s-#2dBoB75?F2$40aQ(%JgWI6C`Nul z?M=>ys4O{!DIOo9eg6-kWK5{G%zK<|qp>kk*3Y$G`s>9Fy{9N^A?@&&AW&LK>dn%O zRD?pfe%@TEIYLu)I;pEkkShX^Rs@ZF@ozkNuyyyYf}b4BE4$ys>+gJkx|(Wic<|m) z$M=(M{9C*ggDiq4!#Y-+I7AL7NgKqJ9U_$lDZaY31YV3DMO4?Z>9~pI$3KHFG#i1h z{cU=T7`|X;6-llN0~7~;^Hvi{U31x94ha!919?aUahZ@Y<+?SRn34VqFUGR`K2IN9 zB*|ne0*Xn0g-Xj>&`A)~u4h;iHfU33Wa^f3CYtSH!1-|Sh@@QO7IZtco;@c2V*(T` z^+ks8{I*{b7>;{xz8-(G>Lz%-MI&m_?qk2lK=@O1AdXna04#&!b+Z+_wKgm*s=#;3 z=E{Uq6LH4QtYA}?p6nuUbnV}99J}n3h<>ym-Ru7qo+2N1{%QxNQC<0A%Q5_R|0h&Z z`S9@Vw~%@o=x*AJ^LorN^8Y$fd)`EI=#R-ww&hO8t8yLxc!^F#3Zie&!FW#u15 zM^`uX(Z|E@F(@V*Qj^BgPz6vt1ITHI8vI2DZeF|yI(fb`o!z+DH-O6W30N>^x(tQA zXAgtL29fALCv*o|G=b>*7Z9a;eU$V4NOb-hWN{TF~#z)o6d-`NIgwP4E1nXs$N z5GQ29W<+bE>-avZ84Ut=GeQejBYCPFCx3kcLqkKTUUe-3G(OQ2C)HIP3Xmclm{m1h z9+6layZ^U|X3`KDh(fvY(d|$?o+C@)2kCou$C@S$Quz}gP^BeBvK=8dvaHmPiU}nM zj`NaJuwan=oa;$|_e4<=C_-Qyxo!&PMb!bACNQz01eG*Tg~$tNGc=*noSYA-yOoSk zkE4Ueb-_2I7*g1a)Bo1ONEwQmt z61HZFgREt^6VjwBX4F7Z?mRsm?YtqJh^*E{p2 z%4BoJR@(6r<33X)?jpA(N92{g4|wRqBWzcMAgCUNJB!S;8`WA`{{BUaVOp^k-6-mH zKj#xW{OQp)ob5O(!EvUfde@EDVFtDKm^)a*%1V~XZ7;s(TSVgx%-2dO@vvox$(8O_ zBn>?2oexgBG|vo>v{mK6+-Z^vhwueU=hx7D9;z%76ec=GpBSun+q3JNjmCzjdLMiK ze6>6?EC7YQ&ss%J+)Dse<<<+UEKZLsGM5)^=UdR7oV` zHcvCmxZ@o}FceP3&Yth%qha(X8LC6Y)EJ&b`0Zh}o$89K@(L>Vq~GT+_Tfxd2gOy6 zcsvP{HnVGBz*z?vQE)TtN&~d4c=K>I9kF|99&8uGEGyY%>Dq&*M`SO|@WQLV!;x?Y zp8V!*_@{4G%1R3Or6ML6{&SWYk0ly?3l z3?tDQGsp>0u%yF7JrWyyqtcB0*~<>3jrcg4U(@lc0>p5(Tf6^k|NTHK)F%Q#EonFOn2Dx}_*~ zcOtd&p7{0}GHwIEYJLa*-Mo)>)F*2@uN^~Y*G0z(Wz`9zEh?3I>pwqC8)Kt5AQJK< zE?l(mz2~+elC+&sK-5%{i6>0_^*#5%FgzGc#L(LpSDw}B%dWcnTPT}ZBRI`k$i~C>Vgx5EX$RT|F_`&f~Hkqjm&$Tc*>aW+O8Tb&aEZyhrLg z7i|aO=FKSD&h%i2B*l2jeJMK@%JD^8n>y$CH7A3U6-tymbO}pRcww3A+}_go^b_F` z0CPz(Njmevr-x;O_k3q>y7{UCw%T*xq(C@Cw$lvy>TaeCO&wMI9lEPyg( zJol4FX|kOT1bSi=!+*W~VJ42rs0wway!={bq zp$O*AnS)ne+fK>6=4v22b8&agsAycI1A(6(fd~*!f3P3#o#;ZEC3NqbA`)^|W&I_x6k^3Q_>mj@Y?AG}wpUn96!AUjV^L9%^rti*Yag^oJwgp&8XD ztZn#FP&fQd$n)BWU{;eUS`wc&?ZJ_KZ((vMh&O+-k)BW3&f_!3rHh(?D+RDcJCV+a zYX5xC5FXh0V+_SD6hgY#Ff%E8L@U<*BSNzmi|`b-lK$&Pdv|8kuB}j2OXv4Py)TxN zgk9RwH+sl@Qveo+@cEi@t0ps~^qEY*l)l-{r+9!P9@2<3J90YSc|0RA&{@{ zIe~*NV%Zy`VH9~I(Y01cD(z!Ot1Lui)50SE&${g@!R7h>(n!yREf$tH4X%1 z&o_)LriE!x-WP%LcGdEM%*3S(H=@)MKNnP0;I6-_!JHZ8`1p%6s^OHyI78Q90#oNL zM2td+r=;9T#rT+&9?jlDlilBVHD2XPk#sz|uR(d&49RB;zP&QknVV3OK$b6Q}bX<|@lMay+vPgY3Y8rW{f#fm# z^0Am`WjLvbv*L)jMD23@(c!O&Gk7F%SqPYx@5Mr;=B9!r z=q5+^8`i(Dwb8V!29ntdQr2om@u0ffPREq~_$d7p#i?jEi8m=kXwZFr=p`Z})N(Y% zQo#I|1q@dLFh!0BTPwa-Em*RaOy@qrP*15`P?f=&YWwry#d5}ph{kWGWF}D1S}4Af zoq3zD1Xzl$2%wwVj~r;EkH*uTeWFUQCkw12Ns(j`r1)4(pVi8|(h?5ajP-iSBU)TL jNOssl(rURHpxpFFBQSV`pz4Qv00000NkvXXu0mjfd*qQT literal 0 HcmV?d00001 diff --git a/governance/ui/public/councils/profile/spartanglory.png b/governance/ui/public/councils/profile/spartanglory.png new file mode 100644 index 0000000000000000000000000000000000000000..79a93bbb8c26b65e5ee02bb9644d06212c5dd7ed GIT binary patch literal 5188 zcmV-K6uaw*P)M=D`j9Gt2&jM1Rzgr!YAF#iG*DHQ zXdn?PZCcEuq!2ZU1p!I|SwkI#04^IFVuNkCw()bl@7?>Jnf|_W&fWE6@9r81%CXMQ zy>rjZoZt6-=l4C%SmASSVHh^>u+sKUdz5qS=M2r-KEVDud$&?*2YwfufMUOay^Fm+ z{Paz({W1Hk_+4lg*w*l~fvVL$X5Yr%jxV}R3s@k3eEY@MJ*b|(@V52S0#&%c#s}TN z!?$t%nmW4$=1<6fWj}{Xu?Io11jQ#R*M;k45Q)}ehg_)kqfohZ(c7m2=zltEU z_^bdexGqd!k^w6E7RCG^vfVG@-B%w%EP4{LI!-=OK`Nbumk8i^p`Ir#6OJn%l>V-G zRE`fP@F*;5(v8uK9k|g;F!$oy5udS+AfvS=nw<_v^=ZM$+Ts8VAKQyJw%>!%-rYzf zE7X9Gc)f#koy+AFfugoRfbt+ml%X7Lh04*36b=`q3N2tep^8sy7*J?#y9q4||AN|Y zAFypzCu~f%oDx z=CAt>*Yd@v(Yh_j^N7c(alzJ!!TAU)1oy%N_+aPv5c5OC;x6iD#F1&>x=XoaLINY1 zxO#or>(ux$tRAgaLk-%1*TCf>+e5(|FCcXHBfIM!KKrQXccS^Ov~$Lk07DZd)o=wq zcK_l(u=kfwBB1HTQWexuYpDi>NIWDcN1NLC9K$gU11v=xPX-Vgw(qD zOckLJup1}$KgweXMoj0myR46{4bZN;^Cb})|CW94Rdm1d5Ij{xI#EQXj^Nm1iBM}z zdDhabMylEh)cI4A?*??JJ46^ft9i(N4{6>3EkTYd=40gaizKxd#!cewU@WrU%sAT8S}Wv|nQVAiLM z^XNW;_b~X$3!HCFE#7&i7QHim*jnofzc7MIkVmOppf4-ZiKh{bL2CnATOkUJLf-E# z;pj&>+MbV0lZUJSgz;wF*P3w39CKn^BhGHDNas0|^Gzimp>wkvv(OV_VYg>i{ZU1;Nhy2TX zami+2&I(T64J^MJBJy0H0K0i@f%lBn3dimgfK?OSGSP^TC<^&eM59UMdydeQ934;U zh>HME9(Hl~SQ#B(^0D&rdJOgD5k?7eC_yqwA(3u?8zK4F>oon_*%{=4^sGj6KSv7R*IQ={IkWXbi!7q z1_OTtL1};w3QSrmguof*iYY`AC$RZC2E)-|1o=8_``12XoC+>m8)D5@_4E}TbO3&N(D*NrSYS-7u3->2{81eenLLG%z<)j4i-A)y z+BID9zh9P+UJyGMYY03PKa zoV#bn5u}=T;IgkS#l_1SAfdKz9fomr$CCN|6fE^JAEGRU?|$Bxt55(b5qh+8o7!1IMWC@>v*k=w~yJfC0r6t-+fNpdoZV zOakf98B0}+6wOgt+^OagF1s>Pvnps?OqUWNr56v=5`Kz;pJKLtL=sA! zH7x3M@wX4Iq;LjU3E(vio8d$^kMl4*)sJ~|zD^@cqsVkUthZ?I?dU&56 z(!H-;hD0YpSYmnO6erH=PEbTH{}PhCw=ZLvv8X7u&w(mDds3Q%ees78>sM>H$pOlZ zn7~#TK>PZp#ys^Z;1dFV_sg6>Md|hEkSSKIq1J*rj`L9t?d@si0!Rl3+FvW3ylcnr zR?SeU^i zuULGx(eNY)We(Yzzw!aeRK1pPR2ly#pIw@U6S|sM!?H|_53CRT}L#h3)F7WL3T za>JRN+ia;wP6_bWlMVq3uaTKtXAa6@id=7%vKFt-<8*E(;+AzN+AAdSHklNaxG7zj znHm$fSS$%sK#oS#^GOV^JU2p3d$!CG8WXKL_%RJbTTzf_1+V$bJek56jZfSL1z_#O z$_j4Af^{gByt3fpYe~WET~hWkKRoF33n9uDSk8_{no0;*ooYuw=c$$}7@n zYxB4l5z!JK>Q~tPPCpLrDWR`Vp?9c^)tlm4MM~$6cCTrSJ%TZS;+himYw2EA+jAaJ zn@78=0A(H44%t|5S+ePN9Q)N9D3?me4TlW92#mBTl{6^`ISkYMBG=?_8S|GEvHprS zoH#ub`+u_wA9eTB!Izlfvl>7lMCd-!@tDpKa`_5wylEzyT9vN5o~^U-8mO#$RiZ$L z6KLqXor7Yi?m&fSsbj1S$dQ0ePB$cRb-8>o8W;Wgq)!X2fIgljIuJ?iZ-7rFu#Cn_fvL+^gLnqPRl_<8 zh5{&)Vap_y_O0Ye9@h{QapFsA*3QioV zAlJ{pJTDI4dS&r_eqa^q*rU?MjdLw!i^6jIp+^K z(I}rf<%O|o4)>QaV`e8hHvc``)N)#`J2foRvN&fm^sH<`v`CP* z!Mt!VWg8h9MZ@e4q~|S1-{E~Ya%2>}y`yNI9mgCx_8Cnf_YA2?dFeo6bx%A&p!YYF z-LH^H%P(=AGW;s`vRXx7Iq1yAiQLz)D76Bx@ys;a{parVo|i6hz;=QZQ@yj+T_ix> z_nUqA;WJNQ{nDA}rCAOlqaAoWSH#i%1q_{XFneYM%}tDiGK^^Bp58nWfF>TLIhGZD zDP2v0K|m^lnQfg&H!Xq7{rQI;e+K&x<#64#*Wycy7h@VIADQSK8dU>;m}nO!C@BiK zr=NZrkNwMISik%dTybeDcK)mjrBad1SVkc?in&cLW~FGdtj~D#i*dS(WFkPsl>)F! zcN6NADxQiU-8u)&^Daf4Ch4!D!&`|Y>!+;h*NtE-FUL5~UU2)?|!1A`}7VqlCY03=PSuv}jz;AR$m zXV#ZdSLd@*7DtkScq*M@J++BD!}E}?Z{{}KTt?{iG~1#M#w*1#UfcN&9{AqNWMb}v z&@DuwacsQuO5A+&%~-Q$4a3C9x!^ABC4@6UmP)0rojZ57KlRj8*t2I3Mn*>TZ+?Xl zOJN9&G`*`=ErBWwYON%aF>a0~bsa`}CKY2bDMLTlKtK(spV3Hg{G67pwV2s4(#d_G ziFfyb!}z-g9!1|E0TZA^HUX1l0hLT9(b?IFTW+}p8#Zi^b6I@a*GQ`E?z``9fByOB zyK=c)dyEl@gjp^NNdx_Tx(*{b;#yXpuU*rD-kwuvYHGsVIjz)8f<+;RfRi+{CZtn! zG)WessMR<%BKMGpMZZj9a%H^x!N>Tk`@fBWp(1&SQIG8T+j_eAO3yR<98qottzNx4 zd&eDjT(xS|s_bO*pB6zaUc9({bab?fX4;-eB=kc>lRgtb3E!AUVC|wgSk*BLvoldF zTe=Jljg8tZICT8!bUg!r7>OpyLQz!besYg$IwYlvoxAqooB#A(4CPH7)V#%I#^}0? zG9Y0-cT+$&?%TI7JJsA>OrxDXeR`myqvJ_}N>GEBix$nqY#~85LHqMKda56-EiG8Q za2}coFwV>&8lkqlDA!X&AH^w3O-H}RB?%Hu;D;~1hHpK*4I_oXyk#M-!BO^IMN`5s zH5pw!c!d470|ySAn9kfUz{Qx>+S+<+V`Jmiy1Kgd>O)1ko?}X5$wU;lT(<>RU$IQr zL?v>O;#9!(l!(dhQCz=EBX3TKpq}~fSFruHH?`Z4AUddK^OAjqd<^}i91=t0z!RfTn>>5iH yv>D_7rJ((sVOf}3kd#Y)ZI9j4eUo>(?f(H&KY+Z<+zwO#0000 + + + diff --git a/governance/ui/public/councils/treasury.svg b/governance/ui/public/councils/treasury.svg new file mode 100644 index 000000000..2bc29fd14 --- /dev/null +++ b/governance/ui/public/councils/treasury.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/governance/ui/src/components/CouncilCard/CouncilCard.tsx b/governance/ui/src/components/CouncilCard/CouncilCard.tsx index c4a926b7c..3acb4e950 100644 --- a/governance/ui/src/components/CouncilCard/CouncilCard.tsx +++ b/governance/ui/src/components/CouncilCard/CouncilCard.tsx @@ -1,32 +1,12 @@ -import { Button, Divider, Flex, Heading, Image, Text, Skeleton, Fade } from '@chakra-ui/react'; -import { Council } from '../../utils/councils'; +import { Button, Divider, Flex, Heading, Image, Text } from '@chakra-ui/react'; import { useNavigate } from 'react-router-dom'; -import { useGetCurrentPeriod } from '../../queries/useGetCurrentPeriod'; -import { useGetCouncilMembers } from '../../queries/useGetCouncilMembers'; -import { useGetCouncilNominees } from '../../queries/useGetCouncilNominees'; +import { Council } from '../../utils/councils'; +import { Members } from '../CouncilMembers/Members'; import { CouncilPeriodBadge } from './CouncilPeriodBadge'; -import { useGetIsNominated } from '../../queries/useGetIsNominated'; -import { useWallet } from '../../queries/useWallet'; - -interface CouncilCardProps { - council: Council; - votesReceived?: number; -} -export function CouncilCard({ council, votesReceived }: CouncilCardProps) { +export function CouncilCard({ council }: { council: Council }) { const navigate = useNavigate(); - const { activeWallet } = useWallet(); - - const { data: councilPeriod, isLoading: isPeriodLoading } = useGetCurrentPeriod(council.slug); - const { data: electedCouncilMembers, isLoading: isCouncilMembersLoading } = useGetCouncilMembers( - council.slug - ); - const { data: nominationInformation } = useGetIsNominated(activeWallet?.address); - const { data: councilNominees, isLoading: isCouncilNomineesLoading } = useGetCouncilNominees( - council.slug - ); - - const isLoading = isPeriodLoading || isCouncilMembersLoading || isCouncilNomineesLoading; + const count = Members.filter((member) => member.council === council.slug).length; return ( {council.title} - + - {councilPeriod === '0' || councilPeriod === '1' ? ( - - - Members - - - - - {electedCouncilMembers?.length} - - - - - ) : ( - - - Nominees - - - - - {councilNominees?.length} - - - - - )} - {councilPeriod === '0' ? ( - - - Votes Received - - - - - {votesReceived} - - - - - ) : councilPeriod === '1' ? ( - - - Nominees - - - - - {councilNominees?.length} - - - - - ) : ( - - - Votes Received - - - - - {votesReceived} - - - - - )} + + + Members + + + {count} + + + + + Votes Received + + + N/A + + - {councilPeriod === '1' ? ( - <> - - - - ) : councilPeriod === '2' ? ( - - ) : ( - - )} + ); diff --git a/governance/ui/src/components/CouncilMembers/CouncilMembers.tsx b/governance/ui/src/components/CouncilMembers/CouncilMembers.tsx index 9171d206a..a74ff3180 100644 --- a/governance/ui/src/components/CouncilMembers/CouncilMembers.tsx +++ b/governance/ui/src/components/CouncilMembers/CouncilMembers.tsx @@ -11,34 +11,11 @@ import { Thead, Tr, } from '@chakra-ui/react'; -import { calculateNextEpoch, CouncilSlugs } from '../../utils/councils'; -import { useGetEpochSchedule } from '../../queries/useGetEpochSchedule'; -import UserTableView from '../UserTableView/UserTableView'; -import { useGetCurrentPeriod } from '../../queries/useGetCurrentPeriod'; -import { useMemo, useState } from 'react'; -import { ArrowUpDownIcon } from '@chakra-ui/icons'; -import SortArrows from '../SortArrows/SortArrows'; -import { useGetCouncilMembers, useGetHistoricalVotes, useGetUserDetailsQuery } from '../../queries'; -import TableLoading from '../TableLoading/TableLoading'; -import { sortUsers } from '../../utils/sort-users'; +import { CouncilSlugs } from '../../utils/councils'; +import { MemberTableView } from '../MemberTableView/MemberTableView'; +import { Members } from './Members'; export default function CouncilMembers({ activeCouncil }: { activeCouncil: CouncilSlugs }) { - const [sortConfig, setSortConfig] = useState<[boolean, string]>([true, 'votingPower']); - - const { data: councilMembers } = useGetCouncilMembers(activeCouncil); - const { data: councilMemberDetails, isLoading: userDetailsLoading } = useGetUserDetailsQuery( - councilMembers || [] - ); - const { data: councilSchedule } = useGetEpochSchedule(activeCouncil); - const { data: councilPeriod } = useGetCurrentPeriod(activeCouncil); - const { data: votes } = useGetHistoricalVotes(); - - const nextEpoch = calculateNextEpoch(councilSchedule); - - const sortedNominees = useMemo(() => { - return sortUsers(activeCouncil, '', sortConfig, councilMemberDetails, votes); - }, [sortConfig, councilMemberDetails, activeCouncil, votes]); - return ( - Election for {nextEpoch.quarter} + Election for Q4 2023 - Q1 2024 - {nextEpoch.startDay} {nextEpoch.startMonth} {nextEpoch.startYear} - {nextEpoch.endDay}{' '} - {nextEpoch.endMonth} {nextEpoch.endYear} + 01 Oct 2023 - 01 April 2024 @@ -71,104 +47,46 @@ export default function CouncilMembers({ activeCouncil }: { activeCouncil: Counc { - setSortConfig([!sortConfig[0], 'ranking']); - }} data-cy="number-table-header" > - N° {sortConfig[1] === 'ranking' && } + Seat { - setSortConfig([!sortConfig[0], 'name']); - }} > - Name {sortConfig[1] === 'name' && } - {/* @ts-ignore */} - {sortConfig[1] === 'start' && sortConfig[1] !== 'name' && ( - - )} + Name - {(councilPeriod === '2' || councilPeriod === '0') && ( - { - setSortConfig([!sortConfig[0], 'votes']); - }} - > - Votes {sortConfig[1] === 'votes' && } - - )} - {(councilPeriod === '2' || councilPeriod === '0') && ( - { - setSortConfig([!sortConfig[0], 'votingPower']); - }} - > - Voting Power{' '} - {sortConfig[1] === 'votingPower' && } - - )} - {councilPeriod === '0' && ( - - )} + - {userDetailsLoading || !councilMemberDetails ? ( - - ) : ( - !!sortedNominees?.length && - sortedNominees.map((councilNominee, index) => { - return ( - - ); - }) - )} + {Members?.length > 0 + ? Members.filter((member) => member.council === activeCouncil).map((member) => { + return ( + + ); + }) + : null} ); } - -function totalVotingPowerForCouncil(council: CouncilSlugs) { - switch (council) { - case 'spartan': - return 'totalVotingPowerSpartan'; - case 'ambassador': - return 'totalVotingPowerAmbassador'; - case 'treasury': - return 'totalVotingPowerTreasury'; - } -} diff --git a/governance/ui/src/components/CouncilMembers/Members.tsx b/governance/ui/src/components/CouncilMembers/Members.tsx new file mode 100644 index 000000000..5277d61c8 --- /dev/null +++ b/governance/ui/src/components/CouncilMembers/Members.tsx @@ -0,0 +1,93 @@ +export const Members = [ + { + council: 'treasury', + seat: 'Treasury', + name: 'coKaiynne', + image: '/councils/profile/cokaiynne.png', + description: 'OG Spartan', + delegationPitch: + "coKaiynne invested in the Havven ICO and has remained close to the project ever since. Recognising the need for change he nominated for the Treasury Council and was elected at the start of 2024. He's been instrumental in streamlining, organising, and consolidating the Treasury so that management and operations are simpler and more transparent moving forward.", + address: '0x8525dfd2fdF70F8639299e5751A8E56c5e0075A9', + discord: '1190187490057920555', + twitter: '', + }, + + { + council: 'advisory', + seat: 'Advisory', + name: 'Kain Warwick', + image: '/councils/profile/kain.png', + description: 'Synthetix Founder / OG Spartan / Infinex Founder', + delegationPitch: + 'The once benevolent dictator played an instrumental role in digging Synthetix out of the 2018 bear market, was the creator of yield farming and helped kick off DeFi summer. We’re luring him back as an advisor to kick of the Synthetix revenge arc!', + address: '0x4640828749C1993DeC4dec8c8F32FFEC1a433BeA', + discord: '420339322785366019', + twitter: 'kaiynne', + }, + + { + council: 'advisory', + seat: 'Advisory', + name: 'Jordan Momtazi', + image: '/councils/profile/jordan.png', + description: 'Synthetix Founder / OG Spartan', + delegationPitch: + 'Jordan carries a wealth of Synthetix knowledge and continues to stay close to updates and get involved where he can help. Jordan’s history running commercial and BD functions and his connectivity to crypto and VC networks from running Bodhi Ventures will be core to this transition and executing on several 2025 vision agenda items.', + address: '0xA26546560578EA86D5A758B20bC15079bFc7A059', + discord: '432712910242840607', + twitter: '', + }, + + { + council: 'advisory', + seat: 'Advisory', + name: 'Spartan Glory', + image: '/councils/profile/spartanglory.png', + + description: 'OG Spartan', + delegationPitch: + 'SG invested in the Havven ICO and has remained an active member in the community since 2017. Through his engagement on the Treasury Council, SG has developed a deep knowledge of Synthetix and will help maintain continuity in operations and treasury management through the transition. Additionally, he has strong networks in the crypto community that will come in handy as we look to expand our footprint.', + address: '0x4DE86d2C9171F046C4ce91d8De9d2dc723Bf4A9F', + discord: '889913506906927124', + twitter: '', + }, + + { + council: 'strategy', + seat: 'Strategy', + name: 'Benjamin Celermajer', + image: '/councils/profile/ben.png', + description: 'OG Spartan', + delegationPitch: + "Benjamin is a Synthetix OG, having invested in the Havven ICO in 2017 and remained in the community ever since. Before entering crypto professionally as an asset manager in 2017, he worked as a consultant, specifically working on strategy design and managing complex business transformations. Benjamin's knowledge of and experience in crypto, combined with his background managing complex business transitions, allows him to bring objective insight to Synthetix, enabling him to identify key challenges and design fresh and tailored solutions to successfully turn Synthetix around.", + address: '0xD5be1632170c2428Ab6298Ed05E32a278b465ad7', + discord: '854163348677591090', + twitter: '', + }, + + { + council: 'strategy', + seat: 'Operations', + name: 'Cavalier', + image: '/councils/profile/cavalier.png', + description: 'Core Contributor', + delegationPitch: + 'Cavalier has been a Core Contributor at Synthetix for nearly three years, bringing a wealth of experience and a deep understanding of both the team and decentralised systems. He was elected to Spartan Council and Treasury Council, and ultimately proposed as the CC Lead role to improve protocol coordination. Cav’s relationships with Synthetix partners and integrators, combined with his knowledge of the ecosystem, make him a key asset in driving forward the next phase of Synthetix’s evolution.', + address: '0x6B28209660F63EBfD1c62b66B428961Bbc8715Bc', + discord: '567239949372489739', + twitter: 'cavalier_eth', + }, + + { + council: 'strategy', + seat: 'Technical', + name: 'TBC', + image: '', + description: '', + delegationPitch: + 'This is one of the more important roles, and without deep knowledge of the technical team within Synthetix it is hard to know who fits this bill. But technical expertise, the ability to distill complex technical problems simply, knowing how to cut to the core of difficult problems and the willingness to roll ones sleeves up to get sh*t done is what is needed here.', + address: '0x0000', + discord: '', + twitter: '', + }, +]; diff --git a/governance/ui/src/components/CouncilNominees/CouncilNominees.tsx b/governance/ui/src/components/CouncilNominees/CouncilNominees.tsx deleted file mode 100644 index e90e4008c..000000000 --- a/governance/ui/src/components/CouncilNominees/CouncilNominees.tsx +++ /dev/null @@ -1,251 +0,0 @@ -import { - Button, - Divider, - Flex, - Heading, - Input, - InputGroup, - InputRightElement, - Table, - TableContainer, - Tbody, - Text, - Th, - Thead, - Tr, -} from '@chakra-ui/react'; -import councils, { calculateNextEpoch, CouncilSlugs } from '../../utils/councils'; -import PeriodCountdown from '../PeriodCountdown/PeriodCountdown'; -import { useGetEpochSchedule } from '../../queries/useGetEpochSchedule'; -import { useGetNextElectionSettings } from '../../queries/useGetNextElectionSettings'; -import UserListItem from '../UserListItem/UserListItem'; -import UserTableView from '../UserTableView/UserTableView'; -import { useGetNomineesDetails } from '../../queries/useGetNomineesDetails'; -import { useGetCurrentPeriod } from '../../queries/useGetCurrentPeriod'; -import { useMemo, useState } from 'react'; -import SortArrows from '../SortArrows/SortArrows'; -import { useNetwork, useWallet } from '../../queries/useWallet'; -import { CouncilImage } from '../CouncilImage'; -import TableLoading from '../TableLoading/TableLoading'; -import { CloseIcon } from '@chakra-ui/icons'; -import { useVoteContext } from '../../context/VoteContext'; -import { useGetEpochIndex, useGetHistoricalVotes } from '../../queries'; -import { getVoteSelectionState } from '../../utils/localstorage'; -import { sortUsers } from '../../utils/sort-users'; - -export default function CouncilNominees({ activeCouncil }: { activeCouncil: CouncilSlugs }) { - const [search, setSearch] = useState(''); - const [sortConfig, setSortConfig] = useState<[boolean, string]>([true, 'votingPower']); - - const { network } = useNetwork(); - const { data: epochId } = useGetEpochIndex(activeCouncil); - const { activeWallet, connect } = useWallet(); - - const { data: councilNomineesDetails, isLoading } = useGetNomineesDetails(activeCouncil); - const { data: votes } = useGetHistoricalVotes(); - const { data: councilSchedule } = useGetEpochSchedule(activeCouncil); - const { data: nextEpochDuration } = useGetNextElectionSettings(activeCouncil); - const { data: councilPeriod } = useGetCurrentPeriod(activeCouncil); - const { state } = useVoteContext(); - const currentSelectedUser = getVoteSelectionState( - state, - activeWallet?.address, - epochId?.toString(), - network?.id.toString(), - activeCouncil - ); - const council = councils.find((council) => council.slug === activeCouncil); - const epoch = calculateNextEpoch(councilSchedule, nextEpochDuration); - - const sortedNominees = useMemo(() => { - return sortUsers(activeCouncil, search, sortConfig, councilNomineesDetails, votes); - }, [search, councilNomineesDetails, sortConfig, activeCouncil, votes]); - - return ( - - - - - Nominees for {epoch.quarter} - - - {epoch.startDay} {epoch.startMonth} {epoch.startYear} - {epoch.endDay} {epoch.endMonth}{' '} - {epoch.endYear} - - - - - - - - {activeWallet?.address ? ( - - ) : ( - - - - Nominate Yourself for the {activeCouncil} Council - - - - )} - - - - Current {councilPeriod === '1' ? 'Nominees' : 'Results'} - - - {search && ( - - { - setSearch(''); - }} - /> - - )} - setSearch(e.target.value.trim().toLowerCase())} - /> - - - - - - - {(councilPeriod === '2' || councilPeriod === '3') && ( - - )} - - {(councilPeriod === '2' || councilPeriod === '3') && ( - - )} - {(councilPeriod === '2' || councilPeriod === '3') && ( - - )} - {(councilPeriod === '2' || councilPeriod === '3') && ( - - )} - - - - {!!sortedNominees?.length ? ( - sortedNominees.map((councilNominee) => ( - - )) - ) : isLoading ? ( - - ) : !!search ? ( - - No results found, try another search - - ) : null} - -
{ - setSortConfig([true, 'ranking']); - }} - > - N°{' '} - {sortConfig[1] === 'ranking' && sortConfig[0] && ( - - )} - setSortConfig([!sortConfig[0], 'name'])} - > - Name {sortConfig[1] === 'name' && } - { - setSortConfig([!sortConfig[0], 'votes']); - }} - > - Votes {sortConfig[1] === 'votes' && } - { - setSortConfig([!sortConfig[0], 'votingPower']); - }} - > - Voting Power{' '} - {sortConfig[1] === 'votingPower' && } -
-
-
- ); -} - -function totalVotingPowerForCouncil(council: CouncilSlugs) { - switch (council) { - case 'spartan': - return 'totalVotingPowerSpartan'; - case 'ambassador': - return 'totalVotingPowerAmbassador'; - case 'treasury': - return 'totalVotingPowerTreasury'; - } -} diff --git a/governance/ui/src/components/CouncilNominees/index.ts b/governance/ui/src/components/CouncilNominees/index.ts deleted file mode 100644 index 7a6f8510d..000000000 --- a/governance/ui/src/components/CouncilNominees/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './CouncilNominees'; diff --git a/governance/ui/src/components/CouncilTabs/CouncilSelect.tsx b/governance/ui/src/components/CouncilTabs/CouncilSelect.tsx index 83d2c8e1d..e16778b88 100644 --- a/governance/ui/src/components/CouncilTabs/CouncilSelect.tsx +++ b/governance/ui/src/components/CouncilTabs/CouncilSelect.tsx @@ -53,7 +53,7 @@ export const CouncilsSelect = ({ activeCouncil }: { activeCouncil: CouncilSlugs > {councils.map((council) => ( navigate(`/councils/${council.slug}`)} > diff --git a/governance/ui/src/components/CouncilTabs/CouncilTabs.tsx b/governance/ui/src/components/CouncilTabs/CouncilTabs.tsx index 724ffb5f3..66ff1c1e8 100644 --- a/governance/ui/src/components/CouncilTabs/CouncilTabs.tsx +++ b/governance/ui/src/components/CouncilTabs/CouncilTabs.tsx @@ -1,69 +1,14 @@ -import { Box, Button, Flex, Hide, Show, Text } from '@chakra-ui/react'; -import councils, { CouncilSlugs } from '../../utils/councils'; +import { Flex, Hide, Show, Text } from '@chakra-ui/react'; import { useLocation, useNavigate } from 'react-router-dom'; -import { useGetCurrentPeriod } from '../../queries/useGetCurrentPeriod'; -import { CouncilsSelect } from './CouncilSelect'; +import councils, { CouncilSlugs } from '../../utils/councils'; import { CouncilImage } from '../CouncilImage'; -import { useGetEpochSchedule } from '../../queries/useGetEpochSchedule'; -import { MyVotesSummary } from '../MyVotesSummary'; -import { - useGetUserDetailsQuery, - useGetUserBallot, - useNetwork, - useGetEpochIndex, - useWallet, -} from '../../queries'; -import { ProfilePicture } from '../UserProfileCard/ProfilePicture'; -import { ArrowBackIcon, ArrowForwardIcon } from '@chakra-ui/icons'; -import { utils } from 'ethers'; -import { useVoteContext } from '../../context/VoteContext'; -import { getVoteSelectionState } from '../../utils/localstorage'; +import { CouncilsSelect } from './CouncilSelect'; export default function CouncilTabs({ activeCouncil }: { activeCouncil: CouncilSlugs }) { - const { data: councilPeriod } = useGetCurrentPeriod(activeCouncil); const location = useLocation(); - const { activeWallet } = useWallet(); const isInMyVotesPage = location.pathname.includes('my-votes'); const isInMyProfilePage = location.pathname.includes('profile'); - const { data: schedule, isLoading } = useGetEpochSchedule(activeCouncil); - const { network } = useNetwork(); - const { data: epochId } = useGetEpochIndex(activeCouncil); - const { state } = useVoteContext(); - // @dev dont put activeCounil in here cause its always spartan for the timer - const networkForState = getVoteSelectionState( - state, - activeWallet?.address, - epochId?.toString(), - network?.id.toString() - ); - - const votedNomineesData = [ - useGetUserBallot('spartan'), - useGetUserBallot('ambassador'), - useGetUserBallot('treasury'), - ]; - const navigate = useNavigate(); - const votedNominees = votedNomineesData.map(({ data }) => data); - - const userInformationData = [ - { - council: votedNominees[0]?.council, - userInformation: useGetUserDetailsQuery(votedNominees[0]?.votedCandidates[0]), - }, - { - council: votedNominees[1]?.council, - userInformation: useGetUserDetailsQuery(votedNominees[1]?.votedCandidates[0]), - }, - { - council: votedNominees[2]?.council, - userInformation: useGetUserDetailsQuery(votedNominees[2]?.votedCandidates[0]), - }, - ]; - const userInformation = userInformationData.map((data) => ({ - ...data, - userInformation: data.userInformation.data, - })); return ( <> @@ -83,28 +28,7 @@ export default function CouncilTabs({ activeCouncil }: { activeCouncil: CouncilS alignItems="center" zIndex={99} > - {isInMyVotesPage ? ( - - ) : ( - <> - - - - )} +
@@ -124,12 +48,7 @@ export default function CouncilTabs({ activeCouncil }: { activeCouncil: CouncilS zIndex={99} > - {councils.map((council, index) => { - const newVoteCast = - networkForState && typeof networkForState !== 'string' - ? networkForState[council.slug] - : ''; - + {councils.map((council) => { return ( {council.title} - {councilPeriod === '2' && utils.isAddress(newVoteCast || '') ? ( - <> - - {userInformation[index]?.userInformation?.address - ? newVoteCast?.toLowerCase() !== - userInformation[index]?.userInformation?.address?.toLowerCase() && ( - <> - - - - ) - : null} - - ) : ( - councilPeriod === '2' && ( - <> - {userInformation[index].userInformation?.address && ( - - )} - - {newVoteCast && userInformation[index].userInformation?.address && ( - - )} - {(newVoteCast === 'remove' || - (!newVoteCast && !userInformation[index].userInformation?.address)) && ( - - )} - - ) - )} ); })} - diff --git a/governance/ui/src/components/CouncilUser/CouncilUser.tsx b/governance/ui/src/components/CouncilUser/CouncilUser.tsx deleted file mode 100644 index fe72c4951..000000000 --- a/governance/ui/src/components/CouncilUser/CouncilUser.tsx +++ /dev/null @@ -1,80 +0,0 @@ -import { Box, Flex, Image, Text } from '@chakra-ui/react'; -import { useGetUserDetailsQuery } from '../../queries'; -import councils, { CouncilSlugs } from '../../utils/councils'; -import { ProfilePicture } from '../UserProfileCard/ProfilePicture'; -import { prettyString } from '@snx-v3/format'; - -export default function CouncilUser({ - address, - councilSlug, - hideName, -}: { - address?: string; - councilSlug: CouncilSlugs; - hideName?: boolean; -}) { - const council = councils.find((council) => council.slug === councilSlug); - const { data: user } = useGetUserDetailsQuery(address); - - if (!council) { - return null; - } - - return ( - - - - - - - {user ? ( - - ) : ( - - )} - - - {!hideName && ( - <> - - {council.title} - - - {user - ? user?.username - ? user.username - : prettyString(user?.address, 6, 4) - : 'No Vote'} - - - )} - - - ); -} diff --git a/governance/ui/src/components/CouncilUser/index.ts b/governance/ui/src/components/CouncilUser/index.ts deleted file mode 100644 index 5b25b3d0a..000000000 --- a/governance/ui/src/components/CouncilUser/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './CouncilUser'; diff --git a/governance/ui/src/components/EditNomination/EditNomination.tsx b/governance/ui/src/components/EditNomination/EditNomination.tsx deleted file mode 100644 index a51d3961b..000000000 --- a/governance/ui/src/components/EditNomination/EditNomination.tsx +++ /dev/null @@ -1,131 +0,0 @@ -import { Button, Flex, FlexProps, Heading, IconButton, Image, Text } from '@chakra-ui/react'; -import councils, { CouncilSlugs } from '../../utils/councils'; -import { useEffect, useState } from 'react'; -import { useLocation, useNavigate } from 'react-router-dom'; -import useEditNomination from '../../mutations/useEditNomination'; -import { CloseIcon } from '@chakra-ui/icons'; -import { useGetIsNominated } from '../../queries/useGetIsNominated'; -import { useWallet } from '../../queries/useWallet'; -import EditNominationConfirmation from './EditNominationConfirmation'; -import EditNominationSelect from './EditNominationSelect'; - -interface EditNominationProps extends FlexProps { - activeCouncil: CouncilSlugs; -} - -export default function EditNomination({ activeCouncil, ...props }: EditNominationProps) { - const location = useLocation(); - const [selectedCouncil, setSelectedCouncil] = useState( - location.pathname.includes(activeCouncil) ? null : activeCouncil - ); - const [showConfirm, setShowConfirm] = useState(false); - const navigate = useNavigate(); - const { activeWallet } = useWallet(); - const { data: nominationInformation } = useGetIsNominated(activeWallet?.address); - - const { isSuccess } = useEditNomination({ - currentNomination: nominationInformation?.council.slug, - nextNomination: selectedCouncil, - }); - - useEffect(() => { - if (!nominationInformation?.isNominated) { - navigate('/councils/' + activeCouncil); - } - }, [nominationInformation?.isNominated, navigate, activeCouncil]); - - return ( - - { - navigate(`/councils/${activeCouncil}`); - }} - size="xs" - aria-label="close button" - icon={} - variant="ghost" - colorScheme="whiteAlpha" - color="white" - position="absolute" - top="10px" - right="10px" - /> - {isSuccess ? ( - <> - Nomination Successful - - Nominee: - - {activeWallet?.address} - - Nominated for: - - - - {!selectedCouncil && } - - - {!selectedCouncil - ? 'None' - : councils.find((council) => council.slug === selectedCouncil)?.title} - - - - - ) : showConfirm ? ( - - ) : ( - - )} - - ); -} diff --git a/governance/ui/src/components/EditNomination/EditNominationConfirmation.tsx b/governance/ui/src/components/EditNomination/EditNominationConfirmation.tsx deleted file mode 100644 index aef659979..000000000 --- a/governance/ui/src/components/EditNomination/EditNominationConfirmation.tsx +++ /dev/null @@ -1,200 +0,0 @@ -import { Button, Flex, Heading, Image, Spinner, Text } from '@chakra-ui/react'; -import councils, { CouncilSlugs } from '../../utils/councils'; -import { useNavigate } from 'react-router-dom'; -import { Dispatch, SetStateAction, useEffect } from 'react'; -import useEditNomination from '../../mutations/useEditNomination'; -import { useGetIsNominated } from '../../queries/useGetIsNominated'; -import { useWallet } from '../../queries/useWallet'; -import { ArrowForwardIcon } from '@chakra-ui/icons'; -import { useGetUserDetailsQuery } from '../../queries'; -import { ProfilePicture } from '../UserProfileCard/ProfilePicture'; -import { prettyString } from '@snx-v3/format'; - -export default function EditNominationConfirmation({ - selectedCouncil, - setShowConfirm, -}: { - selectedCouncil?: CouncilSlugs | null; - setShowConfirm: Dispatch>; -}) { - const navigate = useNavigate(); - const { activeWallet } = useWallet(); - const { data: nominationInformation } = useGetIsNominated(activeWallet?.address); - const { data: user } = useGetUserDetailsQuery(activeWallet?.address); - - const { mutateAsync, isPending, isSuccess } = useEditNomination({ - currentNomination: nominationInformation?.council.slug, - nextNomination: selectedCouncil, - }); - - useEffect(() => { - if (isSuccess) { - setShowConfirm(false); - navigate(`/councils/${selectedCouncil ? selectedCouncil : 'spartan'}?nominate=false`); - } - }, [isSuccess, setShowConfirm, navigate, selectedCouncil]); - - return ( - <> - Confirm changes - - Nominate yourself to represent a Synthetix Governing Council with the wallet below: - - - - - - {user?.username || prettyString(user?.address || '')} - - Nomination Wallet: {prettyString(user?.address || '')} - - - - Chose which governing body you would like to represent if chosen as an elected member: - - - {nominationInformation?.isNominated ? ( - - - - - - {nominationInformation.council.title} - - - ) : ( - - - - None - - - )} - - - - {selectedCouncil && ( - c.slug === selectedCouncil)?.image || ''} - w="6" - h="6" - /> - )} - - - {councils.find((c) => c.slug === selectedCouncil)?.title || 'None'} - - - - {isPending ? ( - - ) : ( - <> - - - - )} - - ); -} diff --git a/governance/ui/src/components/EditNomination/EditNominationContainer.tsx b/governance/ui/src/components/EditNomination/EditNominationContainer.tsx deleted file mode 100644 index 38f50dc26..000000000 --- a/governance/ui/src/components/EditNomination/EditNominationContainer.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { Hide, Modal, ModalContent, ModalOverlay, Show } from '@chakra-ui/react'; -import { CouncilSlugs } from '../../utils/councils'; -import EditNomination from './EditNomination'; - -export const EditNominationContainer = ({ - activeCouncil, - onClose, -}: { - activeCouncil: CouncilSlugs; - onClose: () => void; -}) => { - return ( - <> - - - - - - - - - - - - - ); -}; diff --git a/governance/ui/src/components/EditNomination/EditNominationSelect.tsx b/governance/ui/src/components/EditNomination/EditNominationSelect.tsx deleted file mode 100644 index 1c362f61f..000000000 --- a/governance/ui/src/components/EditNomination/EditNominationSelect.tsx +++ /dev/null @@ -1,186 +0,0 @@ -import { Button, Flex, Heading, Image, Text } from '@chakra-ui/react'; -import councils, { CouncilSlugs } from '../../utils/councils'; -import { useGetUserDetailsQuery } from '../../queries'; -import { useNetwork, useWallet } from '../../queries/useWallet'; -import { useGetIsNominated } from '../../queries/useGetIsNominated'; -import { Dispatch, SetStateAction } from 'react'; -import { ProfilePicture } from '../UserProfileCard/ProfilePicture'; -import { prettyString } from '@snx-v3/format'; -import { isMotherchain } from '../../utils/contracts'; - -export default function EditNominationSelect({ - selectedCouncil, - setSelectedCouncil, - setShowConfirm, -}: { - selectedCouncil?: CouncilSlugs | null; - setSelectedCouncil: Dispatch>; - setShowConfirm: Dispatch>; -}) { - const { activeWallet } = useWallet(); - const { network } = useNetwork(); - const { data: nominationInformation } = useGetIsNominated(activeWallet?.address); - const { data: user } = useGetUserDetailsQuery(activeWallet?.address); - - const isNotMotherchain = !isMotherchain(network?.id); - - return ( - <> - Edit Nomination - - Nominate yourself to represent a Synthetix Governing Council with the wallet below: - - - - - - {user?.username || prettyString(user?.address || '')} - - Nomination Wallet: {prettyString(user?.address || '')} - - - {nominationInformation?.isNominated && ( - <> - - You will withdraw your nomination from: - - - - - - - {nominationInformation.council.title} - - - - )} - - Chose which governing body you would like to represent if chosen as an elected member: - - - {councils - .filter((c) => nominationInformation?.council.slug !== c.slug) - .map((council) => ( - setSelectedCouncil(council.slug)} - w="100%" - height="58px" - rounded="base" - borderColor={selectedCouncil === council.slug ? 'cyan.500' : 'gray.900'} - borderWidth="1px" - padding="2" - alignItems="center" - mb="2" - _hover={{ - bg: 'linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.06) 100%), #0B0B22;', - }} - > - - - - - {council.title} - - - ))} - setSelectedCouncil(undefined)} - w="100%" - height="58px" - rounded="base" - borderColor={ - !selectedCouncil && typeof selectedCouncil === 'undefined' ? 'cyan.500' : 'gray.900' - } - borderWidth="1px" - padding="2" - alignItems="center" - mb="2" - data-cy="withdraw-vote-select" - _hover={{ - bg: 'linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.06) 100%), #0B0B22;', - }} - > - - - None - - - - - - - ); -} diff --git a/governance/ui/src/components/EditNomination/index.ts b/governance/ui/src/components/EditNomination/index.ts deleted file mode 100644 index 995246929..000000000 --- a/governance/ui/src/components/EditNomination/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './EditNomination'; diff --git a/governance/ui/src/components/Header/Header.tsx b/governance/ui/src/components/Header/Header.tsx index 3a1de9c88..3c2449a82 100644 --- a/governance/ui/src/components/Header/Header.tsx +++ b/governance/ui/src/components/Header/Header.tsx @@ -1,15 +1,10 @@ -import { Button, Flex, useColorMode, Show } from '@chakra-ui/react'; -import { useNavigate } from 'react-router-dom'; +import { Flex, Show, useColorMode } from '@chakra-ui/react'; import { useEffect } from 'react'; -import PeriodCountdown from '../PeriodCountdown/PeriodCountdown'; -import councils from '../../utils/councils'; -import { useWallet } from '../../queries/useWallet'; -import { NetworkController } from './NetworkController'; +import { useNavigate } from 'react-router-dom'; import { SNXHeaderIcon, SNXHeaderIconSmall } from '../Icons'; export function Header() { const navigate = useNavigate(); - const { activeWallet, walletsInfo, connect } = useWallet(); const { colorMode, toggleColorMode } = useColorMode(); useEffect(() => { @@ -18,22 +13,6 @@ export function Header() { } }, [colorMode, toggleColorMode]); - useEffect(() => { - if (!walletsInfo) { - const defaultWallet = localStorage.getItem('connectedWallets'); - - if (defaultWallet) { - connect({ - autoSelect: { disableModals: true, label: JSON.parse(defaultWallet) }, - }); - } - } - - if (walletsInfo) { - localStorage.setItem('connectedWallets', JSON.stringify(walletsInfo.label)); - } - }, [walletsInfo, connect]); - return ( - - - {activeWallet ? ( - - ) : ( - - )} ); diff --git a/governance/ui/src/components/Header/NetworkController.tsx b/governance/ui/src/components/Header/NetworkController.tsx deleted file mode 100644 index 15fa30ad9..000000000 --- a/governance/ui/src/components/Header/NetworkController.tsx +++ /dev/null @@ -1,261 +0,0 @@ -import { useEffect, useState } from 'react'; -import { - Button, - Divider, - Flex, - IconButton, - Link, - Menu, - MenuButton, - MenuItem, - MenuList, - Text, - useDisclosure, -} from '@chakra-ui/react'; -import { - NetworkIcon, - useNetwork, - useWallet, - NETWORKS, - SNAX, - SNAXTESTNET, -} from '@snx-v3/useBlockchain'; -import { prettyString } from '@snx-v3/format'; -import { CopyIcon } from '@chakra-ui/icons'; -import { useLocation, useNavigate } from 'react-router-dom'; -import { Tooltip } from '@snx-v3/Tooltip'; -import { chains, supportedNetworks } from '../../utils/onboard'; -import { DisconnectIcon } from '../Icons'; -import Blockies from 'react-blockies'; -import '../../pages/index.css'; -import { useGetUserDetailsQuery } from '../../queries'; - -const mainnets = NETWORKS.filter(({ isSupported, isTestnet }) => isSupported && !isTestnet).filter( - (network) => supportedNetworks.includes(network.id) -); - -export function NetworkController() { - const { isOpen, onOpen, onClose } = useDisclosure(); - const [toolTipLabel, setTooltipLabel] = useState('Copy'); - const { activeWallet, walletsInfo, connect, disconnect } = useWallet(); - const { network: activeNetwork, setNetwork } = useNetwork(); - const navigate = useNavigate(); - const { pathname } = useLocation(); - const { data: user } = useGetUserDetailsQuery(activeWallet?.address); - - useEffect(() => { - // Check if wallet preference is stored in local storage - if (!walletsInfo) { - const defaultWallet = localStorage.getItem('connectedWallets'); - - if (defaultWallet) { - connect({ - autoSelect: { disableModals: true, label: JSON.parse(defaultWallet) }, - }); - } - } - - if (walletsInfo) { - // store in local storage - localStorage.setItem('connectedWallets', JSON.stringify(walletsInfo.label)); - } - }, [walletsInfo, connect, navigate, pathname]); - - const onDisconnect = () => { - if (walletsInfo) { - disconnect(walletsInfo); - localStorage.removeItem('connectedWallets'); - } - }; - - const notConnected = !activeWallet; - const notSupported = !chains.find((chain) => chain.id === activeNetwork?.id); - - return ( - - - span': { display: 'flex', alignItems: 'center' } }} - mr={1} - data-cy="account-menu-button" - px={2} - > - - - - {mainnets.map(({ id, preset, label }) => ( - { - try { - setNetwork(id); - } catch (error) { - const snaxChain = id === 2192 ? SNAX : SNAXTESTNET; - await (window as any).ethereum.request({ - method: 'wallet_addEthereumChain', - params: [ - { - chainId: snaxChain.hexId, - chainName: snaxChain.label, - nativeCurrency: { - name: 'ETH', - symbol: 'ETH', - decimals: 18, - }, - rpcUrls: [snaxChain.rpcUrl()], - blockExplorerUrls: [ - id === 2192 - ? 'https://explorer.snaxchain.io/' - : 'https://testnet-explorer.snaxchain.io/', - ], - }, - ], - }); - } - }} - > - - - {label} - - - ))} - - - onOpen()} closeOnBlur> - - - - - {user?.username || prettyString(activeWallet?.address || '')} - - - - onClose()}> - - - - - Connected with {walletsInfo?.label} - - - {prettyString(activeWallet?.address || '')}{' '} - - { - navigator.clipboard.writeText(activeWallet?.address || ''); - setTooltipLabel('Copied'); - setTimeout(() => { - setTooltipLabel('Copy'); - }, 10000); - }} - /> - - - - { - e.stopPropagation(); - onDisconnect(); - }} - icon={} - variant="outline" - colorScheme="gray" - > - {/* */} - - - - - - {user?.username ? ( - - - {user.username} - - - {user.about} - - - ) : ( - - {prettyString(user?.address || '')} - - )} - - onClose()}> - - - - - - - ); -} diff --git a/governance/ui/src/components/MemberTableView/MemberTableView.tsx b/governance/ui/src/components/MemberTableView/MemberTableView.tsx new file mode 100644 index 000000000..21ce41697 --- /dev/null +++ b/governance/ui/src/components/MemberTableView/MemberTableView.tsx @@ -0,0 +1,97 @@ +import { Button, Flex, Image, Td, Text, Tr } from '@chakra-ui/react'; +import { prettyString } from '@snx-v3/format'; +import { useNavigate, useSearchParams } from 'react-router-dom'; +import { CouncilSlugs } from '../../utils/councils'; +import { renderCorrectBorder } from '../../utils/table-border'; +import { ProfilePicture } from '../UserProfileCard/ProfilePicture'; + +export function MemberTableView({ + name, + activeCouncil, + place, + address, + image, +}: { + place?: string; + name: string; + activeCouncil: CouncilSlugs; + address: string; + image: string; +}) { + const navigate = useNavigate(); + const [searchParams] = useSearchParams(); + const isSelected = searchParams.get('view') === address; + + return ( + navigate(`/councils/${activeCouncil}?view=${address}`)} + _hover={{ background: 'rgba(255,255,255,0.12)' }} + > + + + {place} + + + + + {image ? ( + + ) : ( + + )} + + + {name ? name : prettyString(address)} + + + + + + + + + ); +} diff --git a/governance/ui/src/components/MemberTableView/index.ts b/governance/ui/src/components/MemberTableView/index.ts new file mode 100644 index 000000000..a47c84f4b --- /dev/null +++ b/governance/ui/src/components/MemberTableView/index.ts @@ -0,0 +1 @@ +export * from './MemberTableView'; diff --git a/governance/ui/src/components/MyVoteRow/MyVoteRow.tsx b/governance/ui/src/components/MyVoteRow/MyVoteRow.tsx deleted file mode 100644 index 2946a5f39..000000000 --- a/governance/ui/src/components/MyVoteRow/MyVoteRow.tsx +++ /dev/null @@ -1,150 +0,0 @@ -import { Flex, IconButton } from '@chakra-ui/react'; -import { CouncilSlugs } from '../../utils/councils'; -import { AddIcon, ArrowForwardIcon, CloseIcon } from '@chakra-ui/icons'; -import { useNavigate } from 'react-router-dom'; -import CouncilUser from '../CouncilUser/CouncilUser'; -import { useVoteContext } from '../../context/VoteContext'; -import { useGetEpochIndex, useGetUserBallot, useNetwork, useWallet } from '../../queries'; -import { getVoteSelectionState } from '../../utils/localstorage'; -import { Badge } from '../Badge'; -import { utils } from 'ethers'; - -export default function MyVoteRow({ - councilSlug, - period, - isLast, -}: { - councilSlug: CouncilSlugs; - period?: string; - isLast: boolean; -}) { - const navigate = useNavigate(); - const { activeWallet } = useWallet(); - const { data: ballot } = useGetUserBallot(councilSlug); - const { data: epochId } = useGetEpochIndex(councilSlug); - const { dispatch, state } = useVoteContext(); - const { network } = useNetwork(); - - const votedCandidate = ballot?.votedCandidates[0] || ''; - const voteSelection = getVoteSelectionState( - state, - activeWallet?.address, - epochId?.toString(), - network?.id.toString(), - councilSlug - ); - const voteAddressState = typeof voteSelection === 'string' ? voteSelection : ''; - - const hasVoted = utils.isAddress(voteAddressState) - ? utils.isAddress(votedCandidate) && - utils.isAddress(voteAddressState) && - votedCandidate.toLowerCase() === voteAddressState.toLowerCase() - : utils.isAddress(votedCandidate); - const isDisabled = period !== '2'; - - const handleAddVote = (e: React.MouseEvent) => { - e.stopPropagation(); - navigate(`/councils/${councilSlug}`); - }; - - const handleRemoveVote = (e: React.MouseEvent) => { - e.stopPropagation(); - if ( - utils.isAddress(votedCandidate) && - utils.isAddress(voteAddressState) && - votedCandidate.toLowerCase() !== voteAddressState.toLowerCase() - ) { - dispatch({ - type: councilSlug.toUpperCase(), - payload: { - action: votedCandidate, - network: network?.id.toString(), - epochId: epochId?.toString(), - wallet: activeWallet?.address, - }, - }); - } else { - dispatch({ - type: councilSlug.toUpperCase(), - payload: { - action: votedCandidate - ? voteAddressState === 'remove' - ? votedCandidate - : 'remove' - : voteAddressState === 'remove' - ? 'remove' - : undefined, - network: network?.id.toString(), - epochId: epochId?.toString(), - wallet: activeWallet?.address, - }, - }); - } - }; - - return ( - - - - {((!hasVoted && votedCandidate && voteAddressState) || voteAddressState === 'remove') && ( - <> - - - - )} - - - {hasVoted && voteAddressState !== 'remove' ? ( - Your Vote - ) : voteAddressState ? ( - - Selected - - ) : null} - - {!voteAddressState && !votedCandidate ? ( - } - variant="outlined" - mr="4" - isDisabled={isDisabled} - onClick={handleAddVote} - /> - ) : ( - } - colorScheme="gray" - data-cy={`remove-vote-button-${councilSlug}`} - variant="outline" - mr="4" - isDisabled={isDisabled} - onClick={handleRemoveVote} - /> - )} - - ); -} diff --git a/governance/ui/src/components/MyVoteRow/index.ts b/governance/ui/src/components/MyVoteRow/index.ts deleted file mode 100644 index 7641945fd..000000000 --- a/governance/ui/src/components/MyVoteRow/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './MyVoteRow'; diff --git a/governance/ui/src/components/MyVotesBox/MyVotesBox.tsx b/governance/ui/src/components/MyVotesBox/MyVotesBox.tsx deleted file mode 100644 index 2a040fe2a..000000000 --- a/governance/ui/src/components/MyVotesBox/MyVotesBox.tsx +++ /dev/null @@ -1,68 +0,0 @@ -import { Button, Fade, Flex, Heading } from '@chakra-ui/react'; -import councils from '../../utils/councils'; -import { useNavigate } from 'react-router-dom'; -import MyVoteRow from '../MyVoteRow/MyVoteRow'; -import { VoteStateForNetwork } from '../../context/VoteContext'; - -export default function MyVotesBox({ - closeCart, - votes, - isMouseOnDropdown, - period, -}: { - closeCart: () => void; - votes?: VoteStateForNetwork; - isMouseOnDropdown: (val: boolean) => void; - period?: string; -}) { - const navigate = useNavigate(); - - return ( - - { - isMouseOnDropdown(false); - closeCart(); - }} - pt="4" - pb="6" - flexDir="column" - onMouseEnter={() => isMouseOnDropdown(true)} - > - - My Votes - - {Object.values(!!votes ? votes : {}).filter((vote) => !!vote).length}/{councils.length} - - - {councils.map((council, index) => ( - - ))} - - - - ); -} diff --git a/governance/ui/src/components/MyVotesBox/index.ts b/governance/ui/src/components/MyVotesBox/index.ts deleted file mode 100644 index 98a8962a8..000000000 --- a/governance/ui/src/components/MyVotesBox/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './MyVotesBox'; diff --git a/governance/ui/src/components/MyVotesSummary/MyVotesSummary.tsx b/governance/ui/src/components/MyVotesSummary/MyVotesSummary.tsx deleted file mode 100644 index aab329e3c..000000000 --- a/governance/ui/src/components/MyVotesSummary/MyVotesSummary.tsx +++ /dev/null @@ -1,164 +0,0 @@ -import { Flex, Show, Spinner, Text } from '@chakra-ui/react'; -import { Timer } from '../Timer'; -import { useEffect, useState } from 'react'; -import MyVotesBox from '../MyVotesBox/MyVotesBox'; -import { useNavigate } from 'react-router-dom'; -import councils from '../../utils/councils'; -import { useVoteContext, VoteStateForNetwork } from '../../context/VoteContext'; -import { useGetEpochIndex, useNetwork, useWallet } from '../../queries'; -import { voteCardState } from '../../state/vote-card'; -import { useRecoilState } from 'recoil'; -import { getVoteSelectionState } from '../../utils/localstorage'; - -interface MyVotesSummary { - isLoading: boolean; - councilPeriod?: string; - isInMyVotesPage: boolean; - schedule?: { - startDate: number; - nominationPeriodStartDate: number; - votingPeriodStartDate: number; - endDate: number; - }; -} - -export const MyVotesSummary = ({ - isLoading, - councilPeriod, - schedule, - isInMyVotesPage, -}: MyVotesSummary) => { - const [voteCard, setVoteCard] = useRecoilState(voteCardState); - const [action, setAction] = useState<'click' | 'longpress' | undefined>(undefined); - const [showCart, setShowCart] = useState(false); - const [mouseOnDropdown, setMouseOnDropdown] = useState(false); - const navigate = useNavigate(); - const { network } = useNetwork(); - const { data: epochId } = useGetEpochIndex('spartan'); - const { state } = useVoteContext(); - const { activeWallet } = useWallet(); - const networkForState = getVoteSelectionState( - state, - activeWallet?.address, - epochId?.toString(), - network?.id.toString() - ); - const stateFromCouncils = ( - typeof networkForState !== 'string' ? networkForState : { spartan: networkForState } - ) as VoteStateForNetwork; - const [timer, setTimer] = useState(); - const [isLongpress, setIsLongpress] = useState(false); - - const startPressTimer = () => { - setIsLongpress(false); - setTimer( - setTimeout(() => { - setAction('longpress'); - setIsLongpress(true); - }, 500) - ); - }; - - useEffect(() => { - if (action === 'click') { - setAction('click'); - navigate('/my-votes'); - } else if (action === 'longpress') { - setAction(undefined); - setShowCart(true); - } - }, [action, navigate]); - - useEffect(() => { - const thisComponent = document.querySelector('#my-votes-summary'); - const listener = (event: any) => { - if (event.target && !thisComponent?.contains(event.target)) { - setShowCart(false); - } - }; - document.addEventListener('mousedown', listener); - - return () => { - document.removeEventListener('mousedown', listener); - }; - }, []); - - useEffect(() => { - if (voteCard) { - setTimeout(() => setVoteCard(false), 3000); - } - }, [voteCard, setVoteCard]); - - return ( - { - if (isLongpress) { - return; - } - setAction('click'); - }} - onMouseEnter={() => { - if (councilPeriod === '2') setShowCart(true); - }} - onMouseLeave={() => { - setTimeout(() => { - if (!mouseOnDropdown) setShowCart(false); - }, 1000); - }} - onMouseDown={() => { - startPressTimer(); - }} - onMouseUp={() => { - clearTimeout(timer); - }} - onTouchStart={() => { - startPressTimer(); - }} - onTouchEnd={() => { - clearTimeout(timer); - }} - rounded="base" - w="100%" - maxW={{ base: '220px', xl: '300px' }} - borderColor={isInMyVotesPage ? 'cyan.500' : 'gray.900'} - borderWidth="1px" - py={2} - px={4} - height="48px" - alignItems="center" - bg="navy.700" - _hover={{ - bg: 'linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.06) 100%), #0B0B22;', - }} - > - - My Votes - - - - {councilPeriod === '2' && ( - <> - {Object.values(stateFromCouncils).filter((vote) => !!vote).length}/{councils.length} - - )} - {isLoading && } - {schedule && (councilPeriod === '1' || councilPeriod === '0') && ( - - )} - - {voteCard || (showCart && councilPeriod === '2') ? ( - setShowCart(false)} - votes={stateFromCouncils} - isMouseOnDropdown={(val: boolean) => setMouseOnDropdown(val)} - period={councilPeriod} - /> - ) : null} - - - ); -}; diff --git a/governance/ui/src/components/MyVotesSummary/index.ts b/governance/ui/src/components/MyVotesSummary/index.ts deleted file mode 100644 index e72a1d7ad..000000000 --- a/governance/ui/src/components/MyVotesSummary/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './MyVotesSummary'; diff --git a/governance/ui/src/components/NominateSelf/NominateSelf.tsx b/governance/ui/src/components/NominateSelf/NominateSelf.tsx deleted file mode 100644 index 870678d56..000000000 --- a/governance/ui/src/components/NominateSelf/NominateSelf.tsx +++ /dev/null @@ -1,302 +0,0 @@ -import { - Button, - Flex, - FlexProps, - Heading, - IconButton, - Image, - Link, - Spinner, - Text, -} from '@chakra-ui/react'; -import councils, { CouncilSlugs } from '../../utils/councils'; -import { useEffect, useState } from 'react'; -import useNominateSelf from '../../mutations/useNominateSelf'; -import { useNavigate } from 'react-router-dom'; -import { CloseIcon } from '@chakra-ui/icons'; -import { useGetCurrentPeriod, useGetIsNominated, useGetUserDetailsQuery } from '../../queries'; -import { useNetwork, useWallet } from '../../queries/useWallet'; -import { ProfilePicture } from '../UserProfileCard/ProfilePicture'; -import { prettyString } from '@snx-v3/format'; -import { isMotherchain } from '../../utils/contracts'; - -interface NominateSelfProps extends FlexProps { - activeCouncil: CouncilSlugs; -} - -export default function NominateSelf({ activeCouncil, ...props }: NominateSelfProps) { - const [selectedCouncil, setSelectedCouncil] = useState(activeCouncil); - const [showSnaxChainBanner, setShowSnaxChainBanner] = useState(false); - const [sentTx, setSentTx] = useState(false); - const navigate = useNavigate(); - - const { network, setNetwork } = useNetwork(); - const { activeWallet } = useWallet(); - const { data: nominationInformation } = useGetIsNominated(activeWallet?.address); - const { data: currentPeriod } = useGetCurrentPeriod(activeCouncil); - - const { - mutateAsync, - isPending, - isSuccess, - data: resultNomination, - } = useNominateSelf(selectedCouncil, activeWallet?.address); - const { data } = useGetUserDetailsQuery(activeWallet?.address); - - const isInNominationOrVoting = - currentPeriod === '1' ? true : currentPeriod === '2' ? true : false; - - useEffect(() => { - if ((nominationInformation?.isNominated && !sentTx) || !isInNominationOrVoting) { - navigate('/councils/' + activeCouncil); - } - }, [nominationInformation?.isNominated, navigate, activeCouncil, sentTx, isInNominationOrVoting]); - - useEffect(() => { - if (network?.id && !isMotherchain(network.id)) { - setShowSnaxChainBanner(true); - } else { - setShowSnaxChainBanner(false); - } - }, [network?.id]); - - return ( - - {showSnaxChainBanner ? ( - <> - - Nomination only available on Snaxchain - navigate(`/councils/${activeCouncil}?nominate=false`)} - size="xs" - aria-label="close button" - icon={} - variant="ghost" - colorScheme="whiteAlpha" - color="white" - /> - - - Nomination is only available on Snaxchain. Please bridge ETH to Snaxchain and switch - your network to proceed. - - - - - - - - ) : isSuccess && resultNomination ? ( - <> - - Nomination Successful - navigate(`/councils/${activeCouncil}?nominate=false`)} - size="xs" - aria-label="close button" - icon={} - variant="ghost" - colorScheme="whiteAlpha" - color="white" - /> - - - Nominee: - - - - - - {data?.username ? data.username : prettyString(activeWallet?.address || '')} - - - Nomination Wallet: {prettyString(data?.address || '')} - - - - - Nominated for: - - - - council.slug === selectedCouncil)?.image} - w="6" - h="6" - /> - - - {councils.find((council) => council.slug === selectedCouncil)?.title} - - - - - ) : ( - <> - - Nominate Self - navigate(`/councils/${activeCouncil}?nominate=false`)} - size="xs" - aria-label="close button" - icon={} - variant="ghost" - colorScheme="whiteAlpha" - color="white" - /> - - - Nominate yourself to represent a Synthetix Governing Council with the wallet below: - - - - - - {data?.username ? data.username : prettyString(activeWallet?.address || '')} - - - Nomination Wallet: {prettyString(data?.address || '')} - - - - - Chose which governing body you would like to represent if chosen as an elected member: - - - {councils.map((council) => ( - setSelectedCouncil(council.slug)} - w="100%" - height="58px" - rounded="base" - borderColor={selectedCouncil === council.slug ? 'cyan.500' : 'gray.900'} - borderWidth="1px" - padding="2" - alignItems="center" - mb="2" - data-cy={`council-nomination-select-${council.slug}`} - _hover={{ - bg: 'linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.06) 100%), #0B0B22;', - }} - > - - - - - {council.title} - - - ))} - - {isPending ? ( - - ) : ( - - )} - - )} - - ); -} diff --git a/governance/ui/src/components/NominateSelf/NominateSelfContainer.tsx b/governance/ui/src/components/NominateSelf/NominateSelfContainer.tsx deleted file mode 100644 index 733772105..000000000 --- a/governance/ui/src/components/NominateSelf/NominateSelfContainer.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { Show, Modal, ModalOverlay, ModalContent, Hide } from '@chakra-ui/react'; -import NominateSelf from './NominateSelf'; -import { CouncilSlugs } from '../../utils/councils'; - -export const NominateSelfContainer = ({ - activeCouncil, - onClose, -}: { - activeCouncil: CouncilSlugs; - onClose: () => void; -}) => { - return ( - <> - - - - - - - - - - - - - ); -}; diff --git a/governance/ui/src/components/NominateSelf/index.ts b/governance/ui/src/components/NominateSelf/index.ts deleted file mode 100644 index 0dbdd99bc..000000000 --- a/governance/ui/src/components/NominateSelf/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './NominateSelf'; diff --git a/governance/ui/src/components/PastElectionAccordion/PastElectionAccordion.tsx b/governance/ui/src/components/PastElectionAccordion/PastElectionAccordion.tsx deleted file mode 100644 index 368a43645..000000000 --- a/governance/ui/src/components/PastElectionAccordion/PastElectionAccordion.tsx +++ /dev/null @@ -1,83 +0,0 @@ -import { - Accordion, - AccordionButton, - AccordionIcon, - AccordionItem, - AccordionPanel, - Heading, - Image, - Table, - Tbody, - Td, - Text, - Th, - Thead, - Tr, -} from '@chakra-ui/react'; -import { Council } from '../../utils/councils'; -import { Badge } from '../Badge'; - -export function PastElectionAccordion({ activeCouncil }: { activeCouncil?: Council }) { - return ( - - -

- - - Q1 2023 - - - 01/02/2023 - 06/06/2023 - - - -

- - - - - - - - - - - - - - - - - - -
NameRoleVotes ReceivedVoting Power (in %)
- - - {activeCouncil?.address} - - - Spartan Council - - - 20 - - - - 16.04% - - - 3,45345,3242,22 - -
-
-
-
- ); -} diff --git a/governance/ui/src/components/PastElectionAccordion/index.ts b/governance/ui/src/components/PastElectionAccordion/index.ts deleted file mode 100644 index 18db0f8d2..000000000 --- a/governance/ui/src/components/PastElectionAccordion/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './PastElectionAccordion'; diff --git a/governance/ui/src/components/PeriodCountdown/PeriodCountdown.tsx b/governance/ui/src/components/PeriodCountdown/PeriodCountdown.tsx deleted file mode 100644 index 57dc058c6..000000000 --- a/governance/ui/src/components/PeriodCountdown/PeriodCountdown.tsx +++ /dev/null @@ -1,65 +0,0 @@ -import { Box, Spinner, Text } from '@chakra-ui/react'; -import { useGetCurrentPeriod } from '../../queries/useGetCurrentPeriod'; -import { useGetEpochSchedule } from '../../queries/useGetEpochSchedule'; -import { Timer } from '../Timer'; -import { CouncilSlugs } from '../../utils/councils'; - -export default function PeriodCountdown({ council }: { council: CouncilSlugs }) { - const { data: councilPeriod } = useGetCurrentPeriod(council); - const { data: schedule, isLoading } = useGetEpochSchedule(council); - - if (councilPeriod === '3') { - return ( - - - CLOSED - - - ); - } - return ( - - - {councilPeriod === '0' - ? 'Next Elections:' - : councilPeriod === '1' - ? 'Voting starts:' - : 'Voting ends:'} - - {isLoading ? ( - - ) : councilPeriod === '0' && schedule ? ( - - ) : ( - schedule?.votingPeriodStartDate && ( - - ) - )} - - - ); -} diff --git a/governance/ui/src/components/PeriodCountdown/index.ts b/governance/ui/src/components/PeriodCountdown/index.ts deleted file mode 100644 index b73d91991..000000000 --- a/governance/ui/src/components/PeriodCountdown/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './PeriodCountdown'; diff --git a/governance/ui/src/components/Socials/Socials.tsx b/governance/ui/src/components/Socials/Socials.tsx index dae8f71d6..782ae61d5 100644 --- a/governance/ui/src/components/Socials/Socials.tsx +++ b/governance/ui/src/components/Socials/Socials.tsx @@ -17,7 +17,7 @@ export const Socials: FC = ({ discord, github, twitter }) => { {discord && ( diff --git a/governance/ui/src/components/SortArrows/SortArrows.tsx b/governance/ui/src/components/SortArrows/SortArrows.tsx deleted file mode 100644 index c2edc700f..000000000 --- a/governance/ui/src/components/SortArrows/SortArrows.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { ChevronDown, ChevronUp } from '@snx-v3/icons'; - -export default function SortArrows({ up }: { up: boolean }) { - return up ? : ; -} diff --git a/governance/ui/src/components/SortArrows/index.ts b/governance/ui/src/components/SortArrows/index.ts deleted file mode 100644 index ad554f9f7..000000000 --- a/governance/ui/src/components/SortArrows/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './SortArrows'; diff --git a/governance/ui/src/components/TableLoading/TableLoading.tsx b/governance/ui/src/components/TableLoading/TableLoading.tsx deleted file mode 100644 index feb7296e3..000000000 --- a/governance/ui/src/components/TableLoading/TableLoading.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import { Skeleton, Td, Tr } from '@chakra-ui/react'; - -export default function TableLoading() { - return ( - <> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ); -} diff --git a/governance/ui/src/components/TableLoading/index.ts b/governance/ui/src/components/TableLoading/index.ts deleted file mode 100644 index 747474240..000000000 --- a/governance/ui/src/components/TableLoading/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './TableLoading'; diff --git a/governance/ui/src/components/Timer/Timer.tsx b/governance/ui/src/components/Timer/Timer.tsx deleted file mode 100644 index 73b3a1530..000000000 --- a/governance/ui/src/components/Timer/Timer.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { Text } from '@chakra-ui/react'; -import useCountdown from '../../hooks/useCountdown'; - -export function Timer({ expiryTimestamp, id }: { expiryTimestamp: number; id: string }) { - const { days, hours, minutes } = useCountdown(id, expiryTimestamp); - return ( - - {days}D {hours}H {minutes}M - - ); -} diff --git a/governance/ui/src/components/Timer/index.ts b/governance/ui/src/components/Timer/index.ts deleted file mode 100644 index e79e25f75..000000000 --- a/governance/ui/src/components/Timer/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './Timer'; diff --git a/governance/ui/src/components/UserActionBox/UserActionBox.tsx b/governance/ui/src/components/UserActionBox/UserActionBox.tsx index bf52dd338..a2c87271a 100644 --- a/governance/ui/src/components/UserActionBox/UserActionBox.tsx +++ b/governance/ui/src/components/UserActionBox/UserActionBox.tsx @@ -1,31 +1,18 @@ import { Flex, Show, Text, useDisclosure } from '@chakra-ui/react'; import { useSearchParams } from 'react-router-dom'; import { CouncilSlugs } from '../../utils/councils'; -import { NominateSelfContainer } from '../NominateSelf/NominateSelfContainer'; -import { EditNominationContainer } from '../EditNomination/EditNominationContainer'; import { SelectedContainer } from '../UserProfileCard/SelectedContainer'; -import { useWallet } from '../../queries/useWallet'; interface UserActionBoxProps { activeCouncil: CouncilSlugs; } export default function UserActionBox({ activeCouncil }: UserActionBoxProps) { - const { activeWallet } = useWallet(); const [searchParams] = useSearchParams(); - const editNomination = searchParams.get('editNomination') === 'true' ? true : false; - const nominate = searchParams.get('nominate') === 'true' ? true : false; const selectedUserAddress = searchParams.get('view') as string; const { onClose } = useDisclosure(); - if (nominate && activeWallet?.address) { - return ; - } - - if (editNomination && activeWallet?.address) { - return ; - } if (selectedUserAddress) { return ( @@ -33,7 +20,6 @@ export default function UserActionBox({ activeCouncil }: UserActionBoxProps) { activeCouncil={activeCouncil} onClose={onClose} selectedUserAddress={selectedUserAddress} - isOwn={selectedUserAddress?.toLowerCase() === activeWallet?.address.toLowerCase()} /> ); } diff --git a/governance/ui/src/components/UserListItem/UserListItem.tsx b/governance/ui/src/components/UserListItem/UserListItem.tsx deleted file mode 100644 index 9c105f0c6..000000000 --- a/governance/ui/src/components/UserListItem/UserListItem.tsx +++ /dev/null @@ -1,138 +0,0 @@ -import { Button, Flex, Text } from '@chakra-ui/react'; -import { useGetIsNominated } from '../../queries/useGetIsNominated'; -import { useNavigate, useSearchParams } from 'react-router-dom'; -import { useGetUserDetailsQuery } from '../../queries'; -import { useGetCurrentPeriod } from '../../queries/useGetCurrentPeriod'; -import { CouncilSlugs } from '../../utils/councils'; -import { useWallet } from '../../queries/useWallet'; -import { Badge } from '../Badge'; -import { ProfilePicture } from '../UserProfileCard/ProfilePicture'; -import { prettyString } from '@snx-v3/format'; - -export default function UserListItem({ - address, - activeCouncil, - ...props -}: { - address: string; - activeCouncil: CouncilSlugs; -}) { - const navigate = useNavigate(); - const [searchParams] = useSearchParams(); - const { data: user } = useGetUserDetailsQuery(address); - const { data: nominationInformation, isFetched: isNominatedFetched } = useGetIsNominated(address); - const { data: councilPeriod } = useGetCurrentPeriod(activeCouncil); - const { activeWallet } = useWallet(); - const isOwn = activeWallet?.address.toLowerCase() === user?.address.toLowerCase(); - const isNominationOrVoting = councilPeriod === '1' || councilPeriod === '2'; - - return ( - { - e.stopPropagation(); - navigate(`/councils/${activeCouncil}?view=${address}`); - }} - borderY={address === searchParams.get('view') ? '1px solid' : ''} - borderX={address === searchParams.get('view') ? '1px solid' : ''} - borderColor={address === searchParams.get('view') ? 'cyan.500' : 'gray.900'} - _hover={{ background: 'rgba(255,255,255,0.12)' }} - rounded="base" - data-cy={`user-list-item-${address}`} - {...props} - > - - - - {user?.username ? user.username : prettyString(user?.address || '')} - - - {nominationInformation?.isNominated && - nominationInformation.council.slug === activeCouncil && ( - - Nominee - - )} - {councilPeriod === '1' && isNominatedFetched && !!nominationInformation ? ( - - ) : councilPeriod === '2' && isNominatedFetched ? ( - - ) : ( - isNominatedFetched && ( - - ) - )} - - ); -} diff --git a/governance/ui/src/components/UserListItem/index.ts b/governance/ui/src/components/UserListItem/index.ts deleted file mode 100644 index b4fd5d5f0..000000000 --- a/governance/ui/src/components/UserListItem/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './UserListItem'; diff --git a/governance/ui/src/components/UserProfileCard/ProfilePicture/ProfilePicture.tsx b/governance/ui/src/components/UserProfileCard/ProfilePicture/ProfilePicture.tsx index 4bcea1fc1..b3e931057 100644 --- a/governance/ui/src/components/UserProfileCard/ProfilePicture/ProfilePicture.tsx +++ b/governance/ui/src/components/UserProfileCard/ProfilePicture/ProfilePicture.tsx @@ -1,9 +1,8 @@ -import { Box, ImageProps } from '@chakra-ui/react'; +import { Box } from '@chakra-ui/react'; import Blockies from 'react-blockies'; interface ProfilePictureInterface { address?: string; - ImageProps?: ImageProps; size?: number; mr?: string; ml?: string; diff --git a/governance/ui/src/components/UserProfileCard/SelectedContainer.tsx b/governance/ui/src/components/UserProfileCard/SelectedContainer.tsx index 1df75a818..b2339b098 100644 --- a/governance/ui/src/components/UserProfileCard/SelectedContainer.tsx +++ b/governance/ui/src/components/UserProfileCard/SelectedContainer.tsx @@ -5,7 +5,6 @@ import { CouncilSlugs } from '../../utils/councils'; interface SelectedContainerInterface { activeCouncil: CouncilSlugs; selectedUserAddress: string; - isOwn: boolean; onClose: () => void; } @@ -13,7 +12,6 @@ export const SelectedContainer = ({ activeCouncil, selectedUserAddress, onClose, - isOwn, }: SelectedContainerInterface) => { return ( <> @@ -21,11 +19,7 @@ export const SelectedContainer = ({ - + @@ -37,7 +31,6 @@ export const SelectedContainer = ({ mb={24} walletAddress={selectedUserAddress} activeCouncil={activeCouncil} - isOwn={isOwn} /> diff --git a/governance/ui/src/components/UserProfileCard/UserProfileCard.tsx b/governance/ui/src/components/UserProfileCard/UserProfileCard.tsx index 5f154c60a..17f0b6894 100644 --- a/governance/ui/src/components/UserProfileCard/UserProfileCard.tsx +++ b/governance/ui/src/components/UserProfileCard/UserProfileCard.tsx @@ -1,33 +1,19 @@ -import { Flex, Spinner, Text, FlexProps } from '@chakra-ui/react'; -import { useGetCurrentPeriod, useGetUserDetailsQuery } from '../../queries'; +import { Flex, FlexProps } from '@chakra-ui/react'; import { CouncilSlugs } from '../../utils/councils'; +import { Members } from '../CouncilMembers/Members'; import { UserProfileDetails } from './UserProfileDetails'; -import { useGetIsNominated } from '../../queries/useGetIsNominated'; interface UserProfileCardInterface extends FlexProps { walletAddress: string; activeCouncil: CouncilSlugs; - isOwn: boolean; } export function UserProfileCard({ walletAddress, activeCouncil, - isOwn, ...props }: UserProfileCardInterface) { - const { - data: userData, - error, - isLoading: useDataLoading, - } = useGetUserDetailsQuery(walletAddress); - const { data: councilPeriod, isLoading: councilPeriodLoading } = - useGetCurrentPeriod(activeCouncil); - const { data: isNominated, isLoading: isNominatedLoading } = useGetIsNominated( - isOwn ? walletAddress : '' - ); - - const isLoading = useDataLoading || councilPeriodLoading || isNominatedLoading; + const userData = Members.find((member) => member.address === walletAddress); return ( - {error && {error.message}} - {isLoading ? ( - - - - ) : ( - - )} + ); } diff --git a/governance/ui/src/components/UserProfileCard/UserProfileDetails.tsx b/governance/ui/src/components/UserProfileCard/UserProfileDetails.tsx index 67dbe7e47..d5ebaa4f4 100644 --- a/governance/ui/src/components/UserProfileCard/UserProfileDetails.tsx +++ b/governance/ui/src/components/UserProfileCard/UserProfileDetails.tsx @@ -1,113 +1,29 @@ import { CloseIcon, CopyIcon } from '@chakra-ui/icons'; -import { Flex, IconButton, Button, Text, Tooltip, Box } from '@chakra-ui/react'; +import { Button, Flex, IconButton, Image, Text, Tooltip } from '@chakra-ui/react'; import { prettyString } from '@snx-v3/format'; -import { Socials } from '../Socials'; +import { useRef, useState } from 'react'; +import { useNavigate } from 'react-router-dom'; import { GetUserDetails } from '../../queries/useGetUserDetailsQuery'; import { CouncilSlugs } from '../../utils/councils'; -import { useNavigate } from 'react-router-dom'; -import { useVoteContext } from '../../context/VoteContext'; +import { ShareIcon } from '../Icons'; +import { Socials } from '../Socials'; import { ProfilePicture } from './ProfilePicture'; -import { EditIcon, EthereumIcon, OPIcon, ShareIcon } from '../Icons'; -import { - useGetEpochIndex, - useGetUserBallot, - useGetUserVotingPowerForAllChains, - useNetwork, - useWallet, -} from '../../queries'; -import { useEffect, useRef, useState } from 'react'; -import { useRecoilState } from 'recoil'; -import { voteCardState } from '../../state/vote-card'; -import { getVoteSelectionState } from '../../utils/localstorage'; -import { isMotherchain } from '../../utils/contracts'; -import VotePower from './VotePower'; -import { BigNumber } from 'ethers'; - -interface UserProfileDetailsProps { - userData?: GetUserDetails; - activeCouncil: CouncilSlugs; - walletAddress: string; - isOwn?: boolean; - isNominated?: boolean; - councilPeriod?: string; -} -export const UserProfileDetails = ({ +export function UserProfileDetails({ userData, activeCouncil, walletAddress, - isOwn, - isNominated, - councilPeriod, -}: UserProfileDetailsProps) => { - const [showVotePower, setShowVoteBanner] = useState(false); - const [_, setVoteCard] = useRecoilState(voteCardState); - const { activeWallet } = useWallet(); +}: { + userData?: GetUserDetails; + activeCouncil: CouncilSlugs; + walletAddress: string; +}) { const [tooltipLabel, setTooltipLabel] = useState('Copy Profile Link'); const [walletToolTipLabel, setWalletTooltipLabel] = useState('Copy'); const [isTooltipOpen, setIsTooltipOpen] = useState(false); const [isWalletTooltipOpen, setWalletIsTooltipOpen] = useState(false); - const { network } = useNetwork(); - const { data: votePowers } = useGetUserVotingPowerForAllChains(activeCouncil); - const { data: epochId } = useGetEpochIndex(activeCouncil); - const { dispatch, state } = useVoteContext(); const navigate = useNavigate(); - const { data: ballot } = useGetUserBallot(activeCouncil); const elementRef = useRef(null); - const [isOverflowing, setIsOverflowing] = useState(false); - const networkForState = getVoteSelectionState( - state, - activeWallet?.address, - epochId?.toString(), - network?.id.toString(), - activeCouncil - ); - const voteAddressState = typeof networkForState === 'string' ? networkForState : ''; - const isSelected = voteAddressState - ? voteAddressState?.toLowerCase().trim() === userData?.address?.toLowerCase().trim() - : false; - - const isAlreadyVoted = - !!ballot?.votedCandidates && - ballot?.votedCandidates[0]?.toLowerCase() === userData?.address?.toLowerCase(); - - useEffect(() => { - const checkOverflow = () => { - const el = elementRef.current; - if (el) { - const isOverflowing = el.scrollHeight > el.clientHeight || el.scrollWidth > el.clientWidth; - setIsOverflowing(isOverflowing); - } - }; - checkOverflow(); - window.addEventListener('resize', checkOverflow); - const handleScroll = () => { - if (elementRef.current) { - const { scrollTop, scrollHeight, clientHeight } = elementRef.current; - if (scrollTop + clientHeight >= scrollHeight - 10) { - setIsOverflowing(false); - } else { - setIsOverflowing(true); - } - } - }; - - const refCurrent = elementRef.current; - if (refCurrent) { - refCurrent.addEventListener('scroll', handleScroll); - } - - return () => { - if (refCurrent) { - refCurrent.removeEventListener('scroll', handleScroll); - } - window.removeEventListener('resize', checkOverflow); - }; - }, []); - - if (showVotePower) { - return ; - } return ( <> @@ -125,23 +41,11 @@ export const UserProfileDetails = ({ right="0px" _hover={{}} /> - {isOwn && ( - } - mr="1" - variant="ghost" - position="absolute" - top="4px" - right="32px" - aria-label="edit-profile" - onClick={() => navigate(`/profile`)} - data-cy="edit-icon-user-profile-details" - color="white" - _hover={{}} - /> + {userData?.image ? ( + + ) : ( + )} - - {userData?.username ? userData.username : prettyString(userData?.address || '')} + {userData?.name ? userData.name : prettyString(userData?.address || '')} - {userData?.about} + {userData?.description} @@ -249,171 +153,18 @@ export const UserProfileDetails = ({ ref={elementRef} > {userData?.delegationPitch} - {isOverflowing && ( - - )} )} - {isOwn && ( - <> - {councilPeriod === '2' && isNominated ? ( - - - - ) : councilPeriod === '1' ? ( - - ) : null} - - )} - {councilPeriod === '2' && ( - <> - {!isNominated && isOwn && ( - - )} - - - )} - - {!isOwn && councilPeriod !== '2' && ( - - )} + ); -}; - -interface VotePowerToNetwork { - power: BigNumber; - isDeclared: boolean; -} - -function votePowerToNetwork( - power?: - | { - L1: VotePowerToNetwork | undefined; - Optimism: VotePowerToNetwork | undefined; - } - | undefined -) { - if (!power) return []; - const networks = []; - networks.push({ icon: EthereumIcon, chainId: 1, power: power.L1?.power }); - networks.push({ icon: OPIcon, chainId: 10, power: power.Optimism?.power }); - return networks; } diff --git a/governance/ui/src/components/UserProfileCard/VotePower.tsx b/governance/ui/src/components/UserProfileCard/VotePower.tsx deleted file mode 100644 index c7770816a..000000000 --- a/governance/ui/src/components/UserProfileCard/VotePower.tsx +++ /dev/null @@ -1,79 +0,0 @@ -import { CloseIcon } from '@chakra-ui/icons'; -import { Button, Flex, Heading, IconButton, Text } from '@chakra-ui/react'; -import { ReactNode } from 'react'; -import { useNavigate } from 'react-router-dom'; -import { useNetwork } from '../../queries'; -import { BigNumber } from 'ethers'; -import { formatNumber } from '@snx-v3/formatters'; - -export default function VotePower({ - activeCouncil, - networks, -}: { - networks: { icon: ReactNode; chainId: number; power?: BigNumber }[]; - activeCouncil: string; -}) { - const navigate = useNavigate(); - const { setNetwork } = useNetwork(); - return ( - - navigate(`/councils/${activeCouncil}`)} - size="sm" - aria-label="close button" - icon={} - variant="ghost" - colorScheme="whiteAlpha" - color="white" - position="absolute" - top="16px" - right="0px" - _hover={{}} - /> - - Voting not available on Snaxchain - - - Voting is not available on Snaxchain. Switch to Ethereum or Optimism.{' '} - - - {networks.map((network) => ( - - - {network.icon} - - - Total Voting Power - - - {formatNumber(network.power?.toString() || '0') || '0'} - - - - - - ))} - - - ); -} diff --git a/governance/ui/src/components/UserProfileForm/UserProfileEditPreview.tsx b/governance/ui/src/components/UserProfileForm/UserProfileEditPreview.tsx deleted file mode 100644 index 2c799aff8..000000000 --- a/governance/ui/src/components/UserProfileForm/UserProfileEditPreview.tsx +++ /dev/null @@ -1,173 +0,0 @@ -import { Box, Button, Flex, Text } from '@chakra-ui/react'; -import { ProfilePicture } from '../UserProfileCard/ProfilePicture'; -import { prettyString } from '@snx-v3/format'; -import { GetUserDetails } from '../../queries'; -import { Socials } from '../Socials'; -import { CopyIcon } from '@chakra-ui/icons'; -import { useEffect, useRef, useState } from 'react'; - -export default function UserProfileEditPreview({ - userData, - activeWallet, - isPending, - isDirty, - hasError, -}: { - isPending: boolean; - activeWallet?: string; - isDirty: boolean; - userData: GetUserDetails; - hasError: boolean; -}) { - const elementRef = useRef(null); - const [isOverflowing, setIsOverflowing] = useState(false); - useEffect(() => { - const checkOverflow = () => { - const el = elementRef.current; - if (el) { - const isOverflowing = el.scrollHeight > el.clientHeight || el.scrollWidth > el.clientWidth; - setIsOverflowing(isOverflowing); - } - }; - checkOverflow(); - window.addEventListener('resize', checkOverflow); - const handleScroll = () => { - if (elementRef.current) { - const { scrollTop, scrollHeight, clientHeight } = elementRef.current; - if (scrollTop + clientHeight >= scrollHeight - 10) { - setIsOverflowing(false); - } else { - setIsOverflowing(true); - } - } - }; - - const refCurrent = elementRef.current; - if (refCurrent) { - refCurrent.addEventListener('scroll', handleScroll); - } - - return () => { - if (refCurrent) { - refCurrent.removeEventListener('scroll', handleScroll); - } - window.removeEventListener('resize', checkOverflow); - }; - }, []); - - return ( - - - - - - {userData.username ? userData.username : prettyString(activeWallet || '')} - - - {userData?.about} - - - - - - - - - Wallet Address - - - - {userData?.delegationPitch && ( - <> - - Governance Pitch - - - {userData?.delegationPitch} - {isOverflowing && ( - - )} - - - )} - - - ); -} diff --git a/governance/ui/src/components/UserProfileForm/UserProfileForm.tsx b/governance/ui/src/components/UserProfileForm/UserProfileForm.tsx deleted file mode 100644 index ba7b4ffee..000000000 --- a/governance/ui/src/components/UserProfileForm/UserProfileForm.tsx +++ /dev/null @@ -1,428 +0,0 @@ -import { CloseIcon, CopyIcon } from '@chakra-ui/icons'; -import { - Button, - Flex, - Heading, - IconButton, - Input, - Modal, - ModalCloseButton, - ModalContent, - ModalOverlay, - Show, - Spinner, - Text, - Textarea, - Tooltip, - useDisclosure, -} from '@chakra-ui/react'; -import { useForm } from 'react-hook-form'; -import useUpdateUserDetailsMutation from '../../mutations/useUpdateUserDetailsMutation'; -import { GetUserDetails, useGetUserDetailsQuery } from '../../queries/'; -import { useEffect } from 'react'; -import { unstable_useBlocker as useBlocker } from 'react-router-dom'; -import { useWallet } from '../../queries/useWallet'; -import UserProfileEditPreview from './UserProfileEditPreview'; - -const urlPattern = new RegExp('https?:\\/\\/(?:www\\.)?[^s/$.?#].[^s]*', 'i'); - -type OnChangeEvent = Record>; - -export function UserProfileForm() { - const { isOpen, onClose, onOpen } = useDisclosure(); - const { activeWallet } = useWallet(); - const { data: user, isLoading } = useGetUserDetailsQuery(activeWallet?.address); - const { mutateAsync, isPending } = useUpdateUserDetailsMutation(); - const { - isOpen: blockerIsOpen, - onClose: onBlockerClose, - onOpen: onBlockerOpen, - } = useDisclosure({ id: 'blocker' }); - const { - register, - getValues, - setValue, - watch, - formState, - reset, - handleSubmit, - setError, - clearErrors, - } = useForm({ - defaultValues: { - address: user?.about, - username: user?.username, - discord: user?.discord, - twitter: user?.twitter, - about: user?.about, - github: user?.github, - pfpUrl: user?.pfpUrl, - delegationPitch: user?.delegationPitch, - }, - }); - - const userData = watch() as GetUserDetails; - - useEffect(() => { - if (user) { - setValue('username', user.username); - setValue('discord', user.discord); - setValue('twitter', user.twitter); - setValue('about', user.about); - setValue('github', user.github); - setValue('pfpUrl', user.pfpUrl); - setValue('delegationPitch', user.delegationPitch); - } - }, [user, setValue]); - const handleOnFormSave = async () => { - reset({ - about: getValues('about')!, - address: user!.address, - delegationPitch: getValues('delegationPitch')!, - discord: getValues('discord')!, - github: getValues('github')!, - pfpUrl: getValues('pfpUrl')!, - twitter: getValues('twitter')!, - username: getValues('username')!, - }); - await mutateAsync({ - about: getValues('about')!, - address: user!.address, - email: '', - associatedAddresses: '', - bannerImageId: '', - bannerUrl: '', - delegationPitch: getValues('delegationPitch')! ?? ' ', - discord: getValues('discord')!, - ens: '', - github: getValues('github')!, - bannerThumbnailUrl: '', - pfpUrl: getValues('pfpUrl')!, - website: '', - pfpImageId: '', - twitter: getValues('twitter')!, - pfpThumbnailUrl: '', - notificationPreferences: '', - type: '', - username: getValues('username')!, - }); - }; - - const blocker = useBlocker(() => { - if (formState.isDirty) { - onBlockerOpen(); - return true; - } - onBlockerClose(); - return false; - }); - - if (isLoading) - return ( - - - - ); - - return ( - <> -
- - - - - Username - - - - - - About - - - - - - Discord - - { - if (urlPattern.test(event.target.value)) { - setError('discord', { message: 'Only usernames. No links' }); - } else { - clearErrors('discord'); - } - }, - })} - placeholder="eg: username" - data-cy="discord-input" - /> - - {formState.errors?.discord?.message} - - - - - Twitter - - { - if (urlPattern.test(event.target.value)) { - setError('twitter', { message: 'Only usernames. No links' }); - } else { - clearErrors('twitter'); - } - }, - })} - placeholder="eg: username" - data-cy="twitter-input" - /> - - {formState.errors?.twitter?.message} - - - - - Github - - { - if (urlPattern.test(event.target.value)) { - setError('github', { message: 'Only usernames. No links' }); - } else { - clearErrors('github'); - } - }, - })} - placeholder="eg: username" - data-cy="github-input" - /> - - {formState.errors?.github?.message} - - - - - Wallet Address - - - - - - - - Governance Pitch - -